Commit Graph

79 Commits

Author SHA1 Message Date
drwho495
f818535768 Toponaming: Fix bad element map in Part Design Bodies (#22767) 2025-08-11 10:41:39 -05:00
Chris Hennes
952485dcbb Merge pull request #19907 from benj5378/getAttribute
Base: make getAttribute template
2025-05-12 10:39:55 -05:00
Benjamin Bræstrup Sayoc
2b1aec0041 Base: make getAttribute template 2025-05-09 15:54:57 +02:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Kacper Donat
77e40b9747 Base: Use explicit pointer syntax for freecad_cast (#20694)
* Base: Use explicit pointer syntax for freecad_cast

This aligns our custom cast with other casts

* All: Use explicit pointer syntax for freecad_cast
2025-04-11 14:11:33 +00:00
Kacper Donat
9d97d1c895 Base: Rename Base::freecad_dynamic_cast into freecad_cast
This is to make it shorter and easier to use. QT does the same thing
with their qobject_cast.
2025-04-07 10:32:28 -05:00
luzpaz
e526547885 Fix various typos (#20651)
* Fix various typos
Found via `codespell -q 3 -L aci,addmin,ake,aline,alle,alledges,alocation,als,ang,anid,anormal,anull,aply,apoints,ba,beginn,behaviour,bloaded,bottome,brushin,bu,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,documentin,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,findn,fle,freez,graphin,groupe,hist,iff,incrementin,indexin,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,itsel,kilometre,leadin,localy,lod,mantatory,matc,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,renderin,re-use,re-used,re-using,rin,ro,rougly,sectionin,seperator,sergent,serie,shs,sinc,siz,som,stpo,strack,substraction,te,technic,thist,thru,tread,tru,ue,uint,unter,uupper,uptodate,vas,vertexes,vew,wallthickness,whitespaces -S "./.git,*.po,*.ts,*.pdf,./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/SourceDoc,./tools/build/WindowsInstaller/lang,./src/Mod/TechDraw/Templates/locale"`

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-05 22:58:20 -05:00
André Althaus
7409e99960 Always update the element map version if it's not valid or unknown
_Ver can contain "?" after loading and in some circumstances this is not
cleared (often by setValue()) before saving (MultiPattern children or empty Part::Feature).
When saved the same "?" is then written again to the file causing the
recomputing dialog to pop up again and again.

This not only checks for an empty _Ver but also explicitly for "?" and
then regenerating the version if necessary.
2025-02-24 17:00:18 +00:00
Chris Hennes
ec050db9a8 Merge pull request #18791 from CalligaroV/toponaming-ElementMapVersion-code-from-LS3
[Toponaming] Import code releted to _ElementMapVersion from LS3
2025-02-14 10:54:38 -06:00
Benjamin Nauck
6f535f19fb Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's
Regex based changes, manually verified
2025-01-27 16:08:18 +01:00
Zheng, Lei
2addda9126 Toponaming: import code related to ElementMapVersion from LS3
*Imported original code
2025-01-03 14:15:19 +01:00
bgbsww
16129930ab Add override flag for recomputes; set it in relevant tests with old files. 2024-09-16 17:49:35 +02:00
bgbsww
4a04a7eb91 Move code for recompute dialog and disable warning 2024-09-16 17:49:35 +02:00
bgbsww
608c80b5a3 Toponaming: Remove remaining FC_USE_TNP_FIX defines 2024-08-31 13:21:10 -05:00
bgbsww
a0b44f8405 Toponaming: Fix PropertyTopoShape restore; tweak Loft test; missing TopoShape method. 2024-08-07 20:31:21 -05:00
Zheng, Lei
a322f100f1 Toponaming: Transfer in getLinksTo 2024-07-21 17:36:50 -04:00
bgbsww
33d35a40c4 Adjust PropertyTopoShape::Save code for correctness. 2024-07-08 21:18:32 -05:00
bgbsww
abd72387fa Toponaming: Bugfix #14952 2024-06-28 19:29:26 -05:00
bgbsww
aa66518568 Toponaming: Fix save and restore of elementmaps 2024-06-23 23:33:12 -04:00
bgbsww
e50ef22e7b Minor test tweaks, and small fixes to pass tests 2024-05-17 19:14:01 -05:00
bgbsww
b710444271 Rewrite PropertyTopoShape::getShape to fix dangling reference 2024-04-01 16:54:59 -05:00
bgbsww
16eecee812 Toposhape/Part:: Fix, relocate and test element methods in ComplexGeoData and TopoShape 2024-03-07 23:00:48 -05:00
bgbsww
5892a8339e Toponaming/Part: Cleanups, problem fixes, and tests 2024-03-04 16:04:01 -05:00
Zheng, Lei
09a5ceca03 Toposhape/Part: Transfer in PropoertyTopoShape and related 2024-03-01 07:55:12 -05:00
wmayer
b9e9fe435a Part: modernize C++: use equals default 2023-08-22 15:14:03 +02:00
wmayer
7cb51a4980 Part: modernize C++: use range-based for loop 2023-08-16 21:56:32 -05:00
wmayer
22e6e2cd40 Part/PD: modernize C++: redundant void arg 2023-08-05 16:50:31 +02:00
marioalexis
acdfde774a Part: Replace C cast 2022-09-18 11:06:51 -05:00
Uwe
276582b4dd [Part] Prim* to Sur*: remove unneeded includes
- also sort includes
2022-07-03 19:32:28 +02:00
andrea
c66aadeb60 removed references to OCC<7 2022-06-25 14:29:24 +02:00
wmayer
8b9484c82f App: add pure virtual methods to PropertyGeometry to delegate it to the geometry of sub-classes
Following the law of Demeter add some wrapper methods to PropertyGeometry and implement them in sub-classes. As a side-effect this makes some const_cast obsolete
2022-06-24 16:15:02 +02:00
Zheng, Lei
8bec44934b Fix mixed line endings 2022-04-26 12:52:55 -05:00
Chris Hennes
2ecc125497 Part: PR6497 move return statement to new line 2022-03-29 12:37:00 -05:00
wmayer
40ba077f85 Part: [skip ci] print warning only if eof bit is not set, i.e. ignore it for empty files 2022-03-17 20:24:06 +01:00
Uwe
e4777d16f8 [Part] remove unused variable
MSVC complained about it
2022-03-12 15:44:27 +01:00
wmayer
ec8353ba99 Part: refactor PropertyPartShape::SaveDocFile and PropertyPartShape::RestoreDocFile
Set exception mask of std::istream::failbit | std::istream::badbit to istream to make sure it raises an exception for corrupted input files.
See: https://forum.freecadweb.org/viewtopic.php?p=536747
2022-03-11 22:06:38 +01:00
wmayer
d80e83a517 Part: set explicit format version number for BRep files to support all OCC versions 2021-12-11 23:31:41 +01:00
luz paz
e0ab0382b3 Part: remove py2 code 2021-04-25 11:29:35 +02:00
wmayer
8dfce38041 Part: [skip ci] implement getPyObject/setPyObject of TopoShape class 2020-10-16 13:46:44 +02:00
luz.paz
17ada69518 Part: [skip ci] fix header uniformity
This PR fixes header uniformity across all Part WB files
2019-12-22 00:59:47 +01:00
wmayer
e48c52c480 force strict ISO C++ (-Wpedantic)
for Drawing, Image, Inspection, Mesh, MeshPart, Part, Path, Points, Raytracing, ReverseEngineering, Spreadsheet, Start, Surface, Web

TODO: fix several -Woverflow in area
2019-09-18 11:32:42 +02:00
wmayer
fb3eb85586 add missing std:: namespace to build on Debian 10 2019-08-21 16:31:00 +02:00
wmayer
6795a28c99 add missing std:: namespace to build on Debian 10 2019-08-21 00:12:50 +02:00
Abdullah Tahiri
216926233f Part: Make 3rd party libraries into PCH 2019-05-02 07:09:22 +02:00
wmayer
047a18ccb5 PVS: V601 The bool type is implicitly cast to the double type
PVS: V668 There is no sense in testing pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error
2019-03-13 14:09:10 +01:00
wmayer
1c7a41af58 fix -Wignored-qualifiers 2018-08-19 12:38:57 +02:00
Markus Lampert
e13c09235f Changed all catch types to references for polymorphic exceptions. 2018-08-08 15:45:30 +02:00
luz.paz
424cd49398 Typos and whitespace fixes 2018-08-07 11:13:31 -04:00
wmayer
4bf5a5f3b3 backport to OCCT < 6.8 2018-08-07 16:56:33 +02:00
Zheng, Lei
4028057b3c PropertyPartShape: remove CopyShapeOnSave parameter 2018-08-06 19:01:37 +02:00