Example #1
0
        public static CurtainWall Transform(this CurtainWall wall, TransformMatrix transform, double tolerance = Tolerance.Distance)
        {
            if (!transform.IsRigidTransformation(tolerance))
            {
                BH.Engine.Reflection.Compute.RecordError("Transformation failed: only rigid body transformations are currently supported.");
                return(null);
            }

            CurtainWall result = wall.ShallowClone();

            result.ExternalEdges = result.ExternalEdges.Select(x => x.Transform(transform, tolerance)).ToList();
            result.Openings      = result.Openings.Select(x => x.Transform(transform, tolerance)).ToList();

            return(result);
        }