Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    draw dotted lines

    Scheduled Pinned Locked Moved SDK Help
    6 Posts 0 Posters 422 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                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

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post