Hello,
can somebody say how to pass a parameter across two files in ruby?
To be exact it's a variable, which contains a string.
The string changes its value at the runtime.
Is there a problem with sketchup?
Thank you.
Hello,
can somebody say how to pass a parameter across two files in ruby?
To be exact it's a variable, which contains a string.
The string changes its value at the runtime.
Is there a problem with sketchup?
Thank you.
It doesn't work correctly,
my tool (driller, saw,...) is set right beside the wooden cuboid, although i put the cuboid on 0,0,0.
Then i changed your code a little bit to:
mov_cuboid = Geom;;Transformation.new(ctr1)
so the tool is in the middle of cuboid, but i can't change the height of the tool or just x,y-coordinate
Thank you very much, sdmitch!
It sounds very good, i will test it at once.
Do you know another way to assemble components dynamically?
Because you said that this is the easiest way.
I mean by SketchUp-Library,
the file, which contains all the SU-keywords
like "Sketchup.active_model.entities, active_model.view, Geom::Point3d, ..."
If i had this file, i could include it in my IDE and
debug my ruby-file, for example in visual studio with ironruby.
Thanks a lot for your answer,
Mayby i'm wrong,
but i believe, you misunderstand me.
so i show you what i've programmed:
` driller= Sketchup.active_model.definitions.load("\driller.skp")
pos_driller = Geom::Point3d.new 47,32,25
set_driller= Geom::Transformation.new pos_driller
instance1 = entities.add_instance driller, set_driller
cuboid_wood = Sketchup.active_model.definitions.load("\Cuboid_wood.skp")
pos_cuboid = Geom::Point3d.new 0,0,0
set_cuboid = Geom::Transformation.new pos_cuboid
instance2 = entities.add_instance cuboid_wood, set_cuboid`
but this is hardcoded
and i want that the computer places the objects correctly together automatically,by calculating the best position, but i can't calculate the size of these objects, because i don't know how. (i would have to measure the size with the measure-tool in SU with the mouse, but it should retrieve the values with a method)
I have the task to do that with many components, that's why i wouldn't
say the detailed coordinates for every components, which i load.
the programm should be able to load componentes, put it together correctly and dynamically, take some photos in different perspectives, save these pictures, clear it all and start at the beginning with other components ... everthing is quite clear to me, with the exception of the hardcoded coordinates of these objects
P.S.
i have wrote this problem in a new topic too
Hello,
is it possible to get the SU-Library? (out of a file or download)
I would use it for ironruby in visual studio 10, or
for RDE with SU-Bridge.
Thanks
Hey,
I want to put 2 - 4 componentes together, without hardcoding the
coordinates of the componentes.
For example:
so i show you what i've programmed:
driller= Sketchup.active_model.definitions.load("\\driller.skp") pos_driller =Geom::Point3d.new 47,32,25
<- that's the problem
` set_driller= Geom::Transformation.new pos_driller
instance1 = entities.add_instance driller, set_driller
cuboid_wood = Sketchup.active_model.definitions.load("\Cuboid_wood.skp")
pos_cuboid = Geom::Point3d.new 0,0,0<- like here
set_cuboid = Geom::Transformation.new pos_cuboid
instance2 = entities.add_instance cuboid_wood, set_cuboid`
but this is hardcoded
and i want that the computer places the objects correctly together automatically,by calculating the best position, but i can't calculate the size of these objects, because i don't know how. (i would have to measure the size with the measure-tool in SU with the mouse, but it should retrieve the values with a method)
Or is there another possibility to avoid the harcoded way?
I have the task to do that with many components, that's why i wouldn't
say the detailed coordinates for every components, which i load.
the programm should be able to load componentes, put it together correctly and dynamically, take some photos in different perspectives, save these pictures, clear it all and start at the beginning with other components ... everthing is quite clear to me, with the exception of the hardcoded coordinates of these objects
Thanks for your suggestions.
Greets
Hey,
i want to load 2 - 4 components in SU.
My Problem:
How can i put these componets together, without hardcoding the coordinates?
For example:
I want to set a driller on a cuboid, then i need the coordinates of
the edges to know how big the components are, right?
Unfortunately i don't know any method to retrieve these values
Or is there another way to avoid the hardcoded way?
Greets