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

SubD object type is not recognised as solid

Hi Here is an old SolidWeight script by @dale that I slightly modified to print gemstones weight in carats. I’ve added 2 object types that didn’t yet exist when the original script was written. SubD...

View Article


Can I select an Layer and Delete the others using macros?

I know I can select the others layers one by one using macros, but the layers that I want to delete sometimes comes with diferent names, so the macro will not work always. 3 posts - 2 participants...

View Article


How to change the default value of the rs.command in the python script

Hi everyone, I used a script to generate a frame-like model. The basic procedure is ‘create a surface- extrude surface- flow the surface on a circle’. The script works well to generate the model....

View Article

Image may be NSFW.
Clik here to view.

Script for hatch command

Hey guys, Can anyone help me with a script that would work as follows: I start with a closed curve that I have selected and I run this script. It runs the hatch command, prompts me to select the...

View Article

Image may be NSFW.
Clik here to view.

Python - Create Rhino/VRay materials from list of textures

Hi, I have a collection of 1000+ different PBR textures in different folders and have been trying to write a Python script to sort the different textures by name (e.g. Asphalt01, Asphalt02… Wood09)...

View Article


Storing calculations inside class with python

Hello, I want to create a class with a number of related properties which are calculated inside the class when certain property is assigned but I can not make it… python code below is a simplified...

View Article

Image may be NSFW.
Clik here to view.

Operation between a datatree and list in python

math between datatree and list.gh (6.5 KB) Hello, I´m working on a code in python with two lists as inputs. One of these lists is transformed in Datatree inside the code and then, I´m trying to do a...

View Article

Frustrating experience with Python code which sometimes work and sometimes...

I have a simple piece of code that sometimes does not work and after a while does. It’s driving me insane as it is impossible to debug. The original code comes from here I am trying to get the Scale...

View Article


Export Selected path

Is there a way to create a script to Export Selected to AI (or whatever common extension) using the current (or user inputted) filename to the current file path. I do a lot of laser cutting and 3D...

View Article


Image may be NSFW.
Clik here to view.

Batch change script or command to change the detail viewport display mode in...

I’m working on large projects that require anywhere from 2-6 details on a layout. Is there a script, command, or plugin that is available that would allow me to batch change the display mode of the...

View Article

A question: How to make CurveIntersection inside GHpython?

An error occurred when I tired to make curve intersection in GHpython. Can any kind person help me? The code is as follows: import rhinoscriptsyntax as rs import ghpythonlib.components as ghcomp...

View Article

Request: script or way to invert selected within same layer

just curious if someone has something floating around that would basically invert selected but only using objects on same layer to select? also this would only need to work with one layer for...

View Article

Python Int Divide By Int Equals Int?

Is it normal for Python to do a int / int = int with imported scripts, but int / int = float when in the main script? I had everything in one script 90 / 360 = 0.25, but after I refactored and...

View Article


Image may be NSFW.
Clik here to view.

Guid to Point3d

Hello! I have used “rs.RotateObject” to generate a point(a guid of a point). and i have a point (Point3d). i want to use “rs.AddCurve” to add a curve to my Rhino but this is the error I have gotten...

View Article

Image may be NSFW.
Clik here to view.

Custom function to use ColorPicker with alpha

In response to another post here, I made a small definition to be able to call up the V7 color picker with the alpha sliders enabled - which rs.GetColor() doesn’t do yet. I ran into one interesting...

View Article


Image may be NSFW.
Clik here to view.

rs.ObjectName Throwing 'str is not callable' Error

Here is the relevant code. fingerRail = rs.AddCircle(rs.WorldZXPlane(), rad) #name = 'Size {:.3f} + {:.3f}'.format(opt.Size, offset) name = 'fred' rs.ObjectName(fingerRail, name) fingerRail is a...

View Article

Create line on a plane

Hi, I’m using rs.PlaneFromPoints to create a new plane and want to draw geometry, for example: a line, on that plane. Can someone tell me how to do this? Rhino 7 using RhinoScript or Rhino Common Eric...

View Article


Convert System.guid to simple guid

Hi all I’m a new in Rhino in python I have a list of objects that I selected in rhino. I wanna store the selection list and later on select it from python the thing is when I use Get.object it give me...

View Article

C# beginner

Hello, All my salutation to this very respectful forum, and Specially Mc. Neel My question is: As a beginner what tutorial can i read for learning c sharp? As i only know C# 5.0 In A Nutshell For...

View Article

Make2d speed test

Hello , I made a python script for rhino5 which uses scripted make2d command. Since Rhino 7 is out I have adopted the script and it now scripts make2d under rhino7 However, it turns out that scripted...

View Article
Browsing all 5743 articles
Browse latest View live