Blog


Learn about industry trends, news and how-tos from our product experts.

CAD

Creating a BRep entity from scratch

In this article, we create a BRep entity by defining its vertices, edges, faces and shells. const double radius = 10, height = 20, centreToCentre = 20, offset = 3; Point3D[] vertices = new Brep.Vertex[8]; vertices[0] = new Brep.Vertex(0, -radius); vertices[1] = new Brep.Vertex(centreToCentre, -r…

by Alberto Bencivenni | July 28, 2023 | Share

CAD

Modeling Practice Drawings 110

// Main polygon CompositeCurve cc1 = new CompositeCurve( new Line(-34, 0, 34, 0), new Line(34, 0, 34, 59.4), new Arc(Plane.XY, new Point2D(0, 59.4), 34, Utility.DegToRad(0), Utility.DegToRad(180)), new Line(-34, 59.4, -34, 0)); devDept.Eyeshot.Entities.Region reg1 = new devDept.Ey…

by Paolo Bencivenni | July 24, 2023 | Share

CAD

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); …

by Paolo Bencivenni | July 24, 2023 | Share

CAD

Modeling Practice Drawings 69

At the time of writing, due to a singularity, we need to set the radius as 19 units instead of 20. // Sketch 1 var sk1 = new devDept.Geometry.ConstraintSolver.Sketch(); // Add origin point SketchPoint origin1 = sk1.AddOrigin(); // Lines var l1 = sk1.AddLine(-20, -60, -20, -100); var l2 = sk1.Add…

by Paolo Bencivenni | July 20, 2023 | Share

CAD

3D-DP949

// Main polygon devDept.Eyeshot.Entities.Region cir1 = devDept.Eyeshot.Entities.Region.CreateCircle(Plane.YZ, 0, 76, 20); Line lR = UtilityEx.GetLinesTangentToCircleFromPoint((Circle)cir1.ContourList[0], new Point3D(0, -32, 20))[1]; Line lL = UtilityEx.GetLinesTangentToCircleFromPoint((Circ…

by Paolo Bencivenni | July 12, 2023 | Share

CAD

Modeling Practice Drawings 101

// Main polygon devDept.Eyeshot.Entities.Region reg1 = devDept.Eyeshot.Entities.Region.CreatePolygon(Plane.XZ, new Point2D[]{ new Point2D(0, 0), new Point2D(92, 0), new Point2D(92, 13), new Point2D(19,13), new Point2D(19, 129), new Point2D(6, 129), new Point2D(6, 113.5…

by Paolo Bencivenni | July 11, 2023 | Share

CAD

CAD Practice Drawings 63

const string Dim = "Dimension", DashDotLarge = "DashDotLarge", DashDotSmall = "DashDotSmall", ThinLayer = "ThinLayer", CenterLinesL = "CenterLinesLarge", CenterLinesS = "CenterLinesSmall"; // Add new layers design1.Layers.Add(new Layer(Dim, Color.CornflowerBlue)); design1.Layers[0].LineWeight = 2…

by Paolo Bencivenni | July 11, 2023 | Share

CAD

Basement

In the following code fragment, you'll find a Sketch-based BRep modeling sample. Sketch sk1 = new Sketch(Plane.XZ); SketchPoint origin1 = sk1.AddOrigin(); SketchLine[] poly = sk1.AddPolygon( new Point2D(0, 0), new Point2D(80, 0), new Point2D(170, 100), new Point2D(560, 100), …

by Alberto Bencivenni | June 30, 2023 | Share

CAD

Revolve sketch with arc

var sk1 = new devDept.Geometry.ConstraintSolver.Sketch(); // Create the linear border. var l1 = sk1.AddLine(0, 0, 20, 0); var l2 = sk1.AddLine(20, 0, 20, 10); var l3 = sk1.AddLine(20, 10, 12.4142, 10); var l4 = sk1.AddLine(11.7071, 11.7071, 20, 20); var l5 = sk1.AddLine(20, 20, 0, 20); var l6 = …

by Federico Fucci | February 23, 2023 | Share

CAD

Changing hole diameter in a BRep object

In the following code, we first create a BRep object with a hole, then we change the diameter of a hole with world axis-alignment by editing BRep elements: faces/edges/vertices. Note that this code will work only for radius values that do not intersect/touch the contours of the others faces. devDe…

by Alberto Bencivenni | June 30, 2022 | Share