Commit Graph

22869 Commits

Author SHA1 Message Date
Chris Hennes
dc09810e98 Check for filename before selecting
Correct an error caught by @davidosterberg -- the non-native QFileDialog did
not behave as expected when not provided with a default filename, so that case
is now caught and the `selectFile()` call is bypassed.
2021-02-04 15:17:43 +01:00
Chris Hennes
48fca8c2bc Add default filename for exports
When exporting a single file, the filename defaults to the current FCStd
name plus a dash and the name of the object. If multiple objects are
selected, the default is the basename of the FCStd file. No extension is
added. This behavior is controllable via two hidden preferences,
BaseApp/Preferences/General/ExportDefaultFilenameSingle
BaseApp/Preferences/General/ExportDefaultFilenameMultiple

_Allow regeneration of default on new exports_

If an export has been done and it used the default filename, on the next
export regenerate the filename (potentially updating the selected object
name in that filename) instead of just defaulting to the last name.

_Search for extension in chosen filter first_

Originally the file dialog simply searched for the first available extension
in the overall filter list. This commit modifies it to first check the
selected extension, and only if that is empty to search the full filter
list. This section of code only runs if a default filename is set but
does not have an extension ("suffix" in Qt's terms).
2021-02-04 15:17:43 +01:00
wmayer
5903ff4426 FEM: add basic support of Nastran-95 2021-02-04 13:56:15 +01:00
ceanwang
3ad8367b5e Changed comment for free format CTETRA element 2021-02-04 13:25:13 +01:00
ceanwang
172d2d8a27 Added readNastran95() 2021-02-04 13:25:13 +01:00
ceanwang
67ee247c0c Added readNastran95() 2021-02-04 13:25:13 +01:00
David Osterberg
59ec3cb141 PartDesign: New features AdditiveHelix and SubtractiveHelix
These features, based on the code for the Pipe class, allow the user
to simply create a helical sweep within PartDesign workbench.

Sample application is threads, springs, coils, augers, etc.

Also, remove needless requirement for positive cone angle on helixes.

Thanks to @bitacovir for helping with the icons
Thanks to @chennes for review
Thanks to @vosk for review
Thanks to @wwmayer for review

Enforce that links stay within scope for ProfileBased features
This also ensures that the Body itself is not used for creating features within
the body, causing a "Graph not a DAG" error.
2021-02-04 13:01:12 +01:00
Pierre LeMoine
7999536858 Transform patterns can be created from multiple base features
The infrastructure/piping seems to have been in place for a long while.
Not tested for all variations of pattern transforms.
The major enabler was removing the `break`.
Some extra piping added to let the code at call-site decide if to select multiple features or not.
2021-02-04 11:58:47 +01:00
Greg V
ce7b57a08f Sketcher: [skip ci] fix computing of hotspot of sketcher icons on Wayland
Restrict the hotspot multiplication on unix platforms to X11 (xcb platform)
2021-02-04 10:45:33 +01:00
donovaly
28c66fc501 [Sketcher] make pointers to the UI std::unique_ptr
Same as PR #4293, just for Sketcher

as noted in https://github.com/FreeCAD/FreeCAD/pull/4271#discussion_r554673632
the pointer to the UI should be a unique pointer.

This PR does this for all Sketcher dialogs that don't already use a unique_ptr.
2021-02-04 10:37:44 +01:00
j
6db7737547 Sketcher: Group tests in different directories 2021-02-04 08:10:28 +01:00
j
7b9d9fdcdb Sketcher: new fillet UI command 2021-02-04 08:10:28 +01:00
j
9fc31dfa22 Sketcher: new Fillet - icon 2021-02-04 08:10:28 +01:00
j
46feeb11f6 Sketch: new fillet Python support 2021-02-04 08:10:28 +01:00
j
f6f43b6fe4 Sketcher: Constraint documentation 2021-02-04 08:10:28 +01:00
j
86992f8086 Sketcher: Preserve corner and constraints for sketch fillets
Currently the sketch fillet tool deletes any constraints associated with
the two lines to be filleted. By leaving a vertex at the intersection,
we can instead preserve most constraints in reasonable ways.

Sketch fillet horizontal and vertical point-to-point constraint support
Also better future compatibility for point constraints, and some minor tweaks.
2021-02-04 08:10:28 +01:00
sliptonic
cc6099b7ef Merge pull request #4262 from Schildkroet/adaptive_improve
[PATH] Adaptive improve helix entry
2021-02-03 19:02:38 -06:00
luz paz
ccbc13ee82 Draft: fix LGTM 'Testing for None should use the 'is' operator' alerrts
https://lgtm.com/projects/g/FreeCAD/FreeCAD/alerts/?mode=tree&ruleFocus=7900090
2021-02-03 21:58:47 +01:00
Benjamin Alterauge
27a6dedf19 Temporarily qt5 fixes for Apple Silicon need to disable the qtwebengine. That has to be considered in MacAppBundle. 2021-02-03 21:58:07 +01:00
wmayer
222145993d Gui: [skip ci] restore tab order in selection settings page 2021-02-03 21:56:43 +01:00
Benjamin Nauck
05c61e349a Gui: Add support for selecting multiple objects without keyboard
Adds checkboxes to the document tree which makes it possible to
select multiple document objects on devices without physical keyboard.

These checkboxes are opt-in and can be enabled/disabled from:
Edit -> Preferences -> Display -> Navigation -> Selection

Forum thread for feature the request:
https://forum.freecadweb.org/viewtopic.php?f=34&t=53065

We need to iterate the tree to add/remove the selection boxes when
the enable-setting has been changed.

The size for the first column in the tree is adjusted to fit both
name and optional checkbox.
2021-02-03 21:51:56 +01:00
wmayer
d73ccbdba0 Gui: add preferences tab for selection 2021-02-03 18:06:55 +01:00
David Osterberg
99b2cba5f1 PartDesign: Allow selection of sketch plane by double click in picker dialog
Thanks to @0penBrain for solving a tricky segmentation fault
2021-02-03 16:46:47 +01:00
donovaly
45dd1a7f60 fix issue reported by @chennes
also fix annoying variable naming - different variables representing different types should not have the same name

also update a comment according to depending PRs
2021-02-03 16:24:01 +01:00
donovaly
1c58c3b677 [PD] hole fix custom cut handling
This PR is based on PR #4344 and a spin-off of PR #4337. It fixes:

We have normed screw head cuts. These values can be overridden but we must store the info about the overriding. Why? - because when you have e.g. made a custom change to a normed countersink and then change to another countersink norm, you would either not get the values defined in the norm or you get these values but loose e.g. your depth settings
2021-02-03 16:23:28 +01:00
donovaly
c676c07316 [PD] fix UTS clearance holes
This PR is based on PR #4343 and a spin-off of PR #4337. It fixes:

- the bug that we did not use the normed clearance hole diameters for UTS holes
- missing recompute when changing existing hole from Metric to UTS type
2021-02-03 16:19:24 +01:00
donovaly
7eb9b5ed42 [PD] hole dialog UI fixes
This PR is the first in a series of probably 3 PRs to fix known hole dialog bugs.

This one fixes:

- the .ui file issues
- readonly status issues of some widgets/properties (e.g. when the hole is through all, disable drill point settings)
- the bug that updateHoleCutParams() overwrote the previously correctly determined hole diameter
- just a trifle: change a function name to fit into the naming scheme
2021-02-03 16:14:36 +01:00
wmayer
3ebd7d119b Part: [skip ci] rename methods in TopoShape that override non-virtual functions of base class 2021-02-03 16:10:38 +01:00
donovaly
cc3a30a221 [PD] fix typo in iso7046.json
This mistake was introduced by me in commit 4ab3c955
2021-02-03 15:08:30 +01:00
donovaly
400b25c0d0 [TD] fix color change for dimensions
This PR fixes issue C reported here: https://forum.freecadweb.org/viewtopic.php?f=35&t=55008#p472939
- the changed color must also be applied to the dimension line and arrows
2021-02-03 14:11:44 +01:00
luz paz
45eea3d9e7 Fix various 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,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-02-03 14:08:57 +01:00
wmayer
7a83853535 Part: offer all supported STEP schemes by OCC in a combo box 2021-02-02 21:51:11 +01:00
Yorik van Havre
078160ea70 TechDraw: Exposed GeomHatch functionality to Python in TechDraw.makeGeomHatch() 2021-02-02 17:49:44 +01:00
Yorik van Havre
d02a0d558e Merge pull request #4331 from chennes/openSCADFix
[Draft] OpenSCAD/DXF error: fix DXF import with no layers
2021-02-02 14:01:43 +01:00
Yorik van Havre
253ef2a99a Merge pull request #4346 from chennes/validateStartHTMLWithW3C
[Start] Modify generated HTML to comply with W3C Validator Recommendations
2021-02-02 13:59:09 +01:00
Chris Hennes
612eba1b1a Fix Surface task panel shortcut use to use Widget context
The Delete key shortcut of the three different panels in the
Surface Workbench TaskFilling sidebar conflicted between
the panels if multiple were showing. This is resolved by
making the QAction's context the widget, rather than the window.
2021-02-01 19:40:33 -06:00
Chris Hennes
5e07d708db Remove extraneous lines from export
Corrects a merge issue from an earlier PR: the removed lines are
redundant.
2021-02-01 13:38:21 +01:00
Chris Hennes
1958e30f84 Modify Start HTML to be valid HTML
Using the W3C validator, a number of minor issues were found with the Start page
HTML. Those items were:
* Missing language setting on the body of the document
* Deprecated attributes set for the style and script tags
* Image tags require alt text
* List tags can only contain list items
* All file:/// URLs must not contain backslashes, even on Windows
2021-01-31 22:13:47 -06:00
Chris Hennes
7b9c9d4f5e Add tests for Start Page HTML validity
This test is in two parts: first the generated HTML is sanitized to remove any
potentially sensitive information (e.g. filenames, authors, document info, etc.)
and is then sent to the W3C Validator service at https://validator.w3.org/nu.
The results are interrogated and if any errors or warnings are returned, the
test fails. If the site cannot be reached this is NOT treated as a test failure.

Second, the actual (unsanitized) filenames are checked for validity: the HTML
standard prohibits backslashes in URLs, even if the URL refers to a local file
on a system that uses backslashes as a path separator (e.g. Windows). This
would have been caught by the W3C Validator if we had not sanitized the filenames.
2021-01-31 21:49:17 -06:00
Patrick F
9f07b72b40 [PATH] Limited cone angle for adaptiv helix 2021-01-31 21:23:57 +01:00
Zheng, Lei
bead9bb938 Gui: sync recent action file list from external modification 2021-01-31 18:14:18 +01:00
wmayer
93a956e70d [PD] [skip ci] fix alignment in pad dialog
just a minor UI issue: when you decrease the width of the pad dialog (e.g. because you have a small screen), the alignment of the widgets is lost. This fixes it by grouping the widgets in a grid.
2021-01-31 16:26:22 +01:00
donovaly
b50838c7a5 [PD] fix alignment in pocket dialog
just a minor UI issue: when you decrease the width of the pocket dialog (e.g. because you have a small screen), the alignment of the widgets is lost. This PR fixes this by grouping the widgets in a grid.
2021-01-31 16:03:57 +01:00
Aapo
4ea0784341 [TD] Dimensions: donovaly's minor fixes for TheoreticalExact dimensions. 2021-01-31 15:17:46 +01:00
Aapo
e802179cf4 [TD] Improve arbitrary tolerance and unit handling for Equal Tolerances. 2021-01-31 15:17:46 +01:00
Aapo
660710c26e [TD] Add under- and overtolerances for Dimension Task layout, fixes for Dimension tolerance refresh and behavior. 2021-01-31 15:17:46 +01:00
Aapo
a2f060e36e [TD] Fix degree sign processing for equilateral angular plusminus dimensions. 2021-01-31 15:17:46 +01:00
Aapo
d26b6542ca [TD] Fix regression in Dimensions: Setting arbitrary under tolerance was somehow lost. 2021-01-31 15:17:46 +01:00
donovaly
4ab3c95552 [PD] correct hole cut definitions
I was able to get the norms and could update the definitions accordingly.
For example in the ISO 10462, sizes smaller than M3 are not defined and your definition files should only contain what is really defined.
2021-01-31 13:45:57 +01:00
wmayer
096e538c9e App: [skip ci] use better deprecation warning as used in PR 4335 2021-01-30 17:27:08 +01:00