Commit Graph

645 Commits

Author SHA1 Message Date
Benjamin Nauck
3f79626799 Sketcher: Fix 513269 Variable copied when it could be moved 2025-05-03 23:38:05 +02:00
Benjamin Nauck
47a43e21b2 Sketcher: Fix · · ·
532547 Variable copied when it could be moved
2025-05-03 23:38:05 +02:00
Benjamin Nauck
6b87d7df22 Sketcher: Fix 512328 Use of auto that causes a copy 2025-05-03 23:38:05 +02:00
Benjamin Nauck
70d11e33dc Sketcher: Fix 529853 Variable copied when it could be moved 2025-05-03 23:38:05 +02:00
Benjamin Nauck
be264928fc Sketcher: Fix 515688, 513858, 515692, Variable copied
# Conflicts:
#	src/Mod/Sketcher/App/SketchObject.cpp
2025-05-03 23:38:05 +02:00
Benjamin Nauck
7f49a4e668 Sketcher: Fix 513105 Variable copied when it could be moved 2025-05-03 23:37:26 +02:00
Benjamin Nauck
de17a7acee Sketcher: 532658 Use of auto that causes a copy
Also fixes 532658
2025-05-03 23:37:26 +02:00
Benjamin Nauck
6adebe348e Sketcher: Fix 512301 Variable copied when it could be moved 2025-05-03 23:37:26 +02:00
Benjamin Nauck
53b9c54f97 Sketcher: Fix 512831 Variable copied when it could be moved 2025-05-03 23:37:26 +02:00
Benjamin Nauck
78e2a12d2d Sketcher: Fix 463717 Variable copied when it could be moved 2025-05-03 23:37:26 +02:00
Ajinkya Dahale
350a416708 Sketcher: Avoid an unnecessary geometry update when trimming 2025-04-28 11:11:57 -05:00
Ajinkya Dahale
5efb8e5e76 Sketcher: Add check for validity of geometry when trimming
Possibly solves #19425.
2025-04-17 15:37:42 +02: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
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
Ajinkya Dahale
23ecf94ab6 [Sketcher] Make trimmed curve(s) construction based on original 2025-04-10 09:20:18 +02:00
Ajinkya Dahale
08a66afbc8 [Sketcher] Add missing check when transforming constraints for trim
Fixes https://github.com/AstoCAD/FreeCAD/issues/24.
2025-04-10 09:20:18 +02:00
Ajinkya Dahale
2779f0b29f [Sketcher] Add missing check in deriveConstraintsForPieces
Fixes #19770.
2025-04-10 09:20:18 +02:00
Ajinkya Dahale
358942b771 [Sketcher] Fix issue in SketchObject::transferConstraints
Small but major oversight.
2025-04-10 09:20:18 +02:00
Ajinkya Dahale
f0d30cb570 [Sketcher] Adjust constraint changes when trimming
1. No longer applying equality constraints between new (circular) pieces since
they may cause issues.
2. Only transfer equality with a different curve to one of the pieces.
3. Re-added certain constraints (that applied to both ends of the original
curve) that were incorrectly excluded from modification/deletion at a certain
step.
4. Use C++20 `std::erase_if()` in trim
2025-04-10 09:20:18 +02: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
Benjamin Nauck
4b589088f6 Sketcher: Add #include <limits> where used 2025-03-31 23:52:38 +02:00
Chris Hennes
e7156aa326 Merge pull request #20496 from hyarion/refactor/cppify-constants 2025-03-29 18:43:40 -05:00
ashimabu
0317206930 Sketcher: Explicitly check fullyConstrainedChanged on solve (#20236) 2025-03-29 14:25:58 -05:00
Benjamin Nauck
b4eb28e50e Sketcher: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:39 +01:00
Chris Hennes
061876db82 Merge pull request #14176 from mosfet80/cleanmodPart
[mod:part] clean code
2025-03-17 11:13:19 -05: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
bofdahof
34881bc82e Sketcher: apply std::ranges 2025-03-16 17:18:12 -05:00
Luz Paz
17102251e5 Fix various typos 2025-03-14 12:37:12 -04:00
Chris Hennes
71906499c4 Merge pull request #19843 from Shkolik/sketcher_spline_intersection
fix #19831 Sketcher: Create external Intersection geometry not working with complex surfaces
2025-03-11 21:44:28 +00:00
Andrew Shkolik
27dd14174e fix #18356 Sketcher: External reference line defaults to geometry, but vertex does not 2025-03-04 21:29:54 -06:00
mosfet80
e38de93dfd Merge branch 'FreeCAD:main' into cleanmodPart 2025-03-04 15:26:14 +01:00
Andrew
f3643af82b Merge pull request #19747 from Shkolik/sketcher_datums_projection
fix #18894 Sketcher: Create external projection geometry not working with datum objects
2025-03-02 16:20:45 -06:00
Andrew Shkolik
e0cc02f730 Merge branch 'sketcher_spline_intersection' of https://github.com/Shkolik/FreeCAD into sketcher_spline_intersection 2025-02-28 12:34:14 -06:00
Andrew Shkolik
ec24bd8c21 fixes #19831 - additional code to cover projection of split curve edge 2025-02-28 12:33:56 -06:00
Andrea
0fbb300fe4 [mod:part] fix compile warning
.
2025-02-25 08:49:20 +01:00
pre-commit-ci[bot]
ceac12c388 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-25 07:45:29 +00:00
Andrew Shkolik
0921ed2969 fix #19831 Sketcher: Create external Intersection geometry not working with complex surfaces
Co-authored-by: Zheng Lei <realthunder.dev@gmail.com>
2025-02-25 01:36:25 -06:00
Andrew
0aed23ca81 fixes #19582 Sketcher - cannot project BSpline from another sketch (#19700)
Also fixes some other types of external geo

---------

Co-authored-by: Andrew Shkolik <andrew.shkolik@selerix.com>
Co-authored-by: realthunder <realthunder.dev@gmail.com>
2025-02-24 10:17:24 -06:00
Andrea
de9bd5e1ce change MIN_boost_version
ubuntu version 20.04 is no longer supported.
The minimum boost version used for freecad is now 1.74 (ubuntu 22.04) https://launchpad.net/ubuntu/jammy/+package/libboost-system-dev
2025-02-15 13:33:32 -06:00
mosfet80
cf5d66d201 clean SketchObject.cpp (#15728)
* clean SketchObject.cpp

Code clean 
small optimization

* Restore comment

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-02-10 11:04:26 -06:00
Ajinkya Dahale
80fa694270 [Sketcher] Incorporate suggestions by hyarion from #18916 2025-01-30 09:34:03 +01:00
Ajinkya Dahale
9238a7c1fd [Sketcher] More refactor of delConstraintOnPoint 2025-01-30 09:34:03 +01:00
Ajinkya Dahale
0358ff7ce2 [Sketcher] Refactor SketchObject::delConstraintOnPoint()
Note that for distance constraints we remove even if the constraint is not on the point.
2025-01-30 09:34:03 +01:00
Ajinkya Dahale
ab2e4adb31 [Sketcher] Refactor deleteUnusedInternalGeometryWhenBSpline 2025-01-30 09:34:03 +01:00
Ajinkya Dahale
502b7b9a3f [Sketcher] Fix some issues in trim
1. Don't bother deleting internal geometry first.
2. Don't assume all new constraints are well formed.
2025-01-30 09:34:03 +01:00
Ajinkya Dahale
909e5bfafb [Sketcher] Use replaceGeometries() in trim 2025-01-30 09:34:03 +01:00
Ajinkya Dahale
c8c8c2c208 [Sketcher] Move trim sub-steps to different functions 2025-01-30 09:34:03 +01:00
Ajinkya Dahale
77bb7ab2d4 [Sketcher] Move internal functions out of trim
Towards making it a function class or similar.
2025-01-30 09:34:03 +01:00
Benjamin Nauck
dd6aa9f3c7 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