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. There is a useful plugin called Makefaces.rb that facilitates the users to produce a face or multiple faces out of existing linework. The tutorial briefly shows how to use Sketchup Pro 2016 to generate faces and resolve all the crucial issues associated with faces. Usually a test such as TIG describes using the x, y, or z value of the normal is sufficient. This sketchup tutorial is made in spanish language. 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. ( Viewing a Model explains SketchUps viewing options.) With the Rotate tool selected, you then lock the protractor cursor in the blue direction and click the top to set the angles vertex (Callout 1). Let’s say that we draw a triangle using the line tool. In order to draw a face, SketchUp must have at least 3 lines that create a closed shape on a 2 dimensional plane (meaning that the 3 lines must all intersect at some point). 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. Start by selecting the whole telescope and then select Camera > Standard Views > Top to see the telescope from above. Faces are two dimensional areas that are drawn between lines. 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. 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. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |