Reliable way to offset a mesh?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Reliable way to offset a mesh?

Zesen Qian
Hi list,

I have a triangulated, closed mesh which is free of any degeneracies.
Is there any reliable way to offset this mesh? By reliable I mean the
result mesh should be free of any degeneracies.

I searched on Internet and there is simply not an library/program
available that can do this. I guess CGAL isn't capable of this either,
but I believe people on this list should be familiar with this topic
and maybe offer some comments.

Thank you.

Best,
Zesen

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Reliable way to offset a mesh?

Sebastien Loriot (GeometryFactory)
There is indeed nothing official in CGAL. However, in the Polyhedron
demo we wrote a small plugin that is meshing the distance function to a
mesh and the output is by construction guaranteed to be free from
self-intersections. However sharp features are not correctly meshed if
not protected.

Go into 3D Surface Mesh Generation -> Offset meshing once having loaded
a polyhedron.

Source code is here:
https://github.com/CGAL/cgal/blob/releases/CGAL-4.12-branch/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp

HTH,

Sebastien.

On 05/17/2018 07:44 PM, Zesen Qian wrote:

> Hi list,
>
> I have a triangulated, closed mesh which is free of any degeneracies.
> Is there any reliable way to offset this mesh? By reliable I mean the
> result mesh should be free of any degeneracies.
>
> I searched on Internet and there is simply not an library/program
> available that can do this. I guess CGAL isn't capable of this either,
> but I believe people on this list should be familiar with this topic
> and maybe offer some comments.
>
> Thank you.
>
> Best,
> Zesen
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Reliable way to offset a mesh?

Zesen Qian
Hi Sebastien,

Thanks for this. I don't know if that's a similiar thing, but I tried
https://doc.cgal.org/latest/Surface_mesher/
by a distance function(with AABB_tree and side_of_triangle). Seen from
the source code of the plugin, it's very similar.

To get a decent result it's quite slow. If I set the angular bound to
90 degree(more than 30),  the algorithm is not garanteed to
terminate(and indeed in my case). My mesh has some very thin layers
that's easy  to be ignored by meshing, so I don't expect this method
to work.

What I'm now trying is simply using the "solidify" modifier in
Blender, and fix the potential self-intersections using refining and
outer-hull operation, and then use boolean operation with the original
mesh to get a offseted mesh. I'm using libigl to do these tasks.

Best,
Zesen

On Tue, May 22, 2018 at 9:59 AM, Sebastien Loriot (GeometryFactory)
<[hidden email]> wrote:

> There is indeed nothing official in CGAL. However, in the Polyhedron
> demo we wrote a small plugin that is meshing the distance function to a mesh
> and the output is by construction guaranteed to be free from
> self-intersections. However sharp features are not correctly meshed if
> not protected.
>
> Go into 3D Surface Mesh Generation -> Offset meshing once having loaded
> a polyhedron.
>
> Source code is here:
> https://github.com/CGAL/cgal/blob/releases/CGAL-4.12-branch/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp
>
> HTH,
>
> Sebastien.
>
>
> On 05/17/2018 07:44 PM, Zesen Qian wrote:
>>
>> Hi list,
>>
>> I have a triangulated, closed mesh which is free of any degeneracies.
>> Is there any reliable way to offset this mesh? By reliable I mean the
>> result mesh should be free of any degeneracies.
>>
>> I searched on Internet and there is simply not an library/program
>> available that can do this. I guess CGAL isn't capable of this either,
>> but I believe people on this list should be familiar with this topic
>> and maybe offer some comments.
>>
>> Thank you.
>>
>> Best,
>> Zesen
>>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Reliable way to offset a mesh?

Zesen Qian
Hi Sebastien,

I think I was mistaken - I tried it again and it seems that I don't
have to do too much about the angle_bound - adjusting other parameters
would suffice to give a decent result.

However, it is indeed slow. One feature of my mesh is that it donsn't
have to be evenly sampled - some areas require more details than
others.  Can I do some trick so that those area receive extra
sampling, while other more monotone area get less, so I can save some
processing time?

Best,
Zesen

On Tue, May 22, 2018 at 10:26 AM, Zesen Qian <[hidden email]> wrote:

> Hi Sebastien,
>
> Thanks for this. I don't know if that's a similiar thing, but I tried
> https://doc.cgal.org/latest/Surface_mesher/
> by a distance function(with AABB_tree and side_of_triangle). Seen from
> the source code of the plugin, it's very similar.
>
> To get a decent result it's quite slow. If I set the angular bound to
> 90 degree(more than 30),  the algorithm is not garanteed to
> terminate(and indeed in my case). My mesh has some very thin layers
> that's easy  to be ignored by meshing, so I don't expect this method
> to work.
>
> What I'm now trying is simply using the "solidify" modifier in
> Blender, and fix the potential self-intersections using refining and
> outer-hull operation, and then use boolean operation with the original
> mesh to get a offseted mesh. I'm using libigl to do these tasks.
>
> Best,
> Zesen
>
> On Tue, May 22, 2018 at 9:59 AM, Sebastien Loriot (GeometryFactory)
> <[hidden email]> wrote:
>> There is indeed nothing official in CGAL. However, in the Polyhedron
>> demo we wrote a small plugin that is meshing the distance function to a mesh
>> and the output is by construction guaranteed to be free from
>> self-intersections. However sharp features are not correctly meshed if
>> not protected.
>>
>> Go into 3D Surface Mesh Generation -> Offset meshing once having loaded
>> a polyhedron.
>>
>> Source code is here:
>> https://github.com/CGAL/cgal/blob/releases/CGAL-4.12-branch/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp
>>
>> HTH,
>>
>> Sebastien.
>>
>>
>> On 05/17/2018 07:44 PM, Zesen Qian wrote:
>>>
>>> Hi list,
>>>
>>> I have a triangulated, closed mesh which is free of any degeneracies.
>>> Is there any reliable way to offset this mesh? By reliable I mean the
>>> result mesh should be free of any degeneracies.
>>>
>>> I searched on Internet and there is simply not an library/program
>>> available that can do this. I guess CGAL isn't capable of this either,
>>> but I believe people on this list should be familiar with this topic
>>> and maybe offer some comments.
>>>
>>> Thank you.
>>>
>>> Best,
>>> Zesen
>>>
>>
>> --
>> You are currently subscribed to cgal-discuss.
>> To unsubscribe or access the archives, go to
>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>
>>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Reliable way to offset a mesh?

Zesen Qian
Hi Sebastien,

Sorry for keep spamming your inbox - but I found how to sample areas
differently based on variety. For future reference, the parameter
distance_bound constrols the max distance from every generated facet
to the surface. So when the same value applies to different areas, the
areas with more details will get sampled more.

Thank you so much for the help!

Best,
Zesen

On Tue, May 22, 2018 at 11:11 AM, Zesen Qian <[hidden email]> wrote:

> Hi Sebastien,
>
> I think I was mistaken - I tried it again and it seems that I don't
> have to do too much about the angle_bound - adjusting other parameters
> would suffice to give a decent result.
>
> However, it is indeed slow. One feature of my mesh is that it donsn't
> have to be evenly sampled - some areas require more details than
> others.  Can I do some trick so that those area receive extra
> sampling, while other more monotone area get less, so I can save some
> processing time?
>
> Best,
> Zesen
>
> On Tue, May 22, 2018 at 10:26 AM, Zesen Qian <[hidden email]> wrote:
>> Hi Sebastien,
>>
>> Thanks for this. I don't know if that's a similiar thing, but I tried
>> https://doc.cgal.org/latest/Surface_mesher/
>> by a distance function(with AABB_tree and side_of_triangle). Seen from
>> the source code of the plugin, it's very similar.
>>
>> To get a decent result it's quite slow. If I set the angular bound to
>> 90 degree(more than 30),  the algorithm is not garanteed to
>> terminate(and indeed in my case). My mesh has some very thin layers
>> that's easy  to be ignored by meshing, so I don't expect this method
>> to work.
>>
>> What I'm now trying is simply using the "solidify" modifier in
>> Blender, and fix the potential self-intersections using refining and
>> outer-hull operation, and then use boolean operation with the original
>> mesh to get a offseted mesh. I'm using libigl to do these tasks.
>>
>> Best,
>> Zesen
>>
>> On Tue, May 22, 2018 at 9:59 AM, Sebastien Loriot (GeometryFactory)
>> <[hidden email]> wrote:
>>> There is indeed nothing official in CGAL. However, in the Polyhedron
>>> demo we wrote a small plugin that is meshing the distance function to a mesh
>>> and the output is by construction guaranteed to be free from
>>> self-intersections. However sharp features are not correctly meshed if
>>> not protected.
>>>
>>> Go into 3D Surface Mesh Generation -> Offset meshing once having loaded
>>> a polyhedron.
>>>
>>> Source code is here:
>>> https://github.com/CGAL/cgal/blob/releases/CGAL-4.12-branch/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp
>>>
>>> HTH,
>>>
>>> Sebastien.
>>>
>>>
>>> On 05/17/2018 07:44 PM, Zesen Qian wrote:
>>>>
>>>> Hi list,
>>>>
>>>> I have a triangulated, closed mesh which is free of any degeneracies.
>>>> Is there any reliable way to offset this mesh? By reliable I mean the
>>>> result mesh should be free of any degeneracies.
>>>>
>>>> I searched on Internet and there is simply not an library/program
>>>> available that can do this. I guess CGAL isn't capable of this either,
>>>> but I believe people on this list should be familiar with this topic
>>>> and maybe offer some comments.
>>>>
>>>> Thank you.
>>>>
>>>> Best,
>>>> Zesen
>>>>
>>>
>>> --
>>> You are currently subscribed to cgal-discuss.
>>> To unsubscribe or access the archives, go to
>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>
>>>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Reliable way to offset a mesh?

