OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
occtl::Graph Class Reference

RAII handle for a topology graph. Mirrors occtl_graph_t. More...

#include <topo.hpp>

Classes

struct  EdgeSplitResult
 One yield from edge_split: the two sub-edges produced at the split point. More...
 

Public Member Functions

 Graph ()
 Creates an empty graph.
 
 Graph (::occtl_graph_t *const thePtr) noexcept
 Wraps an existing handle (takes ownership).
 
 ~Graph ()
 Releases the underlying graph.
 
 Graph (Graph &&theOther) noexcept
 Move-constructs, leaving theOther empty.
 
Graphoperator= (Graph &&theOther) noexcept
 Move-assigns, releasing any previously-owned graph.
 
 Graph (const Graph &)=delete
 
Graphoperator= (const Graph &)=delete
 
::occtl_graph_tget () const noexcept
 Borrows-it pointer to the underlying C handle, for direct ABI calls.
 
::occtl_node_kind_t node_id_kind (const NodeId theId) const
 Returns the kind of a node ID.
 
::occtl_node_kind_t uid_kind (const UID theUid) const
 Returns the kind embedded in a UID.
 
::occtl_ref_kind_t ref_id_kind (const RefId theId) const
 Returns the kind of a ref ID.
 
::occtl_ref_kind_t ref_uid_kind (const RefUID theUid) const
 Returns the kind embedded in a RefUID.
 
::occtl_rep_kind_t rep_id_kind (const RepId theId) const
 Returns the kind of a rep ID.
 
NodeId node_id_from_uid (const UID theUid) const
 Resolves a persistent UID to its current NodeId.
 
UID uid_from_node_id (const NodeId theId) const
 Returns the persistent UID for a NodeId.
 
std::vector< UIDhistory_modified (const UID theInputUid) const
 Returns graph-owned Modified history images for an input UID.
 
std::vector< UIDhistory_generated (const UID theInputUid) const
 Returns graph-owned Generated history images for an input UID.
 
std::vector< UIDhistory_deleted_all () const
 Returns all graph-owned deleted history input UIDs.
 
RefId ref_id_from_ref_uid (const RefUID theUid) const
 Resolves a persistent RefUID to its current RefId.
 
RefUID ref_uid_from_ref_id (const RefId theId) const
 Returns the persistent RefUID for a RefId.
 
RepId rep_id_from_rep_uid (const RepUID theUid) const
 Resolves a persistent RepUID to its current RepId.
 
RepUID rep_uid_from_rep_id (const RepId theId) const
 Returns the persistent RepUID for a RepId.
 
std::vector< std::pair< RefUID, RefId > > ref_uid_table () const
 Returns active RefUID to RefId pairs for all references in the graph.
 
size_t solid_count () const
 Active solid count.
 
size_t shell_count () const
 Active shell count.
 
size_t face_count () const
 Active face count.
 
size_t wire_count () const
 Active wire count.
 
size_t edge_count () const
 Active edge count.
 
size_t vertex_count () const
 Active vertex count.
 
size_t compound_count () const
 Active compound count.
 
size_t compsolid_count () const
 Active compsolid count.
 
size_t coedge_count () const
 Active coedge count.
 
size_t product_count () const
 Active product count.
 
size_t occurrence_count () const
 Active occurrence count.
 
size_t node_count () const
 Total active node count across all kinds.
 
std::vector<::occtl_topo_check_issue_tcheck_issues () const
 Runs graph validation and returns all reported issues.
 
bool is_valid () const
 Returns true when graph validation reports no issues.
 
Point3 vertex_point (const NodeId theVertex) const
 Returns the 3D point of a vertex.
 
double vertex_tolerance (const NodeId theVertex) const
 Returns the tolerance of a vertex.
 
std::pair< double, double > edge_range (const NodeId theEdge) const
 Returns the parametric range of an edge's 3D curve.
 
double edge_tolerance (const NodeId theEdge) const
 Returns the tolerance of an edge.
 
bool edge_is_degenerated (const NodeId theEdge) const
 Returns whether an edge is degenerated.
 
bool edge_has_curve (const NodeId theEdge) const
 Returns whether an edge has a 3D curve.
 
CurveKind edge_curve_kind (const NodeId theEdge) const
 Returns the 3D curve kind carried by an edge.
 
NodeId edge_start_vertex (const NodeId theEdge) const
 Returns the start vertex of an edge.
 
NodeId edge_end_vertex (const NodeId theEdge) const
 Returns the end vertex of an edge.
 
bool coedge_is_seam (const NodeId theCoedge) const
 Returns whether a coedge is a seam (closed-surface) edge.
 
NodeId coedge_edge_of (const NodeId theCoedge) const
 Returns the parent edge of a coedge.
 
NodeId coedge_face_of (const NodeId theCoedge) const
 Returns the parent face of a coedge.
 
double face_tolerance (const NodeId theFace) const
 Returns the tolerance of a face.
 
NodeId face_outer_wire (const NodeId theFace) const
 Returns the outer wire of a face.
 
void face_uv_bounds (const NodeId theFace, double &theUMin, double &theUMax, double &theVMin, double &theVMax) const
 Returns the UV parameter bounds of a face.
 
bool face_has_surface (const NodeId theFace) const
 Returns whether a face has a surface.
 
SurfaceKind face_surface_kind (const NodeId theFace) const
 Returns the surface kind carried by a face.
 
bool wire_is_closed (const NodeId theWire) const
 Returns whether a wire is topologically closed.
 
bool shell_is_closed (const NodeId theShell) const
 Returns whether a shell is topologically closed (watertight).
 
double vertex_parameter (const NodeId theVertex, const NodeId theEdge) const
 Returns the parameter of a vertex on an edge.
 
Point2 vertex_parameters (const NodeId theVertex, const NodeId theFace) const
 Returns the UV parameters of a vertex on a face.
 
bool edge_same_parameter (const NodeId theEdge) const
 Returns whether an edge has the same parameterisation on every face it bounds.
 
bool edge_same_range (const NodeId theEdge) const
 Returns whether an edge has the same range in 3D and on its pcurves.
 
bool edge_is_manifold (const NodeId theEdge) const
 Returns whether an edge is manifold.
 
bool edge_is_boundary (const NodeId theEdge) const
 Returns whether an edge is a boundary edge.
 
bool edge_is_seam_on_face (const NodeId theEdge, const NodeId theFace) const
 Returns whether an edge is a seam edge on a given face.
 
bool coedge_is_reversed (const NodeId theCoedge) const
 Returns whether a coedge is reversed.
 
bool coedge_has_pcurve (const NodeId theCoedge) const
 Returns whether a coedge has a pcurve.
 
double coedge_pcurve_parameter (const NodeId theCoedge, const NodeId theVertex) const
 Returns the parameter of a vertex on the pcurve carried by a coedge.
 
std::pair< double, double > coedge_range (const NodeId theCoedge) const
 Returns the parametric range of a coedge.
 
void coedge_uv_points (const NodeId theCoedge, ::occtl_point2_t &theUVStart, ::occtl_point2_t &theUVEnd) const
 Returns the UV points at the start and end of a coedge.
 
NodeId coedge_seam_pair (const NodeId theCoedge) const
 Returns the paired coedge for a seam edge, or an invalid NodeId for non-seam coedges.
 
bool face_natural_restriction (const NodeId theFace) const
 Returns whether a face has natural restriction.
 
bool face_has_triangulation (const NodeId theFace) const
 Returns whether a face has a triangulation.
 
NodeId wire_face_of (const NodeId theWire) const
 Returns the face a wire belongs to.
 
bool wire_is_outer (const NodeId theWire) const
 Returns whether a wire is the outer wire of its parent face.
 
Point2 coedge_pcurve_eval (const NodeId theCoedge, const double theU) const
 Evaluates the PCurve UV point on a coedge at parameter theU.
 
std::pair< Point2, Vector2coedge_pcurve_eval_d1 (const NodeId theCoedge, const double theU) const
 Evaluates the PCurve UV point and first derivative on a coedge at parameter theU.
 
std::tuple< Point2, Vector2, Vector2coedge_pcurve_eval_d2 (const NodeId theCoedge, const double theU) const
 Evaluates the PCurve UV point and first two derivatives on a coedge at parameter theU.
 
std::tuple< Point2, Vector2, Vector2, Vector2coedge_pcurve_eval_d3 (const NodeId theCoedge, const double theU) const
 Evaluates the PCurve UV point and first three derivatives on a coedge at parameter theU.
 
Vector2 coedge_pcurve_eval_dn (const NodeId theCoedge, const double theU, const uint32_t theN) const
 Evaluates the Nth derivative on a coedge pcurve at parameter theU.
 
Point3 edge_eval (const NodeId theEdge, const double theU) const
 Evaluates the 3D point on an edge at parameter theU.
 
std::pair< Point3, Vector3edge_eval_d1 (const NodeId theEdge, const double theU) const
 Evaluates the 3D point and first derivative on an edge at parameter theU.
 
std::tuple< Point3, Vector3, Vector3edge_eval_d2 (const NodeId theEdge, const double theU) const
 Evaluates the first two derivatives on an edge at parameter theU.
 
std::tuple< Point3, Vector3, Vector3, Vector3edge_eval_d3 (const NodeId theEdge, const double theU) const
 Evaluates the first three derivatives on an edge at parameter theU.
 
Vector3 edge_eval_dn (const NodeId theEdge, const double theU, const uint32_t theN) const
 Evaluates the Nth derivative on an edge at parameter theU.
 
Point3 face_eval (const NodeId theFace, const double theU, const double theV) const
 Evaluates the 3D point on a face at UV parameters (theU, theV).
 
std::tuple< Point3, Vector3, Vector3face_eval_d1 (const NodeId theFace, const double theU, const double theV) const
 Evaluates the 3D point, D1U, and D1V on a face at UV parameters (theU, theV).
 
std::tuple< Point3, Vector3, Vector3, Vector3, Vector3, Vector3face_eval_d2 (const NodeId theFace, const double theU, const double theV) const
 Evaluates the 3D point and first two partial derivatives on a face.
 
std::tuple< Point3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3face_eval_d3 (const NodeId theFace, const double theU, const double theV) const
 Evaluates the 3D point and first three partial derivatives on a face.
 
Vector3 face_eval_dn (const NodeId theFace, const double theU, const double theV, const uint32_t theNu, const uint32_t theNv) const
 Evaluates the (theNu, theNv) cross derivative on a face at UV parameters (theU, theV).
 
uint32_t face_wire_count (const NodeId theFace) const
 Returns the number of wires on a face.
 
uint32_t wire_coedge_count (const NodeId theWire) const
 Returns the number of coedges in a wire.
 
uint32_t edge_face_count (const NodeId theEdge) const
 Returns the number of faces referencing an edge.
 
uint32_t wire_distinct_edge_count (const NodeId theWire) const
 Returns the number of distinct edges in a wire.
 
uint32_t vertex_edge_count (const NodeId theVertex) const
 Returns the number of edges that reference a vertex.
 
uint32_t solid_shell_count (const NodeId theSolid) const
 Returns the number of shells in a solid.
 
uint32_t shell_face_count (const NodeId theShell) const
 Returns the number of faces in a shell.
 
uint32_t wire_edge_count (const NodeId theWire) const
 Returns the number of edges in a wire.
 
uint32_t edge_vertex_count (const NodeId theEdge) const
 Returns the number of vertices on an edge.
 
uint32_t product_occurrence_count (const NodeId theProduct) const
 Returns the number of occurrences of a product.
 
uint32_t compound_child_count (const NodeId theCompound) const
 Returns the number of children in a compound.
 
uint32_t compsolid_solid_count (const NodeId theCompSolid) const
 Returns the number of solids in a compsolid.
 
NodeIter wire_explorer (const NodeId theWire) const
 Creates a wire explorer that visits coedges in geometric traversal order.
 
std::vector< OrientedNodewire_order_edges (const NodeId theWire) const
 Returns wire edges in endpoint-chaining order with coedge orientation.
 
ExplorerIter child_explorer (const NodeId theRoot, const ::occtl_topo_child_explorer_config_t *const theConfig=nullptr) const
 Creates a child explorer for accumulated-location/orientation downward traversal.
 
ExplorerIter parent_explorer (const NodeId theNode, const ::occtl_topo_parent_explorer_config_t *const theConfig=nullptr) const
 Creates a parent explorer for accumulated-location/orientation upward traversal.
 
RelatedIter related (const NodeId theNode) const
 Creates a related-iterator over the semantic neighbours of theNode.
 
DistancePair distance_pair (const NodeId theNodeA, const NodeId theNodeB) const
 Computes the closest-distance pair between two graph nodes.
 
TouchIter touches (const NodeId theNodeA, const NodeId theNodeB, const RelationOptions *const theOptions=nullptr) const
 Returns contact solutions between two graph nodes.
 
IntersectionIter intersections (const NodeId theNodeA, const NodeId theNodeB, const RelationOptions *const theOptions=nullptr)
 Inserts and returns generated intersection nodes for two graph nodes.
 
AxisHitIter faces_intersected_by_axis (const NodeId theRoot, const Axis1Placement &theAxis, const double theMinParameter, const double theMaxParameter, const double theTolerance) const
 Returns ordered face intersections with an axis under a graph root.
 
bool is_same_geometry (const NodeId theNodeA, const NodeId theNodeB, const double theTolerance) const
 Tests whether two edge or face nodes share geometric support.
 
std::vector< NodeIdcommon_vertices (const NodeId theNodeA, const NodeId theNodeB) const
 Returns vertex nodes common to two graph roots.
 
std::vector< NodeIdadjacent_edges (const NodeId theEdge) const
 Returns edges adjacent to theEdge through shared vertices.
 
