Example #1
0
        public void drawColumn(Rhino.Geometry.Point3d point1, Rhino.Geometry.Point3d point2, double height, double width)
        {
            Rhino.Geometry.Plane       plane   = new Rhino.Geometry.Plane(point1, new Rhino.Geometry.Vector3d((point2 - point1)));
            Rhino.Geometry.Point3d     cornerA = new Rhino.Geometry.Point3d(point1.X - width / 2, point1.Y - height / 2, point1.Z);
            Rhino.Geometry.Point3d     cornerB = new Rhino.Geometry.Point3d(point1.X + width / 2, point1.Y + height / 2, point1.Z);
            Rhino.Geometry.Rectangle3d rect    = new Rhino.Geometry.Rectangle3d(plane, cornerA, cornerB);

            Rhino.Geometry.Surface srf = Rhino.Geometry.Surface.CreateExtrusion(rect.ToNurbsCurve(), new Rhino.Geometry.Vector3d((point2 - point1)));

            SetPreview(srf.ToBrep());
        }
Example #2
0
 public void drawExtrusion(Rhino.Geometry.Point3d point1, double height, double width, double thickness)
 {
     Rhino.Geometry.Plane plane = new Rhino.Geometry.Plane(point1,Rhino.Geometry.Vector3d.ZAxis);
     Rhino.Geometry.Point3d cornerA = new Rhino.Geometry.Point3d(point1.X - width / 2, point1.Y - height / 2, point1.Z);
     Rhino.Geometry.Point3d cornerB = new Rhino.Geometry.Point3d(point1.X + width / 2, point1.Y + height / 2, point1.Z);
     Rhino.Geometry.Rectangle3d rect = new Rhino.Geometry.Rectangle3d(plane, cornerA, cornerB);
     Rhino.Geometry.Surface srf = Rhino.Geometry.Surface.CreateExtrusion(rect.ToNurbsCurve(), new Rhino.Geometry.Vector3d(0, 0, thickness));
     SetPreview(srf.ToBrep());
 }