Scaling by SDK like Transform.Scale(plane,2,2,2) or scaling in design using Gumballs or Scale1D, Scale2D or Scale commands also works fine, although if you scale it using gumball and scale back to the original size, using the SDK Scale() method also works fine
protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{
var rc = RhinoGet.GetOneObject("Select curve to scale non-uniformly",
false,
ObjectType.Curve,
out var obj_ref
);
if (rc != Result.Success)
return rc;
var curve = obj_ref.Curve();
if (null == curve)
return Result.Failure;
var bbox = curve.GetBoundingBox(true);
var plane = new Plane(bbox.Center, Vector3d.XAxis, Vector3d.YAxis);
var xform = Transform.Scale(plane, 2, 1, 1);
var curve_copy = curve.DuplicateCurve();
// If not a similarity transformation, make sure geometry
// can be deformed. Generally, this involves converting non-NURBS
// geometry into NURBS geometry.
if (xform.SimilarityType == TransformSimilarityType.NotSimilarity)
curve_copy.MakeDeformable();
if (curve_copy.Transform(xform) && curve_copy.IsValid)
{
doc.Objects.Add(curve_copy);
doc.Views.Redraw();
}
return Result.Success;
}