Commit graph

208 commits

Author SHA1 Message Date
gumyr
589cbcbd68 Removed unnecessary custom test class and methods. Script to split test_direct_api.py 2025-01-22 15:17:52 -05:00
gumyr
bb6a542244 Revert "Split test_direct_api.py in many smaller tests"
This reverts commit 23e035a1ce.
2025-01-21 21:42:05 -05:00
gumyr
23e035a1ce Split test_direct_api.py in many smaller tests 2025-01-21 21:37:52 -05:00
gumyr
eebd82d06a Added Keep.ALL to split 2025-01-17 10:09:23 -05:00
gumyr
19d925f774 Improved split with a non-planar tool 2025-01-16 14:18:10 -05:00
gumyr
cd69e6ef02 Improve Edge.intersect & coverage 2025-01-15 10:06:39 -05:00
gumyr
7b16193559 Fixing Issue #796 + pylint improvements 2025-01-14 13:38:27 -05:00
gumyr
7811afc544 Re-enabling tests after topology split 2025-01-14 11:30:37 -05:00
jdegenstein
42261cad65
@ocp781 test_direct_api.py-> test hash(empty) returns zero (modified) 2025-01-11 14:31:50 -06:00
gumyr
1611ca8185 Improving test coverage of three_d.py to 97% 2025-01-01 13:16:39 -05:00
gumyr
ae15a95c9b Increased shape_core.py test coverage to 99% 2024-12-31 15:40:01 -05:00
gumyr
48e4b5e057 Resolved one_d.py mypy errors 2024-12-29 15:08:29 -05:00
gumyr
217b70aa1e Implemented review feedback - fixed mypy on shape_core.py & utils.py 2024-12-20 14:31:42 -05:00
gumyr
d1de2a6da1 Refactored topology.py ready to split into multiple modules 2024-12-09 10:09:38 -05:00
gumyr
e82b20a575 Curve object become Wire/Edge, replace Compound.first_level_shapes with Shape.get_top_level_shapes Issue #788 2024-11-19 13:46:54 -05:00
gumyr
3b0fcb017a Replaced unwrap with unwrap_topods_compound in topology.py Issue #788 2024-11-18 14:18:37 -05:00
Roger Maitland
a353d3e776
Merge pull request #771 from Jojain/dev
Added thicken and new split tools
2024-11-10 20:43:31 -05:00
Romain FERRU
63ca9311ce typo 2024-11-08 22:19:06 +01:00
Romain FERRU
4fad571781 black on test file 2024-11-08 22:18:09 +01:00
Romain FERRU
80acfa3e0d Added thicken and new split tools 2024-11-08 21:25:17 +01:00
Roger Maitland
5633c5fc8c
Merge pull request #764 from dalibor-frivaldsky/756-constructing-plane-from-planar-faces
Plane instantiation from planar Geom_BoundedSurface faces Issue #756
2024-11-08 15:19:20 -05:00
Roger Maitland
7ae50261ac
Merge pull request #767 from Jojain/dev
Added Shell.loft
2024-11-08 14:49:06 -05:00
Romain FERRU
8fd5a6775e added > 2 vertices test 2024-11-08 20:29:20 +01:00
gumyr
60029d81d5 Attributes kept after boolean operation Issue#318 2024-11-08 14:18:52 -05:00
Romain FERRU
2a00c1e454 ran black at 88 char per line 2024-11-08 20:18:12 +01:00
Romain FERRU
e28ffb04c2 refactored loft at direct api level 2024-11-07 20:38:31 +01:00
Dalibor Frívaldský
89c29abd07 Test code simplificatoin for Issue #756 2024-11-07 17:40:51 +01:00
Dalibor Frívaldský
e588107bcb Extended test coverage for Issue #756 2024-11-07 14:37:47 +01:00
gumyr
9fb163cb64 Adding Compound.first_level_shapes to extract objects 2024-11-05 11:53:51 -05:00
Dalibor Frívaldský
e3fdefd4bb Plane instantiation from planar Geom_BoundedSurface faces Issue #756 2024-11-05 15:15:29 +01:00
gumyr
c7a8529c24 Added Face.is_planar property Issue #756 2024-11-04 14:37:22 -05:00
gumyr
5ed149925e Updating split_by_perimeter & minor docs fixes 2024-10-28 12:01:13 -04:00
gumyr
8a91db674a Adding split_by_perimeter Issue #751 2024-10-27 11:15:36 -04:00
gumyr
7be2eb1d97 Added Face as an option to split PR#427 2024-10-20 12:01:16 -04:00
gumyr
b81fecd8dc Added tuple as valid input to Color Issue #727 2024-10-07 10:13:32 -04:00
gumyr
cf1f869d7d Added tuple as valid input to Color Issue #727 2024-10-07 10:12:56 -04:00
gumyr
04cf1efd89 Fixed param_at_point Issues #570 & #708 2024-10-02 15:44:10 -04:00
Roger Maitland
720bee9fa0
Merge pull request #707 from alexer/fix-eq
Fix __eq__ and __ne__ for classes implementing them
2024-09-22 10:10:13 -04:00
Aleksi Torhamo
acbebfb017 Fix __eq__ and __ne__ for classes implementing them
Main issue, which concerns Vector, Location, and ShapeList:

