Commit graph

299 commits

Author SHA1 Message Date
Roger Maitland
ef8ace0261
Merge branch 'dev' into builder_context_selectors 2023-11-15 14:12:30 -05:00
Ami Fischman
b16f927abc Speed up pytest execution wall time by ~37%.
Before: `644 passed in 19.89s`.
After: `644 passed in 12.47s`.

Running with `python -m pytest --durations=5` showed this test case
was a huge outlier, and timing its execution showed a huge disparity
between the time `TechnicalDrawing` thought it took to run and the
time its caller saw et up. Dropping the Builder context makes these
times lineup.

Tested the individual test case speed-up with `hyperfine -- 'python -m pytest tests/test_drafting.py::TestTechnicalDrawing::test_basic_drawing'`
which reports before & after of:

```
Benchmark 1: python -m pytest tests/test_drafting.py::TestTechnicalDrawing::test_basic_drawing
  Time (mean ± σ):      9.488 s ±  0.534 s    [User: 9.525 s, System: 1.478 s]
  Range (min … max):    9.117 s … 10.929 s    10 runs

Benchmark 1: python -m pytest tests/test_drafting.py::TestTechnicalDrawing::test_basic_drawing
  Time (mean ± σ):      1.951 s ±  0.040 s    [User: 2.292 s, System: 1.111 s]
  Range (min … max):    1.871 s …  2.020 s    10 runs
```

I dug a little into why it was so much slower under the builder and
the answer seems to be ~13k calls to deepcopy, but I haven't dug
deeper yet to figure out if there's a way to "transfer" to the builder
rather than making copies.
2023-11-14 16:48:23 -08:00
gumyr
99be3df220 Changing is_closed to a property Issue #357 2023-11-13 19:55:00 -05:00
gumyr
499e43c897 Added kwargs to vector classes Issue #376 2023-11-12 10:38:46 -05:00
Ami Fischman
dd649308c1 pack(): update to support Shape, not just Part.
Also fix SlotOverall so that passing it equal height and width doesn't
error out and instead reduces to a Circle. (bug discovered while
writing the new test case).
2023-11-10 09:07:54 -08:00
Roger Maitland
86c639c0d0
Merge pull request #374 from fischman/fischman/pack2d
pack(): introduced a new helper for packing parts into a 2D footprint.
2023-11-10 10:01:48 -05:00
Scott Barlow
081517cc14 Couple more 2023-11-10 00:22:11 -08:00
Ami Fischman
b767b78a69 pack(): introduced a new helper for packing parts into a 2D footprint.
Also added documentation for the new facility as well as a nascent
CONTRIBUTING.md to collect pointers to the tools used by developers of
this project.
2023-11-09 15:06:49 -08:00
MatthiasJ
b782027440 remove BuildLine wire equality test 2023-11-09 11:35:47 -07:00
MatthiasJ
70c1705e3f tests 2023-11-09 00:02:02 -07:00
gumyr
cdd00771f5 Added endpoint to PolarLocations 2023-11-08 10:42:14 -05:00
gumyr
0402921317 VectorLike takes Vertex via Iterable 2023-11-07 11:51:47 -05:00
gumyr
6f9a5eface Removed Vertex.to_vector() - replaced with Vector(Vertex) 2023-11-05 10:30:43 -05:00
gumyr
0735da11ba Fixed offset with no results Issue #362 2023-11-04 14:53:26 -04:00
snoyer
10b4448d26 add SVG color test 2023-11-04 14:09:12 +04:00
Roger Maitland
b546986d67
Merge pull request #360 from MatthiasJ1/shapelist_intersection
Add intersection operator, &, to ShapeList
2023-11-02 16:11:42 -04:00
MatthiasJ
a76e61f095 test 2023-11-02 12:53:24 -06:00
gumyr
17a1e09a38 Face.wire() returns outer_wire & generates warning if inner_wires 2023-11-02 10:32:56 -04:00
gumyr
45e0433bea Improved sweep by ordering edges 2023-11-01 19:20:34 -04:00
MatthiasJ
2577923906 Merge branch 'dev' into filter_by_plane 2023-10-31 11:14:49 -06:00
Ruud Swinkels
75de536c53 add axis equality testcases 2023-10-29 21:27:40 +01:00
Ruud Swinkels
ff80caf723 fix axis equality 2023-10-29 21:20:03 +01:00
MatthiasJ
80a5729a5a Add non-planar curve to filter_by(Plane) tests 2023-10-28 14:45:38 -06:00
MatthiasJ
9b72b4648e Add ability to filter faces/edges based on whether they are parallel to an arbitrary plane 2023-10-28 14:08:01 -06:00
gumyr
4eabb17e60 Fix Compound.is_manifold Issue #353 2023-10-24 11:09:56 -04:00
gumyr
63dc6c5941 Fixed path to svg file 2023-10-21 11:53:20 -04:00
gumyr
dd4f923f6c Changing import_svg to use ocpsvg 2023-10-21 11:22:11 -04:00
gumyr
ee8517f4a4 Removing warnings 2023-10-21 11:12:14 -04:00
Roger Maitland
d762a65db0
Merge pull request #345 from Ruudjhuu/chamfer_plane
add direction argument to chamfer.
2023-10-20 11:13:09 -04:00
Ruud Swinkels
f05b2ae68f add test coverage for generic 1d chamfer 2023-10-18 20:10:03 +02:00
Ruud Swinkels
f57577d01b add chamfer direction for 2d Wire 2023-10-18 19:27:37 +02:00
Ruud Swinkels
6d14ce32d9 add chamfer direction for 2d Face 2023-10-18 19:09:54 +02:00
gumyr
c58c9ee685 Fixed Issue #347 by using the autogenerated x_dir in common_planes 2023-10-16 10:25:33 -04:00
Ruud Swinkels
723d02db17 add chamfer bad weather tests 2023-10-13 18:42:53 +02:00
Ruud Swinkels
ae3a327361 add face argument to chamfer 2023-10-12 22:12:18 +02:00
gumyr
41e05d4dd2 Added size, min & max attributes to GridLocations 2023-10-10 14:44:56 -04:00
gumyr
451bba79a3 Merge branch 'dev' of https://github.com/gumyr/build123d into dev 2023-10-10 11:59:32 -04:00
gumyr
2c52fb4f44 Fixed plane origin setter Issue #338 2023-10-10 11:59:23 -04:00
Roger Maitland
4a51458183
Merge pull request #341 from mayhem-64/chamfer_by_angle
Chamfer by angle
2023-10-10 10:17:39 -04:00
gumyr
56713573c0 Adding shape selectors to ShapeList 2023-10-10 10:03:53 -04:00
mayhem-64
aea08da6f4
Merge branch 'gumyr:dev' into chamfer_by_angle 2023-10-09 23:02:58 +08:00
Mayhem
5179048215 Add test for exception if both length and angle are provided 2023-10-09 22:54:53 +08:00
gumyr
bc2472d5c0 Mixin1D.intersections doesn't require plane, some Axis/Plane intersections supported 2023-10-09 09:56:35 -04:00
gumyr
fe23d9d029 Merge branch 'dev' of https://github.com/gumyr/build123d into dev 2023-10-09 09:49:35 -04:00
Mayhem
2b8d3678b2 Add angle parameter to chamfer 2023-10-09 19:52:03 +08:00
gumyr
fa79240f1f Formatting change 2023-10-08 10:37:58 -04:00
gumyr
92b09be2db Added partial functionality for intersect everything #328 2023-10-04 11:29:09 -04:00
Roger Maitland
2621110a8a
Merge pull request #315 from Jojain/dev
Added pickle support for bd shapes
2023-09-28 14:00:57 -04:00
Romain FERRU
fa854e28ef Merge branch 'dev' of https://github.com/gumyr/build123d into devlocal 2023-09-28 16:59:19 +02:00
jdegenstein
4b33434e9e
major/minor diam test fix test_build_sketch.py 2023-09-27 13:14:15 -05:00