Modeling Practice Drawings 129

2019-07-09_14-50-41.png

Circle cr1 = new Circle(Plane.XZ, new Point2D(0, 0), 30);
Brep solid = new devDept.Eyeshot.Entities.Region(cr1).ExtrudeAsBrep(-38);

devDept.Eyeshot.Entities.Region r1 = devDept.Eyeshot.Entities.Region.CreateRectangle(Plane.XZ, -10, 0, 10, 68); r1.Translate(0, 5, 0);
solid.ExtrudeAdd(r1, -33);

Point3D pt1 = new Line(Plane.XZ, -21, 30, -21, 0).IntersectWith(cr1)[0];

Arc a1 = new Arc(Plane.XZ, new Point3D(-36, 0, 58), 10, 2 * Math.PI);
Line ln2 = new Line(Plane.XZ, pt1.X, pt1.Z + 9, -36, 58);
Point3D pt2 = new Circle(Plane.XZ, ln2.MidPoint, ln2.Length() / 2).IntersectWith(a1)[0];
Line ln3 = new Line(Plane.XZ, -10, 68, -36, 68);
Line ln4 = new Line(Plane.XZ, pt2.X, pt2.Z, pt1.X, pt1.Z + 9);

a1.TrimBy(Curve.Intersection(a1, ln3)[0], true);
a1.TrimBy(Curve.Intersection(a1, ln4)[0], false);

CompositeCurve cc1 = new CompositeCurve(
    ln3,
    a1,
    ln4,
    new Line(Plane.XZ, pt1.X, pt1.Z + 9, pt1.X, 0),
    new Line(Plane.XZ, pt1.X, 0, -10, 0),
    new Line(Plane.XZ, -10, 0, -10, 68));

devDept.Eyeshot.Entities.Region r2 = new devDept.Eyeshot.Entities.Region(cc1); r2.Translate(0, 5, 0);
solid.ExtrudeAdd(r2, -14);

devDept.Eyeshot.Entities.Region r3 = devDept.Eyeshot.Entities.Region.CreateCircle(Plane.XZ, new Point2D(-36, 58), 5);
solid.ExtrudeRemove(r3, -19);

devDept.Eyeshot.Entities.Region r4 = devDept.Eyeshot.Entities.Region.CreateRectangle(Plane.XZ, 0, 0, 21, 40); r4.Translate(0, 5, 0);
solid.ExtrudeAdd(r4, -14);

Line ln5 = new Line(Plane.XY, 37, -16, 33, -16);
Arc a2 = new Arc(Plane.XY, new Point3D(33, -10, 0), 6, -Math.PI);
a2.TrimBy(Curve.Intersection(a2, ln5)[0], true);

CompositeCurve cc2 = new CompositeCurve(
    new Line(Plane.XY, 21, 5, 21, 19),
    new Line(Plane.XY, 21, 19, 49, 19),
    new Arc(Plane.XY, new Point3D(49, 13, 0), 6, Math.PI / 2),
    new Line(Plane.XY, 55, 13, 55, -10),
    new Arc(Plane.XY, new Point3D(49, -10, 0), 6, -Math.PI / 2),
    new Line(Plane.XY, 49, -16, 45, -16),
    new Line(Plane.XY, 45, -16, 45, -1),
    new Arc(Plane.XY, new Point3D(41, -1, 0), 4, Math.PI),
    new Line(Plane.XY, 37, -1, 37, -16),
    ln5,
    a2,
    new Line(Plane.XY, 27, -10, 27, -1),
    new Arc(Plane.XY, new Point3D(21, -1, 0), 6, Math.PI / 2));

devDept.Eyeshot.Entities.Region r5 = new devDept.Eyeshot.Entities.Region(cc2); r5.Translate(0, 0, 30);
solid.ExtrudeAdd(r5, -10);

devDept.Eyeshot.Entities.Region r6 = devDept.Eyeshot.Entities.Region.CreateRectangle(Plane.XZ, 0, 38, 5, 2);
solid.ExtrudeRemove(r6, -19);

devDept.Eyeshot.Entities.Region r7 = devDept.Eyeshot.Entities.Region.CreateCircle(Plane.XZ, new Point2D(0, 0), 17.5);
solid.ExtrudeRemove(r7, -38);

model1.Entities.Add(solid, Color.MediumSpringGreen);
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.