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

References a geometry input object. It is used as an input to SUEntitiesFill(). More...

#include <SketchUpAPI/model/geometry_input.h>

Related Functions

(Note that these are not member functions.)

enum SUResult SUGeometryInputCreate (SUGeometryInputRef *geom_input)
 Creates a geometry input object. More...
 
enum SUResult SUGeometryInputRelease (SUGeometryInputRef *geom_input)
 Deallocates a geometry input object. More...
 
enum SUResult SUGeometryInputAddVertex (SUGeometryInputRef geom_input, const struct SUPoint3D *point)
 Adds a vertex to a geometry input object. More...
 
enum SUResult SUGeometryInputSetVertices (SUGeometryInputRef geom_input, size_t num_vertices, const struct SUPoint3D points[])
 Sets all vertices of a geometry input object. Any existing vertices will be overridden. More...
 
enum SUResult SUGeometryInputAddEdge (SUGeometryInputRef geom_input, size_t vertex0_index, size_t vertex1_index, size_t *added_edge_index)
 Adds an edge to a geometry input object. This method is intended for specifying edges which are not associated with loop inputs. For specifying edge properties on a face use the SULoopInput interface. More...
 
enum SUResult SUGeometryInputEdgeSetHidden (SUGeometryInputRef geom_input, size_t edge_index, bool hidden)
 Sets the hidden flag of an edge in a geometry input object which is not associated with a loop input. More...
 
enum SUResult SUGeometryInputEdgeSetSoft (SUGeometryInputRef geom_input, size_t edge_index, bool soft)
 Sets the soft flag of an edge in a geometry input object which is not associated with a loop input. More...
 
enum SUResult SUGeometryInputEdgeSetSmooth (SUGeometryInputRef geom_input, size_t edge_index, bool smooth)
 Sets the smooth flag of an edge in a geometry input object which is not associated with a loop input. More...
 
enum SUResult SUGeometryInputEdgeSetMaterial (SUGeometryInputRef geom_input, size_t edge_index, SUMaterialRef material)
 Sets the material of an edge in the geometry input. More...
 
enum SUResult SUGeometryInputEdgeSetLayer (SUGeometryInputRef geom_input, size_t edge_index, SULayerRef layer)
 Sets the layer of an edge in the geometry input. More...
 
enum SUResult SUGeometryInputAddCurve (SUGeometryInputRef geom_input, size_t num_edges, const size_t edge_indices[], size_t *added_curve_index)
 Adds a curve to a geometry input object. This method is intended for specifying curves which are not associated with loop inputs. For specifying curves on faces use the SULoopInput interface. More...
 
enum SUResult SUGeometryInputAddArcCurve (SUGeometryInputRef geom_input, size_t start_point, size_t end_point, const struct SUPoint3D *center, const struct SUVector3D *normal, size_t num_segments, size_t *added_curve_index, size_t *control_edge_index)
 Adds an arccurve to a geometry input object. In addition to adding an arccurve to the geometry input this method will append num_segments edges to the geometry's edge collection where control_edge_index is the index of the first new edge. Also, num_segments-1 vertices along the arc will be appended to the geometry's collection of verttices. In order to include an arccurve in a loop the user only needs add the arccurve's points to a loop using SULoopInputAddVertexIndex(). More...
 
enum SUResult SUGeometryInputAddFace (SUGeometryInputRef geom_input, SULoopInputRef *outer_loop, size_t *added_face_index)
 Adds a face to a geometry input object with a given outer loop for the face. More...
 
enum SUResult SUGeometryInputFaceSetReverse (SUGeometryInputRef geom_input, size_t face_index, bool reverse)
 Sets a flag in the geometry input that, when true, will create a face by reversing the orientations of all of its loops. More...
 
enum SUResult SUGeometryInputFaceSetLayer (SUGeometryInputRef geom_input, size_t face_index, SULayerRef layer)
 Sets the layer of a face in the geometry input. More...
 
enum SUResult SUGeometryInputFaceAddInnerLoop (SUGeometryInputRef geom_input, size_t face_index, SULoopInputRef *loop_input)
 Adds an inner loop to a face in the geometry input. More...
 
