Converts between OCC shapes and CAD Exchanger data model. More...
#include <cadex/ModelData_ShapeConverter.hxx>
Static Public Member Functions | |
static ModelData_SceneGraphElement | Add (const TopoDS_Shape &theSource, ModelData_Model &theTarget, bool theBreakSharing=true) |
Adds the shape to model. | |
static ModelData_SceneGraphElement | Add (const TopoDS_Shape &theSource, ModelData_Assembly &theTarget, bool theBreakSharing=true) |
Adds the shape to assembly. | |
static ModelData_Shape | Convert (const TopoDS_Shape &theSource) |
Creates CAD Exchanger topological shape from OCC one. | |
static TopoDS_Shape | Convert (const ModelData_Model &theSource) |
Creates OCC shape from all parts with B-Rep representations in the model. | |
static TopoDS_Shape | Convert (const ModelData_SceneGraphElement &theSource) |
Creates OCC shape from all parts with B-Rep representations in the subtree. | |
Converts between OCC shapes and CAD Exchanger data model.
|
static |
Adds the shape to assembly.
This method can be used to convert input OCC shape to CAD Exchanger data model. Refer to the other overload for description of the mapping algorithm.
If theAssembly is null then initializes it on the fly.
theBreakSharing specifies if the part bodies must be deep-copied prior to adding.
|
static |
Adds the shape to model.
This method can be used to convert input OCC shape to CAD Exchanger data model. The algorithm will populate the model as follows:
If theModel is null then initializes it on the fly.
theBreakSharing specifies if the part bodies must be deep-copied prior to adding.
|
static |
Creates OCC shape from all parts with B-Rep representations in the model.
In the model contains a single part then creates a shape from its B-Rep representation. Otherwise creates a compound. Respects transformations that are attached to instances in the model.
|
static |
Creates OCC shape from all parts with B-Rep representations in the subtree.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
If the subtree contains a single part then creates a shape from its B-Rep representation. Otherwise creates a compound. Respects transformations that are attached to instances under theSource.
|
static |
Creates CAD Exchanger topological shape from OCC one.
Creates a result as follows:
If a homogeneous compound includes children which are instances of the same shape with different locations (see TopoDS_Shape::IsPartner()) then such a compound is converted to a body list, not a single body.