예제 #1
0
        public static RectangularGeometry TogbXML_RectangularGeometry(this PlanarBoundary3D planarBoundary3D, double tolerance = Core.Tolerance.MicroDistance)
        {
            if (planarBoundary3D == null)
            {
                return(null);
            }

            return(Geometry.gbXML.Convert.TogbXML_RectangularGeometry(planarBoundary3D.GetFace3D(), tolerance));
        }
예제 #2
0
        public static PlanarGeometry TogbXML(this PlanarBoundary3D planarBoundary3D, double tolerance = Core.Tolerance.MicroDistance)
        {
            if (planarBoundary3D == null)
            {
                return(null);
            }

            Geometry.Spatial.Face3D face3D = planarBoundary3D.GetFace3D();
            if (face3D == null)
            {
                return(null);
            }

            PlanarGeometry planarGeometry = new PlanarGeometry();

            planarGeometry.PolyLoop = face3D.TogbXML_PolyLoop(tolerance);

            return(planarGeometry);
        }
예제 #3
0
        public static PlanarBoundary3D Transform(this Transform transform, PlanarBoundary3D planarBoundary3D)
        {
            if (transform == null || planarBoundary3D == null)
            {
                return(null);
            }

            if (transform.IsIdentity)
            {
                return(new PlanarBoundary3D(planarBoundary3D));
            }

            Geometry.Spatial.Face3D face3D = planarBoundary3D.GetFace3D();
            if (face3D == null || !Geometry.Spatial.Query.IsValid(face3D))
            {
                return(null);
            }

            return(new PlanarBoundary3D(Geometry.Revit.Query.Transform(transform, face3D)));
        }