jdegenstein
ba2e687a07
general_examples_algebra.py -> fix ex23 typo
2024-09-24 20:28:06 -05:00
jdegenstein
d424e97562
tutorial_joints.py -> use Compound() constructor instead of ..make_compound
2024-09-24 16:09:34 -05: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
Roger Maitland
ca0597d8ec
Merge pull request #706 from openvmp/partcad-examples-update
...
Updated partcad.yaml to make the examples work in the latest PartCAD
2024-09-21 09:13:55 -04:00
Roman Kuzmenko
c47a550aa5
Updated partcad.yaml to make the examples work in the latest PartCAD
2024-09-20 22:19:34 -07:00
gumyr
043629ec87
Enhanced offset to allow holes to grow outside of the Face Issue #702
2024-09-20 11:29:19 -04:00
Roger Maitland
debdf845bf
Merge pull request #695 from danieledapo/dev
...
Fix thicken normal calculation when no override is provided
2024-09-19 14:33:21 -04:00
gumyr
99b378f27a
Added Compound.unwrap & Compound.len as part of fix of Issue#694
2024-09-19 14:13:50 -04:00
Daniele D'Orazio
82f3dd8011
fix normal_override overwrite in thicken
2024-09-19 09:23:01 +02:00
jdegenstein
b2cb62fdac
Merge pull request #700 from jdegenstein/BBox_optimal
...
joints.py -> use new optimal keyword for bounding_box with False
2024-09-17 10:06:00 -05:00
jdegenstein
9d5979145a
joints.py -> use new optimal keyword for bounding_box with False
2024-09-17 09:57:18 -05:00
jdegenstein
235260a800
Merge pull request #667 from jdegenstein/docfixes
...
Updating and fixing some documentation issues
2024-09-09 10:35:54 -05:00
jdegenstein
269451b890
assemblies.rst -> Fix use of non-existent Compound.import_step and don't use deprecated Shape.export_step
2024-09-09 10:30:23 -05:00
jdegenstein
6d83cc167a
cheat_sheet.rst -> add missing PrecisionMode back to cheat sheet
2024-09-09 10:09:48 -05:00
jdegenstein
996a0d68e6
external.rst -> explicitly state that the recommended CQ-editor is a fork from jdegenstein
2024-09-09 10:02:48 -05:00
jdegenstein
1c653f87b9
Merge pull request #690 from roman-dvorak/roman/docs/packs
...
Add missing svg files in assembly page
2024-09-09 09:55:53 -05:00
jdegenstein
6fe67d29ff
Merge pull request #691 from xela144/docs/fix-typo-advantages.rst
...
Fixing a typo on Update advantages.rst
2024-09-07 22:16:26 -05:00
Alex Bardales
95ffaa31bd
Update advantages.rst
...
Current advantages.rst embeds the wrong lines from examples/intersecting_pipes.py. With these changes, the lines you would see are
```python
from build123d import *
with BuildPart() as pipes:
box = Box(10, 10, 10, rotation=(10, 20, 30))
with BuildSketch(*box.faces()) as pipe:
Circle(4)
extrude(amount=-5, mode=Mode.SUBTRACT)
with BuildSketch(*box.faces()) as pipe:
Circle(4.5)
Circle(4, mode=Mode.SUBTRACT)
extrude(amount=10)
fillet(pipes.edges(Select.LAST), 0.2)
```
2024-09-07 14:57:51 -07:00
Roman Dvorak
b9cf1c6855
add missing svg files
2024-09-07 23:13:32 +02:00
gumyr
88a40574a8
Added Shell.sweep Issue #622
2024-09-07 11:31:10 -04:00
jdegenstein
ba348d5d98
Merge pull request #684 from jdegenstein/BBox_optimal
...
topology.py -> add `optimal: bool = True` keyword to `Shape.bounding_box`
2024-09-07 09:24:18 -05:00
jdegenstein
38bf199fb6
topology.py -> add optimal keyword to Shape.bounding_box
2024-09-03 13:47:38 -05:00
jdegenstein
93408eef52
import_export.rst -> remove use of deprecated export_step method and use export_step function instead
2024-09-03 10:00:54 -05:00
Roger Maitland
55a6e8be76
Merge pull request #680 from danieledapo/dev
...
fix location_at, position_at and tangent_at with PositionMode.LENGTH for Wire
2024-08-30 13:45:14 -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
e9539dcaa3
Merge pull request #677 from jdegenstein/empty_builders
...
Change Empty Builders RuntimeError to a UserWarning
2024-08-29 21:07:22 -05:00
jdegenstein
51a8830e74
Merge pull request #679 from jdegenstein/isclose_arm64
...
isclose on all platforms to attempt to fix MacOS / arm64 test failure for new `Wire.trim` feature
2024-08-29 20:59:40 -05:00
jdegenstein
084d3cce5b
topology.py -> use abs_tol=TOLERANCE in param_at_point again
2024-08-29 16:13:54 -05:00
jdegenstein
e1c649e63d
topology.py -> simplify param_at_point again
2024-08-29 16:08:56 -05:00
jdegenstein
8126bd9004
test.yml -> undo temporary change for debugging
2024-08-29 16:05:21 -05:00
jdegenstein
06ad86739a
topology.py -> fix trim_to_length
2024-08-29 16:02:21 -05:00
jdegenstein
d631d077e2
operations_generic.py -> add dependency on isclose_b from topology.py
2024-08-29 15:57:56 -05:00
jdegenstein
baa8055fb8
topology.py -> add def isclose_b with suitable defaults
2024-08-29 15:55:28 -05:00
jdegenstein
5386a3a8ce
topology.py -> more isclose in Wire.trim
2024-08-29 14:49:02 -05:00
jdegenstein
7d82178663
test.yml -> don't capture output for all platforms pytest -rA
2024-08-29 13:58:55 -05:00
jdegenstein
8c132e2954
topology.py -> add debugging prints
2024-08-29 13:52:34 -05:00
jdegenstein
40d5a0e8a8
topology.py
2024-08-29 13:44:01 -05:00
jdegenstein
674e09ab57
topology.py -> loosen abs_tol from 1e-14 to TOLERANCE (currently 1e-6)
2024-08-29 13:41:55 -05:00
jdegenstein
734a526761
topology.py -> Fix named parameter and try again
2024-08-29 13:38:39 -05:00
jdegenstein
d337dcc0d2
topology.py -> use math.isclose() to try and fix behavior on all platforms especially MacOS+arm64
2024-08-29 13:34:51 -05: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
82a52d5bf5
Merge branch 'dev' of https://github.com/gumyr/build123d into dev
2024-08-29 11:47:32 -04:00
gumyr
722165dc25
Fixed Wire.trim Issue #676
2024-08-29 11:47:21 -04:00
jdegenstein
f071915703
build_common.py -> add appropriate stacklevel for warning
2024-08-28 21:27:07 -05:00
jdegenstein
22dec01405
Merge pull request #674 from jdegenstein/labelIsNull
...
exporters3d.py -> Revert change to node_label.IsNull() check
2024-08-23 15:40:06 -05:00
jdegenstein
9df24aea7e
exporters3d.py -> Revert change to node_label.IsNull() check
2024-08-23 15:07:56 -05:00
gumyr
37c2c29817
Fix docstring & add PrecisionMode to __init__
2024-08-23 10:50:11 -04:00