Open SunilKhusal opened 2 years ago
I'm looking into it
In fact after further research, I've seen that the object writer coming with Sweerhome3d is applying this rule to the accepted character of the object name:
if (!(car >= 'a' && car <= 'z' || car >= 'A' && car <= 'Z' || car >= '0' && car <= '9' || car == '_' ) { return false; }
as OBJ is a portable format I prefer not to change the default behaviour.
I suggest you replace the dash ('-') with underscore ('_') for the object names in Sweethome3d.
Let me know if you see any trouble to that.
Please acknowledge, I will not fix this as it is working as expected (obj standard), if you can find evidences of the fact that it is a bug I will out it in the fix list.
Like I said that it was just an observation, as I just changed the names without the dashes. Maybe you should mention this on your instructions.
Thank you,
I saw the same behaviour on objects that have german umlauts in it, like ä ö ü ß. Unfortunately that means every door for they are "Tür" in german.
Yes this is because the export to HASS plugin only supports character in the range a-z A-Z 0-9, this is to preserve compatibility with the waterfront standard
You could just replace all invalid characters with _ using a regex replace
Yes but then you may end up having trouble with uniqueness of the names
I think that you can make a change in the getName() function of the furniture class that is referenced in https://github.com/adizanni/ExportToHASS/blob/d2abb7a228bca4f81251e31d937961572b1c6abf/src/com/eteks/sweethome3d/plugin/exporthass/ExportHass.java#L156 Or is the referenced class provided by sweethome3D?
Thank you for a great card. It work wonderfully but picked up a fault.
This is just an observation that you may wish to correct. I had object names with dashes e.g.: downlight - lounge1, downlight - lounge2, downlight - lounge3, etc., were imported into Hass as a number and not as words, so all my downlights had the same number (61). I then removed all the dashes "-" and the names were correctly exported, so I could group all the downlights in the rooms correctly.