Interface: OpenEdges

Interfaces > Core Interfaces > OpenEdgesxView Checker

 

   

Viewport Shading - Quick Navigation

   

Core Interfaces - Quick Navigation

The OpenEdges Core Interface exposes methods for interacting with the Open Edges xView Checker.

Available in 3ds Max 2010 and higher.

   

Properties:

Does not expose any properties.

   

Methods:

<enum>OpenEdges.Check <time>time <node>nodeToCheck <&index array>results 	 

Check enums: {#Failed|#Vertices|#Edges|#Faces} 	 
results is In and Out parameter   

Performs an Open Edges xView check at the given time on the specified node and returns its results in the array passed by-reference as third argument.

The method itself always returns the #edges enum because the values written to the results array by the Open Edges check always represent indices of open edges.

   

<bool>OpenEdges.hasPropertyDlg() 

Returns true if the xView checker implements a property dialog, false if it does not.

In the particular case of the Open Edges checker, it always returns false.

   

<void>OpenEdges.showPropertyDlg() 

Shows the property dialog of the xView checker, if implemented.

In the particular case of the Open Edges checker this method does nothing.

EXAMPLE:

The following code creates a plane with 5x5 segments, then collapses it to Editable Poly and deletes some internal polygon in the shape of the letter T, thus creating some more open edges.

thePlane = plane width:100 length:100 widthsegs:5 lengthsegs:5
--> $Plane:Plane01 @ [0.000000,0.000000,0.000000]
convertTo thePlane Editable_Poly
--> $Editable_Poly:Plane01 @ [0.000000,0.000000,0.000000]
polyop.deleteFaces thePlane #{7..9,13,18}
--> OK

 

 

The following call to the OpenEdges.check() method will return the open edges. It does NOT require the Open Edges Checker to be active in the viewport and can be used in MAXScript code to acquire open edges indices into an array or bitarray:

theResults = #() --we need an array to store the results in
--> #()
 
--We call the method by passing the time to check at,
--the object to check and the by-reference array to store
--the results in. The return result of the method itself
--will be #vertex becausethe method operates on vertices
--and the content of theResults array should be threated
--as vertex indices:
resultType = openEdges.Check currentTime thePlane &theResults
--> #Edges
 
--If we would print out the content of the array variableas bitarray,
--it will contain the indices of the open edges as bits set to true:
theResults as bitarray
--> #{1, 4..5, 7..8, 10..11, 13, 15..17, 19..22, 24..25, 29..30, 34..35, 39..41, 45..47, 49, 51, 53, 55..56}
 
--We can check the number of returned edge indices - it will
--be the same as the count reported by the Open Edges Checker
--in the Viewport:
theResults.count
--> 32
 
--We could easily select the open edges now:
polyOp.setFaceSelection thePlane theResults
--> OK

See Also