Subject: CGAL users discussion list
List archive
- From: Sebastian Bachmann <>
- To:
- Subject: Re: [cgal-discuss] Smooth surfaces at image boundary
- Date: Tue, 10 May 2022 11:41:00 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-data: A9a23:ruhn4awvPcIiuv4ojeF6t+dAwCrEfRIJ4+MujC+fZmUNrF6WrkVTz jNOCz+Pa/fbNGrzeI0lPI7k80tQ656DndQyTQpkqFhgHilAwSbnLYTAfx2oZ0t+DeWaERk5t 51GAjXkBJppJpMJjk71atANlVEliefQAOCU5NfsYkidfyc9IMsaoU8lyrdRbrJA24DjWVvQ4 Iuq+aUzBXf8s9JKGjJMg068gEg31BjCkGtwUosWOJinFHeH/5UkJMp3yZOZdxMUcaEIdgKOf Nsv+Znilo/vE7jBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XOdJEAXq7hQllkPh0k 9ZslbWVEDsPZKHWtNQTXERWCmJHaPguFL/veRBTsOSWzkHJemHghe9jC1FwNJFwFuRfWD4Qs 61ed2BLN0vb7w616OrTpu1EhsknKM7DJo4Yqjdp0Vk1CN59HM2YGf6avLe02h9soP1pH9XAQ /EFbAJwdR3hYS1yN0wIXcdWcOCA3SCiLGYD8zp5v5Ef6GfayEl90aPmLcHOUsebQN1c2Eeev GPPuWrjaiz2L/SayDaK+2igwPXCmjO9UZ56+KCEGuBChQaQ50w6LUQqcwG3u9WJhEHjVcscE hlBksYxlpQa+EuuR9j7ehS3pn+YoxIRM+a89cVqs2lhLYKEuW6k6ng4oi1pNYV85Z5tLdA+/ g7VzoqxbdB6mOfNERqgGqGoQSSaFQV9EIPvTSoFQQQM+dWluow0nlTGUr6P8ZJZbPWuSVkcI BjT/EDSYon/a+ZQj81XGnid2VqRSmDhFFJd2+ktYkqr7xlieKmubJGy5F7Q4J5oddjEFADb5 SVUxpLDt4ji6K1hcgTdG43h+5n5vZ643MH03Q4H82QJrW/3oCL/I+i8HhkvdRwyaa7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O3qOr8vIpG6w4mtkBge6lva4l4j8EAQ05iT80sFjS STCqBuvKpmuzamxNvhrO1V5HFKpodQvAZlwy8Fj4fNYkWhfnJie+mAL1Hv+IckOk7yrd2IDH HZIypaW5RitnURnKjjhK5vRcHKbz4MhYtC7ZjlTwSch94VQD6zS6rVYnCxzq17+rATLYPE7k C1Pgf0poGUXhe0Eom9Phm2UH6wSEE9EPCftiwXA7tawq79SbXqudr743VR3nNSoBrWP6g9GX 3OxdpAnFC52psJxVTCEmGX08Z3hccLMYMg7sxyYnB7ag65PJZUh0PMWxGJmNW/7oXw52rs7g BhpjvTY9MCML2Rg+r78AwYNb2KrIZJVpWGr1P0GzaP0l8i1E55sGysGRs7tRPOsSncJsOj/c hyJG3s6o2uaHrzWGUme7l1npjTBCcPOVTnfKX8HwNFlXBTYKlZYhVVeXDg+mpkRDA2t1Irob A0qg1JZrk69sRZKxu9yYlPnVXzDoQ6zdjouYJ2eIBVf9A0E/UrSIYqX8qggekMQto3kpwuLJ GuBYg1OBmxcQU2ICWfoOby27MXB+eyVbgJfB/7PbbqHs+AYTfqP1dSmztk+l95jHt+COWkkB uFpgyKruFhjFsPJ3TwTGXR/qg==
- Ironport-sdr: 9066+QituTqQNrOnzOkMppNz4CZmidSbBPwd+jnoKih0wwVzQoaoK7eTPKFhdU66Fb37JfG6hh dA8/5ffr0DEP/mib/uUwBizZwztOeqBiFyowR9PbTJXBsTSYGHvlcIxlJt1TaiIZCNyyD6+u4J /3jsf6rtLCC6ps86cXt3QsPal2TvD31J1V5Mgmy/IEbJHifr5c0NVOHu/R1MeM3Xu0me4f/vOo XOSESz3JdKwGN0jqgfSVNUpfVcsJF340476dJh2qKzpwhsMRmEGxcpn7NkYqKS1fHUPmHEnkF7 JcGHWZqLyeCQVTt8JqmvMkU7
Great, thanks for the code, Sebastien! I'll give it a go, but I can not promise I get this done too soon :)
Best,
Sebastian
On 10.05.2022 09:25, Sebastien Loriot ( via cgal-discuss Mailing List) wrote:
You need to update the mesh domain you are using.
You create a new one that inherit from the one currently used
(Mesh_domain_with_polyline_features_3).
Then you internally define
struct My_domain:
public Domain
{
My_domain(const Domain& d)
: Domain(d)
{}
struct Construct_intersection
: public Base_domain::Construct_intersection
{
typedef Base_domain::Construct_intersection Base_functor;
typedef Base_domain::Intersection Intersection;
Construct_intersection(const Mesh_domain& domain)
: Base_functor(domain)
, r_domain_(domain)
{}
template <typename Query>
Intersection operator()(const Query& query) const
{
//fill here the special case. Query can be Line_3, Ray_3 or Segment_3
// if the cube is not intersected use Base_functor
return static_cast<const Base_functor&>(*this).operator()(query);
}
};
Construct_intersection construct_intersection_object() const
{
return Construct_intersection(*this);
}
};
I'd advise to first make it work the My_domain and operator() of Construct_intersection simply returning the base functor value and
then start modify that piece of code.
Do not hesitate to come back to us if you have questions (and to share
the working code :))
Best,
Sebastien.
On 5/9/22 17:04, Sebastian Bachmann ( via cgal-discuss Mailing List) wrote:
On 09.05.2022 16:13, Sebastien Loriot ( via cgal-discuss Mailing List) wrote:On the attached screenshot, you'll see in read the intersection of
the output mesh with the cube (0 0 0 -> 100 100 100).
So clearly, the mesh is not exactly on the cube.
The initialization (intersection of the image with the cube) is
done with points exactly on the cube. But then, intersection points
are computed by bisection (it is handled as an image).
okay I see. but in that case I should see some points directly on the image boundary? Or does this not apply to the mesh vertices itself?
Snapping could be done by using a dedicated oracle using a different
intersection computation function when the segment intersect the
boundary cube.
Do I understand it correctly, that the bisection is handled here: https://github.com/CGAL/cgal/blob/acbd1ee182211c6309f355925927802f036fbe13/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h#L713
?
I.e. I would have to change that, such that in the case of the image boundary, not `mid` is returned but a point exactly on that surface?
Best,
Sebastian
Best,
Sebastien.
On 5/9/22 10:43, hello ( via cgal-discuss Mailing List) wrote:Hello,
sure! Attached is an example source code and the resulting file for the 420 example.
I would have expected, that all nodes on the bounding surfaces are either at x/y/z 0 or 100 (as it is for the edges) but instead they appear roughly at 0 or 100 +-0.05.
It seems to correlate with the relative_error_bound, however I can only make the error smaller but not go away completely. (The attached file is generated with 1e-3)
Best,
Sebastian
On 09.05.22 09:23, Sebastien Loriot ( via cgal-discuss Mailing List) wrote:Hello,
could you share a minimal example showing the problem?
Thanks,
Sebastien.
On 5/7/22 13:37, Sebastian Bachmann ( via cgal-discuss Mailing List) wrote:Hello,
No one has an idea? Is it not somehow possible to restrict nodes onto a surface? I.e. if I have the polyline of the surface's boundary, can I specify that all nodes must be on that surface?
For now I have written a function to go over all nodes and check if they are near such a boundary face and then "pull" the nodes onto that surface. However, there are certain edge cases were this then yields collapsed triangles etc. Thus, solving this during meshing would be a great enhancement.
Best,
Sebastian
On 25.04.2022 07:16, Sebastian Bachmann ( via cgal-discuss Mailing List) wrote:Hello,
I created an image meshing tool, similar to the one given here in this example code: https://doc.cgal.org/latest/Mesh_3/Mesh_3_2mesh_3D_image_with_features_8cpp-example.html with the only difference, that I extract the surface elements and not write the full 3D mesh.
I noticed, that on the image boundary, the vertices would be not exactly on the face but roughly +- the relative error bound given in create_labeled_image_mesh_domain. For examples, nodes on the xy plane at z=0 are not on z=0 but for example -0.01 to 0.01. While the protected polylines are exact and have always z=0.
I created for example a mesh from the 420.inr example with the same meshing criteria as given in the example and can see that behaviour there.
While you can control the maximal deviation using the relative error bound, there will always be some deviation. And if I set the relative error bound too low, it seems the meshing never finishes.
I wonder now, if it is possible to constraint the mesh (similar to the 1d polylines), such that the vertices for facets on the image boundary, are always exactly on the image boundary?
Best,
Sebastian
- Re: [cgal-discuss] Smooth surfaces at image boundary, Sebastian Bachmann, 05/07/2022
- Re: [cgal-discuss] Smooth surfaces at image boundary, Sebastien Loriot, 05/09/2022
- Re: [cgal-discuss] Smooth surfaces at image boundary, hello, 05/09/2022
- Re: [cgal-discuss] Smooth surfaces at image boundary, Sebastien Loriot, 05/09/2022
- Re: [cgal-discuss] Smooth surfaces at image boundary, Sebastian Bachmann, 05/09/2022
- Re: [cgal-discuss] Smooth surfaces at image boundary, Sebastien Loriot, 05/10/2022
- Re: [cgal-discuss] Smooth surfaces at image boundary, Sebastian Bachmann, 05/10/2022
- Re: [cgal-discuss] Smooth surfaces at image boundary, Sebastien Loriot, 05/10/2022
- Re: [cgal-discuss] Smooth surfaces at image boundary, Sebastian Bachmann, 05/09/2022
- Re: [cgal-discuss] Smooth surfaces at image boundary, Sebastien Loriot, 05/09/2022
- Re: [cgal-discuss] Smooth surfaces at image boundary, hello, 05/09/2022
- Re: [cgal-discuss] Smooth surfaces at image boundary, Sebastien Loriot, 05/09/2022
Archive powered by MHonArc 2.6.19+.