Commit d2fc889b authored by David Danan's avatar David Danan Committed by Felipe Bordeu
Browse files

Slight modification to make binary stl work

parent a335e3e3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ class ReaderBase(BaseOutputObject):
                self.filePointer =  sys.stdin
                #os.fdopen(r, self.readFormat)
        else:
            raise ('Need a file or a string to read')
            raise Exception('Need a file or a string to read')

        self.lineCounter = 0

+1 −3
Original line number Diff line number Diff line
@@ -41,10 +41,9 @@ class StlReader(ReaderBase):
    """Stl read class
    """
    def __init__(self, fileName=None):
        super(StlReader, self).__init__()
        super().__init__(fileName=fileName)
        self.runCleanDoubleNodes = True


    def Read(self, fileName=None, string=None, out=None) -> UnstructuredMesh:
        """ Read a file or a string as a stl surface, ASCII and binary format are
        supported.
@@ -169,7 +168,6 @@ class StlReader(ReaderBase):
        import BasicTools.Containers.UnstructuredMesh as UM

        resUM = UM.UnstructuredMesh()

        name = self.ReadCleanLine().split()[1]

        p = []