Our job is industrial 3D metrology. We often compare nominal coordinates from CAD to measured coordinates. The result looks like this:
The vectors are created with the CurveArrows command in RhinoScript:
objLine = Rhino.AddLine(Array(0,0,0), Array(1000,1000,1000))
Rhino.CurveArrows objLine, 2
This is useful, but a sreenshot like the one above is often not accepted for a report which the steelbuilder (who is our client) can give to his client.
So we would like to use the _Make2D command. But the CurveArrows are removed (sample below: the top view):
The same will happen, if we export e.g. to DXF or when we use the 3D PDF exporter in PlugIn made by simlab-soft.com. (Minor problems)
My question: how can I create arrows in RhinoScript which will remain after _Make2D command. _Dim shows it is possible.
This is very important for us, because we need a good report.
I will report this as a bug with the Make2D command. In the mean time, create your curves with arrows on a different layer. Then, after you script the Make2D command, get all of the lines on your different layer and re-enable the curve arrows if needed.
Also, line in AutoCAD (DXF) do not support arrows, which is why you loose them when you export to DXF. I'll add an item on the wish list to "make something up" if this is the case when exporting.
Finally, contact SimLabs and let them know lines with arrows don't print to PDF.
thanks for your help.
SimLab is of course aleady informed.
I coded a workaround for _Make2D as you proposed. This in priciple is an acceptable solution, but one problem aleady came up. Lines that cross solids (in my example a sphere) are split into different lines by the _Make2D command. They suddenly get 2 (or more) vectors. I cannot handle this, because I create only one object.
So I would be glad if a solution will come in not too far future.
'Script written by GLM
'Script version Donnerstag, 21. Februar 2013 09:03:43
Dim strLayer, strObject, strLayerBase, i
On Error Resume Next
'picking an object solves localization problem in _Make2D (e.g. English/German language layer names different)
strObject = Rhino.GetObject("Pick any errorvector (green or red) in the _Make2D created drawing")
strLayerBase = Rhino.ObjectLayer(strObject)
i = instr(strLayerBase, "::GLM_")
If i > 0 Then
strLayerBase = mid(strLayerBase, 1, i + 1)
strLayerBase = "2DZeichnung::Sichtbar::Linien::"
'Reactivate all the arrows
strLayer = strLayerBase & "GLM_Point2Point::PP_InTol"
strLayer = strLayerBase & "GLM_Point2Point::PP_outOfTol"
'... and so on
Private Sub ActivateArrow(strLay)
Dim arrObjects, Obj
arrObjects = Rhino.ObjectsByLayer(strLay, False)
If IsArray(arrObjects) Then
For Each Obj In arrObjects
If Rhino.IsCurve(Obj) Then
Rhino.CurveArrows Obj, 2