std::vector< NodeIdadjacent_faces (const NodeId theFace) const
 Returns faces adjacent to theFace through shared edges.
 
std::vector< NodeIdconnected_edges (const NodeId theSeedEdge) const
 Returns all edges connected to theSeedEdge through shared vertices.
 
std::vector< NodeIdconnected_faces (const NodeId theSeedFace) const
 Returns all faces connected to theSeedFace through shared edges.
 
int32_t graph_distance (const NodeId theRoot, const std::vector< NodeId > &theSources, const NodeId theTarget) const
 Returns same-kind topological hop distance under theRoot, or -1 if disconnected.
 
int32_t graph_distance (const NodeId theRoot, const NodeId theSource, const NodeId theTarget) const
 Returns same-kind topological hop distance from one source under theRoot.
 
PointClass classify_point (const NodeId theSolid, const Point3 &thePoint, const double theTolerance) const
 Classifies a point relative to a solid node.
 
bool is_inside (const NodeId theSolid, const Point3 &thePoint, const double theTolerance, const bool theIncludeBoundary=true) const
 Returns whether a point is inside a solid node.
 
NodeIter solids () const
 Range-for adapter over all active solids.
 
NodeIter shells () const
 Range-for adapter over all active shells.
 
NodeIter faces () const
 Range-for adapter over all active faces.
 
NodeIter wires () const
 Range-for adapter over all active wires.
 
NodeIter edges () const
 Range-for adapter over all active edges.
 
NodeIter vertices () const
 Range-for adapter over all active vertices.
 
NodeIter compounds () const
 Range-for adapter over all active compounds.
 
NodeIter compsolids () const
 Range-for adapter over all active compsolids.
 
NodeIter coedges () const
 Range-for adapter over all active coedges.
 
NodeIter products () const
 Range-for adapter over all active products.
 
NodeIter occurrences () const
 Range-for adapter over all active occurrences.
 
NodeIter root_products () const
 Range-for adapter over all root products.
 
SelectIter select (const SelectOptions &theOptions)
 Selects graph nodes matching theOptions.
 
SelectIter select_tagged (const SelectOptions &theOptions, const char *const theTag, const size_t theTagLen)
 Selects graph nodes matching theOptions and carrying theTag.
 
SelectGroupIter select_groups (const SelectOptions &theSelectOptions, const SelectGroupOptions &theGroupOptions)
 Groups selected graph nodes matching theSelectOptions by theGroupOptions.
 
NodeIter shells_of_solid (const NodeId theSolid) const
 Range-for adapter over the shells of a solid.
 
NodeIter faces_of_shell (const NodeId theShell) const
 Range-for adapter over the faces of a shell.
 
NodeIter wires_of_face (const NodeId theFace) const
 Range-for adapter over the wires of a face.
 
NodeIter coedges_of_wire (const NodeId theWire) const
 Range-for adapter over the coedges of a wire.
 
NodeIter edges_of_wire (const NodeId theWire) const
 Range-for adapter over the edges of a wire.
 
NodeIter vertices_of_edge (const NodeId theEdge) const
 Range-for adapter over the vertices of an edge.
 
NodeIter occurrences_of_product (const NodeId theProduct) const
 Range-for adapter over the occurrences of a product.
 
NodeId make_vertex (const ::occtl_topo_make_vertex_info_t &theInfo)
 Creates a vertex node from a point and tolerance.
 
NodeId make_edge (const ::occtl_topo_make_edge_info_t &theInfo)
 Creates an edge node.
 
NodeId make_wire (const ::occtl_topo_make_wire_info_t &theInfo)
 Creates a wire node from an ordered span of oriented edges.
 
std::vector< NodeIdedges_to_wires (const EdgesToWiresOptions &theOptions)
 Connects unordered edges into wire nodes.
 
NodeId wire_offset_2d (const WireOffset2dOptions &theOptions)
 Creates a planar offset wire in this graph.
 
size_t wire_fix_degenerate_edges (const WireFixDegenerateEdgesOptions &theOptions)
 Removes degenerate edge usages from a wire in place.
 
NodeId face_chamfer_2d (const FaceChamfer2dOptions &theOptions)
 Chamfers corners of a planar face and inserts the result into this graph.
 
NodeId wire_chamfer_2d (const WireChamfer2dOptions &theOptions)
 Chamfers corners of a planar wire and inserts the result into this graph.
 
NodeId make_face (const ::occtl_topo_make_face_info_t &theInfo)
 Creates a face node from a surface, outer wire, and optional inner wires.
 
NodeId make_face_from_wires_auto (const MakeFaceFromWiresAutoOptions &theOptions)
 Creates a face from candidate wires using automatic outer-loop detection.
 
NodeId make_shell (const ::occtl_topo_make_shell_info_t &theInfo)
 Creates a shell node from a span of oriented faces.
 
NodeId make_solid (const ::occtl_topo_make_solid_info_t &theInfo)
 Creates a solid node from a span of oriented shells.
 
void solid_view (const NodeId theSolid, ::occtl_solid_view_t &theView) const
 Fills theView with the current scalar state of theSolid.
 
void compound_view (const NodeId theCompound, ::occtl_compound_view_t &theView) const
 Fills theView with the current scalar state of theCompound.
 
void wire_view (const NodeId theWire, ::occtl_wire_view_t &theView) const
 Fills theView with the current scalar state of theWire.
 
void shell_view (const NodeId theShell, ::occtl_shell_view_t &theView) const
 Fills theView with the current scalar state of theShell.
 
void vertex_view (const NodeId theVertex, ::occtl_vertex_view_t &theView) const
 Fills theView with the current scalar state of theVertex.
 
NodeId make_compsolid (const ::occtl_topo_make_compsolid_info_t &theInfo)
 Creates a compsolid node from a span of oriented solids.
 
NodeId make_compound (const ::occtl_topo_make_compound_info_t &theInfo)
 Creates a compound node from a span of oriented children.
 
void remove (const NodeId theId)
 Removes a node from the graph.
 
void remove_subgraph (const NodeId theId)
 Recursively removes a node and its entire subgraph.
 
Batch begin_batch ()
 Opens a batched mutation scope on this graph.
 
void set_vertex_point (const NodeId theVertex, const ::occtl_point3_t &thePoint)
 Sets the 3D point of a vertex.
 
void set_vertex_tolerance (const NodeId theVertex, const double theTol)
 Sets the tolerance of a vertex.
 
void set_edge_tolerance (const NodeId theEdge, const double theTol)
 Sets the tolerance of an edge.
 
void set_face_tolerance (const NodeId theFace, const double theTol)
 Sets the tolerance of a face.
 
void set_edge_param_range (const NodeId theEdge, const double theFirst, const double theLast)
 Sets the parametric range of an edge's 3D curve.
 
void set_edge_same_parameter (const NodeId theEdge, const bool theFlag)
 Sets the same-parameter flag on an edge.
 
void set_edge_same_range (const NodeId theEdge, const bool theFlag)
 Sets the same-range flag on an edge.
 
void set_edge_is_degenerate (const NodeId theEdge, const bool theFlag)
 Sets the is-degenerate flag on an edge.
 
void set_edge_is_closed (const NodeId theEdge, const bool theFlag)
 Sets the is-closed flag on an edge.
 
void set_wire_is_closed (const NodeId theWire, const bool theFlag)
 Sets the is-closed flag on a wire.
 
void set_shell_is_closed (const NodeId theShell, const bool theFlag)
 Sets the is-closed flag on a shell.
 
void set_face_natural_restriction (const NodeId theFace, const bool theFlag)
 Sets the natural-restriction flag on a face.
 
void set_coedge_param_range (const NodeId theCoedge, const double theFirst, const double theLast)
 Sets the parametric range of a coedge.
 
void set_coedge_uv_box (const NodeId theCoedge, const ::occtl_point2_t &theUvLo, const ::occtl_point2_t &theUvHi)
 Sets the UV box of a coedge.
 
Graph clone () const
 Deep-clones this graph into a new, independent graph.
 
void compact ()
 Compacts the graph, reclaiming slots from removed nodes. Invalidates all NodeId and RefId values.
 
void remove_with_replacement (const NodeId theNode, const NodeId theReplacement)
 Removes a node and reparents children to a replacement.
 
void remove_ref (const RefId &theRefId)
 Removes a reference entry by its RefId.
 
void remove_rep (const RepId &theRepId)
 Removes a representation entry by its RepId.
 
void cleanup_removed_refs ()
 Cleans up stale references after removal operations. Idempotent.
 
void set_edge_start_vertex (const NodeId theEdge, const NodeId theVertex)
 Rebinds an edge's start vertex to a different vertex.
 
void set_edge_end_vertex (const NodeId theEdge, const NodeId theVertex)
 Rebinds an edge's end vertex to a different vertex.
 
void set_ref_orientation (const RefId &theRefId, const Orientation theOrientation)
 Sets the orientation of a reference entry.
 
void set_ref_location (const RefId &theRefId, const ::occtl_transform_t &theTransform)
 Sets the local location of a reference entry.
 
void set_wire_ref_is_outer (const RefId &theRefId, const bool theFlag)
 Sets the IsOuter flag on a wire reference.
 
void color_set (const NodeId theTarget, const ::occtl_color_rgba_t &theColor)
 Sets a colour on a target node.
 
::occtl_color_rgba_t color_get (const NodeId theTarget) const
 Retrieves the colour of a target node, or opaque white if unset.
 
void color_unset (const NodeId theTarget)
 Removes the colour associated with a target node. Idempotent.
 
std::vector< std::pair< NodeId, ::occtl_color_rgba_t > > color_entries () const
 Lists explicit colour entries.
 
void name_set (const NodeId theTarget, const char *const theName, const size_t theNameLen)
 Sets a human-readable name on a target node.
 
std::string name_get (const NodeId theTarget) const
 Retrieves the name of a target node. Returns empty string if unset.
 
std::vector< NodeIdname_nodes () const
 Lists nodes that have explicit names.
 
void material_set (const NodeId theTarget, const MaterialInfo &theInfo)
 Sets material-lite data on a target node.
 
GraphMaterial material_get (const NodeId theTarget) const
 Retrieves material-lite data from a target node.
 
void material_unset (const NodeId theTarget)
 Removes material-lite data from a target node. Idempotent.
 
std::vector< NodeIdmaterial_nodes () const
 Lists nodes that have explicit material-lite data.
 
void graph_units_set (const double theLengthUnitToMeter, const char *const theName, const size_t theNameLen)
 Sets graph-level length-unit metadata.
 
GraphUnits graph_units_get () const
 Retrieves graph-level length-unit metadata.
 
void node_metadata_set (const NodeId theTarget, const char *const theKey, const size_t theKeyLen, const char *const theValue, const size_t theValueLen)
 Sets UTF-8 metadata on a target node.
 
std::string node_metadata_get (const NodeId theTarget, const char *const theKey, const size_t theKeyLen) const
 Retrieves UTF-8 metadata from a target node.
 
std::vector< std::string > node_metadata_keys (const NodeId theTarget) const
 Lists UTF-8 metadata keys stored on a target node.
 
std::vector< NodeIdnode_metadata_nodes () const
 Lists nodes that have at least one metadata key.
 
void graph_metadata_set (const char *const theKey, const size_t theKeyLen, const char *const theValue, const size_t theValueLen)
 Sets UTF-8 metadata on the graph itself.
 
std::string graph_metadata_get (const char *const theKey, const size_t theKeyLen) const
 Retrieves UTF-8 metadata from the graph itself.
 
std::vector< std::string > graph_metadata_keys () const
 Lists UTF-8 metadata keys stored on the graph itself.
 
void graph_metadata_unset (const char *const theKey, const size_t theKeyLen)
 Removes one graph-level metadata key. Idempotent.
 
void node_metadata_unset (const NodeId theTarget, const char *const theKey, const size_t theKeyLen)
 Removes one metadata key from a target node. Idempotent.
 
void tag_add (const NodeId theTarget, const char *const theTag, const size_t theTagLen)
 Adds a UTF-8 tag to a target node.
 
void tag_remove (const NodeId theTarget, const char *const theTag, const size_t theTagLen)
 Removes a UTF-8 tag from a target node. Idempotent.
 
bool tag_has (const NodeId theTarget, const char *const theTag, const size_t theTagLen) const
 Tests whether a target node carries a UTF-8 tag.
 
std::vector< std::string > tag_list (const NodeId theTarget) const
 Lists UTF-8 tags stored on a target node.
 
std::vector< NodeIdtag_nodes (const char *const theTag=nullptr, const size_t theTagLen=0) const
 Lists nodes that have tags, optionally filtered by exact tag.
 
JointId joint_create (const JointInfo &theInfo)
 Creates an assembly joint record in the graph.
 
JointInfo joint_get (const JointId theJoint) const
 Retrieves an assembly joint record.
 
void joint_remove (const JointId theJoint)
 Removes an assembly joint record. Missing joints are a no-op.
 
std::vector< JointIdjoint_list (const NodeId theNode=NodeId::invalid()) const
 Lists all assembly joints or those attached to theNode.
 
void clear_cached (const NodeId theNode)
 Clears graph-owned computed data related to one node.
 
void clear_cached (const RefId theRef)
 Clears graph-owned computed data related to one reference.
 
::occtl_select_bbox_t bbox_get (const NodeId theNode)
 Returns the computed axis-aligned bounding box for a node.
 
::occtl_graph_obb_t obb_get (const NodeId theNode)
 Returns the computed oriented bounding box for a node.
 
::occtl_graph_uv_bounds_t face_uv_bounds_get (const NodeId theFace)
 Returns computed UV parameter bounds for a Face node.
 
double measure_get (const NodeId theNode, const SelectMeasureKind theKind)
 Returns one computed OCCT mass-property scalar.
 
::occtl_graph_mass_properties_t mass_properties_get (const NodeId theNode)
 Returns computed combined OCCT mass properties for a node.
 
