Commit Graph

23680 Commits

Author SHA1 Message Date
Zheng, Lei
74de3aebee App: fix Part::getPartOfObject()
Exclude link broght in by expressions
2021-01-12 09:45:59 +08:00
wmayer
6b3936c8b8 Sketcher: [skip ci] fix segmentation fault in ViewProviderSketch::drawConstraintIcons()
For more details see: https://forum.freecadweb.org/viewtopic.php?f=19&t=54193
2021-01-11 15:31:41 +01:00
wmayer
ddaa29d114 Win32: [skip ci] enable logging for SpaceMouse input events to figure out why Plus XT model stopped working 2021-01-11 13:51:19 +01:00
Yorik van Havre
a0bda40719 Merge pull request #4232 from hyarion/feature-spreadsheet-allow-removed-aliases
[Spreadsheet] Remove alias from dynamic properties on removeRows/Columns
2021-01-11 12:25:56 +01:00
Yorik van Havre
254c1bceef Merge pull request #4263 from donovaly/TD-tweaks
[TD] preferences entry and tolerance step size
2021-01-11 12:21:40 +01:00
Yorik van Havre
69edc2de61 Merge pull request #4261 from paullee0/ArchComponent_01
[ArchComponent] Link of Window get opening now
2021-01-11 12:19:19 +01:00
Yorik van Havre
c67f4b14f6 Merge pull request #4265 from chennes/shadowFixAndAddUnitTests
[Start] Shadow fix and add unit tests
2021-01-11 12:11:56 +01:00
Yorik van Havre
e65f6a798b Merge pull request #4269 from eddyverl/Pyramids-and_Polyhedrons
Pyramids and polyhedrons
2021-01-11 12:09:53 +01:00
Yorik van Havre
c3316693ae Merge pull request #4272 from donovaly/TD-show-balloon
[TD] show balloon dialog on double-clicking
2021-01-11 11:55:34 +01:00
donovaly
0c7c330fe1 [TD] show balloon dialog on double-clicking
when adding GD&T statements as described in https://wiki.freecadweb.org/TechDraw_Geometric_dimensioning_and_tolerancing
You will quickly get a lot of balloons and it is then very tiring to be forced to first select a balloon with a single-click in the drawing, then go to the model tree and there double-click to get the dialog.

This PR also removes unused includes from the dialog code.
2021-01-11 03:02:35 +01:00
Abdullah Tahiri
f87f1e57dc Sketcher: ViewProvider HDPI lineWidths and pointSizes as float
==============================================================

A previous commit assumed values for lineWidths and pointSizes were integers. This commit fixes this.
2021-01-10 19:31:03 +01:00
Eddy Verlinden
bd65aab55a Update AddonManager.qrc 2021-01-10 17:25:31 +01:00
Eddy Verlinden
4f86f30aa2 Add files via upload 2021-01-10 17:19:25 +01:00
Abdullah Tahiri
faf8d0ac27 Sketcher: Change of color of Y axis
===================================

On request:
https://forum.freecadweb.org/viewtopic.php?f=10&t=53221&start=50#p464971

To better differentiate constrain element from Y-axis.
2021-01-10 16:33:12 +01:00
donovaly
e8d76d49bf [TD] some fixes
- the setting "Standard and Style" only affects new dimensions, thus it must be italic

- fix bug that the Property 'LockPosition' appears for dimensions -> this is an option for views and thus must be hidden for dimensions

- since tolerances are in the vast majority fractions of a millimeter/inch, set its stepsize to 0.1
(I hope I did it right in handleChangedPropertyType.)

- fix inconsistent newlines in TaskBalloon.h

- improve wording for a heading
2021-01-10 00:29:34 +01:00
Abdullah Tahiri
4e5f0a3850 Sketcher: Check for null geometry shapes before adding them to the toShape array 2021-01-09 20:08:05 +01:00
Abdullah Tahiri
c0d810a370 Part: Geometry trigger notifyAttach on extension addition 2021-01-09 20:08:05 +01:00
Abdullah Tahiri
e6af511f39 Part/Sketcher: Refactor Geometry Extensions copy/save/restore AND attachment notification
=========================================================================================

