Create face point: Difference between revisions
From Macros Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 40: | Line 40: | ||
::get_solid_face_point sol_ref, face_ref, uu, vv, xx, yy, zz | ::get_solid_face_point sol_ref, face_ref, uu, vv, xx, yy, zz | ||
<br> | <br> | ||
::point xx, yy, zz ! create the point | ::point xx, yy, zz ! create the point | ||
<br> | <br> | ||
:next j | :next j | ||
Latest revision as of 18:16, 12 August 2010
! create a point in the middle of each selected face
! --------------------------------------------------
| get_selected_solid_list | ! get list of selected solids |
| num_solids = number_of_solids | |
| if num_solids<1 then stop "Please select at least 1 face" | |
| num_points = 0 | |
| for i=1 to num_solids |
- sol_ref = next_solid_ref
- get_solid_selected_face_list sol_ref
- num_faces = number_of_faces
- for j=1 to num_faces
- face_ref = next_face_ref
- ! get the extents of the face in uv space
- ! ---------------------------------------
- get_solid_face_uv sol_ref, face_ref, u1, v1, u2, v2
- ! get the xyz position of the middle of the face in uv space
- ! ----------------------------------------------------------
- uu = (u1 + u2)/2
- vv = (v1 + v2)/2
- get_solid_face_point sol_ref, face_ref, uu, vv, xx, yy, zz
- point xx, yy, zz ! create the point
- next j
| next i |
| redraw |