enum SUResult SUGeometryInputFaceSetFrontMaterial (SUGeometryInputRef geom_input, size_t face_index, const struct SUMaterialInput *material_input)
 Sets the front material of a face in the geometry input. More...
 
enum SUResult SUGeometryInputFaceSetBackMaterial (SUGeometryInputRef geom_input, size_t face_index, const struct SUMaterialInput *material_input)
 Sets the back material of a face in the geometry input. More...
 
enum SUResult SUGeometryInputFaceSetFrontMaterialByPosition (SUGeometryInputRef geom_input, size_t face_index, const struct SUMaterialPositionInput *material_input)
 Sets the front material of a face in the geometry input. More...
 
enum SUResult SUGeometryInputFaceSetBackMaterialByPosition (SUGeometryInputRef geom_input, size_t face_index, const struct SUMaterialPositionInput *material_input)
 Sets the back material of a face in the geometry input. More...
 
enum SUResult SUGeometryInputFaceSetHidden (SUGeometryInputRef geom_input, size_t face_index, bool hidden)
 Sets a flag in the geometry input that, when true, will create a hidden face. More...
 
enum SUResult SUGeometryInputGetCounts (SUGeometryInputRef geom_input, size_t *vertices_count, size_t *faces_count, size_t *edge_count, size_t *curve_count, size_t *arc_count)
 Returns all the various geometry counts. More...
 

Detailed Description

References a geometry input object. It is used as an input to SUEntitiesFill().

Friends And Related Function Documentation

enum SUResult SUGeometryInputAddArcCurve ( SUGeometryInputRef  geom_input,
size_t  start_point,
size_t  end_point,
const struct SUPoint3D center,
const struct SUVector3D normal,
size_t  num_segments,
size_t *  added_curve_index,
size_t *  control_edge_index 
)
related

Adds an arccurve to a geometry input object. In addition to adding an arccurve to the geometry input this method will append num_segments edges to the geometry's edge collection where control_edge_index is the index of the first new edge. Also, num_segments-1 vertices along the arc will be appended to the geometry's collection of verttices. In order to include an arccurve in a loop the user only needs add the arccurve's points to a loop using SULoopInputAddVertexIndex().

Since
SketchUp 2017 M2, API 5.2
Parameters
[in]geom_inputThe geometry input object.
[in]start_pointThe index of the vertex at the start of the arc.
[in]end_pointThe index of the vertex at the end of the arc.
[in]centerThe center point of the arc's circle.
[in]normalThe normal vector of the arc plane.
[in]num_segmentsThe number of edges for the arc.
[out]added_curve_index(optional) If not NULL, returns the index of the added curve.
[out]control_edge_index(optional) If not NULL, returns the index of the the arc's control edge which can be used to set the arc's edge properties.
Returns
enum SUResult SUGeometryInputAddCurve ( SUGeometryInputRef  geom_input,
size_t  num_edges,
const size_t  edge_indices[],
size_t *  added_curve_index 
)
related

Adds a curve to a geometry input object. This method is intended for specifying curves which are not associated with loop inputs. For specifying curves on faces use the SULoopInput interface.

Since
SketchUp 2017, API 5.0
Parameters
[in]geom_inputThe geometry input object.
[in]num_edgesThe number of edges to be used in the curve.
[in]edge_indicesThe edge indices to be used in defining the curve.
[out]added_curve_index(optional) If not NULL, returns the index of the added curve.
Returns
enum SUResult SUGeometryInputAddEdge ( SUGeometryInputRef  geom_input,
size_t  vertex0_index,
size_t  vertex1_index,
size_t *  added_edge_index 
)
related

Adds an edge to a geometry input object. This method is intended for specifying edges which are not associated with loop inputs. For specifying edge properties on a face use the SULoopInput interface.

Since
SketchUp 2017, API 5.0
Parameters
[in]geom_inputThe geometry input object.
[in]vertex0_indexThe vertex index of the edge's first vertex.
[in]vertex1_indexThe vertex index of the edge's last vertex.
[out]added_edge_index(optional) If not NULL, returns the index of the added edge.
Returns
enum SUResult SUGeometryInputAddFace ( SUGeometryInputRef  geom_input,
SULoopInputRef outer_loop,
size_t *  added_face_index 
)
related

Adds a face to a geometry input object with a given outer loop for the face.

