In the future, I’d appreciate it if you’d post these types of questions on the forum. I’m sure others would benefit from your question and answer.
First, a curve has a direction. And the plane of a closed planar curve is calculated from this, the tangent, direction.You can use Curve.ClosedCurveOrientation to determines the orientation (counterclockwise or clockwise) of a closed, planar curve in the world xy plane. You can also use Vector3d.IsParallelTo to compare the curve plane’s z-axis to the world z-axis.
Also, If you want to transform some from one coordinate system to another (e.g. from world xy-plane to construction plane or vise versa), then create a change of basis transformation - Transform.ChangeBasis. I doubt this is what you’re looking to do. Instead, use Transform.PlaneToPlane, which creates a rotation transformation that orients one plane to another plane.