mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
layers3d.shader now detects and draws 'starts' as boxes
Also adds a "show starts" option to the SimulationViewMenuComponent and corresponding logic SimulationPass.py adds a prev_line_types attribute to the shader, which the shader uses to compare with its line_type to detect starts.
This commit is contained in:
parent
2d1128f088
commit
757d7eee50
4 changed files with 58 additions and 1 deletions
|
@ -111,6 +111,7 @@ class SimulationView(CuraView):
|
|||
Application.getInstance().getPreferences().addPreference("layerview/show_helpers", True)
|
||||
Application.getInstance().getPreferences().addPreference("layerview/show_skin", True)
|
||||
Application.getInstance().getPreferences().addPreference("layerview/show_infill", True)
|
||||
Application.getInstance().getPreferences().addPreference("layerview/show_starts", True)
|
||||
|
||||
self._updateWithPreferences()
|
||||
|
||||
|
@ -146,6 +147,7 @@ class SimulationView(CuraView):
|
|||
self._show_helpers = True
|
||||
self._show_skin = True
|
||||
self._show_infill = True
|
||||
self._show_starts = True
|
||||
self.resetLayerData()
|
||||
|
||||
def getActivity(self) -> bool:
|
||||
|
@ -355,6 +357,13 @@ class SimulationView(CuraView):
|
|||
def getShowInfill(self) -> bool:
|
||||
return self._show_infill
|
||||
|
||||
def setShowStarts(self, show: bool) -> None:
|
||||
self._show_starts = show
|
||||
self.currentLayerNumChanged.emit()
|
||||
|
||||
def getShowStarts(self) -> bool:
|
||||
return self._show_starts
|
||||
|
||||
def getCompatibilityMode(self) -> bool:
|
||||
return self._compatibility_mode
|
||||
|
||||
|
@ -638,6 +647,7 @@ class SimulationView(CuraView):
|
|||
self.setShowHelpers(bool(Application.getInstance().getPreferences().getValue("layerview/show_helpers")))
|
||||
self.setShowSkin(bool(Application.getInstance().getPreferences().getValue("layerview/show_skin")))
|
||||
self.setShowInfill(bool(Application.getInstance().getPreferences().getValue("layerview/show_infill")))
|
||||
self.setShowStarts(bool(Application.getInstance().getPreferences().getValue("layerview/show_starts")))
|
||||
|
||||
self._startUpdateTopLayers()
|
||||
self.preferencesChanged.emit()
|
||||
|
@ -653,6 +663,7 @@ class SimulationView(CuraView):
|
|||
"layerview/show_helpers",
|
||||
"layerview/show_skin",
|
||||
"layerview/show_infill",
|
||||
"layerview/show_starts",
|
||||
}:
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue