Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Accurate chain generator FS!

imants_smidchensimants_smidchens Member Posts: 62 EDU
just wanted to put this out there: I've made an FS which generates roller chain models around arbitrarily positioned sprockets (or a custom path) with the key important bit being that the linear distance between instances is constant and defined by the pitch of the chain.
link to document: https://cad.onshape.com/documents/1be886df2e36b431c92b2d61/v/2cc5a879879308d0d443846c/e/17a1b8e5fd0b4440efc1c3de

some stuff:
  • Currently has a reasonable collection of ANSI & ISO roller chain standard links built in (with more on the way) - if anyone knows where I can find a comprehensive dimension table for a lot of different roller chain standards, it'd be much appreciated!
  • Users can pattern custom links, with custom pitch lengths, with instance orientation
  • There's a built in performance mode which generates a sweep profile along the path with the dimensions of standard chain types to boost performance
  • Supports an arbitrary number and location of sprockets, including tensioners
  • Sprocket diameters are also accurate based on pitch and tooth count
  • UI/feature improvement suggestions are welcome!
some images:

Comments

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,310
    Wow @imants_smidchens that looks amazing - seems brilliance runs in the family. What happens if a custom path is not a full chain link size?
    Senior Director, Technical Services, EMEAI
  • imants_smidchensimants_smidchens Member Posts: 62 EDU
    NeilCooke said:
    Wow @imants_smidchens that looks amazing - seems brilliance runs in the family. What happens if a custom path is not a full chain link size?
    Currently there are 3 options in the UI:
    -extend all links to cover gap (after generating points, the fs identifies the error and stretches the user-input pitch by (error/number of links) 
    -add an additional link and compress the pitch to similarly account for error
    -do nothing and leave a gap
    (see images below)
    however, ultimately I think my goal is to have the user specify a section in which the chain should sag to account for error (perhaps as an advanced option), although I'm still thinking about whether this curve should be an arc for simplicity or a catenary just for fun.

    some other considerations i'm keeping in mind are that potentially I should have it default to adding an extra link, potentially modeling an "adding and connecting" link if the number of links turns out to be odd (for the standard links at least) or maybe just adding more than one link if it would result in an odd number.

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,310
    Perhaps you could define which sprockets are tensioners and which direction they move?
    Senior Director, Technical Services, EMEAI
  • steve_shubinsteve_shubin Member Posts: 1,066 ✭✭✭✭
    @imants_smidchens

    A chain featurescript. Absolutely fantastic !

    Now the very first word for the title of this post is ACCURATE

    Well there’s a whole lot of real life situations where there’s sag — and not just sag at one point in a long multi cog circuitous loop

    so if you can show sag at multiple places within a loop — that would be great



  • Alex_KempenAlex_Kempen Member Posts: 244 EDU
    Looks nice! I personally spend a lot of time staring at FeatureScripts, so here's some things that I think might be worth modifying/implementing:
    1. Use sentence case for all UI (i.e. Linear pattern instead of Linear Pattern, Path inputs instead of Path Inputs). This will bring your feature in line with the Onshape standard for feature UI.
    2. Add UIHint.REMEMBER_PREVIOUS_VALUE wherever it makes sense - it can be especially nice for things like standard tables, so you don't have to click through the menu every time. You can also use UIHint.MATCH_LAST_ARRAY_ITEM for array parameters, rather than using the default value for every new item.
    4. Use verifyNonemptyQuery to throw errors when certain parameters aren't selected (i.e. no sprockets are selected or no edge is chosen). You can also use it on individual array parameters by using a parameter id like "myArray[" ~ i ~ "].myParameter" (while looping through myArray).
    5. Add an option to exclude the chain from the BOM (using setProperty with PropertyType.EXCLUDE_FROM_BOM).
    6. Add a points manipulator for changing the insertion location of the sprocket query (by shuffling the sprocket array forward or backwards). This would make it easier to add new sprockets to different parts of the path. You could also use addDebugArrow to highlight the part of the chain that will get broken by the next sprocket addition.

    CS Student at UT Dallas
    Alex.Kempen@utdallas.edu
    Check out my FeatureScripts here:



  • imants_smidchensimants_smidchens Member Posts: 62 EDU
    @imants_smidchens

    A chain featurescript. Absolutely fantastic !

    Now the very first word for the title of this post is ACCURATE

    Well there’s a whole lot of real life situations where there’s sag — and not just sag at one point in a long multi cog circuitous loop

    so if you can show sag at multiple places within a loop — that would be great



    that's one heck of a visual! are you generating those curves parametrically? if so, would you mind sharing that document? i'd love to have this kind of sag implemented in the fs!
    one thing i'll probably need to text experimentally is the effect of running the sprockets on sag - in my mind i'm debating whether this would "tension" the chain backwards until it reaches the sprocket being driven, which would potentially only require one segment to sag. so many options! 
  • imants_smidchensimants_smidchens Member Posts: 62 EDU
    Looks nice! I personally spend a lot of time staring at FeatureScripts, so here's some things that I think might be worth modifying/implementing:
    1. Use sentence case for all UI (i.e. Linear pattern instead of Linear Pattern, Path inputs instead of Path Inputs). This will bring your feature in line with the Onshape standard for feature UI.
    2. Add UIHint.REMEMBER_PREVIOUS_VALUE wherever it makes sense - it can be especially nice for things like standard tables, so you don't have to click through the menu every time. You can also use UIHint.MATCH_LAST_ARRAY_ITEM for array parameters, rather than using the default value for every new item.
    4. Use verifyNonemptyQuery to throw errors when certain parameters aren't selected (i.e. no sprockets are selected or no edge is chosen). You can also use it on individual array parameters by using a parameter id like "myArray[" ~ i ~ "].myParameter" (while looping through myArray).
    5. Add an option to exclude the chain from the BOM (using setProperty with PropertyType.EXCLUDE_FROM_BOM).
    6. Add a points manipulator for changing the insertion location of the sprocket query (by shuffling the sprocket array forward or backwards). This would make it easier to add new sprockets to different parts of the path. You could also use addDebugArrow to highlight the part of the chain that will get broken by the next sprocket addition.

    Absolutely fantastic ideas! I will do my best to implement all of them :)
  • steve_shubinsteve_shubin Member Posts: 1,066 ✭✭✭✭
    @imants_smidchens

    There’s nothing fancy about this model. Here it is

    https://cad.onshape.com/documents/11ac04bc6765efb5395d06d2/w/434c81bdf9e27a46591dcd40/e/3bc1566b69d4c283c92090f2

    I used to take care of a car gate where one cog was roughly about 27 or 28 feet from another cog. So what you see here is more than realistic as far as SAG goes

    The motor was set back from the gate opening by somewhere around 32 or 33 feet—  maybe more than that. I’m just going off the top of my head. I believe that opening was a 26 foot opening

    Typically you would have the motor a lot closer to the opening but there was a particular reason why this one was set back so far

    Upon startup, the chain would flop around and it would confuse the control panel into thinking that it hit a car and so it would either stop or reverse. So you had to dial everything in, in a very particular manner. And we got it to work pretty doggone good. But the gate oscillated upon startup as the chain was flopping up and down. And then after a little while the flopping stopped and there was a nice smooth operation of the gate

    Anyway that motor gave out prematurely because of strain of that oscillation on the motor

    It would’ve been nice if there would’ve been an extremely soft start up to prevent the chain from flopping.

    The motor & control unit was made by a large company. But they just didn’t have that super soft start built into the control panel. I’m wondering if anybody ever got around to incorporating such a soft start into there controls. Some kind of potentiometer where I could have adjusted the rate at which it ramped up, would’ve been nice

    And there was not going to be any modification on my part, because I ain’t no electrical engineer — so I made do with what I had

    So if anybody ever does any kind of simulation — you’re gonna have to take into consideration the rate at which the motor starts up, and that long chain flopping around at some particular frequency most likely depending upon the length of the chain between cogs, and whatever other factors


  • steve_shubinsteve_shubin Member Posts: 1,066 ✭✭✭✭

    Both ends of the chain were hooked up to a particular corner of this gate that was maybe 29 feet wide.

    The loop or the total length of the chain was maybe as much as 75 foot long

    So in maintaining that whole mechanism, when you bought a chain to replace the old one, you bought a chain that was 100 foot long — of which a fairly good portion of, was going to be used to make one giant loop

    There were cogs mounted on a concrete masonry wall — that is, a concrete block wall. And there weren’t that many cogs mounted on that wall. Maybe two or three up high and maybe a couple down low. And one cog by the opening. And then of course, the cogs in the motor mechanism. So there was quite a distance in between some of those cogs

    Good thing for me was — there was a company that specialized in cogs and chain maybe a mile down the street. And they had all the proper equipment for me taking links on and off — so that was nice

    Funny thing is — I just happen to see those tools down in my basement the other day


  • imants_smidchensimants_smidchens Member Posts: 62 EDU
    @steve_shubin
    good to know!
    i doubt the scope of this FS branches into simulations (at least, not for the foreseeable future), but perhaps the best solution long term is to have sag along all the chain segments.
  • steve_shubinsteve_shubin Member Posts: 1,066 ✭✭✭✭
    … the best solution long term is to have sag along all the chain segments.
    Sounds like a good idea

  • michael_mcclainmichael_mcclain Member Posts: 198 PRO
    Hi @imants_smidchens, I just found this featurescript and it is EXACTLY what I need. Very good work!

    Can I ask you to add ANSI 35 roller chain to this feature? It's the size I currently need and would be very useful to have right now. Here is some info on it: https://www.mcmaster.com/6261K172-6261K291/

    Thanks in advance!
    Michael


  • shawn_crockershawn_crocker Member, OS Professional Posts: 798 PRO

    Funny thing is — I just happen to see those tools down in my basement the other day


    Oh those tools!  Always sneaking off behind a box when we need them most!  Tools have a funny way of presenting themselves after we have already made do without and butchered something.  I'm thinking wire strippers here.
  • antlu65antlu65 Member Posts: 55 EDU
    Hi Imants,
    Was just curious, are you still considering implementing chain sag?
  • steve_shubinsteve_shubin Member Posts: 1,066 ✭✭✭✭

    Funny thing is — I just happen to see those tools down in my basement the other day


    Oh those tools!  Always sneaking off behind a box when we need them most! 
    Yeah — ain’t that the truth


  • leecaseyleecasey Member Posts: 34 PRO
    edited November 2023
    Newbie question here... My sprockets are in an assembly, what's the best approach to attach the chain? Do I need to generate it separately in a part studio then assemble it to the sprockets? 

    EDIT... ah I've just realised I could do this by creating the part in context. Leaving this here for anyone else. 
Sign In or Register to comment.