DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Expand DG Kernel ComponentsDG Kernel Components
Expand API ReferenceAPI Reference
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > Models > Entities > Geometry > Mesh > BRep to Mesh Conversion Search Documentation


Conversion of BRep Geometry Type to Mesh

Conversion of parametric geometries to Mesh type is performed during IEntity_DG.SetGeometryType("Mesh") and similar calls. Sometimes it is also performed automatically, for example in Booleam Operations, when one entity is parametric and the other one is mesh.

Conversion of parametric surfaces to mesh requires deviation parameter, which controls density of the generated mesh. DG Kernel View module performs this conversion automatically while creating presentations. The deviation in this case is calculated using the current view configuration and the object size. In case, when this conversion is performed in background, when there is no view or it is not accessible, the software uses some preset deviation. The information below describes a way to control this process.

The parametrs relevant to background conversion to mesh are stored in Core Context, which keeps view-independent parameters. The Core Context can be accessed via:

IGlobalAPI_KC.GetCoreContext(), which returns IDictionary_DG.

Call context.GetDouble("DeviationParametricToMeshConversionDefault") to obtain the default for the current version. Call context.SetDouble("DeviationParametricToMeshConversion", newDeviation) to modify the deviation. Increase the deviation to make ther resulting mesh coarser. Reduce the deviation to make the resulting mesh finer. It is suggested to tune in deviation in experiments. Often only order of magnitude makes a noticeable difference.

When there is a DG Kernel window is present in the current application, the conversion algorithm most often has a reference to the view and can use the automatic deviation used for presenting 3D objects. This is the default behaiviour. Call context.SetBool("UseViewDeviation", false) to force using only the DeviationParametricToMeshConversion parameter.  Any modification of DeviationParametricToMeshConversion parameter sets UseViewDeviation parameter to false. If required, call context.SetBool("UseViewDeviation", true) to restore the default.