CurveKind edge_curve_kind_get (const NodeId theEdge)
 Returns computed curve-kind classification for an Edge node.
 
SurfaceKind face_surface_kind_get (const NodeId theFace)
 Returns computed surface-kind classification for a Face node.
 
std::vector< NodeIddescendant_vertices_get (const NodeId theNode)
 Returns computed descendant Vertex nodes for a root node.
 
std::vector< NodeIddescendant_edges_get (const NodeId theNode)
 Returns computed descendant Edge nodes for a root node.
 
std::vector< NodeIddescendant_faces_get (const NodeId theNode)
 Returns computed descendant Face nodes for a root node.
 
std::vector< NodeIddescendants_get (const NodeId theNode, const NodeKind theKind)
 Returns computed descendant nodes of one requested kind.
 
std::vector< NodeIdadjacent_faces_get (const NodeId theFace)
 Returns computed adjacent Face nodes for a Face node.
 
std::vector< NodeIdadjacent_edges_get (const NodeId theEdge)
 Returns computed adjacent Edge nodes for an Edge node.
 
double pair_distance_get (const NodeId theFirst, const NodeId theSecond)
 Returns computed OCCT minimum distance between two nodes.
 
NodeId make_product (const ::occtl_topo_make_product_info_t &theInfo)
 Creates a product in the graph.
 
void link_product_to_topology (const NodeId theProduct, const NodeId theRoot, const ::occtl_transform_t &thePlacement)
 Links an existing product to a topology root with a placement.
 
NodeId link_product_to_topology_with_occurrence (const NodeId theProduct, const NodeId theRoot, const ::occtl_transform_t &thePlacement)
 Links an existing product to a topology root and returns the new occurrence.
 
void link_products (const NodeId theParentProduct, const NodeId theChildProduct, const ::occtl_transform_t &thePlacement, const NodeId theParentOccurrence=NodeId(OCCTL_NODE_ID_INVALID))
 Links two products via a parent-child occurrence.
 
NodeId link_products_with_occurrence (const NodeId theParentProduct, const NodeId theChildProduct, const ::occtl_transform_t &thePlacement, const NodeId theParentOccurrence=NodeId(OCCTL_NODE_ID_INVALID))
 Links two products and returns the new occurrence.
 
void remove_occurrence (const RefId &theOccurrenceRef)
 Removes an occurrence reference from the graph.
 
void occurrence_transform_set (const NodeId theOccurrence, const ::occtl_transform_t &theTransform)
 Sets the local transform of a uniquely referenced occurrence node.
 
::occtl_transform_t occurrence_transform_get (const NodeId theOccurrence) const
 Returns the local transform of a uniquely referenced occurrence node.
 
::occtl_transform_t occurrence_world_transform (const NodeId theRoot, const NodeId theOccurrence) const
 Returns an occurrence transform accumulated from a traversal root.
 
void shell_add_face (const NodeId theShell, const NodeId theFace, const ::occtl_orientation_t theOrientation)
 Adds a face to a shell with the given orientation.
 
void shell_remove_face (const NodeId theShell, const NodeId theFace)
 Removes a face from a shell (the face definition remains in the graph).
 
void face_add_holes (const NodeId theFace, const std::vector< NodeId > &theHoles)
 Adds selected wires as inner wires of a face.
 
void face_remove_holes (const NodeId theFace)
 Removes all inner wires from a face.
 
void face_remove_holes (const NodeId theFace, const std::vector< NodeId > &theHoles)
 Removes selected inner wires from a face.
 
void solid_add_shell (const NodeId theSolid, const NodeId theShell, const ::occtl_orientation_t theOrientation)
 Adds a shell to a solid with the given orientation.
 
void solid_remove_shell (const NodeId theSolid, const NodeId theShell)
 Removes a shell from a solid (the shell definition remains in the graph).
 
void compound_add_child (const NodeId theCompound, const NodeId theChild, const ::occtl_orientation_t theOrientation)
 Adds a child entity to a compound with the given orientation.
 
void compound_remove_child (const NodeId theCompound, const NodeId theChild)
 Removes a child from a compound (the child definition remains in the graph).
 
EdgeSplitResult edge_split (const NodeId theEdge, const double theParameter)
 Splits an edge at the given parameter and returns the two new sub-edges. The original edge is soft-removed; wires referencing it are updated.
 
void edge_add_internal_vertex (const NodeId theEdge, const NodeId theVertex)
 Adds an internal vertex to an edge.
 
void edge_remove_vertex (const NodeId theEdge, const NodeId theVertex)
 Removes a vertex (boundary or internal) from an edge.
 
void replace_edge_curve (const NodeId theEdge, const ::occtl_rep_id_t theCurveId)
 Replaces an edge's 3D curve.
 
void replace_face_surface (const NodeId theFace, const ::occtl_rep_id_t theSurfaceId)
 Replaces a face's surface.
 
void replace_coedge_pcurve (const NodeId theCoedge, const ::occtl_rep_id_t thePcurveId)
 Replaces a coedge's pcurve.
 
void add_pcurve (const NodeId theEdge, const NodeId theFace, const ::occtl_rep_id_t thePcurveId, const double theFirst, const double theLast, const ::occtl_orientation_t theOrientation)
 Adds a pcurve binding between an edge and a face, creating a new coedge.
 
::occtl_shape_continuity_t edge_continuity (const NodeId theEdge, const NodeId theFaceA, const NodeId theFaceB) const
 Returns the geometric continuity between two faces at their shared edge.
 
bool edge_has_continuity (const NodeId theEdge, const NodeId theFaceA, const NodeId theFaceB) const
 Returns true if continuity is recorded between two faces at the edge.
 
::occtl_shape_continuity_t edge_max_continuity (const NodeId theEdge) const
 Returns the maximum continuity across all face pairs at the edge.
 
::occtl_orientation_t coedge_orientation (const NodeId theCoedge) const
 Returns the full TopAbs orientation of a coedge.
 
NodeId edge_find_coedge_on_face (const NodeId theEdge, const NodeId theFace) const
 Finds the coedge for an (edge, face) pair.
 
NodeId edge_find_coedge_on_face_oriented (const NodeId theEdge, const NodeId theFace, const ::occtl_orientation_t theOrientation) const
 Finds the coedge for an (edge, face, orientation) triple. Disambiguates seam edges.
 
::occtl_point3_t vertex_point_in_usage (const NodeId theVertex, const NodeId theParent) const
 Returns the vertex point with a parent's accumulated Location applied.
 
double vertex_pcurve_parameter (const NodeId theVertex, const NodeId theCoedge) const
 Returns the 2D parameter of a vertex on a coedge's pcurve.
 
bool edge_has_polygon3d (const NodeId theEdge) const
 Returns true if the edge has a 3D polygon discretization.
 
bool coedge_has_polygon_on_surface (const NodeId theCoedge) const
 Returns true if the coedge has a polygon-on-surface discretization.
 
void face_uv_bounds_restricted (const NodeId theFace, const double theUMin, const double theUMax, const double theVMin, const double theVMax, const double theU, const double theV, ::occtl_point3_t &theOutPoint, ::occtl_vector3_t &theOutD1U, ::occtl_vector3_t &theOutD1V) const
 Evaluates a face surface with its first partials inside a restricted UV box.
 
std::pair< Graph, NodeIdfillet (const ::occtl_topo_fillet_options_t &theOpts)
 Applies a 3D fillet or chamfer to all solids and shells in this graph.
 
std::pair< Graph, NodeIdblend_edges (const NodeId theRoot, const std::vector< NodeId > &theEdges, const ::occtl_topo_edge_blend_options_t &theOpts) const
 Applies a selected-edge 3D fillet or chamfer to theRoot.
 
std::pair< Graph, NodeIdfillet_edges (const NodeId theRoot, const std::vector< NodeId > &theEdges, const double theRadius) const
 Applies a selected-edge constant-radius 3D fillet to theRoot.
 
std::pair< Graph, NodeIdchamfer_edges (const NodeId theRoot, const std::vector< NodeId > &theEdges, const double theDist1, const double theDist2) const
 Applies a selected-edge 3D chamfer to theRoot.
 
double max_fillet_radius (const NodeId theRoot, const std::vector< NodeId > &theEdges, const ::occtl_topo_max_fillet_radius_options_t &theOpts) const
 Estimates the largest selected-edge constant fillet radius accepted by OCCT.
 
std::pair< Graph, NodeIdtransformed (const NodeId theRoot, const Transform &theTransform) const
 Creates a transformed copy of the shape rooted at theRoot.
 
std::pair< Graph, NodeIdproject_on_face (const ::occtl_topo_project_on_face_options_t &theOpts) const
 Projects an edge or wire onto a target face along face normals.
 
std::pair< Graph, NodeIdwrap_on_face (const ::occtl_topo_wrap_on_face_options_t &theOpts) const
 Wraps a planar edge, wire, or face onto a target face.
 
std::pair< Graph, NodeIdproject_face_along_direction (const ::occtl_topo_project_face_direction_options_t &theOpts) const
 Projects a face onto target boundary faces along a fixed direction.
 
std::pair< Graph, NodeIdface_to_arcs (const ::occtl_topo_face_to_arcs_options_t &theOpts) const
 Converts planar face or wire boundaries to line and circular-arc edges.
 
std::pair< Graph, HlrCategoryRootshlr_project (const ::occtl_topo_hlr_options_t &theOpts) const
 Projects a shape with OCCT hidden-line removal.
 
std::pair< Graph, NodeIddraft_faces (const ::occtl_topo_draft_faces_options_t &theOpts) const
 Applies a draft angle to selected faces of a shape.
 
std::pair< Graph, NodeIdremove_features (const NodeId theRoot, const std::vector< NodeId > &theSelections, const bool theParallel=false) const
 Removes selected features from theRoot.
 
std::pair< Graph, NodeIdremove_features (const ::occtl_topo_defeature_options_t &theOpts) const
 Removes selected features using a fully specified C options struct.
 
std::pair< Graph, NodeIdoffset_features (const NodeId theRoot, const std::vector< NodeId > &theSelections, const double theSelectionOffset, const double theBaseOffset=0.0) const
 Offsets selected features of theRoot.
 
std::pair< Graph, NodeIdoffset_features (const ::occtl_topo_offset_features_options_t &theOpts) const
 Offsets selected features using a fully specified C options struct.
 
std::pair< Graph, NodeIdmake_filling (const ::occtl_topo_filling_options_t &theOpts) const
 Builds an N-side filling face from ordered boundary edges.
 
std::pair< Graph, NodeIdmake_filling_patch (const ::occtl_topo_filling_patch_options_t &theOpts) const
 Builds a filling patch from edge, support-face, and point constraints.
 
std::pair< Graph, NodeIdtranslated (const NodeId theRoot, const Vector3 &theDelta) const
 Creates a translated copy of the shape rooted at theRoot.
 
std::pair< Graph, NodeIdrotated (const NodeId theRoot, const Axis1Placement &theAxis, const double theAngle) const
 Creates a rotated copy of the shape rooted at theRoot.
 
std::pair< Graph, NodeIdscaled (const NodeId theRoot, const Point3 &theCenter, const double theFactor) const
 Creates a uniformly scaled copy of the shape rooted at theRoot.
 
std::pair< Graph, NodeIdmirror (const NodeId theRoot, const ::occtl_point3_t &thePoint, const ::occtl_direction3_t &theNormal) const
 Creates a mirrored copy of the shape rooted at theRoot.
 
std::pair< Graph, NodeIdsplit_by_plane (const ::occtl_topo_split_by_plane_options_t &theOpts) const
 Splits a shape by a plane and returns selected side(s).
 
std::pair< Graph, NodeIdsection_by_planes (const ::occtl_topo_section_by_planes_options_t &theOpts) const
 Sections a shape by one or more planes.
 
std::pair< Graph, NodeIdextrude_faces_to_solids (const ::occtl_topo_extrude_faces_options_t &theOpts) const
 Thickens one or more Face nodes into prism solids.
 
std::pair< Graph, NodeIdlinear_pattern (const NodeId theRoot, const ::occtl_topo_linear_pattern_options_t &theOpts) const
 Creates count linearly-spaced copies of a shape.
 
std::pair< Graph, NodeIdcircular_pattern (const NodeId theRoot, const ::occtl_topo_circular_pattern_options_t &theOpts) const
 Creates count angularly-spaced copies of a shape.
 
template<typename Fn >
void for_each (const uint64_t theKindMask, Fn theFn) const
 
template<typename Fn >
void for_each_ref (const uint64_t theRefKindMask, Fn theFn) const
 
template<typename Fn >
void for_each_rep (const uint64_t theRepKindMask, Fn theFn) const
 
template<typename Fn >
void for_each_related (const NodeId theNode, Fn theFn) const
 

Static Public Member Functions

static Graph create ()
 Creates an empty graph (naming-aligned alias).
 
static Graph from_pointer_unsafe (::occtl_graph_t *const thePtr)
 Wraps an existing owned handle; throws on NULL.
 

Detailed Description

RAII handle for a topology graph. Mirrors occtl_graph_t.

Created empty by the default constructor; topology is added through the make_* / import APIs. Move-only — copying a graph handle is not meaningful.

All query methods translate C status codes to exceptions via occtl::check.

Member Function Documentation

◆ add_pcurve()

void occtl::Graph::add_pcurve ( const NodeId  theEdge,
const NodeId  theFace,
const ::occtl_rep_id_t  thePcurveId,
const double  theFirst,
const double  theLast,
const ::occtl_orientation_t  theOrientation 
)
inline

Adds a pcurve binding between an edge and a face, creating a new coedge.

See also
occtl_topo_add_pcurve

◆ adjacent_edges()

