Hi, i know the principles of the display pipeline used in rhino and how to show objects. But i struggle around with a little problem that i want to solve in a c# application. How to get the visible parts of a surface (geometry) out of the world coordinate system to the screen? It looks like the thame method like “make2d”, world to screen for a point,… . But i need to have the full surface or the surface border from the screen into a 2d drawing only of the visible part. See attached image… A mesh or just the outline would be great.
I would be glad if someone can give me a hint
Hi Dale, sorry about my unclear description. Like the RhinoViewport.WorldToClient method i want to get the edge curve of that part of a surface which is visible (not the part behind an other object) in 2d screen coordinates. I am not sure if that information is stored in the rhino pipeline. Or if it is possible at all.
The main task is to get a 2d drawing in the current viewport with a surface or hatch for each single object. We need to color them for production drawings. The make2d function just gives the visible part of the outline. Would be nice to have also the edge where an other object hits the surface.
I am not sure if i can do it this way Maybe that information is not stored somewhere and objects are all drawn just infront of each other.
I am working on a new SDK interface for make2d it will not be available until a future release of Rhino. In the SDK class you will Draw your objects and you get back a collection of curves like the current Make2d output. However each curve in the HiddenLineDrawing has information about what object it came from including which edge or a silhouette on which surface. Also the transformations from world to HiddenLineDrawing space are available so you could compose these transformation with World-to-Screen transformation to get to screen coordinates.
Hey Greg, thanks in advance for the new make2d. Sounds like a good method to store object realted informations.
I will give it a try. For the moment I solved it by writing my own plugin because we need it in our company to have a 2d drawing with surfaces instead of outlines. And all surfaces need to be on the same layer as the orignal ones. That needs alot of time to do it manualy…
I am currently working on a ON_HiddenLineDrawing sdk object. This class can be used to represent hidden line drawings like Make2d. Much more information will be available for any kind of querries or customizations a user might want. Then there will be some SDK functions that are much like make2d. These functions will allow users to script of automate make2d operations.