Commit Graph

6081 Commits

Author SHA1 Message Date
Yorik van Havre
d0e43137ce Draft: Fixed translation again 2015-09-01 10:50:23 -03:00
Yorik van Havre
d38863538c Merge branch 'master' of github.com:FreeCAD/FreeCAD 2015-09-01 10:47:47 -03:00
Yorik van Havre
2aff34eab8 Draft/Arch: Used new PropertyVectorDistance where needed 2015-09-01 10:47:25 -03:00
Yorik van Havre
4daf44b925 Draft: Fixed small issue in translation 2015-09-01 10:46:21 -03:00
wmayer
3a4e93bb3d + implement method getPointNormals 2015-09-01 14:59:14 +02:00
wmayer
9846e52ed9 + fix flaws in class PropertyVectorDistance 2015-09-01 13:49:01 +02:00
wmayer
86a7ed44e0 + fix various warnings with VC++ 2015-09-01 12:50:10 +02:00
Yorik van Havre
e19e7336cd Added new property type: App::PropertyVectorDistance
This works exactly as a normal PropertyVector, but it
uses the Units-enabled GUI editor instead.
2015-08-31 22:57:29 -03:00
Yorik van Havre
1ed0ec974a Arch: Fixed crash when loading old files 2015-08-31 18:17:29 -03:00
Abdullah Tahiri
650f3282d5 Sketcher: Rename of the "Defaults" button of the advanced solver dialog
=======================================================================

Just renaming the button and adding a tooltip as discussed here:
http://forum.freecadweb.org/viewtopic.php?f=8&t=12180&start=30#p98221
2015-08-31 13:58:12 +02:00
wmayer
3807cbdb23 + improve whitespaces 2015-08-31 13:53:48 +02:00
Abdullah Tahiri
27bace846e Part Design: Bug fix Sketcher tools Menu in Part Design Menu
============================================================

As per forum request:
http://forum.freecadweb.org/viewtopic.php?f=10&t=11840&start=40#p97205

This actually was a bug of last year when I wanted to introduce it, coded it, but failed to actually make it shown.
2015-08-30 12:08:46 +02:00
Abdullah Tahiri
35b1b5bb04 Sketcher: SelectElementsAssociatedWithConstraints added to tools toolbar
========================================================================

By express request:
http://forum.freecadweb.org/viewtopic.php?f=10&t=11840&start=40#p97202
2015-08-30 12:08:46 +02:00
Abdullah Tahiri
927fca0ece Sketcher: Bug fix addGeometry list creation and construction lines
==================================================================

A recent improvement was to allow to create an object (several geometric elements) as construction lines
by providing an additional parameter as true (that defaults to false).

This introduced a bug, that when a list of geometries mixing construction and normal lines was added (with the parameter as false),
construction lines would be converted to normal lines.

This fixes the bug.
2015-08-30 12:08:45 +02:00
Abdullah Tahiri
9583ce4c70 Sketcher: Clone Copy and Sketcher Mirror icons by Jim 2015-08-30 12:08:45 +02:00
Abdullah Tahiri
d795eb2b7d Sketcher: New Functionality: Mirror full sketch
===============================================

Support for mirroring a full sketch.

A dialog appears allowing to select X, Y axis mirroring or mirroring about the origin of the sketch.
2015-08-30 12:08:44 +02:00
Abdullah Tahiri
0e01764f0b Sketcher: UI Copy/Clone as a single dropdown toolbar icon
=========================================================

This commit provides with a single toolbar button to select between a copy and clone.

Copy just copies the constraints.
Clone modifies the dimensional constraints to geometric constraints, so that the constrained geometry follows the changes in the original object.
2015-08-30 12:08:44 +02:00
Abdullah Tahiri
97d551b551 Sketcher: Extension of Copy/Array functionality to clone
=============================================================

This commit allows the user to select in advance whether he wants a simple copy or a clone.

This involves substitution of dimensional constraints in the copies by equality and parallel constraints.

Terminology change for Arrays, now it is Rectangular array
2015-08-30 12:08:43 +02:00
Abdullah Tahiri
6ea93a4a04 Sketcher: Symmetry/Copy/2DLinearArray art by Jim
SVG and XPM icons for copy and array creation by Jim
2015-08-30 12:08:42 +02:00
Abdullah Tahiri
6a16910ba5 Sketcher: UI Copy Support & 2D Array python command rework
==========================================================

- Support for copying geometric elements in the sketcher with Ctrl+C (or using the still missing icon). It will show you the vector of displacement from the
"reference point". The reference point can be chosen by the user (although it is not necessary to do it so) by making the point the user wish to be the reference point
the last selected element. It conveniently incorporates "autoconstraints", so that you can make this point (the one of the copy) directly coincident with any other point in the sketch.

