josiah
02-17-2004, 06:46 PM
Hello everyone.
I am working on a script that will select the edges of a mesh whose attached faces fall below a certain angle threshold. If the two faces are say, less than 10 degrees in their hinge angle, the edge will be selected.
The problem I am having is getting the angle between two faces attached to a common edge.
Heres an excerpt of the script:
////////////////////////////////////////////////
local edge_selection = #{}
local base_obj = $.baseobject
local num_edges = polyop.getNumEdges base_obj
for f = 1 to num_edges do
(
local edge_faces = polyop.getEdgeFaces base_obj f
local faces_angle = polyop.getFacesAngle edge_faces
if faces_angle < 10 do edge_selection[f] = true
)
///////////////////////////////////////////////
Of course, there is no "polyop.getFacesAngle", that returns the angle between two faces, but this illustrates what I am trying to do.
So how can I do this? Any Ideas are appreciated!
Thanks!
I am working on a script that will select the edges of a mesh whose attached faces fall below a certain angle threshold. If the two faces are say, less than 10 degrees in their hinge angle, the edge will be selected.
The problem I am having is getting the angle between two faces attached to a common edge.
Heres an excerpt of the script:
////////////////////////////////////////////////
local edge_selection = #{}
local base_obj = $.baseobject
local num_edges = polyop.getNumEdges base_obj
for f = 1 to num_edges do
(
local edge_faces = polyop.getEdgeFaces base_obj f
local faces_angle = polyop.getFacesAngle edge_faces
if faces_angle < 10 do edge_selection[f] = true
)
///////////////////////////////////////////////
Of course, there is no "polyop.getFacesAngle", that returns the angle between two faces, but this illustrates what I am trying to do.
So how can I do this? Any Ideas are appreciated!
Thanks!
