Skip to content

Add PG (DIN 40430) thread profiles (#79) - #82

Open
viewinghood wants to merge 1 commit into
mwganson:masterfrom
viewinghood:feature/pg-threads-issue-79
Open

Add PG (DIN 40430) thread profiles (#79)#82
viewinghood wants to merge 1 commit into
mwganson:masterfrom
viewinghood:feature/pg-threads-issue-79

Conversation

@viewinghood

Copy link
Copy Markdown

Summary

  • Add PG (Panzergewinde / DIN 40430) 80° thread profile command with presets PG 7–PG 48, addressing Feature Request: PG threads #79
  • Add British Metrics PG chart link to Open Online Calculator
  • Bump version to 2.00 and document the new command in README

Notes

  • Profile follows the existing Bottle/Buttress pattern (custom radius sample arrays + presets)
  • External presets include 0.15 mm print clearance (same idea as bottle presets); minor diameter remains adjustable
  • Source dimensions from the British Metrics PG chart / Sealcon catalog referenced in Feature Request: PG threads #79

Test plan

  • Install/load workbench from this branch in FreeCAD
  • Create PG thread profile; default should be PG 13.5 External
  • Switch presets PG 7–PG 48 and verify Pitch / MinorDiameter update
  • Make Helix + Do Sweep for External and Internal
  • Open Online Calculator → PG chart opens British Metrics page
  • Confirm toolbar icon is present and distinct from Bottle (light blue)

Made with Cursor

Add an 80-degree PG profile command with presets PG7-PG48, toolbar icon, British Metrics chart link, and docs/version bump to 2.00.
@mwganson

Copy link
Copy Markdown
Owner

How did you generate the internal and external data?

@viewinghood

Copy link
Copy Markdown
Author

Hi Mark — thanks for the question :)

The PG internal_data / external_data arrays were generated analytically, in the same normalized ThreadProfile format as the existing V-thread tables (radial offset from the minor, pitch = 1, ~720 samples per turn).

Core geometry

  • DIN 40430 flank angle 80° → slope dx/dz = cot(40°)
  • Truncation height 0.48 x P, taken from published major/minor charts
    ((Major − Minor) / (2P) ≈ 0.48 from British Metrics + Sealcon)
  • Internal: flat root at 0, straight flanks, flat crest at 0.48
  • External: same flanks/crest, small root offset (−0.018), plus a 0.15 mm minor print clearance in the presets (same practical idea as the Bottle profiles)

So the flank samples are formula-driven, not hand-tuned. The only deliberate practical knobs are the flat truncation, the small external root offset, and the optional print clearance.

I also checked consistency: recomputed majors from Minor + 2 x 0.48 x P match the charts within ~0.015 mm. Details and plots are in the fork under _pg_validation_plots/ (report + a small script to regenerate the figures).
Attached is the comparison of the thread shapes...

Cheers,

Richard

01_profile_tables_compare

@viewinghood viewinghood reopened this Jul 30, 2026
@mwganson

Copy link
Copy Markdown
Owner

I generated a few test threads: PG7, PG9, PG21, and PG48. I created cross sections of these in Part workbench on the XZ plane. I downloaded the PG7 and PG9 reference threads from thingiverse. https://www.thingiverse.com/thing:3663884 and made cross sections of them with the Mesh workbench tool. I downloaded the PG48 and the PG21 reference threads from mcmaster-carr. https://www.mcmaster.com/7805K45/ (PG21) and https://www.mcmaster.com/3185K133/ (PG48).

Then I adjusted the placement to try to get these various cross sections aligned. The threads look reasonably close except for PG21, which appears to be significantly off. Note that the reference for this is an adapter that adapts standard M32 to PG21. The M32 I created in the workbench matches closely to the M32 in the reference.

The concern I had with adding this thread type is I didn't think it was
scalable. Some thread types actually use different formulations at different size ranges. I am attaching my FreeCAD file with only the cross sections.

In the image below the references are shown in red to distinguish them from the black, which are created with the WB.

Snip macro screenshot-5ea060

Github does not support .FCStd extension, so I renamed the file to a .zip extension. If you download it you just need to rename it back to .FCStd.

PG tests.zip
Snip macro screenshot-f2cf94

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