Sebastien Loriot (GeometryFactory)
Note that this PR : https://github.com/CGAL/cgal/pull/3043
will bring some noticeable speed up as well as parallel mesh algorithm.

Best,

Sebastien.

On 05/22/2018 07:18 PM, Zesen Qian wrote:

> Hi Sebastien,
>
> Sorry for keep spamming your inbox - but I found how to sample areas
> differently based on variety. For future reference, the parameter
> distance_bound constrols the max distance from every generated facet
> to the surface. So when the same value applies to different areas, the
> areas with more details will get sampled more.
>
> Thank you so much for the help!
>
> Best,
> Zesen
>
> On Tue, May 22, 2018 at 11:11 AM, Zesen Qian <[hidden email]> wrote:
>> Hi Sebastien,
>>
>> I think I was mistaken - I tried it again and it seems that I don't
>> have to do too much about the angle_bound - adjusting other parameters
>> would suffice to give a decent result.
>>
>> However, it is indeed slow. One feature of my mesh is that it donsn't
>> have to be evenly sampled - some areas require more details than
>> others.  Can I do some trick so that those area receive extra
>> sampling, while other more monotone area get less, so I can save some
>> processing time?
>>
>> Best,
>> Zesen
>>
>> On Tue, May 22, 2018 at 10:26 AM, Zesen Qian <[hidden email]> wrote:
>>> Hi Sebastien,
>>>
>>> Thanks for this. I don't know if that's a similiar thing, but I tried
>>> https://doc.cgal.org/latest/Surface_mesher/
>>> by a distance function(with AABB_tree and side_of_triangle). Seen from
>>> the source code of the plugin, it's very similar.
>>>
>>> To get a decent result it's quite slow. If I set the angular bound to
>>> 90 degree(more than 30),  the algorithm is not garanteed to
>>> terminate(and indeed in my case). My mesh has some very thin layers
>>> that's easy  to be ignored by meshing, so I don't expect this method
>>> to work.
>>>
>>> What I'm now trying is simply using the "solidify" modifier in
>>> Blender, and fix the potential self-intersections using refining and
>>> outer-hull operation, and then use boolean operation with the original
>>> mesh to get a offseted mesh. I'm using libigl to do these tasks.
>>>
>>> Best,
>>> Zesen
>>>
>>> On Tue, May 22, 2018 at 9:59 AM, Sebastien Loriot (GeometryFactory)
>>> <[hidden email]> wrote:
>>>> There is indeed nothing official in CGAL. However, in the Polyhedron
>>>> demo we wrote a small plugin that is meshing the distance function to a mesh
>>>> and the output is by construction guaranteed to be free from
>>>> self-intersections. However sharp features are not correctly meshed if
>>>> not protected.
>>>>
>>>> Go into 3D Surface Mesh Generation -> Offset meshing once having loaded
>>>> a polyhedron.
>>>>
>>>> Source code is here:
>>>> https://github.com/CGAL/cgal/blob/releases/CGAL-4.12-branch/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp
>>>>
>>>> HTH,
>>>>
>>>> Sebastien.
>>>>
>>>>
>>>> On 05/17/2018 07:44 PM, Zesen Qian wrote:
>>>>>
>>>>> Hi list,
>>>>>
>>>>> I have a triangulated, closed mesh which is free of any degeneracies.
>>>>> Is there any reliable way to offset this mesh? By reliable I mean the
>>>>> result mesh should be free of any degeneracies.
>>>>>
>>>>> I searched on Internet and there is simply not an library/program
>>>>> available that can do this. I guess CGAL isn't capable of this either,
>>>>> but I believe people on this list should be familiar with this topic
>>>>> and maybe offer some comments.
>>>>>
>>>>> Thank you.
>>>>>
>>>>> Best,
>>>>> Zesen
>>>>>
>>>>
>>>> --
>>>> You are currently subscribed to cgal-discuss.
>>>> To unsubscribe or access the archives, go to
>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>
>>>>
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Reliable way to offset a mesh?

Zesen Qian
Hi Sebastien,

Thanks for this. I wrote the program myself and I'm using surface_mesh
instead of mesh_3. Question: Why will Mesh_3 be faster? From what I
understand this will not only generate facets but also cells inside
the shape? How will that accelerate the process?

And in particular, if I'm not interested in the cells, how should I
set the parameters concerning it? i.e., cell_radius_edge_ratio and
cell_size.

Best,
Zesen

On Tue, May 22, 2018 at 2:25 PM, Sebastien Loriot (GeometryFactory)
<[hidden email]> wrote:

> Note that this PR : https://github.com/CGAL/cgal/pull/3043
> will bring some noticeable speed up as well as parallel mesh algorithm.
>
> Best,
>
> Sebastien.
>
>
> On 05/22/2018 07:18 PM, Zesen Qian wrote:
>>
>> Hi Sebastien,
>>
>> Sorry for keep spamming your inbox - but I found how to sample areas
>> differently based on variety. For future reference, the parameter
>> distance_bound constrols the max distance from every generated facet
>> to the surface. So when the same value applies to different areas, the
>> areas with more details will get sampled more.
>>
>> Thank you so much for the help!
>>
>> Best,
>> Zesen
>>
>> On Tue, May 22, 2018 at 11:11 AM, Zesen Qian <[hidden email]> wrote:
>>>
>>> Hi Sebastien,
>>>
>>> I think I was mistaken - I tried it again and it seems that I don't
>>> have to do too much about the angle_bound - adjusting other parameters
>>> would suffice to give a decent result.
>>>
>>> However, it is indeed slow. One feature of my mesh is that it donsn't
>>> have to be evenly sampled - some areas require more details than
>>> others.  Can I do some trick so that those area receive extra
>>> sampling, while other more monotone area get less, so I can save some
>>> processing time?
>>>
>>> Best,
>>> Zesen
>>>
>>> On Tue, May 22, 2018 at 10:26 AM, Zesen Qian <[hidden email]>
>>> wrote:
>>>>
>>>> Hi Sebastien,
>>>>
>>>> Thanks for this. I don't know if that's a similiar thing, but I tried
>>>> https://doc.cgal.org/latest/Surface_mesher/
>>>> by a distance function(with AABB_tree and side_of_triangle). Seen from
>>>> the source code of the plugin, it's very similar.
>>>>
>>>> To get a decent result it's quite slow. If I set the angular bound to
>>>> 90 degree(more than 30),  the algorithm is not garanteed to
>>>> terminate(and indeed in my case). My mesh has some very thin layers
>>>> that's easy  to be ignored by meshing, so I don't expect this method
>>>> to work.
>>>>
>>>> What I'm now trying is simply using the "solidify" modifier in
>>>> Blender, and fix the potential self-intersections using refining and
>>>> outer-hull operation, and then use boolean operation with the original
>>>> mesh to get a offseted mesh. I'm using libigl to do these tasks.
>>>>
>>>> Best,
>>>> Zesen
>>>>
>>>> On Tue, May 22, 2018 at 9:59 AM, Sebastien Loriot (GeometryFactory)
>>>> <[hidden email]> wrote:
>>>>>
>>>>> There is indeed nothing official in CGAL. However, in the Polyhedron
>>>>> demo we wrote a small plugin that is meshing the distance function to a
>>>>> mesh
>>>>> and the output is by construction guaranteed to be free from
>>>>> self-intersections. However sharp features are not correctly meshed if
>>>>> not protected.
>>>>>
>>>>> Go into 3D Surface Mesh Generation -> Offset meshing once having loaded
>>>>> a polyhedron.
>>>>>
>>>>> Source code is here:
>>>>>
>>>>> https://github.com/CGAL/cgal/blob/releases/CGAL-4.12-branch/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp
>>>>>
>>>>> HTH,
>>>>>
>>>>> Sebastien.
>>>>>
>>>>>
>>>>> On 05/17/2018 07:44 PM, Zesen Qian wrote:
>>>>>>
>>>>>>
>>>>>> Hi list,
>>>>>>
>>>>>> I have a triangulated, closed mesh which is free of any degeneracies.
>>>>>> Is there any reliable way to offset this mesh? By reliable I mean the
>>>>>> result mesh should be free of any degeneracies.
>>>>>>
>>>>>> I searched on Internet and there is simply not an library/program
>>>>>> available that can do this. I guess CGAL isn't capable of this either,
>>>>>> but I believe people on this list should be familiar with this topic
>>>>>> and maybe offer some comments.
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>> Best,
>>>>>> Zesen
>>>>>>
>>>>>
>>>>> --
>>>>> You are currently subscribed to cgal-discuss.
>>>>> To unsubscribe or access the archives, go to
>>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>>
>>>>>
>>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Reliable way to offset a mesh?

