Commit Graph

24614 Commits

Author SHA1 Message Date
Chris Hennes
9540cf0bbd [OpenSCAD] Add piecewise helix for OCCT < 7.5
Address a hang when using older versions of OCC to create a rotated
extrusion. This approximates the auxilliary spine as set of line
segments formed from the helix, rather than using the helix directly.
2021-03-29 13:59:03 -05:00
Chris Hennes
46b0043b49 [OpenSCAD] Add additional recompute() logic 2021-03-29 13:58:52 -05:00
wmayer
2887eadea7 Gui: concatenate rotations and apply the result once at the end 2021-03-29 18:29:44 +02:00
donovaly
8e417f96b8 fix animation issue
SO's auto rotation has its own rotation logic that ends at fixed positions. This collides with the "to nearest" option whose aim is to rotate to the next sensible state taking into account from what position the rotation was started.

Thus the solution is to disable SO's auto rotation while the cube is rotated.
2021-03-29 17:11:50 +02:00
donovaly
54fd82b109 [Gui] improving NaviCube
fixes bug 4495

- add missing edge faces
- implement a proper rotation recipe -> rotate towards the nearest possible state
- add preferences settings to turn off this new rotation behavior
- get rid of transparent cube faces to avoid wrong clicks, this way also remove the backfaces
- to make the edge faces fit, use triangles for the corners
- expose cube size setting to preferences dialog
- add new button to view backside
- get rid of bitmaps because as reported in https://forum.freecadweb.org/viewtopic.php?f=3&t=52118&start=20#p481781
the x y z labels are not scaled on HiDPI screens
moreover they are often "in they way" when you want to click on a corner and in principle they don't provide more info since we already have the CS with the axis labels

- also fix an arithmetic overflow compiler warning
- also rename 2 variables
2021-03-29 17:11:34 +02:00
wmayer
12b8f10421 Gui: [skip ci] expose Control::showModelView() to Python 2021-03-29 17:05:54 +02:00
Abdullah Tahiri
85e8ad36b5 Sketcher: No vertex color update (selection/preselection) after box selection
=============================================================================

The issue:
https://forum.freecadweb.org/viewtopic.php?f=10&t=56550#p486554

The fix:
Setting the render type to Image causes the issue, but neither do I know why it is
necessary to set it to Image, nor do I understand why this is causing the issue. I
only know it solves the issue.
2021-03-29 16:23:18 +02:00
Abdullah Tahiri
b28ec0c989 Sketcher: add subnodes to the right separator 2021-03-29 16:23:18 +02:00
donovaly
73e4e4f339 [Part] save more icons with uniform resolution
- also save them as plain SVG to get rid of sometimes deprecated Inkscape-only stuff
2021-03-29 16:21:59 +02:00
wmayer
acbb604a16 App: use std::wstring_convert instead of QString to encode/decode unicode/utf-8 2021-03-29 16:19:13 +02:00
wmayer
6c01302a19 Gui: fix unicode handling of path names on Windows 2021-03-29 15:41:13 +02:00
Benjamin Nauck
dbc4611bb2 App: Refactor win appData setup with boost::filesystem 2021-03-29 15:03:41 +02:00
Benjamin Nauck
a7e6171e49 App: Refactor *nix appData setup with boost::filesystem 2021-03-29 15:02:49 +02:00
Benjamin Nauck
c431672e87 App: Refactor mac appData setup with boost::filesystem
This will make it easier to add support for migration when moving
appData from `Library/Preferences` to `Library/Application Support`.
2021-03-29 15:02:36 +02:00
Matthijs Kooijman
fdc6890f4e Gui: Enable compression of tablet motion events
By default (on platforms that support it, X11 and Windows currently) QT
applies compression for high frequency events (mouse move, touch, window
resizes) to keep things smooth even when handling the event takes a
while (e.g. to calculate snapping).

However, tablet pen move events (and mouse move events synthesised from
those, which is what FreeCAD uses) are not compressed by default (to
allow maximum precision when e.g. hand-drawing curves), leading to
unacceptable slowdowns using a tablet pen.

This commit enable compression for tablet events here to solve that and
make use of a tablet just as smooth as a mouse with FreeCAD.

This can (and likely will) lead to some movement events being dropped,
but since there is no freeform curve drawing tool, that should not be
problematic (and if it is ever added, it could still work without
compression if the mouse movement event handler is written to be fast
enough).
2021-03-29 12:08:46 +02:00
donovaly
856f16211c [Gui] add recompute icon to context menu
as discussed here: https://forum.freecadweb.org/viewtopic.php?f=34&t=57139&start=10
2021-03-29 11:12:15 +02:00
wmayer
90dd0f8e91 Gui: [skip ci] add some separators to context-menu to group recompute related functions 2021-03-29 11:11:12 +02:00
wmayer
7babbb9825 Gui: fix Command::_invoke to avoid build failure 2021-03-29 11:06:16 +02:00
wmayer
4b2a30312e PD: [skip ci] fixes #0004139: Macro - SubtractivePipe attached path object issues after macro executed 2021-03-29 10:43:08 +02:00
wmayer
6fb9ec1b25 App: [skip ci] rename class to PropertyLinkT 2021-03-29 01:16:04 +02:00
wmayer
53de0c4720 App: [skip ci] add class PropertyListT 2021-03-29 00:47:38 +02:00
wmayer
ca83354bf9 Gui: [skip ci] refactor Command::invoke 2021-03-28 20:04:31 +02:00
wmayer
44c444bf2f Gui: Running a command with Gui.runCommand() must always be considered as Gui command 2021-03-28 18:40:16 +02:00
wmayer
2565ef5f69 PD: in setEdit() helper function make sure that recorded macro is handled as Gui command 2021-03-28 18:39:44 +02:00
David Osterberg
673150d4b7 Gui: Change the Part icon 2021-03-28 17:46:16 +02:00
Chris Hennes
48b4a9d7c9 Remove unneeded Qt version checks 2021-03-28 17:41:27 +02:00
Chris Hennes
be0d3e1157 Remove deprecated Qt constants
Qt has deprecated the following constants, this commit replaces them
with their new equivalent/replacement:

