1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I have in mind to now look at creating a bolt/washer/washer/nut sub assembly

Discussion in 'Alibre Script' started by albie0803, Jun 12, 2019.

  1. Lew_Merrick

    Lew_Merrick Alibre Super User

    Andy -- If you know the "stack-up:" of the Parts being Assembled then figuring the Length of the Screw or Bolt needed to tie them tohether is trivial (if the Standards for Screw Lengths can be trusted).
     
  2. NateLiqGrav

    NateLiqGrav Alibre Super User

    the problem wasn't determining what lengths are standard. It was determining programmatically the "stack-up". And I mean without user entering a length or clicking a second face.
     
    Last edited: Jun 21, 2019
    oldfox and ajayre like this.
  3. NateLiqGrav

    NateLiqGrav Alibre Super User

    This would allow a script to be made that could automatically select fastener size and maybe thread.

    However it would still be useful to have the version I described that loops through faces and edges on "dumb solids" and I believe that could be made with the beta version.
     
  4. Lew_Merrick

    Lew_Merrick Alibre Super User

    Hi Nate -- As I create my "screw holes" at the Part level it is simple enough for me to find the "grip Length" mearly with a Measure Distance from the "start edge" to "finish edge" of my "stack up." Then it is merely an issue of calculating the "Washer" and "Nut" allowances (which does create its own "issues"). I have a (Libre Office Calc) spreadsheet posted in the Resource section that provides the (Maximum Material Condition) values for all Unified National washers. The same thing is true for my Library of "SAE Graded Hex and Jam Nuts. Would those values aid you?
     
  5. NateLiqGrav

    NateLiqGrav Alibre Super User

    I was taking enjoy eliminating this step by doing it programmatically. That is what would be difficult to impossible.
    Either way I don't plan to make this full tool at the moment. I will probably help with the algorithm to find where to place bolts.
     
  6. idslk

    idslk Alibre Super User

    +1
     
  7. oldfox

    oldfox Alibre Super User

    Needed Length not Standard Length

    What about NON-standard lengths? This thread was initially based on a script which specifically stated:
    NOTE: These are "eye candy" screws only. No threads and no standards

    If, down the line, a user desires to only use standard lengths, he has that option to modify as needed.
     
  8. Lew_Merrick

    Lew_Merrick Alibre Super User

    Oldfox -- From shortly after WWI until 1986 the United States of America had a rather impressive set of Fastener Standard Lengths that were defined in terms of a Screw's Major Diameter. When we ekiminated the National Bureau of Standards (in 1986) we established the "Industrial Decline" that has plagued America ever since. The National Bureau of Standards had an 8 paragraph Charter whereas the National Institute of SDtandard's Technology has an 850 page Charter -- and the only paragraph with an "active verb" is the one that states that they "shall protect intellectual property rights." Not a sentence about "promulgating," "promoting," "publoishing," or "enforcing" standards (the "gist" of Ben Franklin's Charter for the National Bureau of Standards.
     
  9. idslk

    idslk Alibre Super User

    Hello colleagues,
    as long as Nate is working on an intelligent algorithm, this part of a script could be an interim solution for selecting the desired screw...
    It is not completely filled with data (the used are from oldfox/albie0803, the others have only sample character), but it could be used in the main script with a little adjustment...
    In dependence of the choosen Size, it will change the available Standard Lengths.
    You can toogle between Standard Size list and User Length field input (including disableing the other)
    In dependence of the choosen HeadType it changes the available DriverTypes.
    It's only the menu for choosing screws! It does nothing else (except of printing what was choosen...)

    upload_2019-6-22_17-13-52.png upload_2019-6-22_17-14-29.png

    Regards
    Stefan
     

    Attached Files:

    Last edited: Jun 22, 2019
    oldfox likes this.
  10. oldfox

    oldfox Alibre Super User

    Stefan, with that qualification, I LIKE it.:D
     
  11. albie0803

    albie0803 Alibre Super User

    @idslk That's a great script but the problem that rears it's head is that the different types of fasteners don't have the same bolt lengths.
    SHCS start at M3 but G8.8 Hex bolts start at M8. Cheeseheads only go to M6. Slotted flat heads to M12, all according to the fastener catalogue I am referencing. I accept that these are only common ones and not an exhaustive list.

    In light of this, I think that letting the designer look up the available lengths for the type and class/grade of bolt they intend to use is an easier option.

    As I have built a menu to offer the option of washer/washer/nut as well as a bolt, I have added a window with the width of a washer/nut combo in the size selected to help the user choose a bolt long enough if the last 2 options are selected.

    Anyway, I'm happy with it and here it is. It expects to be run inside an assembly as it is building a sub assembly for your convenience.

    Note: The final edit has been done with Beta 2019 so I hope it works for anyone wanting to try it out and I apologise if having done so causes it fail.
     

    Attached Files:

    Last edited: Jun 23, 2019
  12. idslk

    idslk Alibre Super User

    Hello albie0803,

    as said, it's not filled with complete and right data and (more important) it's made for showing up how to arrange inputs and change eg. lists automatically according to other inputs.
    If someone wants to, the dependencies can be widened up. So it's possible to create data tables (also in a spreadsheet!) and set up the input datas for the script. I think that's a part for someone who likes manually typing telephone books... ;-)
    I'll gone try your script as soon as the final 2019 is available.

    Regards
    Stefan
     
  13. idslk

    idslk Alibre Super User

    Hello albie0803,

    i couldn't resist to play with the script...
    I've modified the face and edge selection (and i've changed some default values so i don't have to type them during testing...)
    The script should be included in the assembly (never tried this... ;-)
    The script is here at my side able to run on 2018!
    If it runs on 2018(AlibreScriptVersion 1080)it adds an additional list to the Constraint window, runing on other versions it does not call this list.
    Haven't tried this with other assemblies - may you can try...

    upload_2019-6-23_13-33-41.png upload_2019-6-23_13-34-30.png

    Regards
    Stefan
     

    Attached Files:

  14. idslk

    idslk Alibre Super User

    Hello colleagues, Hello albie0803,

    i have very roughly added a second length list for the screw menu.
    This ia only to show what i meant...
    If you choose FlatHead your available Standart Lenghts List will change...
    So if needed someone can add the rest ;-)
    upload_2019-6-23_15-35-58.png upload_2019-6-23_15-36-21.png
    Regards
    Stefan
     

    Attached Files:

  15. oldfox

    oldfox Alibre Super User

    @albie0803

    You have listed "AcrossFlats" and AcrossCorners" twice in the data table. They should be changed to something like "NutAcrossFlats" and
    "HexheadAcrossFlats". AcrossCorners also.
     
  16. albie0803

    albie0803 Alibre Super User

    @oldfox I have corrected this by adding Nut to the nut ones. Thanks for picking that up.

    @idslk I have been working to incorporate your menu system and length lists and adding sizes from the fastener catalogue I have here. At the moment you are differentiating by head type but "flat" has 2 sub types each with their own set of lengths. I think I will try and change the head types from flat to C/Sunk-Slotted and C/Sunk-Socket and get rid of the drive type option.
     
    oldfox likes this.
  17. idslk

    idslk Alibre Super User

    @albie0803,

    if you give my an overview of dependencies, ofcourse i will update the menu structure.
    If you can live with choosing Face and Edge as the first opperation (added to the "big" menu), i will try to add a thing which will propose you an screw diameter regarding to your Edge/Hole to make your decision easier...
    Can you test with the "Rohr_mit_Flanschen" if the DistanceTo() for the "gap between washers" works in 2019?

    Regards
    Stefan
     
  18. albie0803

    albie0803 Alibre Super User

    @idslk I use DistanceTo() in my keyway script and it is working again Yay!

    I have tried it in the script but I don't know if it works with faces in an assembly. I used your flanges and picked the faces where the washers sit and got a result of 0 as they listed as the same face. I don't know if you can do

    Code:
    gap = part1.face.DistanceTo(part2.face)
    which is what we need.

    Choosing face and edge first is not an issue. If we can get DistanceTo() working then we could go

    upload_2019-6-25_13-34-37.png
    with the Nut Side face box greying out if the nut and nut-washer are not selected.

    There is also the issue of whether the hole you are sizing to is a clearance or tapped hole, though I suppose we could have a checkbox for tapped. Logic being if its a clearance hole, pick the size below it and if its a tapped hole, pick the size above it.

    As far as dependencies go, I think we can do away with the driver types as I am planning to use the 2 flat head types.
     
    Last edited: Jun 25, 2019
  19. idslk

    idslk Alibre Super User

    Hello albie0803,

    thank you for testing.:)
    :(
    that's the same result as here in 2018.2 so i think it's up to @ajayre to look at it, because the manual measuring tool gives the correct value...
    Regarding dependencies and use sequence i will think about, if i have one i will post it...:)
    Eg. It might be interesting if a screw already exists...in a list (screw.user.data?) and so on...
    In expectation of DistanceTo() a "Select nutside face or bore ground" input will also be ok. You will have the length (distance + washer) for the tapped one and the length (distance + 1 or 2 washer/s + nut + overlap) vor the clamping one.

    Regards
    Stefan
     
  20. albie0803

    albie0803 Alibre Super User

    @idslk I would like to take up your offer on revamping the menu.

    Here are the possibilities:

    If someone can get the DistanceTo() to work how we want it then this is what I want, with the last box disabled if only Bolt/Washer is chosen.
    upload_2019-6-27_20-9-0.png

    Otherwise I want this for a Bolt/Washer/Washer/Nut option
    upload_2019-6-27_20-14-16.png

    This for a Bolt/Washer/Nut option
    upload_2019-6-27_20-15-6.png

    and again the last box disabled if only Bolt/Washer is chosen.

    I've had a go at adjusting your menu code but I really don't know what I am doing. o_O
     

Share This Page