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

Accessing Dimension End Points in scripts

Hi, I am writing a script to insert block instances at a distance from selected multiple dimension lines. I need to determine where the arrowhead points are located. I do not find the method to access...

View Article


Image may be NSFW.
Clik here to view.

Jump in loop Python

Hello everyone, So I have the following code as can be seen in the image. What I am trying to do is to let python perform the calculations only with a unique ‘g’ value. So for example Within the loop...

View Article


DisplayPipeline/Conduit Objects

Hi All, I don’t know if there is already a script for that need, in practice with Py/RCommon I create points/curves objects etc how could I before creating them, see them in preview and then create...

View Article

Image may be NSFW.
Clik here to view.

Check segment overlap is error

I write a code to check the overlap of 2 segment in the polyline, but the error is when these 2 segment do not overlap but return true def find_overlapping_curves(polycurve1, polycurve2,...

View Article

Image may be NSFW.
Clik here to view.

How to split a polyline by angle?

I would like to be able to split a closed polyline by a maximum angle threshold, like the SplitAtCorners component in grasshopper. I’ve found the Rhino.Geometry.Polyline.BreakAtAngles method, but I...

View Article


Image may be NSFW.
Clik here to view.

Rhino Python Script Only Works with Breakpoints

Hello! I’m encountering a strange bug that gets solved as soon as I insert a breakpoint into my script. This is along script with many functions so I will only post screenshots of the relevant...

View Article

Image may be NSFW.
Clik here to view.

Convert Grasshopper Clock DateTime to datetime

I have issues converting Grasshopper Clock DateTime (type hint) to datetime in ghpython. Panel shows me hh:mm:ss but it seams there is also a default date attached. So I wonder how I get date from...

View Article

Image may be NSFW.
Clik here to view.

Extrusion based on object color

Hi everyone, When I extrude a profile section with different edge colors, the colors of the surfaces formed become gray after extrusion. However, what I want is for the colored parts to be extruded in...

View Article


Image may be NSFW.
Clik here to view.

Need help on changing eto table value NumericUpDown

Hi everybody. i am finishing my explodeview script. but i want to add the function that when i change the value without pressing ok in the eto panel, the display on rhino will also change. According...

View Article


Inserting Values during command sequence with Scripted return value

Sometimes when one uses a command there might be a few steps before getting the result. One of those steps might be entering a numerical value. ‘Playing’ around with formulas during one of those steps...

View Article

OSX Python editor - Atom replacement

As you might have seen, the Atom editor has been discontinued and can no longer be downloaded or used. I had been using it on my OSX Rhino for python coding as I find it much faster to code with than...

View Article

Image may be NSFW.
Clik here to view.

Lost in Python - rhinoscriptsyntax

Hi, I must be really dumb but something here just evades me. I want to define a vector in a python script. I literally copied this line from here import rhinoscriptsyntax as rs vec =...

View Article

Image may be NSFW.
Clik here to view.

Lock/unlock grasshopper solver

Probably a noob question… I built a small interface with RCP, but GRASSHOPPER slows rhino down a lot, So I think of a button that executes RunPythonScript(…) that locks/unlocks the solver. I believe...

View Article


Modifying object properties efficiently

Hi, I am trying to change the object properties like Layer, Display Color, etc. but I want to keep some properties stay same. So, I cannot use MatchObjectProperties Method because it will change all...

View Article

Image may be NSFW.
Clik here to view.

Moving Objects to Layer with Button, Selecting Layer Objects with Button

Hello, I want to add a property to a button. When I left click on the button, I want it to move the selected objects to the layer named “SAMPLE”. When I right-click the button, I want it to select the...

View Article


Image may be NSFW.
Clik here to view.

Geometry.SubD.CreateFromLoft not being affected by addCreases parameter

I’m trying to do a SubDLoft in grasshopper using Python as there is no grasshopper command for that. I have 3 curves I’m using for the loft and I’m baking those 3 lines in Rhino and using the SubDLoft...

View Article

Does not execute method

Hi All, def Sel_Ln(): rt, obj_ref2 = RhinoGet.GetOneObject("Sel Ln", False, ObjectType.Curve) print "sel_rtt" def Sel_Crv_Cls(): cc, obj_ref1 = RhinoGet.GetOneObject("Sel Crv Cls", False,...

View Article


Read MatrixGold file by python

Hey there, I use MatrixGold, I want to read the file .3dm or any extension by python or any programming language. I tried to read .ghx by python and it worked, but when I tried to export my design as...

View Article

Error module rhinoscriptsyntax not found

my code test is : import rhinoscriptsyntax as rs centerpoint = [1, 2, 4] rs.AddCircle( centerpoint, 5.0 ) I get this error : Traceback (most recent call last): File “C:\Users\User\Desktop\test.py”,...

View Article

Image may be NSFW.
Clik here to view.

GH Python Remote can't install

Hey There, I am trying to install GH Python Remote, but just having a hard time. I installed the Python 2.7, and open the Windows CMD and Python (Command Line) and paste the code below based on the...

View Article
Browsing all 4159 articles
Browse latest View live


Latest Images