Commit Graph

5904 Commits

Author SHA1 Message Date
Abdullah Tahiri
4b0bd78814 Sketcher: Bug fixes to Auto-Update Mode
=======================================

- Fixing toggle AutoUpdate Mode
- Fix Auto-Update Sketcher tools
- Fix missing createGeo recomputes
- Missing constraints recomputes fixed

Various fixes for non-Update mode:
- Fixes lack of update upon entering a conflicting datum constraint.
- Fixes lack of update upon setting the reference/driving status of a constraint

- Added tooltips to buttons
2015-06-15 22:55:04 +02:00
Abdullah Tahiri
339717c96f Sketcher: Bug fix of New Solver Model: DoF and solver update on deletion of constraints
=========================================================

Upon deletion of a constraint, the constraint was still enforced for UI operations (dragging of a point) and DoF was not updated.
2015-06-15 22:54:49 +02:00
Abdullah Tahiri
a21265f9b6 Sketcher: New Feature: Avoiding to continuously recompute all the sketch (and dependent objects)
======================================================================================

There is a checkbox, default disabled, that makes the commands NOT to generate a recompute after each.
This means that if you are editing a sketch that is used to generate a pad or pocket, if the checkbox is
disabled, the dependent objects do not get recomputed.

There is a button next to it to force a manual recompute, in case it is needed.

If the user wants the previous behavior, he only needs to activate the checkbox. The previous status of the box
is restored upon entering a sketch in edit mode.

It is remarkable the case of the Fillet and Trim

On changing ActSketch (solvedSketch) to SketchObject and making movePoint not systematically update the geometry, the solving in MovePoint was confronted with solving for "the last solved geometry",
which is the default behaviour, in some situations (Fillet and Trim) where geometry had changed at SketchObject level, and was the subject of the moving actions.

MovePoint has been updated to take an extra optional parameter, to force the change in solved geometry in those situations.

Some other minor bug also fixed in Fillet creation in CommandCreateGeo.cpp

This commit also introduces conditional recompute on some operations of:
- constraints
- geometry creation (reubication of update active to comprise the autoconstraints within a single UpdateActive)
2015-06-15 22:54:32 +02:00
Abdullah Tahiri
0e92e6356f Sketcher: Major re-structuration: New Solving Model: General Sketch Solve call reduction
=======================================================================================

ActSketch in ViewProvider dissapears. The temporal sketch (sketch.cpp) for solving is now a data member of SketchObject.cpp (hereinafter solvedSketch). All the solving is concentrated in SketchObject.cpp.

SketchObject provides an interface to expose its solver, as it is still currently needed for some UI operations from ViewProviderSketch, like dragging points (solving rubber bands).

ViewProviderSketch still can select whether to draw the solvedSketch geometry (previously ActSketch) geometry (UI staff) or the SketchObject geometry. Performancewise, it makes sense to separate this two
geometries, as the SketchObject one involves modifying the Geometry and Constraint Properties (including all the undo related functionality), which would mess the undo functinality and incur in a big
peformance penalisation while dragging. One characteristic of solvedSketch is that its geometry is solved, whereas the geometry of SketchObject may not have been solved yet.

These geometries may differ at for the following reasons:
1. The geometry corresponds to an ongoing dragging operation, so solvedSketch has the last calculated dragging geometry, while SketchObject has the one corresponding to initial position.
2. Geometry/constraints were added to the sketch, but no solve/execute was triggered yet (envisioned situation is the future group creation functionality not in this commit).

What do I gain?

- Inserting a (simple) geometry element now costs 1 solver execution.
- Inserting a constraint now costs 1 solver executions.

For reference, in previous versions inserting a constraint involved 5 solver executions.

The following information provide a historical review of the coding of this commit (formed of 10 squashed commits):

This is a general sketch solve call reduction, not only during geometry creation (this commit does not include until here any specific measure to reduce calls on geometry creation, that is another branch)

After a lot of profiling, it seems that the "cause"(tm) that creates so many solver calls is that every update generates a solving in ViewProviderSketch, regardless of the need for that update,
many times with the only aim of providing the DoF for the message dialog and keeping ActSketch in sync with SketchObject in case it is needed (currently UI moving points, constraints,...).

