draw dotted lines

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 20/07/2009 at 04:47, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   R9.6-R11 
Platform:      
Language(s) :     C++  ;

---------
Hi.

quick question:
how can i draw dotted lines in my tool plugin?

code from this thread doesnt work for me :
link

it suggested using negative values for transparency.

greetings,
Daniel

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 20/07/2009 at 08:07, xxxxxxxx wrote:

Dan had to create his own 'dotted line' drawing routine (probably using one of the line routines like Line2D, LineCS, LineStrip...). There is no built-in support to do it. Maybe he'll show up here and provide code.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 20/07/2009 at 08:09, xxxxxxxx wrote:

It appears that void SetTransparency(LONG trans) with a positive parameter draws a dotted line and negative values draw true transparencies.

My test code:

> \> LONG EdgeCutTool::Draw(BaseDocument \*doc, BaseContainer &data;, BaseDraw \*bd, BaseDrawHelp \*bh, BaseThread \*bt,LONG flags) \> { \>      if (!(flags & DRAWFLAGS_HIGHLIGHT)) \>           return FALSE; \> \>      bd->SetPen(Vector(1.f,0.f,0.f)); \> \>      bd->SetTransparency(-220); \>      bd->Line3D(Vector(0.f),Vector(100.f,100.f,100.f)); \> \>      bd->SetTransparency(0); \>      bd->Line3D(Vector(0.f),Vector(100.f,100.f,-100.f)); \> \>      bd->SetTransparency(100); \>      bd->Line3D(Vector(0.f),Vector(-100.f,100.f,-100.f)); \> \>      bd->SetTransparency(255); \>      bd->Line3D(Vector(0.f),Vector(-100.f,100.f,100.f)); \> \>      return DRAW_HANDLES|DRAW_AXIS; \> } \>

cheers,
Matthias

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 20/07/2009 at 08:30, xxxxxxxx wrote:

Quote: __
>
> * * *
>
> It appears that void SetTransparency(LONG trans) with a positive parameter draws a dotted line and negative values draw true transparencies.
>
>
>
> * * *

yes indeed, thanks for that.
must have done sth wrong with the code from the original thread..

I think the fake transparent look is just what i wanted!

greetings,
Daniel

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 20/07/2009 at 17:01, xxxxxxxx wrote:

Howdy,

Well, looks like this is another thing to add to the list for things to change in an updated SDK docs. I wish I would've tried 255 for the transparency back then. :o(

Adios,
Cactus Dan

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 28/07/2009 at 06:36, xxxxxxxx wrote:

Howdy,

> Quote: Originally posted by Matthias Bober on 20 July 2009
>
> * * *
>
> ...It appears that void SetTransparency(LONG trans) with a positive
> parameter draws a dotted line and negative values draw true
> transparencies.
> ...
>
> * * *

Hmmmmm, I've discovered something odd about drawing in true transparency:
Transparency

It seems that virtual geometry doesn't draw behind a transparent polygon when "true" transparency is used the the virtual geometry is selected. Is this a bug?

Adios,
Cactus Dan