![]() |
Open CASCADE Technology Reference Manual 8.0.1
|
Graph-to-graph deep copy. More...
#include <BRepGraph_Copy.hxx>
Public Types | |
| enum class | GeomPolicy { Copy , Share , Drop } |
| Policy for handling geometry handles (Geom_Curve, Geom_Surface, Geom2d_Curve). More... | |
| enum class | MeshPolicy { Copy , Share , Drop } |
| Policy for handling mesh data (Poly_Triangulation, Poly_Polygon3D, Poly_PolygonOnTriangulation). More... | |
| enum class | CachePolicy { Drop , CopyFresh } |
| Policy for handling transient runtime cache services. More... | |
Public Member Functions | |
| BRepGraph_Copy ()=delete | |
Static Public Member Functions | |
| static bool | Perform (const BRepGraph &theSourceGraph, BRepGraph &theTargetGraph, GeomPolicy theGeomPolicy=GeomPolicy::Copy, MeshPolicy theMeshPolicy=MeshPolicy::Copy, CachePolicy theCachePolicy=CachePolicy::Drop) |
| Copy the entire source graph into the target graph. | |
| static BRepGraph_NodeId | CopyNode (const BRepGraph &theSourceGraph, BRepGraph &theTargetGraph, const BRepGraph_NodeId theNodeId, GeomPolicy theGeomPolicy=GeomPolicy::Copy, MeshPolicy theMeshPolicy=MeshPolicy::Copy, CachePolicy theCachePolicy=CachePolicy::Drop) |
| Copy a single node sub-graph of any kind (Face, Shell, Solid, Wire, Edge, Vertex, etc.). The target graph receives the specified node and all entities it references. | |
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 copy modes:
Geometry and mesh policies are controlled by the GeomPolicy and MeshPolicy enums.
|
strong |
|
strong |
Policy for handling geometry handles (Geom_Curve, Geom_Surface, Geom2d_Curve).
|
strong |
Policy for handling mesh data (Poly_Triangulation, Poly_Polygon3D, Poly_PolygonOnTriangulation).
| Enumerator | |
|---|---|
| Copy | Deep-clone mesh data; independent result. |
| Share | Reuse source mesh handle references; no cloning. |
| Drop | Discard all mesh data on copied entities. |
|
delete |
|
static |
Copy a single node sub-graph of any kind (Face, Shell, Solid, Wire, Edge, Vertex, etc.). The target graph receives the specified node and all entities it references.
External copy (theSourceGraph != theTargetGraph): New entities are appended to theTargetGraph. Entities already present in theTargetGraph are reused (not duplicated).
Self-copy (theSourceGraph == theTargetGraph): The specified sub-graph is duplicated with new entity IDs within the same graph. Shared dependencies (vertices, edges referenced from outside the sub-graph) are preserved as-is.
| [in] | theSourceGraph | a pre-built BRepGraph |
| [in,out] | theTargetGraph | destination graph (may already contain data) |
| [in] | theNodeId | node identifier (any kind) |
| [in] | theGeomPolicy | geometry handle policy (default: Copy) |
| [in] | theMeshPolicy | mesh data policy (default: Copy) |
|
static |
Copy the entire source graph into the target graph.
Self-copy (theSourceGraph == theTargetGraph): Identity no-op, returns true immediately.
External copy to empty target (theTargetGraph.IsEmpty()): Uses identity-mapped fast path (old index == new index).
External copy to non-empty target: Uses explicit mapping; IDs in theTargetGraph will differ from theSourceGraph. Entities from theSourceGraph are appended to theTargetGraph.
| [in] | theSourceGraph | a pre-built BRepGraph (must not be empty) |
| [in,out] | theTargetGraph | destination graph (may already contain data) |
| [in] | theGeomPolicy | geometry handle policy (default: Copy) |
| [in] | theMeshPolicy | mesh data policy (default: Copy) |