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

Compound creation and editing operations. More...

#include <BRepGraph_EditorView.hxx>

Public Member Functions

BRepGraph_CompoundId Add (const NCollection_Array1< BRepGraph_NodeId > &theChildEntities)
 Add a compound entity with ordered child usages.
BRepGraph_ChildRefId Append (const BRepGraph_CompoundId theCompoundEntity, const BRepGraph_NodeId theChildEntity, const BRepGraphInc::ParityOrientation theOri=TopAbs_FORWARD)
 Append a single child to an existing compound definition.
NCollection_Array1< BRepGraph_ChildRefId > Append (const BRepGraph_CompoundId theCompoundEntity, const NCollection_Array1< BRepGraph_NodeId > &theChildIds, const NCollection_Array1< BRepGraphInc::ParityOrientation > &theOrientations=NCollection_Array1< BRepGraphInc::ParityOrientation >())
 Batch-append multiple children to an existing compound definition. Two-pass: validates all inputs first, then links all.
bool RemoveChild (const BRepGraph_CompoundId theCompoundDefId, const BRepGraph_ChildRefId theChildRefId)
 Detach one exact child ref from a compound definition. Use BRepGraph_RefsChildOfParent::CurrentId() when removing from a compound iterator. The method removes the exact ChildRef entry, erases it from the compound's ordered ref sequence, updates relation tables, and prunes the child subtree when it has no other active usages.
bool RemoveChildren (const BRepGraph_CompoundId theCompoundId, const NCollection_Array1< BRepGraph_ChildRefId > &theChildRefs)
 Batch-remove multiple child refs from a compound definition. All-or-nothing: validates all inputs first, then removes all.
BRepGraph_MutGuard< BRepGraphInc::CompoundDef > Mut (const BRepGraph_CompoundId theCompound)
 Return scoped mutable compound definition guard.
void ReplaceChild (const BRepGraph_ChildRefId theChildRef, const BRepGraph_NodeId theNewChild)
 Replace the child node of an existing child reference in a compound. Delegates to Gen().SetChildRefChildNodeId().

Detailed Description

Compound creation and editing operations.

Member Function Documentation

◆ Add()

BRepGraph_CompoundId BRepGraph::EditorView::CompoundOps::Add ( const NCollection_Array1< BRepGraph_NodeId > & theChildEntities)
nodiscard

Add a compound entity with ordered child usages.

Parameters
[in]theChildEntitieschild node identifiers
Returns
typed compound definition identifier

◆ Append() [1/2]

BRepGraph_ChildRefId BRepGraph::EditorView::CompoundOps::Append ( const BRepGraph_CompoundId theCompoundEntity,
const BRepGraph_NodeId theChildEntity,
const BRepGraphInc::ParityOrientation theOri = TopAbs_FORWARD )
nodiscard

Append a single child to an existing compound definition.

Parameters
[in]theCompoundEntitytyped compound definition identifier
[in]theChildEntitytyped child topology definition identifier
[in]theOriorientation of the child in the compound
Returns
typed child reference identifier, or invalid if inputs are not active

◆ Append() [2/2]

NCollection_Array1< BRepGraph_ChildRefId > BRepGraph::EditorView::CompoundOps::Append ( const BRepGraph_CompoundId theCompoundEntity,
const NCollection_Array1< BRepGraph_NodeId > & theChildIds,
const NCollection_Array1< BRepGraphInc::ParityOrientation > & theOrientations = NCollection_Array1< BRepGraphInc::ParityOrientation >() )
nodiscard

Batch-append multiple children to an existing compound definition. Two-pass: validates all inputs first, then links all.

Parameters
[in]theCompoundEntitytyped compound definition identifier
[in]theChildIdschild node identifiers to append
[in]theOrientationsoptional parity orientations (empty = all FORWARD)
Returns
array of created child reference ids, empty on validation failure

◆ Mut()

BRepGraph_MutGuard< BRepGraphInc::CompoundDef > BRepGraph::EditorView::CompoundOps::Mut ( const BRepGraph_CompoundId theCompound)
nodiscard

Return scoped mutable compound definition guard.

◆ RemoveChild()

bool BRepGraph::EditorView::CompoundOps::RemoveChild ( const BRepGraph_CompoundId theCompoundDefId,
const BRepGraph_ChildRefId theChildRefId )
nodiscard

Detach one exact child ref from a compound definition. Use BRepGraph_RefsChildOfParent::CurrentId() when removing from a compound iterator. The method removes the exact ChildRef entry, erases it from the compound's ordered ref sequence, updates relation tables, and prunes the child subtree when it has no other active usages.

Parameters
[in]theCompoundDefIdcompound definition identifier
[in]theChildRefIdexact compound-owned child reference identifier
Returns
true if the active compound-owned usage was removed

◆ RemoveChildren()

bool BRepGraph::EditorView::CompoundOps::RemoveChildren ( const BRepGraph_CompoundId theCompoundId,
const NCollection_Array1< BRepGraph_ChildRefId > & theChildRefs )
nodiscard

Batch-remove multiple child refs from a compound definition. All-or-nothing: validates all inputs first, then removes all.

Parameters
[in]theCompoundIdcompound definition identifier
[in]theChildRefschild reference identifiers to remove
Returns
true if all refs were successfully removed

◆ ReplaceChild()

void BRepGraph::EditorView::CompoundOps::ReplaceChild ( const BRepGraph_ChildRefId theChildRef,
const BRepGraph_NodeId theNewChild )

Replace the child node of an existing child reference in a compound. Delegates to Gen().SetChildRefChildNodeId().

Parameters
[in]theChildReftyped child reference identifier
[in]theNewChildnew child node identifier

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