Modeling Practice Drawings 91

// Big slot
devDept.Eyeshot.Entities.Region reg1 = devDept.Eyeshot.Entities.Region.CreateSlot(0, 0,22.5, 18, 0, true); 
Brep ext1 = reg1.ExtrudeAsBrep(new Interval(0, 4.4));

// Small slot
devDept.Eyeshot.Entities.Region reg2 = devDept.Eyeshot.Entities.Region.CreateSlot(0, 0, 22.5, 7.6, 0, true);
ext1.ExtrudeAdd(reg2, new Interval(0, 16));
devDept.Eyeshot.Entities.Region reg3 = devDept.Eyeshot.Entities.Region.CreateSlot(0, 0, 22.5, 5, 0, true);
ext1.ExtrudeRemove(reg3, new Interval(11, 17));

// Internal holes
devDept.Eyeshot.Entities.Region cir1 = devDept.Eyeshot.Entities.Region.CreateCircle(11.25, 0, 2.5);
ext1.ExtrudeRemove(cir1, new Interval(-1, 17));
devDept.Eyeshot.Entities.Region cir2 = devDept.Eyeshot.Entities.Region.CreateCircle(-11.25, 0, 2.5);
ext1.ExtrudeRemove(cir2, new Interval(-1, 17));

// External holes
devDept.Eyeshot.Entities.Region cir3 = devDept.Eyeshot.Entities.Region.CreateCircle(-11.25, -13, 3.5);
ext1.ExtrudeRemovePattern(cir3, new Interval(3.4, 5), 22.5, 2, 26, 2);
cir3.Translate(-13, 13); ext1.ExtrudeRemovePattern(cir3, new Interval(3.4, 5), 48.5, 2, 0, 1);
devDept.Eyeshot.Entities.Region cir4 = devDept.Eyeshot.Entities.Region.CreateCircle(-11.25, -13, 1.7);
ext1.ExtrudeRemovePattern(cir4, new Interval(-1, 5), 22.5, 2, 26, 2); cir4.Translate(-13, 13);
ext1.ExtrudeRemovePattern(cir4, new Interval(-1, 5), 48.5, 2, 0, 1);

// Fillet
foreach (var edge in ext1.Edges) 
{ 
    if (edge.Curve is Arc arc &&
        arc.Radius == 18 &&
        edge.Curve.StartPoint.Z > 0)
    { 
        ext1.Fillet(edge, 1); 
        break;
    } 
}

foreach (var edge in ext1.Edges) 
{ 
    if (edge.Curve is Arc arc && 
        arc.Radius == 7.6 &&
        edge.Curve.StartPoint.Z < 10)
    { 
        ext1.Fillet(edge, 1);
        break;
    }
}

design1.Entities.Add(ext1, design1.Layers[0].Name, Color.HotPink);

image (4).png

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

Comments

0 comments

Please sign in to leave a comment.

Articles in this section

See more