Non uniform scale from a given point

Hi,
I have an issue when using Transform.Scale(plane, x, y, z) in RhinoCommon. As you can see from the image below I am scaling from the purple dot, where the arrow points. The resulting geometry is however somewhat translated. Anybody has an idea why this is happening?

The code that performs this scale is roughly this:

var scalePlane = new Plane(purplePt, Vector3d.ZAxis);
var trafo = Transform.Scale(scalePlane, scalingFact.X, scalingFact.Y, 1.0);
var nuCurve = sampleSizeCurve.DuplicateCurve();

nuCurve.Transform(trafo);
return nuCurve;

am I doing something wrong?

Thanks a lot
Alberto

Hi Alberto,
What behaviour do you expect? That the curve perfectly aligns with the original one after performing the scaling? Because that’s not possible unless you have a straight line as input. I don’t see anything wrong with the result.

hi @Alberto, what type of curve is nuCurve ?

_
c.

Yes, that was more or less what I wanted to have (the distance is < 0.002) if I use the _ScaleNU command the result is somewhat better aligned.