Eric Price
dc6799fb7c
Measurement: Avoid null shapes to be returned in all code branches ( Fix #16820 )
...
Returning a null shape would have triggered an exception in the bottom branch but not in the top one - which later leads to a segfault - solution - raise an exception. OOC doesn't like null shapes.
2024-09-25 12:29:48 -05:00
Eric Price
2ef683e56f
Measurement: Correctly handle unknown selections to avoid segfaults (Fix 16794)
...
The measurement code did not handle mixed selections of known and unknown types correctly. Although a unknown selected object would leave the type at Invalid, selecting both known and unknown objects would have the type determined by the known object type and treat the unknown as the same. This causes exceptions and - worst case a segmentation fault.
This fix introduces a new category "other" which - if present in a selection always forces type to Invalid. This should be forward compatible in case new types are introduced in the future.
2024-09-25 07:48:56 -05:00
PaddleStroke
81d3690397
Measure: Fix quickmeasure globalplacement.
2024-09-19 08:47:57 -05:00
mosfet80
66878494a8
clean Measurement.cpp
...
clean Measurement.cpp
2024-09-02 18:04:24 +02:00
pre-commit-ci[bot]
010e6872be
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-08-26 23:55:17 +02:00
pre-commit-ci[bot]
7c6b8cc9ab
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-08-25 11:42:43 +00:00
wmayer
17613bf929
Measure: Fix exception handling
...
If a Base::Exception is thrown in Measurement::getShape() then it's handled by the catch(...) handler and
converted into a Base::RuntimeError. This behaviour hides the original Base::Exception.
Example:
Selecting a datum plane raises the error 'Measurement: Unknown error retrieving shape' because the
original Base::ValueError isn't forwarded.
2024-06-02 08:15:57 +02:00
PaddleStroke
818e122420
Core / Measure: Introduce QuickMeasure
2024-05-06 18:12:14 +02:00
hlorus
bed703a6f9
[Measure] Add features, viewproviders and preferences for unified measurement facility
2024-04-29 09:27:22 -04:00
wmayer
da00501288
Mod: modernize C++: use equals default
2023-08-22 11:16:49 +02:00
luzpaz
79e150a81b
Fix trailing whitespace, typos, headers
...
Fix trailing whitespace, typos, and header uniformity.
2023-01-23 00:34:37 +01:00
wandererfan
9e48f5a158
[Measure]fix angle returns supplementary value
2023-01-07 16:32:03 -05:00
wandererfan
38f8137884
[Meas]handle long subElement names in reference
2022-12-02 14:19:53 -05:00
luz paz
452008f65d
Fix header uniformity for various workbenches/directories
...
Also includes some trailing whitespace fixes
2022-11-29 04:48:57 +01:00
Uwe
d11e416845
[Measure] remove a unused include
...
- also some sorting
2022-11-23 03:50:45 +01:00
wandererfan
694aefc197
[Measurement]apply globalPlacement to geometry
2022-11-14 16:38:06 -05:00
wandererfan
312d62cc18
[Measurement]support for 3 point angle
2022-11-04 08:28:13 -04:00
berniev
f4ffd15864
Mod: redundant void 2
2022-08-08 10:27:50 +02:00
berniev
47ac049e14
Mod: use emplace_back
2022-08-05 10:36:16 +02:00
Uwe
0dabdab140
[Measure] Measurement.cpp: add missing include
2022-07-03 21:38:52 +02:00
Uwe
4dced53a00
[Part] Pa* to Pre*: remove unneeded includes
...
- also sort includes
2022-07-03 20:47:03 +02:00
Uwe
887fa15b01
[Measure] remove unused includes
2022-03-20 17:56:00 +01:00
Zheng, Lei
e90d09dc40
TechDraw: Link related changes
...
* Support link and group objects
* Support view sync by implementing view provider API getMDIView()
* Use handleChangedPropertyType() for object migration instead of
reimplementing Restore() because of a lots of changes in
PropertyContainer::Restore().
* Various other small fixes.
2019-08-17 15:15:46 +02:00
wmayer
31d1c1d212
fix warning
2019-05-03 18:20:36 +02:00
wandererfan
42316a91ef
Fix Error handling Measurement module
2019-04-26 06:36:56 -04:00
wmayer
d11bfed7c6
Replace Base::Exception with appropriate subclass
2018-11-14 17:36:00 +01:00
WandererFan
d9b71fb754
LinkScope clean up
2017-12-31 14:54:05 +01:00
wmayer
0d617f97d6
Port to occ7.2:
...
+ Standard_Failure::Caught() is now marked as deprecated and should be replaced with standard C++ exception handling
2017-09-01 16:27:46 +02:00
Peter Lama
fa4bebf2e0
Use OCCT Handle macro for Handle_ classes
...
This is the result of running OCCT's upgrade script provided
with OCCT 7.0. See
https://www.opencascade.com/content/freecad-occt710-and-windows-rtti-data-missing#comment-form
and
https://www.forum.freecadweb.org/viewtopic.php?f=4&t=21405&start=120#p169019
for why this is necessary for OCCT >= 7.1
2017-04-20 12:27:34 +02:00
Kunda
0192f2bf20
source typo fixes pt2 (only on py3 merged code)
2017-02-28 17:01:11 +01:00
wmayer
d2d927e760
performance improvements
...
+ use const-reference as argument to avoid tmp. copy
+ use prefix incremation operator instead of postfix increment operator
2016-11-08 13:51:22 +01:00
WandererFan
53f0649273
Allow True dimensions to reference multiple Parts
2016-11-07 17:20:20 -05:00
wmayer
c3087e75fd
fix -Wextra in Measure
2016-09-22 16:46:18 +02:00
wmayer
9d52b05888
fix Coverity issues
2016-08-19 22:51:33 +02:00
Wolfgang E. Sanyer
d1d2f1f811
This commit adds getShape and setShape to TopoShape
2016-08-06 23:42:55 +02:00
WandererFan
621d570026
Preserve True/Projected state on save/restore
2016-07-11 15:32:16 +02:00
WandererFan
47599be2b6
change Dimension.ProjectionType -> MeasureType
2016-07-11 15:32:16 +02:00
WandererFan
49e4ce8306
Mod/Measure warnings
2016-07-11 15:32:16 +02:00
WandererFan
74f536c820
Add /Mod/Measure for TechDraw
2016-07-11 15:32:16 +02:00