(self, filename)
This method loads a shape from the file `filename`.

        :param string filename: name of the input file.
            It should have proper extension (.step or .stp)

        :return: shape: loaded shape
        :rtype: TopoDS_Shape
This method loads a shape from the file `filename`.
This method loads a shape from the file filename .
def load_shape_from_file(self, filename):
        """
        This method loads a shape from the file `filename`.

        :param string filename: name of the input file.
            It should have proper extension (.step or .stp)

        :return: shape: loaded shape
        :rtype: TopoDS_Shape
        """
        self._check_filename_type(filename)
        self._check_extension(filename)
        reader = STEPControl_Reader()
        return_reader = reader.ReadFile(filename)
        # check status
        if return_reader == IFSelect_RetDone:
            return_transfer = reader.TransferRoots()
            if return_transfer:
                # load all shapes in one
                shape = reader.OneShape()
                return shape
            else:
                raise RuntimeError("Shapes not loaded.")
        else:
            raise RuntimeError("Cannot read the file.")
def load_shape_from_file ( self , filename ) : self . _check_filename_type ( filename ) self . _check_extension ( filename ) reader = STEPControl_Reader ( ) return_reader = reader . ReadFile ( filename ) # check status if return_reader == IFSelect_RetDone : return_transfer = reader . TransferRoots ( ) if return_transfer : # load all shapes in one shape = reader . OneShape ( ) return shape else : raise RuntimeError ( "Shapes not loaded." ) else : raise RuntimeError ( "Cannot read the file." )