Commit Graph

1515 Commits

Author SHA1 Message Date
asapelkin
7b8f473cc9 used in-built methods instead of external algoritms 2019-11-21 18:57:06 +01:00
asapelkin
ced8100ab9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
howetuft
f1e3b7a166 Fix -Wredundant-move warnings, 2nd try
std::move is redundant when it is used to return a local object from a function (eg return std::move(local)): indeed, returning a local object from a function implicitly moves it. Moreover using std::move this way
See https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rf-return-move-local
However, in order to avoid -Wreturn-std-move as well, a Base object is move-constructed
from Derived when required.
2019-11-18 13:44:40 +01:00
wmayer
d488218701 [skip ci] fix more -Wgnu-zero-variadic-macro-arguments 2019-11-17 19:11:08 +01:00
wmayer
f0c89811bd add method to sketch object to get index by user-defined name 2019-10-29 19:35:53 +01:00
luz.paz
30d2e29e0c LGTM: various fixes for using string operator instead of numeric 2019-10-25 10:33:12 -03:00
luz.paz
30a717beac Fix typos and misc. formatting [skip ci]
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -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,./src/Doc/FreeCAD.uml`
2019-10-21 16:02:23 -03:00
wmayer
31ced049d9 abort hyperbola creation when angles are NaN 2019-10-17 00:22:39 +02:00
wmayer
84648aea62 improve strict ISO C++11 (-Wpedantic) 2019-10-14 10:54:57 +02:00
Zheng, Lei
8426ebe2ba Fix various Py::Object leak 2019-10-08 17:53:20 +02:00
luz.paz
044213d6ad Source typo fix (includes file rename) 2019-10-05 13:19:32 -04:00
vocx-fc
165cee243c Sketcher: ordered two items inside Sketcher.qrc 2019-10-05 16:37:31 +02:00
vocx-fc
ebfa628937 Sketcher: modify the permissions of the icons (755), so that they don't have the execute permission (644) 2019-10-05 16:37:22 +02:00
wmayer
3090bf19e9 fix build failure for Qt4 2019-10-03 11:19:02 +02:00
luz.paz
fb32601746 Fix various (doxy) typos and whitespace issues
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -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,./src/Doc/FreeCAD.uml`
2019-10-03 07:57:13 +02:00
wmayer
169eacf1ab fix crash when switching to fullscreen, back to normal and closing the sketcher 2019-09-30 23:55:11 +02:00
Zheng, Lei
38c47d6e95 Expression: split Expression.h to ExpressionParser.h
Split Expression details into a separate header to reduce recompilation
time on changes.
2019-09-28 15:30:41 +02:00
donovaly
0124ab9387 TaskSketcher_xxx.ui: use sensible minimal heights to avoid scaling problems
The problem is currently that if the user collapses the solver messages, the list views get too small. The reason is that there is no proper minimal height set. See the forum thread for screenshots of the fixes.

TaskSketcherMessages.ui: remove unnecessary space (saves also vertical space on small screens)
2019-09-28 12:28:50 +02:00
donovaly
d85c82be95 remove unnecessary whitespace from general sketcher dialog
There is too much whitespace, see https://forum.freecadweb.org/viewtopic.php?t=37935&p=324176
2019-09-28 12:28:42 +02:00
wmayer
b1dd1e61a7 force strict ISO C++ (-Wpedantic)
for Fem, Import, PartDesign, Robot, Sketcher, TechDraw
2019-09-18 14:18:07 +02:00
wmayer
209128d6fc fix possible memory leak 2019-09-15 21:10:51 +02:00
wmayer
54eda5e755 fix possible memory leak 2019-09-15 21:00:21 +02:00
wmayer
190d351a20 fix crash in polyline tool 2019-09-15 11:03:21 +02:00
DeepSOIC
b5ff5ca388 fix Show-related imports 2019-09-14 12:17:01 +02:00
DeepSOIC
4dad9f32ab Sketcher: try fix crash when returning to PartDesign 2019-09-09 12:34:55 +02:00
wmayer
b14cf8a00d extend convertTo function to also support SbRotation/Base::Rotation 2019-09-06 21:29:51 +02:00
DeepSOIC
2b4182e281 Sketcher: fix unnecessary filtering objects for TempoVis
TempoVis now should take care of it.

