Commit Graph

23351 Commits

Author SHA1 Message Date
Zheng, Lei
0a35cb5b01 Part: improve TopoShape::findPlane()
Make the returned plane normal consistent with the underlying face
geometry.
2020-12-14 16:04:40 +01:00
Yorik van Havre
c25ff3ac16 Draft: Hide undo button from modify operations 2020-12-14 15:21:25 +01:00
Yorik van Havre
0e556a082b Merge pull request #4121 from everlanes/TechDraw_Segfault
[TD] Check return value of getMDIViewPage() a second time
2020-12-14 12:43:28 +01:00
Yorik van Havre
fe721a1934 Merge pull request #4116 from chennes/fixAirfoilImportNumberRegex
[Draft] Fix airfoil data detection regex
2020-12-14 12:29:50 +01:00
Yorik van Havre
dd580a49ab Merge pull request #4115 from JAndersM/patch-1
[Draft] Update task_scale.py
2020-12-14 12:21:47 +01:00
Yorik van Havre
cbcf45a4b9 Merge pull request #4109 from donovaly/TD-dimensioning-fix
[TD] treat dimensions the same way, no matter if with unit or not
2020-12-14 12:08:46 +01:00
Yorik van Havre
115963d79e Merge pull request #4100 from marioalexis84/draft-upgrade
Draft: Improve makeWires in upgrade function
2020-12-14 11:59:21 +01:00
Yorik van Havre
46a6ea3351 Merge pull request #4069 from aapo-aapo/TD-Balloon-improvements
[TD] TechDraw Balloon improvements with two new App::PropertyType properties
2020-12-14 11:56:08 +01:00
Yorik van Havre
6e88f40886 Merge pull request #4137 from abdullahtahiriyo/_arc_fix
[ARCH] Make ArchWall use Sketcher GeometryFacade
2020-12-14 11:41:16 +01:00
wmayer
6575023f5c Tools: [skip ci] extend doc string of FreeCAD thumbnailer 2020-12-14 11:22:12 +01:00
Chris Hennes
50d97a3f24 Merge branch 'master' into fixAirfoilImportNumberRegex 2020-12-13 23:02:36 -06:00
luz paz
68eba58e64 Mesh: Uniformity fixes [skip ci]
* Sort Mesh.qrc
* Capital Case .svg files
* Rename Tree_Mesh.svg to Mesh_Tree.svg
* Make appropriate changes in the source regarding said name changes
2020-12-13 17:08:22 +01:00
wmayer
ddbd7696ce Py: [skip ci] replace PyList_Append with Py::List::append 2020-12-13 16:45:06 +01:00
wmayer
a152cd2d96 Py: [skip ci] replace PyList_Append with Py::List::append 2020-12-13 16:44:14 +01:00
wmayer
aec9d5f07a Py: fix memory leaks by incorrect use of PyList_Append 2020-12-13 16:30:04 +01:00
Abdullah Tahiri
2386df93aa Arch: Make ArchWall use Sketcher GeometryFacade 2020-12-13 15:36:59 +01:00
Abdullah Tahiri
512d5c6141 Sketcher: Ensure that ViewProvider Geometry extensions is correctly initialised 2020-12-12 16:18:57 +01:00
Abdullah Tahiri
3f6fed377b Sketcher: refactor unnecessary dir/angle conversion 2020-12-12 16:18:57 +01:00
Abdullah Tahiri
c2108911d6 Sketcher: ViewProvider fix Weight length when dragging
https://forum.freecadweb.org/viewtopic.php?f=10&t=51716&sid=d469aaf654946813912b9419f4fc529f&start=60#p456814
2020-12-12 16:18:57 +01:00
wmayer
a9605dc462 CMake: [skip ci] use FILTER of list command only for v3.6 or later 2020-12-12 10:53:20 +01:00
luz paz
c4b1ec01ba Main: fix header uniformity + trailing whitespace
[skip ci]
2020-12-12 08:17:58 +01:00
luz paz
cb58706e80 Fix various typos [skip ci]
Found via `codespell v2.1.dev0`  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,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-12-12 08:07:47 +01:00
wmayer
be11a92f4e PD: [skip ci] in wizard shaft handle case where Plot module is not available 2020-12-11 16:09:01 +01:00
wmayer
1bc39542d3 Part: [skip ci] support of keywords in Part.GeometrySurface.toBSpline() 2020-12-11 14:40:09 +01:00
tomate44
f5f349fac8 Part:Surface.toBSpline use OCC MaxDegree instead of fixed value. 2020-12-11 14:05:08 +01:00
tomate44
75a2f471ea Part: update GeomSurface.toBSpline doc 2020-12-11 14:05:08 +01:00
tomate44
e7c06e8483 Part: add default values to GeomSurface.toBSpline() 2020-12-11 14:05:08 +01:00
Chris Hennes
5f37274ce1 [Web] Close stale file handle in exec()
Eliminate the Python interpreter warning about failure to close a stale handle when using the `exec(open('%s').read()` idiom, enclosing it in a `with` clause.
2020-12-11 13:22:35 +01:00
Przemo Firszt
528f0cbdd6 Fix fedora COPR builds
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2020-12-11 13:20:34 +01:00
luz paz
2a8c1271d5 Draft: fix header uniformity + trailing whitespace
[skip ci]
2020-12-11 13:19:49 +01:00
wmayer
4a8fac9147 Part: [skip ci] fix memory leaks
+ add convenience function GeometryExtension::copyPyObject()
+ make sure to destroy the clone when leaving getGeometry()
2020-12-11 12:05:28 +01:00
Chris Hennes
ea3ecf4054 Silence Qt/Windows setGeometry Warning
Add the optional Qt::MSWindowsFixedSizeDialogHint parameter to all uses of the QInputDialog::getX static functions to silence a Qt/Windows debug mode warning about QWindowsWindow::setGeometry: Unable to set geometry. Increase the size of the unit calculator to eliminate the same warning. Finally, call adjustSize() on the "Unsaved Changes" dialog to silence the warning.
2020-12-11 09:58:09 +01:00
Chris Hennes
b8ce1a7c01 Merge branch 'master' into fixAirfoilImportNumberRegex 2020-12-10 23:58:49 -06:00
Abdullah Tahiri
9add3ba199 Sketcher/Part: Python handling of GeometryExtensions without a Python counterpart
=================================================================================

