Commit Graph

19169 Commits

Author SHA1 Message Date
Benjamin Nauck
d358e13cd6 TechDraw: [skip ci] convert source files from iso-8859 to utf-8
All other source files are either plain ascii or utf-8, this converts
the last few to utf-8.
2021-03-25 18:02:12 +01:00
bitacovir
a026c9d3d4 [UI] Replace SVG icons for Sketcher commands 2021-03-25 18:00:55 +01:00
wmayer
1c93fc25f1 FEM: [skip ci] re-add removed comma 2021-03-25 17:50:31 +01:00
donovaly
0a2eb2756f [PD] some fixes for the new pad length feature
- disable 2 properties when no custom direction is used
- rename a property because its name is the opposite of what it is doing
2021-03-25 17:44:30 +01:00
bitacovir
b6e81c1821 [UI] Replace Bitmap icon of Part_PointsFromMesh command 2021-03-25 17:42:26 +01:00
wmayer
1ca3b36228 Mesh: [skip ci] use enum to define the various 2D meshing algorithms 2021-03-25 17:28:13 +01:00
donovaly
bf08e25f34 [Mesh] fix Gmsh mesh algorithms
the numbers written to the geo file were wrong

- also update the list of currently supported algorithms (as of Gmsh 4.6 or newer)
2021-03-25 17:20:15 +01:00
donovaly
bcc669b930 [Base] add electrical conductivity
- this is necessary to perform electrodynamics simulations. Since the typical values are in the range of 1e6 S/m, we need the new units kS and MS

- since this is for simulations, also add electrical conductivity to the FEM material cards
2021-03-25 17:13:52 +01:00
donovaly
148c528b09 [skip ci] [FEM] don't hide Gmsh mesh by default
it is very annoying that the mesh is hided when closing the task dialog because one often has to play with the Gmsh properties and need to see the mesh.
See also https://forum.freecadweb.org/viewtopic.php?f=18&t=56401&start=10#p489734
2021-03-25 09:01:51 +01:00
donovaly
80189e3d2a [FEM] fix typo
- the property has the name "Element order" thus the dialog should use the same name to avoid confusions

-also uniform naming for the element dimension and remove the redundant "Mesh" (is already in the UI groupBox heading
2021-03-25 08:59:42 +01:00
Bernd Hahnebach
f3f2a49301 FEM: fix gui test problems introduces with af3643853c 2021-03-25 08:55:36 +01:00
Bernd Hahnebach
cf7e072ca9 FEM: gmsh mesh, set back standard element order to 2nd, changed in 7fb5a2d72a, 2021-03-24 17:05:06 +01:00
donovaly
54026f70a0 [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
75371bb238 [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
7fb5a2d72a [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
af3643853c [FEM] refactor GeometryElementsSelection, introduce parameter to modify help text for several task panels using GeometryElementsSelection. 2021-03-24 16:57:16 +01:00
sliptonic
05b0ff2fd1 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
c81a43a256 Merge branch 'master' into bugfix/dogbone-on-straight-edges-and-noop-moves 2021-03-22 14:45:41 -07:00
mlampert
5fccb4fc9b Merge branch 'master' into bugfix/job-setup 2021-03-22 14:44:44 -07:00
sliptonic
7d118f31b7 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
39e1d5c518 Merge branch 'master' into bugfix/job-setup 2021-03-22 10:52:28 -07:00
mlampert
f0eb6246f7 Merge branch 'master' into bugfix/dogbone-on-straight-edges-and-noop-moves 2021-03-22 10:52:08 -07:00
wmayer
1ac35d2b42 Import: [skip ci] handle utf-8 filepath when writing to dxf 2021-03-22 17:13:56 +01:00
wmayer
b4b1cbedb1 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
cf11f38875 [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
5e90c07375 [FEM] add material cards for gases
also add electrical conductivity for air and water
2021-03-22 10:15:20 +01:00
donovaly
804830d772 [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
011cef1e7b 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
28e40ffbee 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
2d817128d0 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
2afcbff0d6 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
8be50486af Sketcher: reset Marker Edit layer when exiting DrawSketchHandler 2021-03-21 06:56:23 +01:00
Abdullah Tahiri
010a2cbd41 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
595fc118e3 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
f4e3e8abd6 Mesh: [skip ci] refactor Mesh open/import functions 2021-03-20 21:54:30 +01:00
wmayer
182952a881 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
3a656d8597 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
Abdullah Tahiri
c08a19626f Sketcher: Use old NotifyConstraintSubstitution parameter in DlgCheackableMessageBox 2021-03-20 15:59:15 +01:00
David Osterberg
d759a8e43d Sketcher: Change constraint-conversion MessageBox to DlgCheckableMessageBox 2021-03-20 15:59:15 +01:00
wmayer
9c8685c20c Import: [skip ci] avoid conflicting class names in global namespace 2021-03-19 15:18:25 +01:00
mlampert
cbb76ca84e Merge branch 'master' into bugfix/dogbone-on-straight-edges-and-noop-moves 2021-03-17 20:13:56 -07:00
mlampert
49c6349a5c Merge branch 'master' into bugfix/job-setup 2021-03-17 20:09:52 -07:00
wmayer
371b089ea0 OpenSCAD: fix test_import_surface by changing currently working directory 2021-03-17 12:35:15 +01:00
Bernd Hahnebach
cf241d0c93 FEM: examples, elmer eigenvalues, add calculix solver for frequencies 2021-03-17 12:25:09 +01:00
wmayer
9a105e3405 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
0581409fbe OpenSCAD: [skip ci] fix incorrect filename creation in unit tests 2021-03-17 11:56:58 +01:00
UR-0
0f12d6e9ec [FEM] improve get_gmsh_version 2021-03-17 11:28:23 +01:00
Bernd Hahnebach
5bf22ad4ac FEM: examples, elmer tut1, eigenvalues, fix some problems 2021-03-17 10:45:37 +01:00
Bernd Hahnebach
71141d0964 FEM: fix unit test because of denisty writing. See 3e1b16b198. This reverts 8ec3766b00 2021-03-17 09:33:21 +01:00
Bernd Hahnebach
3e1b16b198 FEM: elmer writer, only write denisty if really needed, partitially revert 2d73444a66, unit test fix in separate commit 2021-03-17 09:26:48 +01:00