Warning
Breaking Change: The behavior of this method was changed in SketchUp 2017 M2, API 5.2. An additional error code was added (SU_ERROR_INVALID_ARGUMENT) to indicate to users when the loop contains invalid data.
Parameters
[in]geom_inputThe geometry input object.
[in]outer_loopThe outer loop to be set for the face. If the function succeeds (i.e. returns SU_ERROR_NONE), this loop will be deallocated.
[out]added_face_index(optional) If not NULL, returns the index of the added face.
Returns
enum SUResult SUGeometryInputAddVertex ( SUGeometryInputRef  geom_input,
const struct SUPoint3D point 
)
related

Adds a vertex to a geometry input object.

Parameters
[in]geom_inputThe geometry input object.
[in]pointThe location of the vertex to be added.
Returns
enum SUResult SUGeometryInputCreate ( SUGeometryInputRef geom_input)
related

Creates a geometry input object.

Parameters
[out]geom_inputThe object created. This object can be passed into SUEntitiesFill() to populate an entities object. It should be released subsequently by calling SUGeometryInputRelease().
Returns
enum SUResult SUGeometryInputEdgeSetHidden ( SUGeometryInputRef  geom_input,
size_t  edge_index,
bool  hidden 
)
related

Sets the hidden flag of an edge in a geometry input object which is not associated with a loop input.

Since
SketchUp 2017, API 5.0
Parameters
[in]geom_inputThe geometry input object.
[in]edge_indexThe zero-based index of the edge which is not associated with a loop input.
[in]hiddenThe flag to set.
Returns
enum SUResult SUGeometryInputEdgeSetLayer ( SUGeometryInputRef  geom_input,
size_t  edge_index,
SULayerRef  layer 
)
related

Sets the layer of an edge in the geometry input.

Since
SketchUp 2017, API 5.0
Parameters
[in]geom_inputThe geometry input object.
[in]edge_indexIndex of the edge to set the layer.
[in]layerThe layer to be set.
Returns
enum SUResult SUGeometryInputEdgeSetMaterial ( SUGeometryInputRef  geom_input,
size_t  edge_index,
SUMaterialRef  material 
)
related

Sets the material of an edge in the geometry input.

Since
SketchUp 2017, API 5.0
Parameters
[in]geom_inputThe geometry input object.
[in]edge_indexIndex of the edge to set the material.
[in]materialThe material to be set.
Returns
enum SUResult SUGeometryInputEdgeSetSmooth ( SUGeometryInputRef  geom_input,
size_t  edge_index,
bool  smooth 
)
related

Sets the smooth flag of an edge in a geometry input object which is not associated with a loop input.

Since
SketchUp 2017, API 5.0
Parameters
[in]geom_inputThe geometry input object.
[in]edge_indexThe zero-based index of the edge which is not associated with a loop input.
[in]smoothThe flag to set.
Returns
enum SUResult SUGeometryInputEdgeSetSoft ( SUGeometryInputRef  geom_input,
size_t  edge_index,
bool  soft 
)
related

Sets the soft flag of an edge in a geometry input object which is not associated with a loop input.

Since
SketchUp 2017, API 5.0
Parameters
[in]geom_inputThe geometry input object.
[in]edge_indexThe zero-based index of the edge which is not associated with a loop input.
[in]softThe flag to set.
Returns
enum SUResult SUGeometryInputFaceAddInnerLoop ( SUGeometryInputRef  geom_input,
size_t  face_index,
SULoopInputRef loop_input 
)
related

Adds an inner loop to a face in the geometry input.

Warning
Breaking Change: The behavior of this method was changed in SketchUp 2017 M2, API 5.2. An additional error code was added (SU_ERROR_INVALID_ARGUMENT) to indicate to users when the loop contains invalid data.
Parameters
[in]geom_inputThe geometry input object.
[in]face_indexIndex of the face to receive the inner loop.
[in]loop_inputThe inner loop to be added. If the function succeeds (i.e. returns SU_ERROR_NONE), this loop will be deallocated.
Returns
enum SUResult SUGeometryInputFaceSetBackMaterial ( SUGeometryInputRef  geom_input,
size_t  face_index,
const struct SUMaterialInput material_input 
)
related

Sets the back material of a face in the geometry input.

