Commit Graph

29349 Commits

Author SHA1 Message Date
Abdullah Tahiri
c6459bb7d3 Utils refactor w/o commandcreategeo 2022-06-28 19:28:06 +02:00
Abdullah Tahiri
9da0f369b1 Utils: Conversion from 2d vector into XY plane 3d vector 2022-06-28 19:27:46 +02:00
Abdullah Tahiri
3cd34e1c38 Sketcher-Utils: vector of smart pointers to vector of pointers 2022-06-28 19:27:37 +02:00
Abdullah Tahiri
bae8050fac Sketcher-Utils: Refactor common code up 2022-06-28 19:27:20 +02:00
Paddle
f99abec58e Sketcher: Create Geometry ConstraintToAttachment function 2022-06-28 19:27:04 +02:00
Abdullah Tahiri
80cd03cded Sketcher: Cleanup obsolete DrawSketchHandlers 2022-06-28 19:22:58 +02:00
Abdullah Tahiri
df50dca01b PythonConverter-Sketcher: A class to convert sketcher geometries and constraints into the commands to generate them
===================================================================================================================

This class does not currently support all sketcher geometry and constraints, but it supports the most common types.
2022-06-28 18:59:06 +02:00
Abdullah Tahiri
c6aa3c91e6 ViewProviderSketch: Cursor movement and preselection at sketch coordinates
===============================================================================

- Support to programatically move the cursor to sketch coordinates
- Support to try preselection at a given sketch coordinates
2022-06-28 18:58:47 +02:00
Abdullah Tahiri
473c2efc38 Sketcher: SketchObject - Add ability to diagnose constraint redundancy before addition
======================================================================================

It preserves the SketchObject properties. Therefore it does not trigger any property update, redraws, ...
2022-06-28 18:58:15 +02:00
Abdullah Tahiri
f2c1f35aaf Sketcher: SolverGeometryExtension and sketch parameter information improvements
===============================================================================

* SolverGeometryExtension is extended to:
- Enable to determine whether the x or the y of a point is a dependent or independent parameter
- Extend SolverExtension to provide information on individual edge parameters
- Convenience access to DoF status

* Sketch (solver interface) is extended to store geometry parameter dependency state, for these reasons:

Geometry and Constraint solver information is generated when performing a full solve() [QR decomposition + minimization(e.g. DogLeg)].

Constraint information remains in the sketch object (not SketchObject, but sketch), which is then retrieved by SketchObject.

Geometry information is incorporated to the deep copy of Geometry that the sketch object comprises. However, this information is only
available outside the sketch object, if the Geometry property of SketchObject is assigned. This is always the situation after a successful
full solve. However, it is not the case in a successful temporary minimal diagnosis (here succesful relates to conflicting/redundant constraints and
convergence).

