Commit Graph

1578 Commits

Author SHA1 Message Date
DeepSOIC
7554c2111c Part: fix memory leak in distToShape
https://forum.freecadweb.org/viewtopic.php?f=10&t=41620
2019-12-17 10:52:20 +01:00
Zheng, Lei
cc85d1a1d3 Part: fix Compound2 placement lost after restore 2019-12-09 15:30:34 +01:00
wmayer
df8e09196d set default deflection of 0.01 when exporting shape as STL 2019-11-29 13:46:30 +01:00
asapelkin
ced8100ab9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
Zheng, Lei
927bec9e96 Part: reduce memory usage in SoBrepFaceSet
Can we further reduce it to num_triangles = num_indices/4*3?
2019-11-21 11:58:44 +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
f50dc8e652 [skip ci] fix more -Wgnu-zero-variadic-macro-arguments 2019-11-17 15:14:18 +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
Zheng, Lei
8426ebe2ba Fix various Py::Object leak 2019-10-08 17:53:20 +02:00
Zheng, Lei
50102918d3 Part: add missing API ViewProviderPartExt::getElementColors()
This API is defined in Gui::ViewProvider to allow color override in
Link. In particular, the implementation in PartGui::ViewProviderPartExt
allows override for various part shapes.
2019-10-08 10:22:17 +02:00
Zheng, Lei
b4b61ce6c2 Part: fix TopoShape::getElementTypes()
This also fixes Std_BoxElementSelection in Gui/CommandView.cpp, which
relies on this API through Data::ComplexGeoData::getElementTypes().
2019-10-08 10:22:00 +02:00
Zheng, Lei
0b42b0b596 Link: change sub-element linking mechanism
Previous multi-sub-element linking (e.g. Face, Edge) is supported
through SubElements of type PropertyStringList, which does not support
geometry element update tracking. This patch changes it to use
PropertyXLink's new multi-subname capability.
2019-10-08 10:20:50 +02:00
Zheng, Lei
bb3baefdb5 Gui: refactor bounding box selection style
Previously, box style selection is rendered using customized
SoBoxSelectionRenderAction, which does not support selection context,
i.e. it does not work with Link.

This patch implements context aware bound box rendering inside
SoFCSelectionRoot, SoFCSelection and SoFCPathAnnotation (for always on
top rendering). The box rendering in SoBoxSelectionRenderAction is
disabled on construction. Box style selection can be enabled for
individual object through property SelectionStyle (moved from
ViewProviderGeometryObject to ViewProviderDocumentObject), or globally
through Parameter BaseApp/Preferences/View/ShowSelectionBoundingBox.

In addition, the parameter BaseApp/Preferences/View/UseNewSelection is
used to override selection model reported from
ViewProvider::useNewSelectionModel(). The reason being that, the same
parameter is already used to toggle selection model inside
SoFCSelection. This avoids inconsistency of selection model choice
between view provider and the SoFCSelection node inside. Note that if
the parameter 'UseNewSelection' is set to false, those view providers
that choose old selection model will not work with Link.
2019-10-08 09:56:09 +02:00
Zheng, Lei
2df3052ecf Gui: add new API ViewProviderDocumentObject::allowOverride()
This API is used to delcare if a view provider can be used as an
override for a give object.

Conflicts:
	src/App/DocumentObject.h
2019-10-06 17:22:57 +02:00
vocx-fc
7305343e10 Part: deactivate and remove the remaining XPM icons, and use SVG icons instead 2019-10-06 17:05:30 +02:00
vocx-fc
3d36e7d5e1 Part: rename the icons to start with Part_ 2019-10-06 17:05:30 +02:00
vocx-fc
30a722777b Part: new icon for Part::Part2DObject, in SVG, instead of using a generic XPM 2019-10-05 17:24:57 +02:00
vocx-fc
5421ef24e5 Part: re-order the resources in Part.qrc, and removed the PNGs 2019-10-05 17:24:57 +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
8c97f81877 add escape sequence when executing as Python string 2019-09-28 23:35:08 +02:00
wmayer
d4bac9e259 fix some MSVC warnings 2019-09-19 17:55:10 +02:00
wmayer
6a1bfc0ab2 fix -Wpedantic 2019-09-18 18:48:01 +02:00
wmayer
5746c37b7e fix -Wcatch-value=, fix -Wpedantic 2019-09-18 14:36:23 +02:00
wmayer
e48c52c480 force strict ISO C++ (-Wpedantic)
for Drawing, Image, Inspection, Mesh, MeshPart, Part, Path, Points, Raytracing, ReverseEngineering, Spreadsheet, Start, Surface, Web

