Commit Graph

111 Commits

Author SHA1 Message Date
Chris Hennes
21c07cabc5 FreeCAD: Compiler warning fixes 2025-03-19 10:13:34 +01:00
captain0xff
13d31711f3 remove gp_* conversion code from TechDraw workbench 2025-03-11 05:21:58 +05:30
Benjamin Bræstrup Sayoc
b7f56a219f Move Tag to separate translation unit
- Avoid code duplication
- Reduces compile time
2025-02-21 13:01:28 +01:00
Benjamin Bræstrup Sayoc
97b34f9c57 Remove magic number and hard type enums in Geometry.h
- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
2025-02-17 12:16:49 -05:00
Benjamin Bræstrup Sayoc
9f8f6b1f56 [TechDraw] Use templates instead of duplicate code: toGp 2025-02-08 22:35:57 +01:00
Benjamin Bræstrup Sayoc
e025b1bfe2 [TechDraw] Translations and grammer (#16301)
Co-authored-by: WandererFan <WandererFan@gmail.com>
2024-12-02 12:27:39 -05:00
wandererfan
2ff1a2b6de [TD]fix area calculation 2024-11-25 17:49:21 +01:00
Eric Price
aba60775f6 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
Syres916
fdb2bc4326 [TechDraw] Fix error for some compilers 2024-10-15 14:19:05 +02:00
WandererFan
227cd14022 [TD]Fix bad circles (fix #16980) (#17182)
* [TD]fix spurious messages in GeometryMatcher

* [TD]fix closed circle test (fix #16980)
2024-10-14 17:47:04 +02:00
wandererfan
9ee4b6d5db [TD]fix torus render (fix #16646) 2024-09-23 09:21:00 -05:00
wandererfan
196b0ede16 [TD]fix outer torus edge not rendered (fix #16136) 2024-09-02 18:41:58 +02:00
wandererfan
0d4b04deb3 [TD]fix false positives in isCircle (fix #15979) 2024-08-26 18:01:00 +02:00
wmayer
7d492c9f64 Building: Boost dependency errors
Fixes #15999
2024-08-22 18:50:24 -05:00
wandererfan
2caf34c466 [TD]fix crash on Cosmetic line > 10m 2024-08-19 12:34:53 -04:00
wandererfan
7cce01368c [TD]fix asCircle error calculation 2024-08-19 12:01:01 -04:00
wandererfan
526e6c5a62 [TD]remove spurious error messages 2024-06-13 19:25:29 -04:00
bgbsww
42eb4fdda6 Guard all uses of basic_random_generator for thread safety 2024-06-10 11:10:57 -05:00
WandererFan
50f970efd7 [TD]Cosmetic function overhaul (#14216)
* [TD]Cosmetic geometry and tools update

- all cosmetics to store geometry in same form
- all cosmetics to survive scaling and rotation
- extension functions to survive scaling and rotation

* [TD]overhaul leader point storage and editing

- add py routine makeLeader(points)

* [TD]add leader conversion utility

* [TD]Set Leader RotateWithView default to true

* [TD]fix intersection vertex position

* [TD]add CosmeticEdge::makeLineFromCanonicalPoints

* [TD]fix 2 Extension tools

- positioning in DrawCosmeticCircle
- mishandling of points in execLineParallelPerpendicular

* [TD]Remove duplicate constexpr

* [TD]fix 2x Cosmetic arc tools

* [TD]refactor LineFormat out of Cosmetic

* [TD]move cosmetic appearance settings to LineFormat

* [TD]remove 2 unused methods

* [TD]apply format to blue line & circle tools

* [TD]fix ballon arrowhead does not rotate with view

* [TD]fix CosmeticCircle3Points

* [TD]allow multiple cosmetic object deletions

* [TD]fix extend/shorten centerline
2024-05-23 09:41:42 -04:00
wandererfan
85be479fd6 [TD]fix Win CI fail a/c OCC Handle style 2024-05-21 14:14:16 -04:00
wandererfan
5f820b8b85 [TD]fix conversion of BSpline to Circle/Arc 2024-05-21 14:14:16 -04:00
PaddleStroke
41650a78d4 TechDraw: Implement 'Area' dimension. 2024-05-06 18:42:28 +02:00
wmayer
48ff9ad3a1 [TD]Refactor LTNP correction code for Dimensions
- additional geometry types

- add method to handle line like bsplines

- handle deleted ref body feature

- add test for empty savedGeometry

- add switch for matcher/LTNP on/off
2024-03-17 08:56:34 -04:00
pavltom
ff14c58ccc [TechDraw] Add Owner property to Symbols 2024-02-11 16:03:44 -05:00
pavltom
289dda439a [TechDraw] Use OCC to compute intersections of any types of curves 2023-12-02 13:54:37 -05:00
wandererfan
7301610a5f [TD]fix wrong include 2023-11-26 16:42:06 -05:00
wandererfan
80539ff4c4 [TD]initial implementation of cosmetic cicle command 2023-09-20 13:42:11 -04:00
wandererfan
41817c188f [TD]split GeometryObject 2023-08-18 15:18:42 -04:00
wandererfan
4ccb566b7d [TD]fix #9471 - prevent impossible centerline 2023-05-07 10:00:00 -04: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
wandererfan
ec1c458907 [TD]make BSpline::isLine a general purpose static method 2023-04-22 13:49:10 -04:00
wandererfan
8a11528a7e [TD]corrupt dim reference detect and correct 2023-03-22 20:09:35 -04:00
Uwe
fb13cbf4b5 [TD] fix compiler warning about code duplication and unused variable 2023-03-10 11:25:16 -05:00
wandererfan
1aa5026fd1 [TD]fix error from BSpline.asCircle 2023-03-09 13:40:16 -05:00
wandererfan
704fb894a5 [TD]getters and setters for geometry
- make attributes private (or protected) and use
  getters and setters instead of accessing attributes
  directly.
2023-02-28 08:15:06 -05:00
luzpaz
91a336b659 TechDraw: header uniformity + trailing whitespace 2023-01-21 20:11:08 -05:00
wandererfan
437457e996 [TD]remove obsolete log messages 2023-01-13 12:15:33 -05:00
wandererfan
88c7aac0d9 [TD]fix issues reported by 3d dimension testers
- correct interpretation of True vs Projected

- handle long subelement names in references

- fix "too small" value condition

- better error messages for bad dimension geometry
2023-01-07 16:32:03 -05:00
wandererfan
208104e9e0 [TD]Refactor Dimensions for 3d upgrade
- separate validation, geometry and reference handling into
  individual files
- improve 3d reference geometry handling
- eliminate duplicate dim creation code

- add Dimension reference repair dialog

- Refactor formatting out of DrawViewDimension

- move dimension repaint control to ViewProvider
2023-01-07 16:32:03 -05:00
wandererfan
0ff473a9b6 [TD]Complex Section - initial implementation 2022-10-28 08:47:45 -04:00
Uwe
d3c70c8740 [TD] E* - L*: remove unused includes
- also sort includes
- also additions to precompiled header
2022-10-05 03:43:42 +02:00
marioalexis
87dfe33833 TechDraw: Replace C cast 2022-09-18 11:06:51 -05:00
Benjamin Bræstrup Sayoc
b2a3d954ea [TechDraw] Improve readability of Geometry.cpp 2022-09-06 14:16:25 -04:00
wandererfan
aa2b1b8392 [TD]CI clang warnings 2022-09-05 17:48:38 -04:00
luz paz
7b10713d6f Fix typos and whitespace
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,anormal,apoints,ba,beginn,behaviour,bloaded,bottome,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,itsel,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oce,oder,ontop,orgin,orginx,orginy,ot,pard,parm,parms,pres,programm,que,rady,recurrance,ro,rougly,seperator,serie,sinc,siz,strack,substraction,te,technic,thist,thru,tread,uint,unter,uptodate,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,./src/Base/StackWalker.cpp,./build/doc/SourceDocu`
2022-08-23 18:49:47 +02:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Uwe
36add10c86 [TD] App: remove some superfluous nullptr checks 2022-07-19 02:03:50 +02:00
Uwe
19c8a76c62 [TD] App Headers: remove unused header - part 3/3 2022-03-25 01:13:34 +01:00
wmayer
e8f9c8a1d3 TD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
883012e4b0 TD: Fix several coverity issues:
* CID 316569: Uninitialized scalar variable
* CID 350651: Unchecked dynamic_cast
* CID 350565: Unchecked dynamic_cast
* CID 350595: Unchecked dynamic_cast
* CID 350638: Unchecked dynamic_cast
* CID 350547: Division or modulo by float zero
2022-03-13 15:40:49 +01:00