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
SULoopRef Struct Reference

References a loop object, which can be either the outer loop or an inner loop (hole) of a face. More...

`#include <SketchUpAPI/model/loop.h>`

Inherits SUEntityRef.

## Related Functions
(Note that these are not member functions.)
SUEntityRef | SULoopToEntity (SULoopRef loop)
| Converts from an SULoopRef to an SUEntityRef. This is essentially an upcast operation. More...
SULoopRef | SULoopFromEntity (SUEntityRef entity)
| Converts from an SUEntityRef to an SULoopRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SULoopRef. More...
enum SUResult | SULoopGetNumVertices (SULoopRef loop, size_t *count)
| Retrieves the number of vertices of a face loop. More...
enum SUResult | SULoopGetVertices (SULoopRef loop, size_t len, SUVertexRef vertices[], size_t *count)
| Retrieves the vertices of a face loop object. More...
enum SUResult | SULoopGetEdges (SULoopRef loop, size_t len, SUEdgeRef edges[], size_t *count)
| Retrieves the edges of a loop object. More...
enum SUResult | SULoopGetWinding (SULoopRef loop, const struct SUVector3D *vector3d, enum SULoopWinding *orientation)
| Retrieves the winding of a loop object with respect to a vector. More...
enum SUResult | SULoopIsEdgeReversed (SULoopRef loop, SUEdgeRef edge, bool *reversed)
| Retrieves a flag indicating the orientation of the given edge relative to a loop object. More...
enum SUResult | SULoopGetFace (SULoopRef loop, SUFaceRef *face)
| Retrieves the parent face of a loop object. More...
enum SUResult | SULoopIsConvex (SULoopRef loop, bool *convex)
| Retrieves a flag indicating the whether the loop is convex. More...
enum SUResult | SULoopIsOuterLoop (SULoopRef loop, bool *outer_loop)
| Retrieves a flag indicating the whether the loop is the outer loop on its associated face. More...
enum SUResult | SULoopGetEdgeUses (SULoopRef loop, size_t len, SUEdgeUseRef edge_uses[], size_t *count)
| Retrieves the edge use objects of a loop. More...
Related Functions inherited from SUEntityRef
enum SURefType | SUEntityGetType (SUEntityRef entity)
| Returns the concrete type of the given entity. More...
enum SUResult | SUEntityGetID (SUEntityRef entity, int32_t *entity_id)
| Retrieves the id of the entity. More...
enum SUResult | SUEntityGetPersistentID (SUEntityRef entity, int64_t *entity_pid)
| Retrieves the persistent id of the entity. More...
enum SUResult | SUEntityGetNumAttributeDictionaries (SUEntityRef entity, size_t *count)
| Retrieves the number of attribute dictionaries of an entity. More...
enum SUResult | SUEntityGetAttributeDictionaries (SUEntityRef entity, size_t len, SUAttributeDictionaryRef dictionaries[], size_t *count)
| Retrieves the attribute dictionaries of an entity. More...
enum SUResult | SUEntityAddAttributeDictionary (SUEntityRef entity, SUAttributeDictionaryRef dictionary)
| Adds the attribute dictionary to an entity. The given dictionary object must not belong to another entity. In other words, each dictionary should be added to one entity only. More...
enum SUResult | SUEntityGetAttributeDictionary (SUEntityRef entity, const char *name, SUAttributeDictionaryRef *dictionary)
| Retrieves the attribute dictionary of an entity that has the given name. More...
enum SUResult | SUEntityGetModel (SUEntityRef entity, SUModelRef *model)
| Retrieves the model object associated with the entity. More...
enum SUResult | SUEntityGetParentEntities (SUEntityRef entity, SUEntitiesRef *entities)
| Retrieves the entities object which contains the entity. More...

## Detailed Description

References a loop object, which can be either the outer loop or an inner loop (hole) of a face.

## Friends And Related Function Documentation

SULoopRef SULoopFromEntity | ( | SUEntityRef | entity | ) |
| related

Converts from an SUEntityRef to an SULoopRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SULoopRef.

Parameters

  [in] | entity | The given entity reference.

Returns
  - The converted SULoopRef if the downcast operation succeeds
  - If not, the returned reference will be invalid

