* Revert cleanplanegcs: removed unused code, removed redefinition of pi
* Sketcher: Switch pi refs to double and constexpr
* Modify code to use the new pi constant immediately
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
* fix 10742
* moved expression string modifier to helper function
* Tests: Add example tests for SketchObject
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* made expr modifier func static, pass by value and added unit tests
---------
Co-authored-by: Chris Hennes <chennes@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Presumably due to an copy/paste error, carbonCopy used to verify the
referenced object via `isExternalAllowed` (just like addExternal).
Now using `isCarbonCopyAllowed`, the resulting error message is the
expected one for wrong objects, not a generic one after the operation
failed.
The part behind the column represents the function name itself, not an
error message. So previously, an argument error looked like this:
("Give an object" is not the method name)
```
>>> obj.carbonCopy()
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: Give an object() takes at least 1 argument (0 given)
>>> obj.carbonCopy(123)
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: Give an object() argument 1 must be str, not int
```
While the format string also supports a text for the complete error message
(using a semicolon instead), I decided against this: Pythons standard text
is more precise than this:
(the type error here is not "Give an object")
```
>>> obj.carbonCopy()
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: Give an object
>>> obj.carbonCopy(123)
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: Give an object
```
Needs changes in TopoShape and creation of ExternalGeometryFacade.
Also contains the squashed ticket:
[Sketcher] Hide unimplemented code
These will eventually be implemented in phase 3 of toponaming.
[Sketcher] Implement trivial `checkSubName` to appease Windows
[Sketcher] Modify `GeoEnum` usage
=======================================================
The original coding grouped normal and construction geometries together regardless of the actual order.
If construction geometries where interleaved with normal geometries, all normal would be grouped into a single
list and all construction into another.
This causes a problem that indices referenced in constraints may not match.
This commit fixes this behaviour. While still creating as much geometries together as a list, as many lists as
necessary are created to keep the order of creation.
=======================================================
- Better handling for exceptions originating in Python addConstraint.
- Refactor to reuse code for handling of exceptions