|
Geometry : |
Subject: [geometry] polyhedron clipping/capping algorithm using boost
From: Tomislav Maric (tomislav.maric_at_[hidden])
Date: 2013-01-23 04:25:38
Hi everyone,
I'm a mechanical engineer doing a PhD in computational science, and as a part of
my topic, I have implemented a *very simple* geometrical library that deals with
intersections of convex polyhedra (polygon clipping/capping algorithm). This
library is a part of a larger algorithm used for Direct Numerical Simulations of
two-phase flows.
I needed to take care of a lot of issues involving tolerances, special cases,
etc. Profiling the client code has shown that the bottleneck of the whole
simulation lies in the geometrical intersections. The code is running, but
I'm sure I messed up when it comes to efficiency of the geometrical library.
I would like to implement an alternative to the polyhedron intersection
algorithm using boost.geometry.
Basically, my polyhedron is a "soup of 3D polygons" and I perform the
intersection by clipping each polygon and then capping the set of polygons using
an angle sort (to fill the hole made by clipping). Would something like this be
possible using the boost.geometry library? The computation of the polyhedron
volume is done by tetrahedral decomposition of the polyhedron (necessary since
some of the polyhedron faces may end up being slightly non-planar).
Sorry for the lengthy e-mail...
Best regards,
Tomislav Maric
Geometry list run by mateusz at loskot.net