poliastro / czml3

Python 3 library to write CZML
https://pypi.org/project/czml3/
MIT License
37 stars 30 forks source link

Drawing arrows does not seem to work properly #100

Closed mstill3 closed 2 years ago

mstill3 commented 2 years ago

I may be trying to accomplish this improperly:

 Packet(
            id="Arrow/Arrow-" + str(uuid.uuid4()),
            name="Arrow",
            polyline=Polyline(
                positions=positions,
                material=PolylineArrowMaterial(color=Color(rgba=[200, 100, 30, 255])),
                arcType="NONE",
                width=width
            )
        )

image

astrojuanlu commented 2 years ago

Hi @mstill3 ! I think this should be the correct way:

Polyline(
    material=PolylineMaterial(
        polylineArrow=PolylineArrowMaterial(
            color=Color(rgba=[200, 100, 30, 255])
        )
    )
)

however, it looks like PolylineMaterial does not support polylineArrow:

https://github.com/poliastro/czml3/blob/ab7d7eb7d8d7b97c088cca818d5fc989f02e19c6/src/czml3/properties.py#L75-L84

(I am extremely confused because I suggested this same snippet to @mhaberler in https://github.com/poliastro/czml3/pull/80#issuecomment-745632263 one year ago and I don't understand how did we make it work, because I didn't find anywhere in the git history the polylineArrow property 😳)

Would you like to send a pull request?

astrojuanlu commented 2 years ago

I understand that this is fixed by #103, let me know otherwise! Can you paste a fragment of working code with a screenshot for proof?

mstill3 commented 2 years ago

Here you go outline1 arrow1 dash1 glow1 :

astrojuanlu commented 2 years ago

Awesome, thanks! Closing