Thanks Thanks:  85
Likes Likes:  66
Dislikes Dislikes:  0
Page 1 of 40 12311 ... LastLast
Results 1 to 10 of 392
  1. #1
    Expert 3D Printer
    Join Date
    May 2019
    Location
    Earth.
    Posts
    404
    Post Thanks / Like

    Cube3 File Editor

    I have been working with @TommyDee to refine a tool for working with Cube3 and a little with CubePro files. I am relatively new to 3D Printing, but I am not afraid of trying things.

    I have an EKOCYCLE printer that I have updated the firmware to be a Cube3, and have also modified the firmware to no longer decrement the cartridge filament count. I have also built Tomuro's cartridge programming device and have reprogrammed both EKOCYCLE cartridges to be PLA.

    I have been printing things pretty well, but wanted a bit more control and started looking at how to get files fine tuned. So, after reading many posts on this form and others, and using the command line utilities to decode from CUBE3 to BFB, edit the file, and then encode from BFB to CUBE3, I decided there must be an easier way. Thus began my app that I call Cube3Editor.

    You can download a zip file, which contains the binaries (if you have the necessary .NET frameworks installed), or an MSI installer that will install any missing frameworks.

    Update March 18, 2021
    *************************************************
    Since Google is complaining about the primary executable containing a virus, I have moved the files to a download server.
    https://gofile.io/d/Ghjr0U

    Updated November 5, 2019
    *************************************************
    New versions posted to the google site.

    Binary Zip: https://drive.google.com/file/d/1gdM...ew?usp=sharing


    *************************************************

    This is a work in progress, but please report any issues here, or PM me directly.

    With some ideas from TD, I have also begun to implement the ability to script the utility so that it could be used to modify CUBE3 files from the command line. Here is the current script documentation, which is subject to change and is not implemented in the version currently available for download:


    SET [FIRMWARE|MINFIRMWARE|MODEL|E1|E2|E3] "value"
    FIRMWARE: sets ^Firmware: to "value"
    example: set FIRMWARE "V1.14B"

    MINFIRMWARE: sets ^Minfirmware: to "value"
    example: set FIRMWARE "V1.14B"

    MODEL: sets ^PrinterModel: to "value"
    example: set MODEL "CUBE3"

    E1: sets ^MaterialCodeE1: to "value"
    example: set E1 "82"

    E2: sets ^MaterialCodeE2: to "value"
    example: set E2 "82"

    E3: sets ^MaterialCodeE3: to "value"
    example: set E3 "82"


    MODIFY TEMPERATURE [LEFT | RIGHT | MID] <XXXX> BY [PERCENTAGE [+/-]<YYYY> | ADD [+/-]<YYYY> | REPLACE <YYYY>]
    This modifies all existing occurances of XXXX by one of the following methods:
    PERCENTAGE [+/-]<YYYY>: adjusts XXXX by percentage. Increase can be specified by specifying a positive value for YYYY. Decrease can be specified by specifying a negative value for YYYY.

    ADD [+/-]<YYYY>: adjust XXXX by YYYY. Increase XXXX by specifying a positive value for YYYY. Decrease YYYY by specifying a negative value.

    REPLACE <YYYY>: Replace each occurance of XXXX with YYYY.

    • Maximum temperature is 265. If any adjustment results in a larger value, it will be set back to 265.


    • Minimum temperature is 0. If any adjust results in a negative value, it will be set back to 0.

    If LEFT is specified, then only the left extruder is modified. If RIGHT is specified, then only the right extruder is modified. if MID is specified, then only the mid extruder is modified. If none of these are specified, then the temperature adjustment affects all entries that match the given <XXXX> temperature.


    MODIFY RETRACTSTART <XXXX> BY [PERCENTAGE [+/-]<YYYY> | ADD [+/-]<YYYY> | REPLACE <YYYY>]
    This sets the P/S values of M227 command by percentage, addition or replacing the exising value with a new value.
    PERCENTAGE [+/-]<YYYY>: adjusts XXXX by percentage. Increase can be specified
    by specifying a positive value for YYYY. Decrease can be specified by
    specifying a negative value for YYYY.

    ADD [+/-]<YYYY>: adjust XXXX by YYYY. Increase XXXX by specifying a
    positive value for YYYY. Decrease YYYY by specifying a negative value.

    REPLACE <YYYY>: Replace each occurance of XXXX with YYYY.
    If <YYYY> is calculated to be less than 0, then the value stored will be 0.

    MODIFY RETRACTSTOP <XXXX> BY [PERCENTAGE [+/-]<YYYY> | ADD [+/-]<YYYY> | REPLACE<YYYY> ]
    This sets the S values of M228 command by percentage, addition or replacing the existing value with a new value.
    PERCENTAGE [+/-]<YYYY>: adjusts XXXX by percentage. Increase can be specified by specifying a positive value for YYYY. Decrease can be specified by specifying a negative value for YYYY.

    ADD [+/-]<YYYY>: adjust XXXX by YYYY. Increase XXXX by specifying a positive value for YYYY. Decrease YYYY by specifying a negative value.

    REPLACE <YYYY>: Replace each occurance of XXXX with YYYY.
    If <YYYY> is calculated to be less than 0, then the value stored will be 0.



    =====EXAMPLE=====
    An example script may look like:
    Code:
    set FIRMWARE V1.14B
    set MINFIRMWARE V1.14B
    set MODEL CUBE3
    set E1 82
    set E2 -1
    set E3 -1
    set TEMPERATURE LEFT 210 BY REPLACE 195
    set TEMPERATURE LEFT 265 BY REPLACE 215
    set TEMPERATURE LEFT 250 BY REPLACE 210
    set TEMPERATURE LEFT 240 BY ADD -35
    set RETRACTSTART 450 BY PERCENTAGE -50
    set RETRACTSTOP 450 BY PERCENTAGE -50

    and the command line may look like:


    Code:
    cube3editor example.cube3 example.scr

    this would result in an updated example cube3 that has the updates specified in the script. If for any reason one of the lines in the script is badly formed, no changes will occur to the cube3 file.

    - - - - - - - - - -

    New versions of binaries uploaded and ZIP of the binaries is attached here.

    - - - - - - - - - -

    Just for fun, @TommyDee asked me to create a utility to generate a basic file from a given CUBE3 file.

    https://drive.google.com/file/d/1gdM...ew?usp=sharing

    This is a console mode app that will take a cube3 file and generate a script that could be modified to change the parameters using the other, Cube3Editor. The script file will contain the following details:

    FIRMWARE
    MINFIRMWARE
    MODEL (printer model)
    E1 (MaterialCodeE1)
    E2 (MaterialCodeE2)
    E3 (MaterialCodeE3)

    then a it will list
    unique temperature lines with the current temperature and a "replace" value (Which is just the temperature repeated).
    retract start lines (M227) with the current retraction rate (P/S must match) and a "replace" value (Which is just the retract rate repeated).
    retract stop lines (M228) with the current retraction rate (S only) and a "replace" value (which is just the retract rate repeated).

    Let me know what you think.

    - - - - - - - - - -
    06/17/2019

    Cube3Editor -- the BFB can now be edited and saved to a BFB file from the UI. Currently, this DOES NOT affect the loaded file, I added it mostly as a convenience to assist in debugging. It could grow into a more useful feature.

    One of the upcoming changes I am thinking about is allowing the script to be generated, edited and saved from the UI.


    Added command line utilities:

    c3sg.exe -- this will read a cube3 file and generate a script that can be used to modify cube3 files. The script can be cased to the cub3editor executable along with the a cube3 file to apply the changes to the cube3 file without using the GUI.

    cube3decoder -- this will convert a cube3 file to a BFB (bit from byte) file. This will either put the output a file with the same name as the cube3 file with an extension of BFB or to a filename supplied on the command line. This will work with CUBE3 files that have been previously encoded with cube3encoder or with files generated by cube_print.

    cube3encoder -- this will convert a BFB file to a cube3 file. The cube3 filename will be the same as the BFB file, but with the extension CUBE3. Or the output can be overridden by specifying the cube3 file on the command line.
    Last edited by buddybu; 03-19-2021 at 06:26 AM. Reason: moved Cube3Editor link

  2. Thanks bolsoncerrado, ztoddman1, tamer1an, MarkRon, Aline thanked for this post
  3. #2
    Super Moderator
    Join Date
    Nov 2016
    Posts
    3,531
    Post Thanks / Like
    Finally got the chance to start the beta test.
    This is what I have in the execute folder exactly what was in the zip file:

    c3e1.PNG

    First observance was the reduced size of the encoder and decoder.
    Drag and drop a .cube3 file on the decoder and it created a .BFB file where the file came from (desktop).
    The Cube3Decoder.exe also stripped the image from the .cube3 file. Nice!

    A note on this operation; I normally have EOF at the end of the M107 (no CR) when I edit files with notepad.
    A strange thing first time I opened the .BFB in notepad; it had 2 spaces (hidden characters(?)) after the last M204 S0 but cannot reproduce that phenomenon.

    Windows10 complains about non-signature files but that is just once.


    Next I drag and drop the .cube3 file onto c3sg.exe. And out pops a .SCR file from whence the .cube3 file came (desktop).
    Parcing of all the unique values for retract and temperature neatly bound in an ascii format and includes the basic header settings.
    Love this feature. .SCR may not be the best extention as I cannot figure out how to make it open with notepad by default, or even have the choice with the RMB.

    I've lost the interface. Running c3sg.exe standalone has no user interface. Is that some of the previous files?
    Also, running the encoder appears to overwrite the original .cube3 file.

  4. Thanks buddybu thanked for this post
    Likes buddybu liked this post
  5. #3
    Expert 3D Printer
    Join Date
    May 2019
    Location
    Earth.
    Posts
    404
    Post Thanks / Like
    Thank you for the testing.

    Yeah, I didn't sign the files with a certificate. I suppose I could get a free one and do that for the next release.

    Yes, I wanted the utility to strip the leading text as well as the image at the end, based upon what I've read on the forums. I can modify the code to strip the last CRLF.

    Interesting about the M204 call with hidden characters. If you do reproduce that, let me know if you are able to come up with steps, or a model that can reproduce that.

    You are correct, running c3sg does not have a UI, if you provide it a CUBE3 file and a SCR file, then it will use the SCR file to modify the CUBE3 file.

    I will double check the cube3encoder, I thought I had it creating backup files. They will be named like file.cube3.XXXXXXXX with 8 digits. It supports up to 5 backup files, and then starts overwriting the oldest one. I will double check that. If you want the ui, run Cube3Editor from the other binary zip. You can put it in the same folder as the utilities...

  6. #4
    Super Moderator
    Join Date
    Nov 2016
    Posts
    3,531
    Post Thanks / Like
    Understood, thanks. I like this command line editor thing. Still need to write the batch file.

    Found this cool thing... the previous decoder chopped off the header... your's doesn't! THANKS

    configfix.PNG

    There's a reason I am interested in this.

    BTW, how hard is it to put an M108 list in the .SCR?
    Turns out extrusion pressure is set with M108 for both nozzles.
    It would be useful to access these in this type of script.
    A duplication of M104 calls within your code I would presume.

    I'm assuming this simple extruder pressure tweak to CubePro print files will make CubePro sliced print files compatible on Cube3.
    The CubePro slicer does have many more options.

    I need to see what your decoder does with v2.02 print and config files for CubePro. After testing V1.87 which is loaded.

    - - - - - - - - - -

    I'm getting some kind of remnant in the translation of the .xml files.

    remnant.PNG

  7. Thanks buddybu thanked for this post
    Likes treofab liked this post
  8. #5
    Expert 3D Printer
    Join Date
    May 2019
    Location
    Earth.
    Posts
    404
    Post Thanks / Like
    You're going to find that the encoder does strip off the header though. :| If you'd rather that I didn't strip the header upon encoding to CUBE3, I can make that change.

    As for adding M108 to the script processing, I don't see why not, it's just another code I have to filter and replace. I already do it for others. Let me look at that over the weekend and I will post an update when I have something.

    Can you send me the encoding you are seeing this issue on? it may be something specific to cubepro files? I noticed that I did have a slight bug removing the image, and it left a few bytes of code. It doesn't seem to bother the Cube3 though.

  9. #6
    Super Moderator
    Join Date
    Nov 2016
    Posts
    3,531
    Post Thanks / Like
    Correct. I've been beating up the 'coders and they are robust on the print files. Was able to endlessly loop the decode/encode process. Also saw the resulting file in CubePro 1.87, even with .Cube3 files. CubePro 1.87 print files worked fine for generating .SCR files.

    There are a couple of config and build files I am very interested in getting access to. They use the same encoder/decoder. They exist in the ...(x86)/3dsystems folder structure. If you throw one of the XML's on the decoder you'll see what I mean. When I re-encode it is identical in notepad++ except this footer imaged above. Their XML version (binary) is fairly consistent. The garbled header made a mess when encoded again before.

    Thanks for looking into the M108's.

    Need to eval 2.02 pro files next... Cube3 you got locked!

  10. #7
    Expert 3D Printer
    Join Date
    May 2019
    Location
    Earth.
    Posts
    404
    Post Thanks / Like
    Attachment 3291Attachment 3291Okay, Here is what I did tonight:

    1. Added -xml to cube3decoder to treat the file as an encoded XML rather than CUBE3.
    2. Added backup capabilities to cube3encoder so that you don't overwrite the original CUBE3 file.
    3. Added support for modifying M108 values, I think -- it is really untested. I added a new tab in the UI which displays the M108 values and the first line in the file at which it appeared. I am thinking of adding a count so that you know how many are included. You can just type in the field for the new pressure value and it will be saved to the BFB.
    4. Added support in the script file for M108 as well. The command is EXTPRESSURE and it looks similar to the RETRACTSTART/STOP. Here is a sample:

    Code:
    MODIFY EXTPRESSURE 29 BY REPLACE 29
    MODIFY EXTPRESSURE 22.5 BY REPLACE 22.5
    MODIFY EXTPRESSURE 40 BY REPLACE 40
    MODIFY EXTPRESSURE 39 BY REPLACE 39
    MODIFY EXTPRESSURE 32 BY REPLACE 32
    MODIFY EXTPRESSURE 37 BY REPLACE 37
    New version can be found here

    Or attached Attachment 3291
    Last edited by buddybu; 06-22-2019 at 07:30 AM.

  11. #8
    Super Moderator
    Join Date
    Nov 2016
    Posts
    3,531
    Post Thanks / Like
    Sweet!

    Just to explain my thinking on "feed and speed" which is the hallmark of any CNC machining operation, Cubify/BFB uses a determined pressure associated with a given velocity of the extruder head. 3D Systems has given much attention to this in the CubePro implementations where the Cube3 has had fairly consistent extruder pressures. Rather than mess with the speed issues (the F-value on G1 commands) I was thinking we could do this with extrusion force adjustments. This should open up the CubePro slicer to Cube3 with minimal effort. This is where CubePro tries to be very precise with where they place how much filament. Bottom line, we should be able to make truly solid parts on Cube3.

    I'll get back to testing this evening... thanks for adding this!

  12. #9
    Expert 3D Printer
    Join Date
    May 2019
    Location
    Earth.
    Posts
    404
    Post Thanks / Like
    About the extension SCR. I was thinking of changing it to CUBESCR This would be more specific and maybe allow you more easily add a Windows mapping. What say you?

  13. #10
    Super Moderator
    Join Date
    Nov 2016
    Posts
    3,531
    Post Thanks / Like
    Yes, that solves it. I can assign notepad to .cubescr in Win10.

 

 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •