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

Performance of NamedSelections

I need to create >80 NamedSelections and do other NamedSelections operations like list and delete for my parametrized models. Usually, I try to do everything in RhinoCommon, but unfortunately,...

View Article


POSTMAN and Python long response time

Hello Team, We are experiencing some issues when we are sending requests from POSTMAN and Python when we are sending GET message below: http://185.229.27.37:5000/sdk before it works and returns...

View Article


Image may be NSFW.
Clik here to view.

RhinoCommon VectorAngle

In Rhino 8, using Rhino.Geometry, cannot compute angle between two vectors. “TypeError: Rhino.Geometry.Vector3d value cannot be converted to Rhino.Geometry.Vector3d in method Double...

View Article

How to modify a block definition in python?

I want to get an object from a file and add it to the block definitions (I figured out how to do this). Then, I would like to add other obects to the block definition. This is what I’ve got so far...

View Article

Point comparison - which method is fastest?

Just out of curiosity, there are several methods that one can use to compare two points, notably: if ptA.DistanceTo(ptB)<tol: return True if ptA.DistanceToSquared(ptB)<tol: return True...

View Article


Weird Python Array Pitfall (or, I Didn't Know How Python Classes Work)

So it seems that if you create a class and declare an array in that class outside the __init__() function, the array will be treated like a class variable (even though you must refer to it as...

View Article

Oddity with boxes' underlying surfaces

6Boxes.3dm (3.2 MB) In the above, there are six boxes. With UseExtrusions set to Polysurfaces: Box1 is made with the box command Box2 is an extruded rectangle curve (via Gumball) Box3 is an extruded...

View Article

RhinoScriptSyntax.AddPictureFrame() FilePath issue

when calling rs.AddPictureFrame(plane, path, size[0], size[1], use_alpha = True) uing python3 in GH rhino8, i got the following exception: Traceback (most recent call last): File...

View Article


Splitting text entity

Hi, Using Rhinocommon… (c# or python) I would like to align a text object (not curves) on a curve. The result would be a text entity per char oriented on a curve. I can’t find a way to find each...

View Article


Image may be NSFW.
Clik here to view.

ScriptEditor pip and git

I have a question about developing and publishing plugins via ScriptEditor. The current user interface provides Libraries category: However, this approach doesn’t quite work from a development...

View Article

Image may be NSFW.
Clik here to view.

Pycharm IDE _unresolve reference work around?

HI All, I got a chance to snoop around and make my way of using pycharm as IDE for ghpython. My question is, is there a workaround for unresolved references since the variable input came from the gh...

View Article

[BUG] BrowseForFolder not working correctly

rs.BrowseForFolder() works fine on first run. Thereafter, it opens in the background and cannot be brought forward. Since my browser window is always fullscreen for some reason, I can sometimes reach...

View Article

Rhino8 Export Dwg

I have found an issue where even if I set the DWG file to be exported as a solid, when I select the Rhino Space solid, the exported object is still a line segment. However, when I set it as a mesh,...

View Article


Image may be NSFW.
Clik here to view.

Error with Pandas on Laptop but Works on Desktop

Hi, I have a desktop and a laptop, both with the same Python 3 + Rhino 8 environment, but I’m encountering an issue where the code runs normally on the desktop but throws an error “1. Error running...

View Article

Image may be NSFW.
Clik here to view.

[Rhino8] Tools > Script > Run does not filter for python files

In Rhino 6 & 7, when you click on Tools > PythonScript > Run, a file browser opens, and it has a file type filter so that you can only see python files, which is nice. In Rhino 8, when you...

View Article


Struggling with IEnumerables

I have reviewed the other posts about IEnumerables and tried to recreate previous examples but the sample codes still fail. import Rhino.Geometry as rg from System.Collections.Generic import List lots...

View Article

Failing to read/write UserData from Object.Attribute

I’m trying to save an attribute to Object.Attributes.UserData. The data is saved during the session, but when reloading the .3dm file it is not. (The color change to Attributes.ObjectColor is saved,...

View Article


Image may be NSFW.
Clik here to view.

Tips for Making Python Scripts and ETO Forms Compatible with Macs

I don’t have a Mac, so this has been challenging, but I seem to have finally conquered this. I had a person just today who successfully installed and used my kit. (To clarify, my kit is not a true...

View Article

'GetObject'メソッドが使用できない

GetObject メソッドが使用できない場合はどうすればよいでしょうか? import rhinoscriptsyntax as rs obj = rs.GetObject("Select an object") if obj: print(f"Selected object: {obj}") このスクリプトが正常に動作しない状況です。 3 posts - 2 participants Read...

View Article

Image may be NSFW.
Clik here to view.

Adding a text entity via Rhino.Geometry.TextEntity.Create()

The method wants the following: But I’m not sure what to reference for DimensionStyle I tried Rhino.DocObjects.Tables.DimStyleTable.Current but that didn’t work Creating a DimStyle from scratch...

View Article
Browsing all 4120 articles
Browse latest View live