MerlinEl
02-19-2007, 11:14 AM
Visible edges on all models in scene is slowing work in max.
Better wil be show edges only for a selection.
My first atemption is using gw.polyline method:
fn showEdgedFaces poly_obj =
(
local eCount = poly_obj.Edges.count
if eCount == 0 do return false
gw.setTransform (Matrix3 1)
gw.setColor #line white
--draw lines
for i=1 to eCount do
(
local verts = (polyOp.getVertsUsingEdge poly_obj i) as array
local p1 = polyOp.getVert poly_obj verts[1]
local p2 = polyOp.getVert poly_obj verts[2]
gw.Polyline #(p1,p2) false
)
gw.enlargeUpdateRect #whole
gw.updateScreen()
)
This working fine, but one thing troubles me. "Backface Culing"
Here is need a function to recognize witch edges is on back and filtering them out.
I wil be greate for any tips or solutions. Thanks
Better wil be show edges only for a selection.
My first atemption is using gw.polyline method:
fn showEdgedFaces poly_obj =
(
local eCount = poly_obj.Edges.count
if eCount == 0 do return false
gw.setTransform (Matrix3 1)
gw.setColor #line white
--draw lines
for i=1 to eCount do
(
local verts = (polyOp.getVertsUsingEdge poly_obj i) as array
local p1 = polyOp.getVert poly_obj verts[1]
local p2 = polyOp.getVert poly_obj verts[2]
gw.Polyline #(p1,p2) false
)
gw.enlargeUpdateRect #whole
gw.updateScreen()
)
This working fine, but one thing troubles me. "Backface Culing"
Here is need a function to recognize witch edges is on back and filtering them out.
I wil be greate for any tips or solutions. Thanks
