Skip to Content.
Sympa Menu

cgal-discuss - RE: [cgal-discuss] What's the minimal requirement to use the Constructive Solid Geometry (CSG) module of CGAL?

Subject: CGAL users discussion list

List archive

RE: [cgal-discuss] What's the minimal requirement to use the Constructive Solid Geometry (CSG) module of CGAL?


Chronological Thread 
  • From: Zhanghong Tang <>
  • To: <>
  • Subject: RE: [cgal-discuss] What's the minimal requirement to use the Constructive Solid Geometry (CSG) module of CGAL?
  • Date: Tue, 31 Jan 2012 02:43:18 +1200
  • Importance: Normal

Dear Sebastien,

Thank you very much for your kindly reply. With your great help I read the examples "edge_collapse_polyhedron" and "edge_collapse_enriched_polyhedron" carefully and still confused by the complicated classes defined in CGAL. I still don't know how to simplify the surface mesh defined in the class 'Polyhedron'.

Suppose I have the following function, how to fill the code to simplify surface mesh to remove the duplicated vertices with distance less than 1.e-8 and degenerated triangles with area less than 2.220446049250313e-016?

void SimplifySurfaceMesh(Polyhedron *P)
{
    double mindis = 1.e-8;
    double minarea = 2.220446049250313e-016;
    /// how to simplify surface mesh defined in P?
}

Thanks



