Open greyltc opened 2 years ago
Agreed, this is some essential functionality I'd love to see! It's relatively easy to get this done with nuts, but strugling a bit to get it working with screw heads. I think it'd involve messing around withe the countersink_profile functionality which I do not yet understand.
For nuts, adding a variable to the _fastenerHole function (which I'm calling countersinkDepth
) and changing:
head_offset = countersink_profile.vertices(">Z").val().Z
to
head_offset = countersinkDepth if countersinkDepth else countersink_profile.vertices(">Z").val().Z
Still need to test a bunch of cases for compatibility, but I think this commit adds functionality that should cover most cases for variable depth countersinking.
Just add countersinkDepth=___
to your clearanceHole()
or fastenerHole()
function to set a variable depth.
Today,
clearanceHole()
withcounterSunk=True
puts the top of the fastener exactly at the workplane andcounterSunk=False
puts the bottom of the fastener's head at the workplane.It would be a neat addition if the counterSunk keyword could take a float as well to allow some more control over the precise Z position of the fastener (along with correct cutting of the work piece), with
counterSunk=0
being the same as False andcounterSunk=fastener.head_height
being the same as True.As it it now, achieving an "over countersunk" screw hole like this is a bit tricky to achieve:![image](https://user-images.githubusercontent.com/16778174/172052097-ee7f4d00-ee3a-4c1e-a397-3659cd9e4230.png)