Some geometry extensions do not provide a PyObject as they do not have a Python counterpart
as it would serve no purpose to have it.

This commit handles this situation making sure to provide the right error to Python
or to ignore the extension where appropriate.
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
40c0f0aa01 Sketcher: refactor onDocumentRestored() 2020-12-10 18:34:06 +01:00
Abdullah Tahiri
f33aab5f5e Sketcher: Reduce ViewProviderUpdates when deleting Internal Alignment Geometry
==============================================================================

Deletion of a geometry having internal alignment geometry (B-Spline, Ellipse, ...)
involves calling a geometry deletion operation for each internal aligment constraint
in addition to the one of the geometry.

Before this commit, an update call was performed for each of these operations. Now,
there is a single update trigger operation after all the geometries are deleted.
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
4aa91f0f26 Sketcher: SketchGeometryExtension - Do not store ID
===================================================

Currently the ID is a unique number without an specific use and it is
conceived to be taken over by future RT's Sketcher PRs.

Because of this, and not to interfere with RT's implementation, it is
not stored, but will be restored if attribute available.

Unrelated:
Similarly, ExternalGeometryExtension is also there conceived for RT's
future sketcher PRs, but it is not used.
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
2c0faabb6f Sketcher: GeometryFacade - Remove Debuging code 2020-12-10 18:34:06 +01:00
Abdullah Tahiri
c08d4d9dff Sketcher: ExternalGeometryFacadePy Python interface
===================================================

