Пример #1
0
        public override IGH_GeometricGoo Morph(Rhino.Geometry.SpaceMorph xmorph)
        {
            if (m_value != null)
            {
                var m = new TurtleMesh(m_value);

                foreach (var v in m.GetVerticesEnumerable())
                {
                    Point3d p = new Point3d(v.X, v.Y, v.Z);
                    p = xmorph.MorphPoint(p);

                    v.X = (float)p.X;
                    v.Y = (float)p.Y;
                    v.Z = (float)p.Z;
                }

                return(new GH_TurtleMesh(m));
            }
            else
            {
                return(new GH_TurtleMesh(null));
            }
        }
Пример #2
0
        public override IGH_GeometricGoo Transform(Rhino.Geometry.Transform xform)
        {
            if (m_value != null)
            {
                var m = new TurtleMesh(m_value);

                foreach (var v in m.GetVerticesEnumerable())
                {
                    Point3f p = new Point3f(v.X, v.Y, v.Z);
                    p.Transform(xform);

                    v.X = p.X;
                    v.Y = p.Y;
                    v.Z = p.Z;
                }

                return(new GH_TurtleMesh(m));
            }
            else
            {
                return(new GH_TurtleMesh(null));
            }
        }