diff --git a/.gitignore b/.gitignore
index 379d7b9..8d6f474 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
*.pyc
+*.bak
.vs/
-.idea/
\ No newline at end of file
+.idea/
diff --git a/InitGui.py b/InitGui.py
index c2b9bd8..baa939a 100644
--- a/InitGui.py
+++ b/InitGui.py
@@ -59,6 +59,7 @@ def Initialize(self):
"This function is executed when FreeCAD starts"
import ThreadProfileCmd #needed files for FreeCAD commands
self.list = ["ThreadProfileCreateObject", "ThreadProfileCreateButtressObject", "ThreadProfileCreateBottleObject",
+ "ThreadProfileCreatePGObject",
"ThreadProfileMakeHelix", "ThreadProfileDoSweep", "ThreadProfileOpenOnlineCalculator",
"ThreadProfileSettings"] # A list of command names created in the line above
self.appendToolbar("ThreadProfile Commands",self.list[:-1]) # leave settings off toolbar
diff --git a/README.md b/README.md
index 25037a7..551447b 100644
--- a/README.md
+++ b/README.md
@@ -42,6 +42,10 @@ There are other diameter / pitch combinations in the standard than are provided
This creates a bottle thread object (SP4xx M type) 45 degree / 10 degree buttress thread.
+## Create PG thread profile Command
+
+This creates a PG (Panzergewinde / DIN 40430) thread profile with an 80 degree included angle. Presets cover common sizes from PG 7 to PG 48. Dimensions are based on published PG charts (see the British Metrics PG chart linked from the Open Online Calculator command). External presets include a small print clearance (0.15 mm) similar to the bottle thread presets; adjust the minor diameter if you need a tighter or looser fit.
+
## Make Helix Command
The Make Helix command creates a Helix and sets its Pitch property to match the Pitch property of the ThreadProfile object. This property is linked parametrically, thus any change to the ThreadProfile.Pitch property will also cause the Helix.Pitch property to update itself. We also set the Helix.Height property to ThreadProfile.Pitch * ThreadProfile.ThreadCount, thus ensuring the Helix.Height property is such that the thread produced in the sweep will have Thread Count threads. This is also parametrically linked. As of v1.70 the helix will be attached to the object the thread profile is attached to via expressions. That way if you attach the thread profile to something else after creating the helix the helix will also attach itself to the same object in the same map mode.
@@ -59,7 +63,7 @@ Be wary of coplanar issues when cutting internal threads out of existing materia
## Open Online Calculator Command
-Opens on online calculator for the metric sizes or for the ANSI UN and UNR inch sizes or for the ANSI Buttress sizes in the default browser. It is possible (I think) that FreeCAD might not have permission to do this. If so, then it will likely fail. Use the calculator to get the minor diameter for the thread you wish to make. For inch sizes, the 2A and 2B tolerances are for the normal fit. For Buttress threads class 2 is normal, class 3 is tighter fit. For metric size v threads the 6g tolerance is for normal fit. Typically there will be 2 minor diameters to select from: a minimum and a maximum. If you make the internal thread a little bit smaller the fit will be tighter. If you make the external thread a little bit smaller the fit will be looser. A good way to check the fit is to make the nut and the screw at the same time, then use the Part workbench cross-section tool to check the fit.
+Opens an online calculator for the metric sizes, ANSI UN and UNR inch sizes, ANSI Buttress sizes, or the PG (DIN 40430) thread chart (British Metrics) in the default browser. It is possible (I think) that FreeCAD might not have permission to do this. If so, then it will likely fail. Use the calculator to get the minor diameter for the thread you wish to make. For inch sizes, the 2A and 2B tolerances are for the normal fit. For Buttress threads class 2 is normal, class 3 is tighter fit. For metric size v threads the 6g tolerance is for normal fit. Typically there will be 2 minor diameters to select from: a minimum and a maximum. If you make the internal thread a little bit smaller the fit will be tighter. If you make the external thread a little bit smaller the fit will be looser. A good way to check the fit is to make the nut and the screw at the same time, then use the Part workbench cross-section tool to check the fit.
## Parameterization Property
This property can change the shape of the threadprofile object. If you are not satisfied with the looks of the threads when viewed up close after zooming in, you can try modifying this property to see what difference it makes. Default is 1.0. It's value can range from 0.0 to 1.0.
@@ -77,7 +81,7 @@ This sets the ViewObject.Deviation property of the Body if in Part Design or the
This is the pitch for the thread. You also need to set this in the Helix Pitch property. If you wish to make ANSI threads, such as 1/4-20, for example, you would set this value to 25.4/20 if you are in mm units or 1/20 if you are using inch units. I keep FreeCAD in mm units, so I would use 25.4/20 for the Pitch for that thread.
## Minor Diameter
-This is the minor diameter of your thread. This is *NOT* the nominal diameter. You need to look this value up and use the one for your desired nominal diameter, pitch, and fit tolerance. Here are links to online calculators for Unified Inch Screwthreads, Metric, and for ANSI Buttress
+This is the minor diameter of your thread. This is *NOT* the nominal diameter. You need to look this value up and use the one for your desired nominal diameter, pitch, and fit tolerance. Here are links to online calculators for Unified Inch Screwthreads, Metric, ANSI Buttress, and the PG (DIN 40430) chart
## Continuity
What is this? This is a property of the underlying BSpline object. This is readonly and is only included for informational purposes. Normally, this should be C2 continuity. You can read more about smoothness here.
@@ -128,6 +132,9 @@ The internal_data and external_data list properties define the radius of the Thr
#### Release notes:
+* 2026.07.28 (version 2.00)
+* Add PG (Panzergewinde / DIN 40430) 80 degree thread profile presets (PG 7 to PG 48), addresses issue #79
+* Add British Metrics PG chart link to Open Online Calculator
* 2026.05.25 (version 1.99)
* fix headless import (thanks to SebKuzminsky)
* 2025.12.04 (version 1.98)
diff --git a/Resources/icons/CreatePGObject.svg b/Resources/icons/CreatePGObject.svg
new file mode 100644
index 0000000..e85f9b5
--- /dev/null
+++ b/Resources/icons/CreatePGObject.svg
@@ -0,0 +1,77 @@
+
+
+
+
diff --git a/ThreadProfileCmd.py b/ThreadProfileCmd.py
index acb49f2..c755d55 100644
--- a/ThreadProfileCmd.py
+++ b/ThreadProfileCmd.py
@@ -29,13 +29,13 @@
__title__ = "ThreadProfile"
__author__ = "Mark Ganson "
__url__ = "https://github.com/mwganson/ThreadProfile"
-__date__ = "2026.05.25"
-__version__ = "1.99"
+__date__ = "2026.07.28"
+__version__ = "2.00"
from fractions import Fraction
from numbers import Rational
-version = 1.99
+version = 2.00
import FreeCAD, FreeCADGui, Part, os
from PySide import QtCore, QtGui
@@ -579,7 +579,7 @@ def GetResources(self):
def Activated(self):
import webbrowser
- items = ["Open online metric calculator", "Open online unified inch calculator", "Open online ANSI buttress thread calculator","Cancel"]
+ items = ["Open online metric calculator", "Open online unified inch calculator", "Open online ANSI buttress thread calculator", "Open PG (DIN 40430) thread chart (British Metrics)", "Cancel"]
window = QtGui.QApplication.activeWindow()
item,ok = QtGui.QInputDialog.getItem(window,'ThreadProfile','Open online calculator in default browser?',items,0,False)
if ok and item == items[0]:
@@ -588,6 +588,8 @@ def Activated(self):
webbrowser.open('https://amesweb.info/Screws/AsmeUnifiedInchScrewThread.aspx')
elif ok and item == items[2]:
webbrowser.open('https://amesweb.info/Screws/ButtressInchScrewThreads.aspx')
+ elif ok and item == items[3]:
+ webbrowser.open('https://www.britishmetrics.com/images/pdf/technical/pgstd_4.htm')
return
@@ -1415,6 +1417,96 @@ def cd(txt, minor, major, tpi): #cd = calculate diameters
#Gui.addCommand("ThreadProfileCreateBottleObject", ThreadProfileCreateBottleObjectCommandClass())
####################################################################################
+
+####################################################################################
+# Create the PG (Panzergewinde / DIN 40430) 80 degree thread profile object
+
+class ThreadProfileCreatePGObjectCommandClass(ThreadProfileCreateObjectCommandClass):
+ """Create PG (Panzergewinde) thread profile command"""
+
+ def GetResources(self):
+ return {'Pixmap' : os.path.join( iconPath , 'CreatePGObject.svg') ,
+ 'MenuText': "&Create PG thread profile" ,
+ 'ToolTip' : "Create DIN 40430 Panzergewinde (PG) 80 degree ThreadProfile object"}
+
+ def Activated(self):
+ doc = FreeCAD.ActiveDocument
+ doc.openTransaction("Create PG ThreadProfile")
+ try:
+ self.makePGThreadProfile()
+ except Exception as e:
+ FreeCAD.Console.PrintError(
+ "ThreadProfile Error: Exception creating PG thread profile object.\n\n" +
+ '\n'.join(traceback.format_exception(e)) + "\n"
+ )
+ QtGui.QApplication.restoreOverrideCursor()
+ doc.commitTransaction()
+ doc.recompute()
+ return
+
+ def IsActive(self):
+ if not FreeCAD.ActiveDocument:
+ return False
+ return True
+
+ def getHelp(self):
+ return ["Created with ThreadProfile (v"+str(version)+") workbench.",
+ "This is a PG (DIN 40430) 80 degree thread profile",
+ "for sweeping along a helix in either the",
+ "Part or Part Design workbench.",
+ "installation of the ThreadProfile workbench is required.",
+]
+
+ def makePGThreadProfile(self):
+ # Preset format: [name, pitch, external_minor, internal_minor]
+ # Sources: British Metrics PG chart + Sealcon catalog (major/pitch).
+ # Profile: pitch=1, 80 deg included angle, trunc. height 0.48.
+ # print_clearance: external slightly smaller for 3D-print fit (cf. Bottle).
+
+ def pg(txt, major_ext, minor_int, tpi, print_clearance=0.15):
+ pitch = 25.4 / float(tpi)
+ internal_minor = float(minor_int)
+ external_minor = float(minor_int) - float(print_clearance)
+ return [txt, pitch, external_minor, internal_minor]
+
+ pg_presets_data = [
+ ["PG presets", 0, 0, 0],
+ pg("PG 7", 12.50, 11.28, 20),
+ pg("PG 9", 15.20, 13.86, 18),
+ pg("PG 11", 18.60, 17.26, 18),
+ pg("PG 13.5", 20.40, 19.06, 18),
+ pg("PG 16", 22.50, 21.16, 18),
+ pg("PG 21", 28.30, 26.78, 16),
+ pg("PG 29", 37.00, 35.48, 16),
+ pg("PG 36", 47.00, 45.48, 16),
+ pg("PG 42", 54.00, 52.48, 16),
+ pg("PG 48", 59.30, 57.78, 16),
+ ]
+
+ internal_pg_data = [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.001643349639,0.003298562962,0.004953776285,0.006608989608,0.008264202931,0.009919416255,0.011574629578,0.013229842901,0.014885056224,0.016540269547,0.01819548287,0.019850696193,0.021505909516,0.023161122839,0.024816336162,0.026471549485,0.028126762808,0.029781976131,0.031437189454,0.033092402777,0.0347476161,0.036402829423,0.038058042746,0.039713256069,0.041368469392,0.043023682715,0.044678896039,0.046334109362,0.047989322685,0.049644536008,0.051299749331,0.052954962654,0.054610175977,0.0562653893,0.057920602623,0.059575815946,0.061231029269,0.062886242592,0.064541455915,0.066196669238,0.067851882561,0.069507095884,0.071162309207,0.07281752253,0.074472735853,0.076127949176,0.077783162499,0.079438375823,0.081093589146,0.082748802469,0.084404015792,0.086059229115,0.087714442438,0.089369655761,0.091024869084,0.092680082407,0.09433529573,0.095990509053,0.097645722376,0.099300935699,0.100956149022,0.102611362345,0.104266575668,0.105921788991,0.107577002314,0.109232215637,0.11088742896,0.112542642283,0.114197855606,0.11585306893,0.117508282253,0.119163495576,0.120818708899,0.122473922222,0.124129135545,0.125784348868,0.127439562191,0.129094775514,0.130749988837,0.13240520216,0.134060415483,0.135715628806,0.137370842129,0.139026055452,0.140681268775,0.142336482098,0.143991695421,0.145646908744,0.147302122067,0.14895733539,0.150612548714,0.152267762037,0.15392297536,0.155578188683,0.157233402006,0.158888615329,0.160543828652,0.162199041975,0.163854255298,0.165509468621,0.167164681944,0.168819895267,0.17047510859,0.172130321913,0.173785535236,0.175440748559,0.177095961882,0.178751175205,0.180406388528,0.182061601851,0.183716815174,0.185372028498,0.187027241821,0.188682455144,0.190337668467,0.19199288179,0.193648095113,0.195303308436,0.196958521759,0.198613735082,0.200268948405,0.201924161728,0.203579375051,0.205234588374,0.206889801697,0.20854501502,0.210200228343,0.211855441666,0.213510654989,0.215165868312,0.216821081635,0.218476294958,0.220131508282,0.221786721605,0.223441934928,0.225097148251,0.226752361574,0.228407574897,0.23006278822,0.231718001543,0.233373214866,0.235028428189,0.236683641512,0.238338854835,0.239994068158,0.241649281481,0.243304494804,0.244959708127,0.24661492145,0.248270134773,0.249925348096,0.251580561419,0.253235774742,0.254890988066,0.256546201389,0.258201414712,0.259856628035,0.261511841358,0.263167054681,0.264822268004,0.266477481327,0.26813269465,0.269787907973,0.271443121296,0.273098334619,0.274753547942,0.276408761265,0.278063974588,0.279719187911,0.281374401234,0.283029614557,0.28468482788,0.286340041203,0.287995254526,0.28965046785,0.291305681173,0.292960894496,0.294616107819,0.296271321142,0.297926534465,0.299581747788,0.301236961111,0.302892174434,0.304547387757,0.30620260108,0.307857814403,0.309513027726,0.311168241049,0.312823454372,0.314478667695,0.316133881018,0.317789094341,0.319444307664,0.321099520987,0.32275473431,0.324409947634,0.326065160957,0.32772037428,0.329375587603,0.331030800926,0.332686014249,0.334341227572,0.335996440895,0.337651654218,0.339306867541,0.340962080864,0.342617294187,0.34427250751,0.345927720833,0.347582934156,0.349238147479,0.350893360802,0.352548574125,0.354203787448,0.355859000771,0.357514214094,0.359169427418,0.360824640741,0.362479854064,0.364135067387,0.36579028071,0.367445494033,0.369100707356,0.370755920679,0.372411134002,0.374066347325,0.375721560648,0.377376773971,0.379031987294,0.380687200617,0.38234241394,0.383997627263,0.385652840586,0.387308053909,0.388963267232,0.390618480555,0.392273693878,0.393928907202,0.395584120525,0.397239333848,0.398894547171,0.400549760494,0.402204973817,0.40386018714,0.405515400463,0.407170613786,0.408825827109,0.410481040432,0.412136253755,0.413791467078,0.415446680401,0.417101893724,0.418757107047,0.42041232037,0.422067533693,0.423722747016,0.425377960339,0.427033173662,0.428688386986,0.430343600309,0.431998813632,0.433654026955,0.435309240278,0.436964453601,0.438619666924,0.440274880247,0.44193009357,0.443585306893,0.445240520216,0.446895733539,0.448550946862,0.450206160185,0.451861373508,0.453516586831,0.455171800154,0.456827013477,0.4584822268,0.460137440123,0.461792653446,0.46344786677,0.465103080093,0.466758293416,0.468413506739,0.470068720062,0.471723933385,0.473379146708,0.475034360031,0.476689573354,0.478344786677,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.478356650361,0.476701437038,0.475046223715,0.473391010392,0.471735797069,0.470080583745,0.468425370422,0.466770157099,0.465114943776,0.463459730453,0.46180451713,0.460149303807,0.458494090484,0.456838877161,0.455183663838,0.453528450515,0.451873237192,0.450218023869,0.448562810546,0.446907597223,0.4452523839,0.443597170577,0.441941957254,0.440286743931,0.438631530608,0.436976317285,0.435321103961,0.433665890638,0.432010677315,0.430355463992,0.428700250669,0.427045037346,0.425389824023,0.4237346107,0.422079397377,0.420424184054,0.418768970731,0.417113757408,0.415458544085,0.413803330762,0.412148117439,0.410492904116,0.408837690793,0.40718247747,0.405527264147,0.403872050824,0.402216837501,0.400561624177,0.398906410854,0.397251197531,0.395595984208,0.393940770885,0.392285557562,0.390630344239,0.388975130916,0.387319917593,0.38566470427,0.384009490947,0.382354277624,0.380699064301,0.379043850978,0.377388637655,0.375733424332,0.374078211009,0.372422997686,0.370767784363,0.36911257104,0.367457357717,0.365802144394,0.36414693107,0.362491717747,0.360836504424,0.359181291101,0.357526077778,0.355870864455,0.354215651132,0.352560437809,0.350905224486,0.349250011163,0.34759479784,0.345939584517,0.344284371194,0.342629157871,0.340973944548,0.339318731225,0.337663517902,0.336008304579,0.334353091256,0.332697877933,0.33104266461,0.329387451286,0.327732237963,0.32607702464,0.324421811317,0.322766597994,0.321111384671,0.319456171348,0.317800958025,0.316145744702,0.314490531379,0.312835318056,0.311180104733,0.30952489141,0.307869678087,0.306214464764,0.304559251441,0.302904038118,0.301248824795,0.299593611472,0.297938398149,0.296283184826,0.294627971502,0.292972758179,0.291317544856,0.289662331533,0.28800711821,0.286351904887,0.284696691564,0.283041478241,0.281386264918,0.279731051595,0.278075838272,0.276420624949,0.274765411626,0.273110198303,0.27145498498,0.269799771657,0.268144558334,0.266489345011,0.264834131688,0.263178918365,0.261523705042,0.259868491718,0.258213278395,0.256558065072,0.254902851749,0.253247638426,0.251592425103,0.24993721178,0.248281998457,0.246626785134,0.244971571811,0.243316358488,0.241661145165,0.240005931842,0.238350718519,0.236695505196,0.235040291873,0.23338507855,0.231729865227,0.230074651904,0.228419438581,0.226764225258,0.225109011934,0.223453798611,0.221798585288,0.220143371965,0.218488158642,0.216832945319,0.215177731996,0.213522518673,0.21186730535,0.210212092027,0.208556878704,0.206901665381,0.205246452058,0.203591238735,0.201936025412,0.200280812089,0.198625598766,0.196970385443,0.19531517212,0.193659958797,0.192004745474,0.19034953215,0.188694318827,0.187039105504,0.185383892181,0.183728678858,0.182073465535,0.180418252212,0.178763038889,0.177107825566,0.175452612243,0.17379739892,0.172142185597,0.170486972274,0.168831758951,0.167176545628,0.165521332305,0.163866118982,0.162210905659,0.160555692336,0.158900479013,0.15724526569,0.155590052366,0.153934839043,0.15227962572,0.150624412397,0.148969199074,0.147313985751,0.145658772428,0.144003559105,0.142348345782,0.140693132459,0.139037919136,0.137382705813,0.13572749249,0.134072279167,0.132417065844,0.130761852521,0.129106639198,0.127451425875,0.125796212552,0.124140999229,0.122485785906,0.120830572582,0.119175359259,0.117520145936,0.115864932613,0.11420971929,0.112554505967,0.110899292644,0.109244079321,0.107588865998,0.105933652675,0.104278439352,0.102623226029,0.100968012706,0.099312799383,0.09765758606,0.096002372737,0.094347159414,0.092691946091,0.091036732768,0.089381519445,0.087726306122,0.086071092798,0.084415879475,0.082760666152,0.081105452829,0.079450239506,0.077795026183,0.07613981286,0.074484599537,0.072829386214,0.071174172891,0.069518959568,0.067863746245,0.066208532922,0.064553319599,0.062898106276,0.061242892953,0.05958767963,0.057932466307,0.056277252984,0.054622039661,0.052966826338,0.051311613014,0.049656399691,0.048001186368,0.046345973045,0.044690759722,0.043035546399,0.041380333076,0.039725119753,0.03806990643,0.036414693107,0.034759479784,0.033104266461,0.031449053138,0.029793839815,0.028138626492,0.026483413169,0.024828199846,0.023172986523,0.0215177732,0.019862559877,0.018207346554,0.01655213323,0.014896919907,0.013241706584,0.011586493261,0.009931279938,0.008276066615,0.006620853292,0.004965639969,0.003310426646,0.001655213323]
+ external_pg_data = [-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.018,-0.016295024749,-0.014577740927,-0.012860457104,-0.011143173281,-0.009425889459,-0.007708605636,-0.005991321813,-0.004274037991,-0.002556754168,-0.000839470345,0.000877813477,0.0025950973,0.004312381123,0.006029664945,0.007746948768,0.009464232591,0.011181516413,0.012898800236,0.014616084059,0.016333367881,0.018050651704,0.019767935527,0.021485219349,0.023202503172,0.024919786995,0.026637070817,0.02835435464,0.030071638463,0.031788922285,0.033506206108,0.035223489931,0.036940773753,0.038658057576,0.040375341399,0.042092625221,0.043809909044,0.045527192867,0.047244476689,0.048961760512,0.050679044335,0.052396328157,0.05411361198,0.055830895803,0.057548179625,0.059265463448,0.060982747271,0.062700031093,0.064417314916,0.066134598739,0.067851882561,0.069569166384,0.071286450206,0.073003734029,0.074721017852,0.076438301674,0.078155585497,0.07987286932,0.081590153142,0.083307436965,0.085024720788,0.08674200461,0.088459288433,0.090176572256,0.091893856078,0.093611139901,0.095328423724,0.097045707546,0.098762991369,0.100480275192,0.102197559014,0.103914842837,0.10563212666,0.107349410482,0.109066694305,0.110783978128,0.11250126195,0.114218545773,0.115935829596,0.117653113418,0.119370397241,0.121087681064,0.122804964886,0.124522248709,0.126239532532,0.127956816354,0.129674100177,0.131391384,0.133108667822,0.134825951645,0.136543235468,0.13826051929,0.139977803113,0.141695086936,0.143412370758,0.145129654581,0.146846938404,0.148564222226,0.150281506049,0.151998789872,0.153716073694,0.155433357517,0.15715064134,0.158867925162,0.160585208985,0.162302492808,0.16401977663,0.165737060453,0.167454344276,0.169171628098,0.170888911921,0.172606195744,0.174323479566,0.176040763389,0.177758047212,0.179475331034,0.181192614857,0.18290989868,0.184627182502,0.186344466325,0.188061750147,0.18977903397,0.191496317793,0.193213601615,0.194930885438,0.196648169261,0.198365453083,0.200082736906,0.201800020729,0.203517304551,0.205234588374,0.206951872197,0.208669156019,0.210386439842,0.212103723665,0.213821007487,0.21553829131,0.217255575133,0.218972858955,0.220690142778,0.222407426601,0.224124710423,0.225841994246,0.227559278069,0.229276561891,0.230993845714,0.232711129537,0.234428413359,0.236145697182,0.237862981005,0.239580264827,0.24129754865,0.243014832473,0.244732116295,0.246449400118,0.248166683941,0.249883967763,0.251601251586,0.253318535409,0.255035819231,0.256753103054,0.258470386877,0.260187670699,0.261904954522,0.263622238345,0.265339522167,0.26705680599,0.268774089813,0.270491373635,0.272208657458,0.273925941281,0.275643225103,0.277360508926,0.279077792749,0.280795076571,0.282512360394,0.284229644217,0.285946928039,0.287664211862,0.289381495685,0.291098779507,0.29281606333,0.294533347153,0.296250630975,0.297967914798,0.299685198621,0.301402482443,0.303119766266,0.304837050088,0.306554333911,0.308271617734,0.309988901556,0.311706185379,0.313423469202,0.315140753024,0.316858036847,0.31857532067,0.320292604492,0.322009888315,0.323727172138,0.32544445596,0.327161739783,0.328879023606,0.330596307428,0.332313591251,0.334030875074,0.335748158896,0.337465442719,0.339182726542,0.340900010364,0.342617294187,0.34433457801,0.346051861832,0.347769145655,0.349486429478,0.3512037133,0.352920997123,0.354638280946,0.356355564768,0.358072848591,0.359790132414,0.361507416236,0.363224700059,0.364941983882,0.366659267704,0.368376551527,0.37009383535,0.371811119172,0.373528402995,0.375245686818,0.37696297064,0.378680254463,0.380397538286,0.382114822108,0.383832105931,0.385549389754,0.387266673576,0.388983957399,0.390701241222,0.392418525044,0.394135808867,0.39585309269,0.397570376512,0.399287660335,0.401004944158,0.40272222798,0.404439511803,0.406156795626,0.407874079448,0.409591363271,0.411308647094,0.413025930916,0.414743214739,0.416460498562,0.418177782384,0.419895066207,0.421612350029,0.423329633852,0.425046917675,0.426764201497,0.42848148532,0.430198769143,0.431916052965,0.433633336788,0.435350620611,0.437067904433,0.438785188256,0.440502472079,0.442219755901,0.443937039724,0.445654323547,0.447371607369,0.449088891192,0.450806175015,0.452523458837,0.45424074266,0.455958026483,0.457675310305,0.459392594128,0.461109877951,0.462827161773,0.464544445596,0.466261729419,0.467979013241,0.469696297064,0.471413580887,0.473130864709,0.474848148532,0.476565432355,0.478282716177,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.48,0.478295024749,0.476577740927,0.474860457104,0.473143173281,0.471425889459,0.469708605636,0.467991321813,0.466274037991,0.464556754168,0.462839470345,0.461122186523,0.4594049027,0.457687618877,0.455970335055,0.454253051232,0.452535767409,0.450818483587,0.449101199764,0.447383915941,0.445666632119,0.443949348296,0.442232064473,0.440514780651,0.438797496828,0.437080213005,0.435362929183,0.43364564536,0.431928361537,0.430211077715,0.428493793892,0.426776510069,0.425059226247,0.423341942424,0.421624658601,0.419907374779,0.418190090956,0.416472807133,0.414755523311,0.413038239488,0.411320955665,0.409603671843,0.40788638802,0.406169104197,0.404451820375,0.402734536552,0.401017252729,0.399299968907,0.397582685084,0.395865401261,0.394148117439,0.392430833616,0.390713549794,0.388996265971,0.387278982148,0.385561698326,0.383844414503,0.38212713068,0.380409846858,0.378692563035,0.376975279212,0.37525799539,0.373540711567,0.371823427744,0.370106143922,0.368388860099,0.366671576276,0.364954292454,0.363237008631,0.361519724808,0.359802440986,0.358085157163,0.35636787334,0.354650589518,0.352933305695,0.351216021872,0.34949873805,0.347781454227,0.346064170404,0.344346886582,0.342629602759,0.340912318936,0.339195035114,0.337477751291,0.335760467468,0.334043183646,0.332325899823,0.330608616,0.328891332178,0.327174048355,0.325456764532,0.32373948071,0.322022196887,0.320304913064,0.318587629242,0.316870345419,0.315153061596,0.313435777774,0.311718493951,0.310001210128,0.308283926306,0.306566642483,0.30484935866,0.303132074838,0.301414791015,0.299697507192,0.29798022337,0.296262939547,0.294545655724,0.292828371902,0.291111088079,0.289393804256,0.287676520434,0.285959236611,0.284241952788,0.282524668966,0.280807385143,0.27909010132,0.277372817498,0.275655533675,0.273938249853,0.27222096603,0.270503682207,0.268786398385,0.267069114562,0.265351830739,0.263634546917,0.261917263094,0.260199979271,0.258482695449,0.256765411626,0.255048127803,0.253330843981,0.251613560158,0.249896276335,0.248178992513,0.24646170869,0.244744424867,0.243027141045,0.241309857222,0.239592573399,0.237875289577,0.236158005754,0.234440721931,0.232723438109,0.231006154286,0.229288870463,0.227571586641,0.225854302818,0.224137018995,0.222419735173,0.22070245135,0.218985167527,0.217267883705,0.215550599882,0.213833316059,0.212116032237,0.210398748414,0.208681464591,0.206964180769,0.205246896946,0.203529613123,0.201812329301,0.200095045478,0.198377761655,0.196660477833,0.19494319401,0.193225910187,0.191508626365,0.189791342542,0.188074058719,0.186356774897,0.184639491074,0.182922207251,0.181204923429,0.179487639606,0.177770355783,0.176053071961,0.174335788138,0.172618504315,0.170901220493,0.16918393667,0.167466652847,0.165749369025,0.164032085202,0.162314801379,0.160597517557,0.158880233734,0.157162949912,0.155445666089,0.153728382266,0.152011098444,0.150293814621,0.148576530798,0.146859246976,0.145141963153,0.14342467933,0.141707395508,0.139990111685,0.138272827862,0.13655554404,0.134838260217,0.133120976394,0.131403692572,0.129686408749,0.127969124926,0.126251841104,0.124534557281,0.122817273458,0.121099989636,0.119382705813,0.11766542199,0.115948138168,0.114230854345,0.112513570522,0.1107962867,0.109079002877,0.107361719054,0.105644435232,0.103927151409,0.102209867586,0.100492583764,0.098775299941,0.097058016118,0.095340732296,0.093623448473,0.09190616465,0.090188880828,0.088471597005,0.086754313182,0.08503702936,0.083319745537,0.081602461714,0.079885177892,0.078167894069,0.076450610246,0.074733326424,0.073016042601,0.071298758778,0.069581474956,0.067864191133,0.06614690731,0.064429623488,0.062712339665,0.060995055842,0.05927777202,0.057560488197,0.055843204374,0.054125920552,0.052408636729,0.050691352906,0.048974069084,0.047256785261,0.045539501438,0.043822217616,0.042104933793,0.040387649971,0.038670366148,0.036953082325,0.035235798503,0.03351851468,0.031801230857,0.030083947035,0.028366663212,0.026649379389,0.024932095567,0.023214811744,0.021497527921,0.019780244099,0.018062960276,0.016345676453,0.014628392631,0.012911108808,0.011193824985,0.009476541163,0.00775925734,0.006041973517,0.004324689695,0.002607405872,0.000890122049,-0.000827161773,-0.002544445596,-0.004261729419,-0.005979013241,-0.007696297064,-0.009413580887,-0.011130864709,-0.012848148532,-0.014565432355,-0.016282716177]
+
+ # Default: PG 13.5 (common sensor / cable-gland size) -> index 4
+ default = pg_presets_data[4]
+ obj = super(ThreadProfileCreatePGObjectCommandClass, self).makeThreadProfile(
+ name="PGThreadProfile",
+ internal_data=internal_pg_data,
+ external_data=external_pg_data,
+ presets=pg_presets_data,
+ minor_diameter=default[2],
+ pitch=default[1],
+ internal_or_external="External",
+ thread_count=6,
+ Quality=6,
+ )
+ if obj:
+ obj.Presets = default[0]
+ obj.Pitch = default[1]
+ obj.MinorDiameter = default[2]
+ return obj
+
+#Gui.addCommand("ThreadProfileCreatePGObject", ThreadProfileCreatePGObjectCommandClass())
+####################################################################################
def initialize():
if FreeCAD.GuiUp:
Gui.addCommand("ThreadProfileCreateObject", ThreadProfileCreateObjectCommandClass())
@@ -1422,6 +1514,7 @@ def initialize():
Gui.addCommand("ThreadProfileOpenOnlineCalculator", ThreadProfileOpenOnlineCalculatorCommandClass())
Gui.addCommand("ThreadProfileCreateButtressObject", ThreadProfileCreateButtressObjectCommandClass())
Gui.addCommand("ThreadProfileCreateBottleObject", ThreadProfileCreateBottleObjectCommandClass())
+ Gui.addCommand("ThreadProfileCreatePGObject", ThreadProfileCreatePGObjectCommandClass())
Gui.addCommand("ThreadProfileDoSweep", ThreadProfileDoSweepCommandClass())
Gui.addCommand("ThreadProfileSettings", ThreadProfileSettingsCommandClass())
diff --git a/package.xml b/package.xml
index 857c72c..06904da 100644
--- a/package.xml
+++ b/package.xml
@@ -2,8 +2,8 @@
ThreadProfileThreadProfile object for creating internal/external threads
- 1.99
- 2026.05.25
+ 2.00
+ 2026.07.28TheMarksterLGPL-2.1https://github.com/mwganson/ThreadProfile
@@ -15,7 +15,7 @@
ThreadProfileThreadProfileWorkbenchThreadProfile object for creating internal/external threads
- 1.99
+ 2.00./Resources/icons/ThreadProfileLogo.svg0.19.0