Line types with text
Chris Smith
12/7/2021 5:04 AM
|
---|
Hi Wout,
Just wondering if line types with text are supported in Cadlib? I saw this post which seemed to suggest it would work https://www.woutware.com/Forum/Topic/248 however it doesn't seem to when we render to png (see attached pictures, map... is the cadlib version, acad... is the autocad version).
Is this something that's become broken?
Cheers,
Chris
|
Chris Smith
12/7/2021 11:10 PM
|
---|
Hi Wout,
Attached is a drawing with a poly line that has a complex line type with text in it.
Code to render (using Linqpad) is:
C# Code: DxfModel dxf = DwgReader. |
rammi
12/8/2021 11:18 AM
|
---|
Hi Chris,
graphical line type elements are not handled by default. You'll have to set DisplayLineTypeElementShapes to true on the GraphicsConfig you use to create your GDIGraphics3D. That should do the trick.
- Rammi
|
Chris Smith
12/8/2021 10:44 PM
|
---|
Ah great! Yes can confirm this works.
The doco suggests that there's a performance impact for enabling this - is it possible to give me some idea of how expensive it might be? (just rough order of magnitude 2x, 10x, 100x slower etc)
Or is it entirely dependent on how many lines and how many bits of text appear?
Cheers,
Chris
|
Wout
12/9/2021 12:02 AM
|
---|
Hard to tell, it completely depends on the drawing. Since CadLib stores all shapes in memory before rendering for performance in terms of speed, it can quickly eat up a lot of memory if there's lines with lots of fine line type elements.
- Wout
|