Python connecting primitive shapes into one?

Need help, or want to share a macro? Post here!
MaverickJaxson
Posts: 1
Joined: Mon Jul 20, 2020 7:42 am

Python connecting primitive shapes into one?

Postby MaverickJaxson » Mon Jul 20, 2020 8:24 am

Hello everyone,
I have built a macro that generates an object made of circles using mathematicly generated 900 radiuses and 1mm of distance between each, I would like to know if there is a way to add faces between these circles and have it be as one item in the document not 500 RuledSurfaces.

Thanks.10.0.0.0.1 192.168.1.254 happymod
Last edited by MaverickJaxson on Tue Jul 21, 2020 8:21 am, edited 1 time in total.
ulrich1a
Posts: 1958
Joined: Sun Jul 07, 2013 12:08 pm

Re: Python connecting primitive shapes into one?

Postby ulrich1a » Mon Jul 20, 2020 10:53 am

You have to append all your ruled surfaces into a list. Then make a Shell out of these Surfaces.

Code: Select all

myShell = Part.Shell(mySurfacelist)
This works only, when all surfaces are properly connected to the next one. You can also create a solid out of the shell. But this requires, that the shell is closed. So you may need to add circular faces to the ends.

Code: Select all

mySolid = Part.Solid(myShell)
Ulrich