Commit Graph

103 Commits

Author SHA1 Message Date
Kacper Donat
935bdf9a0f PartDesign: Refactor single-solid rule enforcement
This refactors a single solid rule checking code from using the solid
count directly to using well abstracted `isSingleSolidRuleSatisfied`
method. This makes code easier to read and is the basis for next step
which is allowing users to disable this checks.
2024-05-20 12:25:36 -04:00
bgbsww
fa8f29aed4 Toponaming/Part: Fix all getBaseTopoShape calls. Tests and missing code. 2024-04-26 21:15:11 -05:00
wmayer
e05e17c954 PD: Fixes #13446: Crash with hole in additive loft 2024-04-14 21:24:06 +02:00
wmayer
df7e783513 Mod: fix several compiler warnings:
* fix -Wsometimes-uninitialized
* fix -Wunused-parameter
* fix -Wunused-variable
* fix -Winconsistent-missing-override
* fix -Wsign-compare
* fix -Wreorder-ctor
* fix -Wtautological-overlap-compare
2024-02-12 11:39:32 -06:00
Syres916
8cadc2294d [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
0d854a56cd Part: modernize C++: return braced init list 2023-08-19 11:35:41 +02:00
wmayer
9a1f8a11d6 PD: modernize C++: use range-based for loop 2023-08-16 21:54:56 -05:00
wmayer
2a88c7c7df modernize C++: use bool literals 2023-08-06 01:35:39 +02:00
Chris Hennes
80b29d2dbf Gui: Minor translation fixes 2023-05-11 18:31:34 -05:00
Chris Hennes
1995d84edd PD: Add translation to error messages 2023-04-28 11:32:56 -05:00
luzpaz
129d5882a7 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
d27e69bdc9 [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
c726b69d7e PD: remove trailing whitespace 2022-11-10 10:32:04 +01:00
Uwe
978642d03e [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
f1c03bc233 [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
60d7b1d834 PartDesign: Add HoleCuteType "Counterdrill" 2022-10-24 15:19:24 +02:00
Stefan Klug
c7f64b12bd 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
7ed0c36aa3 PartDesign: Remove duplicate comment 2022-10-23 09:15:17 -05:00
wmayer
145c3bf7c5 PD: [skip ci] fix UTF-8 handling in Hole feature 2022-08-21 11:07:15 +02:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Uwe
1b2f0063a1 [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
3608ee7f51 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
c9a0fae9db lgtm: [skip ci] FIXME comment
Change FIXME or remove it
2022-03-20 16:51:23 +01:00
wmayer
02bd57ac82 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
ebe57601cd PD: remove duplicate verifications 2022-03-01 17:41:09 +01:00
wmayer
b05fb73196 PD: [skip ci] refactor Hole feature 2022-02-26 17:06:38 +01:00
wmayer
3ce87cb2fa PD: [skip ci] refactor Hole feature 2022-02-26 16:48:37 +01:00
wmayer
9ddfcb89a5 PD: [skip ci] fix const correctness in Hole feature 2022-02-26 16:34:44 +01:00
wmayer
df0fac1de8 PD: [skip ci] refactor Hole feature 2022-02-26 16:18:20 +01:00
wmayer
4753b0232d 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
7c8031d356 [PD] Hole, Pipe and Revolution: remove unused includes 2022-02-19 18:47:26 +01:00
Uwe
9a8e055cc6 [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
7afcc93062 [PD] remove wrong comment
was accidentally introduced by ma previous commit
2022-01-06 16:15:39 +01:00
Uwe
d232f17e23 [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
8df64b7426 [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
f2b0333c75 [PD] Hole: coding style fixes
all by MSVC
2022-01-06 03:51:13 +01:00
Uwe
76c611ae2a [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
ddbf8e0e2d Sketcher: avoid attaching to/detaching from the same parameter group twice 2022-01-05 14:05:05 +01:00
Uwe
fa50122c33 [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
9770449be7 [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
8b7da3b0eb PD: Silence LGTM warning about empty block 2021-09-19 13:39:49 -05:00
luz paz
a25a2200cb 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
80af82a4fe 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
d1439107df [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
c0de42335b [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
ebe2ce1034 PartDesign: Hole: Rename Automatic Tapped (DIN76) and change default to Hole depth. 2021-02-28 20:13:14 +01:00
David Osterberg
6ea6b48c0e PartDesign: [Hole] Add Entire Depth thread depth mode 2021-02-28 20:13:14 +01:00
David Osterberg
d3ddbe8549 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
eed7357674 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
ea67e77e81 [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