Problem with MeshFromLines

Hi @piac

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.

I am using latest WIP.

Thanks,
Dmitriy

Hi @Dmitriy

I see the error in the latest released WIP! I am working on establishing the exact cause. Current Debug builds are not affected.

https://mcneel.myjetbrains.com/youtrack/issue/RH-40099

Giulio

Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

I checked in a pre-release of week’s WIP,

2017-6-26 (Rhino WIP, 6.0.17177.3071, Git hash:master @ 5a2b91c28493f8d1b9df6fea41d37b640cfe91c6)

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!

Great!
Thanks, Giulio!
I will certainly let you know!

Hi @piac

I have checked latest WIP and it is working great.
But seems that RC method
Mesh.CreateFromLines(lins, maxf, tol) still doesn’t work.

Can you check it, please?

Thanks,
Dmitriy

It seems to work fine here. See this example:

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)

Thanks, works now.
I used a too small value of MaxFaceEdges.