algorithmic modeling for Rhino
Hi,
i have a Problem: i have around 1000 obj files here (all almost the same structure).
all of them need to be rotated around 90°. + all of them have an object called "Skybox" which i need to remove from the file.
Is something like this possible with Grasshopper?
- if not, what other tool could i use?
Thanks a lot,
Pcace
Tags:
It's possible to send one obj file ?
Sure!
The Object which needs to be removed is "Skybox"
Thanks!!!
The attached contains a C# script component which iterates over all *.obj files in a folder.
Here a solution:
With Excel write this macro for all file:
-_import
C:\Users\CHF163\Downloads\Proband_50_Aufgabe_2_raumsynth.obj
_enter
_cancel
-_selname
SkyBox
_delete
_cancel
_selAll
_rotate
0
90
_-export
C:\Users\CHF163\Downloads\Proband_50_Aufgabe_2_raumsynth_1.obj
_enter
_cancel
_selAll_delete
And with rhino play macro with your file !
Thank you both!
@remy, since i never used any macros, how do i get the excel file into the macro editor?
and second: what axis does rhino uses to rotate?
@David:
Sorry for that dumb question, but how do i use the c component? I copied it into "special_folders/user_components" but i cannot find it anywhere :/
Thanks a LOT!!!
copie and paste..
rotation 90° on Z axis
You don't put it anywhere, just open the file, set the correct folder in the text panel and switch on the toggle.
@David: Thank you sooo much!!!! Since there are 2000+ Files this will take a while!
Is it somehow possible to export to obj? Since Rhino can save es obj, it should be possible right?
i changed the export part to the following, but it still saves *.3dm
string file3dm = System.IO.Path.GetFileNameWithoutExtension(file); file3dm = Folder + file3dm + ".obj";
command.Clear(); command.Append("-_export ");
command.Append('"');
command.Append(file3dm);
command.Append('"');
command.Append(" _Enter"); Rhino.RhinoApp.RunScript(command.ToString(), true);
@remy: since the amount of files is soo large, i really prefer the C# version ;)
btw: thank you for your crazy fast support!!!!
Sure..
Good work David and good luck J Frölich
Hi,
question to both of you: you both use the command: -_export/-_SaveAs and then the filename. shouldnt there be an information for rhino what kind of fileformat it should use?
Thanks!
You'll have to select everything first, as the Export command works only on selected objects. Then you'll need to create an -_Export command sequence, with the new filename (should probably be different from the existing name, or alternatively export to a different folder), and all the options for obj export.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by