Commit Graph

1683 Commits

Author SHA1 Message Date
wmayer
6f06fbf36d PVS: V601 The bool type is implicitly cast to the double type 2020-07-18 10:59:28 +02:00
wmayer
16f953ad65 PVS: V1004 A pointer was used unsafely after it was verified against nullptr 2020-07-18 10:59:27 +02:00
wmayer
0f18bdeb72 PVS: V524 It is odd that the body of 'getLastUKnotIndex' function is fully equivalent to the body of 'getFirstUKnotIndex' function 2020-07-18 10:59:27 +02:00
wmayer
f29a1c43cb PVS: V773 The exception was thrown without releasing the pointer. A memory leak is possible. 2020-07-18 10:59:27 +02:00
wmayer
cbb5f99ade PVS: V730 Not all members of a class are initialized inside the constructor 2020-07-18 10:59:27 +02:00
luz paz
3dfae3ba46 Merged crowdin translations 2020-07-13 14:49:45 +02:00
wmayer
0de5a29011 Part: fix regression of visibility automation in Attachment dialog
If a body is in a Part container and a new primitive is created no preview is shown because the Part container is automatically made invisiible.
The user has to manually make the container visible but this is an error-prone procedure because the Attachment dialog reacts on user-selection and thus
unintended things can happen. So, this is a serious regression of usability.

The regression is caused by commit a06e0b7c2d but the commit log doesn't explain why the change was even needed.
So, this commit leaves the previous changes but re-adds the old check to filter out container objects.
2020-07-12 16:03:42 +02:00
Zheng, Lei
37caf53dfd Part: fix TaskAttacher::visibilityAutomation()
Rename Python variable 'tv' to avoid potential conflict with others
(PS. I can't reproduce error caused by this. But there is no harm doing
it either).

Handle editing attachment through an App::Link.
2020-07-12 16:03:42 +02:00
Thomas Gimpel
ffbcab5b49 Part: fix handling of attachment offset rotation changes in attachment editor 2020-07-04 07:50:58 +02:00
Abdullah Tahiri
9ca8568f89 PropertyGeometryList: move setValue and refactor 2020-07-01 14:04:25 +02:00
wmayer
478823b909 Part: [skip ci] fix regression in ruled surface feature by applying placement of source object twice
See: https://forum.freecadweb.org/viewtopic.php?p=411934
2020-06-27 23:17:32 +02:00
Gabriel Wicke
487215d2f5 [part] More robust tessellation angular deflection default
OCC currently does not reliably enforce linear deflection on curved
surfaces, especially curved lofts over nurbs splines. To avoid surprises
when tight tolerances are needed, replace the static default angular
deflection of 0.5 radians (~28 degrees), with a more sensible angular
deflection derived from the provided linear deflection tolerance.

By adding the default heuristic to TopoShape, we can keep typical
tessellate() and STL export functionality users simple, and also avoid
the need to implement similar heuristics in many places. If more
explicit control over angular deflection is needed for some use cases,
then we could still choose to expose the option to override the derived
default explicitly.

