Custom line widths

Custom line widths

Anonymous
Not applicable
590 Views
4 Replies
Message 1 of 5

Custom line widths

Anonymous
Not applicable
Hi all,

I have a custom entity that can visualy be an arc, a line or a polyline. I
would like it to have a width in all cases, but I didn't find anything in
AcGiSubEntityTraits.

How do I set a width to drawing primitives?
I figured I can use a temporary AcDbPolyline object for polyline and line
cases, but what about an arc?
Is there an easier way to do this?

Thanks a lot.

Igor
0 Likes
591 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
AcGiSubEntityTraits::setLineWeight() ?

"Igor Jarm" wrote in message news:[email protected]...
> Hi all,
>
> I have a custom entity that can visualy be an arc, a line or a polyline. I
> would like it to have a width in all cases, but I didn't find anything in
> AcGiSubEntityTraits.
>
> How do I set a width to drawing primitives?
> I figured I can use a temporary AcDbPolyline object for polyline and line
> cases, but what about an arc?
> Is there an easier way to do this?
>
> Thanks a lot.
>
> Igor
>
>
>
0 Likes
Message 3 of 5

Anonymous
Not applicable
"Tony Tanzillo" wrote in message
news:[email protected]...
> AcGiSubEntityTraits::setLineWeight() ?

Thanks, but it's line width not weight what I need, like in
AcDbPolyline::setWidthsAt.

Igor


> "Igor Jarm" wrote in message
news:[email protected]...
> > Hi all,
> >
> > I have a custom entity that can visualy be an arc, a line or a polyline.
I
> > would like it to have a width in all cases, but I didn't find anything
in
> > AcGiSubEntityTraits.
> >
> > How do I set a width to drawing primitives?
> > I figured I can use a temporary AcDbPolyline object for polyline and
line
> > cases, but what about an arc?
> > Is there an easier way to do this?
0 Likes
Message 4 of 5

Anonymous
Not applicable
"Igor Jarm" wrote in message news:[email protected]...
> "Tony Tanzillo" wrote in message
> news:[email protected]...
> > AcGiSubEntityTraits::setLineWeight() ?
>
> Thanks, but it's line width not weight what I need, like in
> AcDbPolyline::setWidthsAt.
>

Try setting FILLMODE to 0 and draw a wide polyline, and
I think you'll understand why there is no equivalence
between polyline widths and 'pen widths'. Wide polylines
are really not lines at all, they're more like triangular
filled solids.

Line weights are widths, with the caveat that they're
predefined. You can't specify an arbitrary weight or
'pen width' for primitive geometry, only a predefined
width, via lineweights. If you want to know why, I
can't say why, but I'd suspect it has something to do
with low-level graphics optimization.
0 Likes
Message 5 of 5

Anonymous
Not applicable
Thank you Tony and Gary.

I feared it can't be done and it isn't realy a width.
Hopefuly I can still use a temporary AcDbPolyline to make my life easier.

Igor
0 Likes