#100 g-acad Exporter not working for me

closed-accepted
R. Weiss
5
2012-07-25
2012-07-23
G. G. Krupp
No

I am new to BRL-CAD but after working my way through several of the tutorials I am convinced that it is a powerful tool that would be useful to me if I can export models in the ACAD facet file format. To that end, I tried to export the goblet made in Lesson 6 of the tutorial using the g-acad.exe utility without success. I then went for a more simple case by loading the \"booleab-ops.g\" database. I tried to export object \"c\" from that database using the ACAD exporter but it also failed. The screenshot from the second export attempt is attached.

Some pertinent details include:
OS: Windows 7
BRL-CAD Version: 7.20.2

The one other interesting fact is that the goblet seem to chunk away at the various parts of the model for several minutes before giving me the \"g-acad.exe has stopped working\" dialog box but the boolean-ops export crashed almost immediately.

Am I doing something wrong?

Thanks,
Gary

Discussion

  • G. G. Krupp
    G. G. Krupp
    2012-07-24

    Some more details. I again tried to work with the goblet model built in the tutorial (Lesson 6) but I only tried to export the basin region (basin1.r). Below is the command line inputs/outputs. This took over an hour to run but in the end still failed to produce an ACAD facet file with any info other than a header line.

    C:\Users\gkrupp\Documents\BRLCAD 7.20.2>g-acad -v -e error_basin.txt -r 0.0001 -o basin.facet goblet.g basin1.r
    Model: goblet.g
    Objects: basin1.r
    Tesselation tolerances:
    abs = 0 mm
    rel = 0.0001
    norm = 0
    Calculational tolerances:
    dist = 0.0005 mm perp = 1e-005
    db_apply_state_from_comb(): WARNING: color override in combination within region
    '/basin1.r/stem1.r', ignored
    db_apply_state_from_comb(): WARNING: material property spec in combination below
    region '/basin1.r/stem1.r', ignored
    Warning: region unioned into region at '/basin1.r/stem1.r', lower region info ignored

    do_region_end(0 0%) /basin1.r
    Attempting to process region /basin1.r
    {basin1.s} u {basin1.s}
    NULL malloc(432896400) nmg_crackshells flags[]
    bu_malloc: Insufficient memory available

    bu_malloc: malloc failure
    FAILED in Boolean evaluation: /basin1.r
    Nothing left of this region after Boolean evaluation
    Tried 1 regions, 1 conv. to NMG's 1 conv. to tri. nmgper = 100.00% triper = 100.
    00%
    Tried 1 regions, 1 converted to NMG's successfully. 100%
    1 triangulated successfully. 100%
    0 triangles written

    C:\Users\gkrupp\Documents\BRLCAD 7.20.2>

     
  • Tom Browder
    Tom Browder
    2012-07-24

    Can you upload a copy of your .g file? Maybe the problem has been fixed with later releases.

     
  • G. G. Krupp
    G. G. Krupp
    2012-07-24

    goblet.g file from Lesson 6

     
    Attachments
  • G. G. Krupp
    G. G. Krupp
    2012-07-24

    boolean-ops.g file

     
    Attachments
  • G. G. Krupp
    G. G. Krupp
    2012-07-24

    I uploaded both .g files that I have referenced in my comments and screenshots.

    One other interesting note is that I tried to do an ACAD export on my home machine last night which is running BRL-CAD on a Linux OS but had similar results. I am thinking that either the ACAD exporter does not work in this version or that I am doing something wrong when I try to export.

     
  • Tom Browder
    Tom Browder
    2012-07-24

    What version of BRL-CAD are you running on the Linux box? I haven't checked your .g file yet, but the latest version (7.22.0, binary released for Win and Linux, among others) has LOTS of bug fixes and enhancements. Note that the latest is the third release since your Win version--best to keep up with latest if you are a heavy user of BRL-CAD.

     
  • G. G. Krupp
    G. G. Krupp
    2012-07-24

    I am not sure what version is on the Linux box but I just used the link next to "Looking for the latest version?" at https://sourceforge.net/projects/brlcad/files/BRL-CAD%20for%20Windows/

    I now see the 7.22 folder and will try to download that to see if it fixes the issue. Thanks for the help!

     
  • G. G. Krupp
    G. G. Krupp
    2012-07-24

    Spoke too soon ... the 7.22 folder has no files in it. Any idea where I can get a Windows 7 download of v7.22?

     
  • G. G. Krupp
    G. G. Krupp
    2012-07-24

    Just checked the home Linux version and it is 7.22. I only tried one test case on that system so maybe I'll try a couple of more tonight to see if I can get the export to work. I have been successful in getting an IGES export to work.

     
  • G. G. Krupp
    G. G. Krupp
    2012-07-24

    Ran the exact same case as my post from 2012-07-24 04:19:57 PDT below except this time I ran it on my Linux machine running BRL-CAD v7.22. The exporter ran very quickly but ended in a segmentation fault. Below is the complete command line inputs/outputs:

    eegeek@Office-Linux:~/Documents/CAD$ g-acad -v -e error_basin.txt -o basin.facet goblet.g basin1.r
    Model: goblet.g
    Objects: basin1.r
    Tesselation tolerances:
    abs = 0 mm
    rel = 0.01
    norm = 0
    Calculational tolerances:
    dist = 0.0005 mm perp = 1e-06
    db_apply_state_from_comb(): WARNING: color override in combination within region '/basin1.r/stem1.r', ignored
    db_apply_state_from_comb(): WARNING: material property spec in combination below region '/basin1.r/stem1.r', ignored
    Warning: region unioned into region at '/basin1.r/stem1.r', lower region info ignored

    do_region_end(0 0%) /basin1.r
    Attempting to process region /basin1.r
    {basin1.s} u {basin1.s}
    {ball1.s} u {ball2.s}
    {(ball1.s u ball2.s)} u {ball3.s}
    {basin1.s} + {((ball1.s u ball2.s) u ball3.s)}
    {(basin1.s u basin1.s)} u {(basin1.s + ((ball1.s u ball2.s) u ball3.s))}
    {((basin1.s u basin1.s) u (basin1.s + ((ball1.s u ball2.s) u ball3.s)))} u {basin1.s}
    {ball1.s} u {ball2.s}
    {(ball1.s u ball2.s)} u {ball3.s}
    {(((basin1.s u basin1.s) u (basin1.s + ((ball1.s u ball2.s) u ball3.s))) u basin1.s)} u {((ball1.s u ball2.s) u ball3.s)}
    {((((basin1.s u basin1.s) u (basin1.s + ((ball1.s u ball2.s) u ball3.s))) u basin1.s) u ((ball1.s u ball2.s) u ball3.s))} u {basin1.s}
    Segmentation fault (core dumped)
    eegeek@Office-Linux:~/Documents/CAD$

     
  • Tom Browder
    Tom Browder
    2012-07-24

    After r_weiss fixed g-acad.c at revision 51656, the trunk works fine with your models, specifically:

    $ g-acad -v -e error_basin.txt -o basin.facet goblet.g basin1.r
    Model: goblet.g
    Objects: basin1.r
    Tesselation tolerances:
    abs = 0 mm
    rel = 0.01
    norm = 0
    Calculational tolerances:
    dist = 0.0005 mm perp = 1e-06
    db_apply_state_from_comb(): WARNING: color override in combination within region '/basin1.r/stem1.r', ignored
    db_apply_state_from_comb(): WARNING: material property spec in combination below region '/basin1.r/stem1.r', ignored
    Warning: region unioned into region at '/basin1.r/stem1.r', lower region info ignored

    do_region_end(0 0%) /basin1.r
    Attempting to process region /basin1.r
    {basin1.s} u {basin1.s}
    {ball1.s} u {ball2.s}
    {(ball1.s u ball2.s)} u {ball3.s}
    {basin1.s} + {((ball1.s u ball2.s) u ball3.s)}
    {(basin1.s u basin1.s)} u {(basin1.s + ((ball1.s u ball2.s) u ball3.s))}
    {((basin1.s u basin1.s) u (basin1.s + ((ball1.s u ball2.s) u ball3.s)))} u {basin1.s}
    {ball1.s} u {ball2.s}
    {(ball1.s u ball2.s)} u {ball3.s}
    {(((basin1.s u basin1.s) u (basin1.s + ((ball1.s u ball2.s) u ball3.s))) u basin1.s)} u {((ball1.s u ball2.s) u ball3.s)}
    {((((basin1.s u basin1.s) u (basin1.s + ((ball1.s u ball2.s) u ball3.s))) u basin1.s) u ((ball1.s u ball2.s) u ball3.s))} u {basin1.s}
    Tried 1 regions, 1 conv. to NMG's 1 conv. to tri. nmgper = 100.00% triper = 100.00%
    Tried 1 regions, 1 converted to NMG's successfully. 100%
    1 triangulated successfully. 100%
    3640 triangles written

    Try to build from the trunk and see if that works for you.

     
  • G. G. Krupp
    G. G. Krupp
    2012-07-25

    I am encouraged that you were able to get it to work but I am afraid I don't understand what it means to "build from the trunk" ... can you explain how to do that?

    thanks!

     
  • Tom Browder
    Tom Browder
    2012-07-25

    If you have access to a linux host, even as a non-root user, you can configure and compile the current development of BRL-CAD your self. Go to the BRL-CAD support link here:

    https://sourceforge.net/scm/?type=svn&group_id=105292

    and follow instructions to get a local copy of the current trunk source. I suggest you get help from Linux mailing lists if you don't knoiw how to do that.

    After you successfully get the source, read the README and INSTALL files to see how to configure, build, and install BRL-CAD.

    I also suggest you stop using this tracker for this thread and start using the BRL-CAD users mailing list which you can join here:

    https://lists.sourceforge.net/lists/listinfo/brlcad-users

     
  • R. Weiss
    R. Weiss
    2012-07-25

    I checked in a change yesterday which should fix the seg fault. You will need to build brlcad from trunk with revision 51656 or later.

     
  • R. Weiss
    R. Weiss
    2012-07-25

    • assigned_to: nobody --> r_weiss
    • status: open --> closed-accepted