Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Inconsistent nef polyhedron topological properties
- Date: Mon, 30 Jan 2017 06:16:28 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:UubUPh89Woh11P9uRHKM819IXTAuvvDOBiVQ1KB31uocTK2v8tzYMVDF4r011RmSDNmdtagP0rCempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9ZDeZwpFiCC8bL9sIxm6sBvdvdQKjIV/Lao81gHHqWZSdeRMwmNoK1OTnxLi6cq14ZVu7Sdete8/+sBZSan1cLg2QrJeDDQ9LmA6/9brugXZTQuO/XQTTGMbmQdVDgff7RH6WpDxsjbmtud4xSKXM9H6QawyVD+/6apgVR3mhzodNzMh7W/ZlMJwgqJcoByiqRJwzYHbb4OJO/RxZa7dYdEXSHBdUspNWSFMAoWxZJYPAeobOuZYqpHwq1UToxSgHgajHvjvyiNJhnDo260xzuIvEQbc3AwhGNIOrGnfoNH0OqgMVuC1ybfHzSnZb/JW2Tny8pTHcgwmofGWXbN8dMTdwlQoGgPeilWQrpblPzKS1uQRqWSb6u5gWPmgi24isQ5xozyvyt0whYnOg4IY01bJ/jh3zoYyIN23Uk97Ydi8HZRMuCGVLY92TtklQ2FytyY3zKANt52jfCUSypkqyATTZ+GZf4WI+B7uV/idLS13iX9hYL6yhRW//VK+xuDzV8S4yktGoy5Ln9XWtH0A1xre4dWdRPRn5EeuwzOP2hjT6u5aJUA0krLWK5s7zb4xkpofqErCHirqlEnvgq+beUEp9vKn6+TgZbXmqZucOJFuhg7iNaQun9SzAeU+MgcQQ2iW4eax2bL58UHkXrlHjuc6n6rHvJzAKskWora1AwpP3YYi7xa/AS2m0NMdnXQfN1JFfBWHj5LoO1HJPPD0F/K/g1C3nTdkwvDJJLzhApHXInffl7fheK5x61RAxwor0dBf+5VUB6kdL/L8QEDxsMXUAQI4Mwyv3+nnFc591pgFVGKUAq6ZNbvSvkWS6uIuJemMfo4VtyznJ/gr/f69xUM+zFQSdK3s0ZoMY22jBdxnJV+YaDzimIQvC2AP60AFQebjk0GDXDgbQ3GoXqUgrnEUBYWjAJvZV66ki6CGxjb6VNUCfWRBEFGLDTHtc62LXv4NbGSZJco3wW9MbqSoV4J0jULmjwT90bcyduc=
- Organization: GeometryFactory
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
- [cgal-discuss] Inconsistent nef polyhedron topological properties, Nicholas Mario Wardhana, 01/24/2017
- Re: [cgal-discuss] Inconsistent nef polyhedron topological properties, Sebastien Loriot (GeometryFactory), 01/30/2017
- Re: [cgal-discuss] Inconsistent nef polyhedron topological properties, Nicholas Mario Wardhana, 01/30/2017
- Re: [cgal-discuss] Inconsistent nef polyhedron topological properties, Sebastien Loriot (GeometryFactory), 01/30/2017
- Re: [cgal-discuss] Inconsistent nef polyhedron topological properties, Nicholas Mario Wardhana, 01/30/2017
- Re: [cgal-discuss] Inconsistent nef polyhedron topological properties, Sebastien Loriot (GeometryFactory), 01/30/2017
Archive powered by MHonArc 2.6.18.