Commit Graph

23273 Commits

Author SHA1 Message Date
Abdullah Tahiri
858abd99ca Sketcher: GeometryTypedFacade and GeometryFacade convenience functions
======================================================================

GeometryFacade is added the ability to get the construction status via static function, for
convenience in situations where only the construction status is necessary and a geometry facade
would not be otherwise necessary.

A new type GeometryTypedFacade is added, for situations in which the specific Part::Geometry derived
type is known (or is to be created). This Typed version enables to directly access the Geometry derived
class without the need for casting, as well as the SketchGeometryExtension information.

For example, this is possible:

auto HLineF = GeometryTypedFacade<Part::GeomLineSegment>::getTypedFacade(HLine);
HLine->getTypedGeometry()->setPoints(Base::Vector3d(0,0,0),Base::Vector3d(1,0,0));

If a facade is requested without passing an Part::Geometry derived object, the constructor
of the indicated geometry type is called with any parameter passed as argument (emplace style):

auto HLine = GeometryTypedFacade<Part::GeomLineSegment>::getTypedFacade();
HLine->getTypedGeometry()->setPoints(Base::Vector3d(0,0,0),Base::Vector3d(1,0,0));
HLine->setConstruction(true);
ExternalGeo.push_back(HLine->getGeometry());

Using either GeometryFacade or GeometryTypedFacade is probably a matter of style and of the specific situation.
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
6b05767a0c Sketcher: ExternalGeometryExtension - refactor flag string to type in static function 2020-12-10 18:34:06 +01:00
Abdullah Tahiri
ec5976ec28 Part: GeometryMigrationExtension classes
========================================

This is a light-weight c++ only geometry extension to enable migration of information that was stored within
the Part WB and should be migrated to another WB (for example Sketcher WB)

It is designed so that a single extension can migrate different types of data (current and future).

When new data needs to be migrated, first a new enum bit is to be added to the class enum and new data members are to
be added to store the information within GeometryMigrationExtension class.

In the Restore() function restoring the data to be migrated, a GeometryMigrationExtension extension is added to the
geometry to be migrated with the data information and the corresponding enum bit set.

In the object to receive the migration data, onDocumentRestored() it is checked whether an extension of type
GeometryMigrationExtension is present, if yes, it is checked whether a bit used for migration is set and, if yes,
the data is retrieved and the GeometryMigrationExtension extension (preferably) removed from the Geometry object.
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
6a02496860 Part: Geometry - Add non-const getters for extensions 2020-12-10 18:34:06 +01:00
Abdullah Tahiri
90dea635ac Part: Geometry refactor member copy
===================================

Encapsulate Part::Geometry data member copy process in a single function (copyNonTag).

Part::Geometry derived classes need not know the specifics of the data member of Part::Geometry.

Change the delegation of the copy of extensions from clone() to copyNonTag. Because clone() relies on
copy() and now copy() of Part::Geometry data member relies on copyNonTag(), there is no actual change
to the clone() functionality, but the copy() funcionality gains the copy of the extensions via copyNonTag().
2020-12-10 18:34:06 +01:00
luz paz
6ffe65c915 AddonManager: Sort .qrc file
[skip ci]
2020-12-10 11:57:25 +01:00
luz paz
7c43b059df Part: fix header uniformity + trailing whitespace
[skip ci]
2020-12-10 11:56:55 +01:00
wmayer
ed063646ed PD: [skip ci] fix invalid strings 2020-12-09 16:59:34 +01:00
wmayer
a99a601948 Gui: [skip ci] Fix Qt warning 'Unable to set geometry ...' 2020-12-09 16:22:14 +01:00
wmayer
56b4837a83 Main: [skip ci] handle C++ exception in main() function 2020-12-09 15:38:06 +01:00
wmayer
8ca1d2b3d4 Fix compiler warnings about redefinition of GL_GLEXT_LEGACY 2020-12-09 14:45:52 +01:00
Yorik van Havre
84f56393d3 Draft: Better layout of the Draft SetStyle task panel 2020-12-09 14:42:50 +01:00
Yorik van Havre
d03262cc41 Arch: Fixed typo (Awming->Awning) 2020-12-09 11:54:35 +01:00
wmayer
065f3fafa9 [skip ci] avoid to let Coin redefine several HAVE_ macros 2020-12-08 19:06:09 +01:00
wmayer
daea30341e App: [skip ci] by default disable transactions on recompute 2020-12-08 13:17:16 +01:00
wmayer
78c6cc1362 Import: [skip ci] fixes #0004477: Can't import .STEP files with cyrillic symbols 2020-12-07 17:54:17 +01:00
Yorik van Havre
b082c813f8 Merge pull request #4068 from aapo-aapo/TD-Spreadsheet-fix
[TD] TechDraw DrawViewSpreadsheet fix
2020-12-07 14:15:01 +01:00
Yorik van Havre
959c214513 Merge pull request #4113 from bitacovir/Std_File_Menu_Icons
Add SVG icons for ten Std File Menu Commands
2020-12-07 13:29:00 +01:00
bitacovir
1d3113ebda Add SVG icons for ten Std File Menu Commands
This commit adds SVG files with icons for these commands. Also, it makes the necessary changes on CommandDoc.cpp, CommandWindow.cpp, CommandStd.cpp and resource.qrc files.
2020-12-06 18:25:20 -03:00
sliptonic
983e513704 Merge pull request #4089 from mlampert/feature/thread-milling
Path: Feature/thread milling
2020-12-05 13:16:53 -06:00
Aapo
72d003f102 [TD] Make DrawViewSpreadSheet respect DrawPage::redrawCommand() update mechanism. 2020-12-05 00:50:20 +02:00
Aapo
6803af4dc4 [TD] Fix column index range checking bug in std::string DrawViewSpreadsheet::getSheetImage(void) 2020-12-05 00:50:19 +02:00
luz paz
71726a11d0 FEM: Added instructions to fem.dox file 2020-12-04 17:50:05 +01:00
luz paz
f4a65dcbb6 FEM: doxygen 2020-12-04 17:50:00 +01:00
Mark O'Donovan
bc3f90663e Remove unused variable in DrawViewDimension.cpp 2020-12-04 17:13:56 +01:00
wmayer
c76afc56e8 App: [skip ci] in addition to PR4104 pop the diagnostic 2020-12-04 17:11:22 +01:00
Mark O'Donovan
c1475c9820 Suppress gcc warnings also in FeaturePythonPyImp.h
Clang warnings are already disabled.
2020-12-04 17:09:06 +01:00
donovaly
e09d52500f [TD] uniform wording
in other/existing elements of line width we speak of "width", so do the same for line groups
2020-12-04 13:56:38 +01:00
Markus Lampert
85cd4af06b More py2 special handling for unit tests 2020-12-03 19:39:33 -08:00
Markus Lampert
9eebafbe4b Added consistent encoding headers and fixed whitespaces 2020-12-03 18:15:36 -08:00
Markus Lampert
134fe23c8f Fixed unit test breakage for py2 2020-12-03 18:15:36 -08:00
Markus Lampert
cc0ba34a4c Added thread milling files to cmake 2020-12-03 18:15:36 -08:00
Markus Lampert
c0bdf89f4c Added example thread cutter to default library 2020-12-03 18:15:36 -08:00
markus
aa2881e08e Use new ToolBits (and only those) for thread milling. 2020-12-03 18:15:36 -08:00
markus
d5beaf806d Filter all TCs for suitability for a given op. 2020-12-03 18:15:36 -08:00
markus
b7a356cceb Catch exception if shape file does not include a thumbnail. 2020-12-03 18:15:36 -08:00
markus
074ad40338 Fixed merge issue 2020-12-03 18:15:36 -08:00
Markus Lampert
b1c385f909 Cleaned up properties 2020-12-03 18:15:36 -08:00
Markus Lampert
c11aaafc54 Added support for imperial threads to thread milling 2020-12-03 18:15:36 -08:00
Markus Lampert
15141e33dc Added actual thread milling path generation. 2020-12-03 18:15:36 -08:00
Markus Lampert
0a96a861c3 Added thread milling radii calculation 2020-12-03 18:15:36 -08:00
Markus Lampert
b29d168132 Add basic thread milling op 2020-12-03 18:15:36 -08:00
Aapo
dadac36234 [TD] GQIViedDimension.cpp, GQCustomText.cpp - Fix Dimension label unit positioning bug and too tight bounding rectangle. 2020-12-03 21:31:01 +01:00
sliptonic
be190a948a Merge pull request #4097 from Russ4262/millface_fix
Path: Millface fix - Address rounding issue
2020-12-03 13:29:14 -06:00
sliptonic
c80adf8cb8 Merge pull request #4102 from sliptonic/vcarvedepth
[PATH] Add finaldepth property.
2020-12-03 13:27:44 -06:00
donovaly
a1915d313a [TD] make LineGroup selectable
At the moment one has to specify the LineGroup as string. But one doesn't know what groups exist. So one has to check the Wiki, learn there where the groups are defined and then open the definition file with a text editor.

This PR simplifies this by reading the existing groups out of the definition file and fill the combobox accordingly.
It also give the user info what the selected LineGroup defines via the tooltip.

A nice side effect is that no typos can occur since you don't have to enter the LineGroup name as text.
2020-12-03 17:24:49 +01:00
wmayer
35ad37946f Py3: [skip ci] make FreeCAD thumbnailer working with Py3 by opening PNG icon in binary mode 2020-12-03 16:50:45 +01:00
Yorik van Havre
0add97a18f Draft: Fixed Annotation style dialog's arrow types - fixes #4505 2020-12-03 16:30:05 +01:00
donovaly
8fe7ca0c21 tolerances can be negative, thus the decimal precision check must be adapted 2020-12-03 15:50:06 +01:00
donovaly
0baabcaa45 [TD] fix unit mismatch bug
- also make global decimal option italic since it only affects new dimensions
- also fix a typo in UnitsApi.h
2020-12-03 15:50:06 +01:00