Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from FreeCAD:master #1721

Open
wants to merge 3,038 commits into
base: master
Choose a base branch
from
Open

[pull] master from FreeCAD:master #1721

wants to merge 3,038 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 12, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

PaddleStroke and others added 19 commits September 17, 2023 13:05
The code relied on the old implementation of Draft patharray where the calculated placements were not returned in sequence.

Forum topic:
https://forum.freecad.org/viewtopic.php?t=81246
Add `Shape.SubShapes` instead of a copy of the shape. This avoids cut problems if there are intersecting solids.

Forum topic:
https://forum.freecad.org/viewtopic.php?t=81240
and fix two further memory leaks
If a project contains an unknown geometry extension then the attempt to create it returns a null pointer which isn't checked and causes a segmentation fault.

See also forum: https://forum.freecad.org/viewtopic.php?t=81091
…-with-intersecting-solids

Draft: shape2dview: avoid issues with intersecting solids
…acement

Arch: Fix Arch_Fence section placement
donovaly and others added 28 commits October 3, 2023 17:45
Related issue:
#5603.

Previous PRs:
#10766
#10838

The remaining Plane class functions have been processed (some are unchanged):

`setup`
* Updated to use new functions.
* The `direction` etc. arguments are never used AFAICT.
* Added `from draftutils import gui_utils`.

`reset`
* Unchanged.

`setTop`
* Calls `super().set_to_top()`. That function does not use `align_to_point_and_axis` but specifies exact vectors for improved accuracy.
* `import FreeCADGui` already happens at the top of the file.
* The code block after `if FreeCAD.GuiUp:` was kept for now.

`setFront`
* Idem.

`setSide`
* This function sets the WP to the left side position, and not to the right side postion as in the Draft_SelectPlane command.
* Idem.

`getRotation`
* Revised.
* The function has an akward name as it returns a Placement.
* The special code for Arch active container is obsolete (was already commented out in other functions).

`getPlacement`
* The `rotated argument` is ignored now. It was only used in the context of the old `placement_from_face` algorithm. See `DraftGeomUtils.placement_from_face` for the new implementation.
* Calls `super().get_placement()`.

`getNormal`
* Basically unchanged.

`setFromPlacement`
* Revised to call `super()` functions.

`inverse`
* Unchanged.

`save`
* Unchanged.

`restore`
* More compact code, but basically unchanged.

`getLocalCoords`
* Calls `super().get_local_coords()` which does not rely on Draft code, but creates a matrix and returns `mtx.inverse().multVec(point)`.

`getGlobalCoords`
* Calls `super().get_global_coords()` which creates a matrix and returns `mtx.multVec(point)`.

`getLocalRot`
* Calls `super().get_local_coords()`.

`getGlobalRot`
* Calls `super().get_global_coords()`.

`getClosestAxis`
* Calls `super().get_closest_axis(vec)` which translates the vector to the WP coordinate system and then finds the closest axis by comparing the absolute coordinates of the vector.

`isGlobal`
* Not used anywhere AFAICT.
* Calls `super().is_global()` which also checks the `position` attribute.
* As before the function works without any tolerance.

`isOrtho`
* Not used anywhere AFAICT.
* The original algorithm did not work properly (there was a comment). All angles were measured relative to the global Y axis. If the WP was randomly rotated around that axis the function would still return `True`. The new algorithm, `super().is_ortho()`, uses rounded Yaw, Pitch and Roll angles to check for orthogonality.

`getDeviation`
* Not used anywhere AFAICT.
* Unchanged.

`getParameters`
* Calls `super().get_parameters()` which uses the local `_get_prop_list` function.

`setFromParameters`
* Calls `super().set_parameters()` which uses the local `_get_prop_list` function.

`_get_prop_list`
* Function used internally. Returns a list of attribute.
FEM: pressure constraint overhaul
Currently this check isn't enabled but when pushing a PR then the lint checker warns about non-explicit constructors which is
a bit annoying because the PR must be updated to fix the warning or in most cases it won't be fixed at all.

By enabling this check the developer already sees the warning before pushing a PR.
and remove the assert(0) statement as this is an indication of a problem in the code but not serious enough to crash the application
…its_selection_#7746

Adding "ProjectUnitSystem" support to project files.
=================================================================

When in Sketcher edit mode, a tool button is activated, while the view has been changing to view of a different type, it segfaults.

This commit checks the pointer of the view to ensure correct type before activation, and refusing to activate if not of the correct type.

fixes #10809
Update Python tests to work with other locales

This fixes issues #10917 and #10924

Numeric values were beign compared to strings that did not take into account localizations. The test was modified to work regardless of localization.

There is still a known issue when working with pt_BR.UTF8. The default encoder for this localization is not UTF8 resulting in an error working with a parameter that returned the UTF character for the Greek letter mu in its units.
=================================

Original idea of Werner:
#10643 (comment)

I really liked this syntax to avoid repetition and even explicit consideration of Types when type checking.

I thought it would be a pitty to get it lost.
===========================================================

Just two small refactor examples of how to use the type checking template functions.
@yorikvanhavre yorikvanhavre deleted the branch looooo:master October 8, 2023 19:58
@yorikvanhavre yorikvanhavre deleted the master branch October 8, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.