Brep created from Curve does not fill

Hi,

I have a seemingly simple problem, but could not find any solution yet:

Using the python rhino3dm package (version 7.14.1), I want to create a Brep face by a planar 3D polygon (from a Curve-Object). For this the function CreateTrimmedPlane() from Brep was used. As a result I get a Brep-Object which also contains BrepFaces/Surfaces, but when loading into Rhino, it is still only the Polygon without the filling surface.

Here is an example code of what I was trying to do:

import rhino3dm

# init model
model = rhino3dm.File3dm()

# create and add layer
layer = rhino3dm.Layer()
layer.Color = (255, 0, 0, 127)
layer.Name = 'example'
model.Layers.Add(layer)

# create curve from list of points
points = [[0, 0, 0], [10, 0, 0], [10, 10, 0], [0, 10, 0], [0, 0, 0]]
points = list(map(lambda p: rhino3dm.Point3d(p[0], p[1], p[2]), points))
crv = rhino3dm.Curve.CreateControlPointCurve(points, 1)

# create brep from plane and curve
pln = rhino3dm.Plane(rhino3dm.Point3d(0, 0, 0), rhino3dm.Vector3d(0, 0, 1))
brp = rhino3dm.Brep.CreateTrimmedPlane(pln, crv)
# add brep to model
model.Objects.AddBrep(brp)

# save to file
model.Write('example.3dm')

The screenshot contains the result of the code and an example for a Brep face how I want it to be like (modelled manually in Rhino).

What am I missing?

Thanks in advance for your support,
Jay

Hi @Jay_Tea,

Your code seems to work here:

image

What am I missing?

– Dale

Hi @dale ,

thanks for your reply! I checked in a desktop version of Rhino after your message and also got the correct Brep, as shown in your screenshot.

Previously I was testing the visual output on the public online viewer here: rview
So probably the bug is in there and the issue should be moved to this project. However, we can assume that it is not a problem in the python package.

Best regards,
Jay