Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
BRepGraph::EditorView::EdgeOps Class Reference

Edge creation and editing operations. More...

#include <BRepGraph_EditorView.hxx>

Public Member Functions

BRepGraph_EdgeId Add (const BRepGraph_VertexId theStartVtx, const BRepGraph_VertexId theEndVtx, const occ::handle< Geom_Curve > &theCurve, const double theFirst, const double theLast, const double theTolerance)
 Add an edge definition to the graph.
void Split (const BRepGraph_EdgeId theEdgeEntity, const BRepGraph_VertexId theSplitVertex, const double theSplitParam, BRepGraph_EdgeId &theSubA, BRepGraph_EdgeId &theSubB)
 Split a single edge definition at a vertex and 3D-curve parameter. Creates two new EdgeDef slots, splits all PCurve nodes at the corresponding 2D parameter, and updates every wire that contained the original edge.
bool RemoveVertex (const BRepGraph_EdgeId theChildEdgeId, const BRepGraph_VertexRefId theVertexRefId)
 Detach one exact edge-owned vertex ref from an edge definition. Supports only the persisted boundary slots (StartVertexRefId / EndVertexRefId). Supplemental direct-vertex usages are stored in BRepGraph_LayerTopoSupplement and are not removed through this API.
BRepGraph_VertexRefId ReplaceVertex (const BRepGraph_EdgeId theChildEdgeId, const BRepGraph_VertexRefId theOldVertexRefId, const BRepGraph_VertexId theNewChildVertexId)
 Remap one edge-owned vertex reference to point at a different vertex definition, preserving the existing orientation and local location. Intended for boundary-vertex substitution without a full edge rebuild (e.g. stitching shared endpoints after a ShapeFix pass).
BRepGraph_MutGuard< BRepGraphInc::EdgeDef > Mut (const BRepGraph_EdgeId theEdge)
 Return scoped mutable edge definition guard.
void Reverse (const BRepGraph_EdgeId theEdge)
 Reverse the edge: swap StartVertexRefId and EndVertexRefId. Used by healing/sewing when a caller wants the edge's boundary order flipped. Does not alter the parametric range (callers needing reparametrization should follow up with SetParamRange).
void SetTolerance (const BRepGraph_EdgeId theEdge, double theTolerance)
 Set the tolerance of an edge definition and fire immediate notification.
void SetTolerance (BRepGraph_MutGuard< BRepGraphInc::EdgeDef > &theMut, double theTolerance)
 Set the tolerance of an edge definition inside a batched mutation scope.
void SetParamRange (const BRepGraph_EdgeId theEdge, const double theFirst, const double theLast)
 Set the parametric range of an edge definition.
void SetParamRange (BRepGraph_MutGuard< BRepGraphInc::EdgeDef > &theMut, const double theFirst, const double theLast)
void SetCurve (const BRepGraph_EdgeId theEdge, const occ::handle< Geom_Curve > &theCurve, const double theFirst, const double theLast)
 Set the 3D curve on an edge. Creates an owned EdgeCurve3DRep record and an associated Curve3DRep for edge geometry access.
void ClearCurve (const BRepGraph_EdgeId theEdge)
 Clear the 3D curve on an edge. Removes the owned use record binding.
void SetPersistentPolygon3D (const BRepGraph_EdgeId theEdge, const occ::handle< Poly_Polygon3D > &thePolygon)
 Set the persistent 3D polygon on an edge. Creates an owned EdgePolygon3DRep record.
void ClearPersistentPolygon3D (const BRepGraph_EdgeId theEdge)
 Clear the persistent 3D polygon on an edge.
void SetStartVertexRefId (const BRepGraph_EdgeId theEdge, const BRepGraph_VertexRefId theVertexRef)
 Set the start vertex-ref id and rebind the vertex-to-edge relation.
void SetStartVertexRefId (BRepGraph_MutGuard< BRepGraphInc::EdgeDef > &theMut, const BRepGraph_VertexRefId theVertexRef)
void SetEndVertexRefId (const BRepGraph_EdgeId theEdge, const BRepGraph_VertexRefId theVertexRef)
 Set the end vertex-ref id and rebind the vertex-to-edge relation.
