On Dec 08, 2010, at 08:36 PM, John Anderson <[email protected]> wrote:

Sean,

I have attached a slightly modified version of conversion.sh for
your consideration. This version only converts regions. I don't think we
have ever had a primitive conversion failure, and converting
combinations will just convert each region and primitive in the
combination. So, converting every object results in converting
everything many times. This change should considerably shorten the time
it takes to run the script. What do you think?

John,

I think it's a good option to have, but I wouldn't remove the ability to test everything.  I considered only regions, but went ahead and let it default to all (geometry) objects.  It was intentionally set up to convert everything for several reasons.

First, I wanted to answer the simple question "how much of this file will convert?" to get an overall sense of of failure rate.  Naturally, that means the rate will be slightly biased as a low-level failure propagates up the hierarchy but I felt that it more faithfully answered the question and reflected end-user use more closely.  Second, I wanted to capture the time involved with the O(N^inf) approach being used to combine objects above the region level.  Seeing that runtime explosion as you walk up the hierarchy has already led to an infinite loop getting fixed and at least a 70% reduction in time after some targeted profiling -- those wouldn't have likely been caught at/below the region level.

To combat the runtime when profiling wasn't the goal, a MAXTIME parameter was added to abort the conversion after # seconds.  So you can effectively get the same runtime as your mod just by setting that param to "2" since most combs above the region level will take longer due to runtime exponentiation.  Having an option to only convert subset types of objects (such as only regions) would be a great option to have, though, and fortunately the search command already has that filtering option built-in (search -type r instead of ls -r).

How about adding "not" and "only" commands with recognized categories for 'primitives', 'regions', 'combinations', 'groups', etc?  So you could run something like [[ conversion.sh --only regions *.g ]] or [[ conversion.sh --only tops *.g ]] when we get closer to 100%.  I can look into adding those options later this week if nobody gets to it beforehand -- working on replacing the recent file semaphore addition with a signal-based approach later this week.

For what it's worth, I've actually seen several primitives fail tessellation (iirc: tgc, dsp, ars, pipe) over the years so if only for regression purposes, it's useful to check them.

Cheers!
Sean

------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to