Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Static Public Member Functions
BRepGraph_Copy Class Reference

Graph-to-graph deep copy. More...

#include <BRepGraph_Copy.hxx>

Static Public Member Functions

static BRepGraph Perform (const BRepGraph &theGraph, const bool theCopyGeom=true)
 Copy the entire graph.
 
static BRepGraph CopyNode (const BRepGraph &theGraph, const BRepGraph_NodeId theNodeId, const bool theCopyGeom=true, const bool theCopyMesh=true, const bool theReserveCache=false)
 Copy a single node sub-graph of any kind (Face, Shell, Solid, Wire, Edge, Vertex, etc.). The new graph contains only the specified node and all entities it references.
 

Detailed Description

Graph-to-graph deep copy.

Produces a new BRepGraph from an existing one in a single bottom-up pass, avoiding the 5-7 traversals of BRepTools_Modifier used by BRepBuilderAPI_Copy.

Two modes:

Note
Unlike in-place mutation algorithms (Sewing, Deduplicate) which return a Result struct with diagnostics, Copy and Transform return a BRepGraph directly because they produce new graphs. Check IsDone() on the returned graph for success.

Typical usage

TopoDS_Shape aShape = aCopy.Shapes().Shape();
static Result Add(BRepGraph &theGraph, const TopoDS_Shape &theShape)
Ingest a TopoDS_Shape as a new root subgraph, wrapping the topology root in a Product.
static BRepGraph Perform(const BRepGraph &theGraph, const bool theCopyGeom=true)
Copy the entire graph.
Topology-geometry graph over TopoDS / BRep.
Definition BRepGraph.hxx:124
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142
Describes a shape which.
Definition TopoDS_Shape.hxx:41

Member Function Documentation

◆ CopyNode()

static BRepGraph BRepGraph_Copy::CopyNode ( const BRepGraph & theGraph,
const BRepGraph_NodeId theNodeId,
const bool theCopyGeom = true,
const bool theCopyMesh = true,
const bool theReserveCache = false )
static

Copy a single node sub-graph of any kind (Face, Shell, Solid, Wire, Edge, Vertex, etc.). The new graph contains only the specified node and all entities it references.

Parameters
[in]theGrapha pre-built BRepGraph
[in]theNodeIdnode identifier (any kind)
[in]theCopyGeomif true, geometry handles are deep-copied
[in]theCopyMeshif true, cached mesh entries are propagated to the result; if false, mesh references are dropped on copied faces
[in]theReserveCacheif true, pre-allocates transient cache
Returns
a new BRepGraph containing only the specified sub-graph

◆ Perform()

static BRepGraph BRepGraph_Copy::Perform ( const BRepGraph & theGraph,
const bool theCopyGeom = true )
static

Copy the entire graph.

Parameters
[in]theGrapha pre-built BRepGraph (must have IsDone() == true)
[in]theCopyGeomif true (default), geometry handles are deep-copied; if false, geometry is shared (only topology is duplicated)
Returns
a new BRepGraph with IsDone() == true on success, or an empty graph with IsDone() == false on failure

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