Dear BRL-CAD Team,
I have one more of these converting-questions.
I really read in this forum but could not find an answer.
I am trying to export a database object to a dxf-file. I created a database with a simple arb8.s and typed in the console:
linux@linux-laptop:/usr/brlcad/bin$ sudo ./g-dxf o output.dxf db.g arb8.s
(I copied the g-database into the bin-folder) I get back:
db_walk_subtree() FAIL on '/arb8.s'
12 triangles written
The dxf-File is created. Using VariCAD and gCAD I can open the dxf-file. There is a layer named arb8.s but without any information in it. What am I doing wrong?
I tried to export from the given examples, too:
linux@linux-laptop:/usr/brlcad/bin$ sudo ./g-dxf -o output.dxf /usr/brlcad/share/brlcad/7.10.4/db/axis.g *.*
The result is the same as above.
Does anyone knows an answer?
Furthermore I would like to know wheter BRL-CAD supports an output in the format of technical drawing. I read about the possiblity of exporting images but nothing about exporting in a ISO or DIN-Format?
(BRL-CAD on Ubuntu 9.1)
5.3 Converting to AutoCAD DXF Format
The g-dxf command converts BRL-CAD objects to the previously mentioned AutoCAD DXF
format. The syntax for this command is as follows:
g-dxf input.g object(s)
The options for the g-dxf command are as follows:
i - requests the output DXF file to be in inches (default is millimeters).
o output.dxf - specifies the file to receive the DXF output (default is stdout).
p - requests that the output DXF file consist of POLYFACE MESH entities (the default
is 3DFACE entities).
The command also accepts the v, r, a, n, x, and X options, which have been discussed in the
import converters portion of this document (section 4).
For more information on the DXF file format and export possibilities, see the on-line
documentation on the Autodesk web site at http://www.autodesk.com (Autodesk, Inc., 2003).
Did you successfully export to dxf yet?
No, but then I haven't needed to…
I successfully converted g-dxf on windows but g-dxf on Ubuntu is still not working :-/
Same suggestion I mentioned to yutani in another thread - the short suggestion first is don't convert primitives. Convert real geometry. There can be a difference exporting primitives, combinations below regions, combinations marked as regions, and combinations above the region level. Without getting into those differences and why they exist, you just want to make sure
you're running g-iges on something at or above the region level. If your rake doesn't have a region, you should at least make the top-level object a region.
It does report that it wrote out geometry (12 triangles written), which is the critical piece, but you should try something more substantial with hierarchy to it.
You mentioned that it worked on windows but didn't on linux. How is it not working and how did it work? Same geometry? Same command-line arguments?
Sean, thank you for your answer. Yes, I did the same commands on windows and linux. I create a simple form, e.g. a sph.s; then create a region: r sph.r u sph.s. After that I run the dxf-export; the file is created. When I run this process on windoes the file can be opened. When I do it on linux (ubuntu) I can not work with the file - I tried Blender, QCAD and VariCaD Viewer to import the dxf.
Hrm. That would seem to indicate a possible bug then. Could you post a bug report with both the windows and linux dxf files and your original .g test file? You can post it to here:
I can not get this "g-dxf" to work. I use brl-cad 7.12 in windows XP. I have written a couple of Tcl scripts to create a helix and a pulley. Now I want to convert these objects to dxf files and play with then in Blender. My objects are dot-r files in dot-g databases. I have read the pdf tutorial on file conversion and brl-cad volumeII. I am completely lost. What is the procedure to do this in XP?
It is possible to export objects as well as the whole database. You do it in the Dos-console. Simplest way is to have the database and the g-dxf.exe in one folder. The conversion-steps are nearly the same as on Linux (please look up page 27 in the 'Converting Formats.pdf'). Tricky for me was to find the *.g-file for the conversion:
The following steps are just necessary if you can not access/find the database.g-file:
"…I added the path:
to the system path variables as described here:
After that I restarted the computer. Nevertheless the files could not be accessed.
When I started the explorer I saw one "Program Files" locked and one free.
I used this tutorial to unlock the locked "Program Files" folder.
Now i could access both; but I could not still access my own created *.g files.
In the next step I searched my harddrive for "db.g".
That is the file I created in mged.
However, the db.g was found in
I copied this file and inserted it in the bin folder of brl-cad (where the g-dxf-file ist stored).
Windows asked me for adminstration-rights.
Furthermore I started the console:
and stil got the "db_walk_subtree() FAIL on '/sph.s' 288 triangles written".
However, I now can open my created output.dxf with the help of SolidWorks eDrawings Viewer.
In addition to that I can see my in BRL-CAD created shape :-)
I am really lucky and hope that this threat helps Windows users with the same problem.
Please ask if you have further questions.
For what do you want to use the combination of BRL-CAD and Blender?
Are you in engineering?
All the best
There's not nearly enough information to say what you've tried and what's not worked to help you. I would recommend getting the latest binary version of BRL-CAD for Windows for starters. Then open up a command console (Run -> "cmd") and run g-dxf there on your .g file. For that to work, you have to have g-dxf in your system PATH, you have to know where you saved your .g file, and you need the name of one or more object(s) that you want to export (ideally a region or group containing a region).
p.s. You should start new threads for new issues so responses are clear.
I am not an engineer just CNC machinist. One day I hope to create objects in brl-cad convert them to .dxf files. then convert them to g-code. Finally make parts using EMC2. All in open source. Dreams might come true.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.