std::vector< NodeId > occtl::Graph::adjacent_edges ( const NodeId  theEdge) const
inline

Returns edges adjacent to theEdge through shared vertices.

Exceptions
Erroron failure (invalid argument, node not found, wrong kind, or buffer error).

◆ adjacent_edges_get()

std::vector< NodeId > occtl::Graph::adjacent_edges_get ( const NodeId  theEdge)
inline

Returns computed adjacent Edge nodes for an Edge node.

Exceptions
Errorwith code OCCTL_WRONG_KIND when theEdge is not an Edge.
See also
occtl_graph_adjacent_edges_get

◆ adjacent_faces()

std::vector< NodeId > occtl::Graph::adjacent_faces ( const NodeId  theFace) const
inline

Returns faces adjacent to theFace through shared edges.

Exceptions
Erroron failure (invalid argument, node not found, wrong kind, or buffer error).

◆ adjacent_faces_get()

std::vector< NodeId > occtl::Graph::adjacent_faces_get ( const NodeId  theFace)
inline

Returns computed adjacent Face nodes for a Face node.

Exceptions
Errorwith code OCCTL_WRONG_KIND when theFace is not a Face.
See also
occtl_graph_adjacent_faces_get

◆ bbox_get()

::occtl_select_bbox_t occtl::Graph::bbox_get ( const NodeId  theNode)
inline

Returns the computed axis-aligned bounding box for a node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theNode is invalid or removed.
See also
occtl_graph_bbox_get

◆ begin_batch()

Batch occtl::Graph::begin_batch ( )
inline

Opens a batched mutation scope on this graph.

Exceptions
Erroron failure (OCCTL_INVALID_ARGUMENT or OCCTL_OUT_OF_MEMORY).
See also
Batch, occtl_graph_begin_batch

◆ blend_edges()

std::pair< Graph, NodeId > occtl::Graph::blend_edges ( const NodeId  theRoot,
const std::vector< NodeId > &  theEdges,
const ::occtl_topo_edge_blend_options_t theOpts 
) const
inline

Applies a selected-edge 3D fillet or chamfer to theRoot.

Parameters
theRootShape root to modify.
theEdgesSelected Edge NodeIds.
theOptsBlend options; root / edges fields are overwritten.
Returns
A pair of (new Graph, root NodeId of the blended result).
Exceptions
Erroron failure.
See also
occtl_topo_blend_edges

◆ chamfer_edges()

std::pair< Graph, NodeId > occtl::Graph::chamfer_edges ( const NodeId  theRoot,
const std::vector< NodeId > &  theEdges,
const double  theDist1,
const double  theDist2 
) const
inline

Applies a selected-edge 3D chamfer to theRoot.

Exceptions
Erroron failure.

◆ check_issues()

std::vector<::occtl_topo_check_issue_t > occtl::Graph::check_issues ( ) const
inline

Runs graph validation and returns all reported issues.

Exceptions
Errorwhen the underlying C validation call fails.

◆ child_explorer()

ExplorerIter occtl::Graph::child_explorer ( const NodeId  theRoot,
const ::occtl_topo_child_explorer_config_t *const  theConfig = nullptr 
) const
inline

Creates a child explorer for accumulated-location/orientation downward traversal.

Exceptions
Erroron failure (invalid argument, root not found, version mismatch, or OOM).

◆ circular_pattern()

std::pair< Graph, NodeId > occtl::Graph::circular_pattern ( const NodeId  theRoot,
const ::occtl_topo_circular_pattern_options_t theOpts 
) const
inline

Creates count angularly-spaced copies of a shape.

Parameters
theRootNodeId of the shape to pattern.
theOptsAxis, count, and angular step in radians.
Returns
A pair of (new Graph, root NodeId of the resulting compound).
Exceptions
Erroron failure (invalid argument, version mismatch, not found, or geometric failure).
See also
occtl_topo_circular_pattern

◆ classify_point()

PointClass occtl::Graph::classify_point ( const NodeId  theSolid,
const Point3 thePoint,
const double  theTolerance 
) const
inline

Classifies a point relative to a solid node.

Exceptions
Erroron failure (invalid argument, node not found, or wrong kind).

◆ cleanup_removed_refs()

void occtl::Graph::cleanup_removed_refs ( )
inline

Cleans up stale references after removal operations. Idempotent.

Exceptions
Erroron failure (OCCTL_INVALID_ARGUMENT).
See also
occtl_topo_cleanup_removed_refs

◆ clear_cached() [1/2]

void occtl::Graph::clear_cached ( const NodeId  theNode)
inline

Clears graph-owned computed data related to one node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theNode is invalid or removed.
See also
occtl_graph_clear_cached

◆ clear_cached() [2/2]

void occtl::Graph::clear_cached ( const RefId  theRef)
inline

Clears graph-owned computed data related to one reference.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theRef is invalid or removed.
See also
occtl_graph_clear_cached

◆ clone()

Graph occtl::Graph::clone ( ) const
inline

Deep-clones this graph into a new, independent graph.

Returns
A new Graph instance wrapping the clone.
Exceptions
Erroron failure (OCCTL_INVALID_ARGUMENT or OCCTL_OUT_OF_MEMORY).
See also
occtl_graph_clone

◆ coedge_edge_of()

NodeId occtl::Graph::coedge_edge_of ( const NodeId  theCoedge) const
inline

Returns the parent edge of a coedge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.

◆ coedge_face_of()

NodeId occtl::Graph::coedge_face_of ( const NodeId  theCoedge) const
inline

Returns the parent face of a coedge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.

◆ coedge_has_pcurve()

bool occtl::Graph::coedge_has_pcurve ( const NodeId  theCoedge) const
inline

Returns whether a coedge has a pcurve.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.

◆ coedge_has_polygon_on_surface()

bool occtl::Graph::coedge_has_polygon_on_surface ( const NodeId  theCoedge) const
inline

Returns true if the coedge has a polygon-on-surface discretization.

See also
occtl_topo_coedge_has_polygon_on_surface

◆ coedge_is_reversed()

bool occtl::Graph::coedge_is_reversed ( const NodeId  theCoedge) const
inline

Returns whether a coedge is reversed.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.

◆ coedge_is_seam()

bool occtl::Graph::coedge_is_seam ( const NodeId  theCoedge) const
inline

Returns whether a coedge is a seam (closed-surface) edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.

◆ coedge_orientation()

::occtl_orientation_t occtl::Graph::coedge_orientation ( const NodeId  theCoedge) const
inline

Returns the full TopAbs orientation of a coedge.

See also
occtl_topo_coedge_orientation

◆ coedge_pcurve_eval()

Point2 occtl::Graph::coedge_pcurve_eval ( const NodeId  theCoedge,
const double  theU 
) const
inline

Evaluates the PCurve UV point on a coedge at parameter theU.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.

◆ coedge_pcurve_eval_d1()

std::pair< Point2, Vector2 > occtl::Graph::coedge_pcurve_eval_d1 ( const NodeId  theCoedge,
const double  theU 
) const
inline

Evaluates the PCurve UV point and first derivative on a coedge at parameter theU.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.

◆ coedge_pcurve_eval_d2()

std::tuple< Point2, Vector2, Vector2 > occtl::Graph::coedge_pcurve_eval_d2 ( const NodeId  theCoedge,
const double  theU 
) const
inline

Evaluates the PCurve UV point and first two derivatives on a coedge at parameter theU.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.

◆ coedge_pcurve_eval_d3()

std::tuple< Point2, Vector2, Vector2, Vector2 > occtl::Graph::coedge_pcurve_eval_d3 ( const NodeId  theCoedge,
const double  theU 
) const
inline

Evaluates the PCurve UV point and first three derivatives on a coedge at parameter theU.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.

◆ coedge_pcurve_eval_dn()

Vector2 occtl::Graph::coedge_pcurve_eval_dn ( const NodeId  theCoedge,
const double  theU,
const uint32_t  theN 
) const
inline

Evaluates the Nth derivative on a coedge pcurve at parameter theU.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.

◆ coedge_pcurve_parameter()

double occtl::Graph::coedge_pcurve_parameter ( const NodeId  theCoedge,
const NodeId  theVertex 
) const
inline

Returns the parameter of a vertex on the pcurve carried by a coedge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge or theVertex is invalid, removed, or wrong kind.

◆ coedge_range()

std::pair< double, double > occtl::Graph::coedge_range ( const NodeId  theCoedge) const
inline

Returns the parametric range of a coedge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.

◆ coedge_seam_pair()

NodeId occtl::Graph::coedge_seam_pair ( const NodeId  theCoedge) const
inline

Returns the paired coedge for a seam edge, or an invalid NodeId for non-seam coedges.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.

◆ coedge_uv_points()

void occtl::Graph::coedge_uv_points ( const NodeId  theCoedge,
::occtl_point2_t theUVStart,
::occtl_point2_t theUVEnd 
) const
inline

Returns the UV points at the start and end of a coedge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.

◆ color_entries()

std::vector< std::pair< NodeId, ::occtl_color_rgba_t > > occtl::Graph::color_entries ( ) const
inline

Lists explicit colour entries.

See also
occtl_graph_color_entries

◆ color_get()

::occtl_color_rgba_t occtl::Graph::color_get ( const NodeId  theTarget) const
inline

Retrieves the colour of a target node, or opaque white if unset.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed.
See also
occtl_graph_color_get

◆ color_set()

void occtl::Graph::color_set ( const NodeId  theTarget,
const ::occtl_color_rgba_t theColor 
)
inline

Sets a colour on a target node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed.
See also
occtl_graph_color_set

◆ color_unset()

void occtl::Graph::color_unset ( const NodeId  theTarget)
inline

Removes the colour associated with a target node. Idempotent.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed.
See also
occtl_graph_color_unset

◆ common_vertices()

std::vector< NodeId > occtl::Graph::common_vertices ( const NodeId  theNodeA,
const NodeId  theNodeB 
) const
inline

Returns vertex nodes common to two graph roots.

Exceptions
Erroron failure (invalid argument, node not found, or buffer error).

◆ compact()

void occtl::Graph::compact ( )
inline

Compacts the graph, reclaiming slots from removed nodes. Invalidates all NodeId and RefId values.

Exceptions
Erroron failure (OCCTL_INVALID_ARGUMENT).
See also
occtl_graph_compact

◆ compound_add_child()

void occtl::Graph::compound_add_child ( const NodeId  theCompound,
const NodeId  theChild,
const ::occtl_orientation_t  theOrientation 
)
inline

Adds a child entity to a compound with the given orientation.

See also
occtl_topo_compound_add_child

◆ compound_child_count()

uint32_t occtl::Graph::compound_child_count ( const NodeId  theCompound) const
inline

Returns the number of children in a compound.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCompound is invalid, removed, or not a compound.

◆ compound_remove_child()

void occtl::Graph::compound_remove_child ( const NodeId  theCompound,
const NodeId  theChild 
)
inline

Removes a child from a compound (the child definition remains in the graph).

See also
occtl_topo_compound_remove_child

◆ compound_view()

void occtl::Graph::compound_view ( const NodeId  theCompound,
::occtl_compound_view_t theView 
) const
inline

Fills theView with the current scalar state of theCompound.

Exceptions
Erroron failure (invalid argument, not found, wrong kind, or version mismatch).
See also
occtl_topo_compound_view

◆ compsolid_solid_count()

uint32_t occtl::Graph::compsolid_solid_count ( const NodeId  theCompSolid) const
inline

Returns the number of solids in a compsolid.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCompSolid is invalid, removed, or not a compsolid.

◆ connected_edges()

std::vector< NodeId > occtl::Graph::connected_edges ( const NodeId  theSeedEdge) const
inline

Returns all edges connected to theSeedEdge through shared vertices.

Exceptions
Erroron failure (invalid argument, node not found, wrong kind, or buffer error).

◆ connected_faces()

std::vector< NodeId > occtl::Graph::connected_faces ( const NodeId  theSeedFace) const
inline

Returns all faces connected to theSeedFace through shared edges.

Exceptions
Erroron failure (invalid argument, node not found, wrong kind, or buffer error).

◆ descendant_edges_get()

std::vector< NodeId > occtl::Graph::descendant_edges_get ( const NodeId  theNode)
inline

Returns computed descendant Edge nodes for a root node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theNode is invalid or removed.
See also
occtl_graph_descendant_edges_get

◆ descendant_faces_get()

std::vector< NodeId > occtl::Graph::descendant_faces_get ( const NodeId  theNode)
inline

Returns computed descendant Face nodes for a root node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theNode is invalid or removed.
See also
occtl_graph_descendant_faces_get

◆ descendant_vertices_get()

std::vector< NodeId > occtl::Graph::descendant_vertices_get ( const NodeId  theNode)
inline

Returns computed descendant Vertex nodes for a root node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theNode is invalid or removed.
See also
occtl_graph_descendant_vertices_get

◆ descendants_get()

std::vector< NodeId > occtl::Graph::descendants_get ( const NodeId  theNode,
const NodeKind  theKind 
)
inline

Returns computed descendant nodes of one requested kind.

Exceptions
Errorwith code OCCTL_INVALID_ARGUMENT when theKind is invalid.
See also
occtl_graph_descendants_get

◆ distance_pair()

DistancePair occtl::Graph::distance_pair ( const NodeId  theNodeA,
const NodeId  theNodeB 
) const
inline

Computes the closest-distance pair between two graph nodes.

Exceptions
Erroron failure (invalid argument, node not found, or invalid geometry).

◆ draft_faces()

std::pair< Graph, NodeId > occtl::Graph::draft_faces ( const ::occtl_topo_draft_faces_options_t theOpts) const
inline

Applies a draft angle to selected faces of a shape.

Exceptions
Erroron failure.
See also
occtl_topo_draft_faces

◆ edge_add_internal_vertex()