- Add get/set InternalType
- ExternalGeometryFacadePy: Add get/set Blocked - squash me
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
51eb55081c Sketcher: GeometryFacadePy - testGeometryMode Python interface 2020-12-10 18:34:06 +01:00
Abdullah Tahiri
cfd5cfd6c7 Sketcher: SketchGeometryExtensionPy getConstruction from extension 2020-12-10 18:34:06 +01:00
Abdullah Tahiri
11d4d6c18e Part/Sketcher: GeometryExtension/GeometryPersistentExtension split
==================================================================

GeometryExtension was originally designed to be serializable (save/restore). However,
GeometryMigrationExtension and ViewProviderSketchGeometryExtension have demonstrated the
usefulness of runtime-only GeometryExtensions.

The problem with runtime-only extensions being of a serializable type (GeometryExtension before
this commit) arises when Part::Geometry is to serialize the extensions and serialise the number
of extensions the geometry has. If runtime-only GeometryExtensions do not save a tag, then the
restore mechanism will expect more extensions that are actually in the XML file.

This commit makes GeometryExtension by default not serializable and deriving directly from
Base::BaseClass. A new class GeometryPersistentExtension is created, deriving from GeometryExtension
to provide serialisation. All Extensions requiring serialization derive from GeometryPersistentExtension
and those not requiring it from GeometryExtension directly.

This commit adapts all extensions to the new situation:
Part: GeometryDefaultExtension
Part: GeometryMigrationExtension
Sketcher: ViewProvierSketchGeometryExtension
Sketcher: SketchGeometryExtension and ExternalGeometryExtension
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
4e199bd23e Sketcher: Fix construction migration 2020-12-10 18:34:06 +01:00
Abdullah Tahiri
a624a35af1 Sketcher - Construction Migration - step 4: Migration function from legacy construction geometry to extension
==============================================================================================================

This function is charged with receiving the construction information in a
GeometryMigrationExtension and setting the right data members of SketchGeometryExtension.
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
395a0f19b4 Part/Sketcher - Construction Migration - step 3: Removal of Geometry construction data member
=============================================================================================

This commits removes the Geometry construction data member and adapts sketcher code to use
GeometryFacade to access construction information via the SketchGeometryExtension.
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
316a8b635d Sketcher - Construction Migration - step 2: Adapt GeometryFacade to retrieve construction from extension
========================================================================================================

Access to the Construction state from facade is now obtained from the extension data.
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
6f63796efb Sketcher - Construction Migration - step 1: SketchGeometryExtension add construction enum
================================================================================

First step towards migration - Create Construction Geometry Mode in Extension
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
40c8af8014 Sketcher: GeometryFacadePyImp - no longer checking if a point is construction to set construction status 2020-12-10 18:34:06 +01:00
Abdullah Tahiri
d96769e6d7 Sketcher: Refactor for GCS magic numbers
========================================

- A small refactor to eliminate GCS magic numbers from Sketch.cpp.
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
be8e5ac338 GCS: Simple refactor magic numbers into enum
============================================

A new enum to remove magic numbers for constraint tags.

A previous version of the commit introduced more magic numbers, which
demonstrated not to be up for the task.

About the Tag numbers:
- Positive Tags identify a higher level constraint form which the solver constraint originates
- Negative Tags represent temporary constraints, used for example in moving operations, these
have a different handling in component splitting, see GCS::initSolution. Lifetime is defined by
the container object via GCS::clearByTag
- Hardcoded value -1 is used for these constraints.The effect is parameters are not truly enforced
  (it gives a nice effect when dragging the edge of an unconstrained circle, that the center won't
  move if the edge can be dragged, and only when/if the edge cannot be dragged,  e.g. radius constraint,
  the center is moved).
2020-12-10 18:34:06 +01:00