Commit Graph

6635 Commits

Author SHA1 Message Date
Abdullah Tahiri
19c840e1ab Sketch: Solver: Extended Advanced Solver configuration
========================================================

This is an advanced setting just for allowing increased choices to power users that have problems with a given sketch and want to
test different flavours of DogLeg algorithm.

This commit does not change the default behaviour of FreeCAD. It is only intended to give more options to power users.

The advanced solver configuration is extended to support three different Gauss-newton steps for DogLeg:

FullPivLU => h_gn = Jx.fullPivLu().solve(-fx);
LeastNormFullPivLU => h_gn = Jx.adjoint()*(Jx*Jx.adjoint()).fullPivLu().solve(-fx);
LeastNormLdlt => h_gn = Jx.adjoint()*(Jx*Jx.adjoint()).ldlt().solve(-fx);

This setting is applied only to DogLeg. It is applied to DogLeg as normal or redundant solver, if DogLeg is the selected solver.

Selecting a solver different from DogLeg for both normal and redundant disables the setting.

We have been told:
https://forum.kde.org/viewtopic.php?f=74&t=129439#p346104

that our default Gauss-Newton step in DogLeg may not be adequate in general (we generally deal with underconstraint systems
unless we have a fully constraint sketch, and even then it is many times overconstraint at least for redundant solving).

We have been told that maybe these LeastNorm options are more suitable for us (performance set aside). This enables you as power
user to test if it works fine with FreeCAD.
2015-11-28 13:08:31 +01:00
Abdullah Tahiri
aa6908b144 Sketch: Solver Defaults: Sketch size multiplier OFF
===================================================

This commit sets the sketch size multiplier OFF by default (so the number of iterations DogLeg/BGFS/LM is not sketch size dependent).

In complicated sketches having a high number of parameters, with sketch multiplier on, the number of iterations is extremely high (100 parameters*100 iterations => 10000 iterations).

The idea of disabling this comes from tests performed by DeepSOIC and from my own experience using the Sketcher. In general
sketch multiplier makes FreeCAD unresposive (very high amount of iterations, not a real freeze) in big sketches so that users
end up killing the application. This is preventing the users from taking appropriate action, Developers from getting the information of the failure and
users angry.

The idea is that even for complicated sketchs N iterations (100 by default) should be enough to converge, if it is ever going to converge. Experience will tell us
if we have to increase this number in the range [100-300]. 100 iterations in complicated dossiers is in my experience generally under 30 seconds.

N.B.: This commit does not change the defaults stored in your computer, so if you have the sketcher multiplier on, the advanced solver dialog will still enforce this local setting. You
may disable it or click the "defaults" button to disable the sketcher multiplier.
2015-11-28 13:08:24 +01:00
Eivind Kvedalen
87c6af3547 Spreadsheet: Removed setPosition() function. 2015-11-28 12:56:28 +01:00
Eivind Kvedalen
b7480210fd Spreadsheet: Issue #2301: Handle enter/return and tab keys the same as e.g OpenOffice and Excel. 2015-11-28 12:56:27 +01:00
Eivind Kvedalen
2e5175c7be Spreadsheet: Fixed typo. 2015-11-28 12:56:26 +01:00
Eivind Kvedalen
45a2207f81 Spreadsheet: Improve python code when the Delete key is pressed. 2015-11-28 12:56:25 +01:00
Pablo Gil
8b745b3751 Adds the ViewFitSelection to the main toolbar (improves usability) 2015-11-27 10:59:15 +01:00
wmayer
559194edab + do view fit only on file import if document was empty 2015-11-26 20:24:00 +01:00
wmayer
898e0fb359 + make API of InventorBuilder more flexible and add new methods 2015-11-26 15:27:40 +01:00
Yorik van Havre
e0f3bb00b8 Relocated the WB switcher to its original location 2015-11-26 09:11:39 -02:00
Yorik van Havre
3d6869bf68 Added automatic Ctrl+Number shortcuts for the 10 first woekbenches 2015-11-26 09:11:39 -02:00
Yorik van Havre
7c5e8d58cb Split workbench selector and placed it left 2015-11-26 09:11:39 -02:00
wmayer
b3e0e8272f Merge branch 'master' of https://github.com/FreeCAD/FreeCAD 2015-11-25 21:02:17 +01:00
wmayer
6a6a2d5669 + fix whitespaces 2015-11-25 21:02:00 +01:00
Abdullah Tahiri
7c1c56a550 Sketcher: Solver Debug functionality: Ability to export a subsystem
===================================================================

It allows to export the c++ code to create a subsystem with the same information as the one solved using LM/DL/BGFS.

In this commit the functionality is disabled (for production).

To enable the functionality uncomment this line in planegcs/Constraints.h:
//#define _GCS_EXTRACT_SOLVER_SUBSYSTEM_

When enabled, upon solving with LM/DL/BGFS, the c++ code to generate the subsystem is added to a subsystem.txt that is created in the FreeCAD
execution directory.

Note that the file is created in append mode, so it will append all normal/redundant solvings until the file is deleted.

The resulting code can be directly pasted into a project similar to:
https://github.com/abdullahtahiriyo/Eigen_LUPiv_Convergence

