Barbeque

viewportLayout.Layers[0].Color = System.Drawing.Color.FromArgb(127, 127, 127);

CompositeCurve basementOuter = new CompositeCurve
                             (
                                 new Line(Plane.XZ, 0, 0, 80, 0),
                                 new Line(Plane.XZ, 80, 0, 170, 100),
                                 new Line(Plane.XZ, 170, 100, 560, 100),
                                 new Line(Plane.XZ, 560, 100, 650, 0),
                                 new Line(Plane.XZ, 650, 0, 730, 0),
                                 new Line(Plane.XZ, 730, 0, 730, 625),
                                 new Line(Plane.XZ, 730, 625, 650, 625),
                                 new Line(Plane.XZ, 650, 625, 580, 540),
                                 new Line(Plane.XZ, 580, 540, 150, 540),
                                 new Line(Plane.XZ, 150, 540, 80, 625),
                                 new Line(Plane.XZ, 80, 625, 0, 625),
                                 new Line(Plane.XZ, 0, 625, 0, 0)
                             );

CompositeCurve basementInner = new CompositeCurve
                             (
                                 new Line(Plane.XZ, 80, 180, 80, 460),
                                  new Arc(Plane.XZ, new Point2D(100, 460), 20, Utility.DegToRad(180), Utility.DegToRad(90)),
                                 new Line(Plane.XZ, 100, 480, 630, 480),
                                  new Arc(Plane.XZ, new Point2D(630, 460), 20, Utility.DegToRad(90), 0),
                                 new Line(Plane.XZ, 650, 460, 650, 180),
                                  new Arc(Plane.XZ, new Point2D(630, 180), 20, Utility.DegToRad(360), Utility.DegToRad(270)),
                                 new Line(Plane.XZ, 630, 160, 100, 160),
                                  new Arc(Plane.XZ, new Point2D(100, 180), 20, Utility.DegToRad(270), Utility.DegToRad(180))
                             );

Region basementReg = new Region(new ICurve[] { basementOuter, basementInner }, Plane.XZ, false);

Solid3D basement = basementReg.ExtrudeAsSolid3D(-420);

viewportLayout.Entities.Add(basement);

const double filletRadius = 50;

Arc a1 = new Arc(-490, -50, 0, filletRadius, Utility.DegToRad(90), Utility.DegToRad(180));

Line l1 = new Line(-540, -50, -540, -600);

Arc a2 = new Arc(0, 910, 0, 1500, Utility.DegToRad(225), Utility.DegToRad(315));

Arc f1;
Curve.Fillet(l1, a2, filletRadius, false, false, true, true, out f1);

Line l2 = new Line(+540, -600, +540, -50);

Arc f2;
Curve.Fillet(a2, l2, filletRadius, false, false, true, true, out f2);

Arc a3 = new Arc(+490, -50, 0, filletRadius, Utility.DegToRad(0), Utility.DegToRad(90));

Line l3 = new Line(490, 0, -490, 0);

CompositeCurve tableContour = new CompositeCurve(a1, l1, f1, a2, f2, l2, a3, l3);

Region tableReg = new Region(tableContour, Plane.XY, false);

Solid3D table = tableReg.ExtrudeAsSolid3D(70);

table.Translate(365, 420, 625);

viewportLayout.Entities.Add(table, 0, System.Drawing.Color.Crimson);

CompositeCurve wallOuter = new CompositeCurve
                             (
                                 new Line(0, 0, 0, 80, 0, 0),
                                 new Line(80, 0, 0, 80, 310, 0),
                                 new Arc(110, 310, 0, 30, Math.PI, Math.PI / 2),
                                 new Line(110, 340, 0, 620, 340, 0),
                                 new Arc(620, 310, 0, 30, Math.PI / 2, 0),
                                 new Line(650, 310, 0, 650, 0, 0),
                                 new Line(650, 0, 0, 730, 0, 0),
                                 new Line(730, 0, 0, 730, 390, 0),
                                 new Arc(700, 390, 0, 30, 0, Math.PI / 2),
                                 new Line(700, 420, 0, 30, 420, 0),
                                 new Arc(30, 390, 0, 30, Math.PI / 2, Math.PI),
                                 new Line(0, 390, 0, 0, 0, 0)
                             );

Region wallReg = new Region(wallOuter, Plane.XY, false);

Solid3D wall = wallReg.ExtrudeAsSolid3D(300);

viewportLayout.Entities.Add(wall);

SlotShapedRegion ssr1 = new SlotShapedRegion(Plane.YZ, 0, 130, 280, 10);

ssr1.Translate(60, 0, 0);

wall.ExtrudeRemovePattern(ssr1, 610, 0, 1, 60, 3);

wall.Translate(0, 0, 695);

viewportLayout.Entities.Regen();
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.