Commit Graph

124 Commits

Author SHA1 Message Date
Alfredo Monclus
f93396e566 refactor(PD): simplify setreadonly on type switch 2025-02-15 16:12:49 -03:00
Alfredo Monclus
dff79b6b08 refactor(PD): reduce the number of comparisons 2025-02-15 06:29:04 -03:00
jffmichi
72c37f9b75 PartDesign: fix crash when opening a file with a metric hole 2025-02-11 17:35:35 -06:00
Alfredo Monclus
dc53d3dba2 feat(PD): guess closest thread designation
fixes metric to metric-fine not working when switching threadtype from cli and property panel and the cases when changing from metric to inch based types and vice-versa
2025-02-10 10:32:52 -06:00
Alfredo Monclus
932c8d6476 refactor(PD): change threadDescription into a vector 2025-01-18 10:07:19 -03:00
Alfredo Monclus
3f58f83f2d refactor(PD): dynamically set threadSize enums 2024-12-22 17:21:36 -03:00
Alfredo Monclus
58344a5904 refactor(PD): rename CoreHole to TapDrill
using a drill and cutting tap is not the only method to create a thread, and this sizes should be optional. i would prefer using the minor diameter of threads, leaving full thread depth and let the user adjust according to their needs using the custom clearance
2024-12-20 07:51:34 -03:00
Alfredo Monclus
003e239daf feat(PD): set the proper angle for threads and countersinks
apply the recommended thread angle only if the user hasn't set an angle
2024-12-20 07:51:34 -03:00
Alfredo Monclus
ce91285e4d feat(PD): BSF threads 2024-12-20 07:51:34 -03:00
Alfredo Monclus
edb565046d feat(PD): BSW threads 2024-12-20 07:51:34 -03:00
Alfredo Monclus
80d4185c09 refactor(PD): new cut profile for threads
fixes tapered threds
removing 2 points increases performance around 10% when doing an M1 in my imprecise testing
2024-12-20 07:51:33 -03:00
Alfredo Monclus
3e161f9c96 refactor(PD): change tabs to whitespaces 2024-12-20 07:51:33 -03:00
Alfredo Monclus
df22f8060d feat(PD): tapered threads support, NPT and BSPT are now possible 2024-12-20 07:51:33 -03:00
Alfredo Monclus
588f4c3b00 feat(PD): ANSI pipe threads 2024-12-20 07:51:33 -03:00
Alfredo Monclus
acf04c7f1e feat(PD): BSP - British standard pipe threads 2024-12-20 07:51:33 -03:00
Alfredo Monclus
db1b0c56bf fix(PD): complete ISO-273 2024-12-20 07:51:33 -03:00
Vincenzo Calligaro
fe7bff5a9a [PartDesign] Hole: restore missing call to FeatureAddSub::refineShapeIfActive()
Signed-off-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>
2024-12-07 15:23:44 +01:00
Eric Price
cf8ad66373 Fix boolean operations (#17119)
* add BRepAlgoAPI wrapper files to CMakeList

* introduce wrapper for BRepAlgoAPI_BooleanOperation and derivatives, set sensible default Fuzzyness for boolean operations

* allow default fuzzyness to be set in settings - including off

* backwards compatibility with OCCT 7.3.3 - removed newer paramateres from wrapper

* added missing header

* reverted src/Mod/Part/App/OpenCascadeAll.h to original state

* implement some changes suggested by @wwmayer

* removed unneeded destructor definitions

* moved getDefaultFuzzyValue into its own helper class

* removed unneeded references to base class default constructor

* default to SetRunParallel(Standard_True) as suggested by @FlachyJoe

* fixed license header as requested

* Added new method to autocalculate fuzzyness to BooleanOperation base class and use it for those parts that do not call the obsolete constructor but also do not set precision

* implemented static variable solution as suggested by @wwmayer

* added helix for test case

* Refactoring FCRepAlgoAPI to FCBRepAlgoAPI

* Added Test Case (fuse cylinder with helix with different working and non-working Fuzzy values)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* increased default value of FuzzyBoolean and made tests more robust for compatibility with OCCT 7.3

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixes for FREECAD_USE_PCH - allow testing of FREECAD_USE_PCH on linux with cmake switch (default OFF)

* removed surplus line - wasn't needed after all

* included precompiled as instructed

* set anti-corruption flag in boolean operations, ensures source shape is not damaged in OCCT 7.1 and higher

* fix #17085

* disable subtests that were too specific for now

* fixed all CLI tests - see comments in Pull Request https://github.com/FreeCAD/FreeCAD/pull/17119#issuecomment-2420772452

* Update src/Mod/PartDesign/PartDesignTests/TestTopologicalNamingProblem.py

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* remove surplus tests from github suggestion interface bug

* hide the BooleanFuzzy variable - can now be only set by manually editing the config file
i
in FCParamGroup "Boolean"
<FCFloat Name="BooleanFuzzy" Value="10.000000000000"/>

* Suggestion by @FlachyJoe - add validity checks to the base and tool shape in any direct boolean op

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>
2024-10-21 18:38:51 +02:00
bgbsww
c5ad54d5a8 Update method names and clean 2024-09-22 14:44:50 -04:00
Zheng, Lei
b2d6787571 Transfer FeatureHole code 2024-09-21 14:53:33 -04:00
bgbsww
040502280f Toponaming: Cleanup verified face calls 2024-05-20 17:48:01 -05:00
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