Subject: CGAL users discussion list
List archive
- From: Michael Bieri <>
- To:
- Subject: Re: [cgal-discuss] 3D Mesh creates extremely small elements
- Date: Wed, 4 Oct 2017 19:55:28 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:RYx7fxENiH2CND+1PDzOG51GYnF86YWxBRYc798ds5kLTJ76oMSwAkXT6L1XgUPTWs2DsrQf1LqQ7viocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWE1iMJAhj0KSZyI+30HMaS05X2hKiO/MjYbAxMwTa8erhvNw6erAPLt8BQj5ExBLw2z07so3BIculSjUlpKEiS10L5582x8YRi2ytVsvMlscVHVPOpLOwDUbVEAWF+YCgO78rxuEyfHAY=
Le Wednesday, October 4, 2017 3:00:44 PM CEST Michael Bieri a écrit :
> So finally it would be possible that the features from the grid vs. the
> features from the 2-material+surface intersection are extremely close,
> thus forcing extremely small elements?
Yes, that is plausible.
> Would it make sense to extract all the 1D features and plot them in 3D?
> (I'm just thinking how to achieve this...)
>
>
> // For the 1D-features
> bool add_1D_features(const CGAL::Image_3& image,Mesh_domain& domain)
> {
> typedef K::Point_3 Point_3;
> typedef Mesh_domain::Image_word_type Word_type; // that is `unsigned
> char` std::vector<std::vector<Point_3> > features_inside;
> std::vector<std::vector<Point_3> > polylines_on_bbox;
> CGAL::polylines_to_protect<Point_3, Word_type>(image,
> polylines_on_bbox,features_inside.begin(), features_inside.end());
> domain.add_features(polylines_on_bbox.begin(), polylines_on_bbox.end());
> return true;
> }
In that function, you can dump the `polylines_on_bbox` in a file:
std::ofstream out("dump.polylines.txt");
for(auto polyline: polylines_on_bbox) {
out << polyline.size();
for(auto point: polyline) out << " " << p;
out << "\n";
}
(Note that I used C++11 for-loops.)
Then that file dump.polylines.txt can be opened with the demo from CGAL-4.11/demo/Polyhedron if you have compiled its target named `polylines_io_plugin`.
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- [cgal-discuss] 3D Mesh creates extremely small elements, Michael Bieri, 10/03/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Laurent Rineau (CGAL/GeometryFactory), 10/04/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Michael Bieri, 10/04/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Laurent Rineau (CGAL/GeometryFactory), 10/04/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Michael Bieri, 10/04/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Michael Bieri, 10/04/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Laurent Rineau (CGAL/GeometryFactory), 10/05/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Michael Bieri, 10/05/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Laurent Rineau (CGAL/GeometryFactory), 10/05/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Michael Bieri, 10/05/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Michael Bieri, 10/10/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Michael Bieri, 10/05/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Michael Bieri, 10/04/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Laurent Rineau (CGAL/GeometryFactory), 10/04/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Michael Bieri, 10/04/2017
- Re: [cgal-discuss] 3D Mesh creates extremely small elements, Laurent Rineau (CGAL/GeometryFactory), 10/04/2017
Archive powered by MHonArc 2.6.18.