Sebastien Loriot (GeometryFactory)


On 05/22/2018 08:33 PM, Zesen Qian wrote:
> Hi Sebastien,
>
> Thanks for this. I wrote the program myself and I'm using surface_mesh
> instead of mesh_3. Question: Why will Mesh_3 be faster? From what I
> understand this will not only generate facets but also cells inside
> the shape? How will that accelerate the process?
Mesh_3 code has been updated to take advantage of threads so it will be
faster. Moreover, the code of Surface_mesh has not been updated for some
time now because we are planning to replace it with the implementation
of Mesh_3. If you put no constraints on the tetrahedra, only the
constraints on surface facets will make the mesh work more.

Sebastien.

>
> And in particular, if I'm not interested in the cells, how should I
> set the parameters concerning it? i.e., cell_radius_edge_ratio and
> cell_size.
>
> Best,
> Zesen
>
> On Tue, May 22, 2018 at 2:25 PM, Sebastien Loriot (GeometryFactory)
> <[hidden email]> wrote:
>> Note that this PR : https://github.com/CGAL/cgal/pull/3043
>> will bring some noticeable speed up as well as parallel mesh algorithm.
>>
>> Best,
>>
>> Sebastien.
>>
>>
>> On 05/22/2018 07:18 PM, Zesen Qian wrote:
>>>
>>> Hi Sebastien,
>>>
>>> Sorry for keep spamming your inbox - but I found how to sample areas
>>> differently based on variety. For future reference, the parameter
>>> distance_bound constrols the max distance from every generated facet
>>> to the surface. So when the same value applies to different areas, the
>>> areas with more details will get sampled more.
>>>
>>> Thank you so much for the help!
>>>
>>> Best,
>>> Zesen
>>>
>>> On Tue, May 22, 2018 at 11:11 AM, Zesen Qian <[hidden email]> wrote:
>>>>
>>>> Hi Sebastien,
>>>>
>>>> I think I was mistaken - I tried it again and it seems that I don't
>>>> have to do too much about the angle_bound - adjusting other parameters
>>>> would suffice to give a decent result.
>>>>
>>>> However, it is indeed slow. One feature of my mesh is that it donsn't
>>>> have to be evenly sampled - some areas require more details than
>>>> others.  Can I do some trick so that those area receive extra
>>>> sampling, while other more monotone area get less, so I can save some
>>>> processing time?
>>>>
>>>> Best,
>>>> Zesen
>>>>
>>>> On Tue, May 22, 2018 at 10:26 AM, Zesen Qian <[hidden email]>
>>>> wrote:
>>>>>
>>>>> Hi Sebastien,
>>>>>
>>>>> Thanks for this. I don't know if that's a similiar thing, but I tried
>>>>> https://doc.cgal.org/latest/Surface_mesher/
>>>>> by a distance function(with AABB_tree and side_of_triangle). Seen from
>>>>> the source code of the plugin, it's very similar.
>>>>>
>>>>> To get a decent result it's quite slow. If I set the angular bound to
>>>>> 90 degree(more than 30),  the algorithm is not garanteed to
>>>>> terminate(and indeed in my case). My mesh has some very thin layers
>>>>> that's easy  to be ignored by meshing, so I don't expect this method
>>>>> to work.
>>>>>
>>>>> What I'm now trying is simply using the "solidify" modifier in
>>>>> Blender, and fix the potential self-intersections using refining and
>>>>> outer-hull operation, and then use boolean operation with the original
>>>>> mesh to get a offseted mesh. I'm using libigl to do these tasks.
>>>>>
>>>>> Best,
>>>>> Zesen
>>>>>
>>>>> On Tue, May 22, 2018 at 9:59 AM, Sebastien Loriot (GeometryFactory)
>>>>> <[hidden email]> wrote:
>>>>>>
>>>>>> There is indeed nothing official in CGAL. However, in the Polyhedron
>>>>>> demo we wrote a small plugin that is meshing the distance function to a
>>>>>> mesh
>>>>>> and the output is by construction guaranteed to be free from
>>>>>> self-intersections. However sharp features are not correctly meshed if
>>>>>> not protected.
>>>>>>
>>>>>> Go into 3D Surface Mesh Generation -> Offset meshing once having loaded
>>>>>> a polyhedron.
>>>>>>
>>>>>> Source code is here:
>>>>>>
>>>>>> https://github.com/CGAL/cgal/blob/releases/CGAL-4.12-branch/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp
>>>>>>
>>>>>> HTH,
>>>>>>
>>>>>> Sebastien.
>>>>>>
>>>>>>
>>>>>> On 05/17/2018 07:44 PM, Zesen Qian wrote:
>>>>>>>
>>>>>>>
>>>>>>> Hi list,
>>>>>>>
>>>>>>> I have a triangulated, closed mesh which is free of any degeneracies.
>>>>>>> Is there any reliable way to offset this mesh? By reliable I mean the
>>>>>>> result mesh should be free of any degeneracies.
>>>>>>>
>>>>>>> I searched on Internet and there is simply not an library/program
>>>>>>> available that can do this. I guess CGAL isn't capable of this either,
>>>>>>> but I believe people on this list should be familiar with this topic
>>>>>>> and maybe offer some comments.
>>>>>>>
>>>>>>> Thank you.
>>>>>>>
>>>>>>> Best,
>>>>>>> Zesen
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> You are currently subscribed to cgal-discuss.
>>>>>> To unsubscribe or access the archives, go to
>>>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>>>
>>>>>>
>>>
>>
>> --
>> You are currently subscribed to cgal-discuss.
>> To unsubscribe or access the archives, go to
>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>
>>
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Reliable way to offset a mesh?

Zesen Qian
OK so I just rewrote the program to use Mesh_3. One problem I
encountered is that I want to restrict the output mesh to be manifold,
but the named parameters doesn't seem to work.  It told me:

/home/riaqn/codes/cxx/offset.cxx:65:102: error: ‘manifold’ was not
declared in this scope
   base<T>::Meshing::C3t3 c3t3 = CGAL::make_mesh_3<typename
base<T>::Meshing::C3t3>(domain, criteria,
manifold=params::manifold());

it seems that there isn't such a named parameter in make_mesh_3's signature?

Best,
Zesen


On Wed, May 23, 2018 at 2:57 AM, Sebastien Loriot (GeometryFactory)
<[hidden email]> wrote:

