Notifications
Clear all
[Closed] DISPLAY WRONG:N-sides faces with xView
Dec 06, 2013 10:46 am
Hi,
I want to display the faces which using more then 4 edges with xView,and here’s the script.
It works fine when I select only one object,but while I select more objects,it displays wrong.
(
global NsideFaceChecker
struct NsideFaceCheckerStruct
(
NsideFaceThresholdMin = 4,
fn geomCheck theTime theNode theResults =
(
if classof theNode == Editable_Poly then
(
for f = 1 to getNumFaces theNode do
(
num=polyOp.getFaceDeg theNode f
if num > NsideFaceChecker.NsideFaceThresholdMin do append theResults f
)
)
else
(
temp = convertTo (snapshot theNode) editable_poly
i=0
for f =1 to getNumFaces temp do
(
num = polyOp.getFaceDeg temp f
if num > NsideFaceChecker.NsideFaceThresholdMin then
(
--append theResults f
for t=1 to num-2 do append theResults (t+i)
)
i += num-2
--print i
)
delete temp
)
3
),
fn supportedCheck theNode =
(
classof theNode == Editable_Mesh or classof theNode == Editable_Poly
)
)--end struct
NsideFaceChecker = NsideFaceCheckerStruct()
XViewChecker.unRegisterChecker "Nside Face Checker"
XViewChecker.registerChecker NsideFaceChecker.geomCheck NsideFaceChecker.supportedCheck #Faces "Nside Face Checker" undefined undefined undefined
)--end script
Does somebody know what wrong with the code?
THANKS