On Tue, Apr 9, 2013 at 6:42 PM, Christopher Sean Morrison <brl...@mac.com> wrote: > The fix needed is a change to be spatially aware so that it doesn't have to > perform so many comparisons (O(N*log(N)). The next piece being added very > likely only intersects a few polygons. It should only compare against those > near it. Nothing at all hard, just not an optimization that's been performed > yet (we tend to abhor polygonal formats for their terrible analysis and > processing properites). > > Depending on how you combined the truss elements together, you may be able to > get a drastic reduction by changing your boolean recipe. For example, say > you had OBJ = A u B u C u D u E u F > > Changing that to spatially (and logically) group them first can cut down on > the number of comparisons: > OBJ = G1 u G2 u G3 > G1 = A u B > G2 = C u D > G3 = E u F > I finally got around to trying this, and it does improve things quite a bit! I just did one level of 'spatial awareness' so the scaling is ultimately still quadratic; plot attached. Here's the python script I used: https://gist.github.com/jstults/5855032
<<attachment: brlcad_union_time.png>>
------------------------------------------------------------------------------ This SF.net email is sponsored by Windows:
Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev
_______________________________________________ BRL-CAD Users mailing list brlcad-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-users