The lightweight solution is to keep a (shallow) copy of the SolverGeometryExtensions (shared pointer) to be retrieved by GeoId, which is what is provided.
2022-06-28 18:57:17 +02:00
Yorik van Havre
d847d309b0 Merge pull request #7109 from Roy-043/Draft-Fix-default-fillmode-in-DraftGui.py
Draft: Fix default fillmode in DraftGui.py
2022-06-28 15:50:21 +02:00
Roy-043
bc37be0c54 Draft: Fix default fillmode in DraftGui.py 2022-06-28 15:42:28 +02:00
wmayer
779128b5f4 Gui: get rid of some const_cast 2022-06-28 15:26:02 +02:00
tomate44
3af5cfaed6 Part: add method to project point on curve 2022-06-28 12:58:49 +02:00
wmayer
9a3258c9da Part: move BiArcs algorithm to its own class 2022-06-28 12:42:15 +02:00
wmayer
9de8b33bb4 Part: fix GeomBSplineCurve::toBiArcs
If tangent of start and end point are parallel then also check a tangent in between to make sure that it can be considered a straight line
See https://forum.freecadweb.org/viewtopic.php?f=8&t=69710
2022-06-28 11:26:35 +02:00
Uwe
0c797ae6a8 [Base] remove unused MSC code
this part was initially part of #7036 but then accidentally reverted
2022-06-28 00:58:12 +02:00
mosfet80
d162d9371c Remove old msc ver. Freecad 0.20 require 64 bit and windows 7 or higher. For this reason, msc libraries less than 1800 will no longer be used. (#7036)
* remove msc<1800
2022-06-28 00:42:33 +02:00
sliptonic
d13db0ea4c Merge pull request #7096 from sliptonic/bug/camotics
[Path] Fix import error if camotics not installed.
2022-06-27 08:53:26 -05:00
Yorik van Havre
657f04908f Merge pull request #7105 from Roy-043/Draft-Fix-align-working-plane-to-DatumPlane-bug
Draft: Fix align working plane to DatumPlane bug
2022-06-27 11:52:31 +02:00
Yorik van Havre
27bfa083b2 Update src/Mod/Draft/draftguitools/gui_selectplane.py
Co-authored-by: 0penBrain <48731257+0penBrain@users.noreply.github.com>
2022-06-27 11:51:51 +02:00
Roy-043
d69888b74d Draft: Fix align working plane to DatumPlane bug 2022-06-27 10:26:59 +02:00
Uwe
e8f3227191 [FEM] fix point filter initialization issue
- on opening the task dialog of existing point filter, the point value must be displayed
2022-06-27 01:07:36 +02:00
Uwe
3a86b17194 [TD] fix linker error with MSVC
patch by @wwmayer: https://forum.freecadweb.org/viewtopic.php?p=605472#p605472
many thanks!
2022-06-26 22:38:49 +02:00
sliptonic
a84220cd21 Also check that the module imports correctly 2022-06-26 14:09:28 -05:00
wmayer
8acfd5bce7 TD: minor fixes:
* remove superfluous semi-colons
* if a method is declared override then the keyword virtual should be dropped
2022-06-26 15:51:43 +02:00
wmayer
175ecbc50f Draft: handle the absence of the Drawing module in the unit tests 2022-06-26 12:07:48 +02:00
Abdullah Tahiri
8ee773362e Sketcher: Fix warning not all enum handled in switch 2022-06-26 06:39:10 +02:00
Abdullah Tahiri
073bf3215c Sketcher: Constraints - add ability to generate constraint type string 2022-06-25 19:18:15 +02:00
sliptonic
1f07083d4a Merge pull request #6760 from Russ4262/fix/dressup_leadinout
Path: Fixes #6693 - Add Z and K values to arc commands
2022-06-25 12:10:48 -05:00
Abdullah Tahiri
cd208c5477 Part: Geometry - Add Ellipse minor radio convenience function 2022-06-25 19:03:11 +02:00
Abdullah Tahiri
6a06f60ee3 Part: Geometry - function to get the conic axis direction 2022-06-25 19:03:11 +02:00
wmayer
7db925d991 App: fix memory leaks in Enumeration class and simplify code 2022-06-25 18:18:57 +02:00
wmayer
d7313598aa CMake: disable Drawing module by default 2022-06-25 18:10:06 +02:00
wmayer
02bc430fac Draft: handle the absence of the Drawing module in the unit tests 2022-06-25 18:05:23 +02:00
wmayer
2b04b01edc cppcoreguidelines-special-member-functions
* disable move constructor and move assignment for several core classes
2022-06-25 17:46:48 +02:00
wmayer
6b6df27df8 C++ core guidelines:
* ES.87: Don’t add redundant == or != to conditions
2022-06-25 17:38:57 +02:00
sliptonic
45b9f2a7aa Fix import error if camotics not installed. 2022-06-25 10:25:08 -05:00
wmayer
7de296b60e cppcoreguidelines-pro-type-union-access
According to https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Ru-pun using union for type-punning is undefined behaviour.
  See also https://en.wikipedia.org/wiki/Type_punning#Use_of_union. Replace it with std::memcpy.
2022-06-25 17:17:04 +02:00
marioalexis
14668197d1 Base: Minor changes in some Python docstrings 2022-06-25 17:12:06 +02:00
Uwe
999f3b85ee [PD] re-add accidentally removed code in commit 93525ff7 2022-06-25 16:44:44 +02:00
Uwe
1b2f0063a1 [PD] Hole initialization bugfix
- by default there is no hole head cut and therefore its parameter must be initialized as read-only (will be enably when user sets a head cut)

- also fix a typo

- also fix a UI file issue (automatically done by Qt Designer)
2022-06-25 16:36:50 +02:00
Wanderer Fan
175d2cf2dd [TD]remove build depend on DrawingWB 2022-06-25 10:22:30 -04:00
wmayer
4ec9c381d4 Part: re-add dropped parameter (93525ff7eb) 2022-06-25 16:14:14 +02:00
Kuzemko Alexsandr
0cd8fb12f3 [Part] Fix display "labelfillet" name for Chamfer and Fillet (#7083)
* Fix display "labelfillet" name for Chamfer and Fillet
* Synchronize options name with PartDesign_Chamfer. Proposed by  @Roy-043
@Roy-043 https://github.com/FreeCAD/FreeCAD/pull/7074#issuecomment-1165303970
2022-06-25 15:04:15 +02:00
andrea
93525ff7eb removed references to OCC<7 2022-06-25 14:29:24 +02:00
wmayer
e9890c0798 Gui/Mod: replace several reinterpret_cast with static_cast 2022-06-25 11:36:55 +02:00
Uwe
360b4282f7 [PD] Hole dialog fixes
- when there is no profile the change of the hole cut type was not handled
- for the deprecated hole cut types it must also be possible to use custom values
2022-06-25 03:31:27 +02:00
wmayer
1aa897d450 Fem: remove some superfluous const_cast 2022-06-24 19:43:33 +02:00
wmayer
8573d9f8b2 TD: fix possible dangling pointer in QGIHighlight 2022-06-24 17:39:33 +02:00