Product and assembly low-level reconstruction primitives. Wire two existing entities together; for shape ingestion use BRepGraph::ShapesView::Add().
More...
#include <BRepGraph_EditorView.hxx>
|
| BRepGraph_ProductId | Add (const BRepGraph_NodeId theShapeRoot, const TopLoc_Location &thePlacement=TopLoc_Location()) |
| | Create a Product wrapping an existing topology root via an Occurrence. The product is NOT added to document roots; call AppendDocumentRoot() explicitly when this Product is a document root.
|
| BRepGraph_ProductId | Add () |
| | Create an empty Product with no direct shape root; can later own child occurrences. The product is NOT added to document roots; call AppendDocumentRoot() explicitly when this Product is a document root.
|
| void | AppendDocumentRoot (const BRepGraph_ProductId theProductId) |
| | Add an active Product to document roots if it is not already listed.
|
| BRepGraph_OccurrenceId | Append (const BRepGraph_ProductId theParentProduct, const BRepGraph_ProductId theReferencedProduct, const TopLoc_Location &thePlacement, const BRepGraph_OccurrenceId theParentOccurrence=BRepGraph_OccurrenceId(), BRepGraph_OccurrenceRefId *theOutOccurrenceRefId=nullptr) |
| | Append two existing Products via a fresh Occurrence.
|
| NCollection_Array1< BRepGraph_OccurrenceRefId > | Append (const BRepGraph_ProductId theParentProduct, const NCollection_Array1< BRepGraph_ProductId > &theChildProducts, const NCollection_Array1< TopLoc_Location > &thePlacements) |
| | Batch-append multiple child products to a parent product via fresh Occurrences. Two-pass: validates all inputs first, then links all.
|
| bool | RemoveOccurrence (const BRepGraph_ProductId theProductDefId, const BRepGraph_OccurrenceRefId theOccurrenceRefId) |
| | Detach one exact occurrence ref from a product definition. Use BRepGraph_RefsOccurrenceOfProduct::CurrentId() when removing from a product iterator. The method removes the exact OccurrenceRef entry, erases it from the product's ordered ref sequence, updates relation tables, and prunes the occurrence subtree when it has no other active usages.
|
| bool | RemoveOccurrences (const BRepGraph_ProductId theProductId, const NCollection_Array1< BRepGraph_OccurrenceRefId > &theOccurrenceRefs) |
| | Batch-remove multiple occurrence refs from a product definition. All-or-nothing: validates all inputs first, then removes all.
|
| bool | RemoveShapeRoot (const BRepGraph_ProductId theProductDefId) |
| | Detach the scalar shape-root ownership from a product definition. If no other active product owns the same topology root afterward, the root subgraph is pruned as orphaned. The product loses its direct shape root; it is no longer a part, and it only remains an assembly if it still owns active child occurrences.
|
| BRepGraph_MutGuard< BRepGraphInc::ProductDef > | Mut (const BRepGraph_ProductId theProduct) |
| | Return scoped mutable product definition guard.
|
Product and assembly low-level reconstruction primitives. Wire two existing entities together; for shape ingestion use BRepGraph::ShapesView::Add().
◆ Add() [1/2]
Create an empty Product with no direct shape root; can later own child occurrences. The product is NOT added to document roots; call AppendDocumentRoot() explicitly when this Product is a document root.
- Returns
- typed product definition identifier
◆ Add() [2/2]
Create a Product wrapping an existing topology root via an Occurrence. The product is NOT added to document roots; call AppendDocumentRoot() explicitly when this Product is a document root.
- Parameters
-
| [in] | theShapeRoot | root topology NodeId for the part |
| [in] | thePlacement | local placement stored on the root OccurrenceRef |
- Returns
- typed product definition identifier, or invalid if the root is not an active topology definition node
◆ Append() [1/2]
Append two existing Products via a fresh Occurrence.
- Parameters
-
| [in] | theParentProduct | typed parent product identifier |
| [in] | theReferencedProduct | typed child product identifier being instantiated |
| [in] | thePlacement | local placement relative to parent |
| [in] | theParentOccurrence | optional placing occurrence (nested assembly chains) |
| [out] | theOutOccurrenceRefId | optional out: typed ref id of the inserted OccurrenceRef |
- Returns
- typed occurrence definition identifier, or invalid if the chain is not active
◆ Append() [2/2]
Batch-append multiple child products to a parent product via fresh Occurrences. Two-pass: validates all inputs first, then links all.
- Parameters
-
| [in] | theParentProduct | typed parent product identifier |
| [in] | theChildProducts | child product identifiers to instantiate |
| [in] | thePlacements | local placements per child (must match child count) |
- Returns
- array of created occurrence reference ids, empty on validation failure
◆ AppendDocumentRoot()
Add an active Product to document roots if it is not already listed.
◆ Mut()
Return scoped mutable product definition guard.
◆ RemoveOccurrence()
Detach one exact occurrence ref from a product definition. Use BRepGraph_RefsOccurrenceOfProduct::CurrentId() when removing from a product iterator. The method removes the exact OccurrenceRef entry, erases it from the product's ordered ref sequence, updates relation tables, and prunes the occurrence subtree when it has no other active usages.
- Parameters
-
| [in] | theProductDefId | product definition identifier |
| [in] | theOccurrenceRefId | exact product-owned occurrence reference identifier |
- Returns
- true if the active product-owned usage was removed
◆ RemoveOccurrences()
Batch-remove multiple occurrence refs from a product definition. All-or-nothing: validates all inputs first, then removes all.
- Parameters
-
| [in] | theProductId | product definition identifier |
| [in] | theOccurrenceRefs | occurrence reference identifiers to remove |
- Returns
- true if all refs were successfully removed
◆ RemoveShapeRoot()
| bool BRepGraph::EditorView::ProductOps::RemoveShapeRoot |
( |
const BRepGraph_ProductId | theProductDefId | ) |
|
|
nodiscard |
Detach the scalar shape-root ownership from a product definition. If no other active product owns the same topology root afterward, the root subgraph is pruned as orphaned. The product loses its direct shape root; it is no longer a part, and it only remains an assembly if it still owns active child occurrences.
- Parameters
-
| [in] | theProductDefId | product definition identifier |
- Returns
- true if an active shape root was detached
The documentation for this class was generated from the following file: