double depth1 = 2.7;
double val1 = 15.9;
LinearPath lp1 = new LinearPath(
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));
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();
Line firstLine = new Line(new Point3D(startPt.X, startPt.Y), // line1 start point
new Point3D(startPt.X + length, startPt.Y + 0.5)); // line1 end point
cc1.CurveList.Add(firstLine);
for (int i = 0; i < finCount; i++)
{
Line ln1 = (Line)cc1.CurveList.Last();
Line ln2 = new Line(new Point3D(startPt.X + length, ln1.EndPoint.Y + localDist - 1), //line2 start point
new Point3D(startPt.X, ln1.EndPoint.Y + localDist - 0.5)); // line2 end point
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);
cc1.CurveList.Add(line3);
}
devDept.Eyeshot.Entities.Region baseRegion = new devDept.Eyeshot.Entities.Region(cc1);
Brep ext1 = baseRegion.ExtrudeAsBrep(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);
design1.Entities.Add(ext1, design1.Layers[0].Name, Color.LightGray);
MultilineText code1 = new MultilineText(Plane.XZ, Point2D.Origin, "ASSY 7R228 A00-00" + System.Environment.NewLine + "PROC 0" + System.Environment.NewLine + "A/T 0803", 50, 3, 3.5, devDept.Eyeshot.Entities.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);
design1.Entities.Add(code1, design1.Layers[0].Name);
Heat Sink
Giulia Martini
This content is available only to customers with an active subscription. Please ensure your subscription is current to access this article.
Please sign in to access this article.
If you believe this is an error, please contact our support team for assistance.
Comments
Please sign in to leave a comment.