Commit Graph

651 Commits

Author SHA1 Message Date
Ajinkya Dahale
650ccb8b4e [Sketcher] Refactor SketchObject::toggleExternalGeometryFlag()
Doesn't seem to be used anywhere. Remove?
2025-05-19 20:24:17 +02:00
Ajinkya Dahale
3b19a1b2ac [Sketcher][WIP] Refactor SketchObject::generateId()
Should be just the same old loop and conditional rearrangement. However, not
confident that this behaves exactly the same as previously.
2025-05-19 20:24:17 +02:00
Ajinkya Dahale
85921bd478 [Sketcher] Use replaceGeometries() in split 2025-05-19 20:24:17 +02:00
PaddleStroke
90190f8d13 Core: restoreContent not restoring expressions (#21152) 2025-05-06 12:02:35 -05:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Ladislav Michl
9683cf1e4f Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Benjamin Nauck
52ac9873bf Sketcher: Fix 513269 Variable copied when it could be moved 2025-05-03 23:38:05 +02:00
Benjamin Nauck
2b6c9f7d92 Sketcher: Fix · · ·
532547 Variable copied when it could be moved
2025-05-03 23:38:05 +02:00
Benjamin Nauck
a8db75a35e Sketcher: Fix 512328 Use of auto that causes a copy 2025-05-03 23:38:05 +02:00
Benjamin Nauck
6e8e096198 Sketcher: Fix 529853 Variable copied when it could be moved 2025-05-03 23:38:05 +02:00
Benjamin Nauck
4c372cfde3 Sketcher: Fix 515688, 513858, 515692, Variable copied
# Conflicts:
#	src/Mod/Sketcher/App/SketchObject.cpp
2025-05-03 23:38:05 +02:00
Benjamin Nauck
d202f89f2c Sketcher: Fix 513105 Variable copied when it could be moved 2025-05-03 23:37:26 +02:00
Benjamin Nauck
3998f498a4 Sketcher: 532658 Use of auto that causes a copy
Also fixes 532658
2025-05-03 23:37:26 +02:00
Benjamin Nauck
05a4fb1bc3 Sketcher: Fix 512301 Variable copied when it could be moved 2025-05-03 23:37:26 +02:00
Benjamin Nauck
79e2d2f08d Sketcher: Fix 512831 Variable copied when it could be moved 2025-05-03 23:37:26 +02:00
Benjamin Nauck
2afc6bfeb8 Sketcher: Fix 463717 Variable copied when it could be moved 2025-05-03 23:37:26 +02:00
Ajinkya Dahale
0c068415b9 Sketcher: Avoid an unnecessary geometry update when trimming 2025-04-28 11:11:57 -05:00
Ajinkya Dahale
4598283cad Sketcher: Add check for validity of geometry when trimming
Possibly solves #19425.
2025-04-17 15:37:42 +02:00
PaddleStroke
cd423f04ad 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
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
Ajinkya Dahale
fa57c4d0df [Sketcher] Make trimmed curve(s) construction based on original 2025-04-10 09:20:18 +02:00
Ajinkya Dahale
32cf5fa61a [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
18fe29d0b5 [Sketcher] Add missing check in deriveConstraintsForPieces
Fixes #19770.
2025-04-10 09:20:18 +02:00
Ajinkya Dahale
59d652577b [Sketcher] Fix issue in SketchObject::transferConstraints
Small but major oversight.
2025-04-10 09:20:18 +02:00
Ajinkya Dahale
41e1b647ae [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
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
Benjamin Nauck
1cff040fbc Sketcher: Add #include <limits> where used 2025-03-31 23:52:38 +02:00
Chris Hennes
95fbd95950 Merge pull request #20496 from hyarion/refactor/cppify-constants 2025-03-29 18:43:40 -05:00
ashimabu
c2d46915d3 Sketcher: Explicitly check fullyConstrainedChanged on solve (#20236) 2025-03-29 14:25:58 -05:00
Benjamin Nauck
3279a1dd8f Sketcher: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:39 +01:00
Chris Hennes
b2862ceaba Merge pull request #14176 from mosfet80/cleanmodPart
[mod:part] clean code
2025-03-17 11:13:19 -05:00
Chris Hennes
9a77120e82 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
fb71aa3292 Sketcher: apply std::ranges 2025-03-16 17:18:12 -05:00
Luz Paz
6564a7b107 Fix various typos 2025-03-14 12:37:12 -04:00
Chris Hennes
7b4df25dc8 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
01ffabccaa fix #18356 Sketcher: External reference line defaults to geometry, but vertex does not 2025-03-04 21:29:54 -06:00
mosfet80
6f40ad5325 Merge branch 'FreeCAD:main' into cleanmodPart 2025-03-04 15:26:14 +01:00
Andrew
8605bc1747 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
dd76aa1aa7 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
90198413e7 fixes #19831 - additional code to cover projection of split curve edge 2025-02-28 12:33:56 -06:00
Andrea
d28391dfab [mod:part] fix compile warning
.
2025-02-25 08:49:20 +01:00
pre-commit-ci[bot]
c502fc26d4 [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
db78be8e59 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
5c7a65bdb9 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
146d8a356b 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
f0aa12497a 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
809c9f2109 [Sketcher] Incorporate suggestions by hyarion from #18916 2025-01-30 09:34:03 +01:00
Ajinkya Dahale
d4ed28888c [Sketcher] More refactor of delConstraintOnPoint 2025-01-30 09:34:03 +01:00
Ajinkya Dahale
e1d39925c2 [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