- Python 2D array command modified to lock elements position using construction lines and constraints.
- Support for different spacing between u and v directions (the direction of the cols and the direction of the rows).

- Support to avoid copying DistanceX and DistanceY constraints when used for locking a point. This means that if the geometry that you copy(array) is
fully constraint, the resulting 2D array is also fully constraint.

- UI support for creating 2D linear arrays in the sketcher.
- Bug fix in python addArray, wrong line copy startingpoint calculation fixed.

How to create a 2D array in the sketcher:
1. Select your geometric elements.
2. Click the button
3. Fill in the rows/cols and preferences on spacing and constraining each element of the array
4. Click Ok
5. Define the direction of the cols of the array and click
2015-08-30 12:08:42 +02:00
Abdullah Tahiri
ee43612125 Sketcher: AddSymmetric End-to-End point tangency bug fix
========================================================

For a while End-to-endpoint tangency is implemented via AngleViaPoint constraint. The code was not recalculating the "value" of the constraint in this case.

This also forces to set the geometry first and constraints afterwards, as the AutoLockTangencyAndPerpty function requires a valid GeoId to operate (not a big deal anyway).

Correction of the condition to allow the symmetry when a single line is mirrored about a point pertaining to a geometric element.
2015-08-30 12:08:41 +02:00
Abdullah Tahiri
3eb8f21116 Sketcher: New Features: Python copy and array commands
======================================================

Two new python commands (no UI yet).

Copy: Copies the geoids in a list by a displacement given by a Vector3d:

App.ActiveDocument.Sketch001.addCopy([0,1,2,3,4,5],App.Vector(150,150,0))

Array: Copies the geoids in a list cols times in the displacement vector
direction and rows times in the perpendicular to the displacement vector:

App.ActiveDocument.Sketch001.addArray([0,1,2,3,4,5], App.Vector(150,150,0),3,4)

N.B.: You need to recompute or solve to update the view

App.ActiveDocument.recompute()

or

App.ActiveDocument.Sketch001.solve()
2015-08-30 12:08:40 +02:00
Abdullah Tahiri
359e9a5d78 Sketcher: New Feature: Symmetric tool
=====================================

Creates geometry symmetric to the selected one with respect to the last selected point or line.

It does not support the following constraints:

- Angle
- Horiz/vertical distance
- SnellLaw

Horizontal and Vertical (directional) dimensions removed from the the copying process when created
on a single edge (by picking one edge instead of two points), i.e. Constraint involving only one GeoId at "First".
2015-08-30 12:08:40 +02:00
Abdullah Tahiri
fbc6ed5c77 Sketcher: Bug fix: Wrong solver information upon failed solve
=============================================================

http://forum.freecadweb.org/viewtopic.php?f=10&t=11341&start=80#p92820

...I already have a minor bug, if you insert a conflicting dimensional constraint,
the solver information is not updated, the work-around is to hit "Manual Update".
2015-08-30 12:08:39 +02:00
Przemo Firszt
bade81ddcf Doc: Quarter doc main page is not FreeCAD documentation main page
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-08-30 11:59:21 +02:00
wmayer
32bcbda232 + fix various warnings 2015-08-30 11:48:26 +02:00
wmayer
cac09437c8 + fix various warnings 2015-08-29 23:01:19 +02:00
wmayer
13fa571c41 + fix 'switch' warnings 2015-08-29 22:26:48 +02:00
wmayer
f7eb1ef924 + fix various warnings 2015-08-29 22:12:33 +02:00
wmayer
cb16fec6bb + fix various warnings 2015-08-29 22:05:09 +02:00
wmayer
1a12d109e9 + fix strict-aliasing warnings 2015-08-29 19:48:08 +02:00
wmayer
023de9b0f8 + fix author notice 2015-08-29 18:49:16 +02:00
Alexander Golubev
4fcbff9d34 Mod/Complete: suppress a minor warning
The warning was dedicated to using of char as an array index.
2015-08-29 18:36:04 +02:00
Alexander Golubev
2d6e82fb2c Mod/Robot: fix yet another warning (potentialy harmful)
Warning was -Woverloaded-virtual
2015-08-29 18:36:03 +02:00
Alexander Golubev
d2176be234 Mod/Spreadsheet: fix yet another warning (potentialy harmful)
Warning was -Woverloaded-virtual
2015-08-29 18:36:02 +02:00
Alexander Golubev
a8634f09fc 3rdParty/salomesmesh: suppress several small warnings
Warnings was about a struct declared as type and as usual added several
additional brackets.
2015-08-29 18:36:01 +02:00
Alexander Golubev
c3dfc7e30c 3rdParty/salomesmesh: fix a couple error-prone warnings
The Warnings was about hiding bases class RemoveElement() and
RemoveFreeElement() virtual methodes which may caused calling wrong
function by bases class pointer.
2015-08-29 18:36:01 +02:00
Alexander Golubev
cf652c8410 Mod/Mesh: suppress bunch of warnings on C++11 usage
Warnings was like:
src/Mod/Mesh/App/WildMagic4/Wm4Vector4.cpp|21 col 49| warning: first declaration of static data member specialization of 'ZERO' outside namespace 'Wm4' is a C++11 extension [-Wc++11-extensions]
2015-08-29 18:36:00 +02:00
Alexander Golubev
de2f8a26b2 Mod/Spreadsheet: suppress warnings
Warnings was:
src/Mod/Spreadsheet/App/Expression.cpp|788 col 20| warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
2015-08-29 18:35:59 +02:00
Alexander Golubev
bbbefaf188 Mod/Sketcher: suppress warning
Warning was:
src/Mod/Sketcher/Gui/CommandConstraints.cpp|1031 col 28| warning: '&&' within '||' [-Wlogical-op-parentheses]
2015-08-29 18:35:58 +02:00
Alexander Golubev
cd9488daf7 Mod/Sketcher: add missing brackets in conditions
Warning was:
src/Mod/Sketcher/Gui/CommandConstraints.cpp|131 col 99| warning: '&&' within '||' [-Wlogical-op-parentheses]
2015-08-29 18:35:58 +02:00
Alexander Golubev
95f0decaa5 Mod/Robot: fix missing return statement
Warning was:
src/Mod/Robot/App/kdl_cp/chainjnttojacsolver.cpp|46 col 5| warning: control may reach end of non-void function [-Wreturn-type]
2015-08-29 18:35:57 +02:00
Alexander Golubev
cd0ae20ef5 Mod/Robot: fix some spaces and a couple of warnings
Warnings wsa:
src/Mod/Robot/App/kdl_cp/chaindynparam.cpp|105 col 5| warning: control may reach end of non-void function [-Wreturn-type]
src/Mod/Robot/App/kdl_cp/chainidsolver_recursive_newton_euler.cpp|82 col 5| warning: control may reach end of non-void function [-Wreturn-type]
2015-08-29 18:35:56 +02:00
Alexander Golubev
efb08237ac Mod/Robot: fix spacing and add a couple of FIXME's
It's to be considered to delete the class ChainIkSolverVel_pinv_nso:
it seems it's not used anythere and unmantained/unfinished for many years.
2015-08-29 18:35:55 +02:00
Alexander Golubev
4326c9657e Gui: fix constructor arguments due to prototype change
Warning message was:
src/Gui/DownloadManager.cpp|295 col 54| warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]
2015-08-29 18:35:55 +02:00
Alexander Golubev
80941aa0e0 Gui & Mod/Sketcher: use fabs() instead abs()
Warnings was like:
src/Mod/Sketcher/Gui/DrawSketchHandler.cpp|350 col 28| warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
Also see:
http://forum.freecadweb.org/viewtopic.php?t=10920
http://forum.freecadweb.org/viewtopic.php?f=10&t=5258
2015-08-29 18:35:54 +02:00
Alexander Golubev
774dac17ac salomesmesh: suppress several warnings
Warning was like:
src/3rdParty/salomesmesh/src/SMESHDS/SMESHDS_Mesh.cpp|1028 col 5| warning: add explicit braces to avoid dangling else [-Wdangling-else]
src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp|7377 col 27| warning: '&&' within '||' [-Wlogical-op-parentheses]
2015-08-29 18:35:53 +02:00
Alexander Golubev
b714b8f4ad salomsmesh: fix more bad conditions
warning was:
src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Penta_3D.cpp|832 col 9| warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
2015-08-29 18:35:52 +02:00
Alexander Golubev
a48d05e2bf salomesmesh: fix an error because of bad priorities in logial operators 2015-08-29 18:35:52 +02:00
Alexander Golubev
75ce52f6b8 salomesmesh: fix broken conditions
Warnings was:
src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp|617 col 19| warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
||   bool isAlgo = ( !anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO );
||                   ^                 ~~
src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp|2165 col 31| warning: '&&' within '||' [-Wlogical-op-parentheses]
||       if ( !aMinStr.IsEmpty() && !aMinStr.IsIntegerValue() ||
2015-08-29 18:35:51 +02:00