mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-06 02:30:55 -08:00
parent
55f6e8f073
commit
04cf1efd89
2 changed files with 48 additions and 17 deletions
|
|
@ -52,7 +52,7 @@ from build123d.operations_part import extrude
|
|||
from build123d.operations_sketch import make_face
|
||||
from build123d.operations_generic import fillet, add, sweep
|
||||
from build123d.objects_part import Box, Cylinder
|
||||
from build123d.objects_curve import JernArc, Polyline
|
||||
from build123d.objects_curve import CenterArc, EllipticalCenterArc, JernArc, Polyline
|
||||
from build123d.build_sketch import BuildSketch
|
||||
from build123d.build_line import BuildLine
|
||||
from build123d.objects_curve import Spline
|
||||
|
|
@ -378,6 +378,7 @@ class TestAxis(DirectApiTestCase):
|
|||
random_obj = object()
|
||||
self.assertNotEqual(Axis.X, random_obj)
|
||||
|
||||
|
||||
class TestBoundBox(DirectApiTestCase):
|
||||
def test_basic_bounding_box(self):
|
||||
v = Vertex(1, 1, 1)
|
||||
|
|
@ -1086,6 +1087,16 @@ class TestEdge(DirectApiTestCase):
|
|||
pnt = edge.position_at(u)
|
||||
self.assertAlmostEqual(edge.param_at_point(pnt), u, 5)
|
||||
|
||||
ca = CenterArc((0, 0), 1, -200, 220).edge()
|
||||
for u in [0.3, 1.0]:
|
||||
pnt = ca.position_at(u)
|
||||
self.assertAlmostEqual(ca.param_at_point(pnt), u, 5)
|
||||
|
||||
ea = EllipticalCenterArc((15, 0), 10, 5, start_angle=90, end_angle=270).edge()
|
||||
for u in [0.3, 0.9]:
|
||||
pnt = ea.position_at(u)
|
||||
self.assertAlmostEqual(ea.param_at_point(pnt), u, 5)
|
||||
|
||||
with self.assertRaises(ValueError):
|
||||
edge.param_at_point((-1, 1))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue