Unexpected results for GetModelToEarthTransform

I am getting unexpected results from EarthAnchorPoint.GetModelToEarthTransform. Regardless of the unit system being passed into the method, it is consistently returning {R0=(1,0,0,0), R1=(0,1,0,0), R2=(0,0,1,0), R3=(0,0,0,1)} I am working in Version 6 SR11 (6.11.18348.17061).

What’s odd is that this has worked without any trouble previously. Any ideas as to what may be happening?

Hi @dave_stasiuk,

Can you post a model that you’d expect his function to return a different result?

– Dale

Hi Dale- Thanks for getting back to me. It’s happening for any model we try…the basis for it is if you look at the resulting transform, regardless of the unit type supplied, it isn’t providing any scaling information:

What’s so odd about it is that identical code has worked previously. We’re converting portions of models to GeoJson to visualize data (here generally floor plans or building footprints) in apps like Power BI or Tableau.

Hi @dave_stasiuk,

The attached model contains the earth anchor location of McNeel Seattle. The (also) attached definition seems to work with this document.

Let me know what I’m confused.

earth_anchor_point.gh (9.0 KB)
earth_anchor_point.3dm (24.0 KB)

– Dale

1 Like

Ah, so I guess the key for the transform is ensuring first that EarthAnchorPoint is set first. For some reason I had thought I didn’t have to do this previously (the absolute location hasn’t always been important to us, so leaving it at a lat/lon of 0/0 was common…it’s more for the sizing of the objects to work correctly) but I must be misremembering.