Skip to content

LabelShelfWidth is inaccurate when no stacking lip #101

@greg19

Description

@greg19

Image

The label shelf width is calculated as

width = (
    obj.StackingLipTopChamfer
    + obj.StackingLipTopLedge
    + obj.StackingLipBottomChamfer
    + obj.LabelShelfWidth
    - obj.WallThickness
)

regardless if the object has a stacking lip or not. It can be misleading.

There is not really a good solution for this equation:

  1. If we always include the stacking lip, a bin without it would have it inaccurate
  2. If we never include the stacking lip, a bin with it would have it inaccurate
  3. If we include the stacking lip only if it's enabled, it would make the shelf shrink/expand when the stacking lip is toggled

Currently the chosen option is 1. and I'm not saying it should be different now – it is probably more reasonable than the others, since a bin with a stacking lip is the "default". But I want to rethink this decision taking the standalone (attachable) label shelf into account. I want the standalone shelf to be truly the width LabelShelfWidth, but also it would be neat if creating a label shelf with these two ways acted exactly the same by default. There are two solutions for this:

  • Use option 2., sadly this somewhat breaks backwards compatibility – old bins will change when recomputed. It could be solved with an if obj.version > ..., but this is a last resort in my opinion (as it adds heavy maintenance costs) and I would consider just breaking the compatibility first.
  • Make the default width of standalone label shelf a bigger number to match the standard label shelf. This comes with a con of having standalone label shelf of width $W$ being a different shape that a normal label shelf of width $W$

I think the first solution is better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions