Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Python binding of Poisson_reconstruction_function
- Date: Tue, 29 Jul 2014 08:08:01 +0200
- Organization: GeometryFactory
On 07/28/2014 05:11 PM, hcherkaoui wrote:
Thanks for the reply Sebastien,
So I work on the binding and now it works fine, it pass all my tests and
finally paraview confirm the good reconstruction. I've also bind
Alpha_Shape_3 and like the Poisson process it works fine.
However, I bind these process for my work so especially for Alpha_Shape_3
it's far from the work done in the old project 'cgal-python'
(http://cgal-python.gforge.inria.fr/).
The aim of my work it to provide python module to do this:
python-list-of-Point_3 => | my module (poisson or alpha_shape_3)| =>
python-Polyhedron_3
So my work could interest some peoples but may be not the official
repository of cgal-binding, am I right?
I produced hight-level-functions, to be clear this is the little API
provided by my two bindings:
CGAL.CGAL_Alpha_shape_3 :
Alpha_shape_3_reconstruction(points, alpha_coef)
\points: list of Point_3
\alpha_coef: python float, coef in front of the optimal value of
alpha (.find_optimal_alpha(1))
pass to the .set_alpha() methode
\return a Polyhedron_3
CGAL.CGAL_Mesh_process_3
Computes_reconstruction_error(points, Polyhedron)
\points python-list of Point_3
\Polyhedron the re-construction polyhedron
\return a list of 3 python-floats
[avg_distance of the point set,
max distance points set <-> surface of the
polyhedron (in % of avg_spacing)
avg distance points set <-> surface of the
polyhedron (in % of avg_spacing)]
Poisson_reconstruction(points,
normals,
sm_angle,
sm_radius,
sm_distance,
solver_name)
\points python-list of Point_3
\normals python-list returned by jet or pca_estimate_normals
\sm_angle python-float Min triangle angle in degrees
\sm_radius python-float triangle size w.r.t. pt set average spacing
\sm_distance python-float Surface Approximation error w.r.t. point
set average spacing
\solver_name "Eigen - built-in CG" or "Eigen - built-in simplicial
LDLt" for the compatibility of the
native solver in the machine, have to fixe this part...
\return a Polyhedron_3
Write_off_polyhedron(filename, Polyhedron)
\filename the name of the .off file produice (have to pass
"my_file.off", with the .off)
\Polyhedron the re-construction polyhedron
\return None
Could something like this interest the cgal-binding repos? or 'How' could
something like this, finally interest the cgal-binding repos (with some
changes) ?
I integrate a package in the cgal-bindings when the whole API of the
package is available.
Then, I have two questions linked to my work, I want to produce an even
easier API for my work, something like:
my_polyhedron = CGAL.CGAL_Mesh_process_3.Poisson_reconstruction(points,
normals, nb_facets)
where nb_facets would be the final numbers of facets of the reconstructions
polyhedron. But I find it hard to predict the good sm_angle, sm_radius and
sm_distance for an appropriate nb facets... Could you give me some idea for
the issue?
Then, the second question is: how can we produce low-nb-facets polyhedron
with Poisson reconstruction?
I find it hard to produce 10_facets-polyhedrons or 50_facets-polyhedrons
with that algorithm...Could you give me some idea for this problem?
You cannot predict the number of facets easily.
What you can do is make a first try with a bad approximation factor (0),
and no constraints on the shape of triangles, look at the result and
if needed ask for better quality iteratively depending on your time budget.
Sebastien.
Thank Sebastien
Regards
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Python-binding-of-Poisson-reconstruction-function-tp4659400p4659639.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- Re: [cgal-discuss] Python binding of Poisson_reconstruction_function, hcherkaoui, 07/28/2014
- Re: [cgal-discuss] Python binding of Poisson_reconstruction_function, Sebastien Loriot (GeometryFactory), 07/29/2014
Archive powered by MHonArc 2.6.18.