- Long overdue refactor to avoid repetition during save/restore and copy.
- New interface to notify an extension when it is attached. It also enables the extension to gain
a pointer to the geometry container. This is intended to extend the functionality already existing
in Part::Geometry.
2021-01-09 20:08:05 +01:00
Benjamin Nauck
927fdc9edc [Sketcher] Fix crash in SketcherObject::setDatum
The variable newVals can't be used after std::move, fetch it from the
constraint it if an error occurs.
2021-01-09 07:50:31 +01:00
Chris Hennes
d18a76e9b2 Add unit tests for HTML string replacement 2021-01-08 22:18:00 -06:00
Chris Hennes
a0aaae7ead Add SHADOW replacement 2021-01-08 21:48:31 -06:00
Chris Hennes
fcdd441154 Add initial unit test for Start page.
Rebase.
2021-01-08 21:27:37 -06:00
paul lee
9211037781 [ArchComponent] Link of Window get opening now 2021-01-09 03:19:36 +08:00
wmayer
1851ddd933 Sketcher: [skip ci] fix -Winconsistent-missing-override 2021-01-08 17:32:41 +01:00
donovaly
714a716575 [TD] handle equal tolerances correctly
the common rule is that if a dimension has equal over- and undertolerance, they are output on the same line as the dimension concatenated using the ± character.

This PR does this.

Note that this is not just cosmetics, it is even standardized in the GD&T norms.

also:
* use one format specifier for tolerances since the norms don't allow a different format for the over- and the undertolerance
* some code optimizations like a self-explaining function name, remove unnecessary/outdated comments
2021-01-08 15:14:37 +01:00
Yorik van Havre
adc78f1e23 Merge pull request #4252 from donovaly/Part-angular-measure
[Part] fix angular measurement
2021-01-08 11:42:21 +01:00
Yorik van Havre
d339e40671 Start: Fixed freedesktop thumbnail retrieval 2021-01-07 15:36:06 +01:00
marioalexis
1bfd7644b2 Gui: Prevent crash when trying to access a deleted object from a SelectionObject 2021-01-07 14:06:54 +01:00
vosk
94405e33c7 [PartDesign]: Fix refine boolean not being obeyed at multiple places
Related to issue #3927
2021-01-07 14:04:31 +01:00
Abdullah Tahiri
b054e16cf4 Sketcher: Fix detach observer 2021-01-07 12:37:48 +01:00
luz paz
5b058a9f13 Sketcher: App/Sketch.h minor documentation tweaks [skip ci] 2021-01-07 12:16:24 +01:00
Abdullah Tahiri
b01e189c63 Sketcher: Preferences - add 3D view scaling factor
==================================================

In addition to the font size in pixels, which controls the 3D View font size (and indirectly the constraint icons),
it is now possible to configure a scaling factor controlling the width of geometry, axes, information layer, and
constraint lines.
2021-01-07 12:11:01 +01:00
Abdullah Tahiri
3661ffe7fb Sketcher: Constraint icons and fonts in 3D View
===============================================

Based on PRs #4146 #4155.

PR #4155 proposes a scaling factor to be used to scale up constraint icons and the subindex font of icons. The
scaling factor is a parameter.

PR #4146 proposes to derive the constraint icon size from the system font size via function of the dpi. The
constraint icon subindex is a factor of the constraint size.

Observations:
- PR #4146 identifies the need for a scaling factor too, but this is a hardcoded 1.25 factor.
- PR #4146 appears to mix font points and font pixels when deriving the sizes.
- PR #4155 deals exclusively with icon size and subindex font, not with constraint label

Useful concepts:
- Font point is a physical distance. There are 72 points in one inch.
- Monitors have pixels with varying pixel densities. The number of pixels in one point varies
with pixel density. Hence the need for a correction based on the dpi of the monitor.

API constraints:
- While QT's configuration can be obtained in points or pixels, coin3D sets the font size in points.

Solution:
- Continue relying on the local font setting from preferences for coin3d font, albeit by converting from pixels to points.
- Introduce a sketcher wide 3D view scaling factor, as per #4155. This factor is however used for geometry, not for fonts.
- Geometry is scaled to compensate for the scaling factor and the monitor pixel density (the scaling factor is the product
of both scaling factors).
- Derive the 3D view icon size to be 80% (hardcoded) of the 3D view font size. Having constraint icons proportional to contraint label
font size gives consistency to the interface, as constraint icons also have subindices. I do not think it is worth to provide this 80%
as a configurable parameter
- The constraint icon subindex, being a special case of font relative to the accompanying icon, is set to be the 80% of the
icon size (hardcoded). I think it is not worth to provide this as a configurable parameter.

