Modeling Practice Drawings 48

This article explains how to model a sheet metal part.

Drawing48.png

Mirror m = new Mirror(Plane.XZ);

Arc a1 = new Arc(Plane.XY, new Point2D(10, 0), 8, 0, Math.PI / 2);
Line ln0 = new Line(-9, 12, 0, 12);
Line ln1 = UtilityEx.GetLinesTangentToCircleFromPoint(a1, new Point3D(0, 12, 0))[1];
Curve.Trim(a1, ln1, false, false);

Arc a2 = (Arc)a1.Clone();
a2.TransformBy(m);
Line ln2 = (Line)ln1.Clone();
ln2.TransformBy(m);
Line ln3 = (Line)ln0.Clone();
ln3.TransformBy(m);

var cc = new CompositeCurve(new Line(-9, -12, -9, 12), ln0, ln1, a1, a2, ln2, ln3);
cc.Translate(11, 12, 0);
var reg = new devDept.Eyeshot.Entities.Region(cc, Plane.XY);
Brep ext1 = reg.ExtrudeAsBrep(1);

int edgeIndex = ext1.GetStraightEdgeIndex(new Point3D(2, 1, 1));
ext1.AddFlange(edgeIndex, 1, amount: 19.75 - 2);

edgeIndex = ext1.GetStraightEdgeIndex(new Point3D(1, 1, 19.75));
ext1.AddFlange(edgeIndex, 0.25, amount: 19.75 - 17, angle: Math.PI);

// composite curve for the hole on Plane YZ
CompositeCurve cc2 = new CompositeCurve(
new Line(0, 0, 2, 0, 0, 8),
new Arc(Plane.YZ, new Point2D(2, 8), 2, Math.PI / 2, Math.PI),
new Line(0, 2, 10, 0, 10, 10),
new Arc(Plane.YZ, new Point2D(10, 8), 2, 0, Math.PI / 2),
new Line(0, 12, 8, 0, 12, 2),
new Arc(Plane.YZ, new Point2D(10, 2), 2, 0, -Math.PI / 2),
new Line(0, 10, 0, 0, 2, 0),
new Arc(Plane.YZ, new Point2D(2, 2), 2, -Math.PI / 2, -Math.PI)
);

devDept.Eyeshot.Entities.Region reg2 = new devDept.Eyeshot.Entities.Region(cc2, Plane.YZ);
reg2.Translate(-1, 6, 6);
ext1.ExtrudeRemove(reg2, 20);

// composite curve for the hole on Plane XY
a1 = new Arc(Plane.XY, new Point2D(10, 0), 3.57, 0, Math.PI);
ln1 = new Line(4.84, 2.38, 9, 2.38);
Curve.Trim(a1, ln1, false, false);

a2 = (Arc)a1.Clone();
a2.TransformBy(m);
ln2 = (Line)ln1.Clone();
ln2.TransformBy(m);

cc2 = new CompositeCurve(new Arc(Plane.XY, new Point2D(4.84, 0), 2.38, Math.PI / 2, Math.PI / 2 * 3), ln1, a1, a2, ln2);
cc2.Translate(11, 12, -1);

reg2 = new devDept.Eyeshot.Entities.Region(cc2, Plane.XY);
ext1.ExtrudeRemove(reg2, 20);

model1.Entities.Add(ext1, Color.LightSlateGray);

2022-03-24_7-40-52.png

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.