Polycurve does not ProjectToCPlane - Another example

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

@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)

Projects:
ON_LineCurve: domain = [593.465,593.528]
start = (95.39512912869813, 11.999999999999998, 0.74999999999999822)
end = (95.39512912869813, 12, 0)

Does not project:
ON_LineCurve: domain = [598.219,598.281]
start = (95.904080115970004, 15, 0.75000000000000178)
end = (95.904080115970004, 15, 0)

RH-66441 is fixed in Rhino 7 Service Release 14 Release Candidate