WIP: Fix for #6: Incorrect bolt lengths #13

Draft
sw-tya wants to merge 2 commits from sw-tya/add_mesh_BoltFactory:swtya_BoltLength into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
First-time contributor

Fix for, Incorrect bolt sizes BoltFactory add-on #6
Since the first submission, the original code base always skipped 2 turns in the thread start, this is addressed.
The solution adds back a small bit of shank to account for up to 1 revolution of thread that is missed due to integer revolutions.
Note, minimum length is 5 turns, no change there.

Fix for, Incorrect bolt sizes BoltFactory add-on #6 Since the first submission, the original code base always skipped 2 turns in the thread start, this is addressed. The solution adds back a small bit of shank to account for up to 1 revolution of thread that is missed due to integer revolutions. Note, minimum length is 5 turns, no change there.
sw-tya added 1 commit 2024-08-20 01:36:42 +02:00
Contributor

I will review this when I can, but I still wanted to thank you for your contributions! 🎉

I will review this when I can, but I still wanted to thank you for your contributions! 🎉
Author
First-time contributor

Minor wrinkle with further testing:
For head types that have either a bevel or radius on the underside their reported head height causes the washer face not to be at z=zero once complete. This in turn means that my calculated "thread" length is not correct due to already having some shank allocated in the head.

In def Bolt_Mesh() before Create_External_Thread() will be the place that a correction is required. I wonder if this is in part when there are global variables around for the Head_Height which are not used?

Personally I think what is here is much better than before - I'll have a few days of thinking...

Minor wrinkle with further testing: For head types that have either a bevel or radius on the underside their reported head height causes the washer face not to be at z=zero once complete. This in turn means that my calculated "thread" length is not correct due to already having some shank allocated in the head. In def Bolt_Mesh() before Create_External_Thread() will be the place that a correction is required. I wonder if this is in part when there are global variables around for the Head_Height which are not used? Personally I think what is here is much better than before - I'll have a few days of thinking...
sw-tya force-pushed swtya_BoltLength from da23330d34 to 4718b93051 2024-08-27 15:45:01 +02:00 Compare
Author
First-time contributor

Second commit here makes modification to the head generation, by adding an additional return variable.
The washer face does not now move when changing between head types.

After editing the file I did:

$ git commit -a -m "Fix for #6: Incorrect bolt lengths with head tweak"
[swtya_BoltLength 4718b93] Fix for #6: Incorrect bolt lengths with head tweak
 1 file changed, 29 insertions(+), 11 deletions(-)

$ git push me swtya_BoltLength
To projects.blender.org:sw-tya/add_mesh_BoltFactory.git
 ! [rejected]        swtya_BoltLength -> swtya_BoltLength (non-fast-forward)
error: failed to push some refs to 'projects.blender.org:sw-tya/add_mesh_BoltFactory.git'

I then messed around for a bit pulling and merging, but everything was up to date. so finally I did:

$ git push -f  me swtya_BoltLength
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 4 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 1.99 KiB | 291.00 KiB/s, done.
Total 8 (delta 6), reused 0 (delta 0), pack-reused 0
remote: 
remote: Visit the existing pull request:
remote:   https://projects.blender.org/extensions/add_mesh_BoltFactory/pulls/13
remote: 
remote: . Processing 1 references
remote: Processed 1 references in total
To projects.blender.org:sw-tya/add_mesh_BoltFactory.git
 + da23330...4718b93 swtya_BoltLength -> swtya_BoltLength (forced update)

From the files changed view it seems to have only put in what I wanted to.
I'm unclear what I should have done to avoid the force???

Second commit here makes modification to the head generation, by adding an additional return variable. The washer face does not now move when changing between head types. After editing the file I did: ``` $ git commit -a -m "Fix for #6: Incorrect bolt lengths with head tweak" [swtya_BoltLength 4718b93] Fix for #6: Incorrect bolt lengths with head tweak 1 file changed, 29 insertions(+), 11 deletions(-) $ git push me swtya_BoltLength To projects.blender.org:sw-tya/add_mesh_BoltFactory.git ! [rejected] swtya_BoltLength -> swtya_BoltLength (non-fast-forward) error: failed to push some refs to 'projects.blender.org:sw-tya/add_mesh_BoltFactory.git' ``` I then messed around for a bit pulling and merging, but everything was up to date. so finally I did: ``` $ git push -f me swtya_BoltLength Enumerating objects: 11, done. Counting objects: 100% (11/11), done. Delta compression using up to 4 threads Compressing objects: 100% (8/8), done. Writing objects: 100% (8/8), 1.99 KiB | 291.00 KiB/s, done. Total 8 (delta 6), reused 0 (delta 0), pack-reused 0 remote: remote: Visit the existing pull request: remote: https://projects.blender.org/extensions/add_mesh_BoltFactory/pulls/13 remote: remote: . Processing 1 references remote: Processed 1 references in total To projects.blender.org:sw-tya/add_mesh_BoltFactory.git + da23330...4718b93 swtya_BoltLength -> swtya_BoltLength (forced update) ``` From the files changed view it seems to have only put in what I wanted to. I'm unclear what I should have done to avoid the force???
This pull request is marked as a work in progress.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u swtya_BoltLength:sw-tya-swtya_BoltLength
git checkout sw-tya-swtya_BoltLength
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: extensions/add_mesh_BoltFactory#13
No description provided.