void SetEndVertexRefId (BRepGraph_MutGuard< BRepGraphInc::EdgeDef > &theMut, const BRepGraph_VertexRefId theVertexRef)

Detailed Description

Edge creation and editing operations.

Member Function Documentation

◆ Add()

BRepGraph_EdgeId BRepGraph::EditorView::EdgeOps::Add ( const BRepGraph_VertexId theStartVtx,
const BRepGraph_VertexId theEndVtx,
const occ::handle< Geom_Curve > & theCurve,
const double theFirst,
const double theLast,
const double theTolerance )
nodiscard

Add an edge definition to the graph.

Parameters
[in]theStartVtxtyped start vertex definition identifier
[in]theEndVtxtyped end vertex definition identifier
[in]theCurve3D curve (may be null for degenerate edges)
[in]theFirstfirst curve parameter
[in]theLastlast curve parameter
[in]theToleranceedge tolerance
Returns
typed edge definition identifier, or invalid if either referenced vertex id is out of range or removed

◆ ClearCurve()

void BRepGraph::EditorView::EdgeOps::ClearCurve ( const BRepGraph_EdgeId theEdge)

Clear the 3D curve on an edge. Removes the owned use record binding.

Parameters
[in]theEdgeedge definition identifier

◆ ClearPersistentPolygon3D()

void BRepGraph::EditorView::EdgeOps::ClearPersistentPolygon3D ( const BRepGraph_EdgeId theEdge)

Clear the persistent 3D polygon on an edge.

Parameters
[in]theEdgeedge definition identifier

◆ Mut()

BRepGraph_MutGuard< BRepGraphInc::EdgeDef > BRepGraph::EditorView::EdgeOps::Mut ( const BRepGraph_EdgeId theEdge)
nodiscard

Return scoped mutable edge definition guard.

◆ RemoveVertex()

bool BRepGraph::EditorView::EdgeOps::RemoveVertex ( const BRepGraph_EdgeId theChildEdgeId,
const BRepGraph_VertexRefId theVertexRefId )
nodiscard

Detach one exact edge-owned vertex ref from an edge definition. Supports only the persisted boundary slots (StartVertexRefId / EndVertexRefId). Supplemental direct-vertex usages are stored in BRepGraph_LayerTopoSupplement and are not removed through this API.

Parameters
[in]theChildEdgeIdedge definition identifier
[in]theVertexRefIdexact edge-owned vertex reference identifier
Returns
true if the active edge-owned usage was removed

◆ ReplaceVertex()

BRepGraph_VertexRefId BRepGraph::EditorView::EdgeOps::ReplaceVertex ( const BRepGraph_EdgeId theChildEdgeId,
const BRepGraph_VertexRefId theOldVertexRefId,
const BRepGraph_VertexId theNewChildVertexId )
nodiscard

Remap one edge-owned vertex reference to point at a different vertex definition, preserving the existing orientation and local location. Intended for boundary-vertex substitution without a full edge rebuild (e.g. stitching shared endpoints after a ShapeFix pass).

Parameters
[in]theChildEdgeIdedge owning the vertex reference
[in]theOldVertexRefIdexact boundary vertex reference to remap
[in]theNewChildVertexIdreplacement vertex definition
Returns
typed id of the newly created vertex reference, or invalid if any input was inactive or the old ref did not belong to this edge

◆ Reverse()

void BRepGraph::EditorView::EdgeOps::Reverse ( const BRepGraph_EdgeId theEdge)

Reverse the edge: swap StartVertexRefId and EndVertexRefId. Used by healing/sewing when a caller wants the edge's boundary order flipped. Does not alter the parametric range (callers needing reparametrization should follow up with SetParamRange).

Parameters
[in]theEdgeedge definition identifier

◆ SetCurve()

void BRepGraph::EditorView::EdgeOps::SetCurve ( const BRepGraph_EdgeId theEdge,
const occ::handle< Geom_Curve > & theCurve,
const double theFirst,
const double theLast )

