Commit Graph

13421 Commits

Author SHA1 Message Date
wandererfan
7ee2f0c80a Cleanup dangling debug code 2019-07-15 12:36:48 -04:00
wandererfan
fbfdb69c20 [TD]Py Cosmetic Vertex, Line, Circle Arc 2019-07-15 12:36:48 -04:00
Markus Lampert
0cb17a9c9a Downgrading debug msg 2019-07-14 22:25:57 -07:00
Markus Lampert
c83c013997 Return diameter 0 for invalid holes in order to let the UI initialize completely 2019-07-14 22:24:01 -07:00
Markus Lampert
cadea61e0b Make Helix op robust against features that don't exist anymore 2019-07-14 21:30:38 -07:00
Abdullah Tahiri
150d174e37 MSVC complains about missing header 2019-07-14 12:37:39 +02:00
Abdullah Tahiri
50eff2a5ee MSVC also fails to automatically move if no elision possible 2019-07-14 12:37:37 +02:00
Abdullah Tahiri
b13c564dc2 Enable RVO for any other than old GCCs like 4.8 2019-07-14 12:37:37 +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
f68f64b981 GCC 4.8 fails to covert lvalue during RVO optimization 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
12e9b6c60a old GCC C++11 specialisation in a different namespace and moving template instantiations after all specialisations 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
bc5c4f6afb Sketcher: GeometryExtension and ExternalGeometryExtension 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
1d2c45c845 Base: Move std::make_unique to Base 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
006b470a20 Part: geometry extensions minor code clean up 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
4d86374cb0 Part: geometry extensions several memory leak fixes 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
21e1ccbe9b Part: Default geometry extensions for boolean and double 2019-07-14 12:37:35 +02:00
Abdullah Tahiri
331817d1b7 Part: Geometry extension set with unique id (type+name) and list based getExtensions python 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
8618dfd3c6 Part Geometry: get an extension from type or name, also from python 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
d8e99c1923 Part:: Geometry container extend hasExtension to type and name 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
4d9d3b0c83 Part: Geometry - methods to remove extensions by name and type 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
1700760e0b Part: Default geometry extensions make sure built-in types are initialised 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
d99e667e30 Part: Command to show list of extensions from Python 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
665fcda4dc Part: Fix assignment after reserve of weak_ptr causes segfault 2019-07-14 12:37:33 +02:00
Abdullah Tahiri
aaea1285d4 Part: Extend Geometry Extension to have a name 2019-07-14 12:37:31 +02:00
Abdullah Tahiri
a4cb781d81 Part: correct long parsing in GeometryIntExtensionPyImp 2019-07-14 12:37:31 +02:00
Abdullah Tahiri
274f730826 Part: Geometry extension const correctness 2019-07-14 12:37:31 +02:00
Abdullah Tahiri
062037ffff Part: Move default geometry extension for int to internally use long 2019-07-14 12:37:31 +02:00
Abdullah Tahiri
75fdacb342 Part: Default geometry extension template encapsulate value 2019-07-14 12:37:31 +02:00
Abdullah Tahiri
27620ed717 Part: GeometryDefaultExtensions template
========================================

Generalisation of code for a default geometry extension in the form of a template.

Default geometry extensions provide a standard interface for an extension having a single stored value (e.g. one int or one string).

Python implementation must be provided separatedly.
2019-07-14 12:37:31 +02:00
Abdullah Tahiri
7488faa99f Part: Geometry extensions set interface
=======================================

unique_ptr is a move only type. Therefore it may only take an rvalue.

It does not make sense a pass by value for move only types (Item 41).
2019-07-14 12:37:31 +02:00
Abdullah Tahiri
e4aead2365 Geometry extensions: remove unnecessary smart pointer deletion
==============================================================

When the geometry object is destroyed, std::vector's destructor is called, which in turn calls the destructor of the smart pointers.

If a weak_ptr corresponding to one of those shared_ptr is locked (elsewhere, if FC were multithread),
the underlaying resource will not be freed until said locked weak_ptr goes out of scope. It will then.
2019-07-14 12:37:31 +02:00
Abdullah Tahiri
0c1df38a4b Part: GeometryStringExtension to extend a geometry by a string 2019-07-14 12:37:30 +02:00
Abdullah Tahiri
a846d7627c Part: Expose GeometryIntExtension python type 2019-07-14 12:37:30 +02:00
Abdullah Tahiri
ba3831715c Part: Standard geometry extension adding an integer value 2019-07-14 12:37:30 +02:00
Abdullah Tahiri
d082a42351 Part: Excise GeometryExtension from Geometry 2019-07-14 12:37:30 +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
a96ca31dda Part:: Bug fix in geometry set extension 2019-07-14 12:37:29 +02:00
Abdullah Tahiri
9ba80f015c Part: Geometry Extension Python object 2019-07-14 12:37:29 +02:00
Abdullah Tahiri
11478f4951 Sketcher Geometry Extension 2019-07-14 12:37:28 +02:00
Abdullah Tahiri
55be6fdb7f Geometry Extension based on smart pointers 2019-07-14 12:37:28 +02:00
Abdullah Tahiri
41bf3fbf75 Geometry: Extensions - release any allocated dynamic memory 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
622f249dcd Part: Geometry Extensions 2019-07-14 12:37:28 +02:00
0penBrain
90044b1283 Add basic ability that PartDesign doesn't switch to Task panel when activated => Add a 'SwitchToTask' boolean parameter to Mod/PartDesign and set to 'false' to prevent switching 2019-07-13 12:56:09 -03:00
paullee0
ed45c51f77 Change ArchWall WidthsOfWall attribute to OverrideWidth
- following discussion at github
2019-07-13 12:52:20 -03:00
paullee0
b7907e0fd8 ArchWall_DraftGeomUtils Multi-Width support added
Discussion:- https://forum.freecadweb.org/viewtopic.php?f=23&t=36772&p=319829#p319829
2019-07-13 12:52:20 -03:00
sliptonic
bbdbe0e491 Merge pull request #2337 from Russ4262/helix_sort
[Path] PathHelix: Add simple x,y path sorting
2019-07-12 19:12:14 -05:00