Make sure volume.depth for circular beds is forced to width
Both width and depth should be the diameter. Adjusted docs accordingly to reflect this too.
This commit is contained in:
parent
24322f9204
commit
fc891ac651
3 changed files with 11 additions and 2 deletions
|
|
@ -143,11 +143,12 @@ Profile
|
|||
* - ``volume.width``
|
||||
- 0..1
|
||||
- ``float``
|
||||
- The width of the print volume
|
||||
- The width of the print volume. For circular beds, the diameter of the bed.
|
||||
* - ``volume.depth``
|
||||
- 0..1
|
||||
- ``float``
|
||||
- The depth of the print volume
|
||||
- The depth of the print volume. For circular beds, this is the diameter of the bed and will be forced to be the same
|
||||
as ``volume.width`` upon saving.
|
||||
* - ``volume.height``
|
||||
- 0..1
|
||||
- ``float``
|
||||
|
|
|
|||
|
|
@ -453,6 +453,10 @@ class PrinterProfileManager(object):
|
|||
if profile["volume"]["formFactor"] == BedTypes.CIRCULAR and not profile["volume"]["origin"] == BedOrigin.CENTER:
|
||||
profile["volume"]["origin"] = BedOrigin.CENTER
|
||||
|
||||
# force width and depth of volume to be identical for circular beds, with width being the reference
|
||||
if profile["volume"]["formFactor"] == BedTypes.CIRCULAR:
|
||||
profile["volume"]["depth"] = profile["volume"]["width"]
|
||||
|
||||
# validate offsets
|
||||
offsets = []
|
||||
for offset in profile["extruder"]["offsets"]:
|
||||
|
|
|
|||
|
|
@ -281,6 +281,10 @@ $(function() {
|
|||
}
|
||||
}
|
||||
|
||||
if (profile.volume.formFactor == "circular") {
|
||||
profile.volume.depth = profile.volume.width;
|
||||
}
|
||||
|
||||
return profile;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue