What's the difference between an element range and a basis range?
DisplayHandler::GetBasisRange() Returns false (and the standard element range) if no basis range/transform is available.
In my experience, the method returns true and sets the range to zero. mdlElement_extractRange() continues to behave as one would expect.
There's also DisplayHandler::SetBasisRange(). I don't understand what that function does.
The Get/Set BasisRange and BasisTransform methods provide a convenient means to store/persist a "basis/home" element range/transform via XAttributes. If no "basis" is present the range/transform returned will be that directly obtained from the current ElementHandle range/transform.
Please let me know if this helps, if so I will ensure we add to the documentation.HTH,Bob
[20200224-RH: Please see the Get/Set Basis Range/Transform topic to provide some background information on the Basis methods.]
Robert Hook said: store/persist a "basis/home" element range/transform
OK, but why? What functionality does that enable?
Robert Hook said: If no "basis" is present the range/transform returned will be that directly obtained from the current ElementHandle range/transform
Regards, Jon Summers LA Solutions
I'd still like to know what a basis range is.
The idea was to allow elements (i.e. extended elements created by applications) to store/return an element aligned vs. axis aligned box that fits their geometry. Similar to the range diagonal for cells/shared cells. A basis range would typically be centered around 0, the basis transform denotes the local to world transform.
In practice I haven't found it "generally" useful as it wasn't required to be implemented, meaning you need a fallback for dealing with elements that don't store/return a valid basis range anyway. So, it mostly ends up being useful to applications when dealing with their own elements.
Answer Verified By: Jon Summers