Open jose-vm opened 7 years ago
I think it might be that I forgot to update the variable names, but I'm not 100% sure - as you can probably tell it's been a little while since I last worked on this project.
Thanks for bringing it to my attention, i'll have a look now.
After testing, it looks like I forgot to rename the variables after switching them round. I'm in the process of pushing a fix now.
Thanks again for bringing this to my attention!
thanks!
err, are you sure it is fixed?
I used find and replace to switch height and width, and you're probably asking if it's fixed because you would have seen that while the set of variables you pointed out were fixed, another set had swapped around.
I tried changing them back, and now I'm more confused than before.
It looks like what a schematic denotes as width, height and length is different from what a structure denotes as width, height and length.
This is what the structure looks like (and should look like) when the variable names are swapped
short width = (short) ((Tag) schematicMap.get("Height")).getValue();
short height = (short) ((Tag) schematicMap.get("Width")).getValue();
short length = (short) ((Tag) schematicMap.get("Length")).getValue();
Whereas this is what the structure looks like when the code is 'correct'
short height = (short) ((Tag) schematicMap.get("Height")).getValue();
short width = (short) ((Tag) schematicMap.get("Width")).getValue();
short length = (short) ((Tag) schematicMap.get("Length")).getValue();
When I wrote the code, I obviously spent a while swapping variables around trying to get the correct result, and didn't document it very well. This also could have been helped by using more detailed variable names.
As a fix, I'm planning to come up with better variable names, and document the behaviour better. However, for now it seems to work.
Is this intentional or is this a mistake?