commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Gilster <wesgils...@gmail.com>
Subject Applicability of PolyhedronsSet for high polygon counts
Date Sat, 05 Nov 2016 04:57:48 GMT
I've been using the commons math geometry libraries for some simple 2d 
intersection functions, but I'm now interested in expanding it's use to 
include some manipulation of 3d models with polygon counts that will 
easily reach 200,000 tris. More specifically I would like to build 
physical support structures in 3d models. Given that commons math geo 
libraries used BSP trees, I had assumed the performance would be quite 
adequate. However I'm having second thoughts as to whether this is the 
right API for this modeling. I'm building models from STL files with 
this constructor:
org.apache.commons.math3.geometry.euclidean.threed.PolyhedronsSet.PolyhedronsSet(List<Vector3D>,

List<int[]>, double)

It seems there are some quite in-efficient loops in here, and with 
models with high polygon counts this function really performs poorly:
org.apache.commons.math3.geometry.euclidean.threed.PolyhedronsSet.buildBoundary(List<Vector3D>,

List<int[]>, double)

It also seems as though this API is going to be quite intolerant of 
imperfect geometry.

Below is an example that loads an STL from disk and inserts into this 
the PolyhedronsSet:
https://github.com/WesGilster/Photonic3D/blob/master/host/src/main/java/org/area515/resinprinter/supports/ImpossiblePerformance.java

I'm hoping someone with a bit of experience in this API could confirm 
this assessment.

Thanks,
Wes G.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message