Commit Graph

99 Commits

Author SHA1 Message Date
Syres916
51e4561fd7 [PartDesign] Hole, ignore duplicate circle/curve centers (#11773)
* [PartDesign] Hole, ignore duplicate circle/curve centers

* [PartDesign] Hole correct log output

* [PartDesign] Hole changes based on feedback
2024-01-08 13:55:16 -03:00
wmayer
c8abd4a6d4 Part: modernize C++: return braced init list 2023-08-19 11:35:41 +02:00
wmayer
3e09b8ee2d PD: modernize C++: use range-based for loop 2023-08-16 21:54:56 -05:00
wmayer
7a3106d31b modernize C++: use bool literals 2023-08-06 01:35:39 +02:00
Chris Hennes
397807b72d Gui: Minor translation fixes 2023-05-11 18:31:34 -05:00
Chris Hennes
272a84ca5b PD: Add translation to error messages 2023-04-28 11:32:56 -05:00
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
Uwe
31fa8187d5 [PD] add tooltip for Hole feature
- tooltip makes clear what the depth means for countersinks
- add comment why a calculation cannot be performed
- shorten some long lines
2023-03-10 05:14:24 +01:00
luz paz
d265c9ff63 PD: remove trailing whitespace 2022-11-10 10:32:04 +01:00
Uwe
6d889db9d7 [PD] remove deprecated holes
- as discussed in https://github.com/FreeCAD/FreeCAD/pull/7642 the backwards compatibility for deprecated holes was already lost since FC 0.19
- this PR removes the deprecated types and transform holes created with FC 0.19 or 0.20 to the corresponding countersinks/counterbores.

- also add Counterdrill for translations
2022-10-27 14:24:32 +02:00
Uwe
c31dc73e62 [PD] FeatureHole.cpp: sort counterdrill
- will be necessary to push deprecated entries to the end of the combobox in the dialog (in a coming PR)
- also fix too long code line
2022-10-25 01:09:37 +02:00
Stefan Klug
673be545fd PartDesign: Add HoleCuteType "Counterdrill" 2022-10-24 15:19:24 +02:00
Stefan Klug
c077f75159 PartDesign: Refactor geometry creation of counersink/counterbore
The counterbore is basically a special case of the countersink
with a countersink angle of 180 degrees and applied depth.
Handling it that way elimintaes some duplicate code and adds the ability to
combine countersinks and counterbore to form a counterdrill.

The sanity check on countersinkAngle can be safely dropped as it is ensured
by a constraint on the property itself.
2022-10-24 03:42:02 +02:00
Stefan Klug
477726806f PartDesign: Remove duplicate comment 2022-10-23 09:15:17 -05:00
wmayer
3631f8481d PD: [skip ci] fix UTF-8 handling in Hole feature 2022-08-21 11:07:15 +02:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Uwe
61edc1c0d8 [PD] Hole initialization bugfix
- by default there is no hole head cut and therefore its parameter must be initialized as read-only (will be enably when user sets a head cut)

- also fix a typo

- also fix a UI file issue (automatically done by Qt Designer)
2022-06-25 16:36:50 +02:00
wmayer
d1d4b996e7 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
585bcb8708 lgtm: [skip ci] FIXME comment
Change FIXME or remove it
2022-03-20 16:51:23 +01:00
wmayer
afabaea5cb PD: Fix several coverity issues:
* CID 350622: Negative array index read
* CID 350613: Negative array index read
* CID 166163: Negative array index read
* refactor Hole::updateDiameterParam()
2022-03-13 12:10:01 +01:00
mosfet80
c181da4461 PD: remove duplicate verifications 2022-03-01 17:41:09 +01:00
wmayer
59886896dc PD: [skip ci] refactor Hole feature 2022-02-26 17:06:38 +01:00
wmayer
aeba940cf0 PD: [skip ci] refactor Hole feature 2022-02-26 16:48:37 +01:00
wmayer
52b936539f PD: [skip ci] fix const correctness in Hole feature 2022-02-26 16:34:44 +01:00
wmayer
2e16f6a7e1 PD: [skip ci] refactor Hole feature 2022-02-26 16:18:20 +01:00
wmayer
08a3b60031 PD: fix error 'gp_Dir::Crossed() - result vector has zero norm'
As reported here: https://forum.freecadweb.org/viewtopic.php?f=3&t=65826
2022-02-26 16:07:35 +01:00
Uwe
037b2796b3 [PD] Hole, Pipe and Revolution: remove unused includes 2022-02-19 18:47:26 +01:00
Uwe
734bb426bf [PD] Hole: fix angle constraints
- all 3 angles cannot be >= 180°
- also add missing minimum in UI for taper angle
2022-01-07 20:38:05 +01:00
Uwe
76f5fe6a74 [PD] remove wrong comment
was accidentally introduced by ma previous commit
2022-01-06 16:15:39 +01:00
Uwe
2783563e11 [PD] Hole: don't call onChanged on restoration
fixes the issue reported here: https://forum.freecadweb.org/viewtopic.php?f=10&t=65035
2022-01-06 15:51:03 +01:00
Uwe
55421ce9cb [PD] add missing hole constraint
- add missing constraint for hole diameter
- add missing sets of angle constraints in the task dialog
2022-01-06 15:39:13 +01:00
Uwe
4b6c0a6f2d [PD] Hole: coding style fixes
all by MSVC
2022-01-06 03:51:13 +01:00
Uwe
460d4ad404 [PD] remove unnecessary Unicode characters
they cause problems: https://forum.freecadweb.org/viewtopic.php?p=559077#p559077
2022-01-06 02:57:53 +01:00
wmayer
922582d036 Sketcher: avoid attaching to/detaching from the same parameter group twice 2022-01-05 14:05:05 +01:00
Uwe
5f3c869ac4 [PD] fix a hole thread issue
- The thread must not be deeper than the hole.
  (One could see that if one used a thread depth dimension and set
  it to the same value than the hole depth, the thread was too deep.)
2021-12-22 02:54:49 +01:00
Uwe
99765c53a8 [PD] fix several hole thread issues
- actually use specified thread depth, fixes issue reported here: https://github.com/FreeCAD/FreeCAD/pull/4274#issuecomment-997787744
- fixes 2 UI enabling issues
- the thread depth cannot be longer than the hole depth
- the hole cannot be deeper than the through-all depth
2021-12-22 01:09:06 +01:00
Chris Hennes
6c532c2fda PD: Silence LGTM warning about empty block 2021-09-19 13:39:49 -05:00
luz paz
9a3724c11b Fixed misc. typos [skip ci]
Found via
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/doc/SourceDocu
```
2021-03-21 07:38:41 -04:00
David Osterberg
b185dacdde PartDesign: Hole performance: Compound holes and cut once
- Remove unused code
- BooleanOperation trick

For some reason doing the cut in a boolean operation is
20% faster than doing it directly. Unclear why.
2021-03-08 15:30:24 +01:00
M G Berberich
ba5c438ec2 [PD] fixes problem with the path for user-defined hole-cut-types
https://forum.freecadweb.org/viewtopic.php?f=19&t=51403&start=20#p482574
2021-03-03 16:02:17 +01:00
donovaly
2caa07c291 [PD] disallow angles <=0 for holes and revolution
neither the taper, drill or countersink angle can be zero or negative for a valid hole, thus set a constraint
2021-03-03 14:33:01 +01:00
David Osterberg
41724cd29b PartDesign: Hole: Rename Automatic Tapped (DIN76) and change default to Hole depth. 2021-02-28 20:13:14 +01:00
David Osterberg
d7ae53d597 PartDesign: [Hole] Add Entire Depth thread depth mode 2021-02-28 20:13:14 +01:00
David Osterberg
d94946781e PartDesign: Add true threads to Hole
- Thread runout according to DIN 76-1
- Through all length updated to be calculated based on bounding box
- New properties: ModelThread, ThreadDepthType, ThreadDepth,
                  UseCustomThreadClearance, CustomThreadClearance
- Rename Old but unused parameters related to thread modeling.
- Functionality exposed in UI
2021-02-28 20:13:14 +01:00
wmayer
45079ca2ac PD: [skip ci] AddressSanitizer: stack-use-after-scope
Axis() returns a tmp. object and thus we cannot use a const reference to get its Location() method
2021-02-23 13:57:51 +01:00
Chris Hennes
e7e794753a [PD] Add missing ctor variable init (Coverity)
The "angle" variable was not being initialized in any of the
constructors for the CutDimensionSet, and nothing was being initialized
by the default constructor. This commit adds angle as an optional final
argument to the parameterized constructors, defaulting to 0.0, and adds
default values to the default constructor using the first of each enum
and 0.0 for the angle. The default constructor is required elsewhere in
the code so cannot be trivially removed. Issue identified by Coverity.
2021-02-09 20:19:38 +01:00
donovaly
09385d9d00 fix issue reported by @chennes
also fix annoying variable naming - different variables representing different types should not have the same name

also update a comment according to depending PRs
2021-02-03 16:24:01 +01:00
donovaly
2a6d30da27 [PD] hole fix custom cut handling
This PR is based on PR #4344 and a spin-off of PR #4337. It fixes:

We have normed screw head cuts. These values can be overridden but we must store the info about the overriding. Why? - because when you have e.g. made a custom change to a normed countersink and then change to another countersink norm, you would either not get the values defined in the norm or you get these values but loose e.g. your depth settings
2021-02-03 16:23:28 +01:00
donovaly
c5fe2589d5 [PD] fix UTS clearance holes
This PR is based on PR #4343 and a spin-off of PR #4337. It fixes:

- the bug that we did not use the normed clearance hole diameters for UTS holes
- missing recompute when changing existing hole from Metric to UTS type
2021-02-03 16:19:24 +01:00
donovaly
19605200a1 [PD] hole dialog UI fixes
This PR is the first in a series of probably 3 PRs to fix known hole dialog bugs.

This one fixes:

- the .ui file issues
- readonly status issues of some widgets/properties (e.g. when the hole is through all, disable drill point settings)
- the bug that updateHoleCutParams() overwrote the previously correctly determined hole diameter
- just a trifle: change a function name to fit into the naming scheme
2021-02-03 16:14:36 +01:00