area515 / Photonic3D

Control software for resin 3D printers
http://photonic3d.com
GNU General Public License v3.0
133 stars 112 forks source link

Can't set name for slicing profile supplied with JSON config to /printers/save #222

Closed jmkao closed 8 years ago

jmkao commented 8 years ago

I'm in the process of creating a JSON printer template for the Kudo3D Titan 1, and am trying to set the slicing profile's name to something descriptive about the coefficients that I set (e.g. vat type and resins in perhaps an easy/medium/hard categorization).

It appears that no matter what you set for slicingProfile->name or the SlicingProfileName fields, the actual slicing profile created will always be the same name as the printer.

I traced this in the browser and verified that it was POSTing the payload retrieved from https://raw.githubusercontent.com/jmkao/Photonic3D/master/host/printers/Titan1.json to /printers/save correctly. I also noticed that in the mUVe 1.json file, there is a SlicingProfileName field set to "Make Juice SF" that also seems to not manifest in any of the resulting created files.

I can see the matching fields in the SlicingProfile and PrinterConfiguration classes and followed the logic to HostProperties.saveConfigurations(), but that method seems to name the file via:

File slicingFile = new File(PROFILES_DIR, currentConfiguration.getSlicingProfileName() + PROFILES_EXTENSION);

Which would appear to use the value set in SlicingProfileName, but somehow the actual files created are named with the machine config name instead.

WesGilster commented 8 years ago

Sorry didn't see this bug. Fixed now. This was a throwback to when it wasn't easy to control how a printer was saved through different client situations. Eventually we need to bring in protractor to start getting tests into the front end...

jmkao commented 8 years ago

Whoops, forgot to update the issue. This works now. Thanks!