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

Python rhinoscriptsyntax equivalent of "RebuildMeshNormals"?

I see rs.UnifyMeshNormals, but not Rebuild. There is the RhinoCommon Mesh.RebuildNormals method, but maybe there should also be a rs shell made available (unless I missed where it is…)? Something like...

View Article


Some learnings on developing a fast Python/C++ script for importing a mesh...

In the C++ code below, a new_mesh is created using ON_Mesh and then populated with vertices and faces and it all works fine. But if new_mesh turns out not to be valid, then should new_mesh be deleted...

View Article


VB Blocks inside blocks

I am trying to write a VB RhinoScript that finds objects with certain usertext associated with my Weight Estimating system, then show and select them. That part is easy. I also look through each block...

View Article

ApplyPlanerMapping

Hi, Is there a way of scripting the command “ApplyPlanerMapping”? Python script if possible for Rhino 6. Alternatively, a way of doing this with RhinoScript Command Function. Thanks, Eric 3 posts - 2...

View Article

RhinoPython, DivideCurve, join points

Hi, I’m doing Rhinopython for the first time and I trying to divide two lines that I created and then join the points form those two lines. This is what I have so far; r_bot1 = Point3d(d1,d1,d1)...

View Article


Get Full Path of PBR Textures

Hoping someone can help me with this. Trying to write a script to consolidate all the textures used by a Render Material into one folder. Often times I’m pulling from a library but need to consolidate...

View Article

Image may be NSFW.
Clik here to view.

Join disjoint curves into closed curve

Hello everyone, I am working on a function that will join a collection of curves into a single closed curve, based upon the closest endpoints. You can read more detailed comments in the .gh file, but...

View Article

Python Esc cancel does not work in rhino 6 osx

Trying to make a cancel-able python script on mac in rhino 6. script: import rhinoscriptsyntax as rs import Rhino def TimeConsumingTask(): for i in range(10000): # Was escape key pressed?...

View Article


Curly braces are removed from text set with Rhino.TextObjectText using VB Script

It seems that the Rhino.TextObjectText function called from a VB Script removes all curly braces “{” and “}” from the text to be written into a text object. It works from the UI though. I have tried...

View Article


Should I learn Python for Rhino or for Grasshopper

Hi All I am wondering which platform in which I should to learn/use Python in as I know that we can use it in the Rhino Interface or in Grasshopper. Would someone has any advise? Many thanks! Yutaka 3...

View Article

Image may be NSFW.
Clik here to view.

Return all Material Names in Document

Hi, Is there a function that will return the names of all the materials in a file or check to see if one exists by its name? I see one for VBScript but not Python? developer.rhino3d.com...

View Article

Sorting bouding box

hello… i’ve got a lot of bounding box to sort by thickness, i have 3 thickness 3, 2 and 1, i want to orient it with the thickness on Z axis, then the longuer dimension on Y axis, and The last...

View Article

Image may be NSFW.
Clik here to view.

'ZuiPythonComponent' object has no attribute 'WireDisplay'

Hello How i can solve this problem and find which components need input.WireDisplay or directly obj.WireDisplay? Panel for example, the wiredisplay can changed by use: if obj.Name == “Panel”...

View Article


Image may be NSFW.
Clik here to view.

__str__ or __repr__ when subclassing System.Object?

Hi all, I have a question about str (or repr) when subclassing from System.Object in a Grasshopper ghpython component? if I create a simple class and subclass from System.Object, everything works as...

View Article

Getting Object Attribute Data in Python using Key

Hello, I have been toiling around quite a bit trying to figure out how to read a value from the ‘Attribute User Text’ tab of an object once it is selected, where the attributes dictionary is. My...

View Article


Script for Select CURRENT LAYER and SUBLAYER OBJECTS

Hello. Could I get a script assist please: I’d like to be able to hot key the selection of objects on the current layer and all nested layers. 2 posts - 2 participants Read full topic

View Article

Image may be NSFW.
Clik here to view.

Explode nested blocks recursively

Hi to All. I have a problem to solve. I need to create a python script that explodes my “nested” blocks leaving the “main” blocks intact Example: I have a block: (“bl_main_001”) Nested inside...

View Article


Image may be NSFW.
Clik here to view.

Find surfaces with the same shape

Hi all, I am trying to create some polyominoes, starting from a grid of cells. I am having some issues because I would like to avoid creating duplicates, both in terms of rotation and flip. So, I am...

View Article

Image may be NSFW.
Clik here to view.

How to sequentially sort a bunch of points from different branches

I’m reposting my question here because I would like to explore a scripted solution, preferably python as it’s what I’m trying to learn. I would also like to see something with galapagos or another...

View Article

rs.IsEllipse()

Currently, rs.IsEllipse() finds not only closed ellipses, but also open ellipse segments (elliptical arcs) and circles and circular arcs… Methinks this is not useful/selective enough… Of course,...

View Article
Browsing all 5800 articles
Browse latest View live