> Date: Mon, 30 Jan 2012 08:36:01 +0100
> From:
> To:
> Subject: Re: FW: [cgal-discuss] What's the minimal requirement to use the Constructive Solid Geometry (CSG) module of CGAL?
>
> On 01/30/2012 01:04 AM, Zhanghong Tang wrote:
> > Dear all,
> >
> > Could anyone help me to check my problem?
> >
> > I use the 3-D geometry boolean operation of CGAL to substract a slot
> > (test2.off) from a cylinder (test1.off), the result geometry represented
> > by test3.off seems to be not valid for mesh generation. There are many
> > duplicated vertices and degenerated facets (facets with area zero). Is
> > there any method to avoid that, or is there any check program to correct
> > the outputted OFF file?
> >
> If you work with a Polyhedron, you might want to try that:
>
> http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Surface_mesh_simplification/Chapter_main.html
>
> with a cost_function related to the size of the edge.
>
> Sebastien.
>
>
> > Thanks
> >
> > ------------------------------------------------------------------------
> > From:
> > To:
> > Date: Mon, 30 Jan 2012 03:04:13 +1200
> > Subject: RE: [cgal-discuss] What's the minimal requirement to use the
> > Constructive Solid Geometry (CSG) module of CGAL?
> >
> > Dear Sebastien,
> >
> > Thank you very much for point out this for me. Now it works.
> >
> > I have another question: I have one cylinder (test1.off) and a slot
> > (test2.off) be substracted from the cylinder, the result is test3.off.
> >
> > However, I checked the vertices of test3.off and found that many
> > vertices are duplicated. For example:
> > 0.06, 0, -0.15
> > 0.06, -2.63531e-017, -0.15
> >
> > and
> > 0.06, -2.63531e-017, -0.45
> > 0.06, 2.63531e-017, -0.45
> >
> > Furthermore, there are many facets look like a line, for example:
> > (24, 0, 54)
> >
> > I guess it is because of the 'exact construction' so the code still
> > takes (0.06, 0, -0.15) and (0.06, -2.63531e-017, -0.15) as different
> > vertices. Can I set anything in the code to set a 'inexact' threshold
> > and let the code combine the duplicated vertices and remove degenerated
> > facets?
> >
> > Thanks
> >
> >
> >
> >
> >
> > > Date: Fri, 27 Jan 2012 08:10:09 +0100
> > > From:
> > > To:
> > > Subject: Re: [cgal-discuss] What's the minimal requirement to use the
> > Constructive Solid Geometry (CSG) module of CGAL?
> > >
> > >
> > > (double)vp.x(); is a C-style cast to double and I don't know what is
> > > the result.
> > > The correct code is CGAL::to_double(vp.x()).
> > >
> > > Sebastien.
> > >
> > > On 01/27/2012 07:54 AM, Zhanghong Tang wrote:
> > > > Dear all,
> > > >
> > > > I modified code like this, this time it can run, but got error
> > data, for
> > > > example, 1.2334234e-300, however, I can output P to OFF file correctly.
> > > > could anyone help me to take a look at it?
> > > >
> > > > Thanks
> > > >
> > > >
> > > > PS: the modified code:
> > > >
> > > > Polyhedron *P=(Polyhedron *)object->obj;
> > > > Point_3 vp;
> > > > j=0;
> > > > for ( Vertex_iterator v = P->vertices_begin(); v !=
> > P->vertices_end(); ++v)
> > > > {
> > > > vp=(Point_3&)v->point();
> > > > doublearray[j++]=(double)vp.x();
> > > > doublearray[j++]=(double)vp.y();
> > > > doublearray[j++]=(double)vp.z();
> > > > }
> > > >
> > > >
> > > >
> > ------------------------------------------------------------------------
> > > > From:
> > > > To:
> > > > Date: Fri, 27 Jan 2012 17:23:40 +1200
> > > > Subject: RE: [cgal-discuss] What's the minimal requirement to use the
> > > > Constructive Solid Geometry (CSG) module of CGAL?
> > > >
> > > > Hi Sebastien,
> > > >
> > > > Thank you very much for point out this problem for me. Now the problem
> > > > is solved. However, it is very slow to do union operation when
> > there are
> > > > many similar objects like this. Is there any more efficient method
> > to do
> > > > union operation by using CGAL?
> > > >
> > > > In addition, how to output the coordinates of vertices to an array? The
> > > > following code seems to be wrong, how to modify the code?
> > > >
> > > >
> > > > Thanks
> > > >
> > > >
> > > >
> > > > PS: the code to output coordinates of vertices to array
> > > >
> > > > Polyhedron P=*(Polyhedron *)object->obj;
> > > > ...
> > > > j=0;
> > > > for ( Vertex_iterator v = P.vertices_begin(); v !=
> > P.vertices_end(); ++v)
> > > > {
> > > > doublearray[j++]=v->point()->x;
> > > > doublearray[j++]=v->point()->y;
> > > > doublearray[j++]=v->point()->z;
> > > > }
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > > Date: Wed, 25 Jan 2012 08:53:32 +0100
> > > > > From:
> > > > > To:
> > > > > Subject: Re: [cgal-discuss] What's the minimal requirement to use the
> > > > Constructive Solid Geometry (CSG) module of CGAL?
> > > > >
> > > > > When you provide a face to nef polyhedron, it assumes that the
> > points of
> > > > > the face lies exactly on a plane. In you example, you have quad-faces
> > > > > with non coplanar vertices.
> > > > > To solve this issue, you can for example triangulate the faces of
> > each
> > > > > of your models (see attachement).
> > > > >
> > > > > Sebastien.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On 01/25/2012 06:26 AM, Zhanghong Tang wrote:
> > > > > > Dear all,
> > > > > >
> > > > > > With the following code, I'd like to add multiple objects into
> > one and
> > > > > > then output the union to an OFF file, however, the code crashed in
> > > > the line
> > > > > > Nef_polyhedron nef_obj(obj);
> > > > > >
> > > > > > how to modify the code to let it works? I will be very
> > appericate if
> > > > > > anyone help me to check the code.
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > > PS: the code
> > > > > >
> > > > > > typedef struct object
> > > > > > {
> > > > > > void *obj;
> > > > > > }myobj;
> > > > > >
> > > > > > void UnionObject(myobj *object, void *unionobj, int nobject)
> > > > > > {
> > > > > > Polyhedron obj, UnitedObj;
> > > > > > Nef_polyhedron nef_uni;
> > > > > > for (int i=0;i<nobject;i++)
> > > > > > {
> > > > > > obj=*(Polyhedron *)object[i].obj;
> > > > > > Nef_polyhedron nef_obj(obj);
> > > > > > if(i==0)
> > > > > > nef_uni = nef_obj;
> > > > > > else
> > > > > > nef_uni = nef_uni + nef_obj;
> > > > > >
> > > > > > }
> > > > > > nef_uni.convert_to_polyhedron(UnitedObj);
> > > > > > }
> > > > > >
> > > > > > There are totally 6 objects to be added, the off files
> > generated from
> > > > > > object[i].obj (i=0,1,2,3,4,5) are attached.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > From:
> > > > > > To:
> > > > > > Date: Wed, 25 Jan 2012 15:11:04 +1200
> > > > > > Subject: RE: [cgal-discuss] What's the minimal requirement to
> > use the
> > > > > > Constructive Solid Geometry (CSG) module of CGAL?
> > > > > >
> > > > > > Hi Guillaume,
> > > > > >
> > > > > > Thank you very much for your kindly reply. Now I have the following
> > > > code
> > > > > > to unite many objects into one:
> > > > > >
> > > > > > typedef struct object
> > > > > > {
> > > > > > void *obj;
> > > > > > }myobj;
> > > > > >
> > > > > > void UnionObject(myobj *object, void *unionobj, int nobject)
> > > > > > {
> > > > > > Polyhedron obj, UnitedObj;
> > > > > > Nef_polyhedron nef_uni;
> > > > > > for (int i=0;i<nobject;i++)
> > > > > > {
> > > > > > obj=*(Polyhedron *)object[i].obj;
> > > > > > Nef_polyhedron nef_obj(obj);
> > > > > > if(i==0)
> > > > > > nef_uni = nef_obj;
> > > > > > else
> > > > > > nef_uni = nef_uni + nef_obj;
> > > > > >
> > > > > > }
> > > > > > nef_uni.convert_to_polyhedron(UnitedObj);
> > > > > > }
> > > > > >
> > > > > > However, the program crash in the line
> > > > > > Nef_polyhedron nef_obj(obj);
> > > > > >
> > > > > > Is there any missing to do this? How to modify the code to let the
> > > > > > multiple objects be united correctly?
> > > > > >
> > > > > > I checked the polyhedron obj of every object[i].obj and output
> > them to
> > > > > > OFF file and they are all correct (under Guillaume's help).
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > From:
> > > > > > To:
> > > > > > Subject: RE: [cgal-discuss] What's the minimal requirement to
> > use the
> > > > > > Constructive Solid Geometry (CSG) module of CGAL?
> > > > > > Date: Wed, 25 Jan 2012 14:00:22 +1200
> > > > > >
> > > > > > Hi Guillaume,
> > > > > >
> > > > > > Thank you very much for your kindly reply. Now I have the following
> > > > code
> > > > > > to unite many objects into one:
> > > > > >
> > > > > > typedef struct object
> > > > > > {
> > > > > > void *obj;
> > > > > > }myobj;
> > > > > >
> > > > > > void UnionObject(myobj *object, void *unionobj, int nobject)
> > > > > > {
> > > > > > Polyhedron obj, UnitedObj;
> > > > > > Nef_polyhedron nef_uni;
> > > > > > for (int i=0;i<nobject;i++)
> > > > > > {
> > > > > > obj=*(Polyhedron *)object[i].obj;
> > > > > > Nef_polyhedron nef_obj(obj);
> > > > > > if(i==0)
> > > > > > nef_uni = nef_obj;
> > > > > > else
> > > > > > nef_uni = nef_uni + nef_obj;
> > > > > >
> > > > > > }
> > > > > > nef_uni.convert_to_polyhedron(UnitedObj);
> > > > > > }
> > > > > >
> > > > > > However, the program crash in the line
> > > > > > Nef_polyhedron nef_obj(obj);
> > > > > >
> > > > > > Is there any missing to do this?
> > > > > > I checked the polyhedron obj of every object[i].obj and output
> > them to
> > > > > > OFF file and they are all correct (under Guillaume's help).
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > Date: Tue, 24 Jan 2012 10:20:05 +0100
> > > > > > From:
> > > > > > To:
> > > > > > Subject: Re: [cgal-discuss] What's the minimal requirement to
> > use the
> > > > > > Constructive Solid Geometry (CSG) module of CGAL?
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Hi Guillaume,
> > > > > >
> > > > > > Thank you very much for your encouragement. I don't understand the
> > > > > > benefit to wirte like this: the very complex class,
> > constructor, and
> > > > > > so on.
> > > > > >
> > > > > >
> > > > > > The benefit is genericity.
> > > > > >
> > > > > >
> > > > > > Is it possible to write just what need to be executed, or the
> > > > > > process of execute can be see naturaly. For example:
> > > > > >
> > > > > > the function:
> > > > > >
> > > > > > Polyhedron Build_triangle(int nVertices0, double *Vertices0, int
> > > > > > nTri0, int *Tri0)
> > > > > > {
> > > > > > ...
> > > > > > }
> > > > > >
> > > > > > the caller:
> > > > > > ...
> > > > > > Polyhedron P;
> > > > > > P=Build_triangle(nVertices,Vertices,nTri,Tri);
> > > > > >
> > > > > >
> > > > > > No this is not possible: you have to use the format required by the
> > > > > > incremental builder class...
> > > > > >
> > > > > >
> > > > > > ...
> > > > > >
> > > > > > By the way, the following code can output the polyhedron to OFF
> > > > > > format to the screen (from the example
> > 'polyhedron_prog_cut_cube.cpp'):
> > > > > > std::cout << P;
> > > > > >
> > > > > > how to modify the code to let it output to a file 'filename' with
> > > > > > the definition:
> > > > > > char *filename;
> > > > > >
> > > > > >
> > > > > > Use ofstream. Cf for example
> > > > http://www.cplusplus.com/doc/tutorial/files/
> > > > > >
> > > > > > Guillaume
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > Date: Tue, 24 Jan 2012 08:28:50 +0100
> > > > > > From:
> > > > > > <mailto:>
> > > > > > To: <mailto:>
> > > > > > Subject: Re: [cgal-discuss] What's the minimal requirement to use
> > > > > > the Constructive Solid Geometry (CSG) module of CGAL?
> > > > > >
> > > > > >
> > > > > > Hi Guillaume,
> > > > > >
> > > > > > Thank you very much for your kindly reply. Now the problem is
> > > > > > solved. I should modify the code like this:
> > > > > >
> > > > > >
> > > > > > Perfect.
> > > > > >
> > > > > >
> > > > > > class Build_triangle : public CGAL::Modifier_base<HDS> {
> > > > > > public:
> > > > > > int nVertices;
> > > > > > double *Vertices;
> > > > > > int nTri;
> > > > > > int *Tri;
> > > > > > Build_triangle(int nVertices0, double *Vertices0, int nTri0, int
> > > > > > *Tri0)
> > > > > > {
> > > > > > nVertices=nVertices0;
> > > > > > Vertices=Vertices0;
> > > > > > nTri=nTri0;
> > > > > > Tri=Tri0;
> > > > > > }
> > > > > >
> > > > > >
> > > > > > Now my question is: can I pass parameters as a more simple and
> > > > > > understandable way, just like the 'Fortran' subroutine?
> > > > > >
> > > > > >
> > > > > > What do you mean by "more simple and understandable way" ?
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > From: <mailto:>
> > > > > > To:
> > > > > > <mailto:>
> > > > > > Date: Tue, 24 Jan 2012 19:02:57 +1200
> > > > > > Subject: RE: [cgal-discuss] What's the minimal requirement to
> > > > > > use the Constructive Solid Geometry (CSG) module of CGAL?
> > > > > >
> > > > > > Hi Guillaume,
> > > > > >
> > > > > > Thank you very much for your kindly reply. I am new to C++ class
> > > > > > and the complex operators and don't know how to modify the code
> > > > > > to pass the parameters to the operator. Is there any simple way
> > > > > > to read the input vertices and facets from other functions to
> > > > > > form the polyhedron of CGAL? To let the CGAL do boolean
> > > > > > operations, should I do like the example? What's the simplest
> > > > > > way? I need to generate polyhedron from CSG and then let CGAL to
> > > > > > do the boolean opearations and then output the results to OFF file.
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > Date: Tue, 24 Jan 2012 07:09:53 +0100
> > > > > > From:
> > > > > > <mailto:>
> > > > > > To:
> > > > > > <mailto:>
> > > > > > Subject: Re: [cgal-discuss] What's the minimal requirement to
> > > > > > use the Constructive Solid Geometry (CSG) module of CGAL?
> > > > > >
> > > > > > The variables nVertices,Vertices,nTri,nTri are parameters of the
> > > > > > constructor of your class.
> > > > > > Thus they are not defined in the operator(). You need to define
> > > > > > variables in your class in order to store them.
> > > > > > Guillaume
> > > > > >
> > > > > >
> > > > > > Dear Dr. Loriot,
> > > > > >
> > > > > > Thank you very much for your kindly reply. I am trying to
> > > > > > study the example 'polyhedron_prog_incr_builder' and tried
> > > > > > to modify the file 'polyhedron_prog_incr_builder.cpp' as
> > > > > > follows:
> > > > > >
> > > >
> > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> > > > > >
> > > > > > #include <CGAL/Simple_cartesian.h>
> > > > > > #include <CGAL/Polyhedron_incremental_builder_3.h>
> > > > > > #include <CGAL/Polyhedron_3.h>
> > > > > >
> > > > > > // A modifier creating a triangle with the incremental builder.
> > > > > > template <class HDS>
> > > > > > class Build_triangle : public CGAL::Modifier_base<HDS> {
> > > > > > public:
> > > > > > Build_triangle(int nVertices, double *Vertices, int nTri,
> > > > > > int *Tri) {}
> > > > > > void operator()( HDS& hds) {
> > > > > > // Postcondition: `hds' is a valid polyhedral surface.
> > > > > > CGAL::Polyhedro n_incremental_builder_3<HDS> B( hds, true);
> > > > > > B.begin_surface( 3, 1, 6);
> > > > > > typedef typename HDS::Vertex Vertex;
> > > > > > typedef typename Vertex::Point Point;
> > > > > > double *v=Vertices;
> > > > > > for (int i=0;i<nVertices;i++)
> > > > > > B.add_vertex( Point( *v++, *v++, *v++));
> > > > > > for (int i=0;i<nTri;i++)
> > > > > > {
> > > > > > B.begin_facet();
> > > > > > B.add_vertex_to_facet( *Tri++);
> > > > > > B.add_vertex_to_facet( *Tri++);
> > > > > > B.add_vertex_to_facet( *Tri++);
> > > > > > B.end_facet();
> > > > > > }
> > > > > > B.end_surface();
> > > > > > }
> > > > > > };
> > > > > >
> > > > > > typedef CGAL::Simple_cartesian<double> Kernel;
> > > > > > typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
> > > > > > typedef Polyhedron::HalfedgeDS HalfedgeDS;
> > > > > >
> > > > > > int main() {
> > > > > > ; Polyhedron P;
> > > > > > int nVertices=3;
> > > > > > double Vertices[]={0, 0, 0,1, 0, 0,0, 1, 0};
> > > > > > int nTri=1;
> > > > > > int Tri[]={0,1,2};
> > > > > > Build_triangle<HalfedgeDS>
> > > > > > triangle(nVertices,Vertices,nTri,Tri);
> > > > > > P.delegate( triangle);
> > > > > > //CGAL_assertion( P.is_triangle( P.halfedges_begin()));
> > > > > > return 0;
> > > > > > }
> > > > > >
> > > > > >
> > > >
> > ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> > > > > >
> > > > > >
> > > > > > The following errors displayed:
> > > > > > 1>------ Build started: Project:
> > > > > > polyhedron_prog_incr_builder, Configuration: Debug Win32 ------
> > > > > > 1>Build started 2012/1/24 11:50:26.
> > > > > > 1>InitializeBuildStatus:
> > > > > > 1> Touching
> > > > > >
> > "polyhedron_prog_incr_builder.dir\Debug\polyhedron_prog_incr_builder
> > > > > > .unsuccessfulbuild".
> > > > > > 1>CustomBuild:
> > > > > > 1> All outputs are up-to-date.
> > > > > > 1>ClCompile:
> > > > > > 1> polyhedron_prog_incr_builder.cpp
> > > > > >
> > > >
> > 1>D:\CGAL\CGAL3.9\CGAL-3.9\examples\Polyhedron\polyhedron_prog_incr_builder.cpp(16):
> > > > > > error C2065: 'Vertices' : undeclared identifier
> > > > > > 1>
> > > > > >
> > > >
> > D:\CGAL\CGAL3.9\CGAL-3.9\examples\Polyhedron\polyhedron_prog_incr_builder.cpp(10)
> > > > > > : while compiling class template member function 'void
> > > > > > Build_triangle<HDS>::operator ()(HDS &)'
> > > > > > 1> with
> > > > > > 1> [
> > > > > > 1> HDS=HalfedgeDS
> > > > > > 1> ]
> > > > > > 1>
> > > > > >
> > > >
> > D:\CGAL\CGAL3.9\CGAL-3.9\examples\Polyhedron\polyhedron_prog_incr_builder.cpp(41)
> > > > > > : see reference to class template instantiation
> > > > > > 'Build_triangle<HDS>' being compiled
> > > > > > 1> with
> > > > > > 1> [
> > > > > > 1> HDS=HalfedgeDS
> > > > > > 1> ]
> > > > > >
> > > >
> > 1>D:\CGAL\CGAL3.9\CGAL-3.9\examples\Polyhedron\polyhedron_prog_incr_builder.cpp(17):
> > > > > > error C2065: 'nVertices' : undeclared identifier
> > > > > >
> > > >
> > 1>D:\CGAL\CGAL3.9\CGAL-3.9\examples\Polyhedron\polyhedron_prog_incr_builder.cpp(19):
> > > > > > error C2065: 'nTri' : undeclared identifier
> > > > > >
> > > >
> > 1>D:\CGAL\CGAL3.9\CGAL-3.9\examples\Polyhedron\polyhedron_prog_incr_builder.cpp(22):
> > > > > > error C2065: 'Tri' : undeclared identifier
> > > > > >
> > > >
> > 1>D:\CGAL\CGAL3.9\CGAL-3.9\examples\Polyhedron\polyhedron_prog_incr_builder.cpp(23):
> > > > > > error C2065: 'Tri' : undeclared identifier
> > > > > > 1>D:\CGAL\CGAL3.9\CGAL-3.9\examples\Polyhedron\poly
> > > > > > hedron_prog_incr_builder.cpp(24): error C2065: 'Tri' :
> > > > > > undeclared identifier
> > > > > > 1>
> > > > > > 1>Build FAILED.
> > > > > > 1>
> > > > > > 1>Time Elapsed 00:00:02.53
> > > > > > ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0
> > > > > > skipped ==========
> > > > > >
> > > > > >
> > > > > > Could you please help me to check the problem?
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > >
> > > > > > > Date: Wed, 18 Jan 2012 11:55:11 +0100
> > > > > > > From: <mailto:>
> > > > > > > To:
> > > > > > <mailto:>
> > > > > > > Subject: Re: [cgal-discuss] What's the minimal
> > > > > > requirement to use the Constructive Solid Geometry (CSG)
> > > > > > module of CGAL?
> > > > > > >
> > > > > > > CGAL cannot handle directly cylinders but only discrete
> > > > > > polyhedral models.
> > > > > > >
> > > > > > > See the documentation of Nef package for more details:
> > > > > > >
> > > > > >
> > > >
> > http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Nef_3/Chapter_main.html
> > > > > > >
> > > > > > > Sebastien.
> > > > > > >
> > > > > > > On 01/18/2012 10:41 AM, Zhanghong Tang wrote:
> > > > > > > > Dear Dr. Loriot,
> > > > > > > >
> > > > > > > > Thank you very much for your kindly reply.
> > > > > > > >
> > > > > > > > My requirement is as follows:
> > > > > > > > 1) read the geometries to do the operations;
> > > > > > > > for example, two cylinders with both radius 1 and
> > > > > > length 10, the center
> > > > > > > > of top and bottom facet of two cylinders are:
> > > > > > > > cylinder 1:
> > > > > > > > top facet: (0,0,5)
> > > > > > > > bottom facet: (0,0,-5)
> > > > > > > > cylinder 2:
> > > > > > > > top facet (5,0,0)
> > > > > > > > bottom facet: (-5,0,0)
> > > > > > > >
> > > > > > > > 2) find the 3D Boolean operations of input objects and
> > > > > > output the
> > > > > > > > presentation by OFF file format.
> > > > > > > > for example, find the unite of two crossed cylinders
> > > > > > and output the
> > > > > > > > presentation by OFF file format.
> > > > > > > >
> > > > > > > >
> > > > > > > > How to implement this with mimimal code?
> > > > > > > >
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Zhanghong Tang
> > > > > > > >
> > > > > > > >
> > > > > > > > P.S.:
> > > > > > > > I notice that the mesher 'NetGen' takes the CSG format
> > > > > > as its input
> > > > > > > > file, however, it can't handle the simplest example (it
> > > > > > works when the
> > > > > > > > radius of two cylinders are not equal), I guess that
> > > > > > the CGAL can handle
> > > > > > > > it easily.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > > Date: Wed, 18 Jan 2012 08:25:30 +0100
> > > > > > > > > From: <mailto:>
> > > > > > > > > To:
> > > > > > <mailto:>
> > > > > > > > > Subject: Re: [cgal-discuss] What's the minimal
> > > > > > requirement to use the
> > > > > > > > Constructive Solid Geometry (CSG) module of CGAL?
> > > > > > > > >
> > > > > > > > > Zhanghong Tang wrote:
> > > > > > > > > > Dear all,
> > > > > > > > > >
> > > > > > > > > > I would like use the CSG module of CGAL, what's the
> > > > > > minimal
> > > > > > > > requirement
> > > > > > > > > > to use this module? I want to build it to a
> > > > > > blockbox with CSG module
> > > > > > > > > > data input and another format data output (for
> > > > > > example, piecewise
> > > > > > > > linear
> > > > > > > > > > complex format, Geomview's polyhedral file format
> > > > > > (OFF)), which files
> > > > > > > > > > should I select to compile and is there any
> > > > > > interface to use this
> > > > > > > > module?
> > > > > > > > > >
> > > > > > > > > > Thanks,
> > > > > > > > > > Zhanghong Tang
> > > > > > > > > >
> > > > > > > > > Your question is not clear to me. Could you explain
> > > > > > what you are looking
> > > > > > > > > for exactly?
> > > > > > > > &g t;
> > > > > > > > > For 3D Boolean operations, you need to use Nef_3:
> > > > > > > > >
> > > > > > > >
> > > > > >
> > > >
> > http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Nef_3/Chapter_main.html
> > > > > > > > > For simple polyhedron manipulation, you can use
> > > > > > Polyhedron_3:
> > > > > > > > >
> > > > > > > >
> > > > > >
> > > >
> > http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Polyhedron/Chapter_main.html
> > > > > > > > >
> > > > > > > > > Sebastien.
> > > > > > > > > ;
> > > > > > > > > --
> > > > > > > > > You are currently subscribed to cgal-discuss.
> > > > > > > > > To unsubscribe or access the archives, go to
> > > > > > > > > https://lists-sop.inria.fr/wws/info/cgal-discuss
> > > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > You are currently subscribed to cgal-discuss.
> > > > > > > To unsubscribe or access the archives, go to
> > > > > > > https://lists-sop.inria.fr/wws/info/cgal-discuss
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > ===================================================================
> > > > > > Guillaume DAMIAND
> > > > > >
> > > > > > CNRS, LIRIS UMR 5205
> > > > > > Université Claude Bernard
> > > > > > Bâtiment Nautibus (710)
> > > > > > 43 Boulevard du 11 Novembre 1918
> > > > > > 69622 Villeurbanne Cedex (France)
> > > > > > -------------------------------------------------------------------
> > > > > > Phone: +33 (0)4.72.43.26.62 Fax: +33 (0)4.72.43.15.36
> > > > > > Mail:
> > > > <mailto:>
> > > > > > ===================================================================
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > ===================================================================
> > > > > > Guillaume DAMIAND
> > > > > >
> > > > > > CNRS, LIRIS UMR 5205
> > > > > > Université Claude Bernard
> > > > > > Bâtiment Nautibus (710)
> > > > > > 43 Boulevard du 11 Novembre 1918
> > > > > > 69622 Villeurbanne Cedex (France)
> > > > > > -------------------------------------------------------------------
> > > > > > Phone: +33 (0)4.72.43.26.62 Fax: +33 (0)4.72.43.15.36
> > > > > > Mail:
> > > > <mailto:>
> > > > > > ===================================================================
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > ===================================================================
> > > > > > Guillaume DAMIAND
> > > > > >
> > > > > > CNRS, LIRIS UMR 5205
> > > > > > Université Claude Bernard
> > > > > > Bâtiment Nautibus (710)
> > > > > > 43 Boulevard du 11 Novembre 1918
> > > > > > 69622 Villeurbanne Cedex (France)
> > > > > > -------------------------------------------------------------------
> > > > > > Phone: +33 (0)4.72.43.26.62 Fax: +33 (0)4.72.43.15.36
> > > > > > Mail:
> > > > <mailto:>
> > > > > > ===================================================================
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > You are currently subscribed to cgal-discuss.
> > > > > To unsubscribe or access the archives, go to
> > > > > https://lists-sop.inria.fr/wws/info/cgal-discuss
> > > > >
> > >
> > >
> > > --
> > > You are currently subscribed to cgal-discuss.
> > > To unsubscribe or access the archives, go to
> > > https://lists-sop.inria.fr/wws/info/cgal-discuss
> > >
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>



Archive powered by MHonArc 2.6.16.

Top of Page