Blog
Learn about industry trends, news and how-tos from our product experts.
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 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
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
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
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
Modeling Practice Drawings 42
Brep elbow; //creating the first part of the elbow var headRegion = devDept.Eyeshot.Entities.Region.CreateRoundedRectangle(360, 360, 10); for (int i = 0; i < 2; i++) { for (int k = 0; k < 2; k++) { Func<int, int> calcPos = (int pos) => (pos > 0) ? (pos * (360 - …
by
Gian Maria Gentilini |
May 30, 2022 | Share

Base revolve sketch
Sketch sk1 = new Sketch(); SketchLine[] segments = sk1.AddPolygon( new Point2D(0, 0), new Point2D(130, 0), new Point2D(130, 53), new Point2D(116, 53), new Point2D(116, 37.5), new Point2D(98, 37.5), new Point2D(98, 53), new Point2D(0, 53) ); // hor/ver constraints …
by
Alberto Bencivenni |
May 17, 2022 | Share

Modeling Practice Drawings 125
The following lines allow you to draw this model in the above picture from scratch: // Body CompositeCurve bodyProfile = new CompositeCurve( new Line(-92, 0, -10, 0), new Arc(-10, 10, 0, 10, Math.PI * 1.5, Math.PI * 2), new Line(0, 10, 0, 77), new Arc(-10, 77, 0, 10, 0,…
by
Stefano Volpe |
October 29, 2021 | Share
Hook
Let us define some useful constants first: private const string dimLayer = "Dimension", thinLayer = "ThinLayer", dashDot = "DashDot"; private const double textHeight = 5; private const float defaultLineWeight = 2; Here is the primary function: void hook() { hookSetup(); hookFrame(); …
by
Stefano Volpe |
October 25, 2021 | Share
Casing
Define layer names and text height. const string Dim = "Dim", DashDot = "DashDot", Frame = "Frame", FrameText = "FrameText"; const double textHeight = 2.0; Draw the component and its dimensions. // Setting layers and linetype design1.Layers.Add(new Layer(Dim, Color.CornflowerBlue)…
by
Adriano Ongaretto |
August 30, 2021 | Share