Hi Lynsey,

If I could throw my two cents in, maybe I can help.  We typically use the g-stl 
converter using STL as a mediary between BRL-CAD and FASTGEN models. I usually 
create a list of components using the "idents" command and extracting 
everything but the region name from the list.  The I use that list to make a 
batch script to convert all of my regions into individual STL files. I 
typically get about an 80-85% success rate, but there are some things I have 
found in the pat...

- If a region contains multiple BoT solids, the converter will try to combine 
and refacetize them which normally fails.
- If there is a Boolean operation on a BoT solid, the refacetization will also 
fail.
- Sloppy modeling can lead to failure if lines do not converge properly. These 
can sometimes be overcome by adjusting the tessellation tolerances or fixing 
the offending solid.

When I encounter a conversion failure, I will typically drop down to the solid 
level and convert them.  Then I rebuild the region with an STL editor capable 
of simple Boolean operations.  This is a pain in the backside if the region has 
many solids, but it gets the job done.

Sean,

I was not aware of the facetall.sh script. I will have to take a look at it.


Robert Anderson
SURVICE Engineering
4141 Colonel Glenn Hwy
Suite 209
Beavercreek, OH 45431
T: (937)431-9914
C: (937)344-9860





From: Christopher Sean Morrison [mailto:[email protected]]
Sent: Tuesday, November 05, 2013 10:47 PM
To: Johnson, Lynsey E.
Cc: BRL-CAD Developer Mailing List
Subject: Re: [brlcad-devel] .g File Conversion

Hi Lynsey,

You've reached the right place, hopefully I can be of assistance.  Be aware, 
though, that what you ask is quite a complex topic.

So sorry to hear about your conversion difficulties.  There are indeed many 
tricks to overcome the complexities involved, but there is no set recipe.  The 
dominant factors that affect conversion success are the tolerance settings, the 
structure of the geometry involved, the complexity of any boolean recipes, and 
the particular export method being used (they are not all equal).

There are ways to influence all four of those which will affect the output 
quality.

For tolerance, most all of the stand-alone BRL-CAD export tools (like g-iges 
and g-obj) have flags that let you set the absolute (calculation), relative 
(calculation), normal (curvature), and distance tolerance.  These have HUGE 
impact on quality, conversion time, and success rate.  The easiest way to learn 
how they work are to take a simple region and play with different settings.  
Try setting relative to 10 degree or 1 degree.  Try setting absolute to 0.01 or 
0.001 (default is 0.0005).  There are limitless possibilities.

That said, I'd also suggest not using the g-iges converter as it's one of the 
most complex converters in BRL-CAD.  The g-obj or g-dxf or g-obj might be a 
little easier to manage.  Since you mentioned the scripting option, you should 
also be aware that we already have/provide a script that converts a .g model 
region by region.  See the facetall.sh script or the facetize_all_regions 
command in mged (which is what the script calls).

That's a lot to hopefully help you get started, but be aware that this is a 
complex topic.  If it could easily be made turn-key, we would have made it that 
a *long* time ago.  There is rarely a conversion that cannot success by 
adjusting the conversion tolerance settings and model configuration, but 
knowing what to change and how to change it is very complicated.

Please reply back with any questions you have.  I'll try to answer what I can 
and hopefully help reduce some of the frustration.

Cheers!
Sean

p.s. As a glimmer of hope, be aware that we know that we are working to make 
this a LOT easier.  We've spent years implementing advanced nurbs/brep/step 
infrastructure that completely changes the fundamental method of conversion so 
that it's much more reliable for export.  Advancements are due to be announced 
over the next 3-6 months.


On Nov 5, 2013, at 8:15 PM, Johnson, Lynsey E. wrote:


Hello,

I am writing to request a contact for software support in the area of file 
conversion for the BRLCAD 7.24.0. The g-iges executable command produces models 
with many flaws, and I am wondering if there are any tricks to improve the 
quality of the converted files. My division is in desperate need of reliable 
file conversion, so much so that we are attempting to create a shell script 
that converts .g models  by region.

Thanks,
Lynsey Johnson

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to