I have a building , i tried to select vertical edge but i can not , can you help me ? Thank you very much
Forum topic · General Scripting
HOW TO SELECT VERTICAL EDGE IN POLY ?
By alexnguyen · 2016-04-11
Forum topic · General Scripting
By alexnguyen · 2016-04-11
I have a building , i tried to select vertical edge but i can not , can you help me ? Thank you very much
Comments (6)
Comment policy
and How to select horizontal edges?
:)
actionMan.executeAction 0 "40044" -- Selection: Select Invert
.
What is "vertical" edge?
You can try this:
1- get the edges one by one
2- get the verts of this edge
3- check if the Z position of one verts is higher than the Z position of the other vert. If the X and Y position of both verts are the same then this is "vertical" edge.
thank
but how can i do in maxscript ? can you give me the function ?
.
Select only one Editable Poly object.
thank u very much
when i wait you , i do one for my self :)
mangcanh =#()
sPoly=$
subObjectLevel = 2
actionMan.executeAction 0 "40021" -- Selection: Select All
idcanh = sPoly.getSelection #Edge as array
k = idcanh.count
for i = 1 to k do
(
polyop.setEdgeSelection sPoly i
redrawViews()
sPoly.convertSelection #Edge #Vertex
aVerts = sPoly.getSelection #Vertex as array
diema = aVerts[1]
diemb = aVerts[2]
toadoa = polyOp.getVert sPoly diema
toadob = polyOp.getVert sPoly diemb
if ( toadoa.x == toadob.x and toadoa.y == toadob.y ) then append mangcanh i
)
sort mangcanh
mangcanhmoi = mangcanh as bitarray
sPoly.EditablePoly.SetSelection #Edge mangcanhmoi
but i think your code is better , thank u alot