I am trying to send some data with the specklepy to the server. The goal is to send the data to the server with my custom {{App}}Speckle classes.
One of the classes is inheriting from the (Speckle) Point to allow for sending the geometry to the server, however, it seems like inheriting from the point is not the correct way to be able to also view the data on the server.
This all leads to the question; How to make sure the point is correctly visualized when sending the data with my custom class? Or shouldn’t this be done? What are the requisites for visualizing a point?
I create these models on runtime based on some django models with an x y z values (like the Speckle ones). This would be the most stripped down version of it:
from specklepy.objects.geometry import Point
class SpeckleMooringPoint(Point):
pass
In reality I add some extra data to it, but the simplest form works not as expected. But if the viewer is not checking for inheritance it explains it (and it works as expected ).
I found a workaround to still visualize these points, and that’s by attaching the Point in this object. Would say this is not ideal as you could then change the coordinates on two locations; the initial x y z belonging to this SpeckleMooringPoint and also the attached Point.
Also happy to hear another option than inheriting from the point, this just seemed most logical to me.
Heya @dirksliepenbeek, I’ll poke @alex to investigate this one. Matteo might be totally right here - we’re probably not checking for inherited types in the viewer conversion routines. Could be a totally easy fix.
Notes for Alex (sorry I abandoned you this week!):
This point does not show up. Its actual type is Objects.Geometry.Point:Objects.Rhdhv.Moor.SpeckleMooringPoint. Are we checking in the conversion routines for this? If not, we can get on a call next week and we can figure out a fast fix together.
No, we are not checking for inheritance in the speckle type. That’s why the point is getting ignored. Sure, let’s do a call next week and we’ll figure it out