void occtl::Graph::edge_add_internal_vertex ( const NodeId  theEdge,
const NodeId  theVertex 
)
inline

Adds an internal vertex to an edge.

See also
occtl_topo_edge_add_internal_vertex

◆ edge_continuity()

::occtl_shape_continuity_t occtl::Graph::edge_continuity ( const NodeId  theEdge,
const NodeId  theFaceA,
const NodeId  theFaceB 
) const
inline

Returns the geometric continuity between two faces at their shared edge.

See also
occtl_topo_edge_continuity

◆ edge_curve_kind()

CurveKind occtl::Graph::edge_curve_kind ( const NodeId  theEdge) const
inline

Returns the 3D curve kind carried by an edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid or removed.
Errorwith code OCCTL_WRONG_KIND when theEdge is not an edge.

◆ edge_curve_kind_get()

CurveKind occtl::Graph::edge_curve_kind_get ( const NodeId  theEdge)
inline

Returns computed curve-kind classification for an Edge node.

Exceptions
Errorwith code OCCTL_WRONG_KIND when theEdge is not an Edge.
See also
occtl_graph_edge_curve_kind_get

◆ edge_end_vertex()

NodeId occtl::Graph::edge_end_vertex ( const NodeId  theEdge) const
inline

Returns the end vertex of an edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_eval()

Point3 occtl::Graph::edge_eval ( const NodeId  theEdge,
const double  theU 
) const
inline

Evaluates the 3D point on an edge at parameter theU.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_eval_d1()

std::pair< Point3, Vector3 > occtl::Graph::edge_eval_d1 ( const NodeId  theEdge,
const double  theU 
) const
inline

Evaluates the 3D point and first derivative on an edge at parameter theU.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_eval_d2()

std::tuple< Point3, Vector3, Vector3 > occtl::Graph::edge_eval_d2 ( const NodeId  theEdge,
const double  theU 
) const
inline

Evaluates the first two derivatives on an edge at parameter theU.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_eval_d3()

std::tuple< Point3, Vector3, Vector3, Vector3 > occtl::Graph::edge_eval_d3 ( const NodeId  theEdge,
const double  theU 
) const
inline

Evaluates the first three derivatives on an edge at parameter theU.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_eval_dn()

Vector3 occtl::Graph::edge_eval_dn ( const NodeId  theEdge,
const double  theU,
const uint32_t  theN 
) const
inline

Evaluates the Nth derivative on an edge at parameter theU.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_face_count()

uint32_t occtl::Graph::edge_face_count ( const NodeId  theEdge) const
inline

Returns the number of faces referencing an edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_find_coedge_on_face()

NodeId occtl::Graph::edge_find_coedge_on_face ( const NodeId  theEdge,
const NodeId  theFace 
) const
inline

Finds the coedge for an (edge, face) pair.

See also
occtl_topo_edge_find_coedge_on_face

◆ edge_find_coedge_on_face_oriented()

NodeId occtl::Graph::edge_find_coedge_on_face_oriented ( const NodeId  theEdge,
const NodeId  theFace,
const ::occtl_orientation_t  theOrientation 
) const
inline

Finds the coedge for an (edge, face, orientation) triple. Disambiguates seam edges.

See also
occtl_topo_edge_find_coedge_on_face_oriented

◆ edge_has_continuity()

bool occtl::Graph::edge_has_continuity ( const NodeId  theEdge,
const NodeId  theFaceA,
const NodeId  theFaceB 
) const
inline

Returns true if continuity is recorded between two faces at the edge.

See also
occtl_topo_edge_has_continuity

◆ edge_has_curve()

bool occtl::Graph::edge_has_curve ( const NodeId  theEdge) const
inline

Returns whether an edge has a 3D curve.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_has_polygon3d()

bool occtl::Graph::edge_has_polygon3d ( const NodeId  theEdge) const
inline

Returns true if the edge has a 3D polygon discretization.

See also
occtl_topo_edge_has_polygon3d

◆ edge_is_boundary()

bool occtl::Graph::edge_is_boundary ( const NodeId  theEdge) const
inline

Returns whether an edge is a boundary edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_is_degenerated()

bool occtl::Graph::edge_is_degenerated ( const NodeId  theEdge) const
inline

Returns whether an edge is degenerated.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_is_manifold()

bool occtl::Graph::edge_is_manifold ( const NodeId  theEdge) const
inline

Returns whether an edge is manifold.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_is_seam_on_face()

bool occtl::Graph::edge_is_seam_on_face ( const NodeId  theEdge,
const NodeId  theFace 
) const
inline

Returns whether an edge is a seam edge on a given face.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge or theFace is invalid or removed.

◆ edge_max_continuity()

::occtl_shape_continuity_t occtl::Graph::edge_max_continuity ( const NodeId  theEdge) const
inline

Returns the maximum continuity across all face pairs at the edge.

See also
occtl_topo_edge_max_continuity

◆ edge_range()

std::pair< double, double > occtl::Graph::edge_range ( const NodeId  theEdge) const
inline

Returns the parametric range of an edge's 3D curve.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_remove_vertex()

void occtl::Graph::edge_remove_vertex ( const NodeId  theEdge,
const NodeId  theVertex 
)
inline

Removes a vertex (boundary or internal) from an edge.

See also
occtl_topo_edge_remove_vertex

◆ edge_same_parameter()

bool occtl::Graph::edge_same_parameter ( const NodeId  theEdge) const
inline

Returns whether an edge has the same parameterisation on every face it bounds.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_same_range()

bool occtl::Graph::edge_same_range ( const NodeId  theEdge) const
inline

Returns whether an edge has the same range in 3D and on its pcurves.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_split()

EdgeSplitResult occtl::Graph::edge_split ( const NodeId  theEdge,
const double  theParameter 
)
inline

Splits an edge at the given parameter and returns the two new sub-edges. The original edge is soft-removed; wires referencing it are updated.

See also
occtl_topo_edge_split

◆ edge_start_vertex()

NodeId occtl::Graph::edge_start_vertex ( const NodeId  theEdge) const
inline

Returns the start vertex of an edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_tolerance()

double occtl::Graph::edge_tolerance ( const NodeId  theEdge) const
inline

Returns the tolerance of an edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edge_vertex_count()

uint32_t occtl::Graph::edge_vertex_count ( const NodeId  theEdge) const
inline

Returns the number of vertices on an edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.

◆ edges_to_wires()

std::vector< NodeId > occtl::Graph::edges_to_wires ( const EdgesToWiresOptions theOptions)
inline

Connects unordered edges into wire nodes.

Exceptions
Erroron failure (invalid argument, child not found, version mismatch, or out of memory).

◆ extrude_faces_to_solids()

std::pair< Graph, NodeId > occtl::Graph::extrude_faces_to_solids ( const ::occtl_topo_extrude_faces_options_t theOpts) const
inline

Thickens one or more Face nodes into prism solids.

Parameters
theOptsFace list, thickness, and direction options.
Returns
A pair of (new Graph, root NodeId of the extrude result).
See also
occtl_topo_make_face_extrusion

◆ face_add_holes()

void occtl::Graph::face_add_holes ( const NodeId  theFace,
const std::vector< NodeId > &  theHoles 
)
inline

Adds selected wires as inner wires of a face.

See also
occtl_topo_face_add_holes

◆ face_chamfer_2d()

NodeId occtl::Graph::face_chamfer_2d ( const FaceChamfer2dOptions theOptions)
inline

Chamfers corners of a planar face and inserts the result into this graph.

Exceptions
Erroron failure (invalid argument, face not found, wrong kind, or OCCT failure).

◆ face_eval()

Point3 occtl::Graph::face_eval ( const NodeId  theFace,
const double  theU,
const double  theV 
) const
inline

Evaluates the 3D point on a face at UV parameters (theU, theV).

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face.

◆ face_eval_d1()

std::tuple< Point3, Vector3, Vector3 > occtl::Graph::face_eval_d1 ( const NodeId  theFace,
const double  theU,
const double  theV 
) const
inline

Evaluates the 3D point, D1U, and D1V on a face at UV parameters (theU, theV).

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face.

◆ face_eval_d2()

std::tuple< Point3, Vector3, Vector3, Vector3, Vector3, Vector3 > occtl::Graph::face_eval_d2 ( const NodeId  theFace,
const double  theU,
const double  theV 
) const
inline

Evaluates the 3D point and first two partial derivatives on a face.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face.

◆ face_eval_d3()

std:: tuple< Point3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3 > occtl::Graph::face_eval_d3 ( const NodeId  theFace,
const double  theU,
const double  theV 
) const
inline

Evaluates the 3D point and first three partial derivatives on a face.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face.

◆ face_eval_dn()

Vector3 occtl::Graph::face_eval_dn ( const NodeId  theFace,
const double  theU,
const double  theV,
const uint32_t  theNu,
const uint32_t  theNv 
) const
inline

Evaluates the (theNu, theNv) cross derivative on a face at UV parameters (theU, theV).

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face.

◆ face_has_surface()

bool occtl::Graph::face_has_surface ( const NodeId  theFace) const
inline

Returns whether a face has a surface.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face.

◆ face_has_triangulation()

bool occtl::Graph::face_has_triangulation ( const NodeId  theFace) const
inline

Returns whether a face has a triangulation.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face.

◆ face_natural_restriction()

bool occtl::Graph::face_natural_restriction ( const NodeId  theFace) const
inline

Returns whether a face has natural restriction.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face.

◆ face_outer_wire()

NodeId occtl::Graph::face_outer_wire ( const NodeId  theFace) const
inline

Returns the outer wire of a face.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face, or when the face has no outer wire.

◆ face_remove_holes() [1/2]

void occtl::Graph::face_remove_holes ( const NodeId  theFace)
inline

Removes all inner wires from a face.

See also
occtl_topo_face_remove_holes

◆ face_remove_holes() [2/2]

void occtl::Graph::face_remove_holes ( const NodeId  theFace,
const std::vector< NodeId > &  theHoles 
)
inline

Removes selected inner wires from a face.

See also
occtl_topo_face_remove_holes

◆ face_surface_kind()

SurfaceKind occtl::Graph::face_surface_kind ( const NodeId  theFace) const
inline

Returns the surface kind carried by a face.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid or removed.
Errorwith code OCCTL_WRONG_KIND when theFace is not a face.

◆ face_surface_kind_get()

SurfaceKind occtl::Graph::face_surface_kind_get ( const NodeId  theFace)
inline

Returns computed surface-kind classification for a Face node.

Exceptions
Errorwith code OCCTL_WRONG_KIND when theFace is not a Face.
See also
occtl_graph_face_surface_kind_get

◆ face_to_arcs()

std::pair< Graph, NodeId > occtl::Graph::face_to_arcs ( const ::occtl_topo_face_to_arcs_options_t theOpts) const
inline

Converts planar face or wire boundaries to line and circular-arc edges.

Exceptions
Erroron failure.
See also
occtl_topo_face_to_arcs

◆ face_tolerance()

double occtl::Graph::face_tolerance ( const NodeId  theFace) const
inline

Returns the tolerance of a face.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face.

◆ face_uv_bounds()

void occtl::Graph::face_uv_bounds ( const NodeId  theFace,
double &  theUMin,
double &  theUMax,
double &  theVMin,
double &  theVMax 
) const
inline

Returns the UV parameter bounds of a face.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face.

◆ face_uv_bounds_get()

::occtl_graph_uv_bounds_t occtl::Graph::face_uv_bounds_get ( const NodeId  theFace)
inline

Returns computed UV parameter bounds for a Face node.

Exceptions
Errorwith code OCCTL_WRONG_KIND when theFace is not a Face.
See also
occtl_graph_face_uv_bounds_get

◆ face_uv_bounds_restricted()

void occtl::Graph::face_uv_bounds_restricted ( const NodeId  theFace,
const double  theUMin,
const double  theUMax,
const double  theVMin,
const double  theVMax,
const double  theU,
const double  theV,
::occtl_point3_t theOutPoint,
::occtl_vector3_t theOutD1U,
::occtl_vector3_t theOutD1V 
) const
inline

Evaluates a face surface with its first partials inside a restricted UV box.

See also
occtl_topo_face_uv_bounds_restricted

◆ face_wire_count()

uint32_t occtl::Graph::face_wire_count ( const NodeId  theFace) const
inline

Returns the number of wires on a face.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face.

◆ faces_intersected_by_axis()

AxisHitIter occtl::Graph::faces_intersected_by_axis ( const NodeId  theRoot,
const Axis1Placement theAxis,
const double  theMinParameter,
const double  theMaxParameter,
const double  theTolerance 
) const
inline

Returns ordered face intersections with an axis under a graph root.

Exceptions
Erroron failure (invalid argument, root not found, or invalid geometry).

◆ fillet()

std::pair< Graph, NodeId > occtl::Graph::fillet ( const ::occtl_topo_fillet_options_t theOpts)
inline

Applies a 3D fillet or chamfer to all solids and shells in this graph.

Parameters
theOptsFillet/chamfer options (radius, chamfer mode, distances).
Returns
A pair of (new Graph, root NodeId of the filleted result).
Exceptions
Erroron failure (invalid argument, version mismatch, or geometric failure).
See also
occtl_topo_fillet

◆ fillet_edges()

std::pair< Graph, NodeId > occtl::Graph::fillet_edges ( const NodeId  theRoot,
const std::vector< NodeId > &  theEdges,
const double  theRadius 
) const
inline

Applies a selected-edge constant-radius 3D fillet to theRoot.

Exceptions
Erroron failure.

◆ graph_distance() [1/2]

int32_t occtl::Graph::graph_distance ( const NodeId  theRoot,
const NodeId  theSource,
const NodeId  theTarget 
) const
inline

Returns same-kind topological hop distance from one source under theRoot.

