Spaceclaim automatic body generator
Hello,
TL;DR: I wish to write a python script which creates box bodies from their x,y,z dimensions and centroid locations - [Xdim,Ydim,Zdim] and [Xloc,Yloc,Zloc], in relation to a local origin . I tried to use BlockBody.Create(Point.Create(MM(0), MM(0), MM(0)), Point.Create(MM(Ydim), MM(Xdim), MM(Zdim)) but it creates the box according to translation and orientation of the global origin Relocating the box afterwards becomes problematic because the relation, both translation and orientation, between the local and global origin must be calculated. It can be a possible solution but I neither want to do it manually nor know how to do it automatically using scripting thank you in advance, Sonenzon |
[Solved]
In case anyone in the future might find this topic useful :)
Given the following data: - Position of centroid [Xpos, Ypos, Zpos] - Dimensions of a box [Xdim, Ydim, Zdim] - local cordinate system named 'local_sys' Code:
# Box Position |
All times are GMT -4. The time now is 05:52. |