Subject: CGAL users discussion list
List archive
- From: Sukhraj Singh <>
- To:
- Subject: Re: [cgal-discuss] Extracting the segments from a Surface Mesh
- Date: Thu, 2 Jun 2016 18:31:15 +0530
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:WEjdDhb3jNpaBu/i8WJ1naX/LSx+4OfEezUN459isYplN5qZo8y5bnLW6fgltlLVR4KTs6sC0LqH9f2xEjFaqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh7H0psyYPl8ArQH+SI0xBS3+lR/WuMgSjNkqAYcK4TyNnEF1ff9Lz3hjP1OZkkW0zM6x+Jl+73YY4Kp5pIYTGZj8ZLkyGLxEECw9YSdy/9zurRCFTA2V53JaXH9RiQtNGwGC7Rf0WdD6vSL+8+Z8wyKHJtalcLYvRD7377t3UAS6z2AcJjsh+SfWjNZxheRVulW6thlnysnVZo+Sc/Fxd6eYcdIBTndaRZVsUTdcCNa8c5cXFLhGev1JqpH04VoItxq3Qwe2Q/j+zydBwX7w06p92OsoFUTK3RcrAskV40jT+d76PaNXXeGux7TT1h3CaelX0HHz8tvmaBck9MqRXrJqeMiZ8kgpGAON2k6Rr4PleSiI1eQXumqz4O9pVObpgGki/VIi6gOzz9sh39GazrkezUrJoH10
Hello Sebastien,
I tried the following example to create a polyhedron from a segment in an incremental manner.http://doc.cgal.org/latest/Polyhedron/Polyhedron_2polyhedron_prog_incr_builder_8cpp-example.html
- Iterate the facets
If facet belongs to i-th segment.
Push its points to the incremental builder
Then add vertex to facet.
I got following error.
CGAL::Polyhedron_incremental_builder_3<HDS>::
lookup_halfedge(): input error: facet 1 shares a halfedge from vertex 1 to vertex 2 with facet 0.
I am getting the reason what is happening, but the sample provided "polyhedron_prog_incr_builder.cpp" is too simplistic.
Is there any other example where above case is handled. Because I think it can happen very often.
Any hint to resolve the above issue would be appreciated.
Thanks
On Mon, May 23, 2016 at 8:38 PM, Sebastien Loriot (GeometryFactory) <> wrote:
If it does what you want, then yes.
Sebastien.
On 05/23/2016 04:57 PM, Sukhraj Singh wrote:
Okay,
Assuming I don't use connected_components().
And I directly create Polyhedrons from the segments, i.e.
- Iterate through polyhedron.
- Create polyhedron of a segment using Polyhedron_incremental_builder_3.
Is this correct way to do ? Or there is some better approach in CGAL.
On Mon, May 23, 2016 at 1:18 PM, Sebastien Loriot (GeometryFactory)< <mailto:>> wrote:
What I mean is if you need both clusters and segments but want to
save on computation time, you can run the segmentation algorithm to
extract
segments and then clusters using `connected_components()` (instead of
another run of segmentation).
Sebastien.
On 05/22/2016 02:32 PM, Sukhraj Singh wrote:
Thanks for your answer, Sebastien
Do I really need to use connected_components()
I already have the "segment_pmap", where the value is the
segment id to
which that particular face belongs.
And one could parse the Polyhedron and collect all the faces having
particular segment ID.(Of-course I need to check, how to
implement the same)
Is my understanding correct ?
Further, quoting from my previous email:
Two spatially apart areas( i.e. not having
common edges) of a Mesh may fall into same segment, since
they had
comparable SDF values.
I am not sure about it, they of-course may fall into same
cluster, but
may not be to the same segment. In such a case if, faces that don't
share edge, will fall into different segment always, even though
they
were in same cluster, using connected_components() may not be
required ?
On Thu, May 12, 2016 at 6:00 PM, Sebastien Loriot (GeometryFactory)
< <mailto:><mailto: <mailto:>>> wrote:
On 05/12/2016 02:16 PM, Sukhraj Singh wrote:
Salut,
The "Triangulated Surface Mesh Segmentation" module
allows one to
segment a surface mesh using the SDF values.
It creates a Property Map which is colorized according
to the
indices,
resulting into segments. Two spatially apart areas(
i.e. not having
common edges) of a Mesh may fall into same segment,
since they had
comparable SDF values.
My question is, how can one extract these segments.
Since I want
to do
further processing on a segment separately. Also I
would like
further
divide a segment, into say sub-segments , where a
sub-segment
will have
faces which are not spatially apart, i.e. a subset
which is having
common edges only.
Set the parameter output_cluster_ids to true when calling the
segmentation function
http://doc.cgal.org/latest/Surface_mesh_segmentation/group__PkgSurfaceSegmentation.html#ga8533ea7b1062ebbabe3bf23fed303f24
If you need also the segments, then set the option to false and
use the function connected_components() considering as
constrained
edges the edges between two faces belonging to different
segments.
http://doc.cgal.org/latest/Polygon_mesh_processing/group__keep__connected__components__grp.html#gabe2052b2281e1e628e68d8fea94be2d9
Sebastien.
Thanks to inform.
P.S. I am a newbie.
--
Sukhraj Singh
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
--
Sukhraj Singh
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
--
Sukhraj Singh
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
--
Sukhraj Singh
- Re: [cgal-discuss] Extracting the segments from a Surface Mesh, Sukhraj Singh, 06/02/2016
- Re: [cgal-discuss] Extracting the segments from a Surface Mesh, Sebastien Loriot (GeometryFactory), 06/06/2016
Archive powered by MHonArc 2.6.18.