DATHeader 3.0.18.0 - new feature


DATHeader 3.0.18.0 - new feature
#1
Based on an idea of Magnus Forsberg [MagFors] I have updated DATHeader.

We have an article that clearly states that leading or / and trailing zeros are not allowed in good files.

For example the current file p\4-4ring1.dat contains the following line, that is not correct:
4 16 -1.8478 0 0.7654 -0.9239 0 0.3827 -0.7071 0 0.7071 -1.4142 0 1.41420

This is clearly a task for DATHeader Smile.

DATHeader now detects this and also can correct this error.


If you have any other wish for DATHeader, please let me know and I am looking what can be done.

You can download DATHeader as usually from DATHeader homepage.

cu
mikeheide
Reply
Re: DATHeader 3.0.18.0 - new feature
#2
Michael Heidemann Wrote:If you have any other wish for DATHeader, please let me know and I am looking what can be done.

* I wish:

DATheader would not rip off my empty lines I use to group certain sections of my parts and leave this code:

Code:
3 16 -60 -112 -10 -60 -54 -2 -60 -52 -10

2 24 -56.8 -108.8 -10 -57.5 -108.8 -10
2 24 -50.4 -108.8 -10 -53.6 -108.8 -10

3 16 -52.485 -108.8 -10.15 -53.25 -108.8 -10 -50.4 -108.8 -10

as it is.

* I wish DATHeader would somehow warn me if "Part Type:" isn't set to "Unofficial_part". I always forget to set it when I fix parts downloaded from the PT. (Well actually I do not understand why the PT accept such parts?).
* I think the menu Edit -> CheckOfficial (should probably read "Check Official") is somehow cryptic. I guess something like "Check is this is an official part" or "Check against official part" would be more meaningful.
* The menu ? -> test leads to the pop-up: "The file C:\User\Michael\Desktop\complete.zip could not be found!"
* I'm still irritated (now call my picky) by DATHeaders desktop icon and would prefer it would be something in the line with the other LD progs and star a brick (maybe with some tools).

w.
LEGO ergo sum
Reply
Re: DATHeader 3.0.18.0 - new feature
#3
Thank you very much for your feedback.

1) I'll investigate how to preserve those empty lines. I am not sure that I will be successfull as this empty lines already costs me some days of work in the past Smile
Edit: Should now work from next release on - stupid error. Sad

2) Generally it is ok if a file do not have the prefix "Unofficial_". So it will never be an error for DATHeader if this is not set. But I can imagine to introduce a setting where the user can choose to be warned if this is not the prefix of the parttype. I'll see.
Edit: If you save your work in a new file you will be asked for that prefix already. Maybe another workflow on your side can solve your problem.

3) You are very right! - I will use your suggestion "Check is this is an official part" from next version on.

4) The "test" menu entry was never meant to go into a release version Smile - It will be removed in the next version.

5) I like this friendly smile for a perfect part Smile - on the other hand I am not a designer, so if someone has a good icon for me to use for DATHeader I can be convinced to use that in the future. I am looking for your suggestions.
Reply
Re: DATHeader 3.0.18.0 - new feature
#4
Quote:1) I'll investigate how to preserve those empty lines.
OTOH I would be happy to have a function (or option?) to automatically remove all comments not in header. Most of the times the comments I have in my files are meaningless...
Reply
Re: DATHeader 3.0.18.0 - new feature
#5
Ok, but that is something different than Willy is talking about.

An empty line (Willy) is not the same than a comment line.

For your purpose I could imagine a new feature during the autooptimize process.
If DATHeader detects comments in the body section you will be asked to delete those lines. Because I think that many people do not want this to be asked each time, this test should only be done if a checkbox in the options "detect comments in the body" is checked.

Does anybody has a better idea to solve this issue?

I am looking forward to your further comments.
Reply
Re: DATHeader 3.0.18.0 - new feature
#6
Seems to work fine with me... Actually it would be great to heve two levels, one that removes all comments and empty lines, the other that only removes comments beginning with 0 (and empty lines) but not comments starting with 0 //

Otherwise, could you remove the obligation to have category on subparts? It has been stated many times that valid category is not needed for subfiles.
Reply
Re: DATHeader 3.0.18.0 - new feature
#7
Michael Heidemann Wrote:on the other hand I am not a designer, so if someone has a good icon for me to use for DATHeader I can be convinced to use that in the future. I am looking for your suggestions.

Size, file type, alpha channel yes/no, ...

w.
LEGO ergo sum
Reply
Re: DATHeader 3.0.18.0 - new feature
#8
What about something link this as an icon?
[Image: datheader.png]

I am also using empty lines to structure my files and I find them helpful, also comments on the structure of the parts are sometimes good to have in my opinion.


Attached Files
.png   Datheader.png (Size: 14.27 KB / Downloads: 2)
Reply
Re: DATHeader 3.0.18.0 - new feature
#9
That all is not the problem. Just send what you like to have. We will get best results if width and height of the original picture are the same. The size should be in idle case 256 x 256, and all the other sizes can be done from that original.
Reply
Re: DATHeader 3.0.18.0 - new feature
#10

.png   Datheader_Icon.png (Size: 38.07 KB / Downloads: 2)

A humble attempt.

w.
LEGO ergo sum
Reply
Re: DATHeader 3.0.18.0 - new feature
#11
Nice! but I'm afraid it's a bit too detailed to properly show at regular 32x32 icon size. I like the magnifier on brick concept...
Reply
Re: DATHeader 3.0.18.0 - new feature
#12

