Mirror the NWC model

Mirror the NWC model

m.shcheblykin
Contributor Contributor
538 Views
1 Reply
Message 1 of 2

Mirror the NWC model

m.shcheblykin
Contributor
Contributor

Hello dear professional,

I am looking for the way how to mirror NWC appended files with navis API.

So far I reached the point it can be done with the scale section of permanent transformation : 

3 fields represent 3 axis (XYZ)

mshcheblykin_1-1664302310747.png

if value x is set to -1,  the desired result is achieved:

mshcheblykin_4-1664303134528.png

 

I also found that such transformation can be achieved with

Transform3D(Matrix3, Vector3D)

method which accepts a matrix:

mshcheblykin_2-1664302435948.png

I am not yet sure if it is required to check how work with matrixes but looks like it is a 3 by 3 matrix:

mshcheblykin_3-1664302715891.png

 

Could you show me a codded example how the mirroring can be achieved with navis API

 

0 Likes
Accepted solutions (1)
539 Views
1 Reply
Reply (1)
Message 2 of 2

naveen.kumar.t
Autodesk Support
Autodesk Support
Accepted solution

Hi @m.shcheblykin ,

 

Here is the code to change scale values 

//Get Scale Values
  Model model;
  Transform3D oldT3d=model.Transform;
  Transform3DComponents t3dComponents = oldT3d.Factor();
  Vector3D Vec3d=t3dComponents.Scale;

//Set scale Values
   t3dComponents.Scale = new Vector3D(scale_X_value, scale_Y_value, scale_Z_value);
   Transform3D newT3d = t3dComponents.Combine();
   models.SetModelUnitsAndTransform(model, Units.Meters, newT3d, true);

Please let me know whether this helps you to resolve the issue or not.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes