Giter Site home page Giter Site logo

_get_screw_fam broken? about nutsnbolts HOT 2 CLOSED

johk avatar johk commented on July 17, 2024
_get_screw_fam broken?

from nutsnbolts.

Comments (2)

JohK avatar JohK commented on July 17, 2024

Hi,

looking at this code for the first time in 5 years...

I think the intent was to have two sets of functions, the first set operates on the
family table and the other on the bolt table.
Where "M5" is the name of a complete family of bolts of different lengths (i.e. M5x10, M5x12, etc).

_get_screw_fam(n) therefore should use a bolt name, like M5x10 to get you to the property value from the table, whereas _get_fam(n) takes the family name, i.e. M5.

Are you sure this is a working line? It seems to miss an argument to search? Nonetheless, basically this is redefining _get_screw_fam(n) as _get_fam(n).

Does _get_nut_key("M5x10") work?

from nutsnbolts.

hannesweisbach avatar hannesweisbach commented on July 17, 2024

Hi, sorry it me so long to get back to you :(

Yes, _get_nut_key("M5x10") works! Now I understand screw_fam, thanks!

I was about to propose that _get_nut_key() uses _get_fam() instead of _get_screw_fam(), because the key size of an M5 nut doesn't really depend on the length of the screw. But then I realized that if you have the screw family in a variable (like screw = "M5x10";), you wouldn't be able to get the key size easily :)

Thanks for your help :)

from nutsnbolts.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.