Comparison with an object of a different type should not cause an
exception - they are simply not equal. Raising an exception in __eq__
can (and will*) break unrelated code that expects __eq__ to be well-behaved.

(* I noticed this bug when cq-editor choked on it while trying to find
   a name for an object in a dictionary of local variables)

There's a second more minor issue, which concerns the rest of the classes:

When the other type in __eq__ is not supported, one should technically
return NotImplemented instead of False, to allow the other type to take
part in the comparison, in case they know about our type.

(__ne__ should also not generally be implemented as just the negation of
__eq__ because of this, but that's also a moot point because the __ne__
can just be removed - Python will automatically do the right thing based
on __eq__ here)

Technically, the __eq__ for Vector and Plane is also broken in another way:
It's not transitive.

>>> a, b, c = Vector(0), Vector(9e-6), Vector(18e-6)
>>> a == b == c
True
>>> a == c
False

They should really eg. have a separate is_close() for approximate comparison,
but this isn't fixed here, since I have no idea how many places it'd break,
for one.
2024-09-22 08:07:00 +03:00
gumyr
99b378f27a Added Compound.unwrap & Compound.len as part of fix of Issue#694 2024-09-19 14:13:50 -04:00
gumyr
88a40574a8 Added Shell.sweep Issue #622 2024-09-07 11:31:10 -04:00
Daniele D'Orazio
dfb1cee937 more position_at tests 2024-08-30 17:43:29 +02:00
Daniele D'Orazio
8527fe8664 fix location_at, position_at and tangent_at with PositionMode.LENGTH for Wire 2024-08-30 17:16:35 +02:00
jdegenstein
7f8223b50d
test_direct_api.py -> reenable test that fail(ed) on MacOS arm64 2024-08-29 13:29:06 -05:00
gumyr
347de4277d Disabling test that fails only on Arm Macs 2024-08-29 11:57:33 -04:00
gumyr
722165dc25 Fixed Wire.trim Issue #676 2024-08-29 11:47:21 -04:00
gumyr
410007d304 Fixed Face.is_coplanar for flipped Faces - Issue #661 2024-07-20 10:36:55 -04:00
gumyr
55c22311e6 Improved Vector.__str__/__repr__ 2024-07-14 11:57:08 -04:00
gumyr
e29c9fb255 Added Face.location_at & _ocp_section 2024-07-02 07:49:51 -04:00
gumyr
ce20991745 Replaced Axis.as_infinite_edge with Edge __init__ method Issue #648 2024-06-24 13:47:52 -04:00