TODO: fix several -Woverflow in area
2019-09-18 11:32:42 +02:00
DeepSOIC
b5ff5ca388 fix Show-related imports 2019-09-14 12:17:01 +02:00
wmayer
0e2ee0bb22 fix MSVC compiler warning 2019-09-14 12:15:35 +02:00
wmayer
d05ae18340 fix -Wreturn-std-move 2019-09-07 15:19:28 +02:00
wmayer
b14cf8a00d extend convertTo function to also support SbRotation/Base::Rotation 2019-09-06 21:29:51 +02: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
mwganson
a0316e9400 [Geometry check] open settings page first before running check, add 2 new navigation buttons: settings and results, allow to collapse results box 2019-09-03 17:37:48 +02:00
mwganson
dc86201bb0 [GeometryCheck] add new settings options 2019-09-03 17:37:34 +02:00
wmayer
05649e3848 include missing header 2019-09-01 17:25:42 +02:00
Zheng, Lei
405ec26e3a Part: fix missing signal disconnect in TaskFaceColors 2019-08-30 15:47:17 +02:00
Zheng, Lei
b78761cf3c Part: fix VBO update on multiple gl context
Multiple OpenGL context is caused by linking some shape object from
external documents. The VBO update must be triggered for all contexts.
2019-08-30 14:55:14 +02:00
Zheng, Lei
e196d33549 Part: fix TaskAttacher external editing 2019-08-30 14:53:50 +02:00
Zheng, Lei
f362229041 Part: avoid touching in ViewProviderAttachExtension mergeOverlayIcons
ViewProviderAttachExtension::extensionMergeOverlayIcons() calls
AttachExtension::positionBySupport() which will always touch the
extended object. This may cause recomputation problems, e.g a datum
that is always touched, because normal recomputation trigger tree
view update by a timer, tree view refreshes the icon, datum gets
touched again.
2019-08-30 14:46:38 +02:00
mwganson
663c975aa0 [Part workbench] add command create points object from mesh 2019-08-27 23:40:24 +02:00
Mark Ganson TheMarkster
25041288b1 Update Part.qrc 2019-08-27 23:40:15 +02:00
mwganson
6be089b006 [Part workbench] add Create points object from mesh command 2019-08-27 23:40:06 +02:00
sdh4
8928f863fe Part.BSplineSurface.buildFromPolesMultsKnots(): Fix 'Truth value of an array ... use a.any() or a.all()' when explicit knots or weights provided
Calls to BSplineSurface.buildFromPolesMultsKnots() with explicit knots or weights fail in recent versions of FreeCAD (tested on 0.18.3 with python3) with the message 'The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()'. 

This trivial change follows the pattern used later in the function of explicit comparisons with Py_None, replacing PyObject_Not() and PyObject_IsTrue()  when they are used to determine whether explicit weights or knots have been provided.
2019-08-27 21:48:52 +02:00
wmayer
a79ce8d823 add missing std:: namespace to build on Debian 10 2019-08-21 23:56:46 +02:00
wmayer
bbea71ce5f add missing std:: namespace to build on Debian 10 2019-08-21 19:22:01 +02:00
wmayer
fb3eb85586 add missing std:: namespace to build on Debian 10 2019-08-21 16:31:00 +02:00
wmayer
6795a28c99 add missing std:: namespace to build on Debian 10 2019-08-21 00:12:50 +02:00
wmayer
b594274407 add missing header and forward declaration 2019-08-17 23:14:45 +02:00
wmayer
7f4378a87e Fix clang compiler warnings:
+ fix -Winconsistent-missing-override
+ fix -Wpessimizing-move (Geometry::clone: moving a temporary object prevents copy elision -> remove std::move call here)
2019-08-17 19:52:32 +02:00
luz.paz
3bb578c825 Fix more typos 2019-08-17 15:32:49 +02:00
luz.paz
b869b6e29e Fix typos in various src/Mod directories 2019-08-17 15:32:49 +02:00
luz.paz
63a577fe07 Fix typos in src/Gio 2019-08-17 15:32:49 +02:00