Generating thick lines

1
Ron
10/17/2006 11:20 AM

Is it possible to 'translate' a pennumber into a thicker line.
I have got a drawing with two lines, one with pennumber 18 and the other with pennumber 16.
Now i would like to have the line with pennumber 18 'printed' with a thickness ( width) of 3 mm and the line with pennumber 16 with a width of 6 mm.
IS this possible with CADLIB?

Wout
10/17/2006 3:27 PM

Hi Ron,

Yes it is possible! You can use DxfLwPolyline and set the property ConstantWidth. Don't confuse it with property Thickness though: the thickness is the extrusion along its z-axis. Alternatively you could use DxfPolyline2D and use the DefaultStartWidth and DefaultEndwidth properties.

Thanks!

Wout

Ron
10/17/2006 4:47 PM

Hi Wout,

Only problem i have is that the application is generating single lines...
I tried to translate the color of the line to a specific layer and set the line thickness of the layer a little bit higher.
Unfortunally it seems that CADLIB does not support this, or i'm thinking wrong...
( see also the attached DXF, and a screendump of it).

Ron

Wout
10/17/2006 5:55 PM

Hi Ron,

Ah, if you want to define it on the layer level, then the appropriate property is DxfLayer.LineWeight. CadLib should be able to read/write it, but it doesn't use it for the rendering at the moment. Is this an important feature to you?

Another option is using GDIGraphics3D.NonTextPenWidth, but this affects the pen width for all lines (non-text).

Kind regards,

Wout

Ron
10/17/2006 8:59 PM

Hi Wout,

Yes rendering it is an important issue.
I need to be able to make lines 'printed' thicker according to their pennumber.
Normally ( i mean in other CAD packages) you can define which pennumber represents which colot and thickness of the pen.
The solution with layers i suggested was to be able to control it with your library.
However renedering is then needed.

Ron

Wout
10/17/2006 9:33 PM

Hi Ron,

I'm going to look into this. It will probably take a few days in terms of elapsed time before I have something worked out. Looks like AutoCad applies the line width regardless of the scaling (zooming) of the drawing on the screen, so that's actually indeed a pen width rather than a real line width (so I'll have to fit it in the drawing design somewhere).

Kind regards,

Wout

1