Such a project only has libeigen as external dependency.
2015-11-25 20:39:04 +01:00
Yorik van Havre
14a771bf05 Arch: small fix in Arch git dialog 2015-11-25 13:17:54 -02:00
Yorik van Havre
a5852dd8f2 Material: Fixed the material editor dialog, thanks to rockn 2015-11-24 22:57:50 -02:00
wmayer
a029d90a98 FEM: Rename Display Modes 2015-11-23 18:17:10 +01:00
Abdullah Tahiri
ad1210f4bb Sketcher: Advanced solver dialog bug fix LM-tau
================================================

Due to a typo the code was setting LM-tau to 1E-80 by default instead of the intended 1E-3.
2015-11-21 22:48:02 +01:00
wmayer
bb1add4739 + Add export macro to Enumeration class 2015-11-21 22:46:42 +01:00
wmayer
2362239edf + Add Python example of embedding FreeCAD 2015-11-20 22:35:26 +01:00
Bernd Hahnebach
8ebf64ac3f FEM: add nodes of quad8, hexa20, penta6, penta15, pyra5, pyra13 to ViewProvider nodes are displayed 2015-11-19 19:01:23 +01:00
Bernd Hahnebach
758f3ec77e FEM: FemMesh VP throw exception instead of assert(0) 2015-11-19 19:01:07 +01:00
Bernd Hahnebach
2f5706262d FEM: add SMESH supported volumes to Python API of FemMesh 2015-11-19 19:00:52 +01:00
wmayer
c8e241c9f3 + PLate surface approximation 2015-11-19 18:52:19 +01:00
wmayer
13e2b24ddf + add Python binding to Plate surface 2015-11-19 15:27:35 +01:00
Przemo Firszt
fe522bc66b FEM, Tests: Fix line end problem in compare_inp_files
Add new function to force unix line ends and use it in compare_inp_files
and compare_stats.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-11-19 10:26:24 +01:00
DeepSOIC
ed8eab273d API: Update docu strings of methods of BSplineCurve
Mainly exposing argument types and meanings, but also updating a few
descriptions by copy-paste-editing documentation of corresponding
OpenCASCADE.
2015-11-19 02:53:48 +03:00
Przemo Firszt
c9cfc369d6 FEM: Use exisitng mesh property as link to mesh in result objects
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-11-18 11:22:02 +00:00
Przemo Firszt
3788670038 FEM: Tidy up long lines and spacing
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-11-18 11:21:27 +00:00
wmayer
3268acf9a2 + set object name to tool buttons with popup menu 2015-11-17 18:39:23 +01:00
wmayer
267f66539a Merge branch 'master' of https://github.com/FreeCAD/FreeCAD 2015-11-17 12:22:30 +01:00
wmayer
c159a8ddc2 + fix inconsistencies in using DynamicProperty class 2015-11-17 12:22:07 +01:00
wmayer
a839a13b59 + fix build failure with gcc 2015-11-16 23:21:47 +01:00
wmayer
78e9319587 Merge branch 'master' of https://github.com/FreeCAD/FreeCAD 2015-11-16 22:48:00 +01:00
wmayer
1225a7ac06 + support of adding/removing dynamic properties in property editor 2015-11-16 22:47:29 +01:00
Bernd Hahnebach
d37ac54c8e FEM: fix mixed line endings in VP FemMesh 2015-11-16 19:19:01 -02:00
Bernd Hahnebach
49b002beaf FEM: Mesh VP fix FreeCAD crash if not supported face is added to VP 2015-11-16 19:19:01 -02:00
Bernd Hahnebach
eec2b56629 FEM: add some documentation to FemTools 2015-11-16 19:19:01 -02:00
Bernd Hahnebach
01d3b3ecad FEM: substitute some camel style variable names in frdReader 2015-11-16 19:19:01 -02:00
Bernd Hahnebach
d14e79eafa FEM: use proper command to create a Mechanical Anaylsis with all properties 2015-11-16 19:19:01 -02:00
fandaL
36ffb450f1 FEM: frd import mesh 2015-11-16 19:18:11 -02:00
Przemo Firszt
dee8809454 FEM, Tests: Force unix line ends for comparing calculation stats
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-11-16 19:15:44 -02:00
Yorik van Havre
58b41b9550 Arch: Fixed flipped Space names 2015-11-16 16:11:32 -02:00
wmayer
ba21766096 + property editor handles case when dynamic property is removed 2015-11-16 15:24:36 +01:00
wmayer
4f4d747968 + fix undefined behaviour in determining grid length for planar meshes 2015-11-16 11:59:41 +01:00
Przemo Firszt
629a89218d FEM: Fix Von Mises calculation formula and update FEM test results
Reported-by: fandaL
Fixed-by: fandaL
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-11-14 14:53:37 +01:00
Przemo Firszt
b0fbd60835 FEM: Use format to avoid error is the message is not pure string
Traceback (most recent call last):
  File "/home/przemo/software/FreeCAD/build/Mod/Fem/TestFem.py", line
229, in test_new_analysis
    ret = self.compare_stats(fea, static_expected_values)
  File "/home/przemo/software/FreeCAD/build/Mod/Fem/TestFem.py", line
147, in compare_stats
    fcc_print(sf_content)
  File "/home/przemo/software/FreeCAD/build/Mod/Fem/TestFem.py", line
55, in fcc_print
    FreeCAD.Console.PrintMessage(message + '\n')
TypeError: can only concatenate list (not "str") to list

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-11-14 14:53:36 +01:00
wmayer
7848d08121 + properly handle case of degenerated bounding box when creating mesh grid 2015-11-14 14:08:01 +01:00
wmayer
821cd696c5 + do not set edit mode for spreadsheet 2015-11-14 02:18:29 +01:00