Skip to content

Commit affbc1a

Browse files
author
Andrea Mola
committed
fixed errors leading to test_ffdcad.py fail
1 parent 9282af3 commit affbc1a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pygem/cad/cad_deformation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ def __call__(self, obj, dst=None):
357357
if dst is None:
358358
raise ValueError(
359359
'Source file is provided, but no destination specified')
360-
shape = self._read_shape(obj)
360+
shape = self.read_shape(obj)
361361
elif isinstance(obj, TopoDS_Shape):
362362
shape = obj
363363
# Maybe do we need to handle also Compound?
@@ -474,6 +474,6 @@ def __call__(self, obj, dst=None):
474474

475475
if isinstance(dst, str): # if a input filename is passed
476476
# save the shape exactly to the filename, aka `dst`
477-
self._write_shape(dst, compound)
477+
self.write_shape(dst, compound)
478478
else:
479479
return compound

tests/test_ffdcad.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class TestFFDCAD(TestCase):
1212

1313
def test_ffd_iges_pipe_mod_through_files(self):
14-
ffd = FFD()
14+
ffd = FFD(None,30,30,30,1e-4)
1515
ffd.read_parameters(
1616
filename='tests/test_datasets/parameters_test_ffd_iges.prm')
1717
ffd('tests/test_datasets/test_pipe.iges', 'test_pipe_result.iges')
@@ -27,7 +27,7 @@ def test_ffd_iges_pipe_mod_through_files(self):
2727
def test_ffd_iges_pipe_mod_through_topods_shape(self):
2828
filename = 'tests/test_datasets/test_pipe_hollow.iges'
2929
orig_shape = CADDeformation.read_shape(filename)
30-
ffd = FFD()
30+
ffd = FFD(None,30,30,30,1e-4)
3131
ffd.read_parameters(
3232
filename='tests/test_datasets/parameters_test_ffd_iges.prm')
3333
mod_shape = ffd(orig_shape)

0 commit comments

Comments
 (0)