Another example of a polycurve which ProjectToCPlane will not project. Attempting to ProjectToCplane in the top view. NotProject.3dm (1.7 MB)
A similar curve with the same structure projects, as well as many other similar curves in the original file. In this example the problem are the short segments normal to the Cplane. But the other curve which works has seemingly identical segments.
I previously reported a similar problem. ProjectToCplane does not work - bug? But in this example the short, perpendicular segment ends on the Cplane instead of being centered about it. The work-around is to use SetPt.
Hi David - thanks, I think ProjectToCPlane will always balk at segments parallel to the projection direction. My guess is there has been some curve-validation stuff added over the years to remove degenerate segments and that the command has not been updated to pay attention to that, while SetPt seems to. I’ll check with the developer.
RH-66441 ProjectToCPlane: fails with vertical segments
@pascal The “balking” is inconsistent, and appears to be dependent on differences of truncation error magnitude.
Exploding the polycurves and examining the perpendicular segments with List shows the segment for which ProjectToCPlane works deviates from perpendicular by 0.000000000000002 while the segment which does does not work is exactly perpendicular. Interesting the segment which does project results in nothing (null set). Presumably the code removes very short segments after projection.
I think I have provided enough details for a developer to fix this. Look at what is being tested and modify appropriately. NotProject2.3dm (1.7 MB)