Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4120

Trying to use RhinoCommon CreateSolid

$
0
0

Hi, I’m trying to understand how to use RhinoCommon in Python, in this specific case, Brep.CreateSolid. I’ve got to the point that my code does not produce any errors, but the output is empty? Ive been trying both in GH Python and in RhinoScript, and I can’t even figure how to proceed.

Attached is the example - one with couple surfaces, which produces nothing, one with some spheres defined in script, which somehow passes through the original spheres. Does the output of CreateSolid work differently than I think? Am I passing it the list of surfaces incorrectly?

Thank you for any advice.

import Rhino
import Grasshopper
import rhinoscriptsyntax as rs
from System import Array

srfs = [rs.coercebrep(tnurbs),rs.coercebrep(bnurbs),rs.coercebrep(cutsrf)]

listed = Array[Rhino.Geometry.Brep](srfs)
imp = Rhino.Geometry.Brep.CreateSolid(listed,Rhino.RhinoMath.UnsetValue)

CreateSolid.gh (11.1 KB)

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4120