Refine2DMesh
Refine 2D mesh using Delaunay triangulation
Vec3d
Templates:
- Vec3d
Target: CGALPlugin
namespace: cgal
parents:
- DataEngine
Data
Name | Description | Default value |
---|---|---|
name | object name | unnamed |
printLog | if true, emits extra messages at runtime. | 0 |
tags | list of the subsets the object belongs to | |
bbox | this object bounding box | |
componentState | The state of the component among (Dirty, Valid, Undefined, Loading, Invalid). | Undefined |
listening | if true, handle the events, otherwise ignore the events | 0 |
inputPoints | Position coordinates (3D, z=0) | |
inputEdges | Constraints (edges) | |
inputEdgesData1 | Data values defined on constrained edges | |
inputEdgesData2 | Data values defined on constrained edges | |
seedPoints | Seed Points (3D, z=0) | |
regionPoints | Region Points (3D, z=0) | |
useInteriorPoints | should inputs points not on boundaries be input to the meshing algorithm | 1 |
outputPoints | New Positions coordinates (3D, z=0) | |
outputTriangles | List of triangles | |
outputEdges | New constraints (edges) | |
outputEdgesData1 | Data values defined on new constrained edges | |
outputEdgesData2 | Data values defined on new constrained edges | |
trianglesRegion | Region for each Triangle | |
outputBdPoints | Indices of points on the boundary | |
shapeCriteria | Shape Criteria | 0.125 |
sizeCriteria | Size Criteria | 0.5 |
viewSeedPoints | Display Seed Points | 0 |
viewRegionPoints | Display Region Points | 0 |
Links
Name | Description | Destination type name |
---|---|---|
context | Graph Node containing this object (or BaseContext::getDefault() if no graph is used) | BaseContext |
slaves | Sub-objects used internally by this object | BaseObject |
master | nullptr for regular objects, or master object for which this object is one sub-objects | BaseObject |
Examples
Refine2DMesh.scn
<Node name="root" dt="0.01" gravity="0 -1 0">
<VisualStyle displayFlags="showVisual showCollisionModels showWireframe"/>
<RequiredPlugin pluginName="CGALPlugin"/>
<RequiredPlugin pluginName='SofaOpenglVisual'/>
<MeshVTKLoader name="meshLoader" filename="data/mesh/edges.vtk" />
<Refine2DMesh template="Vec3d" name="cgalTool"
inputPoints="@meshLoader.position" inputEdges="@meshLoader.edges"
useInteriorPoints="false"
seedPoints="200 50 0"
regionPoints="50 50 0"
shapeCriteria="0.125"
sizeCriteria="10"
viewSeedPoints="1"
viewRegionPoints="1"
/>
<Node>
<MechanicalObject position="@../cgalTool.outputPoints" />
<TriangleSetTopologyContainer position="@../cgalTool.outputPoints" triangles="@../cgalTool.outputTriangles" />
<TriangleSetGeometryAlgorithms drawTriangles="true"/>
</Node>
</Node>
def createScene(root_node):
root = root_node.addChild('root', dt="0.01", gravity="0 -1 0")
root.addObject('VisualStyle', displayFlags="showVisual showCollisionModels showWireframe")
root.addObject('RequiredPlugin', pluginName="CGALPlugin")
root.addObject('RequiredPlugin', pluginName="SofaOpenglVisual")
root.addObject('MeshVTKLoader', name="meshLoader", filename="data/mesh/edges.vtk")
root.addObject('Refine2DMesh', template="Vec3d", name="cgalTool", inputPoints="@meshLoader.position", inputEdges="@meshLoader.edges", useInteriorPoints="false", seedPoints="200 50 0", regionPoints="50 50 0", shapeCriteria="0.125", sizeCriteria="10", viewSeedPoints="1", viewRegionPoints="1")
node = root.addChild('node')
node.addObject('MechanicalObject', position="@../cgalTool.outputPoints")
node.addObject('TriangleSetTopologyContainer', position="@../cgalTool.outputPoints", triangles="@../cgalTool.outputTriangles")
node.addObject('TriangleSetGeometryAlgorithms', drawTriangles="true")