Commit Graph

23411 Commits

Author SHA1 Message Date
Oliver Oxtoby
428868fb09 AddonManager: Fix logic for fallback to displaying raw markdown
The logic was inverted in commit 1caf62c6375d9eb82245d1c977dbc799fbf4ed89
2021-03-24 22:38:30 +02:00
Bernd Hahnebach
ec7bffa94b FEM: gmsh mesh, set back standard element order to 2nd, changed in eefb6bc0babf, 2021-03-24 17:05:06 +01:00
donovaly
e001b133a9 [FEM] add missing material cards to CMakeLists.txt
This fixes issue 1. reported here: https://forum.freecadweb.org/viewtopic.php?f=18&t=56912#p489666
2021-03-24 17:02:06 +01:00
donovaly
ac6f25ea4a [FEM] add mesh algorithms
- Gmsh has since a while 2 new mesh algorithms
- on the other hand the two algorithms ""Frontal Delaunay" and "Frontal Hex" are deprecated and not listed anymore in the docs: https://gmsh.info/doc/texinfo/gmsh.html#index-Mesh_002eAlgorithm3D
and indeed all attempts with these 2 algorithms fail
2021-03-24 17:01:47 +01:00
donovaly
21e511f63f [FEM] add GMSH mesh order setting to dialog
- also set default to 1st order mesh
2021-03-24 17:00:12 +01:00
UR-0
9274a0baca [FEM] refactor GeometryElementsSelection, introduce parameter to modify help text for several task panels using GeometryElementsSelection. 2021-03-24 16:57:16 +01:00
sliptonic
fcb40c05f0 Merge pull request #4624 from mlampert/bugfix/dogbone-on-straight-edges-and-noop-moves
[Path]: Bugfix/dogbone on straight edges and noop moves
2021-03-23 12:58:44 -05:00
mlampert
0cb9b5d112 Merge branch 'master' into bugfix/dogbone-on-straight-edges-and-noop-moves 2021-03-22 14:45:41 -07:00
mlampert
f82caaddb8 Merge branch 'master' into bugfix/job-setup 2021-03-22 14:44:44 -07:00
sliptonic
c88d75296a Merge pull request #4615 from Russ4262/fix_pocketshape_combine_shapes
[Path] Fix connected multi-face clearing bug
2021-03-22 13:53:55 -05:00
mlampert
2598d339fb Merge branch 'master' into bugfix/job-setup 2021-03-22 10:52:28 -07:00
mlampert
74c528e8f0 Merge branch 'master' into bugfix/dogbone-on-straight-edges-and-noop-moves 2021-03-22 10:52:08 -07:00
wmayer
2c2b60323f Import: [skip ci] handle utf-8 filepath when writing to dxf 2021-03-22 17:13:56 +01:00
wmayer
09f93b2e8d PD: fix several issues in pad:
* pass boolean instead of int to setValue of PropertyBool
* support of symmetric option for two-length mode
* fix bug in TaskPadParameters::updateUI()
* remove strange acronyms from method names
2021-03-22 16:40:15 +01:00
donovaly
2d447d2560 [PD] add along length option for pad
- as discussed here: https://forum.freecadweb.org/viewtopic.php?f=17&t=50466&start=10#p433327
this PR is the first step for new Pad features.
It implements 3 features requested by users:
1. an option to measure the pad length along its direction if there is a custom direction
2. when there are two lengths, the reverse feature should be active
3. the pad dialog shows now always the used pad direction, no matter if it is a custom one or the sketch's normal

- Furthermore there are some code improvements (avoid rounding and blocking signals)

- Also adapt TestPad.py because its test used the case two lengths + reversed but this was not possible before this PR - the reverse option was not take into account for two lengths in FeatureSketchBased.cpp)
Now it is and therefore the test must be updated:
In the test the second sketch has the normal vector 0, -1, 0. As the reverse option is set the pad direction is 0, 1, 0. So in y direction is the length (1mm) and in -y direction is length2 (2mm). This gives together with the other pad of volume 1, a total volume of 4.