>
>
> On 05/22/2018 08:33 PM, Zesen Qian wrote:
>>
>> Hi Sebastien,
>>
>> Thanks for this. I wrote the program myself and I'm using surface_mesh
>> instead of mesh_3. Question: Why will Mesh_3 be faster? From what I
>> understand this will not only generate facets but also cells inside
>> the shape? How will that accelerate the process?
>
> Mesh_3 code has been updated to take advantage of threads so it will be
> faster. Moreover, the code of Surface_mesh has not been updated for some
> time now because we are planning to replace it with the implementation of
> Mesh_3. If you put no constraints on the tetrahedra, only the constraints on
> surface facets will make the mesh work more.
>
> Sebastien.
>
>
>>
>> And in particular, if I'm not interested in the cells, how should I
>> set the parameters concerning it? i.e., cell_radius_edge_ratio and
>> cell_size.
>>
>> Best,
>> Zesen
>>
>> On Tue, May 22, 2018 at 2:25 PM, Sebastien Loriot (GeometryFactory)
>> <[hidden email]> wrote:
>>>
>>> Note that this PR : https://github.com/CGAL/cgal/pull/3043
>>> will bring some noticeable speed up as well as parallel mesh algorithm.
>>>
>>> Best,
>>>
>>> Sebastien.
>>>
>>>
>>> On 05/22/2018 07:18 PM, Zesen Qian wrote:
>>>>
>>>>
>>>> Hi Sebastien,
>>>>
>>>> Sorry for keep spamming your inbox - but I found how to sample areas
>>>> differently based on variety. For future reference, the parameter
>>>> distance_bound constrols the max distance from every generated facet
>>>> to the surface. So when the same value applies to different areas, the
>>>> areas with more details will get sampled more.
>>>>
>>>> Thank you so much for the help!
>>>>
>>>> Best,
>>>> Zesen
>>>>
>>>> On Tue, May 22, 2018 at 11:11 AM, Zesen Qian <[hidden email]>
>>>> wrote:
>>>>>
>>>>>
>>>>> Hi Sebastien,
>>>>>
>>>>> I think I was mistaken - I tried it again and it seems that I don't
>>>>> have to do too much about the angle_bound - adjusting other parameters
>>>>> would suffice to give a decent result.
>>>>>
>>>>> However, it is indeed slow. One feature of my mesh is that it donsn't
>>>>> have to be evenly sampled - some areas require more details than
>>>>> others.  Can I do some trick so that those area receive extra
>>>>> sampling, while other more monotone area get less, so I can save some
>>>>> processing time?
>>>>>
>>>>> Best,
>>>>> Zesen
>>>>>
>>>>> On Tue, May 22, 2018 at 10:26 AM, Zesen Qian <[hidden email]>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> Hi Sebastien,
>>>>>>
>>>>>> Thanks for this. I don't know if that's a similiar thing, but I tried
>>>>>> https://doc.cgal.org/latest/Surface_mesher/
>>>>>> by a distance function(with AABB_tree and side_of_triangle). Seen from
>>>>>> the source code of the plugin, it's very similar.
>>>>>>
>>>>>> To get a decent result it's quite slow. If I set the angular bound to
>>>>>> 90 degree(more than 30),  the algorithm is not garanteed to
>>>>>> terminate(and indeed in my case). My mesh has some very thin layers
>>>>>> that's easy  to be ignored by meshing, so I don't expect this method
>>>>>> to work.
>>>>>>
>>>>>> What I'm now trying is simply using the "solidify" modifier in
>>>>>> Blender, and fix the potential self-intersections using refining and
>>>>>> outer-hull operation, and then use boolean operation with the original
>>>>>> mesh to get a offseted mesh. I'm using libigl to do these tasks.
>>>>>>
>>>>>> Best,
>>>>>> Zesen
>>>>>>
>>>>>> On Tue, May 22, 2018 at 9:59 AM, Sebastien Loriot (GeometryFactory)
>>>>>> <[hidden email]> wrote:
>>>>>>>
>>>>>>>
>>>>>>> There is indeed nothing official in CGAL. However, in the Polyhedron
>>>>>>> demo we wrote a small plugin that is meshing the distance function to
>>>>>>> a
>>>>>>> mesh
>>>>>>> and the output is by construction guaranteed to be free from
>>>>>>> self-intersections. However sharp features are not correctly meshed
>>>>>>> if
>>>>>>> not protected.
>>>>>>>
>>>>>>> Go into 3D Surface Mesh Generation -> Offset meshing once having
>>>>>>> loaded
>>>>>>> a polyhedron.
>>>>>>>
>>>>>>> Source code is here:
>>>>>>>
>>>>>>>
>>>>>>> https://github.com/CGAL/cgal/blob/releases/CGAL-4.12-branch/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp
>>>>>>>
>>>>>>> HTH,
>>>>>>>
>>>>>>> Sebastien.
>>>>>>>
>>>>>>>
>>>>>>> On 05/17/2018 07:44 PM, Zesen Qian wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Hi list,
>>>>>>>>
>>>>>>>> I have a triangulated, closed mesh which is free of any
>>>>>>>> degeneracies.
>>>>>>>> Is there any reliable way to offset this mesh? By reliable I mean
>>>>>>>> the
>>>>>>>> result mesh should be free of any degeneracies.
>>>>>>>>
>>>>>>>> I searched on Internet and there is simply not an library/program
>>>>>>>> available that can do this. I guess CGAL isn't capable of this
>>>>>>>> either,
>>>>>>>> but I believe people on this list should be familiar with this topic
>>>>>>>> and maybe offer some comments.
>>>>>>>>
>>>>>>>> Thank you.
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Zesen
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> You are currently subscribed to cgal-discuss.
>>>>>>> To unsubscribe or access the archives, go to
>>>>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>>>>
>>>>>>>
>>>>
>>>
>>> --
>>> You are currently subscribed to cgal-discuss.
>>> To unsubscribe or access the archives, go to
>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>
>>>
>>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Reliable way to offset a mesh?

MaelRL
Tags are used differently:

C3T3 c3t3 =  CGAL::make_mesh_3<C3T3>(domain, criteria, manifold());


On 23/05/2018 15:28, Zesen Qian wrote:

> OK so I just rewrote the program to use Mesh_3. One problem I
> encountered is that I want to restrict the output mesh to be manifold,
> but the named parameters doesn't seem to work.  It told me:
>
> /home/riaqn/codes/cxx/offset.cxx:65:102: error: ‘manifold’ was not
> declared in this scope
>    base<T>::Meshing::C3t3 c3t3 = CGAL::make_mesh_3<typename
> base<T>::Meshing::C3t3>(domain, criteria,
> manifold=params::manifold());
>
> it seems that there isn't such a named parameter in make_mesh_3's signature?
>
> Best,
> Zesen
>
>
> On Wed, May 23, 2018 at 2:57 AM, Sebastien Loriot (GeometryFactory)
> <[hidden email]> wrote:
>>
>> On 05/22/2018 08:33 PM, Zesen Qian wrote:
>>> Hi Sebastien,
>>>
>>> Thanks for this. I wrote the program myself and I'm using surface_mesh
>>> instead of mesh_3. Question: Why will Mesh_3 be faster? From what I
>>> understand this will not only generate facets but also cells inside
>>> the shape? How will that accelerate the process?
>> Mesh_3 code has been updated to take advantage of threads so it will be
>> faster. Moreover, the code of Surface_mesh has not been updated for some
>> time now because we are planning to replace it with the implementation of
>> Mesh_3. If you put no constraints on the tetrahedra, only the constraints on
>> surface facets will make the mesh work more.
>>
>> Sebastien.
>>
>>
>>> And in particular, if I'm not interested in the cells, how should I
>>> set the parameters concerning it? i.e., cell_radius_edge_ratio and
>>> cell_size.
>>>
>>> Best,
>>> Zesen
>>>
>>> On Tue, May 22, 2018 at 2:25 PM, Sebastien Loriot (GeometryFactory)
>>> <[hidden email]> wrote:
>>>> Note that this PR : https://github.com/CGAL/cgal/pull/3043
>>>> will bring some noticeable speed up as well as parallel mesh algorithm.
>>>>
>>>> Best,
>>>>
>>>> Sebastien.
>>>>
>>>>
>>>> On 05/22/2018 07:18 PM, Zesen Qian wrote:
>>>>>
>>>>> Hi Sebastien,
>>>>>
>>>>> Sorry for keep spamming your inbox - but I found how to sample areas
>>>>> differently based on variety. For future reference, the parameter
>>>>> distance_bound constrols the max distance from every generated facet
>>>>> to the surface. So when the same value applies to different areas, the
>>>>> areas with more details will get sampled more.
>>>>>
>>>>> Thank you so much for the help!
>>>>>
>>>>> Best,
>>>>> Zesen
>>>>>
>>>>> On Tue, May 22, 2018 at 11:11 AM, Zesen Qian <[hidden email]>
>>>>> wrote:
>>>>>>
>>>>>> Hi Sebastien,
>>>>>>
>>>>>> I think I was mistaken - I tried it again and it seems that I don't
>>>>>> have to do too much about the angle_bound - adjusting other parameters
>>>>>> would suffice to give a decent result.
>>>>>>
>>>>>> However, it is indeed slow. One feature of my mesh is that it donsn't
>>>>>> have to be evenly sampled - some areas require more details than
>>>>>> others.  Can I do some trick so that those area receive extra
>>>>>> sampling, while other more monotone area get less, so I can save some
>>>>>> processing time?
>>>>>>
>>>>>> Best,
>>>>>> Zesen
>>>>>>
>>>>>> On Tue, May 22, 2018 at 10:26 AM, Zesen Qian <[hidden email]>
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi Sebastien,
>>>>>>>
>>>>>>> Thanks for this. I don't know if that's a similiar thing, but I tried
>>>>>>> https://doc.cgal.org/latest/Surface_mesher/
>>>>>>> by a distance function(with AABB_tree and side_of_triangle). Seen from
>>>>>>> the source code of the plugin, it's very similar.
>>>>>>>
>>>>>>> To get a decent result it's quite slow. If I set the angular bound to
>>>>>>> 90 degree(more than 30),  the algorithm is not garanteed to
>>>>>>> terminate(and indeed in my case). My mesh has some very thin layers
>>>>>>> that's easy  to be ignored by meshing, so I don't expect this method
>>>>>>> to work.
>>>>>>>
>>>>>>> What I'm now trying is simply using the "solidify" modifier in
>>>>>>> Blender, and fix the potential self-intersections using refining and
>>>>>>> outer-hull operation, and then use boolean operation with the original
>>>>>>> mesh to get a offseted mesh. I'm using libigl to do these tasks.
>>>>>>>
>>>>>>> Best,
>>>>>>> Zesen
>>>>>>>
>>>>>>> On Tue, May 22, 2018 at 9:59 AM, Sebastien Loriot (GeometryFactory)
>>>>>>> <[hidden email]> wrote:
>>>>>>>>
>>>>>>>> There is indeed nothing official in CGAL. However, in the Polyhedron
>>>>>>>> demo we wrote a small plugin that is meshing the distance function to
>>>>>>>> a
>>>>>>>> mesh
>>>>>>>> and the output is by construction guaranteed to be free from
>>>>>>>> self-intersections. However sharp features are not correctly meshed
>>>>>>>> if
>>>>>>>> not protected.
>>>>>>>>
>>>>>>>> Go into 3D Surface Mesh Generation -> Offset meshing once having
>>>>>>>> loaded
>>>>>>>> a polyhedron.
>>>>>>>>
>>>>>>>> Source code is here:
>>>>>>>>
>>>>>>>>
>>>>>>>> https://github.com/CGAL/cgal/blob/releases/CGAL-4.12-branch/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp
>>>>>>>>
>>>>>>>> HTH,
>>>>>>>>
>>>>>>>> Sebastien.
>>>>>>>>
>>>>>>>>
>>>>>>>> On 05/17/2018 07:44 PM, Zesen Qian wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Hi list,
>>>>>>>>>
>>>>>>>>> I have a triangulated, closed mesh which is free of any
>>>>>>>>> degeneracies.
>>>>>>>>> Is there any reliable way to offset this mesh? By reliable I mean
>>>>>>>>> the
>>>>>>>>> result mesh should be free of any degeneracies.
>>>>>>>>>
>>>>>>>>> I searched on Internet and there is simply not an library/program
>>>>>>>>> available that can do this. I guess CGAL isn't capable of this
>>>>>>>>> either,
>>>>>>>>> but I believe people on this list should be familiar with this topic
>>>>>>>>> and maybe offer some comments.
>>>>>>>>>
>>>>>>>>> Thank you.
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Zesen
>>>>>>>>>
>>>>>>>> --
>>>>>>>> You are currently subscribed to cgal-discuss.
>>>>>>>> To unsubscribe or access the archives, go to
>>>>>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>>>>>
>>>>>>>>
>>>> --
>>>> You are currently subscribed to cgal-discuss.
>>>> To unsubscribe or access the archives, go to
>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>
>>>>
>> --
>> You are currently subscribed to cgal-discuss.
>> To unsubscribe or access the archives, go to
>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>
>>


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Reliable way to offset a mesh?

