Thanks sdmitch - The Updated Code Snippet does everything I wanted to achieve and it is now being used by members of the IMVU-SketchUp Community to "Antagonize/Annoy" some of those unfortunate people who mistakenly think only AutoDesk can produce 3D Model Making Software.
Posts
-
RE: Help Needed - Using Ruby to Project a Vertical Face.
-
RE: Help Needed - Using Ruby to Project a Vertical Face.
The need/desire to rotate the "Cloned Face" so that it's base is parallel to the X-Axis is to Ensure that the User Can Specify the Location of any Objects being Added/Painted onto the Actual Face by entering only the X and Z distances (offsets) from the Bottom Left Corner of the Face (or the bounding box surrounding a non-rectangular face).
If I place a 24" High Octagon, which has none of it's vertical faces parallel to the X-Axis, into the workspace and select any Face that forms the "Front Half" of the Octagon I can rotate their Cloned Faces so that its base is parallel to the X-Axis. Unfortunately if I choose any of the Faces that form the Back-Half of the Octagon the Cloned Face ends up being rotated away from the X-Axis and not towards it.
Presumably the question is - How do I detect a Face that is Currently Facing the Camera but would have it's Back to a Camera set to "viewFront" so that I can Adjust the Direction of Rotation to get the Cloned Faces Base parallel to the X-Axis? -
RE: Help Needed - Using Ruby to Project a Vertical Face.
Thanks sdmitch - that helped enormously however I now have another problem - Once I've got the Horizontal "Cloned" Face how do I rotate it to get it's "base" parallel to the X-Axis so that I can obtain the Dimensions of the Face and not those of the Bounding Box that surrounds a face that is not parallel to the X Axis?
-
RE: Help Needed - Using Ruby to Project a Vertical Face.
It is the Copy that has to be Projected onto the XY Plane, the Selected Face has to remain where it was.
-
Help Needed - Using Ruby to Project a Vertical Face.
I need some help with Projecting a Vertical Face onto the Horizontal when the only Geometry that has been Selected is a Face.
I am in the process of trying to write a Ruby Plugin that allows the User to "Paint" Geometric Representations of Cal3D Node onto a Selected Face. I'm trying to set the plugin up so that all the user has to do is Select a Face and then, via a user input form, specify where on the face the Cal3d Node(s) should be placed. By borrowing and adapting some Code Snippets from one of ThomThom's Plugins I can create a Projected Horizontal Face from a Face that is sloping but no matter what I try I don't seem to be able to do it for Vertical Faces.
The Temporary Horizontal Face is needed to check that any Location the User Specifies is on the Face without them having to know the Faces Orientation and Size and to ensure that when the Cal3D Node is Painted onto the Selected Face it has the Required Z Axis Orientation.