Commit Graph

18144 Commits

Author SHA1 Message Date
Abdullah Tahiri
e230e60d5f Sketcher: SketchGeometryExtension - New GeometryMode flags
==========================================================

Geometry mode flags are intended to store geometry state, such as Blocked status.
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
91ac9d2951 Sketcher: SketchGeometryExtension refactor InternalGeometry string conversion
=============================================================================

Minor refactoring to centralise string to enum conversion in a single place
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
72fa70add8 Sketcher: Adapt GeometryFacade and ExternalGeometryFacade to new SketchGeometryExtension 2020-12-10 18:34:06 +01:00
Abdullah Tahiri
858d29f163 Sketcher: Geometry Extension for Internal Alignment Geometry
============================================================

This commit extends SketchGeometryExtension to store within a Geometry if it is an internal aligment geometry
and which type.
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
2b35a7eec4 Sketcher: GeometryFacade and ExternalGeometryFacade nullptr creation
====================================================================

If the Part::Geometry * is nullptr, then it is convenient to have a
std::unique<GeometryFacade> that contains a nullptr too, because many
functions check for a Part::Geometry being a nullptr.
2020-12-10 18:34:06 +01:00
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
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
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
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
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
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
Yorik van Havre
f13c8974b5 Draft: Colored grid axes 2020-12-03 15:15:15 +01:00
wmayer
e43df16930 PartDesign: [skip ci] for PartDesign::Torus primitive use TopoShape::makeTorus 2020-12-03 15:06:22 +01:00
wmayer
88de941d1b Part: [skip ci] for Part::Torus primitive use TopoShape::makeTorus 2020-12-03 14:52:13 +01:00
wmayer
c578f9747a Part: [skip ci] add method TopoShape::makeTorus 2020-12-03 14:50:20 +01:00
sliptonic
b935769fe3 Add finaldepth property.
Operation now sets start/final depth more reasonably.
Will not violate the finaldepth.
2020-12-02 15:05:08 -06:00