Bonus:
- ViewProviderSketch implements an observer of parameter group and tracks view scaling factor parameter and marker size.
- On change of parameter the inventor nodes are updated and the 3D view redrawn.
- Size information is moved to edit structure for consistency with Marker size.
2021-01-07 12:11:01 +01:00
Kisolre
1d970d5226 Sketcher: Add constraint icon scaling.
https://forum.freecadweb.org/viewtopic.php?f=3&t=4362&start=20#p458026
2021-01-07 12:11:01 +01:00
Ilia (Elyas) Sobolev
7a82f955ca Sketcher: Scalable constraint icons
Rendering scalable icons from .svg
The size of the icons is related to the font size of the constraints.
Calculations and access to settings are collected in one place.
Default based on system font size.
And also Symbol for diameter and radius.
2021-01-07 12:11:01 +01:00
Abdullah Tahiri
e29a394ce0 Sketcher: std::move improvement fixes 2021-01-07 12:03:26 +01:00
Yorik van Havre
f774c0ec5e Merge pull request #4244 from danreb25/BBLPatch_ArchComponentDiffuseColor
Arch: deal with missing DiffuseColor attributes on obj.CloneOf.ViewObject
2021-01-07 11:53:40 +01:00
Yorik van Havre
94767d4622 Merge pull request #4249 from donovaly/GUI-icon-fix
[GUI] fix missing Std_AxisCross icon
2021-01-07 11:49:43 +01:00
Yorik van Havre
eb2d512fc8 Merge pull request #4251 from fxjaeckel/patch-1
[OpenSCAD] fix parsing error for numbers with positive exponent >= 6
2021-01-07 11:48:58 +01:00
Zheng, Lei
12defb11b6 Part/Sketcher: improve list property update efficiency 2021-01-07 10:27:21 +01:00
wmayer
5d9db07ddd Part: [skip ci] in TopoShape::getMemSize() handle edges or faces with no attached geometry 2021-01-06 15:39:25 +01:00
Abdullah Tahiri
ec73869d1c Sketcher: Remove Internal Alignment constraint from toolbar
===========================================================

This constraint command is basically never used by users and almost never by power users.

If it is not removed is because it may be useful for debugging... and maybe we should think about
removing the command althogether, as debugging can be done via Python console.
2021-01-06 13:54:00 +01:00
Abdullah Tahiri
4ffb6c5e2a Sketcher: VP - Fix error messages while deleting geometry
==========================================================

When selecting a list of geometry, where at least one element has internal geometry, together with the internal geometry
produced an error in the report view.

Solution:
Use newly exposed deleteGeometries to delete all geometries at once.

Note:
The list is not reverse sorted (as opposed as with the deleteGeometry method), as the list will be sorted
by SketchObject in the normal order. Reverse sorting would lead to the worst case for that normal order sort.
2021-01-06 13:54:00 +01:00
Abdullah Tahiri
a3b9edc6d8 Sketcher: Expose delGeometries function to Python 2021-01-06 13:54:00 +01:00
Abdullah Tahiri
41c91574cf Sketcher: deleteGeometries split
================================

New deleteGeometries function, according to the comment should the same
as deleteGeometry but at a time. However, this is not accurate, as deleteGeometry
deletes any internal geometry associated to the provided GeoIds, whereas
deleteGeometries does not delete that internal geometry.

Solution:
Split deleteGeometries into two different functions:
1) delGeometriesExclusiveList
2) delGeometry

The former will not delete associated internal geometry. It is more efficient, but
it is the resposibility of the caller not to leave internal geometry undeleted.

The latter, implemented in terms of the former, will delete associated internal
geometry too.

As a bonus, the latter will also remove any GeoId duplicates.
2021-01-06 13:54:00 +01:00
Abdullah Tahiri
b91bba28b3 Sketcher: VPSketch override correctness 2021-01-06 13:54:00 +01:00
Abdullah Tahiri
dbb08f0bfe Sketcher : Correct XPM icon
===========================

Added yellowish inside for better visualisation
2021-01-06 13:54:00 +01:00
Abdullah Tahiri
a388a0d980 Sketcher: ViewProvider - Show malformed constraints in solver messages 2021-01-06 13:54:00 +01:00
Abdullah Tahiri
3d5ab8a67e Sketcher: add command to select malformed constraints 2021-01-06 13:54:00 +01:00
Abdullah Tahiri
2bd2041bfe Sketcher: Retrieve 1-based list of malformed constraints from solver 2021-01-06 13:54:00 +01:00