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

Create cross section failed

Hi all, I am using Rhino 8 python 3 scripting (Rhino Common) to create a measurement tool for ships. Among other things, it is meant to create cross sections and measure the surface area. my current...

View Article


Image may be NSFW.
Clik here to view.

SubD looks weird when move SubDVertex programmatically

Hi, I have a normal subd as shown in the pic below. I moved one of its vertex in python as follows vt = subdgeo.Vertices.Find(vtId) vt.ControlNetPoint = newPt When the operation finishs, the shape...

View Article


Image may be NSFW.
Clik here to view.

Script editor published YAK file works on some PCs but not others

Hi, I am working on a Rhino plugin that uses grasshopper scripts as commands. I have published the RHP/RUI/YAK file using the script editor but the results seem to vary based on the machine I use. On...

View Article

Slope of a surface - Python

Does someone have code or a formula for determining the slope of a surface using Python in Rhino? The surfaces 3 and 4 point surfaces that are planar. 6 posts - 6 participants Read full topic

View Article

Equivalent rs.MatchObjectAttributes in RhinoCommon?

What is the simplest way of copying all attributes from one object to another with RhinoCommon ? I tried the following (with Python), but it seems not to produce any change: import Rhino go =...

View Article


Using Vectorize plugin with rs.Command

Hi there! I am trying to script a button that imports in real scale a picture and after that uses the complete path to call Vectorize plugin, the goal is in one clic have the image and vectors:...

View Article

Image may be NSFW.
Clik here to view.

Trying to get IfcOpenShell running in RhinoCode

Hello @eirannejad (and everybody else ) following these examples, I managed to get basic IfcOpenShell queries running in RhinoCode (in Rhino 8.8 SRC from yesterday). I manually downloaded IfcOpenShell...

View Article

RhinoScript return all children of a layer?

Is there a method to return ALL children of a given layer? I have a model in which I have several levels of nested children layers and would like to operate on them all. I guess it wouldn’t be too...

View Article


Image may be NSFW.
Clik here to view.

Messed up my settings & Can't import some python packages anymore

So I messed up something & I am unable to import python packages, specifically pandas and numpy in the script editor in grasshopper. I get the following error: Traceback (most recent call last):...

View Article


Image may be NSFW.
Clik here to view.

Way to fire a command without it adding to the undo stack?

Hi there, As the title says, is there a way to fire a command without it being recorded in the undo-stack? I use a custom command SetTargetToCursor quite frequently: CommandTracker shows I’ve used it...

View Article

GH Python3 'site-envs' life-cycle behavior?

Hi, I am starting to dip a toe into the new RH-8 Python3 components in Grasshopper. I wonder if there is some documentation regarding how the interpreter will behave that I might refer to as I try and...

View Article

Image may be NSFW.
Clik here to view.

GH Python3 Dependency Versions Behavior?

Hi, I wonder what the expected behavior is when multiple Grasshopper Python3 components try and pip-install dependencies with different versions? How should we anticipate that the system will behave...

View Article

Python : Correct way of installing custom packages?

For example I need natsort for one of my Python scripts in Rhino: natsort · PyPI Do I have to first install Python on my system then use pip? Or is there any other way to do it using Rhino? 10 posts -...

View Article


Flow syntax in Python

Hello, Is there any way to use the Flow commands within a python script? Thanks! 11 posts - 4 participants Read full topic

View Article

Updating Block Attribute Text via C#

Hey everyone, How can I set Block Attribute Text via C# / Rhinocommon? I have multiple layouts with the same Block that represents the layout sheet/label and some text in the label should change...

View Article


Image may be NSFW.
Clik here to view.

Python3: Can not remove module path

I was testing some things, and added a path via the new Python3 / Tools / Options / Python3 / Module Search Path GUI and now it can’t be removed? I have ‘deleted’ it several times now using the...

View Article

`scriptcontext` not working in VSCode

Hi All, Is there a way to get scriptcontext working in VSCode? At the moment I get the No module named 'scriptcontext' error. Cheers 2 posts - 2 participants Read full topic

View Article


Distribute Control points by z-axis

import Rhino import Rhino.Geometry as rg import scriptcontext as sc import rhinoscriptsyntax as rs import math import random sc.doc = Rhino.RhinoDoc.ActiveDoc crv = rs.GetObject("sel...

View Article

Image may be NSFW.
Clik here to view.

Python 3 re-installs on VMWare virtual machine on every boot

Hi all, I’m excited to use the Grasshopper Python3 components in Rhino 8, SR 8.7+ However, we use virtual machines that reset most of the computer upon reboot. This makes Grasshopper re-install Python...

View Article

Coding a pot full of flowers

Hi, I am trying to code a bouquet of flowers. I took this up as an exercise because I am a beginner in python and wanted a project to have a steep learning curve. The code is supposed to work like...

View Article
Browsing all 4125 articles
Browse latest View live