Comb

Material mat = new Material(Properties.Resources.Maple);
viewportLayout1.Materials.Add("Wood", mat);

RoundedRectangleShapedRegion rrsr1 = new RoundedRectangleShapedRegion(200, 40, 4);

Solid3D ext1 = rrsr1.ExtrudeAsSolid3D(new Interval(-4, 4));
ext1.MaterialName = "wood";
viewportLayout1.Entities.Add(ext1, 0, System.Drawing.Color.White);

Line l1 = new Line(10, 50, 15, 0);
Line l2 = new Line(20, 50, 15, 0);
Line l3 = new Line(20, 50, 10, 50);

Arc a1;
Curve.Fillet(l1, l2, 1, true, false, true, true, out a1);

CompositeCurve cc1 = new CompositeCurve(l1, l2, l3, a1);

Region r1 = new Region(cc1, Plane.XY, false);

ext1.ExtrudeRemovePattern(r1, new Interval(-5, 5), 10, 18, 0, 1);

Plane bottomPln = Plane.XY;

bottomPln.Rotate(+0.07, Vector3D.AxisX, Point3D.Origin);

bottomPln.Translate(0, 0, -3.5);

ext1.CutBy(bottomPln, true);

Plane topPln = Plane.XY;

topPln.Rotate(-0.07, Vector3D.AxisX, Point3D.Origin);

topPln.Translate(0, 0, +3.5);

ext1.CutBy(topPln, false);

viewportLayout1.Entities.Regen();
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.