SketchUp C API

- Main Page
- Related Pages
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Related Functions
SULoopInputRef Struct Reference

## Related Functions
(Note that these are not member functions.)
enum SUResult | SULoopInputCreate (SULoopInputRef *loop_input)
| Creates a loop input object. More...
enum SUResult | SULoopInputRelease (SULoopInputRef *loop_input)
| Deallocates a loop input object. More...
enum SUResult | SULoopInputAddVertexIndex (SULoopInputRef loop_input, size_t vertex_index)
| Adds a vertex index to a loop input object. More...
enum SUResult | SULoopInputEdgeSetHidden (SULoopInputRef loop_input, size_t edge_index, bool hidden)
| Sets the hidden flag of an edge in a loop input object. More...
enum SUResult | SULoopInputEdgeSetSoft (SULoopInputRef loop_input, size_t edge_index, bool soft)
| Sets the soft flag of an edge in a loop input object. More...
enum SUResult | SULoopInputEdgeSetSmooth (SULoopInputRef loop_input, size_t edge_index, bool smooth)
| Sets the smooth flag of an edge in a loop input object. More...
enum SUResult | SULoopInputEdgeSetMaterial (SULoopInputRef loop_input, size_t edge_index, SUMaterialRef material)
| Sets the material of an edge in the loop input. More...
enum SUResult | SULoopInputEdgeSetLayer (SULoopInputRef loop_input, size_t edge_index, SULayerRef layer)
| Sets the layer of an edge in the loop input. More...
enum SUResult | SULoopInputAddCurve (SULoopInputRef loop_input, size_t first_edge_index, size_t last_edge_index)
| Adds a simple curve to a loop input object. More...
enum SUResult | SULoopInputIsClosed (SULoopInputRef loop_input, bool *is_closed)
| Retrieves whether the loop input is closed. A loop input can be closed either by re-adding the start vertex to the end of the loop using SULoopInputAddVertexIndex() or by adding a curve to the loop input which connects the loop's start and end points using SULoopInputAddCurve(). More...

## Friends And Related Function Documentation

enum SUResult SULoopInputAddCurve | ( | SULoopInputRef | loop_input,
|  | size_t | first_edge_index,
|  | size_t | last_edge_index
| ) |  |
| related

Adds a simple curve to a loop input object.

Parameters

  [in,out] | loop_input | The loop input object.
  [in] | first_edge_index | First edge index to be associated with the curve.
  [in] | last_edge_index | Last edge index to be associated with the curve.

See Also
  SUGeometryInputRef

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop_input is not valid
  - SU_ERROR_OUT_OF_RANGE if first_edge_index or last_edge_index reference an edge beyond the loop's total edge count

enum SUResult SULoopInputAddVertexIndex | ( | SULoopInputRef | loop_input,
|  | size_t | vertex_index
| ) |  |
| related

Adds a vertex index to a loop input object.

Warning
  Breaking Change: The behavior of this method was changed in SketchUp 2017 M2, API 5.2. In previous releases this method returned SU_ERROR_INVALID_INPUT if the specified index was already anywhere in the loop. In SketchUp 2017 M1 the concept of an explicitly closed loop was introduced. A loop can be explicitly closed by either using this method to insert an index which is already at the beginning of the loop, or by adding a curve to the loop which connects the loop's start and end points using SULoopInputAddCurve(). If a loop was not previously closed and SULoopInputAddVertexIndex() is used to add the loop's start vertex, the loop will be closed and SU_ERROR_NONE will be returned. If attempts are made to add vertices after a loop has been explicitly closed SU_ERROR_UNSUPPORTED will be returned. If an attempt is made to add a vertex that already existed in an open loop not at the front SU_ERROR_INVALID_ARGUMENT will be returned.

Parameters

  [in,out] | loop_input | The loop input object.
  [in] | vertex_index | The vertex index to add. This references a vertex within the parent geometry input's vertex collection (as a zero- based index).

See Also
  SUGeometryInputRef

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop_input is not valid
  - SU_ERROR_UNSUPPORTED if the loop was already closed
  - SU_ERROR_INVALID_ARGUMENT if vertex_index already existed in the loop not at the front

enum SUResult SULoopInputCreate | ( | SULoopInputRef * | loop_input | ) |
| related

Creates a loop input object.

Parameters

  [out] | loop_input | The object created.

