SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
polyline3d.h File Reference
#include <SketchUpAPI/common.h>
#include <SketchUpAPI/geometry.h>
#include <SketchUpAPI/model/defs.h>

Go to the source code of this file.

Functions

SU_EXPORT SUEntityRef SUPolyline3dToEntity (SUPolyline3dRef line)
 Converts from an SUPolyline3dRef to an SUEntityRef. This is essentially an upcast operation. More...
 
SU_EXPORT SUPolyline3dRef SUPolyline3dFromEntity (SUEntityRef entity)
 Converts from an SUEntityRef to an SUPolyline3dRef. This is essentially a downcast operation so the given entity must be convertible to an SUPolyline3dRef. More...
 
SU_EXPORT SUDrawingElementRef SUPolyline3dToDrawingElement (SUPolyline3dRef line)
 Converts from an SUPolyline3dRef to an SUDrawingElementRef. This is essentially an upcast operation. More...
 
SU_EXPORT SUPolyline3dRef SUPolyline3dFromDrawingElement (SUDrawingElementRef drawing_elem)
 Converts from an SUDrawingElementRef to an SUPolyline3dRef. This is essentially a downcast operation so the given element must be convertible to an SUPolyline3dRef. More...
 
SU_RESULT SUPolyline3dCreate (SUPolyline3dRef *polyline)
 Creates a new polyline3d object. The polyline3d object must be subsequently deallocated with SUPolyline3dRelease unless it is associated with a parent object. More...
 
SU_RESULT SUPolyline3dRelease (SUPolyline3dRef *polyline)
 Releases a new polyline3d object. The polyline3d object must not be associated with a parent object. More...
 
SU_RESULT SUPolyline3dAddPoints (SUPolyline3dRef polyline, size_t num_points, struct SUPoint3D points[])
 Adds points to a polyline3d object. More...
 
SU_RESULT SUPolyline3dGetNumPoints (SUPolyline3dRef line, size_t *count)
 Retrieves the number of points contained by a polyline3d. More...
 
SU_RESULT SUPolyline3dGetPoints (SUPolyline3dRef line, size_t len, struct SUPoint3D points[], size_t *count)
 Retrieves the points in the polyline3d object. More...
 

Function Documentation

SU_RESULT SUPolyline3dAddPoints ( SUPolyline3dRef  polyline,
size_t  num_points,
struct SUPoint3D  points[] 
)

Adds points to a polyline3d object.

Parameters
[in]polylineThe polyline3d object.
[in]num_pointsNumber of points being added.
[in]pointsArray of points to add.
Returns
SU_RESULT SUPolyline3dCreate ( SUPolyline3dRef polyline)

Creates a new polyline3d object. The polyline3d object must be subsequently deallocated with SUPolyline3dRelease unless it is associated with a parent object.

Parameters
[out]polylineThe polyline3d object.
Returns
SU_EXPORT SUPolyline3dRef SUPolyline3dFromDrawingElement ( SUDrawingElementRef  drawing_elem)

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

Parameters
[in]drawing_elemThe drawing element object.
Returns
  • The converted SUPolyline3dRef if the downcast operation succeeds. If not, the returned reference will be invalid.
SU_EXPORT SUPolyline3dRef SUPolyline3dFromEntity ( SUEntityRef  entity)

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

Parameters
[in]entityThe given entity reference.
Returns
  • The converted SUPolyline3dRef if the downcast operation succeeds. If not, the returned reference will be invalid.
SU_RESULT SUPolyline3dGetNumPoints ( SUPolyline3dRef  line,
size_t *  count 
)

Retrieves the number of points contained by a polyline3d.

Parameters
[in]lineThe polyline3d object.
[out]countThe number of points available.
Returns
SU_RESULT SUPolyline3dGetPoints ( SUPolyline3dRef  line,
size_t  len,
struct SUPoint3D  points[],
size_t *  count 
)

Retrieves the points in the polyline3d object.

Parameters
[in]lineThe polyline3d object.
[in]lenThe maximum number of points to retrieve.
[out]pointsThe points retrieved.
[out]countThe number of points retrieved.
Returns
SU_RESULT SUPolyline3dRelease ( SUPolyline3dRef polyline)

Releases a new polyline3d object. The polyline3d object must not be associated with a parent object.

Parameters
[in]polylineThe polyline3d object.
Returns
SU_EXPORT SUDrawingElementRef SUPolyline3dToDrawingElement ( SUPolyline3dRef  line)

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

Parameters
[in]lineThe polyline3d object.
Returns
  • The converted SUEntityRef if line is a valid object. If not, the returned reference will be invalid.
SU_EXPORT SUEntityRef SUPolyline3dToEntity ( SUPolyline3dRef  line)

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

Parameters
[in]lineThe polyline3d object.
Returns
  • The converted SUEntityRef if line is a valid object. If not, the returned reference will be invalid.