Blog
Learn about industry trends, news and how-tos from our product experts.
Medal
Use the following code to model with Solid entities an object like the one in the picture: // materials Material alu = Material.Aluminium; alu.Diffuse = Color.White; alu.Environment = 0.4f; model.Materials.Add(alu); string woodMatName = "Wood"; Material wood = new Material(woodMatName, Properties.Resources.Wood); model.Materials.Add(wood); // medal Solid sphere = Solid.CreateSphere…
by
Giulia Martini |
February 19, 2019 | Share
Sink
Use the following code to model an object like the one in the picture: // The geometry is symmetric, so we create only half of it and then we apply a mirror transformation. // Creation of the curves List<ICurve> lstFirst = new List<ICurve>(); lstFirst.Add(new Line(new Point3D(0, 400), new Point3D(700, 400))); lstFirst.Add(new Arc(new Point3D(700, 300), lstFirst.Last().EndPoint, new Po…
by
Giulia Martini |
February 19, 2019 | Share
Gym frame
Use the following code to model an object like the one in the picture: model1.DisplayMode = displayType.Shaded; model1.Shaded.EdgeColorMethod = edgeColorMethodType.EntityColor; model1.Shaded.EdgeThickness = 2; const double ellMajor = 10; const double ellMinor = 6; // wires layer string trajectoryLayer = "Trajectory"; model1.Layers.Add(trajectoryLayer, System.Drawing.C…
by
Giulia Martini |
February 18, 2019 | Share
Rendered Mesh in Wireframe display mode
The proposed solution is not natively supported and may not work in all scenarios or versions. You can have a Mesh entity displayed always as Rendered, regardless of the active display mode, by using the following class derived from Mesh: public class MyShadedMesh : Mesh { public MyShadedMesh(Point3D[] vertices, IndexTriangle[] triangles) : base(vertices, triangles) { } p…
by
Antonio Spagnuolo |
February 14, 2019 | Share
Tips to open an effective ticket
When you open a ticket, you are probably looking for a fast and useful reply, and we want you to receive good quality support. Here are some tips to improve your chances of getting the best possible answer: You should open a ticket only if you have an issue that is actually related to Eyeshot. If you have questions or inquiries about programming, then the best place to a…
by
Antonio Spagnuolo |
February 12, 2019 | Share
FindClosestVertex(): retrieve a vertex inside a Brep or Solid entity
The following derived class gets the vertex closest to the mouse and adds a Point entity on its position when clicking with the right mouse button. It manages nested BlockReferences, standard Entities, and the more complex Solid and Brep entities. internal class MyModel: devDept.Eyeshot.Model { protected override void OnMouseUp(MouseEventArgs e) { if (ActionMod…
by
Antonio Spagnuolo |
February 07, 2019 | Share
Sapientino
Use the code below to model a plastic shell like the one in the picture: int backLayer = model.Layers.Add("Back", Color.DeepPink); int frontLayer = model.Layers.Add("Front", Color.LightPink); int screenLayer = model.Layers.Add("Screen", Color.White); // Creates the back surfaces double taperAngle = Utility.DegToRad(2); const double halfPI = Math.PI / 2; List<Entity> backList = new List<…
by
Giulia Martini |
February 06, 2019 | Share
AutoCAD like selection style (v12)
Here's the Eyeshot code to simulate the selection style of AutoCAD®. Clicking the mouse will set the pick state to "Pick". When moving the mouse to the right more than 10 pixels, the pick state changes to Enclosed and when moving to the left of the same amount the pick state becomes Crossing. A transparent rectangle is drawn in overlay according to the pick state and whe…
by
Antonio Spagnuolo |
February 06, 2019 | Share
Highlighting the edge closest to the mouse
The following SingleModel derived class computes the Solid or Mesh edge closest to the mouse position and draws it on screen with a different color to highlight it. It iterates through the Edges of the Portions of each Solid and through the edges of each Mesh in the scene computing the one closest to the mouse. If the distance is within 10 pixels, it draws it on top o…
by
Antonio Spagnuolo |
February 06, 2019 | Share
Eyeshot 12 Released! 🥂
Bologna, Italy — January 31, 2019. devDept Software S.r.l., leading provider of software development tools to the engineering industry, today announces the release of Eyeshot 12, the native CAD control for .NET Framework. Environments We’ve added Model, Drawings and Simulation environments. Environments are variants of the Eyeshot control tailored for th…
February 01, 2019 | Share