Skip to content

spokes collision needs improvement #22

Description

@Neon22

my math is faulty. :(
In generate_spokes_path() I test for overlapping spokes at mount_radius.
If overlapping, I increase mount_radius.
My test is:

if spoke_width * spoke_count +0.5 >= two_pi * mount_radius:

My intention was to calculate the circumference assuming mount_radius and check to see if calculated spoke circumference was larger.
But I think a better calc is to calc angle subtended by N spokes (3 spokes=120 deg) vs calculated angle if isoceles tri had base of spoke_width.
i.e. radius = 2a cos(alpha) where a = spoke_width
but for low spoke_counts angle is > 90 so my math skills fail. (too tired - sad really...)

Also having failed the test - it seems like it should be possible to calculate by how much the mount radius should be increased so that the spokes do not overlap.

Can you help ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions