BHoM / Rhinoceros_Toolkit

Set of functionalities for communication with Rhinoceros
GNU Lesser General Public License v3.0
6 stars 2 forks source link

Fix crash on invalid mesh preview in Rhino #161

Closed adecler closed 4 years ago

adecler commented 4 years ago

Issues addressed by this PR

Closes #160

Faces are added to the Rhino mesh if the vertices exist (well, the index exists). Faces not added will trigger a warning:

image

Test files

See issue for test file

Additional comments

@epignatelli , I am on your turf here so I hope I don't collide with your current plans (doesn't look like I do given sprint minutes). If I do, feel free to put this on hold. Also happy for you to use a different strategy to solve the issue if you feel this is creating side effects on the normal use of this toolkit.

epignatelli commented 4 years ago

Actually, no, I take that back. We never perform checks in the BH.Engine.Grasshopper.Compute.DrawRhinoWires method, so I'd leave it like that and delegate the validity of the geometry just when we convert it!