- fix UI issue: either reversed or midplane
As noticed by @chennes, when the pad uses symmetric, reversed is not sensible and vice versa.
This commit fixes the missing Gui side for the case midplane is checked and the App side.

- the PR also fix two typos
2021-03-22 16:36:04 +01:00
donovaly
3e25e6cc1f [FEM] add material cards for gases
also add electrical conductivity for air and water
2021-03-22 10:15:20 +01:00
donovaly
95ec662c38 [FEM] fix specific heat of air
- also adjust values slightly according to various sources

Since a factor 1000 is a big mistake and air is the most common gas, please commit this also for FC 0.19
2021-03-22 10:11:13 +01:00
Bernd Hahnebach
034397b1d2 FEM: material task panel, fix unuseable Gui if material editor was canceled and material accepted 2021-03-21 23:18:44 +01:00
Abdullah Tahiri
2c114bee3f Sketcher:: Trim creator UI
==========================

* Enable to select any GeomTrimmedCurve (any arc supported by the Sketcher), as well as B-Splines.
* Use Edit Markers to provide visualisation of the cutting position and cut segment end point before trimming.
* Reject trimming Internal aligned geometry (internals of complex geometries such as ellipses or hyperbolas)
2021-03-21 06:56:23 +01:00
Abdullah Tahiri
30ce0310b8 Sketcher: SketchObject - Trim refactor
======================================

* Refactor the code for all GeomTrimmedCurve and non-periodic BSplines in a single block, adding
support for arcs of hyperbola, parabola and B-Splines.

* Refactor the code for periodic curves (circle, ellipse) in a single block, adding support for
periodic B-Splines.

* Add support for trimming limited by external geometry

* Trim deletes a geometry if intersections are detected and nothing would be left after trimming

* Trim deletes a geometry if no intersection are detected

Bonus:
* Function addConstraint moving the constraint instead of cloning it again
* SketchObject::seekTrimPoints as a wrapper of Part2DObject::seekTrimPoints providing
a correct handling of GeoId indices.
* Helper functions addConstraint/createconstraint to create new constraints and move them
into the Constraint property
* New getGeometry with templated return type defaulting to Part::Geometry.
2021-03-21 06:56:23 +01:00
Abdullah Tahiri
5ea99f4786 Part: Geometry - Add function to trim a B-Spline
================================================

Supports both non-periodic and periodic case
2021-03-21 06:56:23 +01:00
Abdullah Tahiri
e0d980f701 Sketcher: reset Marker Edit layer when exiting DrawSketchHandler 2021-03-21 06:56:23 +01:00
Abdullah Tahiri
83ffbe22d5 Sketcher: ViewProvider - add marker information layer
=====================================================

New Coin Marker layer intended to temporarely highlight sections of the 3D View for information purposes.
Independent from the actual redrawing of the geometry and constraints.
2021-03-21 06:56:23 +01:00
Abdullah Tahiri
e8d5d69314 Part: Part2DObject::seekTrimPoints rename parameters
====================================================

This function takes parameters named GeoId, which evoke the Sketcher GeoId and which
indeed are used by the sketcher. However, these indices are just indices of the provided
geometry list. Therefore:
1. The are never negative (no matter if a corresponding Sketcher GeoId is external or not).
2. They do not have reserved indices for axes.
3. Most importantly, not found GeoId1 and GeoId2 are coded as -1, which for the Sketcher has
a well defined meaning (axis), whereas the Sketcher uses Constraint::GeoUndef as undefined or
not present/ not found index, which currently is -2000.

For these reasons, it was judged appropriate to rename the parameters and documentation to
emphasise that this function is unrelated and dettached from any Sketcher knowledge, and that
indices are just normal indices of a vector.
2021-03-21 06:56:23 +01:00
wmayer
2c08e37ec0 Mesh: [skip ci] refactor Mesh open/import functions 2021-03-20 21:54:30 +01:00
wmayer
5479a886df Mesh: [skip ci] do not make lower case read lines of OBJ file as otherwise it may fail to load the MTL file 2021-03-20 19:19:30 +01:00
Abdullah Tahiri
5cae88ca41 Sketcher: UI Constraint Creation - PointOnObject + Tangency on edge constraint substitution
============================================================================================

