Swivel Handle

sferebucate.png

sferebucatemodel.png

double y1 = 5.62;
double y2 = 7.11;
Line lineint = new Line(-50, y1, 0, y2);
Point3D first = Curve.Intersection(new Circle(new Point3D(0, 0), 15), lineint)[0];
Arc a1 = new Arc(new Point3D(0, 0), new Point3D(15, 0), first);
Point3D second = Curve.Intersection(new Circle(new Point3D(-50, 0), 14), lineint)[0];
Point3D fourth = Curve.Intersection(new Circle(new Point3D(-50, 0), 14), new Line(-50, 5, -100, 5))[0];
Arc a2 = new Arc(new Point3D(-50, 0), second, fourth);
Line l1 = new Line(second, first);
Point3D third = Curve.Intersection(new Circle(new Point3D(-100, 0), 12), new Line(-50, 5, -100, 5))[0];
Arc a3 = new Arc(new Point3D(-100, 0), third, new Point3D(-112,0));
Line l2 = new Line(third, fourth); CompositeCurve cc1 = new CompositeCurve( a1, a2, a3, l1, l2);
cc1.Rotate(Math.PI / 2, Vector3D.AxisX);
Brep rev1 = cc1.RevolveAsBrep(0, -Utility.DegToRad(360), Vector3D.AxisX, Point3D.Origin);
rev1.SubdivideBy(Plane.XZ); // temporary fix for loop detection Point3D fifth = Curve.Intersection(new Circle(new Point3D(-50, 0), 7), new Line(-50, 1.5, -10, 1.5))[0];
Point3D sixth = Curve.Intersection(new Circle(new Point3D(-50, 0), 7), new Line(-50, -1.5, -10, -1.5))[0];
Plane arcPlane = Plane.XY;
Arc innerMiddleArc = new Arc(arcPlane,new Point3D(-50,0), fifth, sixth);
Line innerMiddleTop = new Line(fifth, new Point3D(fifth.X + 1.4, fifth.Y));
Line innerMiddleBottom = new Line(sixth, new Point3D(sixth.X + 1.4, sixth.Y));
Line innerMiddleVertical = new Line(new Point3D(fifth.X + 1.4, fifth.Y), new Point3D(sixth.X + 1.4, sixth.Y));
CompositeCurve cc2 = new CompositeCurve(
innerMiddleArc,
innerMiddleBottom,
innerMiddleVertical,
innerMiddleTop); devDept.Eyeshot.Entities.Region cr2 = new devDept.Eyeshot.Entities.Region(cc2, Plane.XY); rev1.ExtrudeRemove(cr2, new Interval(-20, +20)); devDept.Eyeshot.Entities.Region cr3 = devDept.Eyeshot.Entities.Region.CreateCircle(Plane.XY, -50, 0, 14); rev1.ExtrudeRemove(cr3, new Interval(11.5, 20)); rev1.ExtrudeRemove(cr3, new Interval(-20, -9.5)); devDept.Eyeshot.Entities.Region cr4 = devDept.Eyeshot.Entities.Region.CreateCircle(Plane.XY, new Point3D(-100, 0), 8.5/2); rev1.ExtrudeRemove(cr4, new Interval(-20, 20)); devDept.Eyeshot.Entities.Region cr5 = devDept.Eyeshot.Entities.Region.CreateCircle(Plane.XY, new Point3D(-100, 0), 12); rev1.ExtrudeRemove(cr5, new Interval(9, 20)); model1.Entities.Add(rev1, Color.DodgerBlue);
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.