I want convert a point from Plane space coordinates into World space coordinates.
Like Rhino.Geometry.Plane.RemapToPlaneSpace(Rhino.Geometry.Point3d ptSample, out Rhino.Geometry.Point3d ptPlane) . In turn
@dale
To remap geometry from one coordinate system to another, you need to compute a change of basis transformation, or Rhino.Geometry.Transform.ChangeBasis
.
For example, if you have a 3-D point in world coordinates and you want to remap it to the coordinates of some plane, you can do this:
var plane = doc.Views.ActiveView.ActiveViewport.ConstructionPlane();
var world_point = plane.Origin;
var world_to_plane = Transform.ChangeBasis(Plane.WorldXY, plane);
var plane_point = world_point;
plane_point.Transform(world_to_plane);
Likewise, if you have a 3-D point in plane coordinates and you want to remap it to world coordinates, you can do this:
var plane = doc.Views.ActiveView.ActiveViewport.ConstructionPlane();
double s, t;
plane.ClosestParameter(plane.Origin, out s, out t);
var plane_point = new Point3d(s, t, 0.0);
var plane_to_world = Transform.ChangeBasis(plane, Plane.WorldXY);
var world_point = plane_point;
world_point.Transform(plane_to_world);
Does this help?