Esempio n. 1
0
    def __init__(self, shape, options):

        self.solid = Wrappers.Solid(shape)
        self.slices = []
        #a list of slices
        self.sliceMap = {}
        #distinct slices. different because some slices are re-used instead of calculated again
        self.options = options

        self.__setDefaultOptions()

        self.extruder = Extruder(options)

        #note: make sure to fix the shape before translating!
        if options.fixShape:
            self.solid.fixDefects()

        if options.translateToPositiveCenter:
            self.solid = self.solid.translateToPositiveCenter(
                options.tableCenterX, options.tableCenterY)

        #now apply slicing limits, if the user specified them
        #warning, it is confusing if the user specifies these, and specifies translate=true, how do they know where zMin and zMax will be?
        if options.zMin == None:
            options.zMin = self.solid.zMin

        if options.zMax == None:
            options.zMax = self.solid.zMax