Exceptions
Erroron failure (invalid argument, node not found, or wrong kind).

◆ graph_distance() [2/2]

int32_t occtl::Graph::graph_distance ( const NodeId  theRoot,
const std::vector< NodeId > &  theSources,
const NodeId  theTarget 
) const
inline

Returns same-kind topological hop distance under theRoot, or -1 if disconnected.

Exceptions
Erroron failure (invalid argument, node not found, or wrong kind).

◆ graph_metadata_get()

std::string occtl::Graph::graph_metadata_get ( const char *const  theKey,
const size_t  theKeyLen 
) const
inline

Retrieves UTF-8 metadata from the graph itself.

Exceptions
Errorwith code OCCTL_NOT_FOUND when the key is missing.
See also
occtl_graph_metadata_get

◆ graph_metadata_keys()

std::vector< std::string > occtl::Graph::graph_metadata_keys ( ) const
inline

Lists UTF-8 metadata keys stored on the graph itself.

See also
occtl_graph_metadata_keys

◆ graph_metadata_set()

void occtl::Graph::graph_metadata_set ( const char *const  theKey,
const size_t  theKeyLen,
const char *const  theValue,
const size_t  theValueLen 
)
inline

Sets UTF-8 metadata on the graph itself.

Exceptions
Errorwith code OCCTL_INVALID_ARGUMENT when a span is invalid.
See also
occtl_graph_metadata_set

◆ graph_metadata_unset()

void occtl::Graph::graph_metadata_unset ( const char *const  theKey,
const size_t  theKeyLen 
)
inline

Removes one graph-level metadata key. Idempotent.

See also
occtl_graph_metadata_unset

◆ graph_units_get()

GraphUnits occtl::Graph::graph_units_get ( ) const
inline

Retrieves graph-level length-unit metadata.

Exceptions
Erroron failure.
See also
occtl_graph_units_get

◆ graph_units_set()

void occtl::Graph::graph_units_set ( const double  theLengthUnitToMeter,
const char *const  theName,
const size_t  theNameLen 
)
inline

Sets graph-level length-unit metadata.

Exceptions
Errorwith code OCCTL_INVALID_ARGUMENT when the scale or name span is invalid.
See also
occtl_graph_units_set

◆ hlr_project()

std::pair< Graph, HlrCategoryRoots > occtl::Graph::hlr_project ( const ::occtl_topo_hlr_options_t theOpts) const
inline

Projects a shape with OCCT hidden-line removal.

Returns
Pair of (output Graph, category roots in that graph).
Exceptions
Erroron failure.
See also
occtl_topo_make_hlr_projection

◆ intersections()

IntersectionIter occtl::Graph::intersections ( const NodeId  theNodeA,
const NodeId  theNodeB,
const RelationOptions *const  theOptions = nullptr 
)
inline

Inserts and returns generated intersection nodes for two graph nodes.

Exceptions
Erroron failure (invalid argument, node not found, or invalid geometry).

◆ is_inside()

bool occtl::Graph::is_inside ( const NodeId  theSolid,
const Point3 thePoint,
const double  theTolerance,
const bool  theIncludeBoundary = true 
) const
inline

Returns whether a point is inside a solid node.

Exceptions
Erroron failure (invalid argument, node not found, or wrong kind).

◆ is_same_geometry()

bool occtl::Graph::is_same_geometry ( const NodeId  theNodeA,
const NodeId  theNodeB,
const double  theTolerance 
) const
inline

Tests whether two edge or face nodes share geometric support.

Exceptions
Erroron failure (invalid argument, node not found, or wrong kind).

◆ is_valid()

bool occtl::Graph::is_valid ( ) const
inline

Returns true when graph validation reports no issues.

Exceptions
Errorwhen the underlying C validation call fails.

◆ joint_create()

JointId occtl::Graph::joint_create ( const JointInfo theInfo)
inline

Creates an assembly joint record in the graph.

Returns
The new graph-local joint ID.
Exceptions
Erroron failure.
See also
occtl_joint_create

◆ joint_get()

JointInfo occtl::Graph::joint_get ( const JointId  theJoint) const
inline

Retrieves an assembly joint record.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theJoint is missing.
See also
occtl_joint_get

◆ joint_list()

std::vector< JointId > occtl::Graph::joint_list ( const NodeId  theNode = NodeId::invalid()) const
inline

Lists all assembly joints or those attached to theNode.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theNode is invalid or removed.
See also
occtl_joint_list

◆ joint_remove()

void occtl::Graph::joint_remove ( const JointId  theJoint)
inline

Removes an assembly joint record. Missing joints are a no-op.

Exceptions
Errorwith code OCCTL_INVALID_ARGUMENT when theJoint is invalid.
See also
occtl_joint_remove

◆ linear_pattern()

std::pair< Graph, NodeId > occtl::Graph::linear_pattern ( const NodeId  theRoot,
const ::occtl_topo_linear_pattern_options_t theOpts 
) const
inline

Creates count linearly-spaced copies of a shape.

Parameters
theRootNodeId of the shape to pattern.
theOptsDirection, count, and step distance.
Returns
A pair of (new Graph, root NodeId of the resulting compound).
Exceptions
Erroron failure (invalid argument, version mismatch, not found, or geometric failure).
See also
occtl_topo_linear_pattern

◆ link_product_to_topology()

void occtl::Graph::link_product_to_topology ( const NodeId  theProduct,
const NodeId  theRoot,
const ::occtl_transform_t thePlacement 
)
inline

Links an existing product to a topology root with a placement.

Exceptions
Errorwith code OCCTL_NOT_FOUND or OCCTL_WRONG_KIND.
See also
occtl_topo_link_product

◆ link_product_to_topology_with_occurrence()

NodeId occtl::Graph::link_product_to_topology_with_occurrence ( const NodeId  theProduct,
const NodeId  theRoot,
const ::occtl_transform_t thePlacement 
)
inline

Links an existing product to a topology root and returns the new occurrence.

Exceptions
Errorwith code OCCTL_NOT_FOUND or OCCTL_WRONG_KIND.
See also
occtl_topo_link_product_occurrence

◆ link_products()

void occtl::Graph::link_products ( const NodeId  theParentProduct,
const NodeId  theChildProduct,
const ::occtl_transform_t thePlacement,
const NodeId  theParentOccurrence = NodeId(OCCTL_NODE_ID_INVALID) 
)
inline

Links two products via a parent-child occurrence.

Exceptions
Errorwith code OCCTL_NOT_FOUND or OCCTL_WRONG_KIND.
See also
occtl_topo_link_products

◆ link_products_with_occurrence()

NodeId occtl::Graph::link_products_with_occurrence ( const NodeId  theParentProduct,
const NodeId  theChildProduct,
const ::occtl_transform_t thePlacement,
const NodeId  theParentOccurrence = NodeId(OCCTL_NODE_ID_INVALID) 
)
inline

Links two products and returns the new occurrence.

Exceptions
Errorwith code OCCTL_NOT_FOUND or OCCTL_WRONG_KIND.
See also
occtl_topo_link_products_occurrence

◆ make_compound()

NodeId occtl::Graph::make_compound ( const ::occtl_topo_make_compound_info_t theInfo)
inline

Creates a compound node from a span of oriented children.

Exceptions
Erroron failure (invalid argument, child not found, version mismatch, or out of memory).

◆ make_compsolid()

NodeId occtl::Graph::make_compsolid ( const ::occtl_topo_make_compsolid_info_t theInfo)
inline

Creates a compsolid node from a span of oriented solids.

Exceptions
Erroron failure (invalid argument, child not found, version mismatch, or out of memory).

◆ make_edge()

NodeId occtl::Graph::make_edge ( const ::occtl_topo_make_edge_info_t theInfo)
inline

Creates an edge node.

Exceptions
Erroron failure (invalid argument, vertex not found, version mismatch, or out of memory).

◆ make_face()

NodeId occtl::Graph::make_face ( const ::occtl_topo_make_face_info_t theInfo)
inline

Creates a face node from a surface, outer wire, and optional inner wires.

Exceptions
Erroron failure (invalid argument, child not found, version mismatch, or out of memory).

◆ make_face_from_wires_auto()

NodeId occtl::Graph::make_face_from_wires_auto ( const MakeFaceFromWiresAutoOptions theOptions)
inline

Creates a face from candidate wires using automatic outer-loop detection.

Exceptions
Erroron failure (invalid argument, wire not found, wrong kind, or OCCT failure).

◆ make_filling()

std::pair< Graph, NodeId > occtl::Graph::make_filling ( const ::occtl_topo_filling_options_t theOpts) const
inline

Builds an N-side filling face from ordered boundary edges.

Exceptions
Erroron failure.
See also
occtl_topo_make_filling

◆ make_filling_patch()

std::pair< Graph, NodeId > occtl::Graph::make_filling_patch ( const ::occtl_topo_filling_patch_options_t theOpts) const
inline

Builds a filling patch from edge, support-face, and point constraints.

Exceptions
Erroron failure.
See also
occtl_topo_make_filling_patch

◆ make_product()

NodeId occtl::Graph::make_product ( const ::occtl_topo_make_product_info_t theInfo)
inline

Creates a product in the graph.

Returns
The new product NodeId.
Exceptions
Erroron failure.
See also
occtl_topo_make_product

◆ make_shell()

NodeId occtl::Graph::make_shell ( const ::occtl_topo_make_shell_info_t theInfo)
inline

Creates a shell node from a span of oriented faces.

Exceptions
Erroron failure (invalid argument, child not found, version mismatch, or out of memory).

◆ make_solid()

NodeId occtl::Graph::make_solid ( const ::occtl_topo_make_solid_info_t theInfo)
inline

Creates a solid node from a span of oriented shells.

Exceptions
Erroron failure (invalid argument, child not found, version mismatch, or out of memory).

◆ make_vertex()

NodeId occtl::Graph::make_vertex ( const ::occtl_topo_make_vertex_info_t theInfo)
inline

Creates a vertex node from a point and tolerance.

Exceptions
Erroron failure (invalid argument, version mismatch, or out of memory).

◆ make_wire()

NodeId occtl::Graph::make_wire ( const ::occtl_topo_make_wire_info_t theInfo)
inline

Creates a wire node from an ordered span of oriented edges.

Exceptions
Erroron failure (invalid argument, child not found, version mismatch, or out of memory).

◆ mass_properties_get()

::occtl_graph_mass_properties_t occtl::Graph::mass_properties_get ( const NodeId  theNode)
inline

Returns computed combined OCCT mass properties for a node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theNode is invalid or removed.
See also
occtl_graph_mass_properties_get

◆ material_get()

GraphMaterial occtl::Graph::material_get ( const NodeId  theTarget) const
inline

Retrieves material-lite data from a target node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget has no material.
See also
occtl_graph_material_get

◆ material_nodes()

std::vector< NodeId > occtl::Graph::material_nodes ( ) const
inline

Lists nodes that have explicit material-lite data.

See also
occtl_graph_material_nodes

◆ material_set()

void occtl::Graph::material_set ( const NodeId  theTarget,
const MaterialInfo theInfo 
)
inline

Sets material-lite data on a target node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed.
See also
occtl_graph_material_set

◆ material_unset()

void occtl::Graph::material_unset ( const NodeId  theTarget)
inline

Removes material-lite data from a target node. Idempotent.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed.
See also
occtl_graph_material_unset

◆ max_fillet_radius()

double occtl::Graph::max_fillet_radius ( const NodeId  theRoot,
const std::vector< NodeId > &  theEdges,
const ::occtl_topo_max_fillet_radius_options_t theOpts 
) const
inline

Estimates the largest selected-edge constant fillet radius accepted by OCCT.

Exceptions
Erroron failure.
See also
occtl_topo_max_fillet_radius

◆ measure_get()

double occtl::Graph::measure_get ( const NodeId  theNode,
const SelectMeasureKind  theKind 
)
inline

Returns one computed OCCT mass-property scalar.

Exceptions
Errorwith code OCCTL_WRONG_KIND when theKind does not apply.
See also
occtl_graph_measure_get

◆ mirror()

std::pair< Graph, NodeId > occtl::Graph::mirror ( const NodeId  theRoot,
const ::occtl_point3_t thePoint,
const ::occtl_direction3_t theNormal 
) const
inline

Creates a mirrored copy of the shape rooted at theRoot.

Parameters
theRootNodeId of the shape to mirror.
thePointA point on the mirror plane.
theNormalUnit normal of the mirror plane.
Returns
A pair of (new Graph, root NodeId of the mirrored result).
Exceptions
Erroron failure (invalid argument, not found, or geometric failure).
See also
occtl_topo_mirror

◆ name_get()

std::string occtl::Graph::name_get ( const NodeId  theTarget) const
inline

Retrieves the name of a target node. Returns empty string if unset.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed, OCCTL_BUFFER_TOO_SMALL if the internal buffer is too small (not used here).
See also
occtl_graph_name_get

◆ name_nodes()

std::vector< NodeId > occtl::Graph::name_nodes ( ) const
inline

Lists nodes that have explicit names.

See also
occtl_graph_name_nodes

◆ name_set()

void occtl::Graph::name_set ( const NodeId  theTarget,
const char *const  theName,
const size_t  theNameLen 
)
inline

Sets a human-readable name on a target node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed, OCCTL_INVALID_ARGUMENT when theName is null with non-zero length.
See also
occtl_graph_name_set

◆ node_id_from_uid()

NodeId occtl::Graph::node_id_from_uid ( const UID  theUid) const
inline

Resolves a persistent UID to its current NodeId.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theUid refers to a removed entity or is all-zero.

◆ node_id_kind()

::occtl_node_kind_t occtl::Graph::node_id_kind ( const NodeId  theId) const
inline

Returns the kind of a node ID.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theId is invalid or the node has been removed.