On creation of a constraint from the UI (toolbar/menu):

1. if a PointOnObject constraint preexisted the addition of an
edge-to-edge tangency, substitute it with a point-to-edge tangency.

2. if an edge-to-edge tangency preexisted, addition of a PointOnObject
results in a substitution of the edge-to-edge tangency with an edge-to-curve
tangency.

Bonus:
- Refactor of this with preexisting coincident+tangent substitution.
- Activate both substitutions in continuous constraint addition mode.
2021-03-20 18:12:54 +01:00
wmayer
32ab2cc74c Gui: [skip ci] avoid using const reference as member for several action classes to avoid memory corruption 2021-03-20 16:13:56 +01:00
Abdullah Tahiri
1498c32316 Sketcher: Use old NotifyConstraintSubstitution parameter in DlgCheackableMessageBox 2021-03-20 15:59:15 +01:00
Abdullah Tahiri
eaf65569a8 Gui: Extend DlgCheckableMessageBox to use specific preference path and parameter 2021-03-20 15:59:15 +01:00
David Osterberg
13fef6ac79 Sketcher: Change constraint-conversion MessageBox to DlgCheckableMessageBox 2021-03-20 15:59:15 +01:00
wmayer
292afa2a2e Import: [skip ci] avoid conflicting class names in global namespace 2021-03-19 15:18:25 +01:00
turn211
bb78bd9fd1 [Stylesheet] ProDark: major bugfix for add-ons
https://forum.freecadweb.org/viewtopic.php?f=34&t=55134&start=100
2021-03-19 06:31:27 -04:00
mlampert
48055c746f Merge branch 'master' into bugfix/dogbone-on-straight-edges-and-noop-moves 2021-03-17 20:13:56 -07:00
mlampert
4162e324c1 Merge branch 'master' into bugfix/job-setup 2021-03-17 20:09:52 -07:00
wmayer
fc39b205d2 OpenSCAD: fix test_import_surface by changing currently working directory 2021-03-17 12:35:15 +01:00
Bernd Hahnebach
8c1165f1e9 FEM: examples, elmer eigenvalues, add calculix solver for frequencies 2021-03-17 12:25:09 +01:00
wmayer
a1952dade7 OpenSCAD: fix utility_create_scad by changing currently working directory so that test_import_surface doesn't fail any more 2021-03-17 11:59:14 +01:00
wmayer
a9b602816d OpenSCAD: [skip ci] fix incorrect filename creation in unit tests 2021-03-17 11:56:58 +01:00
UR-0
0a06458cb3 [FEM] improve get_gmsh_version 2021-03-17 11:28:23 +01:00
Bernd Hahnebach
b34fe9bf19 FEM: examples, elmer tut1, eigenvalues, fix some problems 2021-03-17 10:45:37 +01:00
Bernd Hahnebach
16e851e0e0 FEM: fix unit test because of denisty writing. See 8f32144b447. This reverts f7605f29633 2021-03-17 09:33:21 +01:00
Bernd Hahnebach
9a25d17ad0 FEM: elmer writer, only write denisty if really needed, partitially revert c236616cb092, unit test fix in separate commit 2021-03-17 09:26:48 +01:00
mlampert
a2e0a6bbaf Merge branch 'master' into bugfix/job-setup 2021-03-16 19:58:52 -07:00
mlampert
de033975ac Merge branch 'master' into bugfix/dogbone-on-straight-edges-and-noop-moves 2021-03-16 19:58:34 -07:00
wmayer
b86deada1c Part: [skip ci] implement makeShellFromWires 2021-03-16 16:01:43 +01:00
Bernd Hahnebach
1e4d2777e6 Update task_material_common.py 2021-03-16 11:55:19 +01:00
Bernd Hahnebach
6acf00f401 FEM: material task panel, small code improvements 2021-03-16 11:22:27 +01:00
mlampert
0d75a148f8 Merge branch 'master' into bugfix/job-setup 2021-03-15 22:42:07 -07:00
Markus Lampert
a589be64d9 Dogbone resiliency against noop moves 2021-03-15 22:39:27 -07:00