Subject: CGAL users discussion list
List archive
- From: Alexander Teibrich <>
- To:
- Subject: [cgal-discuss] Enlarging/Thickening a Polyhedron_3 or Nef_polyhedron_3
- Date: Tue, 3 Mar 2015 16:58:27 +0100
Hi,
I'm looking for a way to enlarge/thicken a non-convex Polyhedron_3 or Nef_polyhedron_3 A by a certain distance x to get B. Basically something like the outset function of inkscape [1]. Scaling alone is not an option, since I have to ensure that B is strictly contained in A.
My current approach is to iterate through all vertices and shift each vertices by x along the vertex normal, that is the average of the normals of all adjoining faces. This works with simple geometries, but quickly leads to self-intersecting faces and invalid Polyhedron_3 / Nef_polyhedron_3 with more complex geometries. Intersecting or overlapping geometries are not strictly a problem, but the geometry has to valid and manifold to be used for future CSG operations.
Shifting A into all possible directions (in 90° or 45° steps) and doing a union operation over all translations would work, but is horribly slow.
Is there a better way to do this?
Thanks!
Alex
--
Alexander Teibrich
\\ www.teibrich.de | +49 (0)151 56 11 29 52
- [cgal-discuss] Enlarging/Thickening a Polyhedron_3 or Nef_polyhedron_3, Alexander Teibrich, 03/03/2015
- Re: [cgal-discuss] Enlarging/Thickening a Polyhedron_3 or Nef_polyhedron_3, Alex Tsui, 03/03/2015
- Re: [cgal-discuss] Enlarging/Thickening a Polyhedron_3 or Nef_polyhedron_3, Alexander Teibrich, 03/03/2015
- Re: [cgal-discuss] Enlarging/Thickening a Polyhedron_3 or Nef_polyhedron_3, Alex Tsui, 03/03/2015
Archive powered by MHonArc 2.6.18.