Commit Graph

1476 Commits

Author SHA1 Message Date
donovaly
b96813f064 TaskSketcherGeneral.ui: save horizontal space
The renderingOrder ListWidget consumes too much vertical space. In 99% of the cases it has only 3 entries but currently there is always space consumed for 10 entries.
Therefore use a size policy with 12 px for one entry and expanded if necessary to contain more entries
2019-08-02 17:28:02 +02:00
luz.paz
0f36eedc0b Fix typos
Found via `codespell -q 3 -I ../fc-word-whitelist.txt -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller`
2019-07-16 11:21:52 -03:00
donovaly
2c1e83ac9c uniforms option names and add tooltips for sketcher 2019-07-16 13:30:18 +02:00
Abdullah Tahiri
150d174e37 MSVC complains about missing header 2019-07-14 12:37:39 +02:00
Abdullah Tahiri
be79d3f6a0 GeometryExtensions: Add override when overriding virtual functions (EMCPP Item 12) 2019-07-14 12:37:37 +02:00
Abdullah Tahiri
d9d3b1a055 GCC 4.8 brace initializer requires double braces
================================================

GCC 7 and clang work fine without the extra set of braces.

std::array<T, N> is an aggregate that contains a C array. To initialize it, you need outer braces for the class itself and inner braces for the C array:

https://stackoverflow.com/questions/12844475/why-cant-simple-initialize-with-braces-2d-stdarray
2019-07-14 12:37:37 +02:00
Abdullah Tahiri
bc5c4f6afb Sketcher: GeometryExtension and ExternalGeometryExtension 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
0e8a2d27a3 Sketcher: Excise SketchGeometryExtension outside of SketchObject 2019-07-14 12:37:29 +02:00
Abdullah Tahiri
a6d1b899fa Sketcher: Python implementation of Sketcher geometry extension 2019-07-14 12:37:29 +02:00
Abdullah Tahiri
6b4148861d Part: Geometry Python interface to get/set an extension 2019-07-14 12:37:29 +02:00
Abdullah Tahiri
11478f4951 Sketcher Geometry Extension 2019-07-14 12:37:28 +02:00
Abdullah Tahiri
247e6a849b Sketcher: Add Sketcher Geometry Extension 2019-07-14 12:37:28 +02:00
Abdullah Tahiri
93d6514d11 Sketcher: Mode filter of Elements Widget
========================================

A combobox type filter to filter out on Normal geometry, Construction geometry, External geometry.

Useful, for example, to select and or delete only construction geometry.

It also fixes a bug, that external geometry was wrongly indexed in non-extended naming mode.
2019-07-01 13:49:06 +02:00
Abdullah Tahiri
0912fd0ee7 Sketcher: Fix Carbon copy leads to unsolvable sketch
====================================================

fixes #3973

https://forum.freecadweb.org/viewtopic.php?p=316251#p316198

This commit disables an old "axis orientation correction mode", which tried to
solve a problem with orientation of the axis. It never worked fine and it should
have never been introduced, as everything it intends to do should be done by
setting the appropriate placement offset.
2019-06-23 15:15:46 +02:00
Abdullah Tahiri
9fd2a2d9ff Sketcher: Fix carbon copy construction points
=============================================

fixes #3926

Points made of construction type are special non-constrainable points, such as (current) bspline knots.

This was not intended in Carbon Copy.
2019-06-22 23:15:07 +02:00
Abdullah Tahiri
7d0f8e2fa9 Sketcher: Polyline snap arc to 45 degrees bug fix
=================================================

fixes #3974

Snapping to 45 degrees during arc creation (hold ctrl during an arc within a polyline), resulted in
reduced precision, because Gui::Command::doCommand %f defaults only to six decimal positions, which is
a poor representation in radians of, for example, 90 degrees.

A work-around could have been to hardcode a higher number of decimals, as in %0.Xf. However, I do not like
such magic numbers.

The solution chosen is to use an App.Quantity object using as units degrees, which leads to no loss of precision.
2019-06-22 17:22:40 +02:00
Abdullah Tahiri
34402cbe90 Sketcher: fixes no horizontal/vertical on segment after horizontal/vertical alignment
=====================================================================================

Selecting first the horizontal/vertical constraint and applying to a line segment with
a previous horizontal/vertical alignment constraint caused FreeCAD to refuse applying it.

