Part 5

LinearPath lp1 = new LinearPath(Plane.XZ, new Point2D(0, -40), new Point2D(100, -40), new Point2D(100, 0), new Point2D(80, 0), new Point2D(80, -30), new Point2D(0, -30), new Point2D(0, -40));

Region reg1 = new Region(lp1);

Solid3D rev1 = reg1.RevolveAsSolid3D(Utility.DegToRad(360), Vector3D.AxisZ, Point3D.Origin);

viewportLayout.Entities.Add(rev1, 0, Color.DarkCyan);

CircularRegion cr2 = new CircularRegion(Plane.YZ, 0, 0, 10);

rev1.ExtrudeRemove(cr2, new Interval(-120, 120));

CircularRegion cr1 = new CircularRegion(Plane.XZ, 0, 0, 10);

rev1.ExtrudeRemove(cr1, new Interval(-120, 120));

viewportLayout.Entities.Regen();

            Console.WriteLine("Error " + rev1.GetError());
        }

        void Part5()
        {
Line l1 = new Line(40, 6, 40, 20);

Arc a1 = new Arc(0, -56, 0, 80, Utility.DegToRad(50), Utility.DegToRad(130));

Curve.Trim(l1, a1, false, true);

Line l2 = new Line(-40, 20, -40, 6);

Curve.Trim(a1, l2, false, true);

CompositeCurve cc1 = new CompositeCurve(new Line(-35,0, -35, 6),
    new Line(-35, 6, -40, 6),
    l1, a1, l2,
    new Line(40, 6, 35, 6),
    new Line(35, 6, 35, 0),
    new Line(35, 0, -35, 0)
    );

Region reg1 = new Region(cc1, Plane.XY);

Solid3D ext1 = reg1.ExtrudeAsSolid3D(38);

viewportLayout1.Entities.Add(ext1, 0, Color.Coral);

SlotShapedRegion ssr1 = new SlotShapedRegion(Plane.XZ, 0, 19, 24, 5, 0, true);

ext1.ExtrudeRemove(ssr1, -30);

RectangularRegion rr1 = new RectangularRegion(Plane.YZ, 17, 9, 10, 20);

ext1.ExtrudeRemove(rr1, new Interval(-40, 40));

viewportLayout1.Entities.Regen();
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.