I am using the function UF_MODL_create_uniform_scale to scale the object but it changes position. Any idea how to avoid this? I try to use move_feature to bring the object back to its previous position but it goes somewhere else.
Also, I tried to solve the problem by using UF_MODL_create_scale and setting a smart point as an origin of the scaling to keep the object stable, but I dont know how to use smart point. Any ideas?
Solved! Go to Solution.
The old-fashioned way is to use NXOpen.UF.UFTrns.CreateScalingMatrix. One of the inputs is an "origin" point -- this is the point that will remain fixed when the transformation is applied.
Or, if you have a SNAP license, you can use Snap.Geom.Transform.CreateScale. The SNAP Reference Guide includes thorough documentation and example code.
I have tried to use NXOpen.UF.UFTrns.CreateScalingMatrix, the object remain fixed but it doesn't scale. No change happens at all. Trying to figure out why. Thanks anyway
Probably no scaling happens because the object is associative, so its geometry is dictated by its parents. You could try a "copy" transformation, instead of a "move". Then delete the original if you no longer need it.