Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features
Chronological Thread
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features
- Date: Wed, 15 Jun 2011 16:10:18 +0200
- Organization: GeometryFactory
On mardi 14 juin 2011 20:27:13 Michel Audette wrote:
> Hi Laurent,
>
> this polyline code was taken verbatim from the example
>
> examples/Mesh_3/mesh_two_implicit_spheres_with_balls.cpp
>
> * Polylines polylines (1);
> Polyline& polyline = polylines.front();
>
> for(int i = 0; i < 360; ++i)
> {
> Point p (1, std::cos(i*CGAL_PI/180), std::sin(i*CGAL_PI/180));
> polyline.push_back(p);
> }
> polyline.push_back(polyline.front()); // close the line
>
> // Insert edge in domain
> domain.add_features(polylines.begin(), polylines.end());
> *
> I don't understand why what is admissible for the implicit function example
> is inadmissible for the polyhedral surface input. Can you elaborate? Sorry
> to be a pest...
In this example, the domain to be meshed is the union of those intersecting
sphere. The polyline 'polyline' is a closed polyline with 361 vertices that
corresponds to the circle that is the intersection between the two spheres.
That means that this polyline will be represented in the final mesh, probably
remeshed with less than 360 vertices.
In your example, the domain to be meshed seems is a polyhedron. You defined
only *one* polyline that contains all vertices of the polyhedron. That cannot
be correct. If you want to preserve *all* edges of the polyhedron (a very bad
idea in my opinion), the code would be something like:
// ...
Polylines polylines;
Polyhedron::Edge_iterator itr_e;
for(itr_e= polyhedron.edges_begin(); itr_e!= polyhedron.edges_end(); ++itr_e )
{
Polyline new_polyline;
new_polyline.push_back(itr_e->vertex()->point());
new_polyline.push_back(itr_e->opposite()->vertex()->point());
// push the polyline (actually a segment) to the set of polylines
polylines.push_back(new_polyline);
}
domain.add_features(polylines.begin(), polylines.end());
// ...
That is probably not a good idea to push all edges of a polyhedron as feature
polylines. Because the CGAL 3D mesher will start by sampling all edges of the
polyhedron.
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- [cgal-discuss] meshing with hard feature boundary: using all edges as features, Michel Audette, 06/10/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Laurent Rineau (GeometryFactory), 06/10/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Michel Audette, 06/10/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Michel Audette, 06/10/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Michel Audette, 06/12/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Laurent Rineau (GeometryFactory), 06/14/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Michel Audette, 06/14/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Michel Audette, 06/14/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Laurent Rineau (GeometryFactory), 06/15/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Laurent Rineau (GeometryFactory), 06/15/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Michel Audette, 06/15/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Michel Audette, 06/14/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Michel Audette, 06/14/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Michel Audette, 06/10/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Michel Audette, 06/10/2011
- Re: [cgal-discuss] meshing with hard feature boundary: using all edges as features, Laurent Rineau (GeometryFactory), 06/10/2011
Archive powered by MHonArc 2.6.16.