SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Related Functions
SUEdgeRef Struct Reference

References an edge. More...

#include <SketchUpAPI/model/edge.h>

Inherits SUDrawingElementRef.

Related Functions

(Note that these are not member functions.)

SUEntityRef SUEdgeToEntity (SUEdgeRef edge)
 Converts from an SUEdgeRef to an SUEntityRef. This is essentially an upcast operation. More...
 
SUEdgeRef SUEdgeFromEntity (SUEntityRef entity)
 Converts from an SUEntityRef to an SUEdgeRef. This is essentially a downcast operation so the given entity must be convertible to an SUEdgeRef. More...
 
SUDrawingElementRef SUEdgeToDrawingElement (SUEdgeRef edge)
 Converts from an SUEdgeRef to an SUDrawingElementRef. This is essentially an upcast operation. More...
 
SUEdgeRef SUEdgeFromDrawingElement (SUDrawingElementRef drawing_elem)
 Converts from an SUDrawingElementRef to an SUEdgeRef. This is essentially a downcast operation so the given element must be convertible to an SUEdgeRef. More...
 
enum SUResult SUEdgeCreate (SUEdgeRef *edge, const struct SUPoint3D *start, const struct SUPoint3D *end)
 Creates a new edge object. More...
 
enum SUResult SUEdgeRelease (SUEdgeRef *edge)
 Releases an edge object. More...
 
enum SUResult SUEdgeGetCurve (SUEdgeRef edge, SUCurveRef *curve)
 Retrieves the associated curve object of an edge object. More...
 
enum SUResult SUEdgeGetStartVertex (SUEdgeRef edge, SUVertexRef *vertex)
 Retrieves the starting vertex of an edge object. More...
 
enum SUResult SUEdgeGetEndVertex (SUEdgeRef edge, SUVertexRef *vertex)
 Retrieves the end vertex of an edge object. More...
 
enum SUResult SUEdgeSetSoft (SUEdgeRef edge, bool soft_flag)
 Sets the soft flag of an edge object. More...
 
enum SUResult SUEdgeGetSoft (SUEdgeRef edge, bool *soft_flag)
 Retrieves the soft flag of an edge object. More...
 
enum SUResult SUEdgeSetSmooth (SUEdgeRef edge, bool smooth_flag)
 Sets the smooth flag of an edge object. More...
 
enum SUResult SUEdgeGetSmooth (SUEdgeRef edge, bool *smooth_flag)
 Retrieves the smooth flag of an edge object. More...
 
enum SUResult SUEdgeGetNumFaces (SUEdgeRef edge, size_t *count)
 Retrieves the number of faces that the edge is associated with. More...
 
enum SUResult SUEdgeGetFaces (SUEdgeRef edge, size_t len, SUFaceRef faces[], size_t *count)
 Retrieves the face objects associated with an edge object. More...
 
enum SUResult SUEdgeGetColor (SUEdgeRef edge, SUColor *color)
 Retrieves the color of an edge object. More...
 
enum SUResult SUEdgeGetLengthWithTransform (SUEdgeRef edge, const struct SUTransformation *transform, double *length)
 Computes the length of the edge with the provided transformation applied. More...
 
enum SUResult SUEdgeSetColor (SUEdgeRef edge, const SUColor *color)
 Sets the color of an edge object. More...
 
enum SUResult SUEdgeReversedInFace (SUEdgeRef edge, SUFaceRef face, bool *reversed)
 Determine if edge is reversed in face 's bounding loop. More...
 

Detailed Description

References an edge.

Friends And Related Function Documentation

enum SUResult SUEdgeCreate ( SUEdgeRef edge,
const struct SUPoint3D start,
const struct SUPoint3D end 
)
related

Creates a new edge object.

The edge object must be subsequently deallocated with SUEdgeRelease() unless the edge object is associated with a parent object.

Parameters
[out]edgeThe edge object.
[in]startThe start position of the edge object.
[in]endThe end position of the edge object.
Returns
SUEdgeRef SUEdgeFromDrawingElement ( SUDrawingElementRef  drawing_elem)
related

Converts from an SUDrawingElementRef to an SUEdgeRef. This is essentially a downcast operation so the given element must be convertible to an SUEdgeRef.

Parameters
[in]drawing_elemThe given element reference.
Returns
  • The converted SUEdgeRef if the downcast operation succeeds
  • If not, the returned reference will be invalid.
SUEdgeRef SUEdgeFromEntity ( SUEntityRef  entity)
related

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

Parameters
[in]entityThe given entity reference.
Returns
  • The converted SUEdgeRef if the downcast operation succeeds
  • If not, the returned reference will be invalid
