Custom graphics point disappears depending on view orientation, possible bug?

Custom graphics point disappears depending on view orientation, possible bug?

mike46YZU
Contributor Contributor
366 Views
2 Replies
Message 1 of 3

Custom graphics point disappears depending on view orientation, possible bug?

mike46YZU
Contributor
Contributor

Hi,

When I draw a single point with custom graphics it appears in the view, but when the models y-axis comes close to orthogonal with the screen, the point disappears, re-appearing when the y-axis is pointed away. I do not understand why this happens. It seems like a bug to me. I need to draw a point that is always visible, no matter the models orientation. Below is my code and a video that demos the issue. The point is drawn as a green circle.

 

def draw_points():
    app = adsk.core.Application.get()
    view = app.activeViewport

    #delete all custom graphics groups
    cnt = root.customGraphicsGroups.count
    if  cnt > 0:
        for i in range(cnt):     
            root.customGraphicsGroups.item(i).deleteMe()
    
    graphics = root.customGraphicsGroups.add()
    coordArray = [10,0,0]
    pointIndices = [0]
    coords = adsk.fusion.CustomGraphicsCoordinates.create(coordArray)
    points = graphics.addPointSet(coords, pointIndices, adsk.fusion.CustomGraphicsPointTypes.UserDefinedCustomGraphicsPointType,'TestPoint.png')

    view.refresh()

 

 

Here's a demo of the problem:

https://youtu.be/hlfqLIEzDgs

0 Likes
367 Views
2 Replies
Replies (2)
Message 2 of 3

kandennti
Mentor
Mentor

Hi @mike46YZU -San.

 

I tried but could not reproduce the symptoms.
I am attaching the png file I tried here, just in case.

 

I felt that the CustomGraphicsPointSet had nothing to do with the BillBoard, but there was a property, so I added it like this, and is there any change?

・・・
    points: adsk.fusion.CustomGraphicsPointSet = graphics.addPointSet(
        coords,
        pointIndices,
        adsk.fusion.CustomGraphicsPointTypes.UserDefinedCustomGraphicsPointType,
        'TestPoint.png'
    )

    billBoard = adsk.fusion.CustomGraphicsBillBoard.create(
        adsk.core.Point3D.create(0,0,0)
    )
    billBoard.billBoardStyle = adsk.fusion.CustomGraphicsBillBoardStyles.ScreenBillBoardStyle

    points.billBoarding = billBoard

    view.refresh()

・・・
Message 3 of 3

mike46YZU
Contributor
Contributor

Ok, this is definitely a bug. Without changing anything, but after restarting Fusion 360, then retrying, the problem is gone and I cannot reproduce it anymore. If I encounter it again, I will try to find out how to reproduce and revisit this topic with more info. Thank you.

0 Likes