Commit Graph

645 Commits

Author SHA1 Message Date
luz.paz
696ed42635 [skip ci] Fix typos
Found via `codespell`
2020-03-09 16:23:26 +01:00
luz.paz
ebe194a9e9 Fix typos
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,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,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
```
2020-03-06 14:50:35 +01:00
luz.paz
7008cf92de Sketcher: [skip ci] fix header uniformity
This PR fixes header uniformity across all Sketcher WB files
2019-12-22 01:00:29 +01:00
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
f0c89811bd add method to sketch object to get index by user-defined name 2019-10-29 19:35:53 +01:00
Zheng, Lei
8426ebe2ba Fix various Py::Object leak 2019-10-08 17:53:20 +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
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
wmayer
b1dd1e61a7 force strict ISO C++ (-Wpedantic)
for Fem, Import, PartDesign, Robot, Sketcher, TechDraw
2019-09-18 14:18:07 +02: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
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
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
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
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
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
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
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
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
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
befbc1d634 V547 CWE-571 2019-04-08 14:35:46 +02:00
Abdullah Tahiri
77a81817fb V560 CWE-570 2019-04-08 14:35:46 +02:00
wmayer
7bcee67566 PVS: V728 An excessive check can be simplified 2019-03-13 13:49:04 +01:00
wmayer
174b7143ef PVS: V547 Expression is always true/false 2019-03-12 18:33:26 +01:00
wmayer
acee9433f0 fix restoring sketch 2019-03-02 16:23:40 +01:00
wmayer
2f31efe4c3 PVS: V779 Unreachable code detected. It is possible that an error is present. 2019-02-17 20:12:56 +01:00
wmayer
e23db2e313 PVS: V773 A memory leak is possible 2019-02-17 18:40:06 +01:00
wmayer
b2a5f47e44 PVS: V560 A part of conditional expression is always true 2019-02-17 13:56:48 +01:00
Abdullah Tahiri
f053c13abf Fixes #3762 2019-02-15 19:08:44 +01:00