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

Addsweep1 options

hello, I need Sweep1 with both the option “trim” and “rotate” valide at the same time. Is it possible? Thanks, Roy 2 posts - 2 participants Read full topic

View Article


Accessing Excel from 2.7 Python

I’m trying to get an old script that uses Excel working on my apprentices’ machine, with a fresh Office 365 install, and (to simplify) on the code below it fails to add a reference to “Office” or...

View Article


Py2 rhinocommon: Creating a double-precision mesh

I’m trying to create a double-precision mesh in R7SR36 using Rhinocommon in IronPython. Below is the code: import Rhino msh = Rhino.Geometry.Mesh() msh.Vertices.UseDoublePrecisionVertices = True pt =...

View Article

Image may be NSFW.
Clik here to view.

Rhino.Input.Custom.GetNumber() with Optionlist

I need a list of predefined numbers to choose from or to input a custom number. I assume I have to use Rhino.Input.Custom.GetNumber() But numbers won’t work with AddOption So I don’t know how to do...

View Article

Python 2 -> Python 3 - Custom Curve Highlight - Draw Foreground

Hello, I’m updating some of my older scripts and having an issue in Python 3 related to the following lines, I have a single input value in an input “T” for “Thickness”, the input Type is an Int with...

View Article


Image may be NSFW.
Clik here to view.

Random select hatches

Is there a method to randomly choose hatches of a particular color (in this case trees drawn in top view) and then randomize the selection of them, so that I can alter some of the colours to make...

View Article

Image may be NSFW.
Clik here to view.

No module named 'optree' in default python 3 Script Editor

Hi, I have tried to use Rhino 8 new python editor today. Very excited that we can use python 3 and more packages in rhino. My problem is: first I want to try scipy by using # r: scipy but it failed ,...

View Article

Grasshoper crash when creating script

Why does grasshopper crash when I try to create a script in python 3? 4 posts - 2 participants Read full topic

View Article


Image may be NSFW.
Clik here to view.

ExtrudeCrv apply this command to circle

Hi All, Please help me for below query, i have two circle which i want to apply ExtrudeCrv as below , in rhino python first image is 2D image which is need to convert as second image need rhino python...

View Article


How to set Hatch Background via script? (Pref Python)

Updating some scripts in Rhino 8, including ones that create hatches for numerous scenarios. I’d like to control the new ability to set Hatch Backgrounds, but I haven’t found an API reference to go...

View Article

Image may be NSFW.
Clik here to view.

Windows app that includes Python API

Sorry all, this is a bit of a weird one to express in writing, but I used to have an app that was basically a vessel for all sorts of downloadable Documentation Libraries, including a...

View Article

Image may be NSFW.
Clik here to view.

ViewCapture differ from different computers/monitors

HI. I am using python coding to do view capture. But when my script runs in different PCs/monitors (A and B), the pics that I exported are always different. Is there a way to view capture my viewport...

View Article

Image may be NSFW.
Clik here to view.

Python 3 components in SDK mode don't output Grasshopper lists

Tested in Rhino 8.6 on Windows 11. I couldn’t log into the jetbrains youtrack page to make a bug report there. From a Python3 component in SDK mode, the code: #! python3 import System import Rhino...

View Article


Image may be NSFW.
Clik here to view.

Importing ghpythonlib induces "Grasshopper breakpoint"

For some reason when I try to do import ghpythonlib I get the following error/warning message: If I click “Do not show this message again” it won’t appear again during that session, but if any of the...

View Article

Image may be NSFW.
Clik here to view.

GH component attributes not accessible from CPython 3 components

I’ve noticed another quirk between Iron Python components and CPython 3 components. This is much more impactful, than having to adjust for types when returning a list. I don’t know how the internals...

View Article


Image may be NSFW.
Clik here to view.

SurfaceEditPoints

Hello! I am trying to find the min and max Z values for points in the polysurface that are the result of a boolean operation. First I use ExplodePolysurfaces, then SurfaceEditPoints or SurfacePoints...

View Article

How to set, modify a mesh texture coordinates using RVB script

As the title says, is there a way to set, modify (make a new array and set a mesh object to) in Rhino script? If not, why not? A Work around? From a previous question, I find this Edit: For...

View Article


Image may be NSFW.
Clik here to view.

Unable to access input parameter value with Python 3 in Rhino 8

I’m trying to use an old code example to rename a component’s input Name/NickName. It fails in Python 3 but works fine in Python 2: vd = ghenv.Component.Params.Input[0].VolatileData firstItem =...

View Article

Rhino 8 - rs.CloseCurve( obj ) does not close curve

Copy-Paste from the examples : import rhinoscriptsyntax as rs obj = rs.GetObject("Select curve", rs.filter.curve) if not rs.IsCurveClosed(obj) and rs.IsCurveClosable(obj): my_crv = rs.CloseCurve( obj...

View Article

Image may be NSFW.
Clik here to view.

Interlocking Puzzle Script

Is there a script that creates interlocking puzzles as seen in the pictures? Is there a script that creates interlocking puzzles as seen in the pictures? 1 post - 1 participant Read full topic

View Article
Browsing all 4148 articles
Browse latest View live