Deprecated:
This function is made obsolete by the newer SUGeometryInputFaceSetBackMaterialPosition() and left in place only for compatibility.
See Also
SUGeometryInputFaceSetBackMaterialPosition
Parameters
[in]geom_inputThe geometry input object.
[in]face_indexIndex of the face to receive the material.
[in]material_inputThe material input to set.
Returns
enum SUResult SUGeometryInputFaceSetBackMaterialByPosition ( SUGeometryInputRef  geom_input,
size_t  face_index,
const struct SUMaterialPositionInput material_input 
)
related

Sets the back material of a face in the geometry input.

Parameters
[in]geom_inputThe geometry input object.
[in]face_indexIndex of the face to receive the material.
[in]material_inputThe material input to set.
Since
SketchUp 2021.1, API 9.1
Returns
enum SUResult SUGeometryInputFaceSetFrontMaterial ( SUGeometryInputRef  geom_input,
size_t  face_index,
const struct SUMaterialInput material_input 
)
related

Sets the front material of a face in the geometry input.

Deprecated:
This function is made obsolete by the newer SUGeometryInputFaceSetFrontMaterialPosition() and left in place only for compatibility.
See Also
SUGeometryInputFaceSetFrontMaterialPosition
Parameters
[in]geom_inputThe geometry input object.
[in]face_indexIndex of the face to receive the material.
[in]material_inputThe material input to set.
Returns
enum SUResult SUGeometryInputFaceSetFrontMaterialByPosition ( SUGeometryInputRef  geom_input,
size_t  face_index,
const struct SUMaterialPositionInput material_input 
)
related

Sets the front material of a face in the geometry input.

Parameters
[in]geom_inputThe geometry input object.
[in]face_indexIndex of the face to receive the material.
[in]material_inputThe material input to set.
Since
SketchUp 2021.1, API 9.1
Returns
enum SUResult SUGeometryInputFaceSetHidden ( SUGeometryInputRef  geom_input,
size_t  face_index,
bool  hidden 
)
related

Sets a flag in the geometry input that, when true, will create a hidden face.

Since
SketchUp 2017, API 5.0
Parameters
[in]geom_inputThe geometry input object.
[in]face_indexIndex of the face to be hidden.
[in]hiddenThe given hidden flag.
Returns
enum SUResult SUGeometryInputFaceSetLayer ( SUGeometryInputRef  geom_input,
size_t  face_index,
SULayerRef  layer 
)
related

Sets the layer of a face in the geometry input.

Parameters
[in]geom_inputThe geometry input object.
[in]face_indexIndex of the face to be reversed.
[in]layerThe layer to be set.
Returns
enum SUResult SUGeometryInputFaceSetReverse ( SUGeometryInputRef  geom_input,
size_t  face_index,
bool  reverse 
)
related

Sets a flag in the geometry input that, when true, will create a face by reversing the orientations of all of its loops.

Parameters
[in]geom_inputThe geometry input object.
[in]face_indexIndex of the face to be reversed.
[in]reverseThe given reverse flag.
Returns
enum SUResult SUGeometryInputGetCounts ( SUGeometryInputRef  geom_input,
size_t *  vertices_count,
size_t *  faces_count,
size_t *  edge_count,
size_t *  curve_count,
size_t *  arc_count 
)
related

Returns all the various geometry counts.

Since
SketchUp 2018, API 6.0
Parameters
[in]geom_inputThe geometry input object.
[out]vertices_countThe total count of vertices.
[out]faces_countThe total count of faces.
[out]edge_countThe total count of edges.
[out]curve_countThe total count of curves.
[out]arc_countThe total count of arcs.
Returns
enum SUResult SUGeometryInputRelease ( SUGeometryInputRef geom_input)
related

Deallocates a geometry input object.

Parameters
[in,out]geom_inputThe object to deallocate.
Returns
enum SUResult SUGeometryInputSetVertices ( SUGeometryInputRef  geom_input,
size_t  num_vertices,
const struct SUPoint3D  points[] 
)
related

Sets all vertices of a geometry input object. Any existing vertices will be overridden.

Parameters
[in]geom_inputThe geometry input object.
[in]num_verticesThe number of vertices in the given point array.
[in]pointsThe points array containing the location of vertices.
Returns

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