Commit Graph

22658 Commits

Author SHA1 Message Date
Bernd Hahnebach
fdb89678ac FEM: mesh tools, add a comment 2021-01-17 23:46:49 +01:00
Bernd Hahnebach
5fb28bdc96 FEM: utils, fix clipping FemMesh without Shape 2021-01-17 23:46:41 +01:00
Abdullah Tahiri
e191391384 Sketcher: Compensate for Coin not taking the dpi of the monitor into account in font pixel setting
==================================================================================================

Coin documentation indicates the size of a font is:

SoSFFloat SoFont::size        Size of font. Defaults to 10.0.
For 2D rendered bitmap fonts (like for SoText2), this value is the height of a character in screen pixels. For 3D text, this value is the world-space coordinates height of a character in the current units setting (see documentation for SoUnits node).

However, with hdpi monitors, the coin font labels do not respect the size passed in pixels:
https://forum.freecadweb.org/viewtopic.php?f=3&t=54347&p=467610#p467610
https://forum.freecadweb.org/viewtopic.php?f=10&t=49972&start=40#p467471

Because I (abdullah) have  96 dpi logical, 82 dpi physical, and I see a 35px font setting for a "1" in a datum label as 34px,
and I see kilsore and Elyas screenshots showing 41px and 61px in higher resolution monitors for the same configuration, I think
that coin pixel size has to be corrected by the logical dpi of the monitor. The rationale is that: a) it obviously needs dpi
correction, b) with physical dpi, the ratio of representation between kilsore and me is too far away.

This means that the following correction does not have a documented basis, but appears necessary so that the Sketcher is usable in
HDPI monitors.
2021-01-16 08:00:30 +01:00
Abdullah Tahiri
952f75f979 Sketcher: fix horizontal distance constraint on external edge
=============================================================

Fixes:
https://forum.freecadweb.org/viewtopic.php?f=3&t=54348#p467107
2021-01-15 14:38:48 +01:00
Abdullah Tahiri
e9c22f93fd Sketcher: Migrate old construction points as construction
=========================================================

Fix that construction points, which did not have the construction flag before, as construction flag was
reserved for internal alignment points, are migrated as construction points.

Fixes:
https://forum.freecadweb.org/viewtopic.php?f=8&t=53466&start=40#p467176
https://forum.freecadweb.org/viewtopic.php?p=467160#p467160
2021-01-14 19:22:15 +01:00
Abdullah Tahiri
d0859f46cb Sketcher: Increase distance from constraints to geometry
========================================================

With the possibility to increase icon sizes via font configuration, the
default hardcoded 2.5 step for seeking the constraint position becomes too
small, causing constraints, specially when multi-icon, to superimpose geometry points,
removing the ability to pick them.

Changing the default gives some increased room for icon size.
2021-01-14 17:22:09 +01:00
Abdullah Tahiri
eb184db9b5 Sketcher: fix font size 2021-01-14 16:27:48 +01:00
Yorik van Havre
5e800499af Merge pull request #4275 from realthunder/FixGetPartOf
App: fix Part::getPartOfObject()
2021-01-14 12:53:20 +01:00
Yorik van Havre
c8e7bccc11 Merge pull request #4276 from donovaly/TD-exact-no-tolerance
[TD] don't allow tolerances for exact values
2021-01-14 12:50:53 +01:00
sliptonic
6a471970ad Merge pull request #4188 from Russ4262/fix_import_base_geometry
Path: Fix `Import` feature of Base Geometry
2021-01-13 15:00:17 -06:00
sliptonic
967ca5d8ee Merge pull request #4184 from Schildkroet/leadinout_gui
[PATH] LeadInOut GUI
2021-01-13 14:28:28 -06:00
sliptonic
dc22199f57 Merge pull request #4227 from mlampert/feature/expose-enumerations-to-python
[App]: Expose PropertyEnumeration values list to python.
2021-01-13 12:27:53 -06:00
wmayer
e4573f1727 Win32: [skip ci] fix support of SpaceMouse Plus XT 2021-01-13 15:15:25 +01:00
wmayer
50f54a2f78 zipios++: [skip ci] apply bugfix on ZipLocalEntry::trailingDataDescriptor() from upstream 2021-01-13 13:22:07 +01:00
donovaly
81ff5a422f [TD] don't allow tolerances for exact values
as discussed here: https://forum.freecadweb.org/viewtopic.php?f=35&t=54218
when a value is theoretically exact it must not have a tolerance

This PR
* fixes this
* also fixes the bug that OverTolerance must not be negative if the tolerances are equal
2021-01-13 04:05:31 +01:00
sliptonic
3489ebe8eb Merge pull request #4187 from Russ4262/patch-2
Path: Add missing reference to thread cutter bit
2021-01-12 13:17:10 -06:00
Yorik van Havre
7b10771b7c Draft: Don't snap to ImagePlanes 2021-01-12 15:31:55 +01:00
Yorik van Havre
f1d9c795ed Arch: Fixed non-workng Panel tools 2021-01-12 15:10:16 +01:00
Zheng, Lei
6b527baf6a App: fix Part::getPartOfObject()
Exclude link broght in by expressions
2021-01-12 09:45:59 +08:00
wmayer
8c8afe6bd1 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
9a4a025b0a 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
acd0932bff 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
c50796e009 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
548bf4ff42 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
59692dc6d5 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
ed80aa314e Merge pull request #4269 from eddyverl/Pyramids-and_Polyhedrons
Pyramids and polyhedrons
2021-01-11 12:09:53 +01:00
donovaly
699baa8477 [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
031a3940a9 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
f63b08f7d6 Update AddonManager.qrc 2021-01-10 17:25:31 +01:00
Eddy Verlinden
216a6c189b Add files via upload 2021-01-10 17:19:25 +01:00
Abdullah Tahiri
31c47eedb3 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
96eaff8e4e [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
df1bf89cda Sketcher: Check for null geometry shapes before adding them to the toShape array 2021-01-09 20:08:05 +01:00
Abdullah Tahiri
024283e704 Part: Geometry trigger notifyAttach on extension addition 2021-01-09 20:08:05 +01:00
Abdullah Tahiri
b69b3c71c0 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
6c6790e8b5 [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
379ebb8dac Add unit tests for HTML string replacement 2021-01-08 22:18:00 -06:00
Chris Hennes
c7f1a49ba4 Add SHADOW replacement 2021-01-08 21:48:31 -06:00
Chris Hennes
55efacd398 Add initial unit test for Start page.
Rebase.
2021-01-08 21:27:37 -06:00
paul lee
1084912bff [ArchComponent] Link of Window get opening now 2021-01-09 03:19:36 +08:00
wmayer
f03bd3d157 Sketcher: [skip ci] fix -Winconsistent-missing-override 2021-01-08 17:32:41 +01:00
donovaly
2232b1d48e [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
e6aaaf51b6 Merge pull request #4252 from donovaly/Part-angular-measure
[Part] fix angular measurement
2021-01-08 11:42:21 +01:00
Yorik van Havre
6c7366f76e Start: Fixed freedesktop thumbnail retrieval 2021-01-07 15:36:06 +01:00
marioalexis
daca7843ee Gui: Prevent crash when trying to access a deleted object from a SelectionObject 2021-01-07 14:06:54 +01:00
vosk
d667dd7102 [PartDesign]: Fix refine boolean not being obeyed at multiple places
Related to issue #3927
2021-01-07 14:04:31 +01:00
Abdullah Tahiri
7aa05d5ded Sketcher: Fix detach observer 2021-01-07 12:37:48 +01:00
luz paz
39831c5006 Sketcher: App/Sketch.h minor documentation tweaks [skip ci] 2021-01-07 12:16:24 +01:00
Abdullah Tahiri
d30f877788 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
c71a4e0c2f 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