& Construction

Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing

Professional CAD/CAM tools built on Inventor and AutoCAD
Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
Professional CAD/CAM tools built on Inventor and AutoCAD
Transcript
00:02
Use scripts to create gears.
00:06
In this video, we'll use a python script and we'll use Align.
00:11
In Fusion 360, we want to carry on with our gear reduction housing assembly.
00:16
I’m going to get started by hiding the housing mount.
00:18
And I also want to hide the front cover.
00:22
From here we're going to be creating the gears by using something called a script.
00:27
A script is a program that can be run in Fusion 360 that allows us to make use of some advanced functionality,
00:34
to create complex geometry or even perform simple repetition.
00:39
To do this, we're going to move on to the Tools menu and look for the Add-Ins section.
00:44
This will have something called Scripts and Add-Ins but note there's a shortcut key Shift S.
00:50
Once we select Scripts and Add-Ins, there's a section called Sample Scripts in the Script section.
00:56
Also note there's a tab for Add-Ins that has a couple other things in it as well, such as the sample add-in for the spur gear.
01:04
This can be found in both places for the spur gear script in the script section or in the add-ins section.
01:12
What we're going to be doing is selecting the one that has the blue and yellow icon next to it, which means that this was created using python.
01:20
The other spur gear script is created using C++.
01:24
Now the functionality is the same but we're going to be exploring the python version.
01:28
Note that we can create and edit these directly inside of Fusion 360.
01:33
So if you have programming knowledge and you have access to the list of open API functions,
01:41
you can create your own scripts and Add-Inns for Fusion 360.
01:45
That's a bit outside of what we're looking at here.
01:47
So right now we're going to focus on the functionality of just running an existing script.
01:52
Once you've selected spur gear, let's select Run.
01:56
Notice that it pops up a dialogue box similar to all of the other tools in Fusion 360.
02:01
We have a graphic at the top that tells us hole diameter,
02:04
root fillet radius and pitch diameter as well as the module being the pitch diameter over the number of teeth.
02:12
We can modify some of these values, such as the units, in this case, metric, the pressure angle, the module, the number of teeth and so on.
02:22
Remember that we have our spec sheet that's going to determine some of these values.
02:27
We're going to be using a module of 2.
02:29
For this first gear, we're going to create our 48 tooth drive gear.
02:34
Our backlash value in this case is going to be 0.1 mm.
02:40
Our root fillet value is going to be 0.5.
02:44
But let's also note that some of these values can use our parameters.
02:49
So for example, as we start to type in a value, you'll notice that as we go through here, we have our gear module and our gear thickness values.
02:59
Not all of the values can use those parameters but some of them can.
03:04
For our root fillet, we're going to set it to 0.5 mm, our gear thickness value, we can start to type in gear and select gear thickness,
03:14
noting that it is linking to that parameter.
03:17
And then the hole diameter in the center.
03:20
We can start to type in gear,
03:22
and then as we go through here, you can see that we have idle gear diameter and we have our drive and driven gear diameters.
03:31
So in this case, we're going to be using our drive gear,
03:35
and notice it's telling us that the center is too large and that's because the drive gear diameter was actually our 96 mm.
03:43
So in this case, let's simply enter the value of 12 mm for that internal hole and then we'll say, OK.
03:51
Notice that the new component is created called spur gear 48 teeth and by default it's created on the top or the XY plane.
03:60
Also note that there is a sketch in here that's showing the pitch diameter.
04:05
If we want to modify this, we can expand it and expand the Sketches folder and we can hide Sketch 3.
04:11
We're going to worry about moving this into place in just a little bit, but let's carry on creating more gears that we can use.
04:18
So let's carry on and rerun our spur gear script, noting that it remembered our backlash, root fillet, gear thickness and hole diameter values.
04:27
So in this case, we simply need to switch the number of teeth.
04:31
We'll say OK, and it creates a new gear with 16 teeth.
04:36
We're going to run this one more time.
04:38
And once again it's going to remember those values so we just need to make sure that we set it to 10 teeth.
04:45
Remember that some of these gears will use a different inside diameter, but all of them can be modified later if needed.
04:54
Now that we have each of these as components, they're free to move about because they have their own coordinate systems.
05:00
While it's not strictly necessary that we move them around to different positions,
05:04
I am going to move them around and capture their position which will just temporarily get them out of the way.
05:11
Again, this is not necessarily a step that we have to follow, but it does help us in order to visualize things a little bit better.
05:20
The next thing that I want to do is I want to hide the back housing.
05:23
I'm going to use just the front housing to align everything.
05:27
And to do this, I also want to temporarily lock the front housing in place so I'm going to right click and ground it.
05:34
By grounding the front housing, what I'm telling Fusion 360 is that,
05:37
the coordinate system associated with this is fixed in space relative to the origin at the top level.
05:45
From here I'm going to move back to my solid tool set, and I want to begin moving these gears into their correct position.
05:52
To do this, I can use Move/Copy or I can use another tool called Align.
05:57
Align is extremely helpful because it has some additional functionality.
06:02
First we want to make sure that we are moving components.
06:06
If we move bodies, they will get to the correct place but the coordinate system for each of those bodies will remain in its current position.
06:13
So I want to make sure that we're moving the entire component.
06:17
For this, as I hover over the back face of this gear, there are a lot of different positions that we can select.
06:25
With Align we can actually select just the face,
06:28
or we can hold down the control or command key which will lock the focus and allow us to select various positions.
06:35
I'm going to navigate to the center point of this gear and I'm going to left click on that position.
06:41
So this is where we're moving from.
06:43
I'm going to rotate my design around and I'm going to hover over the back face of this housing.
06:49
I'm going to hold down the control or command key, then I'm going to select this position and that's where we're moving to.
06:55
I want to flip this because I need to make sure that the gear is on the proper side.
07:00
Then I'm going to capture its position and say OK.
07:04
Now we want to repeat that process by using our right click marking menu and selecting Repeat Align.
07:10
This time, I'm going to hover over the smaller gear, go to the center position,
07:15
then I'm gonna move it again, holding down the control or command key to the center position there and flipping if needed.
07:22
We'll capture its position and we'll say, OK.
07:25
Lastly I need to move the idle gear, so once again right click, Repeat Align.
07:30
And I'm going to select the center position of the shaft and then again, I'll hold down control or command.
07:38
And if we need to, we'll flip it to the proper side and we'll select Capture Position.
07:43
At this point in time, the gears are overlapping, but that's okay because we haven't added any joints, they're still actually free to move about.
07:51
Once we move them, we want to revert their position, make sure that they are going back to that original location.
07:58
We're going to deal with getting them into the correct position and rotating them around.
08:03
But let's go ahead and expand each of these and hide Sketch 3 as we don't really need to see that sketch.
08:11
At this point you'll notice that we haven't created all of the idler gears.
08:16
We have an identical idler gear that has 10 teeth on it and then we have one that we need to modify that will be a little bit longer.
08:24
We're going to deal with those in a future video,
08:27
because those are going to be copied components and we're going to talk about Copy and Paste functionality.
08:33
But at this point, let's navigate back to a home position.
08:36
Let's make sure that we save this before we move on.
Video transcript
00:02
Use scripts to create gears.
00:06
In this video, we'll use a python script and we'll use Align.
00:11
In Fusion 360, we want to carry on with our gear reduction housing assembly.
00:16
I’m going to get started by hiding the housing mount.
00:18
And I also want to hide the front cover.
00:22
From here we're going to be creating the gears by using something called a script.
00:27
A script is a program that can be run in Fusion 360 that allows us to make use of some advanced functionality,
00:34
to create complex geometry or even perform simple repetition.
00:39
To do this, we're going to move on to the Tools menu and look for the Add-Ins section.
00:44
This will have something called Scripts and Add-Ins but note there's a shortcut key Shift S.
00:50
Once we select Scripts and Add-Ins, there's a section called Sample Scripts in the Script section.
00:56
Also note there's a tab for Add-Ins that has a couple other things in it as well, such as the sample add-in for the spur gear.
01:04
This can be found in both places for the spur gear script in the script section or in the add-ins section.
01:12
What we're going to be doing is selecting the one that has the blue and yellow icon next to it, which means that this was created using python.
01:20
The other spur gear script is created using C++.
01:24
Now the functionality is the same but we're going to be exploring the python version.
01:28
Note that we can create and edit these directly inside of Fusion 360.
01:33
So if you have programming knowledge and you have access to the list of open API functions,
01:41
you can create your own scripts and Add-Inns for Fusion 360.
01:45
That's a bit outside of what we're looking at here.
01:47
So right now we're going to focus on the functionality of just running an existing script.
01:52
Once you've selected spur gear, let's select Run.
01:56
Notice that it pops up a dialogue box similar to all of the other tools in Fusion 360.
02:01
We have a graphic at the top that tells us hole diameter,
02:04
root fillet radius and pitch diameter as well as the module being the pitch diameter over the number of teeth.
02:12
We can modify some of these values, such as the units, in this case, metric, the pressure angle, the module, the number of teeth and so on.
02:22
Remember that we have our spec sheet that's going to determine some of these values.
02:27
We're going to be using a module of 2.
02:29
For this first gear, we're going to create our 48 tooth drive gear.
02:34
Our backlash value in this case is going to be 0.1 mm.
02:40
Our root fillet value is going to be 0.5.
02:44
But let's also note that some of these values can use our parameters.
02:49
So for example, as we start to type in a value, you'll notice that as we go through here, we have our gear module and our gear thickness values.
02:59
Not all of the values can use those parameters but some of them can.
03:04
For our root fillet, we're going to set it to 0.5 mm, our gear thickness value, we can start to type in gear and select gear thickness,
03:14
noting that it is linking to that parameter.
03:17
And then the hole diameter in the center.
03:20
We can start to type in gear,
03:22
and then as we go through here, you can see that we have idle gear diameter and we have our drive and driven gear diameters.
03:31
So in this case, we're going to be using our drive gear,
03:35
and notice it's telling us that the center is too large and that's because the drive gear diameter was actually our 96 mm.
03:43
So in this case, let's simply enter the value of 12 mm for that internal hole and then we'll say, OK.
03:51
Notice that the new component is created called spur gear 48 teeth and by default it's created on the top or the XY plane.
03:60
Also note that there is a sketch in here that's showing the pitch diameter.
04:05
If we want to modify this, we can expand it and expand the Sketches folder and we can hide Sketch 3.
04:11
We're going to worry about moving this into place in just a little bit, but let's carry on creating more gears that we can use.
04:18
So let's carry on and rerun our spur gear script, noting that it remembered our backlash, root fillet, gear thickness and hole diameter values.
04:27
So in this case, we simply need to switch the number of teeth.
04:31
We'll say OK, and it creates a new gear with 16 teeth.
04:36
We're going to run this one more time.
04:38
And once again it's going to remember those values so we just need to make sure that we set it to 10 teeth.
04:45
Remember that some of these gears will use a different inside diameter, but all of them can be modified later if needed.
04:54
Now that we have each of these as components, they're free to move about because they have their own coordinate systems.
05:00
While it's not strictly necessary that we move them around to different positions,
05:04
I am going to move them around and capture their position which will just temporarily get them out of the way.
05:11
Again, this is not necessarily a step that we have to follow, but it does help us in order to visualize things a little bit better.
05:20
The next thing that I want to do is I want to hide the back housing.
05:23
I'm going to use just the front housing to align everything.
05:27
And to do this, I also want to temporarily lock the front housing in place so I'm going to right click and ground it.
05:34
By grounding the front housing, what I'm telling Fusion 360 is that,
05:37
the coordinate system associated with this is fixed in space relative to the origin at the top level.
05:45
From here I'm going to move back to my solid tool set, and I want to begin moving these gears into their correct position.
05:52
To do this, I can use Move/Copy or I can use another tool called Align.
05:57
Align is extremely helpful because it has some additional functionality.
06:02
First we want to make sure that we are moving components.
06:06
If we move bodies, they will get to the correct place but the coordinate system for each of those bodies will remain in its current position.
06:13
So I want to make sure that we're moving the entire component.
06:17
For this, as I hover over the back face of this gear, there are a lot of different positions that we can select.
06:25
With Align we can actually select just the face,
06:28
or we can hold down the control or command key which will lock the focus and allow us to select various positions.
06:35
I'm going to navigate to the center point of this gear and I'm going to left click on that position.
06:41
So this is where we're moving from.
06:43
I'm going to rotate my design around and I'm going to hover over the back face of this housing.
06:49
I'm going to hold down the control or command key, then I'm going to select this position and that's where we're moving to.
06:55
I want to flip this because I need to make sure that the gear is on the proper side.
07:00
Then I'm going to capture its position and say OK.
07:04
Now we want to repeat that process by using our right click marking menu and selecting Repeat Align.
07:10
This time, I'm going to hover over the smaller gear, go to the center position,
07:15
then I'm gonna move it again, holding down the control or command key to the center position there and flipping if needed.
07:22
We'll capture its position and we'll say, OK.
07:25
Lastly I need to move the idle gear, so once again right click, Repeat Align.
07:30
And I'm going to select the center position of the shaft and then again, I'll hold down control or command.
07:38
And if we need to, we'll flip it to the proper side and we'll select Capture Position.
07:43
At this point in time, the gears are overlapping, but that's okay because we haven't added any joints, they're still actually free to move about.
07:51
Once we move them, we want to revert their position, make sure that they are going back to that original location.
07:58
We're going to deal with getting them into the correct position and rotating them around.
08:03
But let's go ahead and expand each of these and hide Sketch 3 as we don't really need to see that sketch.
08:11
At this point you'll notice that we haven't created all of the idler gears.
08:16
We have an identical idler gear that has 10 teeth on it and then we have one that we need to modify that will be a little bit longer.
08:24
We're going to deal with those in a future video,
08:27
because those are going to be copied components and we're going to talk about Copy and Paste functionality.
08:33
But at this point, let's navigate back to a home position.
08:36
Let's make sure that we save this before we move on.
Step-by-step guide
How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Sign in to start learning
Sign in for unlimited free access to all learning content.Save your progress
Take assessments
Receive personalized recommendations
May we collect and use your data?
Learn more about the Third Party Services we use and our Privacy Statement.May we collect and use your data to tailor your experience?
Explore the benefits of a customized experience by managing your privacy settings for this site or visit our Privacy Statement to learn more about your options.