Difference between revisions of "Tutorial/Blender to CAD"

From BRL-CAD
m (Reverted edits by 5.135.165.126 (talk) to last revision by Toshibarve)
 
(5 intermediate revisions by 2 users not shown)
Line 19: Line 19:
 
10.Go to the BRL-CAD bin directory and give the command to turn you obj file into a .g file. This command exports the obj-formatted file to a .g file. The syntax of the obj-g command is  
 
10.Go to the BRL-CAD bin directory and give the command to turn you obj file into a .g file. This command exports the obj-formatted file to a .g file. The syntax of the obj-g command is  
  
>obj-g input.obj output.g   
+
>obj-g input.obj output.g   
  
Don’t forget to enter a path for your files. To see all the uses of the obj-g command just enter “obj-g.”   
+
Don’t forget to enter a path for your files. To see all the uses of the obj-g command just enter “obj-g.”   
  
 
11.Open mged. You will see two windows, a command window that is white and a graphics window that is black. <br>
 
11.Open mged. You will see two windows, a command window that is white and a graphics window that is black. <br>
Line 31: Line 31:
 
12.Select File and click open. Open you .g file that you just made. <br> [[Image:MGED 7.22.0 Command Window Step 12.jpg|center|thumb|1000px|Open .g File]]
 
12.Select File and click open. Open you .g file that you just made. <br> [[Image:MGED 7.22.0 Command Window Step 12.jpg|center|thumb|1000px|Open .g File]]
  
13.Then click on Tools. Open Geometry Browser under tools. Double click on the top object to display it. Your graphics window should display your upside down table. <br> [[Image:MGED 7.22.0 Command Window Step 13.jpg|center|thumb|1000px|Click on Tools]]<br><br> [[Image:Geometry Browser Step 13.jpg|center|thumb|1000px|Geometry Browser]]
+
13.Then click on Tools. Open Geometry Browser under tools. Double click on the top object to display it. <br> [[Image:MGED 7.22.0 Command Window Step 13.jpg|center|thumb|1000px|Click on Tools]]<br><br> [[Image:Geometry Browser Step 13.jpg|center|thumb|1000px|Geometry Browser]]
  
 
14.Click on View. Select “az35,el25” <br> [[Image:MGED 7.22.0 Command Window Step 14.jpg|center|thumb|1000px|Change view]]
 
14.Click on View. Select “az35,el25” <br> [[Image:MGED 7.22.0 Command Window Step 14.jpg|center|thumb|1000px|Change view]]
Line 41: Line 41:
  
  
sed default.1.1.b.c.s <br>  
+
  sed default.1.1.b.c.s <br>  
  
 
{| border="0"
 
{| border="0"
Line 48: Line 48:
 
|}
 
|}
  
rot –90 0 0 <br>
+
  rot –90 0 0 <br>
 
{| border="0"
 
{| border="0"
 
|-
 
|-
Line 54: Line 54:
 
|}
 
|}
  
accept <br>
+
  accept <br>
 
{| border="0"
 
{| border="0"
 
|-
 
|-

Latest revision as of 15:07, 6 May 2013

1. Open Blender

Blender Startup Screen

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

Tabletop

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

Table Leg 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.

Table Legs

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

Position Table Legs

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

Join Legs To Tabletop

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

Export Table

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

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

Export To OBJ

10.Go to the BRL-CAD bin directory and give the command to turn you obj file into a .g file. This command exports the obj-formatted file to a .g file. The syntax of the obj-g command is

>obj-g input.obj output.g  

Don’t forget to enter a path for your files. To see all the uses of the obj-g command just enter “obj-g.”

11.Open mged. You will see two windows, a command window that is white and a graphics window that is black.

Command Window
Graphics Window

12.Select File and click open. Open you .g file that you just made.

Open .g File

13.Then click on Tools. Open Geometry Browser under tools. Double click on the top object to display it.

Click on Tools



Geometry Browser

14.Click on View. Select “az35,el25”

Change view

15.Click on Tools once again. Select the Raytrace Control Panel. Hit the raytrace button.

Raytrace



Raytrace Control Panel



Command Window Raytrace Complete

Once you have Raytraced, you should have an image the looks like this:

Graphics Window Raytrace Complete

16.Do you remember what the table looked like when we were done with it in Blender? It was upside down and now it’s on its side. Rotating the table reorients it correct way. To reorient your table the right way, enter these commands in the command window:


 sed default.1.1.b.c.s 
Command Window First command
Graphics Window First command
 rot –90 0 0 
Commands Window Second Command
Graphics Window Seccond command
 accept 
Commands Window Third Command
Graphics Window Third command

Then Raytrace the table once again by going to the Tools menu.

Raytrace Again


With that final rendering your import is complete!

Complete


BRL-CAD, like most of the CAD industry, uses +Z for up. Blender, like most of the film industry, uses +Y for up. Using +Y for up has origins in the film industry where the image screen is the center of attention, X and Y form a view plane and Z is the depth or distance from the camera. Using +Z for up has origins in manufacturing and architecture where the object and scene are the center of attention, X and Y form a horizontal ground plane, and thus Z becomes the elevation or height dimension.