Commit Graph

69 Commits

Author SHA1 Message Date
Chris Hennes
a56756d814 PD: Add onlyHaveRefined() to FeatureRefine 2025-02-07 21:44:43 -06:00
Florian Foinant-Willig
70184ba59d PartDesign: decouple refine and other geometric computation (#17008) 2024-12-02 10:57:30 -06:00
Florian Foinant-Willig
3d5e4f7cd8 Fix revolution with ShapeBinder profile (#17489)
* Fix revolution with ShapeBinder profile

* Remove log level init

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-11-11 17:48:18 +01:00
mwganson
dbc91b393c [PartDesign Groove/Revolution] minor dialog improvements, addresses issue #13298 2024-10-27 12:12:36 +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
wmayer
6812aca7f8 PD: Fix compiler warning 2024-09-03 16:26:52 +02:00
bgbsww
24bb499c1f Cleanup element map in Revolution and add test (#15959) 2024-09-02 17:59:44 +02:00
wmayer
c80fd64c82 PD: Fix compiler warning 2024-08-26 23:55:17 +02:00
bgbsww
ecf7e51ab3 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
bgbsww
a348a1bc82 Toponaming: Update tests, implement missing subtractive operation tests,
fix helix and revolution
2024-07-30 09:12:58 -05:00
mosfet80
36b9b58eb3 [MOD:PART] removed unused parameter (#14252)
d variable are never used

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-06-24 10:41:39 -05:00
wmayer
ffad1e0c34 Mod: Fix several compiler warnings 2024-05-30 08:55:11 +02:00
bgbsww
040502280f Toponaming: Cleanup verified face calls 2024-05-20 17:48:01 -05:00
bgbsww
b72a8c4222 Toponaming: Bring in Chamfer, Fillet code and add tests (#14035)
* Toponaming: bring in missing code fragments in Sketcher

* Toponaming: Fix infinite recursion, remove debug cruft, rough in fillet test

* Bring in missing code; fix chamfers

* Toponaming: Add code for fillets and test
2024-05-15 19:43:30 -04:00
bgbsww
ad0cb61656 Toponaming/Part: unify revolution changes 2024-05-02 18:50:02 -05:00
bgbsww
fa8f29aed4 Toponaming/Part: Fix all getBaseTopoShape calls. Tests and missing code. 2024-04-26 21:15:11 -05:00
Ajinkya Dahale
4c80e567c6 [PD] Use enum class for revolution method 2023-11-14 00:20:20 +05:30
Ajinkya Dahale
0829c96549 [PD] Update revolution properties based on method 2023-11-14 00:20:20 +05:30
Ajinkya Dahale
7e09589942 [PD] Refactor FeatureRevolution further
New methods created to reduce size of `execute`.

Use BRepPrimAPI instead of BRepFeat whenever possible since otherwise there are
some limitations.
2023-11-14 00:20:19 +05:30
Ajinkya Dahale
6b1a1e1508 [PartDesign] Refactor mode support in revolution
Encodes support for "two angles".
Clarifies that up-to-first and up-to-last is not supported.
2023-11-14 00:20:19 +05:30
Ajinkya Dahale
b41e592441 [PartDesign] Add some dummy options for revolution
These options correspond to "up to face" and "2 angles". They are expected to do
nothing right now. However there is also some experimental code for "up to face"
in this commit, whose behavior is not confirmed.
2023-11-14 00:20:19 +05:30
Chris Hennes
1995d84edd PD: Add translation to error messages 2023-04-28 11:32:56 -05:00
luz paz
c726b69d7e PD: remove trailing whitespace 2022-11-10 10:32:04 +01:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
wmayer
3608ee7f51 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
7c8031d356 [PD] Hole, Pipe and Revolution: remove unused includes 2022-02-19 18:47:26 +01:00
wmayer
501c3dc657 PD: fix ProfileBased::getAxis
Introduce an enum to verify the axis depending on the used context.
* For helix no restriction is needed
* For Pad/Pocket the axis must not be parallel with the sketch plane
* For Revolve/Groove the axis must not be perpendicular with the sketch plane
2021-12-02 17:24:18 +01:00
wmayer
3694da3102 PD: [skip ci] fix angle checks for groove and revolution 2021-03-03 14:56:16 +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
wmayer
7acdb56d92 Replace Base::Exception with appropriate subclass 2018-11-14 19:28:00 +01:00
wmayer
949c86d364 Port to occ7.2:
+ Standard_Failure::Caught() is now marked as deprecated and should be replaced with standard C++ exception handling
2017-09-01 16:27:46 +02:00
wmayer
371cb0fa2a fix compiler warning 2017-08-12 17:26:11 +02:00
Kurt Kremitzki
7c87549e4b Fix return type 2017-08-12 14:48:57 +02:00
Kurt Kremitzki
d29bed15d1 PDN: Add catch statements for Revolution perpendicular axis 2017-08-12 14:43:45 +02:00
Kurt Kremitzki
fdf66b3e88 PDN: Check both parallel and antiparallel cases before trying Revolve 2017-08-12 14:09:39 +02:00
Peter Lama
a75a98ef27 Use OCCT Handle macro for Handle_ classes
This is the result of running OCCT's upgrade script provided
with OCCT 7.0. See
https://www.opencascade.com/content/freecad-occt710-and-windows-rtti-data-missing#comment-form
and
https://www.forum.freecadweb.org/viewtopic.php?f=4&t=21405&start=120#p169019
for why this is necessary for OCCT >= 7.1
2017-04-20 12:27:34 +02:00
Stefan Tröger
83ce80f133 fixes #0002512 Allow multi-face part design tools 2016-05-18 23:54:18 +02:00
Stefan Tröger
f712f5e4ac PartDesign: Modeling features work with faces
-Rename Sketchbased to ProfileBased to show new behavior
-Adopt ProfileBased to make the relevant helper functions work with faces too
-Adopt features for unified use of helper functions
-Adopt commands to allow face selection
2016-04-12 18:12:22 +02:00
DeepSOIC
4b48362ec6 PartDesign: refactor positionBySketch
Rename it to positionByPrevious. Rewrite.
Rewrite SketchBased::transformPlacement.
2016-04-12 18:12:11 +02:00
DeepSOIC
03be8e1bba PartDesign: tidy up sketch support and base feature confusion
Not complete, transformPlacement and positionBySketch are pending...
2016-04-12 18:12:11 +02:00
Stefan Tröger
9a2f5eea65 allow non-sketch based additive and subtractive features 2016-04-12 18:12:06 +02:00
jrheinlaender
75dc92fd90 Enable edges and datum lines as rotation axis for Groove and Revolution features 2016-04-12 18:11:51 +02:00
jrheinlaender
b815656649 Refactored code of SketchBased features to have common code in an abstract superclass 2016-04-12 18:11:50 +02:00
jrheinlaender
7d84c7e6f0 Made Pocket, Revolution and Groove aware of the SketchBased::BaseFeature property 2016-04-12 18:11:48 +02:00
jriegel
bf26a422cb clean up in- and out-list code 2016-04-12 18:11:45 +02:00
jriegel
30b189c1da Merge branch 'refs/heads/double-precision-werner'
Conflicts:
	src/App/Document.cpp
	src/App/PropertyGeo.cpp
	src/App/PropertyStandard.cpp
	src/Base/Reader.cpp
	src/Base/Reader.h
	src/Gui/propertyeditor/PropertyItem.cpp
	src/Mod/Fem/Gui/ViewProviderFemMesh.cpp
	src/Mod/Inspection/Gui/ViewProviderInspection.cpp
	src/Mod/Mesh/App/MeshProperties.cpp
	src/Mod/Part/App/TopoShapeFacePyImp.cpp
	src/Mod/PartDesign/App/FeatureRevolution.cpp
2013-09-26 00:05:05 +02:00
jriegel
664c1d4862 Integrate Werners & Jans double branch
Move from float to double
Further suggestions for float -> double move
Moved Tools2D from float to double
More suggestions for float->double move from Gui subdirectory
Changes to FEM constraint visuals for float->double move
Suggested changes for float -> double move
Suggestions for Part module moving float -> double
2013-09-24 11:00:57 +02:00
wmayer
3cc032c11e + Add option to refine solid on sketch-based features 2013-09-21 09:16:44 +02:00
jrheinlaender
8df84e76c4 PartDesign module moving float -> double 2013-03-25 17:42:29 +04:30
wmayer
efc29e4422 Move from float to double 2013-03-23 15:12:04 +01:00