Skip to content

Commit

Permalink
fixed errors leading to test_ffdcad.py fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Mola committed May 28, 2020
1 parent 9282af3 commit affbc1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pygem/cad/cad_deformation.py
Expand Up @@ -357,7 +357,7 @@ def __call__(self, obj, dst=None):
if dst is None:
raise ValueError(
'Source file is provided, but no destination specified')
shape = self._read_shape(obj)
shape = self.read_shape(obj)
elif isinstance(obj, TopoDS_Shape):
shape = obj
# Maybe do we need to handle also Compound?
Expand Down Expand Up @@ -474,6 +474,6 @@ def __call__(self, obj, dst=None):

if isinstance(dst, str): # if a input filename is passed
# save the shape exactly to the filename, aka `dst`
self._write_shape(dst, compound)
self.write_shape(dst, compound)
else:
return compound
4 changes: 2 additions & 2 deletions tests/test_ffdcad.py
Expand Up @@ -11,7 +11,7 @@
class TestFFDCAD(TestCase):

def test_ffd_iges_pipe_mod_through_files(self):
ffd = FFD()
ffd = FFD(None,30,30,30,1e-4)
ffd.read_parameters(
filename='tests/test_datasets/parameters_test_ffd_iges.prm')
ffd('tests/test_datasets/test_pipe.iges', 'test_pipe_result.iges')
Expand All @@ -27,7 +27,7 @@ def test_ffd_iges_pipe_mod_through_files(self):
def test_ffd_iges_pipe_mod_through_topods_shape(self):
filename = 'tests/test_datasets/test_pipe_hollow.iges'
orig_shape = CADDeformation.read_shape(filename)
ffd = FFD()
ffd = FFD(None,30,30,30,1e-4)
ffd.read_parameters(
filename='tests/test_datasets/parameters_test_ffd_iges.prm')
mod_shape = ffd(orig_shape)
Expand Down

0 comments on commit affbc1a

Please sign in to comment.