I want to modify an existing workbench (fcgears)

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

I want to modify an existing workbench (fcgears)

Post by iplayfast »

The cycloid gears is not what I'm expecting with the fcgears module and after much searching I've found some code that I think I can massage to work with freecad.
You can view my started attempt here. (Still trying to export to dxf but generally, the code is there)
https://github.com/iplayfast/freecad.gears

My problem is that the workbench manager only loads workbenches from a repository list. How do I load one from a local directory? Is it through the console? (example please)
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: I want to modify an existing workbench (fcgears)

Post by chrisb »

If you develop it on your own you can simply copy the files to your Mod folder inside of your local config folder.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: I want to modify an existing workbench (fcgears)

Post by easyw-fc »

In FC 0.19 Addons manager you can add custom & your own repository to be parsed
Can be installed via the AddonManager in Tools menu -> AddonManager if you have a very recent build. In the AddonManger click Configure, then add https://github.com/mwganson/MeshRemodel to the list of custom repositories. After restarting the AddonManager you should find MeshRemodel in the list of workbenches you can install.
kisolre
Veteran
Posts: 4163
Joined: Wed Nov 21, 2018 1:13 pm

Re: I want to modify an existing workbench (fcgears)

Post by kisolre »

Could you please explain what differences do you notice and based on what documents/standarts/... things should be different.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: I want to modify an existing workbench (fcgears)

Post by looo »

iplayfast wrote: Mon Sep 16, 2019 5:11 am The cycloid gears is not what I'm expecting with the fcgears module and after much searching I've found some code that I think I can massage to work with freecad.
I guess there are more types of cycloid gears. The cycloid gear in freecad.gears refers to the gears often used in clocks. I found an example here: https://www.tec-science.com/mechanical- ... dal-gears/

Reading your github post here, I think you are referring to something different: latern-pinion (german: triebstock-verzahnung) which should be a special case of cycloid gear.

I guess this picture explains why it's called a special case of a cycloid gear:
Image

As this is quite a different gear-shape it would be best to create a new gear type for this.


Regarding development of the module:
Depending on the freecad installation you are using there are different ways to install a workbench ready for development. I normally use "pip install -e ." for this task. This simple create a kind of link of the module. But here it's important to use pip from the same python as freecad uses. Else you will install into a different environment and don't see any changes. Also make sure you don't install one module twice (eg.: with addon-manager and with pip)

Using the addon-manager is currently the easiest way to start develop on any 3rd-party module. Simple install and make changes to the installed directory.

So I am looking forward to a nice contribution :D . This gear is something I wanted to do for a long time, but never had time. Actually I think it should also be the basic profile for gears used with chains (eg.: bicycle)
User avatar
iplayfast
Posts: 256
Joined: Sat Sep 07, 2019 6:55 am

Re: I want to modify an existing workbench (fcgears)

Post by iplayfast »

looo wrote: Mon Sep 16, 2019 9:02 am So I am looking forward to a nice contribution :D . This gear is something I wanted to do for a long time, but never had time. Actually I think it should also be the basic profile for gears used with chains (eg.: bicycle)
My fork of your source has the beginnings of a new gear type.

This is (to me) what a cycloidal gear system would look like.
https://en.wikipedia.org/wiki/Cycloidal_drive

https://www.youtube.com/watch?v=xxrT0Tnb2Ek

https://www.youtube.com/watch?v=yIpnEZ_rjZY

That's an interesting site you linked to.
They talk about cycloidal drives here https://www.tec-science.com/mechanical- ... idal-disc/
https://www.tec-science.com/wp-content/ ... sembly.png

My goal is to be able to specify all the parameters and have the gearbox created as needed, including the outer ring pins, the output roller, cycloidal disk, and inner shaft. Each part would be turned on/off by boolean selection. As the (non-boolean) values to create all are the same, it makes sense for it to be all one part.

Lots of terminologies here. I think I like your link's names the best. (Fixed Ring pins, roller pins, pin disk, eccentric shaft,bearing, cycloidal disk). I think bearing will just be a space for a store bought bearing with dimensions for inner and outer. If not turned on, will just have dimensions the same, and the eccentric shaft would just rub against the cycloidal disk.

The code that I've borrowed creates a dxf file (that when imported has many many segments), and I think it could be simplified with splines. It also only produces 2d of gear.

I'm new to FreeCAD so I'm struggling with this, so feel free to offer suggestions (or pull requests). When I have anything that starts to resemble what I'm looking for I'll start giving you pull requests.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: I want to modify an existing workbench (fcgears)

Post by looo »

iplayfast wrote: Mon Sep 16, 2019 2:46 pm My goal is to be able to specify all the parameters and have the gearbox created as needed, including the outer ring pins, the output roller, cycloidal disk, and inner shaft. Each part would be turned on/off by boolean selection. As the (non-boolean) values to create all are the same, it makes sense for it to be all one part.
Ok I see, this again is something different to a latern pinion, and to me it absolutely makes sense to create the full assembly as one object. How to do so, I don't know, but I guess someone will come up with a suggestion if you ask about this.

iplayfast wrote: Mon Sep 16, 2019 2:46 pm Lots of terminologies here. I think I like your link's names the best. (Fixed Ring pins, roller pins, pin disk, eccentric shaft,bearing, cycloidal disk). I think bearing will just be a space for a store bought bearing with dimensions for inner and outer. If not turned on, will just have dimensions the same, and the eccentric shaft would just rub against the cycloidal disk.
Yes terminologies is important and definitely not defined consistent ( at least looking at the sources which can be found on the web).
Anyways I am interested into seeing some results. If you have any questions about the implementation, don't hesitate to ask in the forum.
User avatar
iplayfast
Posts: 256
Joined: Sat Sep 07, 2019 6:55 am

Re: I want to modify an existing workbench (fcgears)

Post by iplayfast »

looo wrote: Mon Sep 16, 2019 8:21 pm Anyways I am interested into seeing some results.
I'm starting to see results. Having problems creating a bspline.
Posted it here
https://github.com/iplayfast/CycloidGearBox
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: I want to modify an existing workbench (fcgears)

Post by looo »

To create a BSplineCurve from a list of Points:

Code: Select all

import Part
bsp = Part.BSplineCurve()
bsp.interpolate(points)
But I guess the list of points must be a list containing FreeCAD.Vector's. (Hopefully in the future better numpy support will come to FreeCAD...)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: I want to modify an existing workbench (fcgears)

Post by Kunda1 »

looo wrote: Mon Sep 23, 2019 8:00 am But I guess the list of points must be a list containing FreeCAD.Vector's. (Hopefully in the future better numpy support will come to FreeCAD...)
can you elaborate what specific numpy support you're referring to ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply