Axis directions in DC


#1

how can I check that axis in DC are in the same directions as axis in model?


#2

You can double click the component to edit it and will see the internal axis.


#3

Yes, I know. But I have to check it in Ruby script…


#4

Sorry, didn’t recognize the category :smirk:


#5

You can compare each of the DC axes vectors to the model axes vectors.

There are 3 constants which you can use for the model axes: X_AXIS, Y_AXIS and Z_AXIS

So if you have a reference to a DC instance using the variable dc_ref

if dc_ref.transformation.zaxis == Z_AXIS && dc_ref.transformation.xaxis == X_AXIS
    # axes are oriented the same
end