fixes #4013
2019-06-22 09:58:42 +02:00
Abdullah Tahiri
383885f2b5 Sketcher: Toolbar - add toggle deactivated state command 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
4dd484bd7e Sketcher: ViewProvider representation of deactivated constraints 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
a97bb669a9 Sketcher: Settings - Deactivated constraints color selection 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
3facea7ed0 Sketcher: Constraints' widget deactivated constraints commands and representation 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
a571376584 Sketcher: GUI command to activate/deactivate constraints 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
688641b8db Sketcher: Update icon resources 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
3d137cbf8d Sketcher: Art - Toggle Active Constraint icon 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
0e15d3461f Sketcher: Python interface to SketchObject constraint state 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
3a47e27ce4 Sketcher: Extend SketchObject to handle constraint state 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
3e72246e9f Sketcher: Solver interface of activated state 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
6a1863fe52 Sketcher: Python interface to contraints' activated state 2019-06-22 08:26:31 +02:00
Abdullah Tahiri
0b84325e5f Sketcher: Extend Constraints to have an activated boolean state 2019-06-22 08:26:31 +02:00
Yorik van Havre
ed8be15ef4 Merged translations from crowdin 2019-06-17 20:06:59 -03:00
Abdullah Tahiri
dbe917dcc7 GCS: Refactor and additional debug information
==============================================

In maximum verbose debug mode, information is given about the groups of Sketcher Constraints that the solver is considering for redundancy or conflict.

This is before the popularity contest selects the constraint shown in the solver messages.

The main reason for showing this is to enable to diagnose problems with sketches in which the constraint indicated as the redundant one appears not to
be the right one. Intended for power users with "iteration level" debug mode.
2019-06-17 14:05:24 +02:00
SmallSharky
3511f61672 [Sketcher] Fix initial autoconstraints behavior 2019-05-18 11:54:37 +02:00
wmayer
c1bc6421ef fix Sketcher build failure 2019-05-16 12:46:02 +02:00
Abdullah Tahiri
632d6c7926 PCH: Sketcher GUI PCH Enable 2019-05-16 12:46:02 +02:00
Yorik van Havre
2d47993780 Merged latest translations from crowdin 2019-05-10 19:19:37 -03:00
Yorik van Havre
9a1bb779c9 Updated master translation files 2019-05-10 19:15:33 -03:00
luz.paz
16809ceb4a Crowdin: fix grammatical error + whitespace
https://crowdin.com/translate/freecad/569/en-fi#6498705
2019-05-02 13:34:39 -03:00
Abdullah Tahiri
62e721e8fd Sketcher: GUI PCH 2019-05-02 07:12:51 +02:00
Abdullah Tahiri
893d7afccc Sketcher: PCH 2019-05-02 07:12:27 +02:00
Abdullah Tahiri
8350a6f55b PCH for Sketcher/PartDesign 2019-05-01 09:05:55 +02:00
luz.paz
b7b433e461 Misc. typo and whitespace fixes
Found via `codespell`
2019-04-30 10:15:59 -03:00
Abdullah Tahiri
2c6f941644 GCS: Partial refactoring of diagnose() and debug improvements 2019-04-24 17:56:37 +02:00
Abdullah Tahiri
c5ff5d9d48 Sketch: Verbose to console output malformed constraints that are ignored by the solver 2019-04-24 17:56:37 +02:00
Abdullah Tahiri
23f0be2129 Sketcher: Comment out very specific debug code 2019-04-24 17:56:37 +02:00
Abdullah Tahiri
6e1d6505cc Sketcher: Make PointPos modifiable from Python 2019-04-24 17:56:37 +02:00
Abdullah Tahiri
8b93107202 GCS: use at for map reading 2019-04-24 17:56:37 +02:00
wmayer
881b04a979 Fix several compiler warnings:
fix -Wunused-parameter
fix -Winconsistent-missing-override
fix -Wsometimes-uninitialized
2019-04-08 15:04:07 +02:00
Abdullah Tahiri
78965d27d6 Sketcher: Constraint improvements
=================================

Copy constructor made private, as copies are handled via copy() and clone() methods which generate pointers, not objects.
Private copy constructor, used for copy(),  made default implementation.
Destructor made default.
Copy and Clone made non-virtual, as the class does not have children.
Added override to persistance inherited virtual functions.
move operators explicitly disallowed to note that they are not intended in the current implementation.

Perfectly ok to have only private copy constructor for internal use
2019-04-08 14:35:47 +02:00
Abdullah Tahiri
5c6ab3d8c8 V1016 CWE-681 2019-04-08 14:35:47 +02:00
Abdullah Tahiri
befbc1d634 V547 CWE-571 2019-04-08 14:35:46 +02:00