Commit Graph

3879 Commits

Author SHA1 Message Date
Abdullah Tahiri
7b053b5602 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
cc801790d7 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
4a0fa00e9e 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
38256931af 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
5958749b7a 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
wmayer
96219e72b5 + fix various warnings 2015-08-30 11:48:26 +02:00
wmayer
0a06b2b703 + fix various warnings 2015-08-29 23:01:19 +02:00
wmayer
9c15aa059e + fix 'switch' warnings 2015-08-29 22:26:48 +02:00
wmayer
996d96285c + fix various warnings 2015-08-29 22:12:33 +02:00
wmayer
4a176cbe29 + fix various warnings 2015-08-29 22:05:09 +02:00
wmayer
c1f96b20b1 + fix strict-aliasing warnings 2015-08-29 19:48:08 +02:00
wmayer
d681a9f3ce + fix author notice 2015-08-29 18:49:16 +02:00
Alexander Golubev
cb320a8a7b 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
588a6d7b70 Mod/Robot: fix yet another warning (potentialy harmful)
Warning was -Woverloaded-virtual
2015-08-29 18:36:03 +02:00
Alexander Golubev
c31c3a41da Mod/Spreadsheet: fix yet another warning (potentialy harmful)
Warning was -Woverloaded-virtual
2015-08-29 18:36:02 +02:00
Alexander Golubev
8fdf8367ad 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
5b469a4078 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
62d130bea0 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
dc94ec65b8 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
3055cb3b8e 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
928b632441 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
006b2c0cb0 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
9aca1e3b36 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
Yorik van Havre
a2cff0938e Arch: Fixed DAE export - fixes #2219 2015-08-28 17:46:52 -03:00
Przemo Firszt
052995a2a2 Material: Add missing Density fields using Tools
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-08-27 15:59:02 +01:00
Przemo Firszt
321a310481 Materials: Add Materials.ods file
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-08-27 15:59:02 +01:00
Przemo Firszt
06e9f7e505 Materials: Add Tools for FCMat<->ods conversion
Testing and proofreading by sgrogan

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-08-27 15:58:51 +01:00
Przemo Firszt
f4f086316c Materials: Update Readme.txt
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-08-27 15:58:31 +01:00
Przemo Firszt
7952e6f7f1 Material: Add TEMPLATE.FCMat file
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-08-27 15:58:31 +01:00
Przemo Firszt
31f387d113 Material: Clean material files
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-08-27 15:58:31 +01:00
wmayer
a3403455bd + fixes #0002229: some ttf fonts make Draft.makeShapeString crash 2015-08-26 22:56:37 +02:00
Yorik van Havre
293b16f94a Arch: IFC exporter now exports cloned Arch objects with shared geometry 2015-08-25 22:11:40 -03:00
wmayer
fc9d1e86ac + support of checkable commands 2015-08-25 18:01:37 +02:00
Yorik van Havre
c2bc94a1e2 Arch: IFC importer now treats objects with shared shapes as clones 2015-08-21 11:42:42 -03:00
wmayer
3a373a7272 + algorithm to split a segment from the mesh 2015-08-20 08:49:22 +02:00
Przemo Firszt
15d11c67c8 FEM: Force consistent DENSITY formatting
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-08-18 13:44:28 +01:00
Przemo Firszt
d74600191e Tests, FEM: Fix inp file writing test
It's a compare line-by-line without comment lines now instead of
previously used md5 sum comparison.

inp pre filtering method suggested by Far-Zer
File location fixes by wmayer

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-08-18 13:44:28 +01:00
Yorik van Havre
c34af8ff20 Arch: Minor fix in OBJ exporter - fixes #2216 2015-08-17 20:27:19 -03:00
Yorik van Havre
5f1dbcd6c4 Draft: Small fix in copying dimensions and texts (didn't take the original style) 2015-08-17 11:50:02 -03:00
Yorik van Havre
11070f42c0 Draft: Small fixes in the new DXF importer 2015-08-17 11:48:02 -03:00
Bernd Hahnebach
2f9cac52c3 Arch: fix in import structural analysis ifc 2015-08-14 18:14:30 -03:00
Yorik van Havre
f122b3bb27 Added preferences setting for default App::Annotation color 2015-08-13 23:12:00 -03:00
Yorik van Havre
82e7a1369c Merge branch 'master' of github.com:FreeCAD/FreeCAD 2015-08-13 15:55:43 -03:00
wmayer
896b566dd9 + test command to show race conditions in Console class
+ fix race conditions in Console class
2015-08-13 18:57:52 +02:00
Yorik van Havre
818f48a11d Draft: Added text support to new DXF importer - issue #2205 2015-08-13 10:06:43 -03:00
wmayer
5765af2017 + avoid slow heap checking in debug mode when loading a mesh file 2015-08-12 17:51:22 +02:00
wmayer
9b066225c1 + fix include dirs for DraftUtils 2015-08-12 17:34:09 +02:00
Yorik van Havre
413b9f8c64 Draft: Added blocks support to the new dxf importer #2205 2015-08-12 10:23:55 -03:00
Bernd Hahnebach
516dec264b Arch: remove trailling white spaces 2015-08-11 20:55:16 +02:00
Bernd Hahnebach
553101ff2b Arch: added object types to struct ifc import 2015-08-11 11:05:16 -03:00