Hello, I am creating a cube as a nef polyhedron by defining it as the intersections of the negative sides of the 6 bounding planes, based on the following example: It then checks the properties, saves the cube to a nef3 file, loads it again, and checks the property again I would expect that the cube has the following properties.
My code prints the followings. CreateACube() LoadACube() I did not get many of the expected properties. However, the nef3 file does state: vertices 8 and when I cross-checked the result by loading the nef3 file to the polyhedron_3 demo (http://www.cgal.org/demo/4.9/polyhedron_3.zip), it correctly prints the followings.
The minimum working code and the resulting nef3 file are attached. Could anyone please point out my mistakes? Thank you. Best regards, Nicholas Mario Wardhana |
The difference you observe comes from the infimaximal box [1].
This means that you have another cube around your cube, which explains why all numbers but #volumes are doubled. Sebastien. [1] http://doc.cgal.org/latest/Nef_3/index.html#title2 On 01/24/2017 08:28 PM, Nicholas Mario Wardhana wrote: > Hello, > > I am creating a cube as a nef polyhedron by defining it as the > intersections of the negative sides of the 6 bounding planes, based on > the following example: > http://doc.cgal.org/latest/Nef_3/index.html#title6 > It then checks the properties, saves the cube to a nef3 file, loads it > again, and checks the property again > > I would expect that the cube has the following properties. > > * 2-manifold (is_simple() == true) > * The number of volumes = 2 (inside and outside the cube) > * The number of shells = 2 (the inside and outside boundaries) > * The number of facets = 6 > * The number of half-facets = 12 > * The number of edges = 12 > * The number of half-edges = 24 > * The number of vertices = 8 > > My code prints the followings. > > CreateACube() > nefCube.is_simple() == true > nefCube.number_of_volumes(), expected 2, result = 3 > GetNumberOfShells(nefCube), expected 2, result = 4 > nefCube.number_of_facets(), expected 6, result = 12 > nefCube.number_of_halffacets(), expected 12, result = 24 > nefCube.number_of_edges(), expected 12, result = 24 > nefCube.number_of_halfedges(), expected 24, result = 48 > nefCube.number_of_vertices(), expected 8, result = 16 > > > > LoadACube() > nefCube.is_simple() == true > nefCube.number_of_volumes(), expected 2, result = 3 > GetNumberOfShells(nefCube), expected 2, result = 4 > nefCube.number_of_facets(), expected 6, result = 12 > nefCube.number_of_halffacets(), expected 12, result = 24 > nefCube.number_of_edges(), expected 12, result = 24 > nefCube.number_of_halfedges(), expected 24, result = 48 > nefCube.number_of_vertices(), expected 8, result = 16 > > > I did not get many of the expected properties. > > However, the nef3 file does state: > > vertices 8 > halfedges 24 > facets 12 > volumes 2 > shalfedges 48 > shalfloops 0 > sfaces 16 > > > and when I cross-checked the result by loading the nef3 file to the > polyhedron_3 demo (http://www.cgal.org/demo/4.9/polyhedron_3.zip), it > correctly prints the followings. > > Test_ByEquation (mode: flat+edges, color: #6464ff) > Nef_3 polyhedron > > Number of vertices: 8 > Number of edges: 12 > Number of facets: 6 > number of volumes: 2 > > Bounding box: min (0,0,0), max (2,2,2) > > File:<path omitted>/CGAL/output/Test_ByEquation.nef3 > > > The minimum working code and the resulting nef3 file are attached. Could > anyone please point out my mistakes? Thank you. > > Best regards, > Nicholas Mario Wardhana -- You are currently subscribed to cgal-discuss. To unsubscribe or access the archives, go to https://sympa.inria.fr/sympa/info/cgal-discuss |
Dear Sebastien, Thank you for your reply. Regarding the number of volumes, am I correct to say that the number three comes from the volumes inside my cube, the one between my cube and infimaximal cube, and the one outside the infimaximal cube? Best regards, Nicholas On 30 January 2017 at 05:16, Sebastien Loriot (GeometryFactory) <[hidden email]> wrote: The difference you observe comes from the infimaximal box [1]. |
On 01/30/2017 12:40 PM, Nicholas Mario Wardhana wrote:
> Dear Sebastien, > > Thank you for your reply. > > Regarding the number of volumes, am I correct to say that the number > three comes from the volumes inside my cube, the one between my cube and > infimaximal cube, and the one outside the infimaximal cube? > Yes, exactly. Sebastien. > Best regards, > Nicholas > > On 30 January 2017 at 05:16, Sebastien Loriot (GeometryFactory) > <[hidden email] <mailto:[hidden email]>> wrote: > > The difference you observe comes from the infimaximal box [1]. > This means that you have another cube around your cube, which explains > why all numbers but #volumes are doubled. > > Sebastien. > > [1] http://doc.cgal.org/latest/Nef_3/index.html#title2 > <http://doc.cgal.org/latest/Nef_3/index.html#title2> > > > On 01/24/2017 08:28 PM, Nicholas Mario Wardhana wrote: > > Hello, > > I am creating a cube as a nef polyhedron by defining it as the > intersections of the negative sides of the 6 bounding planes, > based on > the following example: > http://doc.cgal.org/latest/Nef_3/index.html#title6 > <http://doc.cgal.org/latest/Nef_3/index.html#title6> > It then checks the properties, saves the cube to a nef3 file, > loads it > again, and checks the property again > > I would expect that the cube has the following properties. > > * 2-manifold (is_simple() == true) > * The number of volumes = 2 (inside and outside the cube) > * The number of shells = 2 (the inside and outside boundaries) > * The number of facets = 6 > * The number of half-facets = 12 > * The number of edges = 12 > * The number of half-edges = 24 > * The number of vertices = 8 > > > My code prints the followings. > > CreateACube() > nefCube.is_simple() == true > nefCube.number_of_volumes(), expected 2, result = 3 > GetNumberOfShells(nefCube), expected 2, result = 4 > nefCube.number_of_facets(), expected 6, result = 12 > nefCube.number_of_halffacets(), expected 12, result = 24 > nefCube.number_of_edges(), expected 12, result = 24 > nefCube.number_of_halfedges(), expected 24, result = 48 > nefCube.number_of_vertices(), expected 8, result = 16 > > > > LoadACube() > nefCube.is_simple() == true > nefCube.number_of_volumes(), expected 2, result = 3 > GetNumberOfShells(nefCube), expected 2, result = 4 > nefCube.number_of_facets(), expected 6, result = 12 > nefCube.number_of_halffacets(), expected 12, result = 24 > nefCube.number_of_edges(), expected 12, result = 24 > nefCube.number_of_halfedges(), expected 24, result = 48 > nefCube.number_of_vertices(), expected 8, result = 16 > > > I did not get many of the expected properties. > > However, the nef3 file does state: > > vertices 8 > halfedges 24 > facets 12 > volumes 2 > shalfedges 48 > shalfloops 0 > sfaces 16 > > > and when I cross-checked the result by loading the nef3 file to the > polyhedron_3 demo (http://www.cgal.org/demo/4.9/polyhedron_3.zip > <http://www.cgal.org/demo/4.9/polyhedron_3.zip>), it > correctly prints the followings. > > Test_ByEquation (mode: flat+edges, color: #6464ff) > Nef_3 polyhedron > > Number of vertices: 8 > Number of edges: 12 > Number of facets: 6 > number of volumes: 2 > > Bounding box: min (0,0,0), max (2,2,2) > > File:<path omitted>/CGAL/output/Test_ByEquation.nef3 > > > The minimum working code and the resulting nef3 file are > attached. Could > anyone please point out my mistakes? Thank you. > > Best regards, > Nicholas Mario Wardhana > > > > -- > You are currently subscribed to cgal-discuss. > To unsubscribe or access the archives, go to > https://sympa.inria.fr/sympa/info/cgal-discuss > <https://sympa.inria.fr/sympa/info/cgal-discuss> > > > -- You are currently subscribed to cgal-discuss. To unsubscribe or access the archives, go to https://sympa.inria.fr/sympa/info/cgal-discuss |
Free forum by Nabble | Edit this page |