Skip to content

Commit

Permalink
Handle the new Roof feature type
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton committed Nov 26, 2024
1 parent 0286c6d commit 7c556dd
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cura/LayerPolygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class LayerPolygon:
MoveRetractionType = 9
SupportInterfaceType = 10
PrimeTowerType = 11
__number_of_types = 12
RoofType = 12
__number_of_types = 13

__jump_map = numpy.logical_or(numpy.logical_or(numpy.arange(__number_of_types) == NoneType,
numpy.arange(__number_of_types) == MoveCombingType),
Expand Down Expand Up @@ -272,7 +273,8 @@ def getColorMap(cls) -> numpy.ndarray:
theme.getColor("layerview_move_combing").getRgbF(), # MoveCombingType
theme.getColor("layerview_move_retraction").getRgbF(), # MoveRetractionType
theme.getColor("layerview_support_interface").getRgbF(), # SupportInterfaceType
theme.getColor("layerview_prime_tower").getRgbF() # PrimeTowerType
theme.getColor("layerview_prime_tower").getRgbF(), # PrimeTowerType
theme.getColor("layerview_roof").getRgbF(), # RoofType
])

return cls.__color_map
1 change: 1 addition & 0 deletions plugins/CuraEngineBackend/Cura.proto
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ message Polygon {
MoveRetractionType = 9;
SupportInterfaceType = 10;
PrimeTowerType = 11;
RoofType = 12;
}
Type type = 1; // Type of move
bytes points = 2; // The points of the polygon, or two points if only a line segment (Currently only line segments are used)
Expand Down
1 change: 1 addition & 0 deletions plugins/SimulationView/SimulationView.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ def calculateColorSchemeLimits(self) -> None:
visible_line_types = []
if self.getShowSkin(): # Actually "shell".
visible_line_types.append(LayerPolygon.SkinType)
visible_line_types.append(LayerPolygon.RoofType)
visible_line_types.append(LayerPolygon.Inset0Type)
visible_line_types.append(LayerPolygon.InsetXType)
if self.getShowInfill():
Expand Down
1 change: 1 addition & 0 deletions resources/themes/cura-dark-colorblind/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"layerview_inset_0": [255, 64, 0, 255],
"layerview_inset_x": [0, 156, 128, 255],
"layerview_skin": [255, 255, 86, 255],
"layerview_roof": [160, 255, 86, 255],
"layerview_support": [255, 255, 0, 255],

"layerview_infill": [0, 255, 255, 255],
Expand Down
1 change: 1 addition & 0 deletions resources/themes/cura-light-colorblind/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"layerview_inset_0": [255, 64, 0, 255],
"layerview_inset_x": [0, 156, 128, 255],
"layerview_skin": [255, 255, 86, 255],
"layerview_roof": [160, 255, 86, 255],
"layerview_support": [255, 255, 0, 255],

"layerview_infill": [0, 255, 255, 255],
Expand Down
1 change: 1 addition & 0 deletions resources/themes/cura-light/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
"layerview_inset_0": [230, 0, 0, 255],
"layerview_inset_x": [0, 230, 0, 255],
"layerview_skin": [230, 230, 0, 255],
"layerview_roof": [160, 230, 0, 255],
"layerview_support": [0, 230, 230, 127],
"layerview_skirt": [0, 230, 230, 255],
"layerview_infill": [230, 115, 0, 255],
Expand Down

0 comments on commit 7c556dd

Please sign in to comment.