Speckle Geometry; requisites for visualizing a point

Hi there!

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.

I have tested a bit and send one Point with all my additional properties this is shown as expected (although hardly visible :P) and also one with my custom class which inherits from Point this one is not showing in the viewer.

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?

Hope to hear from you :smiley:

Cheers,

Dirk

Hey @dirksliepenbeek, I don’t think the viewer is checking for inheritance - @dimitrie to confirm!

In the meantime, can you share an example of your custom class?

Hi @teocomi , thanks for the swift reply,

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 :stuck_out_tongue: ).

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.

Hello,

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

Cheers

1 Like

Hi @dimitrie,

You meant to have a call with three of us or with @alex?

Just with @alex - we had the call, we saw the problem and it’s gonna get fixed fast - TBD, but next week we should be good :sunglasses:

1 Like

Once today’s merge fires are dying down (they’re mostly quiet), this:

will make its way in and henceafter to latest.speckle.dev. What would your ideal fix timeline be regarding a mainline release?

hi @dimitrie,

I have a work around now to demo my application to others, but before release (2-3 weeks) I would like to include the proper fix with inheritance.

2 Likes

Hi @dimitrie / @alex,

Sorry for getting back so late, but I have implemented this change and it works as expected!

3 Likes