Heat Sink 2

Point2D[] pts1 =
{
    new Point2D(57, -5),
    new Point2D(57, 0),
    new Point2D(0, 0),
    new Point2D(0, 3),
    new Point2D(60, 3),
    new Point2D(60, -5)
};
LinearPath lp1 = new LinearPath(Plane.XY, pts1);

Point2D[] pts2 =
{
    new Point2D(55, -10),
    new Point2D(36, -10),
    new Point2D(36, -7),
    new Point2D(55, -7)
};
LinearPath lp2 = new LinearPath(Plane.XY, pts2);

Arc arcExt = new Arc(55, -5, 0, 5, -Math.PI / 2, 0);

Arc arcInt = new Arc(55, -5, 0, 2, -Math.PI / 2, 0);

CompositeCurve cc = new CompositeCurve(lp1, arcExt, arcInt, lp2);

devDept.Eyeshot.Entities.Region baseRegion = new devDept.Eyeshot.Entities.Region(cc, Plane.XY);

Solid3D ext1 = baseRegion.ExtrudeAsSolid3D(83);

RectangularRegion finRR = new RectangularRegion(Plane.XY, 36, -20, 1, 10);
ext1.ExtrudeAddPattern(finRR, 83, 3.8, 5, 0, 1);

finRR = new RectangularRegion(Plane.XY, 0, 3, 1, 10);
ext1.ExtrudeAdd(finRR, 83);

int finCount = 11;
double lenght = 39.2;
double spacingX = lenght / 11;
finRR = new RectangularRegion(Plane.XY, 6.5 + spacingX / 2, 3, 1, 10);
ext1.ExtrudeAddPattern(finRR, 83, spacingX, finCount, 0, 1);

finRR = new RectangularRegion(Plane.XY, 49 + spacingX / 2, 3, 1, 7);
ext1.ExtrudeAddPattern(finRR, 83, spacingX, 3, 0, 1);

LinearPath lp = new LinearPath(Plane.XY,
    new Point2D(60, -10),
    new Point2D(36, -13),
    new Point2D(36, -30),
    new Point2D(60, -30),
    new Point2D(60, -10)
);
devDept.Eyeshot.Entities.Region removeRegion = new devDept.Eyeshot.Entities.Region(lp, Plane.XY);
ext1.ExtrudeRemove(removeRegion, 83);

Arc arc1 = new Arc(30, -130, 0, 142, Utility.DegToRad(79.5), Utility.DegToRad(120));
Arc arc2 = new Arc(30, -130, 0, 200, Utility.DegToRad(79.5), Utility.DegToRad(120));
Line l1 = new Line(arc1.StartPoint, arc2.StartPoint);
Line l2 = new Line(arc1.EndPoint, arc2.EndPoint);
removeRegion = new devDept.Eyeshot.Entities.Region(new ICurve[] { arc1, arc2, l1, l2 }, Plane.XY);
ext1.ExtrudeRemove(removeRegion, 83);

RectangularRegion rr = new RectangularRegion(Plane.ZY, 7.3, 4.3, 1.65, 10);
ext1.ExtrudeRemovePattern(rr, -60, Plane.ZY, 14, 6, 0, 1);

CircularRegion cr = new CircularRegion(Plane.XZ, 4.15, 7.15, 1.65);
ext1.ExtrudeRemovePattern(cr, -3, Plane.XZ, 43.7, 2, 42.7, 2);

ext1.ExtrudeRemove(new CircularRegion(Plane.XZ, 47.85, 7.15, 5.5), new Interval(7, 20));

ext1.ExtrudeRemove(new CircularRegion(Plane.XZ, 47.85, 49.85, 5.5), new Interval(7, 20));

rr = new RectangularRegion(Plane.XZ, 0, 62, 7, 21);
ext1.ExtrudeRemove(rr, -13);

viewportLayout1.Entities.Add(ext1, 0, Color.Gray);

MultilineText code1 = new MultilineText(Plane.ZY, Point2D.Origin, "651-10930-10SAF" + Environment.NewLine + "045-0", 1, 2, 3.5, devDept.Eyeshot.Entities.Text.alignmentType.TopCenter);
code1.Rotate(Utility.DegToRad(180), Vector3D.AxisY);
code1.Translate(60.01, 2, 41.5);
viewportLayout1.Entities.Add(code1, 0, Color.Black);
Have more questions? Submit a request

3 Comments

  • 0
    Avatar
    Bo Yuan

    Hello Simone,

    Thank you for the post and the absolutely wonderful software Eyeshot. Since we start using it, Eyeshot becomes our foundation of a software library we are continue to develop. However, in many cases we found the boolean operation of Solid3D do not always work. Since we build a parallel function in Solid too, by switching to Solid the boolean op can work flawlessly. I wonder if you can help us quickly or there can be a tutorial or Do's and Don'ts on this matter.

    Here is one example, what's often fails (not all the time) is we first useĀ RevolveAsSolid3D to produce the Solid3D model then use Solid3D.ExtrudeAdd multiple times. It works sometimes and fails in some other times resulting in an empty model; so far we can't find what triggered the issue

  • 0
    Avatar
    Bo Yuan

    Oh I forgot to add is that sometimes we are trying to call Solid3D.ExtrudeRemove and it did not work as intended, but our programmers found if we call Solid3D.ExtrudeAdd in the same place it works and the solid3d object is removed. Not sure if this is something in the system or we are using it wrong. Thank you.

  • 0
    Avatar
    Simone Maccaferri

    Hi Bo,

    Please open a ticket with your issue details so we can try to reproduce it and help you.

Please sign in to leave a comment.