Create Blender-to-BRL-CAD tutorialBRL-CAD
Status: ClosedTime to complete: 72 hrs Mentors: SeanTags: blender, 3d, modeling, tutorial

Blender is a open source 3D content creation program.  While it's usually not at all well-suited for engineering, scientific, and other CAD purposes, it's a popular content editor that is really good at some forms of editing (surface editing in particular).

This task has you write a tutorial on how to model something in Blender, export it to a file, import that file into BRL-CAD, and render the imported geometry.  Include lots of screenshots for every step along the way.

Note that to import geometry into a CAD system like BRL-CAD, you're going to need to model something that forms a closed volume.

References:

  • http://www.cs.auckland.ac.nz/~jing/opengl/blender3dtutorial.htm
  • http://www.blender.org/education-help/tutorials/

Tools:

  • blender
  • *-g (we have lots of importers, e.g., step-g, dxf-g, stl-g)
  • mged (display and edit geometry, run "tops" and "draw" commands)
  • within mged: rt -s1024 -A0.75 -c {set ambSamples=128} -c {set ambSlow=1}
Uploaded Work
File name/URLFile sizeDate submitted
Blender to BRL.doc1.9 MBDecember 19 2012 00:44 UTC
Blender to BRL-2.doc2.8 MBDecember 20 2012 04:28 UTC
Comments
Toshita Barveon December 11 2012 02:09 UTCTask Claimed

I would like to work on this task.

Toshita Barveon December 11 2012 03:25 UTCWorking

Hi Sean,


I have installed Blender and BRL-CAD in Windows 7 and I am playing with blender a little to get the feel of it.


Toshita 

Sean on December 11 2012 04:45 UTCTask Assigned

This task has been assigned to Toshita Barve. You have 72 hours to complete this task, good luck!

Toshita Barveon December 13 2012 05:06 UTCUpdate

Hi Sean,


I have figured out how to build things in blender, but I am still working on how to get it into BRL-CAD. I will try to get it done by tomorrow but I might not finish the task within the time limit.


Toshita

Sean on December 13 2012 15:08 UTCDeadline extended

The deadline of the task has been extended with 2 days and 0 hours.

Sean on December 13 2012 15:10 UTCgood luck

