I have just realized that GetLine method returns World coordinates of two points. It makes sense however I just moved the CPlane and spend some time I realized its behaviour. I think it would be useful to include it in the documentation that points are according to the World coordinates and not the actual CPlane.
By the way I started building a script but something is not working properly. The XFormWorldtoCPlane does not translate.
Thank you, It is interesting , however the return value is a Boolean and it has two Point3d parameter. I want to get the Point3D coordinates as a result .
That (the result) is what you get in the second (out) parameter. Like so:
var ResultPoint = Point3d.Unset;
if (YourPlane.RemapToPlaneSpace(WorldPoint, out ResultPoint))
{
// use your "ResultPoint" safely, or just run the command without any check...
}
No checking
var ResultPoint = Point3d.Unset;
YourPlane.RemapToPlaneSpace(WorldPoint, out ResultPoint);
// use your ResultPoint.
I found a bug in the code. The code did not work before but when I introduce a new line rs.CPlane() in the code it works just fine. Could you have a look at it? (Row no.12)
I learnt a lot again. So, CPlanes can be different in every view and rs.ViewCPlane returns the previous(!) CPlane in the view (It is tricky). C#-vise by applying method for an object variable it changes its value so we are able to use the same variable with the modified data. As well as planes do not need to be coerced.