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

How to join 2 circles into a "snowman"?

$
0
0

@polarbrainfreeze wrote:

I'm trying to do something which I think should be really simple.

With python, I want to create 2 circles that overlap, like a snowman, create their surfaces, and then merge the 2 surfaces into one surface I can extrude.

I tried this:

import rhinoscriptsyntax as rs;
cir1 = rs.AddCircle([0,0,0], 10);
cir2 = rs.AddCircle([0,10,0], 5);
cir1Srf = rs.AddPlanarSrf(cir1);
cir2Srf = rs.AddPlanarSrf(cir2);
snow = rs.BooleanUnion([cir1Srf, cir2Srf])

But the "BooleanUnion" seems to be acting more like a "BooleanIntersection". If I extrude the area it created with:
line = rs.AddLine([0,0,0], [0,0,10])
solid1 = rs.ExtrudeSurface(snow, line)

It looks like:

I was expecting the whole "snowman" to be extruded. I want it to look like this (which I created manually with trims and splits, etc. Not with a script):

There's obviously something I don't understand in joining 2 circles. I'm new to Rhino.

Thanks for any help.

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5750

Trending Articles