Cap

2019-07-03_8-46-18.png

Line l1 = new Line(0, 81, 8, 81);
Line l2 = new Line(8, 81, 8, 72);
Arc a1 = new Arc(0, 45, 0, 32, Utility.DegToRad(90), 0);
Curve.Trim(l2, a1, false, true);

CompositeCurve cc1 = new CompositeCurve(
    l1, l2, a1,
    new Line(32, 45, 32, 28.5),
    new Line(32, 28.5, 63, 28.5),
    new Line(63, 28.5, 63, 37.5),
    new Line(63, 37.5, 71, 37.5),
    new Line(71, 37.5, 71, 0),
    new Line(71, 0, 0, 0),
    new Line(0, 0, 0, 75.5),
    new Line(0, 75.5, 4, 75.5),
    new Line(4, 75.5, 4, 78.5),
    new Line(4, 78.5, 0, 78.5),
    new Line(0, 78.5, 0, 81));

devDept.Eyeshot.Entities.Region reg1 = new devDept.Eyeshot.Entities.Region(cc1);
Brep rev1 = reg1.RevolveAsBrep(Utility.DegToRad(360), Vector3D.AxisX, Point3D.Origin);

devDept.Eyeshot.Entities.Region ssr1 = devDept.Eyeshot.Entities.Region.CreateSlot(Plane.YZ, 173, 10, true);
devDept.Eyeshot.Entities.Region c1 = devDept.Eyeshot.Entities.Region.CreateCircle(Plane.YZ, -86.5, 0, 3.5);
devDept.Eyeshot.Entities.Region c2 = devDept.Eyeshot.Entities.Region.CreateCircle(Plane.YZ, +86.5, 0, 3.5);
devDept.Eyeshot.Entities.Region diff1 = devDept.Eyeshot.Entities.Region.Difference(ssr1, c1, c2);
diff1.Translate(8, 0, 0);

devDept.Eyeshot.Entities.Region copy1 = (devDept.Eyeshot.Entities.Region)diff1.Clone();
rev1.ExtrudeAdd(diff1, 7);
copy1.Rotate(Utility.DegToRad(90), Vector3D.AxisX, Point3D.Origin);
rev1.ExtrudeAdd(copy1, 7);

devDept.Eyeshot.Entities.Region reg2 = devDept.Eyeshot.Entities.Region.CreatePolygon(Plane.XY, new Point2D[]{
    new Point2D(28, 22.75),
    new Point2D(54, 22.75),
    new Point2D(28, 47.5)});

rev1.ExtrudeAddPattern(reg2, new Interval(-2.5, 2.5), Vector3D.AxisX, Point3D.Origin, Utility.DegToRad(90), 4);

CompositeCurve cc3 = new CompositeCurve(
    new Arc(Plane.XY, new Point2D(0, 45), 28, Utility.DegToRad(90), 0),
    new Line(28, 45, 28, 20),
    new Line(28, 20, 36, 20),
    new Line(36, 20, 39, 22.5),
    new Line(39, 22.5, 71, 22.5),
    new Line(71, 22.5, 71, 0),
    new Line(71, 0, 0, 0),
    new Line(0, 0, 0, 73));

devDept.Eyeshot.Entities.Region reg3 = new devDept.Eyeshot.Entities.Region(cc3);
rev1.RevolveRemove(reg3, Utility.DegToRad(360), Vector3D.AxisX, Point3D.Origin);

devDept.Eyeshot.Entities.Region cr3 = devDept.Eyeshot.Entities.Region.CreateCircle(Plane.YZ, 32, 0, 2.5);
cr3.Rotate(Utility.DegToRad(45), Vector3D.AxisX, Point3D.Origin);
cr3.Translate(62, 0, 0);
rev1.ExtrudeRemovePattern(cr3, 20, Vector3D.AxisX, Point3D.Origin, Utility.DegToRad(90), 4);

model1.Entities.Add(rev1, model1.Layers[0].Name, Color.Red);

Previous versions of this article: Eyeshot 10

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.