bifacial_radiance icon indicating copy to clipboard operation
bifacial_radiance copied to clipboard

how to import my .cad file to this software.

Open pulkit880 opened this issue 4 years ago • 5 comments

pulkit880 avatar Sep 21 '20 11:09 pulkit880

After days trying to import an .obj file, I still haven't been able to import my CAD file to my scene. @pulkit880 , did you succeed in your quest?

DamienJaffre avatar Nov 17 '20 15:11 DamienJaffre

@pulkit880 @DamienJaffre

I've had good luck using dxf2rad. If you can export your obj as dxf this may also work for you.

Here's an example using a very simple model of an H pile I created in Sketchup and exported as a dxf (see attached zip file).

  1. Generate a .rad file from a dxf:
jalderman@crunchy ~/SunfoldingModel/models $ dxf2rad obj_post_example.dxf > obj_post_example.rad
jalderman@crunchy ~/SunfoldingModel/models $ head -10 obj_post_example.rad
## Radiance geometry file "<stdout>"
## Converted by dxf2rad 1.1.0: Tue Nov 17 09:07:38 2020
## dxf2rad obj_post_example.dxf


l_0 polygon l_0.0.1
0
0
9	127	127	0
	0	122	0
	
  1. The material defaults to "l_0" which isn't something we have defined, so let's change it. The default materials for bifacial_radiance (in data/ground.rad) include "Metal_Aluminum_Anodized" so let's replace all instances of l_0 with that:
jalderman@crunchy ~/SunfoldingModel/models $ sed -i 's/l_0/Metal_Aluminum_Anodized/g' obj_post_example.rad 
jalderman@crunchy ~/SunfoldingModel/models $ head -10 obj_post_example.rad
## Radiance geometry file "<stdout>"
## Converted by dxf2rad 1.1.0: Tue Nov 17 09:07:38 2020
## dxf2rad obj_post_example.dxf


Metal_Aluminum_Anodized polygon Metal_Aluminum_Anodized.0.1
0
0
9	127	127	0
	0	122	0
  1. A single post is not very exciting, so let's create a scene with 5 of them spaced 1 meter apart along the scene x axis: jalderman@crunchy ~/SunfoldingModel/models $ echo '!xform -a 5 -t -1 0 0 obj_post_example.rad' > five_posts.rad

  2. Now compile the radiance scene using a skyfile from a previous run, the material file, and our 5 post scene: jalderman@crunchy ~/SunfoldingModel/models $ oconv materials/ground.rad skies/sky2_38.7_-121.58_07_10_09.rad five_posts.rad > five_posts.oct

  3. And view it: jalderman@crunchy ~/SunfoldingModel/models $ rvu five_posts.oct

At this point you'll need to pan/zoom etc to get a good look.

five_posts

Hope that helps.

Jason

five_posts.zip

jalderman9 avatar Nov 17 '20 17:11 jalderman9

Thanks a lot for the assist @jalderman9 . I will try this right away and let you know.

//Damien

DamienJaffre avatar Nov 20 '20 07:11 DamienJaffre

@jalderman9 does this work with tracker system?

bapossatto avatar Sep 06 '21 12:09 bapossatto

@bapossatto For a dynamic simulation of a tracker system, you will need to import a file for the fixe part and another file for the moving part.

DamienJaffre avatar Sep 06 '21 12:09 DamienJaffre