shaise / FreeCAD_SheetMetal

A simple sheet metal workbench for FreeCAD

Home Page:http://theseger.com/projects/2015/06/sheet-metal-addon-for-freecad/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'Relif' is a typo?

luzpaz opened this issue · comments

yes indeed. Its from a feature pull request I missed. If I change it back will it break loading of old files? (I will change only the display name, not the variable)

image

What's the hard in just changing all instances of it in the source, committing it to a separate branch, running it and seeing if it crashes?

It will not crash, but if I load an old file that was saved with the wrong spelling, It will not load.

OK, there are two options:

  1. change most typos to Relief, but leave internal property names to relif, this will be compatible with old files, but will display correctly for the user.
  2. change everything to Relief. This will not crash when loading old files, but any editing to sheetmetal featuers will reset relif values, and will display double features on the feature list (only for old files).

What do you think is best?

Fast method is 1
Smart method is 2
Is there a way to write some code that when encountering the misspelling could auto-change it ?

Theoretically it is possible to correct, but then you will have "relif" in the code since you have to ask if a parameter is "relif" then change to relief.... I think its an ugly patch just for typo.
method 2 is easy to do, but if you load old files, you will see 2 parameters in the properties list: both relif and relief, so it is ugly ad well....
The first method means only internal parameters (at 4 places) will be relif but it will not be visible to the end user.
I can do any of the 3 you like.

I'm for being future friendly...so I'm for method 2 if people can quickly delete the relif parmeter. Eventually, the problem will disappear as more people learn and use this Workbench.

Friendly it is!
Done.

Thank you!