Commit Graph

1580 Commits

Author SHA1 Message Date
wmayer
6af98e080f Part: [skip ci] fix two little copy&paste errors 2019-12-17 11:04:13 +01:00
DeepSOIC
cbe19e396b Part: fixup (to make gcc happy) 2019-12-17 10:52:28 +01:00
DeepSOIC
693130d860 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
09cd151221 Part: fix Compound2 placement lost after restore 2019-12-09 15:30:34 +01:00
wmayer
83ecb8a5ec set default deflection of 0.01 when exporting shape as STL 2019-11-29 13:46:30 +01:00
asapelkin
e951094af9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
Zheng, Lei
df0366a6f3 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
fb64a860e6 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
c6a5bbcf9e [skip ci] fix more -Wgnu-zero-variadic-macro-arguments 2019-11-17 15:14:18 +01:00
luz.paz
1bc33025d6 LGTM: various fixes for using string operator instead of numeric 2019-10-25 10:33:12 -03:00
luz.paz
1c981e8f14 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
71c54272a0 Fix various Py::Object leak 2019-10-08 17:53:20 +02:00
Zheng, Lei
4c2647393d 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
7c76d2f3c3 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
f57283f598 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
45fd865fc0 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
6663d625a9 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
4775def51b Part: deactivate and remove the remaining XPM icons, and use SVG icons instead 2019-10-06 17:05:30 +02:00
vocx-fc
022442ca7f Part: rename the icons to start with Part_ 2019-10-06 17:05:30 +02:00
vocx-fc
8589f7ec6e Part: new icon for Part::Part2DObject, in SVG, instead of using a generic XPM 2019-10-05 17:24:57 +02:00
vocx-fc
e13eb0ba61 Part: re-order the resources in Part.qrc, and removed the PNGs 2019-10-05 17:24:57 +02:00
luz.paz
7b7797f4f3 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
5de6763ed5 add escape sequence when executing as Python string 2019-09-28 23:35:08 +02:00
wmayer
6d5ebdeafc fix some MSVC warnings 2019-09-19 17:55:10 +02:00
wmayer
a243b95209 fix -Wpedantic 2019-09-18 18:48:01 +02:00
wmayer
378de3c8a1 fix -Wcatch-value=, fix -Wpedantic 2019-09-18 14:36:23 +02:00
wmayer
a247b7e6a5 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
2eb6300d5f fix Show-related imports 2019-09-14 12:17:01 +02:00
wmayer
48f090aa10 fix MSVC compiler warning 2019-09-14 12:15:35 +02:00
wmayer
28f74290b2 fix -Wreturn-std-move 2019-09-07 15:19:28 +02:00
wmayer
9f7075bb8f extend convertTo function to also support SbRotation/Base::Rotation 2019-09-06 21:29:51 +02:00
DeepSOIC
f8688d4277 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
70d3983258 [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
c18dab4a75 [GeometryCheck] add new settings options 2019-09-03 17:37:34 +02:00
wmayer
598faf9ad2 include missing header 2019-09-01 17:25:42 +02:00
Zheng, Lei
193b9899b6 Part: fix missing signal disconnect in TaskFaceColors 2019-08-30 15:47:17 +02:00
Zheng, Lei
d2c5bcb949 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
a06e0b7c2d Part: fix TaskAttacher external editing 2019-08-30 14:53:50 +02:00
Zheng, Lei
2b79025ad9 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
7fef64241d [Part workbench] add command create points object from mesh 2019-08-27 23:40:24 +02:00
Mark Ganson TheMarkster
5a3fb20cab Update Part.qrc 2019-08-27 23:40:15 +02:00
mwganson
ea7812656a [Part workbench] add Create points object from mesh command 2019-08-27 23:40:06 +02:00
sdh4
57ef3dfdf4 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
5095703776 add missing std:: namespace to build on Debian 10 2019-08-21 23:56:46 +02:00
wmayer
2a92051192 add missing std:: namespace to build on Debian 10 2019-08-21 19:22:01 +02:00
wmayer
bf5923c0f3 add missing std:: namespace to build on Debian 10 2019-08-21 16:31:00 +02:00
wmayer
851e3d9847 add missing std:: namespace to build on Debian 10 2019-08-21 00:12:50 +02:00
wmayer
7e60631239 add missing header and forward declaration 2019-08-17 23:14:45 +02:00
wmayer
67b06d7a36 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
4aba7e2f5a Fix more typos 2019-08-17 15:32:49 +02:00