Axis directions in DC


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


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


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


Sorry, didn’t recognize the category :smirk:


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