enum SUResult SUEdgeGetColor ( SUEdgeRef  edge,
SUColor color 
)
related

Retrieves the color of an edge object.

Parameters
[in]edgeThe edge object.
[out]colorThe color retrieved.
Returns
enum SUResult SUEdgeGetCurve ( SUEdgeRef  edge,
SUCurveRef curve 
)
related

Retrieves the associated curve object of an edge object.

Parameters
[in]edgeThe edge object.
[out]curveThe curve object retrieved.
Returns
enum SUResult SUEdgeGetEndVertex ( SUEdgeRef  edge,
SUVertexRef vertex 
)
related

Retrieves the end vertex of an edge object.

Parameters
[in]edgeThe edge object.
[out]vertexThe vertex object retrieved.
Returns
enum SUResult SUEdgeGetFaces ( SUEdgeRef  edge,
size_t  len,
SUFaceRef  faces[],
size_t *  count 
)
related

Retrieves the face objects associated with an edge object.

Parameters
[in]edgeThe edge object.
[in]lenThe number of faces to retrieve.
[out]facesThe faces retrieved.
[out]countThe number of face objects retrieved.
Returns
enum SUResult SUEdgeGetLengthWithTransform ( SUEdgeRef  edge,
const struct SUTransformation transform,
double *  length 
)
related

Computes the length of the edge with the provided transformation applied.

Parameters
[in]edgeThe edge object.
[in]transformA transformation to be appllied to the edge.
[out]lengthThe length retrieved.
Returns
enum SUResult SUEdgeGetNumFaces ( SUEdgeRef  edge,
size_t *  count 
)
related

Retrieves the number of faces that the edge is associated with.

Parameters
[in]edgeThe edge object.
[out]countThe number of faces.
Returns
enum SUResult SUEdgeGetSmooth ( SUEdgeRef  edge,
bool *  smooth_flag 
)
related

Retrieves the smooth flag of an edge object.

Parameters
[in]edgeThe edge object.
[out]smooth_flagThe smooth flag retrieved.
Returns
enum SUResult SUEdgeGetSoft ( SUEdgeRef  edge,
bool *  soft_flag 
)
related

Retrieves the soft flag of an edge object.

Parameters
[in]edgeThe edge object.
[out]soft_flagThe soft flag retrieved.
Returns
enum SUResult SUEdgeGetStartVertex ( SUEdgeRef  edge,
SUVertexRef vertex 
)
related

Retrieves the starting vertex of an edge object.

Parameters
[in]edgeThe edge object.
[out]vertexThe vertex object retrieved.
Returns
enum SUResult SUEdgeRelease ( SUEdgeRef edge)
related

Releases an edge object.

The edge object must have been created with SUEdgeCreate() and not subsequently associated with a parent object (e.g. SUEntitiesAddEdges()).

Parameters
[in]edgeThe edge object.
Returns
enum SUResult SUEdgeReversedInFace ( SUEdgeRef  edge,
SUFaceRef  face,
bool *  reversed 
)
related

Determine if edge is reversed in face 's bounding loop.

Since
SketchUp 2021.1, API 9.1
Parameters
[in]edgeThe edge object.
[in]faceThe face object.
[out]reversedThe reverse status retrieved.
Returns
enum SUResult SUEdgeSetColor ( SUEdgeRef  edge,
const SUColor color 
)
related

Sets the color of an edge object.

Parameters
[in]edgeThe edge object.
[in]colorThe color object to set.
Returns
enum SUResult SUEdgeSetSmooth ( SUEdgeRef  edge,
bool  smooth_flag 
)
related

Sets the smooth flag of an edge object.

Parameters
[in]edgeThe edge object.
[in]smooth_flagThe smooth flag to set.
Returns
enum SUResult SUEdgeSetSoft ( SUEdgeRef  edge,
bool  soft_flag 
)
related

Sets the soft flag of an edge object.

Parameters
[in]edgeThe edge object.
[in]soft_flagThe soft flag to set.
Returns
SUDrawingElementRef SUEdgeToDrawingElement ( SUEdgeRef  edge)
related

Converts from an SUEdgeRef to an SUDrawingElementRef. This is essentially an upcast operation.

Parameters
[in]edgeThe given edge reference.
Returns
  • The converted SUEntityRef if edge is a valid edge
  • If not, the returned reference will be invalid
SUEntityRef SUEdgeToEntity ( SUEdgeRef  edge)
related

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

Parameters
[in]edgeThe given edge reference.
Returns
  • The converted SUEntityRef if edge is a valid edge
  • If not, the returned reference will be invalid

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