Joint

2019-07-02_14-05-03.png

CompositeCurve cc = new CompositeCurve(
    new Line(-115, 0, -115, -25),
    new Line(-115, -25, 0, -25),
    new Line(0, -25, 0, -16),
    new Arc(2, -16, 0, 2, Utility.PI_2, Math.PI),
    new Line(2, -14, 92, -14),
    new Line(92, -14, 92, 0),
    new Line(92, 0, -115, 0));

devDept.Eyeshot.Entities.Region lpReg1 = new devDept.Eyeshot.Entities.Region(cc, Plane.XY, false);
Brep rev1 = lpReg1.RevolveAsBrep(Math.PI, Vector3D.AxisX, Point3D.Origin);

// Parallelepiped
devDept.Eyeshot.Entities.Region rectReg1 = devDept.Eyeshot.Entities.Region.CreateRectangle(Plane.YZ, -30, -41, 60, 30);
rectReg1.Translate(-30, 0);
rev1.ExtrudeRemove(rectReg1, -90);

// Slot
CompositeCurve cc1 = CompositeCurve.CreateSlot(25, 6.5, true);
devDept.Eyeshot.Entities.Region slotReg1 = new devDept.Eyeshot.Entities.Region(cc1, Plane.XY);
slotReg1.Translate(80, 0, -15);
rev1.ExtrudeRemove(slotReg1, 10);

// small Slot
cc1 = (CompositeCurve)slotReg1.Offset(-2.5, 1e-3)[0];
devDept.Eyeshot.Entities.Region slotreg2 = new devDept.Eyeshot.Entities.Region(cc1, Plane.XY);
slotreg2.Translate(0, 0, 9);
rev1.ExtrudeRemove(slotreg2, 6);

// Four cylinders
devDept.Eyeshot.Entities.Region circReg1 = devDept.Eyeshot.Entities.Region.CreateCircle(-100, 11, 7);
rev1.ExtrudeRemovePattern(circReg1, -100, 35, 2, -22, 2);

Brep mir1 = Brep.Mirror(Plane.XY, rev1)[0];
model1.Entities.Add(mir1, Color.Aquamarine);

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.