Modeling Practice Drawings 48

Drawing48.png

CompositeCurve cc1 = new CompositeCurve(
    new Line(11, 0, 0, 11, 0, 1),
    new Line(11, 0, 1, 2, 0, 1),
    new Arc(Plane.XZ, new Point2D(2, 2), 1, Math.PI, Math.PI * 3 / 2),
    new Line(1, 0, 2, 1, 0, 19.75),
    new Arc(Plane.XZ, new Point2D(1.25, 19.75), 0.25, 0, Math.PI),
    new Line(1.5, 0, 19.75, 1.5, 0, 17),
    new Line(1.5, 0, 17, 2.5, 0, 17),
    new Line(2.5, 0, 17, 2.5, 0, 19.75),
    new Arc(Plane.XZ, new Point2D(1.25, 19.75), 1.25, 0, Math.PI),
    new Line(0, 0, 19.75, 0, 0, 2),
    new Arc(Plane.XZ, new Point2D(2, 2), 2, Math.PI, Math.PI * 3 / 2),
    new Line(2, 0, 0, 11, 0, 0)
    );

devDept.Eyeshot.Entities.Region reg1 = new devDept.Eyeshot.Entities.Region(cc1, Plane.XZ);

Brep ext1 = reg1.ExtrudeAsBrep(-24);

CompositeCurve cc2 = new CompositeCurve(
    new Line(0, 0, 2, 0, 0, 8),
    new Arc(Plane.YZ, new Point2D(2, 8), 2, Math.PI / 2, Math.PI),
    new Line(0, 2, 10, 0, 10, 10),
    new Arc(Plane.YZ, new Point2D(10, 8), 2, 0, Math.PI / 2),
    new Line(0, 12, 8, 0, 12, 2),
    new Arc(Plane.YZ, new Point2D(10, 2), 2, 0, -Math.PI / 2),
    new Line(0, 10, 0, 0, 2, 0),
    new Arc(Plane.YZ, new Point2D(2, 2), 2, -Math.PI / 2, -Math.PI)
    );

devDept.Eyeshot.Entities.Region reg2 = new devDept.Eyeshot.Entities.Region(cc2, Plane.YZ);
reg2.Translate(-1, 6, 6);
ext1.ExtrudeRemove(reg2,20);

Mirror m = new Mirror(Plane.XZ);

Arc a1 = new Arc(Plane.XY, new Point2D(10, 0), 8, 0, Math.PI / 2);
Line ln1 = UtilityEx.GetLinesTangentToCircleFromPoint(a1, new Point3D(0, 12, 0))[1];
Curve.Trim(a1, ln1, false, false);

Arc a2 = (Arc)a1.Clone();
a2.TransformBy(m);
Line ln2 = (Line)ln1.Clone();
ln2.TransformBy(m);

cc2 = new CompositeCurve(new Line(0,-12,0,12), ln1, a1, a2, ln2);
cc2.Translate(11, 12, 0);
reg2 = new devDept.Eyeshot.Entities.Region(cc2, Plane.XY);
ext1.ExtrudeAdd(reg2,1);

// composite curve for the hole on Plane XY
a1 = new Arc(Plane.XY, new Point2D(10, 0), 3.57, 0, Math.PI);
ln1 = new Line(4.84, 2.38, 9, 2.38);
Curve.Trim(a1, ln1, false, false);

a2 = (Arc)a1.Clone();
a2.TransformBy(m);
ln2 = (Line)ln1.Clone();
ln2.TransformBy(m);

cc2 = new CompositeCurve(new Arc(Plane.XY, new Point2D(4.84, 0), 2.38, Math.PI / 2, Math.PI / 2 * 3), ln1, a1, a2, ln2);
cc2.Translate(11, 12, -1);

reg2 = new devDept.Eyeshot.Entities.Region(cc2, Plane.XY);
ext1.ExtrudeRemove(reg2, 20);

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