mkernel / DXFLib

C# Library for reading (and writing in future) DXF files
49 stars 35 forks source link

How to know which layer to show ? #2

Open arochedy opened 8 years ago

arochedy commented 8 years ago

Hi,

I use your (awesome) library to transform a dxf file to an image in a wpf software.

I have a problem with layers : I didn't find how to know which layers to show or not.

When i use some dxf viewer it only show me some layers but not all.

Do you know how to do this ? (or if it's missing in your library ? )

Thank you

mkernel commented 8 years ago

Hi @arochedy,

can you provide me with a sample DXF file? I'll have a look then.

arochedy commented 8 years ago

this is it. Thank you for you're time. I'll tell you if i fix it ;)

DIAMOND-R.zip

arochedy commented 8 years ago

Finally I found a solution !

My problem was not to show/hide a layer but how to detect and hide unrelevant objects.

I use DrawingExtendsLowerRight and DrawingExtendsUpperRight properties in header section to know the limits of my drawing. I only keep elements that are in the limits.

So this is not an issue of your library ;) (sorry to disturb you) (I'll look how to delete this issue)

mkernel commented 8 years ago

That's good to hear :) - anyway i'm interested in the details and have a look anyway.

arochedy commented 8 years ago

I got an another problem ! the libray doesn't find ellipse !

I found ellipse in dxf but the libray doesn't read them, it "jump" to the next entites.

API MONOGRAM ONLY.zip

arochedy commented 8 years ago

I fix it by adding [Entity("LINE")] on DxfEllipse Class