Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add threads for PG electrical thread #90

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

polyfloyd
Copy link

@polyfloyd polyfloyd commented Jul 26, 2024

This patch adds support for PG-standard threads used in electrical boxes.

I based the specs on these images:

pg-electrical-thread-80-degree

pg

Tested with the internal thread of a PG16 socket as that is all I have

@adrianschlatter
Copy link
Owner

Hi polyfloyd. Thanks for your contribution! It looks fairly complete. I am currently abroad without access to a computer having OpenSCAD until next week. I‘ll have a closer look at it when I‘m back.

@adrianschlatter
Copy link
Owner

Ok, I did some tests today. Starting with tests/test.scad.

Rendering as is (type = "M12x0.5"), I get 3 volumes (the nut, the bolt, the surrounding space):

Screenshot 2024-08-19 at 14 48 36

Using type = "PG16" instead, we get 34 volumes. That does not sound right. Also, we get this "may need repair" warning. This could be related to an "inside is outside" problem because of the order the profile is designed. I'm sure this is fixable.

Screenshot 2024-08-19 at 14 50 03

I'm more worried about the missing gap between internal and external thread. Looking at the specs you posted above, I actually cannot see how large it is supposed to be. But without such a gap, the external- and internal threads will lock (except in lucky cases, where the external thread is a bit larger than it should and the internal one is a bit smaller).

Do you have more specs available than posted above? Usually, threads specify "classes" where they define those gaps (higher class => smaller production tolerances => smaller gaps).

@polyfloyd
Copy link
Author

There is indeed an issue with the volumes. I tried to find out why this is but I could not :(

The issue seems to occur with outer thread when rendering a bolt. The commit I pushed seemed to at least render slightly better but it is still problematic.

I looked around and found another dimensions table that has this footer:
image
Those are probably the tolerances for the threads.

I am in doubt as to whether the inner thread is being produced correctly, as it now seems to overlap with the outer thread. Will look again when I have some more time...

@adrianschlatter
Copy link
Owner

Volumes seem correct, now. PG16 bolt alone => 2 volumes. PG16 nut => 2 volumes. Nut + bolt, also 2 volumes. The last one is not what we want (3). But this is because of the missing gap. There is still the warning, though (in all three cases). I can't see why.

Regarding clearance drill: That's for a hole without threads where the bolt fits through.

@polyfloyd
Copy link
Author

Alright! Not sure what went wrong the first time and how I ended up with working thread anyway.

I have started reasoning about the calculation from scratch and have it working now :) Inner and outer threads look like the schematic and there is a little gap in between the nut and bolt.

thread

@adrianschlatter
Copy link
Owner

Picture looks correct, now, nice. How did you define the gap?

@polyfloyd
Copy link
Author

The gap is based on the r parameter from the diagram. The internal and external threads both respectively add and substract r/2 from the diameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants