Heat Sink

2017-07-21_10-39-55.png

double depth1 = 2.7;
double val1 = 15.9;

Point3D[] pts =
{
    new Point3D(7.6,0),
    new Point3D(-1, 0),
    new Point3D(-1, 0 - depth1),
    new Point3D(1.65, 0 - depth1),
    new Point3D(1.65, 0 - depth1*2),
    new Point3D(-5.05,  0 - depth1*2),
    new Point3D(-5.05, val1- depth1*2),
    new Point3D(-6.35, val1- depth1*2),
    new Point3D(-6.35,- depth1*2 + val1 + 57),
    new Point3D(-5.05, - depth1*2 + val1 + 57),
    new Point3D(-5.05, 88.8- depth1*2),
    new Point3D(1.65, 88.8- depth1*2),
    new Point3D(1.65, 88.8 - depth1- depth1*2),
    new Point3D(-1, 88.8 - depth1- depth1*2),
    new Point3D(-1, 88.8 - depth1*2- depth1*2),
    new Point3D(7.6, 88.8 - depth1*2- depth1*2)
};

LinearPath lp1 = new LinearPath(pts);
CompositeCurve cc1 = new CompositeCurve(lp1);

Point3D startPt = lp1.StartPoint;
Point3D endPt = lp1.EndPoint;

int finCount = 20;
double length = 55;

double dist = endPt.Y - startPt.Y;
double localDist = dist / (finCount + (finCount - 1));
double val2 = localDist * 2;

cc1.Reverse();

for (int i = 0; i < finCount; i++)
{
    Line ln1 = new Line(new Point3D(startPt.X, startPt.Y + i * val2), // line1 start point
        new Point3D(startPt.X + length, startPt.Y + i * val2 + 0.5)); // line1 end point
    Line ln2 = new Line(new Point3D(startPt.X + length, ln1.EndPoint.Y + localDist - 1), //l ine2 start point
        new Point3D(startPt.X, ln1.EndPoint.Y + localDist - 0.5)); // line2 end point
    cc1.CurveList.Add(ln1);
    Arc arc1;
    Curve.Fillet(ln1, ln2, 0.5001, false, false, true, true, out arc1);
    cc1.CurveList.Add(arc1);
    cc1.CurveList.Add(ln2);
    if (ln2.EndPoint == endPt) break;
    Line line3 = new Line(new Point3D(startPt.X, startPt.Y + (i + 1) * val2), // line3 start point
        new Point3D(startPt.X + length, startPt.Y + (i + 1) * val2 + 0.5)); // line3 end point
    Arc arc2;
    Curve.Fillet(ln2, line3, 1.0001, false, false, true, true, out arc2);
    cc1.CurveList.Add(arc2);
}

devDept.Eyeshot.Entities.Region baseRegion = new devDept.Eyeshot.Entities.Region(cc1);

Solid3D ext1 = baseRegion.ExtrudeAsSolid3D(63.6);
Circle cr1 = new Circle(Plane.YZ, (7.6 / 2));
Circle cr2 = (Circle)cr1.Clone();
cr1.Translate(-5.05, val1 - depth1 * 2 - cr1.Radius - 0.1, 63.6 / 2);
cr2.Translate(-5.05, 88.8 - depth1 * 2 - val1 + cr2.Radius + 0.1, 63.6 / 2);
devDept.Eyeshot.Entities.Region reg1 = new devDept.Eyeshot.Entities.Region(cr1);
ext1.ExtrudeRemove(reg1, 5.9);
devDept.Eyeshot.Entities.Region reg2 = new devDept.Eyeshot.Entities.Region(cr2);
ext1.ExtrudeRemove(reg2, 5.9);
viewportLayout1.Entities.Add(ext1, 0, Color.LightGray);

devDept.Eyeshot.Entities.MultilineText code1 = new devDept.Eyeshot.Entities.MultilineText(Plane.XZ, Point2D.Origin, "ASSY 7R228 A00-00" + Environment.NewLine + "PROC 0" + Environment.NewLine + "A/T 0803", 50, 3, 3.5, Text.alignmentType.TopLeft);
code1.WidthFactors = new double[] {1.3, 1.3, 1.3};
code1.Rotate(Utility.DegToRad(90), Vector3D.AxisY);
code1.Translate(25, 0, 58);

viewportLayout1.Entities.Add(code1, 0);
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.