Commit Graph

23427 Commits

Author SHA1 Message Date
Chris Hennes
57c93cd6b3 [OpenSCAD] Improve helical extrusion, fix scaling
Modify the auxiliary spine to be a true helix, resulting in a much
smoother linear extrusion when a twist angle is applied. This also
corrects a bug in the scaling during linear extrusion, where non-uniform
scaling was not handled correctly.
2021-03-25 21:23:29 +01:00
Chris Hennes
a0464d1b00 [OpenSCAD] Fix bug in resize code
The resize code must recompute some kinds of objects prior to requesting
their bounding box, or the bounding box can be invalid.
2021-03-25 21:20:47 +01:00
donovaly
f71dd32ae9 [Part] change icon to math the other Part icon scheme
The other Part icons have red lines indicating wires, only the new make faces ion does not. The PR changes this to use the same for all icons.
2021-03-25 18:11:49 +01:00
donovaly
d65cc5c63f [Part] uniform feature sorting
at the moment the sorting is confusing, the sorting in the menu differs from the toolbars and some features even belong in the menu to another category than in the toolbars and one feature has not yet a toolbar entry

This PR implements a uniform sorting for the menu and toolbar and adds the missing toolbar icon
2021-03-25 18:04:35 +01:00
Benjamin Nauck
bb5ac30e24 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
9e4d6d68fb [UI] Replace SVG icons for Sketcher commands 2021-03-25 18:00:55 +01:00
wmayer
747c9aba57 FEM: [skip ci] re-add removed comma 2021-03-25 17:50:31 +01:00
donovaly
00a7221a95 [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
3b4e96d4a7 [UI] Replace Bitmap icon of Part_PointsFromMesh command 2021-03-25 17:42:26 +01:00
lorenz
e415b22a97 cmake: update command to find python-site-packages
https://stackoverflow.com/a/40006251
2021-03-25 17:40:01 +01:00
wmayer
6159c6da13 Mesh: [skip ci] use enum to define the various 2D meshing algorithms 2021-03-25 17:28:13 +01:00
donovaly
3f3ce8ff90 [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
6c67300d62 [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
Chris Hennes
7857a88c4d [GUI] Remove explicit triangle styling from tabs
On Windows the lower tabs of the PropertyView were being set to
triangular, which breaks stylesheets. This removes that code, so they
now take on whatever the standard shape is on the system.

Fixes #0004599
2021-03-25 15:44:19 +01:00
donovaly
b0051d1d5f [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
2b6da56241 [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
865b9d27da FEM: fix gui test problems introduces with 1b83da9deb9c 2021-03-25 08:55:36 +01: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