WIP: Fix for #1: Countersink Head angle vs nominal size #12
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "sw-tya/add_mesh_BoltFactory:swtya_CounterSinkHead"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Here is my attempt at a fix to bring the contersink head modelling closer to the ISO specification with respect to the head angle.
@ -793,0 +792,4 @@
# Between 20 and 22mm the head angle changes.
# Note, this is not suitable for cheating a rivet - due to a different angle, see ISO 1051.
# The input arg of HEIGHT is not passed from the GUI, it must be created here:
if SHANK_DIA < 21:
I certainly applaud your research and initiative, but my concern is “the best thing about standards is there are so many to choose from.” Would there be a reason this couldn’t be an additional parameter in the GUI? I would love if the default value changed according to the shank diameter, but based on my own previous experimentation, I expect this may be a taller order. I expect other standards bodies will declare other counter sink angles in their own ecosystems parameterized off other cutoff values.
Yep, I hear what you are saying....
Indeed that wold be best. Having had a look this it will touch some of the same lines already touched in #10 & #11. To do a complete job the new angle should make it into the presets too.
How would I do it:
3a) Make new property appear in the GUI draw() function adding "col.prop(self, 'bf_CounterSink_Head_Angle')"
I understand GIT can manage this, but can I....
Less scary to wait until those other changes are on main. Then I can "rebase main" to avoid conflicts.
@linux_dr Did yo find this documentation page?: https://docs.blender.org/api/current/bpy.props.html
Yes… your game-plan above looks good… the big gotcha that I was fighting with is how to add transient state that the GUI builder can access but not display… (i .e. was the counter sink bevel a default angle the last time the GUI was rebuilt, so you can update the default based on the shank diameter). As far as a reasonable (if slightly extreme) range, perhaps a range of 30°-75° makes sense?
If you’re in a hurry, you could simply branch off
swtya_combinedFixes_PR10_and_PR11
(git checkout swtya_combinedFixes_PR10_and_PR11 ;git checkout -b {new_branch_name_here}
), and cherry-pick your commits ontomain
when the other changes are merged, but, given your lack of familiarity withgit
it’s likely a better idea to wait for @nickberckley to merge #10 and #11 first.I made changes and tried to update this but can't:
/add_mesh_BoltFactory$ git push me swtya_CounterSinkHead
To projects.blender.org:sw-tya/add_mesh_BoltFactory.git
! [rejected] swtya_CounterSinkHead -> swtya_CounterSinkHead (non-fast-forward)
error: failed to push some refs to 'projects.blender.org:sw-tya/add_mesh_BoltFactory.git'
I've tried the command lines above. That asked me for a password which did not work = Authentication failure.
My new changes conflict with lines of my first attempt, so I resolved those too.
So far longer trying random command lines with git than editing the code.
I've now deleted all my git files (kept a backup)
With a newly created branch using: git fetch me swtya_CounterSinkHead:swtya_CounterSinkHead
Do I put my changes straight in or rebase to head of main first?
I suspect when you
git pull
ed The updatedmain
branch, this did an implicit “rebase” of your branch, which git considers “rewriting history” and an “unsafe operation”. When you attempted to push your updated branch, the system noticed the conflicting histories and rejected the change. Typically adding-f
or--force
to your push command should override this safeguard. Unless the repository is specifically configured to block forced pushes, this should be a safeguard only and not a permissions issue.I hope that helps.
Updated: iPhone’s keyboard tries very hard to prevent you from typing double hyphen… so the original version of this response had a wide-hyphen by mistake.
Thanks it did help.
From my clean start I was able to first do
git merge origin/main
then reinstate my edits before doing thegit commit -a -m "Fix for #1: Countersink Head angle via GUI"
git push me swtya_CounterSinkHead
Which this time worked as I expected.
Having the intermediate commit I was not expecting.
As you will see from the code I elected not to try and be cleaver and make the angle auto update. It would probably be annoying depending on the order of data entry. I had started with the IntProperty, but changed to FloatProperty so that it could accept the unit type of rotation. The base blender unit is radians, which you will see in the preset file and maths of the head.
Again thank you for the patience while I learn git.
WIP: Fix for #1: Contersink Head angle vs nominal sizeto WIP: Fix for #1: Countersink Head angle vs nominal sizebtw if something is ready to be merged tag me as reviewer so I get notified
Hi @nickberckley , I have completed the coding & believe it to be correct and functional.
It would be great to have a review before I ask for it merged in - hence the WIP.
Thanks
Checkout
From your project repository, check out a new branch and test the changes.