When enabling the experimental "Allow multiple solids in Part Design Body
by default" some involute gear tests broke. As a quick measure,
`AllowCompound` was disabled for the respective body. This commit now
makes the tests independent of this setting and removes the workaround.
Presumably Component Drawings are more common as opposed to Assembly Drawing's
therefore FreeCAD's default should reflect this.
find src/Mod/TechDraw/Templates -iname "*.svg" -exec sed -i 's#Assembly Drawing#Component Drawing#g' "{}" \;
* Change Address the poor performance of the existing unique-name generation
As described in Issue 16849, the existing Tools::getUniqueName method
requires calling code to form a vector of existing names to be avoided.
This leads to poor performance both in the O(n) cost of building such a
vector and also getUniqueName's O(n) algorithm for actually generating
the unique name (where 'n' is the number of pre-existing names).
This has particularly noticeable cost in documents with large numbers
of DocumentObjects because generating both Names and Labels for each new
object incurs this cost. During an operation such as importing this
results in an O(n^2) time spent generating names.
The other major cost is in the saving of the temporary backup file,
which uses name generation for the "files" embedded in the Zip file.
Documents can easily need several such "files" for each object in the
document.
This is the first part of the correction, adding an efficient class for
managing sets of unique names.
New class UniqueNameManager keeps a list of existing names organized in
a manner that eases unique-name generation. This class essentially acts
as a set of names, with the ability to add and remove names and check if
a name is already there, with the added ability to take a prototype name
and generate a unique form for it which is not already in the set.
a new unit test for UniqueNameManager has been added as well.
There is a small regression, compared to the existing unique-name code,
insofar as passing a prototype name like "xyz1234" to the old code would
yield "xyz1235" whether or not "xyz1234" already existed, while the new
code will return the next name above the currently-highest name on the
"xyz" model, which could be "xyz" or "xyz1" or "xyz0042"..
* Sketcher: Handle exceptions in onViewValueChanged
Because the method onViewValueChanged is used as a Qt slot it must handle all possibly raised exceptions as otherwise
they will slip through GUIApplication::notify() that usually results into a crash on some platforms like macOS
* Sketch: Handle undefined values in calculateThroughPointMinorAxisParameters
* The argument of acos() must be in the range [-1, +1], otherwise it returns nan (not a number)
* The value of sin(0) = 0. So, it cannot be used in the denominator of a fraction
Fixes#19013.
* Check direction of plane axis with a tolerance.
* Check the produced solids. Notably check for a min. volume. Required for solids created from non-planar faces.
* Apply placement to created compound.
Refer to discussion at -
https://github.com/FreeCAD/FreeCAD/issues/18917
Like Wall and Stairs, Space should do without Base. Base validity tested in execute() prevented the desired and documented behaviour.
EnsureBase() is remarked out in execute() and to be run in getShape(). With this improvement, if there is no Base, or Base is not valid, Space would be created if it could be defined by obj.Boundaries.
* BIM: Fix color support for DAE import
There was some mention of color in the original code but it was not
working on my system.
Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
* BIM: Use `BIM` rather than `Arch` for translation context
* BIM: remove Python 2 compatibility
* BIM: improve style of importDAE.py
Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
---------
Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
Co-authored-by: Gaël Écorchard <gael@km-robotics.cz>
We are able to pass extra modules path with command line arguments.
Handle such modules when copying about information to clipboard.
Change-Id: I158b6ea021cc0a5dfd27693d22f6c56a6bdcd239
* Draft: props_changed_placement_only should ignore material props
The new material related properties (Density, Volume and Mass) must be ignored by the `props_changed_placement_only` function.
Without this moving a Draft_Point will fail for example.
* Draft: Closed corners for extruded Facebinders
Fixes#13816.
The `makeOffsetShape` method that creates the extruded shape is quite picky. For example, it will work for a pyramidal shell (4 triangles) with a square floorplan, but not if the floorplan is slightly rectangular. To get closed corners the `Sew` property of the Facebinder must be set to `True`. If extruding does not work properly, the code will retry with `Sew` disabled.
There is also some code that tries to convert flat B-spline faces created between the main offset faces into planar faces. In some cases that code will fail (the results of `makeOffsetShape` can already contain errors). If that is the case the original shape created by `makeOffsetShape` is used.
* Rebase to restore base.py
* FEM: Update solver.py
* FEM: Update write_step_equation.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This introduce new option `-E [ --macro-path]` to specify extra system
paths of macros. The macro found in this paths will appear in `Macros`
dialog at `System macros` tab.
Change-Id: Ic21631ec0ebe8af5c7f42b4fe95400cfb67807d5
* [TD]allow DrawViewAnno to be attached to another view
* [TD]allow image and spreadsheet attach to view
* [TD]ensure correct parent in scene
* [TD]refactor command helpers to separate file
- gathering the helpers in one place
- helper redundancy to be address in another change
* [TD]create symbol, spreadsheet, image with parent
* [TD]fix claimChildren for some views
- also includes many lint fixes
Reverts PR #17438
The PR experienced sever performance issues when the file contained
objects with errors. This PR removes the physical properties attributes
and its associated calculations.
It retains changes to the material filter funtions which were not
affected by the errors.
The new material related properties (Density, Volume and Mass) must be ignored by the `props_changed_placement_only` function.
Without this moving a Draft_Point will fail for example.
* Draft: make_sketch.py: Use sketcher methods to add constraints
A sketch object has its own methods to add coincident, horizontal and vertical constraints. Using those methods allows to simplify the make_sketch.py code. The new code applies the mentioned constraints to the whole sketch, instead of per object. The old code would not add coincident constraints between seperate, but connected, objects. the new code does.
Note that the code for point objects (not changed in this PR) does not work properly.
* Fix 2 issues
* The Sketcher detect functions need a tolerance argument.
* obj.Shape.copy() does not work properly for a Draft_Point. As a workaround a Part Vertex is created instead.