◆ node_metadata_get()

std::string occtl::Graph::node_metadata_get ( const NodeId  theTarget,
const char *const  theKey,
const size_t  theKeyLen 
) const
inline

Retrieves UTF-8 metadata from a target node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when the target or key is missing.
See also
occtl_graph_node_metadata_get

◆ node_metadata_keys()

std::vector< std::string > occtl::Graph::node_metadata_keys ( const NodeId  theTarget) const
inline

Lists UTF-8 metadata keys stored on a target node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed.
See also
occtl_graph_node_metadata_keys

◆ node_metadata_nodes()

std::vector< NodeId > occtl::Graph::node_metadata_nodes ( ) const
inline

Lists nodes that have at least one metadata key.

See also
occtl_graph_node_metadata_nodes

◆ node_metadata_set()

void occtl::Graph::node_metadata_set ( const NodeId  theTarget,
const char *const  theKey,
const size_t  theKeyLen,
const char *const  theValue,
const size_t  theValueLen 
)
inline

Sets UTF-8 metadata on a target node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed.
See also
occtl_graph_node_metadata_set

◆ node_metadata_unset()

void occtl::Graph::node_metadata_unset ( const NodeId  theTarget,
const char *const  theKey,
const size_t  theKeyLen 
)
inline

Removes one metadata key from a target node. Idempotent.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed.
See also
occtl_graph_node_metadata_unset

◆ obb_get()

::occtl_graph_obb_t occtl::Graph::obb_get ( const NodeId  theNode)
inline

Returns the computed oriented bounding box for a node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theNode is invalid or removed.
See also
occtl_graph_obb_get

◆ occurrence_transform_get()

::occtl_transform_t occtl::Graph::occurrence_transform_get ( const NodeId  theOccurrence) const
inline

Returns the local transform of a uniquely referenced occurrence node.

Exceptions
Errorwith code OCCTL_NOT_FOUND, OCCTL_WRONG_KIND, or OCCTL_INVALID_ARGUMENT.
See also
occtl_topo_occurrence_transform

◆ occurrence_transform_set()

void occtl::Graph::occurrence_transform_set ( const NodeId  theOccurrence,
const ::occtl_transform_t theTransform 
)
inline

Sets the local transform of a uniquely referenced occurrence node.

Exceptions
Errorwith code OCCTL_NOT_FOUND, OCCTL_WRONG_KIND, or OCCTL_INVALID_ARGUMENT.
See also
occtl_topo_occurrence_set_transform

◆ occurrence_world_transform()

::occtl_transform_t occtl::Graph::occurrence_world_transform ( const NodeId  theRoot,
const NodeId  theOccurrence 
) const
inline

Returns an occurrence transform accumulated from a traversal root.

Exceptions
Errorwith code OCCTL_NOT_FOUND or OCCTL_WRONG_KIND.
See also
occtl_topo_occurrence_world_transform

◆ offset_features() [1/2]

std::pair< Graph, NodeId > occtl::Graph::offset_features ( const ::occtl_topo_offset_features_options_t theOpts) const
inline

Offsets selected features using a fully specified C options struct.

Exceptions
Erroron failure.
See also
occtl_topo_offset_features

◆ offset_features() [2/2]

std::pair< Graph, NodeId > occtl::Graph::offset_features ( const NodeId  theRoot,
const std::vector< NodeId > &  theSelections,
const double  theSelectionOffset,
const double  theBaseOffset = 0.0 
) const
inline

Offsets selected features of theRoot.

Parameters
theRootShape root to offset.
theSelectionsSelected feature topology NodeIds.
theSelectionOffsetOffset applied to selected faces.
theBaseOffsetOffset applied to unselected faces.
Returns
A pair of (new Graph, root NodeId of the offset result).
Exceptions
Erroron failure.
See also
occtl_topo_offset_features

◆ pair_distance_get()

double occtl::Graph::pair_distance_get ( const NodeId  theFirst,
const NodeId  theSecond 
)
inline

Returns computed OCCT minimum distance between two nodes.

Exceptions
Errorwith code OCCTL_NOT_FOUND when either node is invalid or removed.
See also
occtl_graph_pair_distance_get

◆ parent_explorer()

ExplorerIter occtl::Graph::parent_explorer ( const NodeId  theNode,
const ::occtl_topo_parent_explorer_config_t *const  theConfig = nullptr 
) const
inline

Creates a parent explorer for accumulated-location/orientation upward traversal.

Exceptions
Erroron failure (invalid argument, node not found, version mismatch, or OOM).

◆ product_occurrence_count()

uint32_t occtl::Graph::product_occurrence_count ( const NodeId  theProduct) const
inline

Returns the number of occurrences of a product.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theProduct is invalid, removed, or not a product.

◆ project_face_along_direction()

std::pair< Graph, NodeId > occtl::Graph::project_face_along_direction ( const ::occtl_topo_project_face_direction_options_t theOpts) const
inline

Projects a face onto target boundary faces along a fixed direction.

Exceptions
Erroron failure.
See also
occtl_topo_project_face_along_direction

◆ project_on_face()

std::pair< Graph, NodeId > occtl::Graph::project_on_face ( const ::occtl_topo_project_on_face_options_t theOpts) const
inline

Projects an edge or wire onto a target face along face normals.

Exceptions
Erroron failure.
See also
occtl_topo_project_on_face

◆ ref_id_from_ref_uid()

RefId occtl::Graph::ref_id_from_ref_uid ( const RefUID  theUid) const
inline

Resolves a persistent RefUID to its current RefId.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theUid refers to a removed ref or is all-zero.

◆ ref_id_kind()

::occtl_ref_kind_t occtl::Graph::ref_id_kind ( const RefId  theId) const
inline

Returns the kind of a ref ID.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theId is invalid or the ref has been removed.

◆ ref_uid_from_ref_id()

RefUID occtl::Graph::ref_uid_from_ref_id ( const RefId  theId) const
inline

Returns the persistent RefUID for a RefId.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theId is invalid or the ref has been removed.

◆ ref_uid_kind()

::occtl_ref_kind_t occtl::Graph::ref_uid_kind ( const RefUID  theUid) const
inline

Returns the kind embedded in a RefUID.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theUid is invalid or the ref has been removed.

◆ ref_uid_table()

std::vector< std::pair< RefUID, RefId > > occtl::Graph::ref_uid_table ( ) const
inline

Returns active RefUID to RefId pairs for all references in the graph.

See also
occtl_graph_ref_uid_table

◆ related()

RelatedIter occtl::Graph::related ( const NodeId  theNode) const
inline

Creates a related-iterator over the semantic neighbours of theNode.

Exceptions
Erroron failure (invalid argument, node not found, or OOM).

◆ remove()

void occtl::Graph::remove ( const NodeId  theId)
inline

Removes a node from the graph.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theId is invalid or already removed.

◆ remove_features() [1/2]

std::pair< Graph, NodeId > occtl::Graph::remove_features ( const ::occtl_topo_defeature_options_t theOpts) const
inline

Removes selected features using a fully specified C options struct.

Exceptions
Erroron failure.
See also
occtl_topo_remove_features

◆ remove_features() [2/2]

std::pair< Graph, NodeId > occtl::Graph::remove_features ( const NodeId  theRoot,
const std::vector< NodeId > &  theSelections,
const bool  theParallel = false 
) const
inline

Removes selected features from theRoot.

Parameters
theRootShape root to modify.
theSelectionsSelected feature topology NodeIds.
theParallelWhether OCCT may run the operation in parallel.
Returns
A pair of (new Graph, root NodeId of the defeatured result).
Exceptions
Erroron failure.
See also
occtl_topo_remove_features

◆ remove_occurrence()

void occtl::Graph::remove_occurrence ( const RefId theOccurrenceRef)
inline

Removes an occurrence reference from the graph.

Exceptions
Errorwith code OCCTL_NOT_FOUND or OCCTL_WRONG_KIND.
See also
occtl_topo_remove_occurrence

◆ remove_ref()

void occtl::Graph::remove_ref ( const RefId theRefId)
inline

Removes a reference entry by its RefId.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theRefId is invalid or already removed.
See also
occtl_topo_remove_ref

◆ remove_rep()

void occtl::Graph::remove_rep ( const RepId theRepId)
inline

Removes a representation entry by its RepId.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theRepId is invalid or already removed.
See also
occtl_topo_remove_rep

◆ remove_subgraph()

void occtl::Graph::remove_subgraph ( const NodeId  theId)
inline

Recursively removes a node and its entire subgraph.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theId is invalid or already removed.

◆ remove_with_replacement()

void occtl::Graph::remove_with_replacement ( const NodeId  theNode,
const NodeId  theReplacement 
)
inline

Removes a node and reparents children to a replacement.

Exceptions
Errorwith code OCCTL_NOT_FOUND when either ID is invalid or removed.
See also
occtl_topo_remove_with_replacement

◆ rep_id_from_rep_uid()

RepId occtl::Graph::rep_id_from_rep_uid ( const RepUID  theUid) const
inline

Resolves a persistent RepUID to its current RepId.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theUid refers to a removed rep or is all-zero.

◆ rep_id_kind()

::occtl_rep_kind_t occtl::Graph::rep_id_kind ( const RepId  theId) const
inline

Returns the kind of a rep ID.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theId is invalid or the rep has been removed.

◆ rep_uid_from_rep_id()

RepUID occtl::Graph::rep_uid_from_rep_id ( const RepId  theId) const
inline

Returns the persistent RepUID for a RepId.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theId is invalid or the rep has been removed.

◆ replace_coedge_pcurve()

void occtl::Graph::replace_coedge_pcurve ( const NodeId  theCoedge,
const ::occtl_rep_id_t  thePcurveId 
)
inline

Replaces a coedge's pcurve.

See also
occtl_topo_replace_coedge_pcurve

◆ replace_edge_curve()

void occtl::Graph::replace_edge_curve ( const NodeId  theEdge,
const ::occtl_rep_id_t  theCurveId 
)
inline

Replaces an edge's 3D curve.

See also
occtl_topo_replace_edge_curve

◆ replace_face_surface()

void occtl::Graph::replace_face_surface ( const NodeId  theFace,
const ::occtl_rep_id_t  theSurfaceId 
)
inline

Replaces a face's surface.

See also
occtl_topo_replace_face_surface

◆ section_by_planes()

std::pair< Graph, NodeId > occtl::Graph::section_by_planes ( const ::occtl_topo_section_by_planes_options_t theOpts) const
inline

Sections a shape by one or more planes.

Parameters
theOptsRoot and section plane options.
Returns
A pair of (new Graph, root NodeId of the section result).
Exceptions
Erroron failure (invalid argument, version mismatch, not found, or geometric failure).
See also
occtl_topo_section_by_planes

◆ select()

SelectIter occtl::Graph::select ( const SelectOptions theOptions)
inline

Selects graph nodes matching theOptions.

See also
occtl_select_iter_create

◆ select_groups()

SelectGroupIter occtl::Graph::select_groups ( const SelectOptions theSelectOptions,
const SelectGroupOptions theGroupOptions 
)
inline

Groups selected graph nodes matching theSelectOptions by theGroupOptions.

See also
occtl_select_group_iter_create

◆ select_tagged()

SelectIter occtl::Graph::select_tagged ( const SelectOptions theOptions,
const char *const  theTag,
const size_t  theTagLen 
)
inline

Selects graph nodes matching theOptions and carrying theTag.

See also
occtl_select_tagged_iter_create

◆ set_coedge_param_range()

void occtl::Graph::set_coedge_param_range ( const NodeId  theCoedge,
const double  theFirst,
const double  theLast 
)
inline

Sets the parametric range of a coedge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.
See also
occtl_topo_set_coedge_param_range

◆ set_coedge_uv_box()

void occtl::Graph::set_coedge_uv_box ( const NodeId  theCoedge,
const ::occtl_point2_t theUvLo,
const ::occtl_point2_t theUvHi 
)
inline

Sets the UV box of a coedge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theCoedge is invalid, removed, or not a coedge.
See also
occtl_topo_set_coedge_uv_box

◆ set_edge_end_vertex()

void occtl::Graph::set_edge_end_vertex ( const NodeId  theEdge,
const NodeId  theVertex 
)
inline

Rebinds an edge's end vertex to a different vertex.

Exceptions
Errorwith code OCCTL_NOT_FOUND or OCCTL_WRONG_KIND.
See also
occtl_topo_set_edge_end_vertex

◆ set_edge_is_closed()

void occtl::Graph::set_edge_is_closed ( const NodeId  theEdge,
const bool  theFlag 
)
inline

Sets the is-closed flag on an edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.
See also
occtl_topo_set_edge_is_closed

◆ set_edge_is_degenerate()

void occtl::Graph::set_edge_is_degenerate ( const NodeId  theEdge,
const bool  theFlag 
)
inline

Sets the is-degenerate flag on an edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.
See also
occtl_topo_set_edge_is_degenerate

◆ set_edge_param_range()

void occtl::Graph::set_edge_param_range ( const NodeId  theEdge,
const double  theFirst,
const double  theLast 
)
inline

Sets the parametric range of an edge's 3D curve.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.
See also
occtl_topo_set_edge_param_range

◆ set_edge_same_parameter()

void occtl::Graph::set_edge_same_parameter ( const NodeId  theEdge,
const bool  theFlag 
)
inline

Sets the same-parameter flag on an edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.
See also
occtl_topo_set_edge_same_parameter

◆ set_edge_same_range()

void occtl::Graph::set_edge_same_range ( const NodeId  theEdge,
const bool  theFlag 
)
inline

Sets the same-range flag on an edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.
See also
occtl_topo_set_edge_same_range

◆ set_edge_start_vertex()