See Also
  SUGeometryInputRef

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_OUTPUT if loop_input is NULL
  - SU_ERROR_OVERWRITE_VALID if loop_input already references a valid object

enum SUResult SULoopInputEdgeSetHidden | ( | SULoopInputRef | loop_input,
|  | size_t | edge_index,
|  | bool | hidden
| ) |  |
| related

Sets the hidden flag of an edge in a loop input object.

Parameters

  [in,out] | loop_input | The loop input object.
  [in] | edge_index | The zero-based index of the edge within the loop.
  [in] | hidden | The flag to set.

See Also
  SUGeometryInputRef

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop_input is not valid
  - SU_ERROR_OUT_OF_RANGE if edge_index references beyond the current edge count

enum SUResult SULoopInputEdgeSetLayer | ( | SULoopInputRef | loop_input,
|  | size_t | edge_index,
|  | SULayerRef | layer
| ) |  |
| related

Sets the layer of an edge in the loop input.

Since
  SketchUp 2017, API 5.0

Parameters

  [in,out] | loop_input | The loop input object.
  [in] | edge_index | Index of the edge to set the layer.
  [in] | layer | The layer to be set.

See Also
  SUGeometryInputRef

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop_input or layer is not valid
  - SU_ERROR_OUT_OF_RANGE if edge_index references an edge beyond the total edge count of loop_input

enum SUResult SULoopInputEdgeSetMaterial | ( | SULoopInputRef | loop_input,
|  | size_t | edge_index,
|  | SUMaterialRef | material
| ) |  |
| related

Sets the material of an edge in the loop input.

Since
  SketchUp 2017, API 5.0

Parameters

  [in,out] | loop_input | The loop input object.
  [in] | edge_index | Index of the edge to set the material.
  [in] | material | The material to be set.

See Also
  SUGeometryInputRef

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop_input or material is not valid
  - SU_ERROR_OUT_OF_RANGE if edge_index references an edge beyond the total
  - SU_ERROR_INVALID_ARGUMENT is the material is owned by a layer or image edge count of loop_input

enum SUResult SULoopInputEdgeSetSmooth | ( | SULoopInputRef | loop_input,
|  | size_t | edge_index,
|  | bool | smooth
| ) |  |
| related

Sets the smooth flag of an edge in a loop input object.

Parameters

  [in,out] | loop_input | The loop input object.
  [in] | edge_index | The zero-based index of the edge within the loop.
  [in] | smooth | The flag to set.

See Also
  SUGeometryInputRef

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop_input is not valid
  - SU_ERROR_OUT_OF_RANGE if edge_index references beyond the current edge count

enum SUResult SULoopInputEdgeSetSoft | ( | SULoopInputRef | loop_input,
|  | size_t | edge_index,
|  | bool | soft
| ) |  |
| related

Sets the soft flag of an edge in a loop input object.

Parameters

  [in,out] | loop_input | The loop input object.
  [in] | edge_index | The zero-based index of the edge within the loop.
  [in] | soft | The flag to set.

See Also
  SUGeometryInputRef

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop_input is not valid
  - SU_ERROR_OUT_OF_RANGE if edge_index references beyond the current edge count

enum SUResult SULoopInputIsClosed | ( | SULoopInputRef | loop_input,
|  | bool * | is_closed
| ) |  |
| related

Retrieves whether the loop input is closed. A loop input can be closed either by re-adding the start vertex to the end of the loop using SULoopInputAddVertexIndex() or by adding a curve to the loop input which connects the loop's start and end points using SULoopInputAddCurve().

Since
  SketchUp 2017 M2, API 5.2

Parameters

  [in] | loop_input | The loop input object.
  [out] | is_closed | The flag retrieved (true if the loop is closed).

See Also
  SUGeometryInputRef

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop_input is not valid
  - SU_ERROR_NULL_POINTER_OUTPUT if is_closed is NULL count

enum SUResult SULoopInputRelease | ( | SULoopInputRef * | loop_input | ) |
| related

Deallocates a loop input object.

Parameters

  [in,out] | loop_input | The object to deallocate.

See Also
  SUGeometryInputRef

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_INPUT if loop_input is NULL
  - SU_ERROR_INVALID_INPUT if loop_input points to an invalid object

The documentation for this struct was generated from the following files:

- SketchUpAPI/model/defs.h
- SketchUpAPI/model/geometry_input.h