Mesh CreateFromCurveExtrusion bug

Given a flat closed curve, I want to extrude it in the upwards z direction. Given the dimensions of the boundingbox, I would expect the curve to extrude only in the positive z direction. However, the rg.Mesh.CreateFromCurveExtrusion seems to extrude in the negative direction as well (negative z extrusion distance always seems to be -1, even if I change my vector length). Hereby you find a Python example:

vector = rg.Vector3d(0,0,1)
params = rg.MeshingParameters.QualityRenderMesh
bbox = rg.BoundingBox(0,0,0,100,100,10)

mesh = rg.Mesh.CreateFromCurveExtrusion(curve, vector, params, bbox)

Attached a small internalized example:
example.gh (3.8 KB)

Hi @jobdvogel,

Try flipping the direction of your curve.

– Dale

It seems you’ve having the same issue reported here:

At the bottom of that thread is a C# script provided by @dale that provides a good solution.

-Kevin

1 Like

Ah, completely missed that… Indeed this is a good solution! Thanks @dale for the code.

RH-68211 is fixed in the latest WIP

1 Like