Bushing

LinearPath lp1 = new LinearPath(Plane.XY,
  new Point2D(0, 0),
  new Point2D(0, 53),
  new Point2D(98, 53),
  new Point2D(98, 37.5),
  new Point2D(116, 37.5),
  new Point2D(116, 53),
  new Point2D(130, 53),
  new Point2D(130, 0),
  new Point2D(0, 0)
);

Region r1 = new Region(lp1);

Solid3D rev1 = r1.RevolveAsSolid3D(Utility.DegToRad(360), Vector3D.AxisX, Point3D.Origin);

viewportLayout1.Entities.Add(rev1, 0, System.Drawing.Color.NavajoWhite);

SlotShapedRegion ssr1 = new SlotShapedRegion(Plane.ZX, 0, 15, 126, 15, 0, true);

Region cr1 = new CircularRegion(Plane.ZX, 63, 15, 7.5);
Region cr2 = new CircularRegion(Plane.ZX, -63, 15, 7.5);

Region diff = Region.Difference(ssr1, cr1, cr2);

Region copy = (Region) diff.Clone();

diff.Translate(0, 22, 0);
copy.Translate(0, -22, 0);

rev1.ExtrudeAdd(diff, 18);
rev1.ExtrudeAdd(copy, -18);

LinearPath lp2 = new LinearPath(Plane.XY,
    new Point2D(0, 0),
    new Point2D(0, 37.5),
    new Point2D(86, 37.5),
    new Point2D(86, 27),
    new Point2D(106, 27),
    new Point2D(106, 22.5),
    new Point2D(130, 22.4),
    new Point2D(130, 0),
    new Point2D(0, 0)
    );

Region r2 = new Region(lp2);

rev1.RevolveRemove(r2, Utility.DegToRad(360), Vector3D.AxisX, Point3D.Origin);

viewportLayout1.Entities.Regen();
Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

2 comments
  • Hello

    I have problem

    I use above sample to my application, but there has error

    "  The best overloaded method match for 'devDept.Eyeshot.Entities.LinearPath.LinearPath(params devDept.Geometry.Point3D[])' has some invalid arguments  "

    mybe  I donot know what item will be usage

    (

        using devDept.Eyeshot

        using  .....

    )

    I donnot know what item required must be using

    Please help me

    KenPro Sheu

     

     

  • We will soon release a new Beta build with this constructor included. You can easily replace it with:

    LinearPath lp1 = new LinearPath(Plane.XY, new Point2D[] {new Point2D(0, 0), ...});

Please sign in to leave a comment.