- since we use consistently SI units (as recommended my the Elmer forum), we need to scale the input mesh (we use ElmerGrid that has an option fur this purpose)
- Since the result will be in the scaled mesh, we need to scale it back
With this PR, one gets now correct result independent of
- the used unit scheme
- the simulation type (electrical or thermo-mechanical)
Using the default argument supported by getattr makes this code a bit
simpler and probably (ever so slightly) faster.
See https://forum.freecadweb.org/viewtopic.php?f=10&t=58611 for previous
discussion.
This is not an exhaustive change, these are just a few I encounted while
working with the code.
TextAlignment is the vertical alignment, while Justification is the
horizontal alignment. here, get_text was passed the vertical, while it
expected the horizontal. This caused the alignment of a Label to be
wrong in the resulting SVG (e.g. in a TechDraw draft view).
This seems to have been broken since SVG support for Labels was first
introduced in commit 3391a5ea4b (Initial work, only text (no lines)).
Label objects would produce invalid SVG XML, because the stroke-linecap
property was added as if it was a style (with : and ;), but it was
inserted in the XML tag directly, rather than inside the style attribute
value. The invalid SVG prevented for example a TechDraw draft view from
rendering when it contained a label.
This was added in commit d8c74c06fd (Draft: Using square endcaps for
lines in SVG output).
This stroke-linecap is supported both as a presentation attribute inside
the style or a XML attribute, so for consistency with the surrounding
attributes, it is made a normal attribute, rather than putting it inside
the style.
See also https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap
Evaluation of the XQuery has a complexity of more than O(3), as the
underlying QDomNodeModel::compareOrder is quite expensive.
Traversing the DOM tree directly is significantly faster, i.e. it now
takes constantly less time than the actual drawing via QPainter, while
previously it could take several magnitudes more time.
Fixes#6638
Also replace the XQuery used for reparenting the drawing group. Not
performance critical, but significantly simpler code.
- don't include license text because it it a nightmare to checking if texts are still the actual ones
link the licenses instead. (Links are much easier to maintain for every release.)
- update weblinks
Todo: we must decided for a License of FreeType, see our developers forum