Set the 3D curve on an edge. Creates an owned EdgeCurve3DRep record and an associated Curve3DRep for edge geometry access.

Parameters
[in]theEdgeedge definition identifier
[in]theCurve3D curve geometry (must not be null)
[in]theFirstfirst curve parameter
[in]theLastlast curve parameter

◆ SetEndVertexRefId() [1/2]

void BRepGraph::EditorView::EdgeOps::SetEndVertexRefId ( BRepGraph_MutGuard< BRepGraphInc::EdgeDef > & theMut,
const BRepGraph_VertexRefId theVertexRef )

◆ SetEndVertexRefId() [2/2]

void BRepGraph::EditorView::EdgeOps::SetEndVertexRefId ( const BRepGraph_EdgeId theEdge,
const BRepGraph_VertexRefId theVertexRef )

Set the end vertex-ref id and rebind the vertex-to-edge relation.

◆ SetParamRange() [1/2]

void BRepGraph::EditorView::EdgeOps::SetParamRange ( BRepGraph_MutGuard< BRepGraphInc::EdgeDef > & theMut,
const double theFirst,
const double theLast )

◆ SetParamRange() [2/2]

void BRepGraph::EditorView::EdgeOps::SetParamRange ( const BRepGraph_EdgeId theEdge,
const double theFirst,
const double theLast )

Set the parametric range of an edge definition.

◆ SetPersistentPolygon3D()

void BRepGraph::EditorView::EdgeOps::SetPersistentPolygon3D ( const BRepGraph_EdgeId theEdge,
const occ::handle< Poly_Polygon3D > & thePolygon )

Set the persistent 3D polygon on an edge. Creates an owned EdgePolygon3DRep record.

Parameters
[in]theEdgeedge definition identifier
[in]thePolygon3D polygon (must not be null)

◆ SetStartVertexRefId() [1/2]

void BRepGraph::EditorView::EdgeOps::SetStartVertexRefId ( BRepGraph_MutGuard< BRepGraphInc::EdgeDef > & theMut,
const BRepGraph_VertexRefId theVertexRef )

◆ SetStartVertexRefId() [2/2]

void BRepGraph::EditorView::EdgeOps::SetStartVertexRefId ( const BRepGraph_EdgeId theEdge,
const BRepGraph_VertexRefId theVertexRef )

Set the start vertex-ref id and rebind the vertex-to-edge relation.

◆ SetTolerance() [1/2]

void BRepGraph::EditorView::EdgeOps::SetTolerance ( BRepGraph_MutGuard< BRepGraphInc::EdgeDef > & theMut,
double theTolerance )

Set the tolerance of an edge definition inside a batched mutation scope.

Parameters
[in]theMutactive mutable edge guard
[in]theTolerancenew tolerance value

◆ SetTolerance() [2/2]

void BRepGraph::EditorView::EdgeOps::SetTolerance ( const BRepGraph_EdgeId theEdge,
double theTolerance )

Set the tolerance of an edge definition and fire immediate notification.

Parameters
[in]theEdgetyped edge definition identifier
[in]theTolerancenew tolerance value

◆ Split()

void BRepGraph::EditorView::EdgeOps::Split ( const BRepGraph_EdgeId theEdgeEntity,
const BRepGraph_VertexId theSplitVertex,
const double theSplitParam,
BRepGraph_EdgeId & theSubA,
BRepGraph_EdgeId & theSubB )

Split a single edge definition at a vertex and 3D-curve parameter. Creates two new EdgeDef slots, splits all PCurve nodes at the corresponding 2D parameter, and updates every wire that contained the original edge.

Parameters
[in]theEdgeEntityedge to split (must not be degenerate)
[in]theSplitVertexvertex definition at the split point (already in graph)
[in]theSplitParamparameter on the 3D curve at the split point
[out]theSubAsub-edge: StartVertex -> SplitVertex
[out]theSubBsub-edge: SplitVertex -> EndVertex

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