ON_Brep::Transform

Hi;
I create a Sphere, and run my code to it, but the Sphere’s edge dong change, how can solve it ?

CRhinoGetObject go;
	go.SetCommandPrompt(L"Select object to Transform");
	go.GetObjects(1, 1);
	if (go.CommandResult() != CRhinoCommand::success)
		return go.CommandResult();

	CRhinoObjRef ref = go.Object(0);
	ON_Brep* br = ref.Brep()->Duplicate();
	ON_Xform xf_sc = ON_Xform::ScaleTransformation(ON_Plane::World_xy, 0.2, 1.0, 1.0);
	br->Transform(xf_sc);
	RhinoApp().ActiveDoc()->DeleteObject(ref);;
	RhinoApp().ActiveDoc()->AddBrepObject(*br);

You’re probably better off transforming the rhino object using
https://developer.rhino3d.com/api/cpp/class_c_rhino_doc.html#a8997aeff8afe649d2936aae21f298c6e

Hi@menno;
Thank you :grinning: