3d involute gears

  • Email
  • Sharebar
  • Email
aplesch's picture

As an update to the 2d involute (curved teeth) gears, I modified the program to produce 3d (extruded) gears. This required a change in drawing tactics.

First, the turtle moves along the gear without drawing anything but only recording its position into a growing list of coordinates. This actually simplified some aspects of drawing the gear since less temporary saving of positions was required. Second, the recorded path is used to generate faces away from the path going segment by segment. The reduce command was convenient for this procedure since it supplies two neighbouring values of a list. Finally, nested transforms are used to adjust the initial rotation of the gears so they mesh together (inner transform) and to spin the adjusted gears (outer transform). To avoid any intersection of the gears, the second gear is moved a small bit farther away from the first gear than strictly necessary. I believe, real small gears tend to require "undercuts" to avoid the same issue.

[Next, I would like to fill in the front and back. Due to the curved shape of the teeth, this will require some more sophisticated face generation.]

Update: front and back are now closed, and some general changes.

Here is the updated, commented logo program:

Here is an example with pitch 32 (more teeth) and a pressure angle of 20. It shows the limitations of the skinny triangle approach.

 

And here the same gears with improved front and back mesh:

 

Only a few changes were necessary. First, I changed the data structure of the gear profile from a flat list of positions to positions grouped by tooth:

Then it was a matter of adjusting the front and back plate drawing procedure to draw a polygon per tooth and then a large circular polygon for the center:

Finally, a flattening transformation of the gear profile data structure is required to be able to continue to use the fence procedure:

Here is a picture of the new front and back mesh which x3dom generates for the provided polygons:

plate mesh

 

 

 

 

 

 

Fig. 1: Triangulation front and back plate polygons

 

 

 

Comments

Andy's picture

some issues for forum discussion

When I change your code: 

to

It seems to work the same. Have I missed something? Could you give an example code?

The triangle approch does work well. cool I can see the work in progress and the two crosssections are coming up..

Do you mean to direct ly edit the x3d codes (say in the debug -> view x3d in dom)? Or do you mean those GUIs for direct manipulation of objects in 3D such as Blender or MeshLab?

Direct coding of x3d may pose some security issues online. It will require more considerations when enabling x3d codes manipulation. I know that will be welcomed by x3d programmers. I am unable to commit time for GUIs for direct manipulation in 3D. And in fact, that is not my purpose at all. The Logo programming is almost the key components for VRMath2 to be an educational tool... (unfortunately, it has not been recognised even by education people yet). I certainly won't give up Logo in VRMath2, but users (including school children) can certainly ignore it or don't have to use it. But then the ability to create 3D worlds will be very limited by my limited GUIs.

aplesch's picture

x3d editor

I agree that logo is really nice for teaching and did not mean to suggest to abandon it at all.

For a x3d focus, perhaps a really simple world construction workspace mode would be the only thing required: 3d world, object inspector, object tree and updating (debug) non editable x3d code window. This way, a x3d learner gets a pretty quick idea how x3d works in principle. An advanced mode could perhaps include the behaviour and animator windows once they are functional. So I think using the existing GUI would not be too limiting at all. Actually, making it a bit more restrictive (simplified menu, less tools) for x3d could be advantageous for learning.

 

Andy's picture

good suggestions

Thanks for the suggestions. I will try to create such as workspace. :-)

PS: from today I will enter assignment marking mode and may not be responsive until next week..

aplesch's picture

thing

Yes, I did some tests and it does work. Hm, perhaps this commit fixed it:

https://github.com/inexorabletash/jslogo/commit/61639ded891828a6dd8a9738...

I also found that I have to use the list command to construct lists if a member needs to be evaluated: [ 1 :myvar 3]

But that may be as intended, eg. everything wthin brackets is quoted.

Andreas

Andy's picture

update logojs

My logojs was base on 2014-01-27 version so commits after are not included in my VRMath2 logo...

This is another job for me to do and test...