libredwg icon indicating copy to clipboard operation
libredwg copied to clipboard

Question: What about default LTYPE values like BYLAYER, BYBLOCK, CONTINUOUS in preR13?

Open michal-josef-spacek opened this issue 1 year ago • 4 comments

In postR13 is in the header handle for these default LTYPE values.

But in preR13 it quietly does not find a handle for these types.

...
          if (vars->LTYPE_BYLAYER)
            return vars->LTYPE_BYLAYER;
...

in https://github.com/LibreDWG/libredwg/blob/master/src/dwg.c#L2580-L2581

In the case of CONTINUOUS, there is the process of creating this LTYPE before this setting. Then there is the possibility to set vars->LTYPE_CONTINUOUS after creating.

michal-josef-spacek avatar Jun 10 '23 09:06 michal-josef-spacek

bylayer and byblock are magic indices, if I remember correctly, without actual table records nor handles. this must be specialized. LTYPE_CONTINUOUS always has a table record, and thus a handle.

rurban avatar Jun 12 '23 06:06 rurban

not setting HEADER.LTYPE_CONTINUOUS is just a missing opimization. It still has to walk the entries, and compare the names then.

rurban avatar Aug 17 '23 14:08 rurban

Is this it?

rurban avatar Aug 17 '23 22:08 rurban

I am trying to remember what was the root cause of this question.

I think conversion from DXF to DWG. I will look to it.

michal-josef-spacek avatar Aug 18 '23 07:08 michal-josef-spacek