Drawing Multiple Lines from TagPlugin



  • Hello!
    I have a follow-up question regarding drawing from a Tag. why is this code only drawing one line? I am calling DrawLine2D four times in this example.

        def Draw(self, tag, op, bd, bh):
            bd.SetPen(c4d.Vector(1, 0.7, 0))
            bd.SetMatrix_Screen()   
    
            p1 = c4d.Vector(0,0,0)
            p2 = c4d.Vector(100,100,100)
            p3 = c4d.Vector(500,500,500)
            p4 = c4d.Vector(300,300,300)
    
            bd.DrawLine2D(p1, p2)   
            bd.DrawLine2D(p2, p3)   
            bd.DrawLine2D(p3, p4)   
            bd.DrawLine2D(p4, p1)   
    
            return c4d.DRAWRESULT_OK
    

    Draw_Multiple_Lines.png



  • Hi,

    you are drawing four line segments. Just because you place them all somewhere on the line segment between <0, 0, 0> and <500, 500, 500>, they are indistinguishable for us. Either change your pen color or draw a more exiting geometry ;)

    Cheers,
    zipit



  • Hi,

    you are drawing four line segments. Just because you place them all somewhere on the line segment between <0, 0, 0> and <500, 500, 500>, they are indistinguishable for us. Either change your pen color or draw a more exiting geometry ;)

    Cheers,
    zipit



  • @zipit Hahahahaha! Thank you! I see my lines now. Who hoo! 😆


Log in to reply