🌶️ Sheet Metal (base flange)

This article explains how to model a sheet metal starting from a LinearPath object.

Snag_5bca0f4b.png


int thickness = 2; int length = 120; int heigth = 80; int depth = 60; int baseRadius = 5; int bottomLength = 10; int sideLength = 8; int sideRadius = 3; LinearPath lp = new LinearPath(new Point3D[] { new Point3D(0, 0, 0), new Point3D(0, 0, heigth), new Point3D(length, 0, heigth), new Point3D(length, 0, 0), }); // base flange Brep sheet = lp.ExtrudeAsBrep(new Interval(0, depth), baseRadius, thickness); // left bottom flange int edgeIndex = sheet.GetEdgeIndex(new Point3D(thickness, 1, 0)); sheet.AddFlange(edgeIndex, 0.5, bottomLength, Math.PI); //right bottom flange edgeIndex = sheet.GetEdgeIndex(new Point3D(length - thickness, 1, 0)); sheet.AddFlange(edgeIndex, 0.5, bottomLength, Math.PI); // front side flange edgeIndex = sheet.GetEdgeIndex(new Point3D(baseRadius + 1, 0, heigth - thickness)); sheet.AddFlange(edgeIndex, sideRadius, sideLength, Math.PI / 2); edgeIndex = sheet.GetEdgeIndex(new Point3D(baseRadius + 1, -sideRadius, heigth - (sideRadius + sideLength + thickness))); sheet.AddFlange(edgeIndex, 1, 5, Math.PI / 2); // rear side flange edgeIndex = sheet.GetEdgeIndex(new Point3D(baseRadius + 1, depth, heigth - thickness)); sheet.AddFlange(edgeIndex, sideRadius, sideLength, Math.PI / 2); edgeIndex = sheet.GetEdgeIndex(new Point3D(baseRadius + 1, depth + sideRadius, heigth - (sideRadius + sideLength + thickness))); sheet.AddFlange(edgeIndex, 1, 5, Math.PI / 2); // Arc crossing hole CompositeCurve cc = new CompositeCurve(new List<ICurve>(new ICurve[] { new Line(new Point3D(-5, 10, -10), new Point3D(-5, 10, heigth - 30)), new Arc(new Plane(new Point3D(-5, 0, 0), Plane.YZ.AxisZ), new Point2D(depth / 2, heigth - 30), 20, 0, Math.PI), new Line(new Point3D(-5, depth / 2 + 20, heigth - 30), new Point3D(-5, depth / 2 + 20, -10)) })); sheet.ExtrudeRemove(new Region(cc), -150); design1.Entities.Add(sheet, Color.Gray);
Was this article helpful?
1 out of 1 found this helpful

Comments

1 comment
Date Votes
  • Are there any methods to create the geometry for the flat/unbent state of the flanges that were added?

    0

Please sign in to leave a comment.

Articles in this section

See more