Blog


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

3D Graphics

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

3D Graphics

Entities far from the origin: view shaking and bad precision (jittering)

When the entities are very far from the origin their appearance on screen may become very compromised, and the camera may shake badly when moving/rotating the view. Case 1: See the image below of a circle created at (1e9, 1e9, 0) with radius 200:   This is due to the float precision of OpenGL that isn't enough to represent coordinates very far from the origin. To fix this issu…

by Antonio Spagnuolo | January 29, 2019 | Share

3D Graphics

ObjectManipulator customization

Using, for example, the Rings styleType, the default appearance of the ObjectManipulator is the following:  By specifying custom meshes it's possible to change its appearance: Here is the code: var orig = Mesh.CreateBox(1.6, 1.6, 1.6); orig.Translate(-0.8, -0.8, -0.8); design1.ObjectManipulator.Entities[0] = orig; var meshX = Mesh.CreateArrow(0.4, 15, 0.6, 3, 10, Mesh.natureType.Smooth); meshX.Tra…

by Antonio Spagnuolo | January 25, 2019 | Share

3D Graphics

Create points with a different shape

Tired of square Point entities? Here there are a few tricks to build points with the shape you want.   First solution: using ImageOnly Label An easy solution could be using an ImageOnly label with a semi-transparent image: Bitmap bmp1 = new Bitmap(@"pointImage.png"); int halfW = bmp1.Size.Width / 2; int halfH = bmp1.Size.Height / 2; ImageOnly img = new ImageOnly(10, 20, 0, bmp1, halfW, halfW…

by Alberto Bencivenni | January 18, 2019 | Share

3D Graphics

Zoom invariant / Position Invariant entity

 Non-maintained solution The proposed solution is not natively supported and may not work in all scenarios and versions. Entity To create a zoom invariant entity, meaning an entity that stays the same size on screen regardless of the camera position and zoom, you can use the following mesh-derived class. class ZoomInvariantMesh : Mesh { private Point3D _objectRea…

by Matteo Librenti | January 18, 2019 | Share

3D Graphics

Turbo Mode

Eyeshot 2024 Update This feature has been retired in favor of the Minimum Frame Rate one. In Eyeshot version 12 we introduced a simplified representation of the scene that allows smooth Zoom/Pan/Rotate dynamic movements. This simplified representation is used only during dynamic movements (between the mouse down and mouse up events) and for non-current items…

by Alberto Bencivenni | January 11, 2019 | Share

3D Graphics

Transparency explained

To make the entity color semi-transparent you need simply to set its color Alpha component to a value lower than 255. The entity color depends on two factors: Color method (byEntity, byLayer, byParent) Viewport display mode (Shaded, Rendered) If you are using Rendered display mode, for example, the entity color is determined by the relevant Material.Diffuse.A value wh…

by Alberto Bencivenni | January 09, 2019 | Share

Miscellaneous

Geometry Import/Export

Import Supposing you want to import an OBJ file (all the import methods follow the same scheme) you need the ReadOBJ class. This class gives you full control over all the imported items (entities, blocks, layers, materials, etc.) before adding them to the scene. During file import, you can also control whether to read the file synchronously or asynchronously. Read from s…

by Giulia Martini | January 08, 2019 | Share

3D Graphics

Changing edge color for a single entity

The following derived Mesh class demonstrates how to change edge color for a single entity. class MyMesh : Mesh { public Color EdgeColor = Color.Empty; public MyMesh(Mesh another, Color edgeColor) : base(another) { EdgeColor = edgeColor; } protected override void DrawEdges(DrawParams data) { data.RenderContext.SetColorWireframe(EdgeColor); base.DrawEdges(data); } }

by Alberto Bencivenni | November 24, 2017 | Share

Miscellaneous

Eyeshot issues with Telerik controls

Issue 1: Docking control When using Eyeshot control inside a Telerik docking control, the Eyeshot control disappears due to a dispose call. This behavior is time issue due to the built-in animation of the ToolWindow. Basically, when you docked, a Pane animation is triggered, Close event of the window is called at a later stage and the Eyeshot control is disposed.You…

by Marcello Stagni | October 05, 2017 | Share