Quantcast
Viewing all articles
Browse latest Browse all 5783

Need help with AddSweep1

@ckline wrote:

I’ve written a script to extrude a curve along a path. I pick the path curve, insert a block at the start point of that curve, explode the block so it is a curve, then extrude that curve along the path:

ExtrudePath = rs.GetObject(“Pick the path”)
sp = rs.CurveStartPoint(ExtrudePath)

rs.InsertBlock( StiffenerBlock, sp, (1,1,1), 0 )
stiff = rs.FirstObject()

rs.ExplodeBlockInstance(stiff)
stiff = rs.FirstObject()

rs.ExtrudeCurve(stiff, ExtrudePath)

I would like to do the same thing to sweep along 1 rail. I use the same code to define the path and shape but at the end use:

rs.AddSweep1(SweepPath, stiff)

But this doesn’t work. I get the message: iteration over non-sequence of type Guid

However, if I add the line:
shape = rs.GetObjects(“Select stiffener”)
and select the exploded block, then:
rs.AddSweep1(SweepPath, shape)
it works. And this only works with GetObjects (plural) and not GetObject.

Can anyone please help me with this?

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 5783

Trending Articles