Zesen Qian
Thanks Mael, while this solves the last problem, a new one pumps up:

/home/riaqn/codes/cxx/offset.cxx:65:102: error: ‘manifold’ was not
declared in this scope
   base<T>::Meshing::C3t3 c3t3 = CGAL::make_mesh_3<typename
base<T>::Meshing::C3t3>(domain, criteria, params::manifold());

I'm sure I included <CGAL/refine_mesh_3.h>, and params is CGAL::parameters.

Best,
Zesen

On Wed, May 23, 2018 at 9:36 AM, Mael Rouxel-Labbé
<[hidden email]> wrote:

> Tags are used differently:
>
> C3T3 c3t3 =  CGAL::make_mesh_3<C3T3>(domain, criteria, manifold());
>
>
> On 23/05/2018 15:28, Zesen Qian wrote:
>> OK so I just rewrote the program to use Mesh_3. One problem I
>> encountered is that I want to restrict the output mesh to be manifold,
>> but the named parameters doesn't seem to work.  It told me:
>>
>> /home/riaqn/codes/cxx/offset.cxx:65:102: error: ‘manifold’ was not
>> declared in this scope
>>    base<T>::Meshing::C3t3 c3t3 = CGAL::make_mesh_3<typename
>> base<T>::Meshing::C3t3>(domain, criteria,
>> manifold=params::manifold());
>>
>> it seems that there isn't such a named parameter in make_mesh_3's signature?
>>
>> Best,
>> Zesen
>>
>>
>> On Wed, May 23, 2018 at 2:57 AM, Sebastien Loriot (GeometryFactory)
>> <[hidden email]> wrote:
>>>
>>> On 05/22/2018 08:33 PM, Zesen Qian wrote:
>>>> Hi Sebastien,
>>>>
>>>> Thanks for this. I wrote the program myself and I'm using surface_mesh
>>>> instead of mesh_3. Question: Why will Mesh_3 be faster? From what I
>>>> understand this will not only generate facets but also cells inside
>>>> the shape? How will that accelerate the process?
>>> Mesh_3 code has been updated to take advantage of threads so it will be
>>> faster. Moreover, the code of Surface_mesh has not been updated for some
>>> time now because we are planning to replace it with the implementation of
>>> Mesh_3. If you put no constraints on the tetrahedra, only the constraints on
>>> surface facets will make the mesh work more.
>>>
>>> Sebastien.
>>>
>>>
>>>> And in particular, if I'm not interested in the cells, how should I
>>>> set the parameters concerning it? i.e., cell_radius_edge_ratio and
>>>> cell_size.
>>>>
>>>> Best,
>>>> Zesen
>>>>
>>>> On Tue, May 22, 2018 at 2:25 PM, Sebastien Loriot (GeometryFactory)
>>>> <[hidden email]> wrote:
>>>>> Note that this PR : https://github.com/CGAL/cgal/pull/3043
>>>>> will bring some noticeable speed up as well as parallel mesh algorithm.
>>>>>
>>>>> Best,
>>>>>
>>>>> Sebastien.
>>>>>
>>>>>
>>>>> On 05/22/2018 07:18 PM, Zesen Qian wrote:
>>>>>>
>>>>>> Hi Sebastien,
>>>>>>
>>>>>> Sorry for keep spamming your inbox - but I found how to sample areas
>>>>>> differently based on variety. For future reference, the parameter
>>>>>> distance_bound constrols the max distance from every generated facet
>>>>>> to the surface. So when the same value applies to different areas, the
>>>>>> areas with more details will get sampled more.
>>>>>>
>>>>>> Thank you so much for the help!
>>>>>>
>>>>>> Best,
>>>>>> Zesen
>>>>>>
>>>>>> On Tue, May 22, 2018 at 11:11 AM, Zesen Qian <[hidden email]>
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi Sebastien,
>>>>>>>
>>>>>>> I think I was mistaken - I tried it again and it seems that I don't
>>>>>>> have to do too much about the angle_bound - adjusting other parameters
>>>>>>> would suffice to give a decent result.
>>>>>>>
>>>>>>> However, it is indeed slow. One feature of my mesh is that it donsn't
>>>>>>> have to be evenly sampled - some areas require more details than
>>>>>>> others.  Can I do some trick so that those area receive extra
>>>>>>> sampling, while other more monotone area get less, so I can save some
>>>>>>> processing time?
>>>>>>>
>>>>>>> Best,
>>>>>>> Zesen
>>>>>>>
>>>>>>> On Tue, May 22, 2018 at 10:26 AM, Zesen Qian <[hidden email]>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Hi Sebastien,
>>>>>>>>
>>>>>>>> Thanks for this. I don't know if that's a similiar thing, but I tried
>>>>>>>> https://doc.cgal.org/latest/Surface_mesher/
>>>>>>>> by a distance function(with AABB_tree and side_of_triangle). Seen from
>>>>>>>> the source code of the plugin, it's very similar.
>>>>>>>>
>>>>>>>> To get a decent result it's quite slow. If I set the angular bound to
>>>>>>>> 90 degree(more than 30),  the algorithm is not garanteed to
>>>>>>>> terminate(and indeed in my case). My mesh has some very thin layers
>>>>>>>> that's easy  to be ignored by meshing, so I don't expect this method
>>>>>>>> to work.
>>>>>>>>
>>>>>>>> What I'm now trying is simply using the "solidify" modifier in
>>>>>>>> Blender, and fix the potential self-intersections using refining and
>>>>>>>> outer-hull operation, and then use boolean operation with the original
>>>>>>>> mesh to get a offseted mesh. I'm using libigl to do these tasks.
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Zesen
>>>>>>>>
>>>>>>>> On Tue, May 22, 2018 at 9:59 AM, Sebastien Loriot (GeometryFactory)
>>>>>>>> <[hidden email]> wrote:
>>>>>>>>>
>>>>>>>>> There is indeed nothing official in CGAL. However, in the Polyhedron
>>>>>>>>> demo we wrote a small plugin that is meshing the distance function to
>>>>>>>>> a
>>>>>>>>> mesh
>>>>>>>>> and the output is by construction guaranteed to be free from
>>>>>>>>> self-intersections. However sharp features are not correctly meshed
>>>>>>>>> if
>>>>>>>>> not protected.
>>>>>>>>>
>>>>>>>>> Go into 3D Surface Mesh Generation -> Offset meshing once having
>>>>>>>>> loaded
>>>>>>>>> a polyhedron.
>>>>>>>>>
>>>>>>>>> Source code is here:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> https://github.com/CGAL/cgal/blob/releases/CGAL-4.12-branch/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp
>>>>>>>>>
>>>>>>>>> HTH,
>>>>>>>>>
>>>>>>>>> Sebastien.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 05/17/2018 07:44 PM, Zesen Qian wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Hi list,
>>>>>>>>>>
>>>>>>>>>> I have a triangulated, closed mesh which is free of any
>>>>>>>>>> degeneracies.
>>>>>>>>>> Is there any reliable way to offset this mesh? By reliable I mean
>>>>>>>>>> the
>>>>>>>>>> result mesh should be free of any degeneracies.
>>>>>>>>>>
>>>>>>>>>> I searched on Internet and there is simply not an library/program
>>>>>>>>>> available that can do this. I guess CGAL isn't capable of this
>>>>>>>>>> either,
>>>>>>>>>> but I believe people on this list should be familiar with this topic
>>>>>>>>>> and maybe offer some comments.
>>>>>>>>>>
>>>>>>>>>> Thank you.
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>> Zesen
>>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> You are currently subscribed to cgal-discuss.
>>>>>>>>> To unsubscribe or access the archives, go to
>>>>>>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>>>>>>
>>>>>>>>>
>>>>> --
>>>>> You are currently subscribed to cgal-discuss.
>>>>> To unsubscribe or access the archives, go to
>>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>>
>>>>>
>>> --
>>> You are currently subscribed to cgal-discuss.
>>> To unsubscribe or access the archives, go to
>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>
>>>
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Reliable way to offset a mesh?