.png   Datheader.png (Size: 36.8 KB / Downloads: 2)

Here we go.

w.
LEGO ergo sum
Reply
Re: DATHeader 3.0.18.0 - new feature
#13
What about this variant with a magnifying magnifier?

.png   Datheader.png (Size: 36.31 KB / Downloads: 2)
Reply
Re: DATHeader 3.0.18.0 - new feature
#14
I like this attempt a lot, but since 2006 prominent color of the logo is yellow. So I would much prefer a yellow block Smile
What do you think?
Reply
Re: DATHeader 3.0.18.0 - new feature
#15
+1
Reply
Re: DATHeader 3.0.18.0 - new feature
#16
First i like to clear the second item you mentioned.
Until now DATHeader do not care about the category for the following part types:
"Unofficial_48_Primitive", "48_Primitive", "Unofficial_Primitive", "Primitive", "Unofficial_8_Primitive", "8_Primitive"

So you like me to add to this list also the part types: "Unofficial_Subpart", "Subpart".

Is that correct?
Reply
Re: DATHeader 3.0.18.0 - new feature
#17
Yes, exactly!
Reply
Re: DATHeader 3.0.18.0 - new feature
#18
OK.

Now I am working on the solution for deleting the comments if wished.
I'll keep you informed.
Reply
Re: DATHeader 3.0.18.0 - new feature
#19

.png   Datheader_Icon.png (Size: 35.42 KB / Downloads: 2)

w.
LEGO ergo sum
Reply
Re: DATHeader 3.0.18.0 - new feature
#20
This is now my favorite Smile Thanks !

I will use this for the next release Smile
Reply
Re: DATHeader 3.0.18.0 - new feature
#21
I now had a look into the current implementation of DATHeaders correction for comments.

If a line starts with '0' only it will leave a complete blank line.
If a line starts with '0 //' only it will leave a complete blank line.
If a line starts with '0 // text' it will leave the line untouched.
If a line is a blank line it will leave the line untouched.

Based on this I try to analyse what we expect to find in the files.
1) empty line
2) line with '0' only
3) line with '0 text'
4) line with '0 //' only
5) line with '0 // text

Corrections
5) is a good style comment
3) is old style comment and should be translated to 5)
2) and 4) can be switched to empty line and only one occurence of an empty line in series is allowed?

I am not sure how to deal with this to fulfill your special needs and the mainstream needs Smile
Reply
Re: DATHeader 3.0.18.0 - new feature
#22
Sometimes I use two empty lines, for example if I want to divide bigger sections.

/Max
Reply
Re: DATHeader 3.0.18.0 - new feature
#23
I like all of these suggestions.

Max' complaint can maybe resolved by an optional setting
"[ ] compress multiple empty lines to one"
Reply
Re: DATHeader 3.0.18.0 - new feature
#24
There is also the original variant of 3) : 0 WRITE text
Reply
Re: DATHeader 3.0.18.0 - new feature
#25
This is not allowed in official library files. Only for those DATHeader is written!
Reply
Re: DATHeader 3.0.18.0 - new feature
#26
Quote:This is not allowed in official library files.
That's precisely why it must be corrected and translated to 5)!
Reply
Re: DATHeader 3.0.18.0 - new feature
#27
As a user of LDDP as my main editor today, I dislike any software that shuffle up my code.
I like all of the suggested changes as long I get to choose when it is applied on my file.

Some of Philo's tools a really annoying when all empty lines are removed.
I have to add empty comments just to keep the structure of my file.

Some other tools give me the choice. Select 'Move all affected code to end of file'. Good. I get to choose.

I hope Nils's LPE is letting me be the editor and keep the structure intact in my file.
LPC don't give me much choice of were in my file triangles are added.

Would it be possible to add some sort of choice option in DATHeader?
Warn me about an error, but let me decide if it should be fixed? I sometimes don't want it to optimize my code.
Correct warp quads, but don't add a cond-line. Why is the other half of a warped quad moved to the end of the file?
Or don't create quads from triangles.

But otoh, that might better be a choice in a part editor, than in DatHeader.

I like to be the decision maker. Apply this, but don't do that.
Reply
Re: DATHeader 3.0.18.0 - new feature
#28
Ok, I just checked this and this is the way it is handled by DATHeader already.
Reply
Re: DATHeader 3.0.18.0 - new feature
#29
I understand your concerns very well. On the other side there are user that do not like to be asked for everything. DATHeader should just care about correct output.

I understand both viewpoints. But I have not found yet a good solution to fulfill both in one app. Sad
Reply
Re: DATHeader 3.0.18.0 - new feature
#30
I think you can just deliver your app so that its default setting is only
"correct errors"
and not yet
"beautify".

A user who wants beautification then can simply go to the options and enable
the beautifications he wants to be applied by your app automatically.

I think it is that simple Smile
Reply
Re: DATHeader 3.0.18.0 - new feature
#31
Sorry if I'm reviving an old discussion. I've a bit of catching up to do ;-)
It may be a bit of work to implement but you could have a preference page for the optimise section. For each optimisation give the user three options:
- Never apply
- Ask
- Always apply
You can argue over what the ootb settings should be but everyone can then set the app up to their own liking. For example you can set it to always remove empty lines but ask about removing comments.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 2 Guest(s)