Qt::TextColorRole -> Qt::ForegroundRole
Qt::BackgroundColorRole -> Qt::BackgroundRole
QPainter::HighQualityAntialiasing -> QPainter::Antialiasing
QPalette::Foreground -> QPalette::WindowText
2021-03-28 17:03:09 +02:00
Chris Hennes
49f4e66501 Minor refactoring and cleanup of the About window
Removes old Qt code, restores the conditional inclusion of the
3Dconnexion license information, shortens the displayed hash, and links
the hash to its repo.
2021-03-28 16:12:27 +02:00
donovaly
b8a7fb26c1 [Part] save icons with uniform resolution
- also save them as plain SVG to get rid of sometimes deprecated Inkscape-only stuff
2021-03-28 16:02:28 +02:00
flachyjoe
3b089ee761 format TopoShapeWirePy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
0b8c738920 format TopoShapeSolidPy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
8c1f3d16af format TopoShapeShellPy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
f167fb1765 format TopoShapeEdgePy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
88c60f127b format TopoShapeCompoundPy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
c97c77ba1d format TopoShapeCompSolidPy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
79e3cc18b2 format TopoShapeFacePy.xml 2021-03-28 15:36:36 +02:00
flachyjoe
a9d99cbd3c fix some missed lines 2021-03-28 15:36:36 +02:00
flachyjoe
5389eeccb3 Improve Part.Shape methods documentation
Formats UserDocu to follow the template:
 Description
 method(args) -> return
 --
 More infos
2021-03-28 15:36:36 +02:00
wmayer
bc51f50720 OpenSCAD: [skip ci] disable rich text in OpenSCAD widget to avoid weird behaviour when copying code from an HTML page 2021-03-28 13:51:38 +02:00
wmayer
27049b3e54 PD: remove superfluous code block from Helix::execute 2021-03-28 13:38:53 +02:00
wmayer
2df88592ec PD: replace error-prone strings with enum to handle different helix modes 2021-03-28 13:37:13 +02:00
tomate44
1a8b840709 PartDesign Helix: update NbTurns in Pitch-Height-Angle mode 2021-03-28 13:13:10 +02:00
Chris Hennes
5b9f7116ce [OpenSCAD] Add angle & $fn to rotate_extrude(file) 2021-03-28 12:38:31 +02:00
Chris Hennes
74c2ef4e8d [OpenSCAD] Add $fn and angle to rotate_extrude()
As pointed out in Issue #0004353 the OpenSCAD Workbench does not
correctly implement the angle parameter to rotate_extrude (it's a
relatively recent addition to OpenSCAD), nor does it attempt to do
anything with a specified $fn. This commit adds both features. To add
$fn handling, the code from the cylinder extrusion was mimicked,
allowing FreeCAD to create perfect, smooth representations when $fn
exceeds a user specified value in Preferences, but attempting to create
OpenSCAD's more discrete representation when using a lower $fn. Note
that this determination is made at creation time: if the user later
increases the segments parameter in the new object, it will remain
prismatic regardless of how high the value is made.
2021-03-28 12:38:11 +02:00
lvk88
7bc24b5582 [GUI] Enable dragging in dependency graph view
This commit makes it possible to drag the dependency graph using the
left mouse button.

See issue #3896.
2021-03-28 12:06:59 +02:00
Chris Hennes
dd8447445a [PD] Misc. small LGTM fixes 2021-03-28 11:39:04 +02:00
donovaly
4839b14adc [Gui] add Std_TransformManip to MenuItem
I was wondering why we only offer this tool in the context menu. I tested and cannot see a drawback in having it also in the edit menu
2021-03-28 11:34:40 +02:00
donovaly
c242d8ba64 [Sketch] fix a typo in preferences dialog
- all other option text use consequently lowercase letters
- also set dialog to a more sensible sensible size
- the other changes were automagically done by QT Creator
2021-03-28 11:32:22 +02:00
wmayer
a2ba99452f Mesh: [skip ci] in ViewProviderMesh::highlightSegments change material binding only if colors list is non-empty 2021-03-28 11:27:04 +02:00
luz paz
1a40cdfd43 fix source comment typos [skip ci]
Found via  codespell v2.1.dev0
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,parms,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/doc/SourceDocu
```
2021-03-28 10:57:24 +02:00