Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5871

Trying to create a box 2x4x2 2 units below an existing point

$
0
0

@Christopher_Gornall wrote:

i am trying to find objects in a layer with “Light” in the name i then need to create points at the center of the objects(boxes) and create coresponding boxes 2x4x2 exactly 2 units below the center point found on the objects in the layer i need to make those objects on a specific layer named “Flicker Evaluation”

anything helps!!!

thanks

import Rhino
import scriptcontext as sc
import rhinoscriptsyntax as rs

    search_string = "Light"
    for layer in sc.doc.Layers:
        if search_string.lower() in layer.Name.lower():
            for rh_obj in sc.doc.Objects.FindByLayer(layer):
                if rs.IsSurface(rh_obj.Id):
                    rc = rs.SurfaceAreaCentroid(rh_obj.Id)

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5871

Trending Articles