How to use Triad for for simple user-controlled Scaling
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm using the API to write an add-in that (at one point) lets the user scale a selected body.
I've been able to use the "addTriadCommandInput" with success for translation and rotation of bodies.
However, for scaling there are a few things I can't seem to get working and I don't understand:
1) When we set the triad parameters to "inputs.itemById('scale_triad').setScaleVisibility(True)", I would have expected 3 arrows in the X, Y, Z axes that a user could use to "pull" to stretch/shrink the object along those axes.
However, instead there are a bunch of controls for scaling in different planes. These get set automatically to true:
<isXScalingInXYVisible? True
isXScalingInXZVisible? True
isYScalingInXYVisible? True
isYScalingInYZVisible? True
isZScalingInXZVisible? True
isZScalingInYZVisible? True
isXYPlaneScalingVisible? True
isXZPlaneScalingVisible? True
isYZPlaneScalingVisible? True>
2) When pulling on these "planar" scaling options, they do change the values for the "xyPlaneScaleFactor", but do not change the underlying transform.
"
transform value as array: (1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0)
xScaleFactor: 1.0
yScaleFactor: 1.0
zScaleFactor: 1.0
xYPlaneScaleFactor: 1.7420363507829468
yZPlaneScaleFactor: 1.0
zXPlaneScaleFactor: 1.0"
3) Is there a way to have the user control scaling via a GUI (i.e. similar to the actual Scale Feature pulling on 3 different axes) that just changes xScale, yScale, zScale ?
4) And if so, is there a way that updates the 3DMatrix Transform (e.g. in a triad)? (If not, it's okay, I can create it directly).
Thank You,
Goutam Reddy