Computes a polygonal representation from a B-Rep one. More...
Public Types | |
typedef ModelAlgo_BRepMesherParameters | ParametersType |
Defines a mesher parameters type. | |
Public Member Functions | |
ModelAlgo_BRepMesher () | |
Constructor. | |
ModelAlgo_BRepMesher (const ModelAlgo_BRepMesherParameters &theParameters) | |
Constructor. | |
const ModelAlgo_BRepMesherParameters & | Parameters () const |
Returns parameters. | |
ModelAlgo_BRepMesherParameters & | Parameters () |
Returns parameters. | |
void | Compute (const ModelData_Model &theModel, bool theEnforceAddition=false) const |
Computes polygonal representations for all parts in the model. | |
void | Compute (const ModelData_SceneGraphElement &theElement, bool theEnforceAddition=false) const |
Computes polygonal representations for all parts under the graph element. | |
ModelData_PolyRepresentation | Compute (const ModelData_BRepRepresentation &theBRep, bool theComputeImmediately=true) const |
Computes polygonal representation for a B-Rep representation. | |
ModelData_PolyShapeList | Compute (const ModelData_Body &theBody) const |
Computes polygonal representation for a B-Rep body. | |
ModelData_PolyShapeList | Compute (const ModelData_Body &theBody, const ModelData_BRepRepresentation &theContext) const |
Computes polygonal representation for a B-Rep body. | |
ModelData_PolyShapeList | Compute (const ModelData_Body &theBody, std::shared_ptr< Mesh_SMDS > &theMeshDS) const |
Computes polygonal representation for a B-Rep body. | |
ModelData_PolyShapeList | Compute (const ModelData_Body &theBody, const ModelData_BRepRepresentation &theContext, std::shared_ptr< Mesh_SMDS > &theMeshDS) const |
Computes polygonal representation for a B-Rep body. | |
const ModelData_BRepToPolyAssociations & | BRepToPolyAssociations () const |
Returns ModelData_BRepToPolyAssociations object which contain associations between shapes and meshes. | |
Base_ProgressStatus & | ProgressStatus () const |
Returns a progress status. | |
const std::shared_ptr< internal::ModelAlgo_BRepMesherImpl > & | Impl () const |
Returns an implementation object. | |
Protected Attributes | |
std::shared_ptr< internal::ModelAlgo_BRepMesherImpl > | myImpl |
Internal implementation object. | |
Computes a polygonal representation from a B-Rep one.
A mesher can operate on an entire model, a subtree of a scene graph element, or a particular B-Rep body.
The mesher can generate either a visualization or a computational mesh depending on parameters specified in the ModelAlgo_BRepMesherParameters object set with the Parameters() method. By default, only a visualization mesh is generated.
The following examples demonstrate typical scenarios of using a mesher.
Example 1 - generation of polygonal representations using the visualization mesher for all the parts with B-Rep representation which do not have polygonal representation:
Example 2 - generation of a computational mesh for a particular body:
cadex::ModelAlgo_BRepMesher::ModelAlgo_BRepMesher | ( | ) |
Constructor.
Creates a visualization mesher with default parameters.
cadex::ModelAlgo_BRepMesher::ModelAlgo_BRepMesher | ( | const ModelAlgo_BRepMesherParameters & | theParameters | ) |
const ModelData_BRepToPolyAssociations & cadex::ModelAlgo_BRepMesher::BRepToPolyAssociations | ( | ) | const |
Returns ModelData_BRepToPolyAssociations object which contain associations between shapes and meshes.
If SaveBRepToPolyAssociations() parameter is set to true, then returns filled ModelData_BRepToPolyAssociations. Otherwise it will be empty.
__CADEX_PREVIEW_B_REP_TO_POLY_ASSOCIATIONS
to 1. As the API changes to accommodate the needs of users compatibility will be preserved as much as possible but is ultimately not guaranteed. ModelData_PolyShapeList cadex::ModelAlgo_BRepMesher::Compute | ( | const ModelData_Body & | theBody | ) | const |
Computes polygonal representation for a B-Rep body.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns a created list of vertex set.
Unlike the overloaded Compute() accepting ModelData_BRepRepresentation context this one only generates mesh geometry without colors and other attributes.
ModelData_PolyShapeList cadex::ModelAlgo_BRepMesher::Compute | ( | const ModelData_Body & | theBody, |
const ModelData_BRepRepresentation & | theContext | ||
) | const |
Computes polygonal representation for a B-Rep body.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
theContext specifies a B-Rep representation the body belongs to. This context information can be used to generate color and other attribute information registered in the context.
Returns a created list of vertex set.
ModelData_PolyShapeList cadex::ModelAlgo_BRepMesher::Compute | ( | const ModelData_Body & | theBody, |
const ModelData_BRepRepresentation & | theBRep, | ||
std::shared_ptr< Mesh_SMDS > & | theMeshDS | ||
) | const |
Computes polygonal representation for a B-Rep body.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This method should only be used when using a computational mesher and when the opaque object theMeshDS is used to further access Netgen-specific extensions.
theContext specifies a B-Rep representation the body belongs to. This context information can be used to generate color and other attribute information registered in the context.
Returns a created list of vertex set.
ModelData_PolyShapeList cadex::ModelAlgo_BRepMesher::Compute | ( | const ModelData_Body & | theBody, |
std::shared_ptr< Mesh_SMDS > & | theMeshDS | ||
) | const |
Computes polygonal representation for a B-Rep body.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
theContext specifies a B-Rep representation the body belongs to. This context information can be used to generate color and other attribute information registered in the context.
This method should only be used when using a computational mesher and when the opaque object theMeshDS is used to further access Netgen-specific extensions.
Returns a created list of vertex set.
ModelData_PolyRepresentation cadex::ModelAlgo_BRepMesher::Compute | ( | const ModelData_BRepRepresentation & | theBRep, |
bool | theComputeImmediately = true |
||
) | const |
Computes polygonal representation for a B-Rep representation.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns an object of ModelData_PolyRepresentation created with theBRep, Parameters() and theComputeImmediately. The method provided only for convenience.
void cadex::ModelAlgo_BRepMesher::Compute | ( | const ModelData_Model & | theModel, |
bool | theEnforceAddition = false |
||
) | const |
Computes polygonal representations for all parts in the model.
If a part has a B-Rep representation but does not have a polygonal one or if theEnforceAddition is true then the computed polygonal representation will be added to the part (via ModelData_BRepTriangulationProvider).
If theEnforceAddition is false and the part already has a polygonal representation then the part will be skipped.
void cadex::ModelAlgo_BRepMesher::Compute | ( | const ModelData_SceneGraphElement & | theElement, |
bool | theEnforceAddition = false |
||
) | const |
Computes polygonal representations for all parts under the graph element.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
If a part has a B-Rep representation but does not have a polygonal one or if theEnforceAddition is true then the computed polygonal representation will be added to the part (via ModelData_BRepTriangulationProvider).
If theEnforceAddition is false and the part already has a polygonal representation then the part will be skipped.