MaelRL
Which version of CGAL are you using? The parameter "manifold()" was
added with CGAL 4.12.

On 23/05/2018 15:41, Zesen Qian wrote:

> Thanks Mael, while this solves the last problem, a new one pumps up:
>
> /home/riaqn/codes/cxx/offset.cxx:65:102: error: ‘manifold’ was not
> declared in this scope
>    base<T>::Meshing::C3t3 c3t3 = CGAL::make_mesh_3<typename
> base<T>::Meshing::C3t3>(domain, criteria, params::manifold());
>
> I'm sure I included <CGAL/refine_mesh_3.h>, and params is CGAL::parameters.
>
> Best,
> Zesen
>
> On Wed, May 23, 2018 at 9:36 AM, Mael Rouxel-Labbé
> <[hidden email]> wrote:
>> Tags are used differently:
>>
>> C3T3 c3t3 =  CGAL::make_mesh_3<C3T3>(domain, criteria, manifold());
>>
>>
>> On 23/05/2018 15:28, Zesen Qian wrote:
>>> OK so I just rewrote the program to use Mesh_3. One problem I
>>> encountered is that I want to restrict the output mesh to be manifold,
>>> but the named parameters doesn't seem to work.  It told me:
>>>
>>> /home/riaqn/codes/cxx/offset.cxx:65:102: error: ‘manifold’ was not
>>> declared in this scope
>>>    base<T>::Meshing::C3t3 c3t3 = CGAL::make_mesh_3<typename
>>> base<T>::Meshing::C3t3>(domain, criteria,
>>> manifold=params::manifold());
>>>
>>> it seems that there isn't such a named parameter in make_mesh_3's signature?
>>>
>>> Best,
>>> Zesen
>>>
>>>
>>> On Wed, May 23, 2018 at 2:57 AM, Sebastien Loriot (GeometryFactory)
>>> <[hidden email]> wrote:
>>>> On 05/22/2018 08:33 PM, Zesen Qian wrote:
>>>>> Hi Sebastien,
>>>>>
>>>>> Thanks for this. I wrote the program myself and I'm using surface_mesh
>>>>> instead of mesh_3. Question: Why will Mesh_3 be faster? From what I
>>>>> understand this will not only generate facets but also cells inside
>>>>> the shape? How will that accelerate the process?
>>>> Mesh_3 code has been updated to take advantage of threads so it will be
>>>> faster. Moreover, the code of Surface_mesh has not been updated for some
>>>> time now because we are planning to replace it with the implementation of
>>>> Mesh_3. If you put no constraints on the tetrahedra, only the constraints on
>>>> surface facets will make the mesh work more.
>>>>
>>>> Sebastien.
>>>>
>>>>
>>>>> And in particular, if I'm not interested in the cells, how should I
>>>>> set the parameters concerning it? i.e., cell_radius_edge_ratio and
>>>>> cell_size.
>>>>>
>>>>> Best,
>>>>> Zesen
>>>>>
>>>>> On Tue, May 22, 2018 at 2:25 PM, Sebastien Loriot (GeometryFactory)
>>>>> <[hidden email]> wrote:
>>>>>> Note that this PR : https://github.com/CGAL/cgal/pull/3043
>>>>>> will bring some noticeable speed up as well as parallel mesh algorithm.
>>>>>>
>>>>>> Best,
>>>>>>
>>>>>> Sebastien.
>>>>>>
>>>>>>
>>>>>> On 05/22/2018 07:18 PM, Zesen Qian wrote:
>>>>>>> Hi Sebastien,
>>>>>>>
>>>>>>> Sorry for keep spamming your inbox - but I found how to sample areas
>>>>>>> differently based on variety. For future reference, the parameter
>>>>>>> distance_bound constrols the max distance from every generated facet
>>>>>>> to the surface. So when the same value applies to different areas, the
>>>>>>> areas with more details will get sampled more.
>>>>>>>
>>>>>>> Thank you so much for the help!
>>>>>>>
>>>>>>> Best,
>>>>>>> Zesen
>>>>>>>
>>>>>>> On Tue, May 22, 2018 at 11:11 AM, Zesen Qian <[hidden email]>
>>>>>>> wrote:
>>>>>>>> Hi Sebastien,
>>>>>>>>
>>>>>>>> I think I was mistaken - I tried it again and it seems that I don't
>>>>>>>> have to do too much about the angle_bound - adjusting other parameters
>>>>>>>> would suffice to give a decent result.
>>>>>>>>
>>>>>>>> However, it is indeed slow. One feature of my mesh is that it donsn't
>>>>>>>> have to be evenly sampled - some areas require more details than
>>>>>>>> others.  Can I do some trick so that those area receive extra
>>>>>>>> sampling, while other more monotone area get less, so I can save some
>>>>>>>> processing time?
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Zesen
>>>>>>>>
>>>>>>>> On Tue, May 22, 2018 at 10:26 AM, Zesen Qian <[hidden email]>
>>>>>>>> wrote:
>>>>>>>>> Hi Sebastien,
>>>>>>>>>
>>>>>>>>> Thanks for this. I don't know if that's a similiar thing, but I tried
>>>>>>>>> https://doc.cgal.org/latest/Surface_mesher/
>>>>>>>>> by a distance function(with AABB_tree and side_of_triangle). Seen from
>>>>>>>>> the source code of the plugin, it's very similar.
>>>>>>>>>
>>>>>>>>> To get a decent result it's quite slow. If I set the angular bound to
>>>>>>>>> 90 degree(more than 30),  the algorithm is not garanteed to
>>>>>>>>> terminate(and indeed in my case). My mesh has some very thin layers
>>>>>>>>> that's easy  to be ignored by meshing, so I don't expect this method
>>>>>>>>> to work.
>>>>>>>>>
>>>>>>>>> What I'm now trying is simply using the "solidify" modifier in
>>>>>>>>> Blender, and fix the potential self-intersections using refining and
>>>>>>>>> outer-hull operation, and then use boolean operation with the original
>>>>>>>>> mesh to get a offseted mesh. I'm using libigl to do these tasks.
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Zesen
>>>>>>>>>
>>>>>>>>> On Tue, May 22, 2018 at 9:59 AM, Sebastien Loriot (GeometryFactory)
>>>>>>>>> <[hidden email]> wrote:
>>>>>>>>>> There is indeed nothing official in CGAL. However, in the Polyhedron
>>>>>>>>>> demo we wrote a small plugin that is meshing the distance function to
>>>>>>>>>> a
>>>>>>>>>> mesh
>>>>>>>>>> and the output is by construction guaranteed to be free from
>>>>>>>>>> self-intersections. However sharp features are not correctly meshed
>>>>>>>>>> if
>>>>>>>>>> not protected.
>>>>>>>>>>
>>>>>>>>>> Go into 3D Surface Mesh Generation -> Offset meshing once having
>>>>>>>>>> loaded
>>>>>>>>>> a polyhedron.
>>>>>>>>>>
>>>>>>>>>> Source code is here:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> https://github.com/CGAL/cgal/blob/releases/CGAL-4.12-branch/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp
>>>>>>>>>>
>>>>>>>>>> HTH,
>>>>>>>>>>
>>>>>>>>>> Sebastien.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 05/17/2018 07:44 PM, Zesen Qian wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi list,
>>>>>>>>>>>
>>>>>>>>>>> I have a triangulated, closed mesh which is free of any
>>>>>>>>>>> degeneracies.
>>>>>>>>>>> Is there any reliable way to offset this mesh? By reliable I mean
>>>>>>>>>>> the
>>>>>>>>>>> result mesh should be free of any degeneracies.
>>>>>>>>>>>
>>>>>>>>>>> I searched on Internet and there is simply not an library/program
>>>>>>>>>>> available that can do this. I guess CGAL isn't capable of this
>>>>>>>>>>> either,
>>>>>>>>>>> but I believe people on this list should be familiar with this topic
>>>>>>>>>>> and maybe offer some comments.
>>>>>>>>>>>
>>>>>>>>>>> Thank you.
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>> Zesen
>>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> You are currently subscribed to cgal-discuss.
>>>>>>>>>> To unsubscribe or access the archives, go to
>>>>>>>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>>>>>>>
>>>>>>>>>>
>>>>>> --
>>>>>> You are currently subscribed to cgal-discuss.
>>>>>> To unsubscribe or access the archives, go to
>>>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>>>
>>>>>>
>>>> --
>>>> You are currently subscribed to cgal-discuss.
>>>> To unsubscribe or access the archives, go to
>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>
>>>>
>>
>> --
>> You are currently subscribed to cgal-discuss.
>> To unsubscribe or access the archives, go to
>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>
>>


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Reliable way to offset a mesh?