Glad to hear you're making progress.  We want you to succeed, so you're encouraged to ask questions if you have them.  If you join our IRC channel (see http://brlcad.org/wiki/IRC), we may even be able to help you interactively.


There is definitely a learning curve if you've never used Blender or BRL-CAD before, so try not to get too frustrated! :)


Look forward to seeing what you come up with or hearing questions from you.

Toshita Barveon December 16 2012 03:11 UTCPlease Extend My Deadline

Hello,


I am still working on how to get my table, that I built in blender, into BRL-CAD. I was sick yesterday so I couldn't work on it then. I don't understand how to get it into BRL-CAD. I saved my blender file and tried to run it, but it gave me an error. Can you please help me?


Toshita

Melange on December 16 2012 05:02 UTCInitial Deadline passed

Melange has detected that the initial deadline has passed and it has set the task status to ActionNeeded. The student has 24 hours to submit the work before the task is reopened and sent back to the pool for other students to claim.

Sean on December 16 2012 05:03 UTCDeadline extended

The deadline of the task has been extended with 1 days and 0 hours.

Sean on December 16 2012 05:04 UTCimporter

Toshita, you're going to have to export from Blender's format to a format that BRL-CAD will import.  We have dozens of importers, you just have to pick one.  Example is dxf-g.

Sean on December 16 2012 05:04 UTCexternal tools

note that our converters are stand-alone tools like mged, not commands that are run within mged.


 

Toshita Barveon December 18 2012 01:51 UTCError

I am having trouble running the blender file in mged. I exported the blender file into stl, and then I imported it into BRL-CAD format. I used the stl-g command to import my file into .g format. I opened the file in mged. As soon as I open it, a File loaded window appears with the message, “Conversion from Stereolithography format (units=mm).” But I can’t see the object that I have created in Blender. I searched for some answers on Google but I couldn’t find anything that helped.




Here are the step's that I have written so far:


Blender to BRL-CAD


 



  1. Open Blender

  2. Use the scale manipulator to flatten and expand the cube so it looks like a tabletop.

  3. Go to the Add menu or use the shortcut Shift+A. Add a cube.

  4. Use the scale manipulator to expand and flatten this cube so it looks like a table leg. Then duplicate this table leg 3 times.

  5. Move the legs of the table so it represents a table.

  6. Select all the legs and the tabletop, then click join on the left side of the window under Object.

  7. Go to File on the top left corner and select export. Under the export select Stl.

  8. You will get an export window. Name your file test (optional).

  9. Once you have named your file click on the Export STL button, which can be found in the top right corner, to export your blender file.





 Toshita

Sean on December 18 2012 02:30 UTCmged basics

It's hard to write a tutorial about importing into BRL-CAD without understanding some of BRL-CAD's fundamental tenants.  Unlike Blender, CAD files can and often do contain multiple objects or even top-level objects.  MGED doesn't assume that you want to do anything more than open the file, which it did.  See the intro to MGED and quick ref cheat sheet at http://brlcad.org/wiki/Documentation for some details but the piece you're missing is to either:


GUI version:



  • open the tools - geometry browser

  • double-click the top-level geometry object to display it

  • select view - az35,el25 to orient the view

  • select view - zoom in to size the view a little bigger

  • open the tools - raytrace control panel

  • select the raytrace button


Command-line version:



  • run "tops", get a list of top-level displayable geometry objects

  • run "draw objectname" to draw one of the available top-level objects

  • run "ae 35 25" to orient the view

  • run "zoom 1.5" to size the view a little bigger

  • run "rt -s1024" to render to a 1024x1024 window


 

Sean on December 18 2012 02:31 UTCDeadline extended

The deadline of the task has been extended with 1 days and 0 hours.

Sean on December 18 2012 02:32 UTCimages

note that when you finalize all of the steps that need to be taken, there should be an image for nearly all of them.

Toshita Barveon December 19 2012 00:43 UTCSubmitting

Hey Sean,


I am submitting my document that I have created. I have put in lots of pictures. I also have a pdf version of the file. If you would like the pdf version just send me an email and I will send it to you. Also let me know if I need to make any changes in my document.


Toshita 

Toshita Barveon December 19 2012 00:45 UTCReady for review

The work on this task is ready to be reviewed.

Sean on December 19 2012 04:42 UTCnicely done!

So that looks great.  I'd only ask for a few minor changes/additions.


You have tons of great screenshots when you ran Blender, but only two tiny snippets when it came to BRL-CAD and not a single screen capture.  Show MGED running, show screenshots or windows for each step.  Of course, that's a little silly for the command-line instructions, so can you instead do the graphical steps?  That will parallel your Blender steps better.


The last point is to explain the end result.  You started with an upside-down table and ended up with a table on its side.  That's because Blender uses a coordinate system not good for CAD.  Z is up!  We have a nice diagram in our gallery that you can embed.

Sean on December 19 2012 04:42 UTCTask Needs More Work

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

Sean on December 19 2012 04:42 UTCDeadline extended

The deadline of the task has been extended with 1 days and 0 hours.

Toshita Barveon December 20 2012 04:32 UTCModifications Complete

Hey,


I finished all the modifications you wanted from me. Please tell me if you want me to add something else. My file to be checked is called Blender to BRL-2.


Toshita

Toshita Barveon December 20 2012 04:32 UTCReady for review

The work on this task is ready to be reviewed.

Melange on December 20 2012 14:54 UTCNo more Work can be submitted

Melange has detected that the deadline has passed and no more work can be submitted. The submitted work should be reviewed.

Sean on December 20 2012 15:23 UTCfew mistakes, but it's good

Nicely done, Toshita!  There are still a few mistakes (especially at the end, Blender uses +Y for up), but those can be fixed in a follow-on task.  We'll add another task to add it to our wiki.  Thank you for working through all the changes to make it right!  That'll be very helpful to users.


 

Sean on December 20 2012 15:23 UTCTask Closed

Congratulations, this task has been completed successfully.

Sean on December 20 2012 16:03 UTCfollow-on task

A follow-on task has been posted:


http://www.google-melange.com/gci/task/view/google/gci2012/8079211