The SDK has been refactored a bit. You will need to create a HiddenLineDrawingParameters object, which you will pass to HiddenLineDrawing.Compute. You specify viewport and geometry in this object.
Hi @dale
Thanks. I have found out with parameters and can compute segments.
Question is - how to handle a collection of Segments (after computing is done) to get projected 2D curves?
If you not sure, just pass a null. This is an arbitrary object that can be used to track the original geometry through the calculation. For example, obj might be a layer index, for example.
Well, you don’t have to use it at all if you don’t want to. But it can be useful for identifying how a curve as created. Some, for example, might use these values to draw the curve with a different linetype or weight depending on their requirements.
Hi @dale
I stuck a bit: I need to get projection to the XZ plane.
Below is the code for Viewport:
Dim vpy As New Rhino.Display.RhinoViewport()
vpy.Name = "ProY"
Dim clocY As New Point3D(0, -100, 0)
vpy.SetCameraLocation(clocY, False)
vpy.SetCameraDirection(New Vector3d(0, 1, 0), True)
drawp.SetViewport(vpy)
Dim hld As HiddenLineDrawing = HiddenLineDrawing.Compute(drawp, True)
But the resulting curves are projected to XY plane.
What am I doing wrong?
@actually the projection is done correctly but then resulting objects are placed with XY plane. I am aiming for similar behaviour as with ProjectToPlane.
@ and I cannot see the projection from all the objects. Is it related to the size of the Viewport? do I need to settle it as well? if done through GH make2d component - everything seems to be fine… is it related to tolerance?