YouTube logo


// main body arcs definitions Arc a1 = new Arc(Plane.XY, new Point3D(-20, -15), new Point3D(-22, 0), new Point3D(-20, 15), true); Arc a2 = new Arc(Plane.XY, new Point3D(-20, 15), new Point3D(0, 16.5), new Point3D(20, 15), true); Arc a3 = new Arc(Plane.XY, new Point3D(20, 15), new Point3D(22, 0), new Point3D(20, -15), true); Arc a4 = new Arc(Plane.XY, new Point3D(20, -15), new Point3D(0, -16.5), new Point3D(-20, -15), true); double filletRadius = 8; Curve.Fillet(a1, a2, filletRadius, false, false, true, true, out Arc f1); Curve.Fillet(a2, a3, filletRadius, false, false, true, true, out Arc f2); Curve.Fillet(a3, a4, filletRadius, false, false, true, true, out Arc f3); Curve.Fillet(a4, a1, filletRadius, false, false, true, true, out Arc f4); // outer contour CompositeCurve cc = new CompositeCurve(a1, f1, a2, f2, a3, f3, a4, f4); // body extrusion devDept.Eyeshot.Entities.Region bodyRegion = new devDept.Eyeshot.Entities.Region(cc, Plane.XY, false); Brep body = bodyRegion.ExtrudeAsBrep(7); design1.Entities.Add(body, Color.Red); // creation of revolving region to perform upper face rounding var bodyFinalHeight = 6; var radius = 200; Arc a = new Arc(Plane.XZ, new Point2D(0, -radius), radius+bodyFinalHeight, Utility.DegToRad(70), Utility.DegToRad(90)); CompositeCurve cr = new CompositeCurve( new Line(Plane.XZ, new Point3D(0, a.EndPoint.Z), new Point3D(0, 20)), new Line(Plane.XZ, new Point3D(0, 20), new Point3D(a.StartPoint.X, 20)), new Line(Plane.XZ, new Point3D(a.StartPoint.X, 20), new Point3D(a.StartPoint.X, a.StartPoint.Z)), a ); devDept.Eyeshot.Entities.Region roundingRegion = new devDept.Eyeshot.Entities.Region(cr, Plane.XZ); Brep bodyRounding = roundingRegion.RevolveAsBrep(Utility.DegToRad(0), Utility.DegToRad(360),Vector3D.AxisZ, Point3D.Origin); body.RevolveRemove(roundingRegion, Utility.TWO_PI, Vector3D.AxisZ, Point3D.Origin); // triangle extrusion LinearPath triangle = new LinearPath(Plane.XY, new Point3D(-5.25, 5), new Point3D(5.25, 0), new Point3D(-5.25, -5), new Point3D(-5.25, 5) ); triangle.Translate(1, 0, 3); devDept.Eyeshot.Entities.Region triangleRegion = new devDept.Eyeshot.Entities.Region(triangle, Plane.XY); body.ExtrudeRemove(triangleRegion, 10); // change triangle faces color body.Faces[10].Color = Color.White; body.Faces[11].Color = Color.White; body.Faces[12].Color = Color.White; body.Faces[13].Color = Color.White; // fillet body edge body.Fillet(13, 0.8); design1.Entities.Regen();

Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.

Articles in this section

See more