Curve.IsDeformable == false / bad result with Transform.PlanarProjection

Hi,

I’m intersecting some objects with a sphere, and then projecting the resulting curves on the XY plane using Rhinocommon. For some curves, I noticed that the output was wrong. After some debugging, I noticed that these curves have their ‘IsDeformable’ property set to false.

My questions:

  1. why are some intersection curves ‘not deformable’ curves? What makes a curve not deformable actually?

  2. is there a way to fix these curves?

  3. why Rhino (ProjectToCPlane command) and Rhinocommon (Transfrom.PlanarProjection) results differ? The ProjectToCPlane result is OK, it seems that Rhino is doing some extra fixing work under the hood…

Thanks for your support.

Reference file:
CurveIsNotDeformable.3dm (6.1 MB)

Version Info:

Rhino 7 SR22 2022-8-12 (Rhino 7, 7.22.22224.07001, Git hash:master @ 511a45af0c696f2c15a3e5a9bda0bb8bfb324b3f)
License type: Commercial, build 2022-08-12
License details: LAN Zoo Network Node

I can see some of your intersection polycurves contain arc segments. Arcs are not deformable. That is, you cannot apply “squishy” transformations to an arc and have it remain an arc.

Use GeometryBase.MakeDeformable. In the case of polycurves that contain arc segments, the arcs will be converted to NURBS curves.

Well, one is a robust command that takes a number of conditions into account and ensures the output is valid. The other is just a 4x4 transformation matrix…

– Dale

1 Like

Thanks @dale!

Way clearer in my mind now!
I somehow missed the ‘MakeDeformable’ method in the doc…