void occtl::Graph::set_edge_start_vertex ( const NodeId  theEdge,
const NodeId  theVertex 
)
inline

Rebinds an edge's start vertex to a different vertex.

Exceptions
Errorwith code OCCTL_NOT_FOUND or OCCTL_WRONG_KIND.
See also
occtl_topo_set_edge_start_vertex

◆ set_edge_tolerance()

void occtl::Graph::set_edge_tolerance ( const NodeId  theEdge,
const double  theTol 
)
inline

Sets the tolerance of an edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theEdge is invalid, removed, or not an edge.
See also
occtl_topo_set_edge_tolerance

◆ set_face_natural_restriction()

void occtl::Graph::set_face_natural_restriction ( const NodeId  theFace,
const bool  theFlag 
)
inline

Sets the natural-restriction flag on a face.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face.
See also
occtl_topo_set_face_natural_restriction

◆ set_face_tolerance()

void occtl::Graph::set_face_tolerance ( const NodeId  theFace,
const double  theTol 
)
inline

Sets the tolerance of a face.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theFace is invalid, removed, or not a face.
See also
occtl_topo_set_face_tolerance

◆ set_ref_location()

void occtl::Graph::set_ref_location ( const RefId theRefId,
const ::occtl_transform_t theTransform 
)
inline

Sets the local location of a reference entry.

Exceptions
Errorwith code OCCTL_NOT_FOUND or OCCTL_WRONG_KIND.
See also
occtl_topo_set_ref_location

◆ set_ref_orientation()

void occtl::Graph::set_ref_orientation ( const RefId theRefId,
const Orientation  theOrientation 
)
inline

Sets the orientation of a reference entry.

Exceptions
Errorwith code OCCTL_NOT_FOUND or OCCTL_WRONG_KIND.
See also
occtl_topo_set_ref_orientation

◆ set_shell_is_closed()

void occtl::Graph::set_shell_is_closed ( const NodeId  theShell,
const bool  theFlag 
)
inline

Sets the is-closed flag on a shell.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theShell is invalid, removed, or not a shell.
See also
occtl_topo_set_shell_is_closed

◆ set_vertex_point()

void occtl::Graph::set_vertex_point ( const NodeId  theVertex,
const ::occtl_point3_t thePoint 
)
inline

Sets the 3D point of a vertex.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theVertex is invalid, removed, or not a vertex.
See also
occtl_topo_set_vertex_point

◆ set_vertex_tolerance()

void occtl::Graph::set_vertex_tolerance ( const NodeId  theVertex,
const double  theTol 
)
inline

Sets the tolerance of a vertex.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theVertex is invalid, removed, or not a vertex.
See also
occtl_topo_set_vertex_tolerance

◆ set_wire_is_closed()

void occtl::Graph::set_wire_is_closed ( const NodeId  theWire,
const bool  theFlag 
)
inline

Sets the is-closed flag on a wire.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theWire is invalid, removed, or not a wire.
See also
occtl_topo_set_wire_is_closed

◆ set_wire_ref_is_outer()

void occtl::Graph::set_wire_ref_is_outer ( const RefId theRefId,
const bool  theFlag 
)
inline

Sets the IsOuter flag on a wire reference.

Exceptions
Errorwith code OCCTL_NOT_FOUND or OCCTL_WRONG_KIND.
See also
occtl_topo_set_wire_ref_is_outer

◆ shell_add_face()

void occtl::Graph::shell_add_face ( const NodeId  theShell,
const NodeId  theFace,
const ::occtl_orientation_t  theOrientation 
)
inline

Adds a face to a shell with the given orientation.

See also
occtl_topo_shell_add_face

◆ shell_face_count()

uint32_t occtl::Graph::shell_face_count ( const NodeId  theShell) const
inline

Returns the number of faces in a shell.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theShell is invalid, removed, or not a shell.

◆ shell_is_closed()

bool occtl::Graph::shell_is_closed ( const NodeId  theShell) const
inline

Returns whether a shell is topologically closed (watertight).

Exceptions
Errorwith code OCCTL_NOT_FOUND when theShell is invalid, removed, or not a shell.

◆ shell_remove_face()

void occtl::Graph::shell_remove_face ( const NodeId  theShell,
const NodeId  theFace 
)
inline

Removes a face from a shell (the face definition remains in the graph).

See also
occtl_topo_shell_remove_face

◆ shell_view()

void occtl::Graph::shell_view ( const NodeId  theShell,
::occtl_shell_view_t theView 
) const
inline

Fills theView with the current scalar state of theShell.

Exceptions
Erroron failure (invalid argument, not found, wrong kind, or version mismatch).
See also
occtl_topo_shell_view

◆ solid_add_shell()

void occtl::Graph::solid_add_shell ( const NodeId  theSolid,
const NodeId  theShell,
const ::occtl_orientation_t  theOrientation 
)
inline

Adds a shell to a solid with the given orientation.

See also
occtl_topo_solid_add_shell

◆ solid_remove_shell()

void occtl::Graph::solid_remove_shell ( const NodeId  theSolid,
const NodeId  theShell 
)
inline

Removes a shell from a solid (the shell definition remains in the graph).

See also
occtl_topo_solid_remove_shell

◆ solid_shell_count()

uint32_t occtl::Graph::solid_shell_count ( const NodeId  theSolid) const
inline

Returns the number of shells in a solid.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theSolid is invalid, removed, or not a solid.

◆ solid_view()

void occtl::Graph::solid_view ( const NodeId  theSolid,
::occtl_solid_view_t theView 
) const
inline

Fills theView with the current scalar state of theSolid.

Exceptions
Erroron failure (invalid argument, not found, wrong kind, or version mismatch).
See also
occtl_topo_solid_view

◆ split_by_plane()

std::pair< Graph, NodeId > occtl::Graph::split_by_plane ( const ::occtl_topo_split_by_plane_options_t theOpts) const
inline

Splits a shape by a plane and returns selected side(s).

Parameters
theOptsRoot, plane, and side-selection options.
Returns
A pair of (new Graph, root NodeId of the split result).
Exceptions
Erroron failure (invalid argument, version mismatch, not found, or geometric failure).
See also
occtl_topo_split_by_plane

◆ tag_add()

void occtl::Graph::tag_add ( const NodeId  theTarget,
const char *const  theTag,
const size_t  theTagLen 
)
inline

Adds a UTF-8 tag to a target node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed.
See also
occtl_graph_tag_add

◆ tag_has()

bool occtl::Graph::tag_has ( const NodeId  theTarget,
const char *const  theTag,
const size_t  theTagLen 
) const
inline

Tests whether a target node carries a UTF-8 tag.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed.
See also
occtl_graph_tag_has

◆ tag_list()

std::vector< std::string > occtl::Graph::tag_list ( const NodeId  theTarget) const
inline

Lists UTF-8 tags stored on a target node.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed.
See also
occtl_graph_tag_list

◆ tag_nodes()

std::vector< NodeId > occtl::Graph::tag_nodes ( const char *const  theTag = nullptr,
const size_t  theTagLen = 0 
) const
inline

Lists nodes that have tags, optionally filtered by exact tag.

See also
occtl_graph_tag_nodes

◆ tag_remove()

void occtl::Graph::tag_remove ( const NodeId  theTarget,
const char *const  theTag,
const size_t  theTagLen 
)
inline

Removes a UTF-8 tag from a target node. Idempotent.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theTarget is invalid or removed.
See also
occtl_graph_tag_remove

◆ touches()

TouchIter occtl::Graph::touches ( const NodeId  theNodeA,
const NodeId  theNodeB,
const RelationOptions *const  theOptions = nullptr 
) const
inline

Returns contact solutions between two graph nodes.

Exceptions
Erroron failure (invalid argument, node not found, or invalid geometry).

◆ transformed()

std::pair< Graph, NodeId > occtl::Graph::transformed ( const NodeId  theRoot,
const Transform theTransform 
) const
inline

Creates a transformed copy of the shape rooted at theRoot.

Exceptions
Erroron failure.
See also
occtl_topo_transformed

◆ uid_from_node_id()

UID occtl::Graph::uid_from_node_id ( const NodeId  theId) const
inline

Returns the persistent UID for a NodeId.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theId is invalid or the node has been removed.

◆ uid_kind()

::occtl_node_kind_t occtl::Graph::uid_kind ( const UID  theUid) const
inline

Returns the kind embedded in a UID.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theUid is invalid or the entity has been removed.

◆ vertex_edge_count()

uint32_t occtl::Graph::vertex_edge_count ( const NodeId  theVertex) const
inline

Returns the number of edges that reference a vertex.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theVertex is invalid, removed, or not a vertex.

◆ vertex_parameter()

double occtl::Graph::vertex_parameter ( const NodeId  theVertex,
const NodeId  theEdge 
) const
inline

Returns the parameter of a vertex on an edge.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theVertex or theEdge is invalid, removed, or wrong kind.

◆ vertex_parameters()

Point2 occtl::Graph::vertex_parameters ( const NodeId  theVertex,
const NodeId  theFace 
) const
inline

Returns the UV parameters of a vertex on a face.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theVertex or theFace is invalid, removed, or wrong kind.

◆ vertex_pcurve_parameter()

double occtl::Graph::vertex_pcurve_parameter ( const NodeId  theVertex,
const NodeId  theCoedge 
) const
inline

Returns the 2D parameter of a vertex on a coedge's pcurve.

See also
occtl_topo_vertex_pcurve_parameter

◆ vertex_point()

Point3 occtl::Graph::vertex_point ( const NodeId  theVertex) const
inline

Returns the 3D point of a vertex.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theVertex is invalid, removed, or not a vertex.

◆ vertex_point_in_usage()

::occtl_point3_t occtl::Graph::vertex_point_in_usage ( const NodeId  theVertex,
const NodeId  theParent 
) const
inline

Returns the vertex point with a parent's accumulated Location applied.

See also
occtl_topo_vertex_point_in_usage

◆ vertex_tolerance()

double occtl::Graph::vertex_tolerance ( const NodeId  theVertex) const
inline

Returns the tolerance of a vertex.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theVertex is invalid, removed, or not a vertex.

◆ vertex_view()

void occtl::Graph::vertex_view ( const NodeId  theVertex,
::occtl_vertex_view_t theView 
) const
inline

Fills theView with the current scalar state of theVertex.

Exceptions
Erroron failure (invalid argument, not found, wrong kind, or version mismatch).
See also
occtl_topo_vertex_view

◆ wire_chamfer_2d()

NodeId occtl::Graph::wire_chamfer_2d ( const WireChamfer2dOptions theOptions)
inline

Chamfers corners of a planar wire and inserts the result into this graph.

Exceptions
Erroron failure (invalid argument, wire not found, wrong kind, or OCCT failure).

◆ wire_coedge_count()

uint32_t occtl::Graph::wire_coedge_count ( const NodeId  theWire) const
inline

Returns the number of coedges in a wire.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theWire is invalid, removed, or not a wire.

◆ wire_distinct_edge_count()

uint32_t occtl::Graph::wire_distinct_edge_count ( const NodeId  theWire) const
inline

Returns the number of distinct edges in a wire.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theWire is invalid, removed, or not a wire.

◆ wire_edge_count()

uint32_t occtl::Graph::wire_edge_count ( const NodeId  theWire) const
inline

Returns the number of edges in a wire.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theWire is invalid, removed, or not a wire.

◆ wire_explorer()

NodeIter occtl::Graph::wire_explorer ( const NodeId  theWire) const
inline

Creates a wire explorer that visits coedges in geometric traversal order.

Exceptions
Erroron failure (invalid argument, wire not found, or wrong kind).

◆ wire_face_of()

NodeId occtl::Graph::wire_face_of ( const NodeId  theWire) const
inline

Returns the face a wire belongs to.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theWire is invalid, removed, or not a wire.

◆ wire_fix_degenerate_edges()

size_t occtl::Graph::wire_fix_degenerate_edges ( const WireFixDegenerateEdgesOptions theOptions)
inline

Removes degenerate edge usages from a wire in place.

Returns
Number of detached coedge usages.
Exceptions
Erroron failure (invalid argument, wire not found, or wrong kind).

◆ wire_is_closed()

bool occtl::Graph::wire_is_closed ( const NodeId  theWire) const
inline

Returns whether a wire is topologically closed.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theWire is invalid, removed, or not a wire.

◆ wire_is_outer()

bool occtl::Graph::wire_is_outer ( const NodeId  theWire) const
inline

Returns whether a wire is the outer wire of its parent face.

Exceptions
Errorwith code OCCTL_NOT_FOUND when theWire is invalid, removed, or not a wire.

◆ wire_offset_2d()

NodeId occtl::Graph::wire_offset_2d ( const WireOffset2dOptions theOptions)
inline

Creates a planar offset wire in this graph.

Exceptions
Erroron failure (invalid argument, wire not found, wrong kind, or OCCT failure).

◆ wire_order_edges()

std::vector< OrientedNode > occtl::Graph::wire_order_edges ( const NodeId  theWire) const
inline

Returns wire edges in endpoint-chaining order with coedge orientation.

Exceptions
Erroron failure (invalid argument, wire not found, wrong kind, or buffer error).

◆ wire_view()

void occtl::Graph::wire_view ( const NodeId  theWire,
::occtl_wire_view_t theView 
) const
inline

Fills theView with the current scalar state of theWire.

Exceptions
Erroron failure (invalid argument, not found, wrong kind, or version mismatch).
See also
occtl_topo_wire_view

◆ wrap_on_face()

std::pair< Graph, NodeId > occtl::Graph::wrap_on_face ( const ::occtl_topo_wrap_on_face_options_t theOpts) const
inline

Wraps a planar edge, wire, or face onto a target face.

Exceptions
Erroron failure.
See also
occtl_topo_wrap_on_face

The documentation for this class was generated from the following file: