Skip to content

Commit

Permalink
Fix transform temp (#434)
Browse files Browse the repository at this point in the history
* Update SDK to 205

* Use NotNull

* fmt

* Temporary ITransformable fix for Revit
  • Loading branch information
adamhathcock authored Dec 3, 2024
1 parent 48096fb commit 1ba3f89
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,16 @@ localToGlobalMap.AtomicObject is ITransformable transformable // and ICurve
&& localToGlobalMap.AtomicObject["units"] is string units
)
{
var id = localToGlobalMap.AtomicObject.id;
ITransformable? newTransformable = null;
foreach (var mat in localToGlobalMap.Matrix)
{
transformable.TransformTo(new Transform() { matrix = mat, units = units }, out newTransformable);
transformable = newTransformable; // we need to keep the reference to the new object, as we're going to use it in the cache'
}

localToGlobalMap.AtomicObject = (newTransformable as Base)!;
localToGlobalMap.AtomicObject.id = id; // restore the id, as it's used in the cache'
localToGlobalMap.Matrix = new HashSet<Matrix4x4>(); // flush out the list, as we've applied the transforms already
}

Expand Down

0 comments on commit 1ba3f89

Please sign in to comment.