public static Plane GetPlaneWithBasisY(PlanarFace f, XYZ vecY) { if (!GeomUtil.IsEqual(GeomUtil.DotMatrix(vecY, f.FaceNormal), 0)) { throw new Exception("VecY is not perpendicular with Normal!"); } return(Plane.CreateByOriginAndBasis(f.Origin, GeomUtil.UnitVector(GeomUtil.CrossMatrix(vecY, f.FaceNormal)), vecY)); }
public static double GetSignedDistance(Plane plane, XYZ point) { XYZ v = point - plane.Origin; return(Math.Abs(GeomUtil.DotMatrix(plane.Normal, v))); }