The hope is that OCC's linear deflection enforcement will be more
reliable at some point, at which point this heuristic will no longer be
needed.
2020-06-23 12:17:51 +02:00
triplus
29f3ab6db6 Icon themes Part viewproviders 2020-06-22 11:58:06 +02:00
wmayer
6c74b78507 Part: [skip ci] add missing headers 2020-06-21 22:53:42 +02:00
wmayer
f3b460e42e boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
8ed90c8586 Py2: fix Python 2 build failure 2020-06-12 17:51:33 +02:00
wmayer
2c113442a7 Qt5: 'void QTime::start()' / 'int QTime::elapsed() const' / 'int QTime::restart()' are deprecated: Use QElapsedTimer instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
1ee3d79d7c Qt5: 'int QFontMetrics::width' is deprecated since Qt 5.11: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
4ec45b545e boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
wmayer
3f212ad8ac Porting Py3.8/Py3.9:
Since Py3.3: 'Py_ssize_t PyUnicode_GetSize(PyObject*)' is deprecated [-Wdeprecated-declarations]
Since Py3.9: 'PyObject* PyEval_CallObjectWithKeywords(PyObject*, PyObject*, PyObject*)' is deprecated [-Wdeprecated-declarations]
Since Py3.9: 'void PyEval_InitThreads()' is deprecated [-Wdeprecated-declarations]
2020-06-12 17:51:33 +02:00
wmayer
c814eb1a50 Qt5: 'QString::null' is deprecated: use QString() [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
wmayer
b2f5a3bd90 [skip ci] avoid to redefine GL_GLEXT_PROTOTYPES if already defined 2020-06-12 14:07:45 +02:00
wmayer
27b6066beb clang/gcc/cmake: move handling of suppressed deprecated-copy warnings from source file to CMake file to more easily support gcc 10 2020-06-09 15:30:42 +02:00
wmayer
fdc07cb6c9 Py3.8: [skip ci] missing initializer for member '_typeobject::tp_vectorcall' [-Wmissing-field-initializers] 2020-06-08 14:40:00 +02:00
wandererfan
8311b1e66d [Part]Fix bad shape from Fillet
- see #4285 for similar fix on Chamfer
2020-06-07 22:08:41 -04:00
WandererFan
b7ba72bf8f Merge pull request #3579 from WandererFan/prefDirs
[Part]Fix #4285 Bad Shape from Chamfer
2020-06-07 15:41:52 -04:00
wmayer
1e117647ff [skip ci] include missing boost header 2020-06-07 20:58:45 +02:00
wandererfan
73f086f73d [Part]Fix #4285 Bad Shape from Chamfer
- chamfer was producing invalid shape as output.
  fix uses shapefix to correct invalid surface/face.
2020-06-07 11:26:56 -04:00
wandererfan
4a3bd23877 [Part]use BSpline for makeWireString instead of Bezier curves.
- the bezier curves from the font definitions cause checkGeometry
  errors when extruded.  bsplines do not have this problem.
2020-05-31 11:26:22 -04:00
Gabriel Wicke
7822daf1f2 Part: Parallelize tessellations in TopoShape
Update parameters for all BRepMesh_IncrementalMesh instances to allow
parallel meshing. This matches what is already done for view
tessellations.

Other positional parameters are filled with their defaults in
BRepMesh_IncrementalMesh, so there should be no behavior change outside
of allowing parallelism.
2020-05-28 22:05:12 +02:00
Syres916
25ea264cda [Gui] Part TaskCheckGeometry change Error to Log..
for faulty geometry output, The user can still see all the error output in the task panel but by default they will see nothing in the Report View as Log is not Enabled for new users. See discussion https://forum.freecadweb.org/viewtopic.php?f=15&t=46803#p402533
2020-05-28 18:45:36 +02:00
Abdullah Tahiri
1efe9c9208 Part: Gui ViewProvider2D Grid Management
========================================

1. The Grid has a default maximum of 10000 lines that is controlled via a new property. The grid is not created (is empty)
if a higher number of lines is necessary. This event is show as a Warning in the Report view.

2. The Grid now checks a new property ShowOnlyInEditMode before deciding whether to show the grid or not. This is a new
mode for ViewProvider2D and derived objects. If the property is set to true (and showGrid is true), the grid is only shown
if the object is in edit mode. If the property is set to false, the grid is shown regardless of whether it is in edit mode
or not (provided that showGrid is true).

3. Grid limits are now encapsulated (private). They can be set via a new function updateGridExtent.
2020-05-27 19:25:47 +02:00
0penBrain
da33ffc062 [Sketcher] Grid is displayed in 3D view only if sketch is visible 2020-05-27 19:25:47 +02:00
0penBrain
5b76419d58 [Sketcher] Fix grid size initialization ; fixes #4055 2020-05-27 19:25:47 +02:00
wmayer
300e887480 Handle clang 10 warnings:
+ fix -Wtautological-bitwise-compare
+ fix -Wimplicit-int-float-conversion
+ fix -Wmisleading-indentation
+ fix -Wrange-loop-construct
+ suppress -Wdeprecated-copy of 3rd party libs
2020-05-25 15:34:43 +02:00
vocx-fc
848db84c8d Part: update the part_test_objects script
This script is based on a similar script
created for the Draft Workbench.
2020-05-20 09:34:39 +02:00
wmayer
1d8235c234 Part: [skip ci] get n-th derivative of a surface via Python 2020-05-18 13:17:26 +02:00
wmayer
7b970ab3b7 Part: [skip ci] get n-th derivative of a curve via Python 2020-05-17 23:25:07 +02:00
wmayer
ff0e556b59 Part: [skip ci] add methods to determine continuity 2020-05-17 21:57:25 +02:00
wmayer
f0e246f86d Part: [skip ci] copy visual attributes of reversed shape 2020-05-15 19:26:24 +02:00
wmayer
34ebb0ecc4 fixes #0004316: PartWB, "Reverse shapes" command reset position [skip ci] 2020-05-15 19:25:43 +02:00
wmayer
618089d6d8 remove deprecated std::binary_function 2020-05-11 13:46:37 +02:00
luz.paz
ceb23799c7 Fix various typos
Found via codespell v1.17.0.dev0  
```
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-05-05 09:49:08 +02:00
Yorik van Havre
28b51cf28a Merged crowdin translations 2020-04-29 16:08:23 +02:00
Yorik van Havre
693e374f99 Updated source ts files 2020-04-29 15:41:26 +02:00
luz.paz
0c326f094f [skip ci] fix documentation typos
Found via codespell v1.17.0.dev0  
```
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-04-20 12:59:09 +02:00
donovaly
33999badba [Part] color preferences: add missing tooltips
see: https://forum.freecadweb.org/viewtopic.php?f=8&t=44595
2020-04-20 12:44:02 +02:00
wmayer
d91bd53e10 Part: [skip ci] include missing header file 2020-04-14 09:37:45 +02:00
sliptonic
c200734dc6 Merge branch 'master' into 3d_surface_perf 2020-04-06 14:33:26 -05:00
wmayer
d414fc6311 Part: [skip ci] set again Two-side rendering as default lighting style 2020-04-06 14:12:44 +02:00