I cannot make MeshFromLines working…
I just tried a very simple example of 3 line segments.
Rhino says: “Unexpected error while adding the mesh to document”
Any guidance here?
I have also tried the same method in RC. Still, does not produce a mesh.
and the problem has disappeared. I am unaware of which developer worked on stuff related to this, but it appears that the issue is resolved. Just wait for this week’s new WIP and it should also work for you. Please let me know!
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
from System import Array as array
a = rs.AddLine([0,0], [1,10])
b = rs.AddLine([1,10], [10,1])
c = rs.AddLine([10,1], [0,0])
rc_l = rs.coercecurve
arr_lines = array[Rhino.Geometry.Curve]([rc_l(a), rc_l(b), rc_l(c)])
m = Rhino.Geometry.Mesh.CreateFromLines(arr_lines, 5, 0.0001)
sc.doc.Objects.Add(m)