Zesen Qian
ahh that's why - I was using 4.11. I just updated and it's working great!

A question about optimizations such as exude and perturb: how do they
affect the speed and quality of the result mesh? From my experience it
seems disabling them make the program noticably faster, and I didn't
see particularly bad result.  I assume by optimizing at each step, the
number of steps to converge is reduced. It, of course, comes with the
cost of optimization itself.

Thank you.

Zesen

On Wed, May 23, 2018 at 9:51 AM, Mael Rouxel-Labbé
<[hidden email]> wrote:

> Which version of CGAL are you using? The parameter "manifold()" was
> added with CGAL 4.12.
>
> On 23/05/2018 15:41, Zesen Qian wrote:
>> Thanks Mael, while this solves the last problem, a new one pumps up:
>>
>> /home/riaqn/codes/cxx/offset.cxx:65:102: error: ‘manifold’ was not
>> declared in this scope
>>    base<T>::Meshing::C3t3 c3t3 = CGAL::make_mesh_3<typename
>> base<T>::Meshing::C3t3>(domain, criteria, params::manifold());
>>
>> I'm sure I included <CGAL/refine_mesh_3.h>, and params is CGAL::parameters.
>>
>> Best,
>> Zesen
>>
>> On Wed, May 23, 2018 at 9:36 AM, Mael Rouxel-Labbé
>> <[hidden email]> wrote:
>>> Tags are used differently:
>>>
>>> C3T3 c3t3 =  CGAL::make_mesh_3<C3T3>(domain, criteria, manifold());
>>>
>>>
>>> On 23/05/2018 15:28, Zesen Qian wrote:
>>>> OK so I just rewrote the program to use Mesh_3. One problem I
>>>> encountered is that I want to restrict the output mesh to be manifold,
>>>> but the named parameters doesn't seem to work.  It told me:
>>>>
>>>> /home/riaqn/codes/cxx/offset.cxx:65:102: error: ‘manifold’ was not
>>>> declared in this scope
>>>>    base<T>::Meshing::C3t3 c3t3 = CGAL::make_mesh_3<typename
>>>> base<T>::Meshing::C3t3>(domain, criteria,
>>>> manifold=params::manifold());
>>>>
>>>> it seems that there isn't such a named parameter in make_mesh_3's signature?
>>>>
>>>> Best,
>>>> Zesen
>>>>
>>>>
>>>> On Wed, May 23, 2018 at 2:57 AM, Sebastien Loriot (GeometryFactory)
>>>> <[hidden email]> wrote:
>>>>> On 05/22/2018 08:33 PM, Zesen Qian wrote:
>>>>>> Hi Sebastien,
>>>>>>
>>>>>> Thanks for this. I wrote the program myself and I'm using surface_mesh
>>>>>> instead of mesh_3. Question: Why will Mesh_3 be faster? From what I
>>>>>> understand this will not only generate facets but also cells inside
>>>>>> the shape? How will that accelerate the process?
>>>>> Mesh_3 code has been updated to take advantage of threads so it will be
>>>>> faster. Moreover, the code of Surface_mesh has not been updated for some
>>>>> time now because we are planning to replace it with the implementation of
>>>>> Mesh_3. If you put no constraints on the tetrahedra, only the constraints on
>>>>> surface facets will make the mesh work more.
>>>>>
>>>>> Sebastien.
>>>>>
>>>>>
>>>>>> And in particular, if I'm not interested in the cells, how should I
>>>>>> set the parameters concerning it? i.e., cell_radius_edge_ratio and
>>>>>> cell_size.
>>>>>>
>>>>>> Best,
>>>>>> Zesen
>>>>>>
>>>>>> On Tue, May 22, 2018 at 2:25 PM, Sebastien Loriot (GeometryFactory)
>>>>>> <[hidden email]> wrote:
>>>>>>> Note that this PR : https://github.com/CGAL/cgal/pull/3043
>>>>>>> will bring some noticeable speed up as well as parallel mesh algorithm.
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> Sebastien.
>>>>>>>
>>>>>>>
>>>>>>> On 05/22/2018 07:18 PM, Zesen Qian wrote:
>>>>>>>> Hi Sebastien,
>>>>>>>>
>>>>>>>> Sorry for keep spamming your inbox - but I found how to sample areas
>>>>>>>> differently based on variety. For future reference, the parameter
>>>>>>>> distance_bound constrols the max distance from every generated facet
>>>>>>>> to the surface. So when the same value applies to different areas, the
>>>>>>>> areas with more details will get sampled more.
>>>>>>>>
>>>>>>>> Thank you so much for the help!
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Zesen
>>>>>>>>
>>>>>>>> On Tue, May 22, 2018 at 11:11 AM, Zesen Qian <[hidden email]>
>>>>>>>> wrote:
>>>>>>>>> Hi Sebastien,
>>>>>>>>>
>>>>>>>>> I think I was mistaken - I tried it again and it seems that I don't
>>>>>>>>> have to do too much about the angle_bound - adjusting other parameters
>>>>>>>>> would suffice to give a decent result.
>>>>>>>>>
>>>>>>>>> However, it is indeed slow. One feature of my mesh is that it donsn't
>>>>>>>>> have to be evenly sampled - some areas require more details than
>>>>>>>>> others.  Can I do some trick so that those area receive extra
>>>>>>>>> sampling, while other more monotone area get less, so I can save some
>>>>>>>>> processing time?
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Zesen
>>>>>>>>>
>>>>>>>>> On Tue, May 22, 2018 at 10:26 AM, Zesen Qian <[hidden email]>
>>>>>>>>> wrote:
>>>>>>>>>> Hi Sebastien,
>>>>>>>>>>
>>>>>>>>>> Thanks for this. I don't know if that's a similiar thing, but I tried
>>>>>>>>>> https://doc.cgal.org/latest/Surface_mesher/
>>>>>>>>>> by a distance function(with AABB_tree and side_of_triangle). Seen from
>>>>>>>>>> the source code of the plugin, it's very similar.
>>>>>>>>>>
>>>>>>>>>> To get a decent result it's quite slow. If I set the angular bound to
>>>>>>>>>> 90 degree(more than 30),  the algorithm is not garanteed to
>>>>>>>>>> terminate(and indeed in my case). My mesh has some very thin layers
>>>>>>>>>> that's easy  to be ignored by meshing, so I don't expect this method
>>>>>>>>>> to work.
>>>>>>>>>>
>>>>>>>>>> What I'm now trying is simply using the "solidify" modifier in
>>>>>>>>>> Blender, and fix the potential self-intersections using refining and
>>>>>>>>>> outer-hull operation, and then use boolean operation with the original
>>>>>>>>>> mesh to get a offseted mesh. I'm using libigl to do these tasks.
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>> Zesen
>>>>>>>>>>
>>>>>>>>>> On Tue, May 22, 2018 at 9:59 AM, Sebastien Loriot (GeometryFactory)
>>>>>>>>>> <[hidden email]> wrote:
>>>>>>>>>>> There is indeed nothing official in CGAL. However, in the Polyhedron
>>>>>>>>>>> demo we wrote a small plugin that is meshing the distance function to
>>>>>>>>>>> a
>>>>>>>>>>> mesh
>>>>>>>>>>> and the output is by construction guaranteed to be free from
>>>>>>>>>>> self-intersections. However sharp features are not correctly meshed
>>>>>>>>>>> if
>>>>>>>>>>> not protected.
>>>>>>>>>>>
>>>>>>>>>>> Go into 3D Surface Mesh Generation -> Offset meshing once having
>>>>>>>>>>> loaded
>>>>>>>>>>> a polyhedron.
>>>>>>>>>>>
>>>>>>>>>>> Source code is here:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> https://github.com/CGAL/cgal/blob/releases/CGAL-4.12-branch/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp
>>>>>>>>>>>
>>>>>>>>>>> HTH,
>>>>>>>>>>>
>>>>>>>>>>> Sebastien.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 05/17/2018 07:44 PM, Zesen Qian wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Hi list,
>>>>>>>>>>>>
>>>>>>>>>>>> I have a triangulated, closed mesh which is free of any
>>>>>>>>>>>> degeneracies.
>>>>>>>>>>>> Is there any reliable way to offset this mesh? By reliable I mean
>>>>>>>>>>>> the
>>>>>>>>>>>> result mesh should be free of any degeneracies.
>>>>>>>>>>>>
>>>>>>>>>>>> I searched on Internet and there is simply not an library/program
>>>>>>>>>>>> available that can do this. I guess CGAL isn't capable of this
>>>>>>>>>>>> either,
>>>>>>>>>>>> but I believe people on this list should be familiar with this topic
>>>>>>>>>>>> and maybe offer some comments.
>>>>>>>>>>>>
>>>>>>>>>>>> Thank you.
>>>>>>>>>>>>
>>>>>>>>>>>> Best,
>>>>>>>>>>>> Zesen
>>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> You are currently subscribed to cgal-discuss.
>>>>>>>>>>> To unsubscribe or access the archives, go to
>>>>>>>>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>> --
>>>>>>> You are currently subscribed to cgal-discuss.
>>>>>>> To unsubscribe or access the archives, go to
>>>>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>>>>
>>>>>>>
>>>>> --
>>>>> You are currently subscribed to cgal-discuss.
>>>>> To unsubscribe or access the archives, go to
>>>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>>>
>>>>>
>>>
>>> --
>>> You are currently subscribed to cgal-discuss.
>>> To unsubscribe or access the archives, go to
>>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>>
>>>
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Reliable way to offset a mesh?