This was originally done to stop Drawing and TechDraw views pop up when closing a sketch the drawing depends on.
Now, TempoVis show_xxx and hide_xxx methods should auto filter out objects that are not in 3d view.
2019-09-04 11:37:48 -03:00
DeepSOIC
c9575447c0 Sketcher: don't change camera zoom when creating a sketch 2019-09-04 11:37:48 -03:00
DeepSOIC
ec7c18bef3 Gui: add tags for TempoVis
Tags can be used to identify TV instances in the stack.  This is mostly for add-ons, for Part-o-magic in particular, who may want to insert some visibility automation in specific places in the stack.
2019-09-04 11:37:48 -03:00
DeepSOIC
d33c7b724c Sketcher: add property to allow another workbench for sketch editing
+ use TempoVis for changing the workbench
2019-09-04 11:37:48 -03:00
luz.paz
7af7c10cf1 Fix misc. typos, whitespace, and http:// to https:// issues 2019-09-03 11:11:43 -03:00
Zheng, Lei
0ad1d0b9e6 Sketcher: fix missing update on expression change 2019-08-30 15:52:31 +02:00
Zheng, Lei
7128cf7989 Sketcher: fix lost of constraint in undo/redo 2019-08-30 14:57:41 +02:00
wmayer
319bbe5cc4 Fix clang compiler warnings:
+ fix -Winconsistent-missing-override
2019-08-17 19:53:07 +02:00
Zheng, Lei
fe0548cad5 Sketcher: auto undo when canceling constraint editing 2019-08-17 15:32:50 +02:00
Zheng, Lei
0f66755843 Sketcher: fix external editing 2019-08-17 15:32:50 +02:00
Zheng, Lei
d4ac072306 Gui: support in-place editing
The link support means that an object can now appear in more than one
places, and even inside a document different from its own. This patch
adds support for in-place editing, meaning that the object can be edited
at correct place regardless where it is.

See [here](https://git.io/fjPIk) for more info about the relavent APIs.

This patch includes two example of modifications to support in-place
editing. One is the ViewProviderDragger, which simply adds the dragger
node to editing root node by calling
View3DInventorViewer::setupEditingRoot(dragger). The other much more
complex one is ViewProviderSketch which calls setupEditingRoot(0) to
transfer all its children node into editing root. ViewProviderSketch
also includes various modifications to command invocation, because we
can no longer assume the active document is the owner of the editing
object.

This patch also includes necessary modification of the 'Show' module to
support in-place editing.
2019-08-17 15:08:32 +02:00
Zheng, Lei
5214f5b7ce Gui: add coinRemoveAllChildren to work around Coin3D bug
See bug description:
https://bitbucket.org/Coin3D/coin/pull-requests/119/fix-sochildlist-auditing/diff

Because of path based rendering (SoFCPathAnnotation) in mouse over
highlight, this bug causes crash more frequently here comparing to
upstream.

All C++ calling of SoGroup::removeAllChildren() is replaced by
Gui::coinRemoveAllChildren(), and python code is fixed by monkey
patching SoGroup.removeAllChildren() in FreeCADGuiInit.py.
2019-08-17 14:52:11 +02:00
Zheng, Lei
ced27a69c6 PropertyExpressionEngine: convert to link type property
PropertyExpressionEngine is changed to derived from a new class
PropertyExpressionContainer, which is in turn derives from
PropertyXLinkContainer. This makes PropertyExpressionEngine a link type
property that is capable of external linking. It now uses the unified
link property APIs for dependency management and tracking of object
life time, re-labeling, etc.

ObjectIdentifier is modified to support sub-object reference, but is
not exposed to end-user, because expression syntax is kept mostly
unchanged, which will be submitted in future PR. There is, however,
one small change in expression syntax (ExpressionParser.y) to introduce
local property reference to avoid ambiguity mentioned in
FreeCAD/FreeCAD#1619

Modified Expression/ExpressionModifier interface to support various link
property API for link modification.
2019-08-17 14:52:09 +02:00
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