FrontSurfaceReconstruction
Generate triangular surface mesh from point cloud
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 |
| Inputs | ||
| position | Input point cloud positions | |
| radiusRatioBound | Candidates incident to surface triangles which are not in the beta-wedge are discarded, if the ratio of their radius and the radius of the surface triangle is larger than radius_ratio_bound | 5 |
| beta | Half the angle of the wedge in which only the radius of triangles counts for the plausibility of candidates. | 0.52 |
| Outputs | ||
| outputPosition | Output position of the surface mesh | |
| outputTriangles | Output triangles of the surface mesh | |
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
FrontSurfaceReconstruction.scn
<?xml version="1.0"?>
<Node name="root" gravity="0 0 0" dt="1" >
<RequiredPlugin pluginName="CGALPlugin"/>
<RequiredPlugin pluginName='SofaOpenglVisual'/>
<VisualStyle displayFlags="showVisual" />
<Node name="PointCloud">
<MeshOBJLoader name="loader" filename="mesh/liver2.obj"/>
<MeshTopology src="@loader"/>
<MechanicalObject showObject="1" showObjectScale="5"/>
</Node>
<Node name="FrontSurfaceReconstruction">
<FrontSurfaceReconstruction name="engine" src="@../PointCloud/loader" radiusRatioBound="5" beta="0.52"/>
<MeshTopology position="@engine.outputPosition" triangles="@engine.outputTriangles"/>
<OglModel color="1 0 0"/>
</Node>
</Node>
def createScene(root_node):
root = root_node.addChild('root', gravity="0 0 0", dt="1")
root.addObject('RequiredPlugin', pluginName="CGALPlugin")
root.addObject('RequiredPlugin', pluginName="SofaOpenglVisual")
root.addObject('VisualStyle', displayFlags="showVisual")
point_cloud = root.addChild('PointCloud')
point_cloud.addObject('MeshOBJLoader', name="loader", filename="mesh/liver2.obj")
point_cloud.addObject('MeshTopology', src="@loader")
point_cloud.addObject('MechanicalObject', showObject="1", showObjectScale="5")
front_surface_reconstruction = root.addChild('FrontSurfaceReconstruction')
front_surface_reconstruction.addObject('FrontSurfaceReconstruction', name="engine", src="@../PointCloud/loader", radiusRatioBound="5", beta="0.52")
front_surface_reconstruction.addObject('MeshTopology', position="@engine.outputPosition", triangles="@engine.outputTriangles")
front_surface_reconstruction.addObject('OglModel', color="1 0 0")