| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 298 online users. » 1 Member(s) | 293 Guest(s) Applebot, Baidu, Bing, Google
|
|
|
| Img4Dat integrated in LDPC 1.7.7 |
|
Posted by: Gabriel Läufer - 2025-09-10, 20:44 - Forum: Parts Authoring
- Replies (6)
|
 |
Hi everyone,
Hi Nils,
To accelerate the sticker and pattern generation process, I’ve got another exciting news for you!
I’m partly referring to this thread: https://forums.ldraw.org/thread-23242.html on the LDraw forum. Mainly regarding the integration of Img4Dat in LDPC.
I have no idea how many of you are still actively using the tool 'Img4Dat', or whether you're simply working with LDPC/LDPE from scratch for sticker and pattern generation.
However, I use Img4dat a lot and really enjoy it, even though it's still somewhat in a beta state. The source code and executable aren't publicly available, and the program is no longer actively maintained.
I’ve tried contacting Rolf Osterthun, the author of the program, via the LDraw forum and his webpage, but I haven’t received any reply so far. Therefore, I’ve decided to decompile Img4Dat in order to access the source code, open it up for future development, and integrate it into LDPC (see *note below).
Image 1.1 shows the decompiled Img4Dat program, including the source code opened in Visual Studio. Image 1.2 displays the re-compiled software running with a test image after path analysis. Although debugging is still in progress, the program is relatively stable and (almost) all features are functioning as intended.
Image 1.1: Decompiled source code from Img4Dat in Visual Studio
Image 1.2: Compiled program Img4Dat with test image after path analysis
Unfortunately Img4Dat was originally written in C#, whereas LDPC is written in VB. However, it's possible to combine C# and VB within the same Visual Studio solution (see Image 1.3). Mixing VB and C# isn’t the most elegant solution, but I suggest proceeding this way for now (see **note below).
Image 1.3: Img4Dat and LDPC 1.7.7 in one Visual Studio solution
Image 1.4 shows the compiled program running with the same test image as above, and the resulting pattern successfully imported into LDPC.
Image 1.4: Img4Dat integrated into LDPC.
At the moment, the program simply generates a *.DAT file, which is then loaded into LDPC. Again, this isn’t the cleanest workflow, but it’s functional for now and my current understanding of the structure of LDPC is simply not good enough to optimize it. I believe Niels could easily improve this process.
I’ve already (started) implementing several modifications on Img4Dat. The generated pattern will be projected onto the X/Y plane instead of the X/Z plane. Scaling will be based on LDU units rather than pixels, and all common image formats (.PNG, .JPEG, and .BMP) are supported for import. I’ve also updated the header file (replacing the reference to CCAL 2.0 by CCAL 4.0).
Currently, the pop-up dialog box is an exact copy of the original program, including the menu bar. However, all of this can be easily adapted now.
In case Niels is not willing to integrate the decompiled Img4Dat project into LDPC in a future release, we at least have an updated standalone version of Img4Dat, which can be further improved over time. Since it already runs independently, no additional work is required at this point.
What’s your take on this? Are you still actively using Img4Dat? Would you be interested in seeing it integrated with LDPC? Do you think I should move forward with the project? If there’s anything you’re missing or any feature you’d like to see added, feel free to let me know. I’d really appreciate your feedback!
@Nils: I could totally understand if you don't want to include the decompiled code, but I'm happy to help where I can if you do.
Thanks
Gabe
*I will not under any circumstances upload any code without permission form Rolf! If you are in contact with Rolf, please let me know or ask him for me instead. I will give him credit of course.
**In the end, we would need conversion from C# to VB. It is possible but it will take a while, even with the help of KI. If we accept a combined VB/C# project we can already use it.
|
|
|
| TXT2DAT integrated in LDPC 1.7.7 |
|
Posted by: Gabriel Läufer - 2025-09-10, 20:44 - Forum: Parts Author Tools
- Replies (4)
|
 |
Hi everyone,
Hi Nils,
To accelerate the sticker and pattern generation process, I’ve got some exciting news for you!
No idea how many of you are still actively using the command-line tool “txt2dat” and/or the GUI interface “GUITx2d,” or if you’ve simply using LDPE for the character triangulation.
Even though I haven’t had to use it very often til today, I think this is a missing feature in LDPC. I really like LDPC, but so far it doesn’t support character triangulation. I have to use a another program to generate the characters and then import them into LDPC for further processing.
Since GUITx2d is somewhat outdated, the source and executable files are no longer generally available, and the program is no longer actively maintained, I’ve decided to rewrite it and integrate it into LDPC.
In Image 1.1, you can see the GUITx2d dialog box integrated into the latest LDPC project from Niels. You can launch TXT2DAT by clicking on the corresponding menu item in the menu strip, which then opens the GUITx2d dialog box.
Image 1.1: Project GUITx2d integrated into LDPC 1.7.7 in Visual Studio
Although debugging is still in progress, the program is relatively stable and (almost) all features are functioning as intended (see Image 1.2).
Image 1.2 GUITx2d integrated in LDPC 1.7.7 with triangulated text example
As with the old GUITx2d program, the new one simply sends commands to the command line. Hence, the program only generates the *.DAT file, which can then be loaded into LDPC. It’s not the most elegant solution, but it works.
All switches and options from TXT2DAT have been implemented, but I’ve already started adding a few new features. I’ve included the previously missing sticker bottom, which can be optionally removed. The color picker displays the names of the selected colors, and you can also triangulate characters individually -similar to the functionality found in LDPE.
For now, I’ve ignored the fact that some options don’t make much sense when the program is integrated into LDPC -for example, the description field or the file name.
The development is not finished right now but I guess 80% of the workis done.
In case Niels is not willing to integrate my GUITx2d project into LDPC in a future release, we at least have an updated standalone version of it, which can be further improved over time. Since it already runs independently, no additional work is required at this point.
What’s your take on this? Are you still actively using TXT2DAT or GUITx2d? Would you be interested in seeing it integrated with LDPC? Do you think I should move forward with the project? If there’s anything you’re missing or any feature you’d like to see added, feel free to let me know. I’d really appreciate your feedback!
@Nils: I could totally understand if you don't want to include my code, but I'm happy to help where I can if you do.
Thanks
Gabe
|
|
|
| Part versioning |
|
Posted by: Peter Blomberg - 2025-09-06, 2:37 - Forum: Official File Specifications/Standards
- Replies (4)
|
 |
Currently, part versioning is done by appending the part number with a letter. The same letters are also used when two designs have the same part number and when a bag contains multiple independent parts. This makes it impossible to automatically determine correct matches to e.g. external resources.
Having the links to external resources as separate meta is useful in particular when the external resources use different numbers or extensions. However, this doesn't solve the whole issue.
Can we begin using v2, v3, etc instead of b, c, d for cases when a "b/c/d replacement file" is created? This would enable all incorrect old versions of the part be available for backward compatibility, but allow new corrections to be distinguished from other uses.
|
|
|
|