mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 20:16:02 +08:00
Removing unused imports and rename built-in varibales/functions into save one
* The new names for the variables might be misleading...
This commit is contained in:
parent
5ae63f2de1
commit
eee1be94ab
@ -7,8 +7,6 @@ from UM.Math.Color import Color
|
|||||||
from UM.Math.Vector import Vector
|
from UM.Math.Vector import Vector
|
||||||
|
|
||||||
import numpy
|
import numpy
|
||||||
import math
|
|
||||||
import copy
|
|
||||||
|
|
||||||
class LayerData(MeshData):
|
class LayerData(MeshData):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -20,11 +18,11 @@ class LayerData(MeshData):
|
|||||||
if layer not in self._layers:
|
if layer not in self._layers:
|
||||||
self._layers[layer] = Layer(layer)
|
self._layers[layer] = Layer(layer)
|
||||||
|
|
||||||
def addPolygon(self, layer, type, data, line_width):
|
def addPolygon(self, layer, polygon_type, data, line_width):
|
||||||
if layer not in self._layers:
|
if layer not in self._layers:
|
||||||
self.addLayer(layer)
|
self.addLayer(layer)
|
||||||
|
|
||||||
p = Polygon(self, type, data, line_width)
|
p = Polygon(self, polygon_type, data, line_width)
|
||||||
self._layers[layer].polygons.append(p)
|
self._layers[layer].polygons.append(p)
|
||||||
|
|
||||||
def getLayer(self, layer):
|
def getLayer(self, layer):
|
||||||
@ -69,8 +67,8 @@ class LayerData(MeshData):
|
|||||||
self.addIndices(indices.flatten())
|
self.addIndices(indices.flatten())
|
||||||
|
|
||||||
class Layer():
|
class Layer():
|
||||||
def __init__(self, id):
|
def __init__(self, layer_id):
|
||||||
self._id = id
|
self._id = layer_id
|
||||||
self._height = 0.0
|
self._height = 0.0
|
||||||
self._thickness = 0.0
|
self._thickness = 0.0
|
||||||
self._polygons = []
|
self._polygons = []
|
||||||
@ -173,9 +171,9 @@ class Polygon():
|
|||||||
MoveCombingType = 8
|
MoveCombingType = 8
|
||||||
MoveRetractionType = 9
|
MoveRetractionType = 9
|
||||||
|
|
||||||
def __init__(self, mesh, type, data, line_width):
|
def __init__(self, mesh, polygon_type, data, line_width):
|
||||||
self._mesh = mesh
|
self._mesh = mesh
|
||||||
self._type = type
|
self._type = polygon_type
|
||||||
self._data = data
|
self._data = data
|
||||||
self._line_width = line_width / 1000
|
self._line_width = line_width / 1000
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user