Quantcast
Channel: Scripting - McNeel Forum
Browsing all 5938 articles
Browse latest View live

GHPython Universal flatten Tree (structure)

Coding in GHPython it would be usefull to have an unniversal flatten to handle mixed data types, and sort it all out from python to grasshopper. def flatten_all(obj): from ghpythonlib.treehelpers...

View Article


Image may be NSFW.
Clik here to view.

Grasshopper/Python - Replace geometry while keeping GUID

Hello everyone, I am trying to write my own version of “Replace” component, which could be found in LegoPod for Rhino 7. Now I want to have my own python-based component, that would do the same thing,...

View Article


Image may be NSFW.
Clik here to view.

Add Block to Individual collects

There are so many collets in the canvas.But The diamonds have been deleted.I want new diamonds to each collet’s centre align to individual collet within short process. 2 posts - 2 participants Read...

View Article

Image may be NSFW.
Clik here to view.

Grasshopper geometry not showing in Rhino

Im trying to model a bridge on rhino via GHpython, no dimensioning involved (ex. no materialdata, no structure mechanics) just a drawn out model of a suspension bridge. the issue is that whatever I do...

View Article

Image may be NSFW.
Clik here to view.

Extend solid without stretching

How do we extend a solid in a given direction, without breaking the original geometry? I assume something like the grasshopper component “Offset surface loose”, but moving the control points according...

View Article


Image may be NSFW.
Clik here to view.

Can not install pandas and numpy for RH8 at all

I can use Python 3 and NumPy with my project in Rhino8. It was perfect months ago. After I updated to the latest version of Rhino, it no longer works. I keep trying to install numpy in the way...

View Article

Trying to debug an old VBScript

I’m looking at trying to fix something in a very old VBScript, and I’m trying to use something I’ve ever actually used before–the actual Debugger. And I try to use it and it gives a compilation error…...

View Article

Face materials and headless Rhino Document

Hi @dale I’m opening a new topic related to this, because I’m finding that I cannot access face materials when opening a headless Rhino and I wanted to check with you if this is normal behaviour. The...

View Article


Image may be NSFW.
Clik here to view.

CaptureToBitmap() antialising with transparent background wrong

Dear @jeff, please can you create a bug-track for CaptureToBitmap(). (tested in Rhino 8 SR 21, and Rhino 9.0.25182.12305, 2025-07-01) When I create a bitmap with transparent background, the...

View Article


Uninstall Python Packages from Rhino 8

Using #requirements: packagename is a great and simple way to install a Python package with a single line of code from inside the Python 3 Script Component from Grasshopper. However, what is the...

View Article

Image may be NSFW.
Clik here to view.

ScriptEditor Bug

@eirannejad what could be causing the following? @stevebaer this.problem exists from the times of ironpython. When an script always refers to thw first file instead of second opened file. What is...

View Article

Meshing works through UI _Mesh, bad results from Mesh.CreateFromBrep

gen5.3dm (1.7 MB) tl;dr: I can create a mesh that meets my requirements (closed, if not “good”) with _Mesh in the UI, but trying to do the same thing programmatically through RhinoCommon via Python...

View Article

Rhinocommon Curve Offset logic

Hi, when I use the version of the Curve Offset method that takes a plane and a distance, not a direction point, how does it determine which way the offset goes? I just plugged some stuff in and so far...

View Article


Image may be NSFW.
Clik here to view.

Increase 'grid line count' with python

I want increase the grid line count to 200. 4 posts - 2 participants Read full topic

View Article

Image may be NSFW.
Clik here to view.

Python: How to make a closed curve?

How can I make a closed curve? Here’s my attempt, but it was unsuccessful. #! python 2 import Rhino.Geometry as rg import rhinoscriptsyntax as rs import scriptcontext as sc import math points = []...

View Article


Installed noise to python3 on mac ...not finding it in rhino

Hi, I have installed noise to python3 on mac …not finding it in rhino or grasshopper when using import noise…how do I solve this please ? I have tried in 8 and 9WIP 3 posts - 2 participants Read full...

View Article

Rhino version

How can I put in my code to find a Rhino version using the plugin? For example, on Rhino 7, to import a file with a script, there is one configuration, and on Rhino 8, another configuration. 3 posts -...

View Article


Rhino ScriptEditor: Rhino.RhinoApp.EscapeKeyPressed wrongly True

Hi, I have a python script running directly in Rhino using the new ScriptEditor. In a for loop i added the below for i, element in enumerate(elements): if Rhino.RhinoApp.EscapeKeyPressed:...

View Article

Image may be NSFW.
Clik here to view.

ScriptEditor:: FindReplace doesn’t work

im trying to replace in the ScriptEditor ( “\\” to “::”) but it highlights all the \\ for me, however nothing happens when i hit replace or replace all.. 1 post - 1 participant Read full topic

View Article

Image may be NSFW.
Clik here to view.

Script editor in read only mode

I´m not able to edit the python-script. The editor tells me it is in read only mode. Is there a way to change it? 1 post - 1 participant Read full topic

View Article
Browsing all 5938 articles
Browse latest View live