[Plugin] Perpendicular Face Tools (UPDATED 26-03-09)
-
Perpendicular Face Tools
Description: Three Perpendicular Face tools to help create faces perpendicular to the end of lines.
Usage: Activate it at Plugins>Chris Fullmer Tools>Perpendicular Line Tools. Change the size of squares by entering a new dimension into the measuerments box after the face has been created. Change the radius of circles by entering "12s" for 12 sides into the measurements box. To use the custom face tool, create your face flat on the groundplane. The script attempts to line up the x axis as the bottom edge of the face.New Video for v1.1 (outdated for 1.2. Doesn't show that you can hit the up arrow key to rotate).
[flash=670,630:oiucovcq]http://www.chrisfullmer.com/chrisfullmer/forums/clf_perpendicular_face_tools_v1_1.swf[/flash:oiucovcq]Chris
v0.1 beta
v1.0 Updates:- The original face now explodes upon exiting the custom face tool.
- Added support so that faces will stay oriented with a flat edge on the horizontal plane.
- Holding ctrl while creating a face will over-ride the flat horizontal feature and revert back to the default SketchUp "Arbitrary Rotation".
- Now faces can be added anywhere to a line - on the endpoint (existing feature), in the middle of a line, or on a vertex of 2 lines. The vertex of 3 lines is not supported.
v1.1
- Attempted to fix some bugs with the custom face tool. It only was working once in a while. And only if the blue face was up. Now it is slightly better. But there are still times when it will need to be rotated 180degrees after it is placed. sorry
- Added a Toolbar!
v1.2 - Changed so that circles default to have their vertices on top and bottom, not edges. Odd segmented circles will have the vertex on the bottom and a flat edge on the top (I think).
- The up arrow key rotates the faces after they have been placed. Squares will rotate 45 degrees. Circles will rotate the angle needed to alternate between having an edge or a vertex on the top. Custom faces rotate in 90 degree increments. Helpful for fixing faces that are oriented 180 off, or that were drawn on the wrong axis.
-
Wow Chris, this is such a good script and I know it will be very well used.
Thanksps, the videos you create are so helpful, nice work.
-
Chris, this is great! What a time saver.
Now, not to look the proverbial gift horse in the mouth but, is there a way to define the rotational orientation of the profile before it is created? I realize it can be rotated after it is placed and before FM.
Thanks again.
Dave
-
Holy discombobley thats cool
-
You compete for the "A day, a Plug" ?
Amazing one
Waiting updatesPs What append when your list of Sub menu plugins will be more big than the screen?
Does exist scroll for this state?
My little scrolling black triangles are come back! (for the normal Plugins menu)
so no limitation of numerous plugins! -
Very good implementation.
To get the face to 'orient' consistently the following could be considered...
Circle - not so important to get 'square', but if it has few segments it'd be best if a vertex were at the lowest point in Z ? If face is 'flat' in Z then make vertex minimal in Y. It's relatively easy to find locations of all of circle's vertices and pick one and rotate (transform) the circle face about its centre axis so its Z (or Y) is minimal OR make the edge 'horizontal' - both vertices have same Z (or Y).
Square - it's best to make one edge 'horizontal' so both of its vertices [start & end points] have same Z. If it's 'flat' in Z then make an edge's vertices equal in their Y. Followme can still skew the square along 3D paths but at least it'll start right.
Custom-face - if the custom-face is originally drawn 'flat' you can find its rotation around the Z axis - pick any edge and get its vertices' angle relative to say X axis. Then apply the equivalent rotation transformation to the line-end-aligned copy. That way you can determine the starting rotation of the face by rotating the original before using your tool - that would also let you have a rotated square 9diamond) as the custom-face if desired...
You currently take 'sp1' as the center of the face's bounding-box - which is the easiest, and probably the best way - having selectable 'sp1' on the original seems too awkward. You can always move the grouped face when it's perpendicular to the selected path end; you can also rotate it later too, before the Followme is done...
.
-
Chris
Just plain thank you.
dte
-
Nice, thanks.
-
Hey thanks everyone! I'm glad you like it.
@Tig, I would love to implement all of that. I just need to make sure I understand it I think I can figure out how to make the circle work out so its lowest z is always a vertex. For the square, my code draws it always flat on the YZ axis and then rotates it once to be perpendicular. Would I just set another rotation transformation to then level the botom edge and top edge to be horizontal? Or does that have to be built into the original transformation? I could probably pull it off as a second transformation, but I am not sure how to make it be part of the first. I'll have to make a SketchUp model of how that should work. And the custom face I think I see what you mean to get orientation first, then use that after it is placed to re-orient it so that the x axis on the original is horizontal in the copy. Again, I think I can do that, assuming I can apply two rotation transformations to a group.
All right, no promises, but I will try to take on these changes and see if I can get a more predictable orientation system working. If its easy, it shouldn't take more than a day or two. If it gives me fits, then.......If you hven't noticed, moving,rotating, scaling are not my forte. They require some serious math thinking that I am not trained in. But I am trained in 3d. So as long as I can visualize it, I hopefully can figure out how to implment it. Thanks for the GREAT suggestions Tig!,
Chris
-
Rotate it after it's placed onto the vertex. You know the rotation axis as it's the line you are perpendicualr to...
.
-
Brilliant!
-
Chris,
A big thank you again for your generosity. Nice work!
Ben
-
Thanks guys. Tig, that makes sense. For some reason I was imaging a transformation as something that erases previous transformations effects once applied. So apply one transformation and it does that. Apply another and it jumps back to the original state before the first transformation and then applies the new transformation. I see now that its not like that (thank goodness). Seems silly I was confused since on hte custom face part I apply a translation first and then a rotation. I should have realized that transformations do not erase the effects of the previous transformation. So yes, I like the methods you describe to always have an edge horizontal. That seems quite logical.
Would there be a demand to have the custom face option accept more than one face? I know some of my profiles I use often include 3 or different faces that I want to use. So perhaps I'll try and make it accept multiple faces as long as they are co-planar.
Also I need to make it work when clicking on an edge, not just an end point. Some instances, like when the path makes a completed loop like a circle, there are no endpoints to use. So I'll get that into my next update. Maybe a toolbar too. I think I've got some extra time today during class
Chris
-
awsome chris!! a time saver, the essence of ruby ... now try some UV mapping scripts .... my biggest current peeve in SU (there are so many)
-
MALAISE
-
seems somebody understands! great tool and more as I expected
-
ok, I'm struggling to get the rotations to work. I'm working on the square first. I can get it to rotate nicely around the z-axis. But I have not figured out a way to determine exactly how much to rotate it to get it where I want. I think this is just my lack of general mathematical knowledge. So can anyone offer some help with this? The image shows a mock-up of the problem. The square is what I am rotating on the labeled centerpoint. Chord AB needs to align with chord CD. But chord AB is not supplied. It is the vector made of 2 points where the y values are equal and its length is equal to AB.
I'm sure that explanation makes no sense. Hopefully someone out there can read between the lines and figure out what I'm actually asking. Thanks,
Chris
-
could you not just align one of the sides to vertical (z)?
-
No, it doesn't show it well, but the sides are often not vertical. The alignment needs to make the top and bottom lie on planes that are "flat", but the sides are not necessarily vertical.
-
Thank you Chris A very useful script, am using it right now
Advertisement