Skip to content

PoissonSurfaceReconstruction

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
normals Input point cloud normals
angle Bound for the minimum facet angle in degrees 20
radius Bound for the radius of the surface Delaunay balls (relatively to the average_spacing) 30
distance Bound for the center-center distances (relatively to the average_spacing) 0.375
Outputs
outputPosition Output position of the surface mesh
outputTriangles Output triangles of the surface mesh
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

PoissonSurfaceReconstruction.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/liver.obj"/>
        <MeshTopology src="@loader"/>
        <MechanicalObject showObject="1" showObjectScale="5"/>
    </Node>

    <Node name="PoissonSurfaceReconstruction">
        <PoissonSurfaceReconstruction name="engine" src="@../PointCloud/loader" angle="20" radius="30" distance="0.375"/>
        <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/liver.obj")
   point_cloud.addObject('MeshTopology', src="@loader")
   point_cloud.addObject('MechanicalObject', showObject="1", showObjectScale="5")

   poisson_surface_reconstruction = root.addChild('PoissonSurfaceReconstruction')

   poisson_surface_reconstruction.addObject('PoissonSurfaceReconstruction', name="engine", src="@../PointCloud/loader", angle="20", radius="30", distance="0.375")
   poisson_surface_reconstruction.addObject('MeshTopology', position="@engine.outputPosition", triangles="@engine.outputTriangles")
   poisson_surface_reconstruction.addObject('OglModel', color="1 0 0")