enum SUResult SULoopGetEdges | ( | SULoopRef | loop,
|  | size_t | len,
|  | SUEdgeRef | edges[],
|  | size_t * | count
| ) |  |
| related

Retrieves the edges of a loop object.

Parameters

  [in] | loop | The loop object.
  [in] | len | The number of edges to retrieve.
  [out] | edges | The edges retrieved.
  [out] | count | The number of edges retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if edges or count is NULL

enum SUResult SULoopGetEdgeUses | ( | SULoopRef | loop,
|  | size_t | len,
|  | SUEdgeUseRef | edge_uses[],
|  | size_t * | count
| ) |  |
| related

Retrieves the edge use objects of a loop.

Parameters

  [in] | loop | The loop object.
  [in] | len | The number of edge uses to retrieve.
  [out] | edge_uses | The edge uses retrieved.
  [out] | count | The number of edge uses retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if edge_uses or count is NULL

enum SUResult SULoopGetFace | ( | SULoopRef | loop,
|  | SUFaceRef * | face
| ) |  |
| related

Retrieves the parent face of a loop object.

Parameters

  [in] | loop | The loop object.
  [out] | face | The face retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if face is NULL
  - SU_ERROR_OVERWRITE_VALID if face references a valid face object

enum SUResult SULoopGetNumVertices | ( | SULoopRef | loop,
|  | size_t * | count
| ) |  |
| related

Retrieves the number of vertices of a face loop.

Parameters

  [in] | loop | The loop object.
  [out] | count | The number of vertices.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if count is NULL

enum SUResult SULoopGetVertices | ( | SULoopRef | loop,
|  | size_t | len,
|  | SUVertexRef | vertices[],
|  | size_t * | count
| ) |  |
| related

Retrieves the vertices of a face loop object.

Parameters

  [in] | loop | The loop object.
  [in] | len | The number of vertices to retrieve.
  [out] | vertices | The vertices retrieved.
  [out] | count | The number of vertices retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if vertices or count is NULL

enum SUResult SULoopGetWinding | ( | SULoopRef | loop,
|  | const struct SUVector3D * | vector3d,
|  | enum SULoopWinding * | orientation
| ) |  |
| related

Retrieves the winding of a loop object with respect to a vector.

Parameters

  [in] | loop | The loop object.
  [in] | vector3d | The 3D vector.
  [out] | orientation | The orientation retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop is not a valid object
  - SU_ERROR_NULL_POINTER_INPUT if vector3d is NULL
  - SU_ERROR_NULL_POINTER_OUTPUT if orientation is NULL

enum SUResult SULoopIsConvex | ( | SULoopRef | loop,
|  | bool * | convex
| ) |  |
| related

Retrieves a flag indicating the whether the loop is convex.

Parameters

  [in] | loop | The loop object.
  [out] | convex | The flag retrieved. A return value of true indicates the loop is convex.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if convex is NULL

enum SUResult SULoopIsEdgeReversed | ( | SULoopRef | loop,
|  | SUEdgeRef | edge,
|  | bool * | reversed
| ) |  |
| related

Retrieves a flag indicating the orientation of the given edge relative to a loop object.

Parameters

  [in] | loop | The loop object.
  [in] | edge | The edge object.
  [out] | reversed | The flag retrieved. A return value of true indicates that the given edge is oriented opposite of the loop object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop or edge is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if reversed is NULL
  - SU_ERROR_GENERIC if edge is not a part of loop

enum SUResult SULoopIsOuterLoop | ( | SULoopRef | loop,
|  | bool * | outer_loop
| ) |  |
| related

Retrieves a flag indicating the whether the loop is the outer loop on its associated face.

Parameters

  [in] | loop | The loop object.
  [out] | outer_loop | The flag retrieved. A return value of true indicates the loop is the outer loop.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if loop is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if outer_loop is NULL

SUEntityRef SULoopToEntity | ( | SULoopRef | loop | ) |
| related

Converts from an SULoopRef to an SUEntityRef. This is essentially an upcast operation.

Parameters

  [in] | loop | The given loop reference.

Returns
  - The converted SUEntityRef if loop is a valid object
  - If not, the returned reference will be invalid

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

- SketchUpAPI/model/defs.h
- SketchUpAPI/model/loop.h