How to convert a bspline to a part [Solved]

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
iplayfast
Posts: 256
Joined: Sat Sep 07, 2019 6:55 am

Re: How to convert a bspline to a part

Post by iplayfast »

I'm still stuck. (sigh)
So far I've got: (follow along with https://github.com/iplayfast/CycloidGearBox )

import cycloidbox
g = cycloidbox.hypoCycloidalGear()
a = Part.BSplineCurve(g.generateCycloidalDiskArray()).toShape()
Part.show(a)


and I get a cycloidal gear. BUT it's just a line. I need to make it a plane and then pad it.
But once it's made I can't seem to do anything with it.

Any suggestions?
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: How to convert a bspline to a part

Post by chrisb »

In the GUI you can either extrude in Part workbench, or you can move it into a PartDesign body and pad in PartDesign. I guess you have to follow similar steps from python.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Chris_G
Veteran
Posts: 2579
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: How to convert a bspline to a part

Post by Chris_G »

iplayfast wrote: Mon Sep 30, 2019 5:26 am and I get a cycloidal gear. BUT it's just a line. I need to make it a plane and then pad it.
But once it's made I can't seem to do anything with it.
This should build the solid :

Code: Select all

w = Part.Wire([a])
f = Part.Face(w)
e = f.extrude(FreeCAD.Vector(0,0,2))
Part.show(e)
User avatar
iplayfast
Posts: 256
Joined: Sat Sep 07, 2019 6:55 am

Re: How to convert a bspline to a part

Post by iplayfast »

Lot's of Chris's on this forum. (I'm one too).
Chris_G wrote: Mon Sep 30, 2019 12:24 pm This should build the solid :

Code: Select all

w = Part.Wire([a])
f = Part.Face(w)
e = f.extrude(FreeCAD.Vector(0,0,2))
Part.show(e)
This looks like exactly what I was looking for! Thank you.
Post Reply