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

Image may be NSFW.
Clik here to view.

Auto Make Snapshot active by name

Hi, I managed to set selected Rhino Views active, when I try to do the same thing to snap shots, I have this 2 troubles. I can’t get the snapshot obejct using a similar way. I am not sure when I push...

View Article


Image may be NSFW.
Clik here to view.

TriRemesh Issue

Can anyone explain this? Using the component to remesh my Mesh is okay, while it returns a null by using code. Many thanks… TriRemeshIssue.gh (9.7 KB) 6 posts - 2 participants Read full topic

View Article


Image may be NSFW.
Clik here to view.

How to get coordinates of a viewport corners?

I’m trying to automate SelCrossing <Point1> <Point2> command to select everything visible in the current viewport (detail view on a layout sheet). What’s the best way to “convert” viewport...

View Article

If extrusion object IsCylinder

According to the documentation Extrusions have an IsCylinder method, but in my code it is says an ExtrusionObject has no such attribute…? I guess I need to break it down first? Or do I need to cast...

View Article

Image may be NSFW.
Clik here to view.

Getting help from commands already in Python code

I find it very useful when I start yping a RhinoScript command that as soon as I hit the “(” I get a nice summary of the command and what the parameters are… like this: I am wondering though, how I...

View Article


Image may be NSFW.
Clik here to view.

Line distance error in Windows11 22h2

line_min_dist.gh (16.2 KB) When I update Windows11 21h2 to 22h2 and use Line.MinimumDistanceTo(Line.MinimumDistanceTo Method (Line)) between two parallel lines, incorrect result(0.0) returns sometime....

View Article

Equivalent of CreateRegions command in RhinoCommon

Is there an equivalent of CreateRegions command as applied on non-manifold PolySurfaces that can be called from the grasshopper python script component? I couldn’t find anything in the RhinoCommon...

View Article

Image may be NSFW.
Clik here to view.

rs.ObjectColor() always returns A (transparency) value as 255

I believe I reported this a long, long time ago, but rs.ObjectColor() still always returns 255 (fully opaque) for the A value of a color, even if it is not… Run the following scriptlet on an object...

View Article


Using Chat GTP to write Python scripts for Grasshopper

Hi! To help me troubleshoot the calculation order for a big defenition I have, I would like to visualize the draw order of the components on the canvas. This requires some scripting in which I am not...

View Article


Surface vs BrepFace

What’s the difference between a surface and a BrepFace. I know the Rhino UI uses the term surface while the development environment uses both. Is a surface similar to a brep face? What’s the...

View Article

Ghpythonlib Create Material

Running into a Goo error: "Warning: Custom Preview: input 2 material. error: Data conversion failed from Goo to Shader assignedColors = [‘(105, 26, 64)’, ‘(158, 54, 104)’, ‘(246, 169, 206)’, ‘(253,...

View Article

Python connect mysql db

Hello everyone, I’m creating a python script for Rhino, a form with data that will then insert them into a mysql db, but I can’t install the mysql-connect or pymysql module and I don’t know if it’s...

View Article

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? 2 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

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


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

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
Browsing all 5938 articles
Browse latest View live