MaelRL

Each optimizer has a different purpose (which you can read about in detail there). The sliver exuder and pertuber aim to improve the worst mesh elements (slivers), so you might not easily notice differences between pre- and post-optimization because it is a very local optimization that impact specific tetrahedra. On the other hand, the Lloyd and ODT optimizers are global optimizers that should yield visible improvements.

Optimizers will not make your mesh worse so it is never bad; nevertheless, you can deactivate them if you don't care about the mesh quality, or you can limit them in time with the 'time_limit' parameter. See for example there and the following example.

Mael

On 23/05/2018 19:45, Zesen Qian wrote:
ahh that's why - I was using 4.11. I just updated and it's working great!

A question about optimizations such as exude and perturb: how do they
affect the speed and quality of the result mesh? From my experience it
seems disabling them make the program noticably faster, and I didn't
see particularly bad result.  I assume by optimizing at each step, the
number of steps to converge is reduced. It, of course, comes with the
cost of optimization itself.

Thank you.

Zesen

On Wed, May 23, 2018 at 9:51 AM, Mael Rouxel-Labbé
[hidden email] wrote:
Which version of CGAL are you using? The parameter "manifold()" was
added with CGAL 4.12.

On 23/05/2018 15:41, Zesen Qian wrote:
Thanks Mael, while this solves the last problem, a new one pumps up:

/home/riaqn/codes/cxx/offset.cxx:65:102: error: ‘manifold’ was not
declared in this scope
   base<T>::Meshing::C3t3 c3t3 = CGAL::make_mesh_3<typename
base<T>::Meshing::C3t3>(domain, criteria, params::manifold());

I'm sure I included <CGAL/refine_mesh_3.h>, and params is CGAL::parameters.

Best,
Zesen

On Wed, May 23, 2018 at 9:36 AM, Mael Rouxel-Labbé
[hidden email] wrote:
Tags are used differently:

C3T3 c3t3 =  CGAL::make_mesh_3<C3T3>(domain, criteria, manifold());


On 23/05/2018 15:28, Zesen Qian wrote:
OK so I just rewrote the program to use Mesh_3. One problem I
encountered is that I want to restrict the output mesh to be manifold,
but the named parameters doesn't seem to work.  It told me:

/home/riaqn/codes/cxx/offset.cxx:65:102: error: ‘manifold’ was not
declared in this scope
   base<T>::Meshing::C3t3 c3t3 = CGAL::make_mesh_3<typename
base<T>::Meshing::C3t3>(domain, criteria,
manifold=params::manifold());

it seems that there isn't such a named parameter in make_mesh_3's signature?

Best,
Zesen


On Wed, May 23, 2018 at 2:57 AM, Sebastien Loriot (GeometryFactory)
[hidden email] wrote:
On 05/22/2018 08:33 PM, Zesen Qian wrote:
Hi Sebastien,

Thanks for this. I wrote the program myself and I'm using surface_mesh
instead of mesh_3. Question: Why will Mesh_3 be faster? From what I
understand this will not only generate facets but also cells inside
the shape? How will that accelerate the process?
Mesh_3 code has been updated to take advantage of threads so it will be
faster. Moreover, the code of Surface_mesh has not been updated for some
time now because we are planning to replace it with the implementation of
Mesh_3. If you put no constraints on the tetrahedra, only the constraints on
surface facets will make the mesh work more.

Sebastien.


And in particular, if I'm not interested in the cells, how should I
set the parameters concerning it? i.e., cell_radius_edge_ratio and
cell_size.

Best,
Zesen

On Tue, May 22, 2018 at 2:25 PM, Sebastien Loriot (GeometryFactory)
[hidden email] wrote:
Note that this PR : https://github.com/CGAL/cgal/pull/3043
will bring some noticeable speed up as well as parallel mesh algorithm.

Best,

Sebastien.


On 05/22/2018 07:18 PM, Zesen Qian wrote:
Hi Sebastien,

Sorry for keep spamming your inbox - but I found how to sample areas
differently based on variety. For future reference, the parameter
distance_bound constrols the max distance from every generated facet
to the surface. So when the same value applies to different areas, the
areas with more details will get sampled more.

Thank you so much for the help!

Best,
Zesen

On Tue, May 22, 2018 at 11:11 AM, Zesen Qian [hidden email]
wrote:
Hi Sebastien,

I think I was mistaken - I tried it again and it seems that I don't
have to do too much about the angle_bound - adjusting other parameters
would suffice to give a decent result.

However, it is indeed slow. One feature of my mesh is that it donsn't
have to be evenly sampled - some areas require more details than
others.  Can I do some trick so that those area receive extra
sampling, while other more monotone area get less, so I can save some
processing time?

Best,
Zesen

On Tue, May 22, 2018 at 10:26 AM, Zesen Qian [hidden email]
wrote:
Hi Sebastien,

Thanks for this. I don't know if that's a similiar thing, but I tried
https://doc.cgal.org/latest/Surface_mesher/
by a distance function(with AABB_tree and side_of_triangle). Seen from
the source code of the plugin, it's very similar.

To get a decent result it's quite slow. If I set the angular bound to
90 degree(more than 30),  the algorithm is not garanteed to
terminate(and indeed in my case). My mesh has some very thin layers
that's easy  to be ignored by meshing, so I don't expect this method
to work.

What I'm now trying is simply using the "solidify" modifier in
Blender, and fix the potential self-intersections using refining and
outer-hull operation, and then use boolean operation with the original
mesh to get a offseted mesh. I'm using libigl to do these tasks.

Best,
Zesen

On Tue, May 22, 2018 at 9:59 AM, Sebastien Loriot (GeometryFactory)
[hidden email] wrote:
There is indeed nothing official in CGAL. However, in the Polyhedron
demo we wrote a small plugin that is meshing the distance function to
a
mesh
and the output is by construction guaranteed to be free from
self-intersections. However sharp features are not correctly meshed
if
not protected.

Go into 3D Surface Mesh Generation -> Offset meshing once having
loaded
a polyhedron.

Source code is here:


https://github.com/CGAL/cgal/blob/releases/CGAL-4.12-branch/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Offset_meshing_plugin.cpp

HTH,

Sebastien.


On 05/17/2018 07:44 PM, Zesen Qian wrote:
Hi list,

I have a triangulated, closed mesh which is free of any
degeneracies.
Is there any reliable way to offset this mesh? By reliable I mean
the
result mesh should be free of any degeneracies.

I searched on Internet and there is simply not an library/program
available that can do this. I guess CGAL isn't capable of this
either,
but I believe people on this list should be familiar with this topic
and maybe offer some comments.

Thank you.

Best,
Zesen

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss



--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss