Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I'm trying to test splines intersections and "hollows" by using some functions from the api inside maxscript. This example is based on a code found on internet but I'm not able to call SurroundsPoint(Point2 p), apparently I'm not able to pass a point2 value to that function.
Can someone help me with this? thanks a lot
(
g = (dotNetClass "Autodesk.Max.GlobalInterface").Instance
inode = g.coreinterface7.getinodebyhandle $.inode.handle
shp = ((inode.EvalWorldState (int currenttime) true).obj).shape_
splines = for i=0 to shp.SplineCount-1 collect shp.GetSpline i
for i=1 to splines.count do
(
format "isClockWise %\n" (splines[i].isClockWise)
format "matID %\n" (splines[i].getMatID 1 )
--without parameters the function is recognized
format "SurroundsPoint %\n" ( splines[i].SurroundsPoint )
--THIS GIVES AN ERROR
--format "SurroundsPoint %\n" ( splines[i].SurroundsPoint [0,0] )
format "Spline % is self-intersecting: %\n" i (splines[i].SelfIntersects)
for j=i+1 to splines.count where splines[i].IntersectsSpline splines[j] do
(
format "Spline % intersects spline %\n" i j
)
)
)
Solved! Go to Solution.