Fredo! This is a great script. I really thought I could get along without it,
boy was I wrong!
Posts made by tomot
-
RE: [Plugin] Round Edge - v1.0 (by Bezier)
-
RE: Ruby Tutorial: How to create and add a component from Ruby
Its one of the things I have not been able to resolve.
I will give your suggestion a try, in the near future.thanks!
-
RE: [Plugin] Simple Glazing tool
Jim, please accept my great appreciation, with a reply HUG!
so here is the the attached update:
-
RE: [Plugin] Simple Glazing tool
@dtrarch said:
tomot
Very clever tool and thanks.
As it creates a group it is very easy to move back and forth.
Good enough as it stands.dtr
Thanks! But after I have moved about 30 windows back 3" from the face. I
feel like my Grey matter is leaving for greener pastures. -
RE: [Plugin] Simple Glazing tool
@tig said:
Aren't you re-inventing Windowizer without a frame ? Currently you must enter something, but 0.1mm makes the frames effectively nothing...
Not at all! Windowizer asks for 4 sided face to be selected first. While I use the "pick 3 point rectangle" method.
This is not a criticism of how Windowizer works, it has more to do with my workflow.
I design structures in SU using walls and slabs that have thickness. Then I punch openings in them for windows, doors, stairs etc., later I fill in those openings with the required components.I find the "pick 3 points rectangle' method the most natural way to fill in an opening. If I were to use Windowizer, I have to fill in the opening prior to running the script.
However, I would be more interested in getting the setback problem solved.
While Jim's comments make a lot of sense, I can't get the code to work.aargh!
-
RE: [Plugin] Simple Glazing tool
Jim I don't know what I'm going to do with that piece of information
in a practical way to solve this problem.As the attached pic shows, at present the glazing is flush with each face
of the 2 opening the glazing is installed into.
I would like to have the option of letting the user pick an offset back from
the face as is shown in the opening on the left side of the cube.
-
RE: [Plugin] Simple Glazing tool
I see no ruby gurus willing to take a nibble yet?
Once the rectangle has been picked, its co-ordinates are defined
by $pt0 thru $pt3 (see below)#------create a new set of points from the original 3 point pick
$pt0=Geom::Point3d.new($pts[0][0], $pts[0][1], $pts[0][2])
$pt1=Geom::Point3d.new($pts[1][0], $pts[1][1], $pts[1][2])
$pt2=Geom::Point3d.new($pts[2][0], $pts[2][1], $pts[2][2])
$pt3=Geom::Point3d.new($pts[3][0], $pts[3][1], $pts[3][2])I can then create the required code that makes the glazing,
give it a transparent color, followed by "pushpull'ing" the thickness of the glass
whose value is $ggthick (see below)#------create the Glazing
group=entities.add_group
entities=group.entities
base=entities.add_face($pt0, $pt1, $pt2, $pt3)
base.material=Sketchup::Color.new(163,204,204) #change the RGB Color numbers here
base.material.alpha = 0.6
base.pushpull $ggthickAll of the above will produce glazing in any plane xy, xz, yz.
However in order to set the glazing back from an xy plane, I need a z offset
equally for glazing on an xz plane needs a y offset, and for glazing on an yz plane
requires an x offset.If I was producing a static glazing ruby where the glazing was always located at 0,0,0
then I could provide the offset option via $wwthick which is the "Glass Setback from face value.
as follows:$pt3=Geom::Point3d.new($pts[3][0], $pts[3][1], $pts[3][2]-$wwthick)
but this will not work for the other 2 planes.Is there a 3d point in Ruby that is not tied to the world co-ordinate system, but rather
to a local co-ordinate system?or is there a way to do a double pushpull one for the offset and one for the glazing thickness,
and then erasing the first sheet of glass?TIA!
-
[Plugin] Simple Glazing tool
Here is a simple gazing tool I created for a project which had a lot of frame less windows. and glass railings. I hope you find it useful.
I used the "pick 3 points rectangle" approach to install the glazing into any opening
be it horizontal, vertical or sloped orientation.However I have not been able to find a way to set the Glazing back from the face of the
opening. Perhaps someone can help me with the required code to get this option working.
-
RE: [Plugin] 3d Shapes Tool (was: Pyramid Tool)
Thanks Macs, I have been looking for a code snippit for finding 3d mid points
and other points that work in all planes.
thanks also for not hiding the code, ala encryption. -
RE: Roof.rb v2
Thanks again TIG for a great.....great script!
If you are interesting in more Head Hurting Math.
you could add a Rake Fascia option, instead of the current plumb cut.I think the idea of the rafters sitting on the exterior wall is valid,
from a construction point of view, regardless be they Rafters or Trusses.
Hence the option of raked versus horizontal Soffit could be added.
BTW the older RoofTool and RafterTool scripts use the same principal,
of rafters sitting on the exterior load bearing walls.I don't know if you have seen the Archicad Roof framing feature.
Talk about "Head Hurting Math", all the jack and valley rafters
fit neatly against the hip and valley rafters (which is a compound miter cut),
the birds mouth cut for each rafter is also shown all in 3D.cheers!
-
RE: Roof.rb v1
fantastic script TIG!
Please allow me to make the following small observation:
see attachment -
RE: Pushpull coding problem
Todd, I think you misread my last post.
I found that code in a another Ruby, and applied it to my example. and viola it WORKS!
what followed was my understanding of what I thought the code was doing.
I would like you to comment if my understanding is correct.and I don't understand why adding ".first" make the pushpull work?
-
RE: Pushpull coding problem
Sorry but I don't understand your coding lingo
But I did find an example piece of code from a previous Ruby that works
model.entities.add_arc([x+@dist, y+@dist, z], vecx, vecz, @d/2, 0, pi/2, @s)
model.entities.add_line([x+@dist, y+@dist, z],[x+@dist, y+@dist+@d/2, z])
e=model.entities.add_line([x+@dist, y+@dist, z],[x+@dist+@d/2, y+@dist, z])
e.find_faces
e.faces.first.pushpull @thickdo I understand the following correctly?
"e",collects the 3 entities (arc, line & line)
"e.find_faces" ,then makes the face out of the entities
now what does "first" do because without it pushpull still wont work?
tia
-
Pushpull coding problem
I have a 1/4 circle, and the face defined
how do I code the pushpull?e = entities.add_arc([x+$dist, y+$dist, z], vecx, vecz, $d/2, 0, pi/2, $s)
e = entities.add_line([x+$dist, y+$dist, z],[x+$dist, y+$dist+$d/2, z])
e = entities.add_line([x+$dist, y+$dist, z],[x+$dist+$d/2, y+$dist, z])
e.find_faces # the face is now defined
e.pushpull $thick #thick is definedtia
-
RE: Ruby Tutorial: How to create and add a component from Ruby
I'm re-reading your comments, and somehow I get the feeling we are misunderstanding each other.
I think I'm responsible for that misunderstanding at the very beginning.your response to my question about the joist and rafter tools is a case in point.
I quote you:
"But the Joist and Rafter tools make a component that is repeatedly copied AND if you subsequently edit one of them then they all change !"
What I quoted above, is exactly what I would like my script to do. I'm not looking for parts that are unconnected, as you talk about in the remainder of your quote.
I would like all of the cubes that my script repeatedly copies/generates, to be made a component, so that if I then edit one all the rest will change.
-
RE: Ruby Tutorial: How to create and add a component from Ruby
OK, I really don't understand at this point how or where I'm going to introduce make_unique, into my existing script. I have the following inserted before the 1st upto statement
definitions = model.definitions
component = definitions.add
entities = component.entitiesfollowed by:
trans = Geom::Transformation.new
entities = model.active_entities(component, trans)after the cube has been drawn
What I cant wrap my head around is:Both my script, Box4.rb and JoistTool.rb create copies of 3d entities.
JoistTool.rb uses t=Geom::Transformation.translation to make copies
while, Box4.rb uses Upto to make copies.Obviously these copies are treated differently in Ruby?
causing JoistTool.rb work, and Box4.rb not work?(I'm sorry for my thick head)
-
RE: Ruby Tutorial: How to create and add a component from Ruby
I'm wondering why you would suggest Make_unique
I was copying similar code from JoistTool.rb which allows for
component editing of the type I'm looking for.Yet JoistTool.rb does not contain any Make_unique code.
I'm wondering if the Upto statements are causing a problem?
-
RE: Ruby Tutorial: How to create and add a component from Ruby
I'm still doing some further investigating into components used in Ruby
The attached Ruby could produce 2 options for component editing, by adding a sub menu.What works now is that each component in the group can be edited on its own
What does not work!
Editing one component in the group , and had have the other 8 follow the same editing changes.I hope someone can have a look at the code, I cant seem to find the right component code lines.
tia
-
RE: Ruby Tutorial: How to create and add a component from Ruby
I revisited the Cube this afternoon:
I added a dialog box, 2 sub-menus.
One for a component cube, the other
for a grouped cube. Then added some color
and transparency statements.Thanks TIG I will have a look at grow.rb
btw: using the component cube first , followed by grow.rb
and then changing any component cube creates some interesting effects.
-
RE: Ruby Tutorial: How to create and add a component from Ruby
I find these little "Ruby snippets" very helpful. they are a great way to learn to code in Ruby.
I have another idea for a snippet. Using the Cube as a basis that Todd started with above.How do I code a radial array of cubes about a central point?
tia