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

GHPython - How to declare command on multiple objects? &&& BTW what are the right terms?

$
0
0

@luisseyfer wrote:

Hello,

here is the code I’m trying to get to work:

#import Rhino as rc
import Rhino
import rhinoscriptsyntax as rs
#import scriptcontext as sc
import scriptcontext
#sc.doc = Rhino.RhinoDoc.ActiveDoc
import array as arr
import Rhino.Geometry as rg

BlendBreps = [Srf_a, Srf_b]
print BlendBreps
print type(BlendBreps)

print Srf_a.Faces[0]
edgeA = Srf_a.Edges[Side_a]
print Srf_a.Edges[Side_a]
print edgeA

dom_A = [ edgeA.Domain.T0, edgeA.Domain.T1 ]
print dom_A
print rev_a
print Gx_a

print Srf_b.Faces[0]
edgeB = Srf_b.Edges[Side_b]
print Srf_b.Edges[Side_b]
print edgeB

dom_B = [ edgeB.Domain.T0, edgeB.Domain.T1 ]
print dom_B
print rev_b
print Gx_b

BlendSrf = BlendBreps.CreateBlendSurface ( Srf_a.Faces[0], Srf_a.Edges[Side_A], dom_A, rev_a, Gx_a, Srf_b.Faces[0], Srf_b.Edges[Side_b], dom_B, rev_b, Gx_b )

My questions are:

  1. The command (CreateBlendSurface) doesn’t work on lists (BlendBreps). My understanding of the syntax is:
    objects (to do something to).command
    Since I have 2 objects here, how can I handle this?

  2. I’m always unsure, if I name things right. (e.g. “objects (to do something to).command”)
    Can anyone recommend a place where this is explained?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles