Mesh.CreateFromExtrusion bug

Placing this piece of code (without executing it) in my plugin, makes R8.4 demand to switch to .net framework compatibility mode.

Extrusion extrusion = geometry as Extrusion;
if (extrusion == null) break;
var extr = Mesh.CreateFromExtrusion(extrusion, MeshingParameters.FastRenderMesh);

Really?

This simple Python works in Rhino 8 running in core mode.

import Rhino
import scriptcontext as sc

p0 = Rhino.Geometry.Point3d.Origin
p1 = Rhino.Geometry.Point3d(10,10,10)
bbox = Rhino.Geometry.BoundingBox(p0, p1)
box = Rhino.Geometry.Box(bbox)
ext = box.ToExtrusion()
mesh = Rhino.Geometry.Mesh.CreateFromExtrusion(ext, Rhino.Geometry.MeshingParameters.FastRenderMesh)
sc.doc.Objects.Add(mesh)
sc.doc.Views.Redraw()

Have you evaluated your plug-in using compat?

"C:\Program Files\Rhino 8\System\netcore\compat.exe" -q --check-system-assemblies MyPlugin.rhp

ā€“ Dale

1 Like

Will have some more time during the weekend to investigate - will update. Iā€™m using multi-targeting in the projects, maybe this is causing some trouble.

Best,
Mateusz