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,