Safeguards the generation of explosion trail lines to avoid creating
invalid geometry.
Previously, if a part displacement was zero (or effectively zero),
`Part.LineSegment` would attempt to create a line with identical start
and end points, causing OpenCascade to throw a `Part.OCCError`. This
resulted in failures during document restoration and recomputes.
This commit introduces a `_createSafeLine` helper method that checks the
distance against a `1e-7` (near-zero) tolerance before attempting to
generate the shape.
* Assembly: Sub-assembly: fix support for Part-wb objects
* [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>
* Assembly: no dragger for connected parts
* [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>
* [ Assembly ]: Update SPDX License Identifiers
* [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>
* Assembly: ExplodedViews: Add getExplodedShape for techdraw to use
* TechDraw: ShapeExtractor fix assembly exploded views
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Assembly: Fix variable casing in CommandCreateView.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* Assembly: Fix Iisolate issue when obj and link both in assembly
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update src/Mod/Assembly/Gui/ViewProviderAssembly.cpp
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
* [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>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
This is defensive code that protects against attempting to dereference
nodes that are not present, preventing the python code from throwing an
AttributeError.