Sketch solver is now a data member of SketchObject instead of a temporal object that gets initilized and destroyed.

This allows:
1. Potentially more synergy reducing calls to setUpSketch (still to be seen, still to be optimized)
2. Allowing SketchObject to access the latest geometry that has been solved => In future, allow objects that use SketchObject to obtain the latest
solved geometry instead the geometry of SketchObject that may still be unsolved. This is relevant for drawing the geometry

No more solving in ViewProviderSketch. Solving a Sketch is now an exclusive competence of SketchObject.

There is however a lot of cleaning to do in ViewProviderSketch

(I mean, not that these commits are making a mess in VPSketch,
but that as a consequence of the changes, it should be possible to
optimize VPSketch, specially moving and drawing methods)

Very useful comment for future developers that may wonder why a solve per constraint just upon addition is necessary.

Added a new function to get the size of the geometry of the instance of the solver object (Sketch.cpp).
The previous way was to extract the geometry, which is costly and error prone, as you have to delete it afterwards.

Inserted comment about the necessity of triggering a Part2D update during edit mode
2015-06-15 22:53:59 +02:00
wmayer
280019ddf9 + implement Geometry.copy for Python 2015-06-15 21:28:29 +02:00
Eivind Kvedalen
f99fd100e6 Added zoom and automatic refresh of dependency graph view. 2015-06-15 11:32:24 +02:00
Yorik van Havre
1749ff2d5d Added a Revert command to the File menu - fixes #2040 2015-06-14 22:58:07 -03:00
Yorik van Havre
d0cfe4b010 Arch: Allow to build Arch objects from Part Compounds - fixes #2095
Arch objects can now be based on a Part Compound and will take
its DiffuseColor property. Arch objects that are clones of
such objects will also copy that property.
2015-06-14 18:36:54 -03:00
Eivind Kvedalen
d0d98b8775 Spreadsheet: Fixed exception bug in SheetPy::setCustomAttributes(...). 2015-06-13 12:48:21 +02:00
Eivind Kvedalen
e864bb8d92 Spreadsheet: Added test macro. 2015-06-13 12:47:52 +02:00
Eivind Kvedalen
efc21a5a63 Spreadsheet: Removed superfluous fc_target_copy_resource call in CMakeLists.txt. 2015-06-13 12:47:36 +02:00
Eivind Kvedalen
9d5d05a708 Spreadsheet: Fixed handling of unary minus/plus, exponentation order, and unit rule (#2099) 2015-06-13 12:47:19 +02:00
Eivind Kvedalen
12e4d59458 Spreadsheet: Fixed bug in setEdit method for Spreadsheet module (#2144) 2015-06-13 12:46:53 +02:00
Yorik van Havre
edbbcfb790 Draft: Fixed placement of one-face Facebinders 2015-06-12 11:08:49 -03:00
Yorik van Havre
40f8bb4143 Arch: Fixed encoding bug in IFC export 2015-06-11 23:02:29 -03:00
wmayer
5040a97b0b + filter out removed workbenches 2015-06-11 00:19:20 +02:00
wmayer
4a7419c064 + fix whitespaces 2015-06-10 23:21:46 +02:00
Przemo Firszt
615d037de0 App: Add workbenches with unknown status to enabled list
Newly installed workbenches are not on enabled nor disabled list, so
they were treated as disabled. That behaviur could be confusing for
the user as a newly installed workbench was not shouwing up on the
workbench list. This commit changes that behaviour and new workbenches
are enabled by default.

Reported-by: r-frank
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-10 22:11:24 +02:00
wmayer
4f5534a87a + fixes #0002116: FreeCAD crash when I click on treeview 2015-06-09 21:55:35 +02:00
wmayer
54317becbf + fix writing STEP settings 2015-06-09 21:23:16 +02:00
Przemo Firszt
3a7772d0f7 FEM: Save/restore result dialog settings
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-09 13:07:49 -03:00
Przemo Firszt
793a5b79f1 FEM: Rename dialog element callbacks
Also setDisplacement function has been removed

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-09 13:07:49 -03:00
Przemo Firszt
5853eabc62 FEM: Always import FemGui
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-09 13:07:49 -03:00
Przemo Firszt
6de28c158d FEM: fix white space
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-09 13:07:49 -03:00
Przemo Firszt
f5146b8d43 App: fix typo
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-09 13:07:49 -03:00
Przemo Firszt
9766893be1 FEM: Change FEM results selection to radio buttons
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-09 13:07:49 -03:00
Przemo Firszt
f29b003810 FEM: Add reset_mesh_color and reset_mesh_deformation functions
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-09 13:07:49 -03:00
Przemo Firszt
ca47eeaeff FEM: Remove unused property
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-09 13:07:49 -03:00
Przemo Firszt
6df5809c33 FEM: Optimise check_prerequisities
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-09 13:07:49 -03:00
Przemo Firszt
da83e47241 FEM: Remove old results before loading new set
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-09 13:07:49 -03:00
Przemo Firszt
157399e395 FEM: Fix problem with using old displacement value after recalculation
Reported-by: bernd
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-09 13:07:49 -03:00
Yorik van Havre
beedcc06fe New splashscreen 2015-06-09 11:36:19 -03:00
Yorik van Havre
895510e08d Draft: small bugfix in Drawing view 2015-06-08 19:05:37 -03:00
Yorik van Havre
48113f3bca Arch: Fixed encoding in IFC import - fixes #2149 2015-06-06 12:52:44 -03:00
Ian Rees
418cefd7ee Cleaning up compile warnings, mainly in Sketcher
fabs() instead of std::abs(), add cmath include
2015-06-04 18:12:39 +02:00
DeepSOIC
37fbcb64a6 Part: new tools - JoinFeatures (Connect, Embed and Cutout)
Attributions:
Mark (quick61) - icons
Yorik - help with internationalization
Everyone who appeared in forum thread "A new Part tool is being born...
JoinFeatures!" - for endorsement!
http://forum.freecadweb.org/viewtopic.php?f=22&t=11112
2015-06-04 09:47:59 +02:00
Ian Rees
5ced7e5cbe Add #include that's required with Homebrew 2015-06-04 09:54:20 +12:00
wmayer
c3808cd991 + Use update mechanism for CmdSketcherToggleConstruction 2015-06-03 19:12:48 +02:00
wmayer
cf1a77a44d + Use update mechanism for CmdSketcherToggleDrivingConstraint 2015-06-03 18:31:30 +02:00
wmayer
c91018946c + Extend Command framework to allow to update QAction 2015-06-03 18:30:36 +02:00
Yorik van Havre
0fec404c6d Arch: fixed Label encoding in IFC export 2015-06-02 19:58:59 -03:00
wmayer
1808fd83ed Expose attribute to Python to access icon of view provider 2015-06-02 16:21:56 +02:00
Przemo Firszt
4e94c02dda FEM: Rename animateNodes to applyDisplacementToNodes
Also animateNodes is now applyDisplacementToNodes.
The funcions are not doing animation, but are responsible
for deforming mesh.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-02 11:35:34 +01:00
Przemo Firszt
8195ce579b FEM: Remove not used setColorStress function
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-02 11:35:34 +01:00
Przemo Firszt
aed303f4ff FEM: Add curly brackets to one line for/if or if/if commands
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-02 11:35:34 +01:00
Przemo Firszt
70318d7820 FEM: Disable Show result button if there are no results in analysis
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-02 11:35:34 +01:00
Przemo Firszt
749e772d85 FEM: Add Purge FEM results button
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-02 11:35:34 +01:00
Przemo Firszt
97a6333f87 FEM: Simplify setting FEM results when user selected None
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-02 11:35:34 +01:00
Przemo Firszt
302dbbf0be FEM: Fix problem with Show button not reverting mesh deformation
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-02 11:35:34 +01:00
Przemo Firszt
dc7da86261 FEM: Don't use bool as variable name
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-06-02 11:35:21 +01:00