.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ClipBoundary2d.ClipPolygon() method problem

0 REPLIES 0
Reply
Message 1 of 1
SuperAda
212 Views, 0 Replies

ClipBoundary2d.ClipPolygon() method problem

I used ClipPolygon() method to try to get a closed Polygon after the polygon being clipped by the ClipBoundary. I used the CLipBoundary to make a projectPlane and project the rawPolygon to the projectPlane and then do clip. I made the code like bellow:
foreach (Point3d point in points)
{
Point3d projectedPoint = point.Project(projectPlane, clipBoundary.NormalVector);
Point2d point2d = new Point2d(projectedPoint.X, projectedPoint.Y);
rawPolygonPoints.Add(point2d);
}

ClipBoundary2dData clippedData = clipBoundary2d.ClipPolygon(rawPolygonPoints);
Point2dCollection clippedVertices2d = clippedData.ClippedVertices;

but I found the result wasn't right. And I did some test , found the first point of the RawPolygon wasn't clipped correctly. It would be maintained although it was out of the ClipBoundary.
Could you help me to point out any uncorrect in the code or the correct usage?

thanks,
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost