Of course you could always create your faces from 4 points set up in a counterclockwise direction to set the normal - always remembering that faces made flat on the ground will ALWAYS face down irrespective of the vertices’ ordering, so IF you want them to face up check for the Z=-1 and. # if it hits something and that is in the cube group then we reverse the face ? Let’s assume the reference to the group is name ‘group’, and you iterate all faces in turn… vec = face.normal If you are working in a group then you can do a ‘raytest’ and see if it hits - this is fine for a simple cube but prone to errors in complex forms… Z = 1 is flat+up and Z = -1 is flat+down.Īs has been said when Z = 0 it’s vertical. We were talking of ‘roof planes’, which have a Z > 0 when facing up and Z < 0 when facing down. I started The SketchUp Essentials as a place to share easy to follow SketchUp tutorials and tips to help everyone harness the power of 3D Modeling in their lives. Go to the alter tab of the styles dropdown in the default tray. You likewise need to ensure styles are checked. I quickly realized the power of the software and started using it for personal projects. Open the default tray by exploring to window > default tray and select show tray. ![]() Usually a test such as TIG describes using the x, y, or z value of the normal is sufficient. I started using SketchUp as part of my work as a general contractor in 2008. 0:00 / 0:48 How To Reverse and Orient Faces - SketchUp for Interior Design SketchUp Hub 3.23K subscribers Subscribe 8.1K views 5 years ago Very useful tool to orient multiple connected. ![]() My practice goes along the lines TIG describes: “correct” depends on how I want the face to be oriented, and since I am creating the model in Ruby code, I know what direction that is. John gave you a somewhat mathematical approach (which works so long as the figure is convex), and TIG gave you a pragmatic one for your specific situation. When the face is created or modified by operations other than entities.add_face, you might not know which way the normal ended up and will have to test. When many faces of the group are reversed face, if you do it manually, you have to reverse each side, so it takes a long time to do this, so use an automatic tool. ![]() The exception is that if the face is created at z=0, SketchUp will always force its normal to point to negative z regardless of the order of your points. That is, if the points are ordered counterclockwise from your point of view, then you are looking toward the front of the face. With one key exception, SketchUp follows the “right hand rule” based on the ordering of the points when you create a face in the Ruby API using entities.add_face.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |