Commit Graph

26622 Commits

Author SHA1 Message Date
wmayer
b6527a7098 Gui: add function View3DInventorViewer::projectPointToLine and expose to Python 2021-12-12 12:49:53 +01:00
wmayer
4dae213b45 Gui: harmonize classes View3DInventorViewer and View3DInventorPy 2021-12-12 11:33:04 +01:00
wmayer
651a4d7626 Part: set explicit format version number for binary BRep files to support all OCC versions 2021-12-12 01:15:56 +01:00
Jonas Bähr
7dcd59d9fb PD: Enhance the helix property docs
Most strings are based on descriptions from the wiki [1]. Some have been
extended where I saw need. Note that I'm not a native speaker, though.

[1]: https://wiki.freecadweb.org/PartDesign_AdditiveHelix
2021-12-11 23:33:28 +01:00
wmayer
f212a8ef76 Part: set explicit format version number for BRep files to support all OCC versions 2021-12-11 23:31:41 +01:00
Abdullah Tahiri
17836f5d39 Sketcher: GeoList remove _PreComp 2021-12-11 21:48:21 +01:00
Roy-043
ac0bae2337 Draft: fix Draft_Arc_3Points task panel issues
Fixed the following task panel issues:
1. Wrong title and icon.
2. Continue toggle missing.
2021-12-11 19:00:31 +01:00
mwganson
8f0aecbcf3 [python editor] add keywords False, nonlocal, and True to keywords list for syntax highlighting 2021-12-11 18:49:58 +01:00
Mateusz Skowroński
a2b6f55d17 Fix Qt deprecation warning. QPrinter::setOrientation() is obsolete. 2021-12-11 18:46:29 +01:00
Abdullah Tahiri
e20039cbbb Sketcher: GeoList Improvements
==============================

- Improve GeoList to support GeoElementId input
- Support VertexId to GeoElementId conversion
- GeoListModel gets separate getGeometry and getGeometryFacade naked pointers
- Sketcher: GeoList - make index mappings mutable
- Improve documentation
2021-12-11 17:02:00 +01:00
Abdullah Tahiri
3c43b50608 Sketcher: Improve documentation of GeoEnum, PointPos and GeoElementId 2021-12-11 17:01:39 +01:00
Abdullah Tahiri
97c82a6703 Sketcher: Convert PointPos into an enum CLASS 2021-12-11 16:17:21 +01:00
Abdullah Tahiri
bb76be1371 Sketcher: GeoId, GeoElementId and GeoUndef refactor
===================================================

This commit is an independent refactor of the identifications used at Sketcher level.

It introduces a new type "GeoElementId" as a combination of GeoId and PointPos.

It moves the Undefined GeoId, previous Constraint::GeoUndef to GeoEnum, together with all
other fixed values of GeoIds.
2021-12-11 16:17:21 +01:00
wmayer
56d86df5bb Base: fix memory leak when creating object with factory method 2021-12-11 14:26:40 +01:00
wmayer
2f99b5b56d Base: [skip ci] allow to access the twin pointer of a PyObjectBase 2021-12-11 08:33:50 +01:00
luz paz
bfc8111d19 Cam: Adjust header uniformity 2021-12-10 14:29:34 +01:00
wmayer
c11d5df80a TD: replace usage of raw pointers of Vertex and Face with shared pointers.
This fixes issue 4741: Broken File After Using Landmark Dimension in TechDraw
2021-12-10 14:25:24 +01:00
luz paz
d87b45b214 ReverseEngineering: translate doxygen from DE to EN
For the purpose of making the source documentation uniform, source comments in this file were translated to english.
2021-12-10 14:17:50 +01:00
wmayer
f7ec9787d1 Part: a deflection of 0.0 is not allowed any more for meshing a shape 2021-12-10 13:31:40 +01:00
Roy
24bfc4f0a2 Draft: Fix Part_Line offset issue 2021-12-10 02:40:16 +01:00
luz paz
810d41ce52 Path: fix typo in author's name 2021-12-10 02:36:56 +01:00
luz paz
e901e584ac Path: fix file header uniformity 2021-12-10 02:36:56 +01:00
wmayer
01cc99349e Test: explicitly switch on undo/redo mode in testIssue4649 2021-12-10 00:04:40 +01:00
wmayer
24ce41328a Test: disable a test that fails in command line mode 2021-12-09 21:32:02 +01:00
wmayer
f687e25e01 Test: add unit test for issue 0004649 2021-12-09 18:47:38 +01:00
wmayer
e855cc6bd3 App: 0004649: Segmentation fault when clearing an expression in an onChanged handler 2021-12-09 18:21:26 +01:00
luz paz
b6f9f39ffc Fix various typos and grammatical refinements 2021-12-09 08:57:52 -06:00
wmayer
782f9c93f4 Part: [skip ci] 0004665: Part/projection tool : Unhandled unknown exception caught when mouse gets over a datum plane 2021-12-09 14:16:06 +01:00
wmayer
5ddefe56fb PD: 0004699: ShapeBinder still touched after recompute 2021-12-09 12:33:09 +01:00
Yorik van Havre
f61ca1bf17 Merge pull request #5223 from Roy-043/Draft_fix_task_panel_issues
Draft fix task panel issues
2021-12-09 11:16:45 +01:00
wmayer
055bcbbe1a Gui: refactoring: move duplicated code to DockWindowManager::activate() 2021-12-09 07:40:44 +01:00
mwganson
6c065300a8 [StdCmdSendToPythonConsole] make python console visible if not already visible and set keyboard focus to it when invoking the send to python console command 2021-12-09 07:08:25 +01:00
wmayer
208237d2e6 PD: 0004582: Mulit-transformation dialog cannot be cancelled 2021-12-09 06:13:25 +01:00
Roy-043
d3cad74ac6 Draft: fix regression draftlink.py (#5220)
* Draft: fix regression draftlink.py

This PR fixes a regression introduces with #5180.

Using transformShape is the correct solution.
2021-12-08 07:37:23 -06:00
luz paz
4bd77b3b35 Draft: fix doxygen typos 2021-12-07 22:53:54 -06:00
Paul Lee
ea25f69f03 [ArchWall] Do not copy shape
Discussions-
https://forum.freecadweb.org/viewtopic.php?style=1&t=62968&p=540585
234899409f
2021-12-07 18:55:43 -06:00
Abdullah Tahiri
62c8125097 Sketcher: Addition of layerId field to SketcherGeometryExtension, GeometryFacade and ExternalGeometryFacade, and their Python wrappers 2021-12-07 16:30:55 +01:00
Abdullah Tahiri
f29a6a0518 Sketcher: move GUI common utility functions to a new file Utils.h
=================================================================

Common utility functions used by almost all Command classes were previous in Constraint.h.

Aside from providing a very bad intent, it created unnecessary header dependencies.

This commit separates these common functions into a new header, utils.h, which is then
used in all command classes where it is necessary.
2021-12-07 16:30:55 +01:00
Abdullah Tahiri
5f0d3e22fc Sketcher: CommandSketcherTools add missing include that was indirectly satisfied 2021-12-07 16:30:53 +01:00
Abdullah Tahiri
6857f105f7 Sketcher: ConstraintType enum indicate underlying type
======================================================

This enables forward declaration
2021-12-07 16:30:53 +01:00
Abdullah Tahiri
e472aef28a Sketcher: SketchObject - method to getCompleteGeometry as GeometryFacade
========================================================================

As GeometryFacade is provided with more sketcher specific functionality, the demand
for to get GeometryFacades instead of Part::Geometry object increases too. This
addition reflects this increase of demand.
2021-12-07 16:30:53 +01:00
Abdullah Tahiri
db1bcc5f13 Sketcher: Move GeoEnum struct to separate file
==============================================

Separate struct into own file to avoid having to include all the dependencies of SketchObject in other code that relies on GeoEnum.
2021-12-07 16:30:53 +01:00
Abdullah Tahiri
b88dad5ef2 Sketcher: Create GeoList class
==============================

Class for managing internal and external geometry as a single object. This is a light-weight alternative to
passing the whole SketchObject.

It reflects the format used in getCompleteGeometry of SketchObject and Sketch solver facade class, while providing
several convenient conversion functions to map indices.

Internal and external geometries are present in a single geometry vector one after the other.

The index of the geomlist (all layers) and the GeoId can be converted from each other at needed
using the member fuctions (and sometimes the static member functions).

Internal implementation is as a template GeoListModel<T>.

The following types are instantiated. Specialisation is provided where necessary.

GeoList = GeoListModel<Part::Geometry *>;
GeoListFacade = GeoListModel<std::unique_ptr<const Sketcher::GeometryFacade>>;

This enables to use the lighter GeoList were sufficient, while enabling off-the-shelf replacement
when switching to a GeoListFacade is necessary.
2021-12-07 16:30:53 +01:00
Abdullah Tahiri
1e66792cf9 Sketcher: GeometryFacade Improvements
===============================================

1. Correct GeometryFacade getGeometry for const objects.
2. Modifications to avoid exceptions on the constructors.
3. Add default move constructor and move assignment operator.
4. Delete default copy constructor and copy assigment operator.
2021-12-07 16:30:53 +01:00
Abdullah Tahiri
e16b9f47af Part: Geometry - Curve member to calculate the normal at Point
==============================================================

Convenience member function combining closestParameter and normalAt using parameter.
2021-12-07 16:30:53 +01:00
Abdullah Tahiri
8b4276c2cc Part: Geometry - Extend Geometry Curve to query the value at parameter point directly from D0
=============================================================================================

Use the geometry specific D0 to calculate value at parameter point.
2021-12-07 16:30:53 +01:00
Abdullah Tahiri
fa1a571cc9 Sketcher: Constraint.h - add underlying type to PointPos enum
==============================================================

This enables forward declarations.
2021-12-07 16:30:53 +01:00
wmayer
ca5c799ce2 Gui: rename methods of SelectionObserver to clarify intention in client code 2021-12-07 14:17:07 +01:00
wmayer
ce88fa2052 PD: enable selection only on request and disable it after selecting an object 2021-12-07 13:06:48 +01:00
wmayer
a27b3067ba PD: eliminate the boolean argument from TaskSketchBasedParameters::onSelectReference 2021-12-07 11:04:22 +01:00