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

Issue with importing a rhino plugin into editpythonscript

Continuing the discussion from Issue with python editor: How can I import a rhino plugin (PolyFrame) into editpythonscript in case I want to use the plugin commands in my code? 3 posts - 2...

View Article


Brep.Flip(), Brep.Face.Reverse(), Brep.Surface.Reverse Inconsistencies

You can get the normals of a Surface or a BrepFace by using the NormalAt method. I have experimented with this a bit and found out that it is not consistent. I am hoping someone can chime in on this...

View Article


Image may be NSFW.
Clik here to view.

How to "Maintain Source Layers" in a Make2D script - HiddenLineDrawing

I’m trying to write a batch Make2D script for all detail viewports on selected layouts that maintains object layers. Just noticed that HiddenLineDrawingParameters.AddGeometry method takes objects’...

View Article

MeshClosestPoint problem with sample code

meshclosestpoint_testfile.3dm (118.9 KB) I tried example code from the link below, to get a point closest to mesh, but it gives me an error message (Rhino 5). What could be the problem and how to...

View Article

Make2D via a python script keeps crashing Rhino

Script below keeps crashing the model. Make2D command works fine. If you happen to have access to Mcneel’s Crash Report it should have arrived around 22:48pm (UK GMT), otherwise I can’t publish the...

View Article


sc.doc.Objects.FindByCrossingWindowRegion doesn't select blocks

sc.doc.Objects.FindByCrossingWindowRegion doesn’t seem to work on blocks ;/ 5 posts - 2 participants Read full topic

View Article

Image may be NSFW.
Clik here to view.

How to disable clipping plane via script (RemoveViewportId) method

I’m can’t figure out how to make RemoveClipViewportId method to work. I couldn’t find any example on the forum yet. ClippingPlanes seem to have the same ViewportIds property after running this method...

View Article

Object with custom event set up briefly moving too much

This might be tough to track down without my code or might be a simple thing… I’ve attached a custom event to some block instances to update some other geometry when they’re moved. I’m using the...

View Article


Image may be NSFW.
Clik here to view.

Select light ? by name ? with python

EDIT: Silly me figured out light’s names are regular object names so I used “_-Selname Spot1” which seens to work well enough for this use. Hello, I want to iterate over views and take pictures with...

View Article


Image may be NSFW.
Clik here to view.

Get Material for block

I am trying to get individual material info of objects out of a block. I tried using elefront, but the material info is not kept after exploded a block. In the script below, I tried to find the...

View Article

Image may be NSFW.
Clik here to view.

Rhino python has no time to redraw

Hello, I´m using the following python script to render 8 views in R7. batchrender_Python.py (1.1 KB) I can render each view individually at “res = 10” (producing some 10k x 10k pixels) and all are...

View Article

Creating a Plane by 3 vectors

I’m making Planes and I noticed that there’s not really a way to just directly make a plane with 3 vectors? All the constructors(except that weird one I don’t understand lol) take only 2 and so the...

View Article

Customize cursor tooltip

Hi Guys, Is it possible to control or customize the cursor and the tooltip/Text shown using a Python/rh.common script? My task is to create a custom cursor that can give more feedbacks and could be...

View Article


Image may be NSFW.
Clik here to view.

Problem with urllib2 in Python - ChatGPT script

Hello! I have a problem when I try to run a python script, so that I can link it with Chat GPT. The error apparently comes from the urllib2 module. So, when I open the VisualStudioCode, it details...

View Article

Converting Decimal Inches to Decimal Fractions without the Units

How do I convert a decimal from decimal inches to factional inches? I’ve tried the following code using python. LengthString does give me the length in fractional inches but I do not want the units....

View Article


Polyline.BreakAtAngles Method, but with a rule based 'angle' input

Hi! So I’ve been trying to make a code that cuts polylines at specific points based on the angle between consecutive lines. Meaning, I can define that everything below 15 degrees stays connected, but...

View Article

Image may be NSFW.
Clik here to view.

Python Script for dividing Values

I get the dialog box using the command AreaMoments for a section. Could you please tell me how to make a python script that divide (1)/(2) marked in the image. I do not how to access the values that...

View Article


Python rhino

Hello I should creat some curves by python in rhino using rhino eto form. User should be able to select some of them and after submitting the should be deleted from the file. I would be grateful if...

View Article

Script to split multiply mesh elements

Hi All, I have a model containing approximately 100 different meshes on different layers, I am trying to find a script that I can select one mesh terrain and get it to split every mesh on all of the...

View Article

Image may be NSFW.
Clik here to view.

Convert multiple blocks to groups

Hello, I am using Rhino + Vray for archiviz. I often have to handle Rhino models that were exported from archicad. The problem is: almost all archicad elements export as block definitions. It becomes...

View Article
Browsing all 4125 articles
Browse latest View live