Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] 3D Mesh creates extremely small elements

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] 3D Mesh creates extremely small elements


Chronological Thread 
  • From: "Laurent Rineau (CGAL/GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] 3D Mesh creates extremely small elements
  • Date: Wed, 04 Oct 2017 17:38:29 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:z/9nvx/NmWO5Wf9uRHKM819IXTAuvvDOBiVQ1KB+2uocTK2v8tzYMVDF4r011RmSAtWdtqoMotGVmp6jcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS46tL2HV93a95DpXFhTkPhduPcz0HJTThoK5zbOc4ZrWNk9sjSenbLVuZC+3qwjYq4FWqqRLDuEexxzMr2dSaspfzn9vP0PS1V6o4s6t5pNl72JKuvQs/tNoWqrze+I/V7MOX2duCHw8+MC+7UqLdgCI/HZJCmg=
  • Organization: GeometryFactory

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/

 




Archive powered by MHonArc 2.6.18.

Top of Page