Skip to content

Commit bdc3bc5

Browse files
Change the projection direction
1 parent 5ba2500 commit bdc3bc5

File tree

1 file changed

+4
-25
lines changed

1 file changed

+4
-25
lines changed

tests/test_cadquery.py

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5410,28 +5410,7 @@ def test_project(self):
54105410
t = Compound.makeText("T", 5, 0).Faces()[0]
54115411
f = Workplane("XZ", origin=(0, 0, -7)).sphere(6).faces("not %PLANE").val()
54125412

5413-
res = t.project(f, (0, 0, -1))
5414-
5415-
from io import BytesIO
5416-
bio = BytesIO()
5417-
5418-
res.exportBrep(bio)
5419-
5420-
bio.seek(0)
5421-
print(bio.read())
5422-
5423-
bio = BytesIO()
5424-
t.exportBrep(bio)
5425-
5426-
bio.seek(0)
5427-
print(bio.read())
5428-
5429-
bio = BytesIO()
5430-
5431-
f.exportBrep(bio)
5432-
5433-
bio.seek(0)
5434-
print(bio.read())
5413+
res = t.project(f, (0, 0, 1))
54355414

54365415
assert res.isValid()
54375416
assert len(res.Edges()) == len(t.Edges())
@@ -5446,12 +5425,12 @@ def test_project(self):
54465425
# project a wire
54475426
w = t.outerWire()
54485427

5449-
res_w = w.project(f, (0, 0, -1))
5428+
res_w = w.project(f, (0, 0, 1))
54505429

54515430
assert len(res_w.Edges()) == 8
54525431
assert res_w.isValid()
54535432

5454-
res_w1, res_w2 = w.project(f, (0, 0, -1), False)
5433+
res_w1, res_w2 = w.project(f, (0, 0, 1), False)
54555434

54565435
assert len(res_w1.Edges()) == 8
54575436
assert len(res_w2.Edges()) == 8
@@ -5460,7 +5439,7 @@ def test_project(self):
54605439
o = Compound.makeText("O", 5, 0).Faces()[0]
54615440
f = Workplane("XZ", origin=(0, 0, -7)).sphere(6).faces("not %PLANE").val()
54625441

5463-
res_o = o.project(f, (0, 0, -1))
5442+
res_o = o.project(f, (0, 0, 1))
54645443

54655444
assert res_o.isValid()
54665445

0 commit comments

Comments
 (0)