Mounting Bracket

2019-07-02_16-35-29.png

Plane pln1 = new Plane(Point3D.Origin, -1 * Vector3D.AxisZ, Vector3D.AxisY);

devDept.Eyeshot.Entities.Region reg1 = devDept.Eyeshot.Entities.Region.CreatePolygon(Plane.XY, new Point2D[]
{
    new Point2D(0, 41),
    new Point2D(9, 41),
    new Point2D(40.09, 25),
    new Point2D(49, 25),
    new Point2D(49, 7),
    new Point2D(42, 7),
    new Point2D(42, 0),
    new Point2D(0, 0)
});

Brep ext1 = reg1.ExtrudeAsBrep(-56);

devDept.Eyeshot.Entities.Region reg2 = devDept.Eyeshot.Entities.Region.CreatePolygon(pln1, new Point2D[]
{
    new Point2D(0, 0),
    new Point2D(0, 30.5),
    new Point2D(2, 30.5),
    new Point2D(2, 32.5),
    new Point2D(9.81, 32.5),
    new Point2D(9.81, 30.5),
    new Point2D(16.5, 30.5),
    new Point2D(16.5, 36),
    new Point2D(39.5, 36),
    new Point2D(39.5, 30.5),
    new Point2D(45, 30.5),
    new Point2D(45, 32.5),
    new Point2D(54, 32.5),
    new Point2D(54, 30.5),
    new Point2D(56, 30.5),
    new Point2D(56, 0)
});

ext1.RevolveRemove(reg2, -Math.PI / 2, Vector3D.AxisZ, Point3D.Origin);

devDept.Eyeshot.Entities.Region reg3 = devDept.Eyeshot.Entities.Region.CreateSlot(Plane.ZX, -13, 49, 14, 7.5, Math.PI / 2, true);
reg3.Translate(0, 20.5, 0);
ext1.ExtrudeRemovePattern(reg3, 10, pln1, 30, 2, 0, 1);

devDept.Eyeshot.Entities.Region c1 = devDept.Eyeshot.Entities.Region.CreateCircle(Plane.ZX, -13, 42, 4.5);
ext1.ExtrudeRemovePattern(c1, 20.5, pln1, 30, 2, 0, 1);

int[] faces = { 0, 3, 4, 7, 8, 9, 13, 15, 16, 21, 22, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 };

foreach (var item in faces)
    ext1.Faces[item].Color = Color.Gray;

Mirror mirr1 = new Mirror(pln1);
Brep copy = (Brep)ext1.Clone();
copy.TransformBy(mirr1);

ext1 = Brep.Union(ext1, copy)[0];
model1.Entities.Add(ext1, Color.Green);
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

2 comments
  • Hi,

    is it possible to get all the needed using in the code.

    I'm looking for Brep and I cannot find it.

    Regards Jürgen

  • Hi Jürgen,

    Starting from Eyeshot 12 Solid3D class was renamed to Brep,
    so if you're using an older version of Eyeshot, you need to rename all instances of Brep to Solid3D.

    If you're having problems with Eyeshot 12, it means you haven't the Ultimate version which is required to use Brep entities and boolean operations.

    Regards, Simone

Please sign in to leave a comment.