C/C++ speed in Python? Yes, using Codon
What is Codon? Codon is a high-performance Python compiler that compiles Python code to native machine code without any runtime overhead. Typical speedups over Python are on the order of 10-100x or...
View ArticleGeometry.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 ArticleDeleting geometry from blocks using Python
Hello everyone, I’ve been trying to find a way to remove and add new geometry to nested blocks using Python. Using a recursive function I am able to change the properties of the nested geometry, but...
View ArticleRs. ExtendCurve keep giving "iteration over non-sequence of type int
I am trying to find the intersection of a line extension and a brep. It keeps to give the following error message. However, after I used print(type(line)) to check, “line” is not int. The line...
View ArticleSnapshots Crashing The File
I have written a script utilizing rhinoscriptsyntax to create snapshots out of existing geometry. Simplified, it works like this: import rhinoscriptsyntax as rs objects = rs.GetObjects()...
View ArticleAssign Existing Custom Material to Layer(s) within a script
I’m trying to assign existing (non-default) materials (by name or index) after the AddLayer portion of my script. Seems like it should be very simple, but I’ve tried my darndest to figure this out,...
View ArticleName of Blocks with a Prefix with Number Suffix
I have several blocks. I would like to add text below of each block with a constant Prefix and variable suffix. I have added an example. Is there any way to do that? I have a lot of blocks that needs...
View ArticleGHPython component can't interpret Rhino.Geometry.Curve[]?
Hi, Say I have a Rhino.Geometry.Polyline pline and a couple of Rhino.Geometry.Arcs a1, a2, and a3. When I do the following to join them into a single curve, I get a Rhino.Geometry.Curve[], as...
View ArticleAnnotation Style
I am looking for a script to change the annotation style. I started one but can’t figure out how to change 2 things. Can someone tell me how to change them or write me a script so i can add it to the...
View ArticleIsolateLockToggle does work only at the second try now
Hello, can someone tell me why this happens most of the time and how to change the code? Thank you The Error: The Code: import rhinoscriptsyntax as rs import scriptcontext as sc x = False if...
View ArticleSet the reolution of view capture
Hi! I am using the code from here to capture the view: github.com mcneel/rhino-developer-samples/blob/7/rhinopython/SampleViewCaptureToFile.py...
View ArticleIEnumerable again
Can someone remind me how to convert my Python list of parameters into an IEnumerable so that I can feed it to Curve.Split() ? developer.rhino3d.com Curve.Split Method (IEnumerable(Double)) Splits...
View ArticleCentermark Style
Hi, Can I get a script to change the center mark style in the default annotation to none? Also is there a good place to learn python for Rhino? 3 posts - 2 participants Read full topic
View ArticleDragging CurveEditPoints to change the shape of curve using Python Script
Dynamically changing CurveEditPoints in viewport to update the shape of the curve using python script. I know how to change it’s shape using an attracter point. But It changes the curve completely....
View ArticleWhy does the Curve.GetDistancesBetweenCurves method return "False"
Could someone clearify why the Curve.GetDistance BetweenCurves Method isn’t succeeded in this case? Whereas the Curve Proximity component is successful Distance.gh (4.7 KB) 5 posts - 4 participants...
View ArticleMake Everything Selectable (with Undo) for Copy/Paste History
I’m doing a lot of copy/paste history and getting annoyed that something in the history chain wasn’t selectable. I’m rusty with python, but ChatGPT helped me out a bit. It got a few things wrong, like...
View ArticleExport layers in csv
Hello, I would like to compare the names of the layers present on several files in the same directory. For this I made a code in Python which works but I get blank lines between each data. I tried to...
View ArticleghPython stop update function
Hi all! I have a surface and multiple points that goes down by a move function. I want to stop them whenever the subtraction of the last two points reaches a value of 0.005. How to stop the move and...
View ArticleChange leaders landing
Hi, Can I get a script to change the leader landing to .05? 3 posts - 2 participants Read full topic
View ArticleScript to get objects inside or outside a boundary polysurface
I have a very large context model of a city (includes curves and surfaces) and would like to extract a portion of it using a script. I’m able to generate a cylinder using python given a set of...
View Article