Commit Graph

3414 Commits

Author SHA1 Message Date
Chris Hennes
f2e78e53e9 UI: Remove qPixmapFromMimeSource pixmap function
This function dates back to Qt3, and was removed in Qt4. Modern Qt no
longer uses this ui file entry, and in some circumstances the uic
complains about its presence.
2025-05-15 00:56:30 +02:00
Chris Hennes
f5806841b6 Merge pull request #19907 from benj5378/getAttribute
Base: make getAttribute template
2025-05-12 10:39:55 -05:00
Kacper Donat
f71e84cad9 Gui: Fix handling - character in OVP 2025-05-12 08:55:09 -05:00
Benjamin Bræstrup Sayoc
6786af6ef9 Everywhere: clean up getAttribute conversions 2025-05-09 15:54:57 +02:00
Benjamin Bræstrup Sayoc
492b8312b3 Base: make getAttribute template 2025-05-09 15:54:57 +02:00
bofdahof
998f4e4d45 Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Ladislav Michl
c293d74566 Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
bofdahof
838178bb1c Base: simplify Exception
Remove repetition. Add functions to replace macros, but keep macros
in use for now as some compilers have broken std::source_location
support.
2025-05-05 23:50:01 +02:00
Chris Hennes
e4b301a048 Merge pull request #20449 from hyarion/refactor/cpp20-contains
Avoid using `count` and `std::find` where `contains` and `isEmpty` express intent better
2025-05-05 10:31:33 -05:00
David Carter
24df826865 Merge pull request #21046 from davesrocketshop/issue_13922_2
Update module dependencies to ensure that automated testing code is considered as well as direct dependencies. Update some automated tests to eliminate unwanted dependencies.
2025-05-04 17:02:50 -05:00
Benjamin Nauck
b9ee64792d Part: use empty() and isEmpty() instead of count() where possible 2025-05-03 22:22:10 +02:00
Kacper Donat
ecdadf7955 Part: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Kacper Donat
caa841c960 Part: Add missing PartExports in Part Features 2025-04-26 14:23:25 +02:00
Kacper Donat
efbfa34aa1 Merge pull request #20778 from FlachyJoe/LockedProperty2
Prevent user to remove core properties
2025-04-23 00:23:37 +02:00
Pieter Hijma
50bf1cf120 [Core] Allow creating an editor with a frame
The default is to not have a frame as is custom before this change.
2025-04-22 23:56:07 +02:00
Florian Foinant-Willig
1ae550f6f4 Part: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
theo-vt
774ec2cc93 PartDesign: Center holes on sketch points as well as circles and arcs (#20583)
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-04-21 23:30:57 +02:00
Frank Martinez
23190abeb2 [Core] Fix Color transparency misinterpretation 2025-04-21 11:12:37 -05:00
Chris Hennes
318e0a6c45 Merge pull request #20835 from oursland/python-binding-generator-const
python: Make const methods declared const in C++.
2025-04-21 10:58:21 -05:00
Florian Foinant-Willig
065a8a2226 Core: Part::PartFeature should be Part::Feature 2025-04-21 10:51:15 -05:00
Jacob Oursland
bd9907a06d python: use const_cast<> to new() python types. 2025-04-16 20:32:04 -07:00
Jacob Oursland
5b81cd741a python: apply const method annotations to impls. 2025-04-16 20:32:04 -07:00
Jacob Oursland
605c094884 python: remove constmethod from non-const method. 2025-04-16 20:20:31 -07:00
PaddleStroke
755cabc5ba Sketcher: Refactor SketchObject::Fillet() (#20544)
* Sketcher: Refactor SketchObject::Fillet()

* Update Geometry.h

* Update Geometry.cpp

* Update SketchObject.cpp

* Fix line-circle tangent issue

* Replace M_PI

* Update Geometry.cpp

* Update Geometry.cpp

* Update src/Mod/Part/App/Geometry.cpp

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>

* Update Geometry.cpp

---------

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2025-04-15 20:01:31 +02:00
Benjamin Nauck
f932c7e4e0 Use Base::toRadians() instead of manually converting 2025-04-15 07:16:36 +02:00
Bas Ruigrok
921620ba8a Use longest edge in face for horizontal/vertical alignment (#20374)
* App: Add second direction to getCameraAlignmentDirection()

* Part: Find longest face edge for horizontal/vertical alignment

* Gui: Use longest face edge for horizontal/vertical alignment

* App: Improve horizontal/vertical alignment for Datums and LCS
2025-04-14 11:20:49 -05:00
Kacper Donat
a86c300688 Gui: Disable Show Placement for Body Features 2025-04-13 17:54:01 +02:00
Kacper Donat
b300c80b90 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
35a9673a75 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
7a12d2f96f 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
tritao
7986ea0cba PartGui: Convert XML bindings to Python bindings model. 2025-04-04 23:00:34 +02:00
Benjamin Nauck
d5447df72d Part: Add #include <limits> where used 2025-03-31 23:52:08 +02:00
Andrea
85179089b1 [mod] clean
code clean
2025-03-31 11:01:39 -05:00
Jonathan Zirkle
ee6f757c57 Mod: Convert from dynamic to static casts (#20452) 2025-03-31 15:17:51 +02:00
Chris Hennes
e7156aa326 Merge pull request #20496 from hyarion/refactor/cppify-constants 2025-03-29 18:43:40 -05:00
Benjamin Nauck
aad5e58955 Part: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:38 +01:00
mosfet80
96e8a9e83c Remove old GCC<=8 (#20508)
GCC version is always greater than 8
2025-03-29 12:21:36 +01:00
Joao Matos
faabc3d7d6 Part: Remove XML binding files.
This PR removes the Part XML API bindings files now that we have
equivalent Python binding files.
2025-03-25 21:28:52 +01:00
Joao Matos
6083315b04 Part: Convert XML bindings to Python (Part 2) 2025-03-25 19:55:36 +01:00
Joao Matos
e825ebe99d Part: Clean up XML bindings (Part 2)
This cleans up the XML bindings for Part in preparation for an upcoming
migration to Python bindings model.
2025-03-25 17:51:32 +01:00
tritao
ce8a545fb6 Part: Convert XML bindings to Python API bindings model. 2025-03-24 12:00:16 -05:00
tritao
d5a1098add Part: Remove Py_UNICODE usage from Part.makeWireString and FT2FC. 2025-03-23 22:49:13 +01:00
Roy-043
996fbe5410 Part: remove rogue margins from ui file
Added margin=0. Same as in DlgExportStep.ui:
718ac63365/src/Mod/Part/Gui/DlgExportStep.ui (L17-L19)
2025-03-23 14:09:11 +01:00
Chris Hennes
69bbee9583 Part: Ensure ShapeHistory is fully initialized
Coverity issue 515690
2025-03-22 07:15:15 +01:00
Chris Hennes
5aa1842dcc Part: Remove inefficient vector reserve()
Coverity issue 356645
2025-03-22 07:15:15 +01:00
Chris Hennes
0bfc459298 Part: Don't cast time_t to a potentially 32-bit type
Coverity (and possibly other static analyzers) detect when we attempt to use a time_t as what might be a 32-bit value, warning about Y2K38 safety. It is irrelevant in this case, but make the change to avoid the warning (so it doesn't hide any real problems).
2025-03-22 07:15:15 +01:00
mosfet80
3dd7a1cc52 Remove support to oldest occ <7.5 (#20084)
* remove support to oldest occ <7.5

The  os ubuntu 22.04 not supported use occ 7.5.1.
There is a lot of code implemented to support even older versions.
The patch removes support for versions lower than occ 7.5.0

* .

* move include library

#pieterhijma  change request :

* removed deprecated functions

get/setAngle functions has been removed with OCC 7.5
2025-03-21 13:06:47 +01:00
tritao
6c2c6847eb CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
Chris Hennes
5f623390fb Merge pull request #20142 from bofdahof/ranges
Apply C++20 std::ranges (mainly to std::find)
2025-03-17 03:08:27 -05:00
Chris Hennes
4fcdac28fb Merge pull request #19583 from hyarion/refactor/base-type
Refactor Base::Type
2025-03-17 00:03:22 -05:00