Grasshopper

algorithmic modeling for Rhino

I am trying to use the MeshBrep command in a python script within Grasshopper.

It looks somewhat like this:

import ghpythonlib.components as ghcomp

outputgeometry = ghcomp.MeshBrep(inputgeometry, meshsettings)

The two inputs to the python components are inputgeometry and meshsettings.

Now the type hint of inputgeometry is obviously set to Brep (List access).

The meshsettings on the other hand come from a settings component (I extracted the standard parameters from a MeshBrep component). But I don't know what type hint to assign to them.

What should I do to get the script working?

(Of course other stuff is supposed to happen in the script to, else I would simply use the MeshBrep component.)

I would be very grateful for some advice.

Views: 1786

Attachments:

Replies to This Discussion

Hi Jonathan

You need to change the mesh settings,like this: meshsettings = ghcomp.SettingsCustom(meshsettings)

The files:

Attachments:

Works perfectly! Thank you Naruto!

Now I would like to run a Catmull-Clark Subdivision on the resulting meshes in the python script.
Is there a way to call the WeaverBird components within the ghpythonlib.components?

yes,You can call the WeaverBird components within the ghpythonlib.components。

like this

Great. Thanks again!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service