Forum > FPvectorial
DXF translation of aligned dimlines in FPvectorial
eraaijma:
The FPvectorial package has some translation-problems with aligned dimensions. I have tried to change this.
Attached I have posted the original DXF file and the changed programs of fpvectorial
If you look at the DXF files with the original fpvectorial and with the new files, you will see some improvements.
I am not a great programmer though and I have a question:
In the header of the DXF files I find:
(9 $DIMSCALE)
(40 200.0)
I would like to get that dimscale accross from dxfvectorialreader to fpvectorial and I have absolutely no clue how to do that.
Can someone help me please?
zamtmn:
>>I would like to get that dimscale accross from dxfvectorialreader to fpvectorial and I have absolutely no clue how to do that.
This requiressupport of dxf dim styles (and maybe dim styles overriders) and access to them from dim entities code. I understand this is not yet implemented in fpvectorial
Probably because fpvectorial multi-format library, so deep support one dxf format is not done.
eraaijma:
Having no dimscale feels like printing a magazine or paper without a variable for 'font.size'.
Representing dimensions in the correct way might need a lot more then only the dimscale command. F.i. maybe the the sizes of arrows is a multiplication of a base size * one of the defined scales.
Looking at the dxf vectorialreader-unit, the implementation starts off with defining which autocad versions has been used.
- I went through this list and exported from Autocad to the various versions.
- I even exported from Autocad to a PDF, imported this in Adobe Illustrator and exported it again to a DXF format.
As far as I could check, there is always a record for dimscale in a DXF file. This looks to be generic instead of 'one dxf format'
That's why I still want to discuss what the best way would be to get data across from dxfvectorialreader fo fpvectorial.
Maybe, we would need to make a dynamic array (of records) in dxfvectorialreader. In that way I could expand it when we go along and understand more of how every entry influences the drawing.
If then I get data in fpvectorial.pas, I could analyse the data there and use the correct entries for each of the dims.
Example
record 1: DIMSCALE, ISO001, dimscale 1, ..., ....
record 2: DIMSCALE, ISO010, dimscale 10, ...., ....
record 3: DIMSCALE, ISO015, dimscale 15, ...., ....
record 4: DIMSCALE, ISO0XY, dimscale 50, ...., ....
record ?: DIMASZ, 0.16, ...., ....
record ?: DIMEXO, 0.0625, ...., ....
If the Array does not exist, is nil, or has no relevant entry, defaults (constants) could be used.
zamtmn:
As far as I found out in the header variables contains copies of the values from the current dimension style, or their current overriders.
In my implementation I did support dimension styles, while not all, but gradually moving in that direction. Even having it to organize behavior like in autocad is difficult - different combinations are treated differently and it's nowhere documented, there are only general descriptions.
I attach a screenshot of how your drawing looks in fpvectorial (with your changes), in autocad, in my program: http://storage2.static.itmages.ru/i/15/0908/h_1441709034_9560598_ec28ef8989.png
Also I noticed that after your changes size of the texts has increased and now is not always included in the space provided
eraaijma:
@zamtmn
The representation in your program looks splendid. I have tried to study zcad program files, but it is way out of my league.
So far I have tried to implement some trigonometry into fpvectorial, and the result is starting to show bit by bit.
I still have to work on circular dimensions, angular dimensions and leaders.
After that I would like to work on:
- representation of text
- projections of circles (isometric views).
Once that is all done, the program should work fine for me.
Thanks anyway
Navigation
[0] Message Index
[#] Next page