Coordinate system for objects

Technical discussions
Post Reply
CG_
Posts: 6
Joined: Fri Mar 03, 2017 12:25 am

Coordinate system for objects

Post by CG_ »

Hi
Another question: Objects in my old software have their own coordinate systems, at specified locations and angles in the general coordinate system. How do I impose this when I create a model ?
Thank you

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: Coordinate system for objects

Post by nickz »

Hello GC_

Every KC section has its own Local axes (frame). It is accessible via IFrame* interfaces queried from the relevant ISection. Axes are defined by its location and direction of the three vectors of axes

By default local frame coincides with the global frame

When you define geometry of your object (coordinates of vertices in your case) the coordinates are assumed to be relative to the local axes. So to move the object in space you just need to modify location and/or orientation of the local frame. Coordinates of vertices remain the same

So to copy your implementation to a KC section you define coordinates the same way as your app did before without any change and set location and axes as required. There are different methods in IFrame* (IFrame3 I believe is good one which does everything), which define a frame. Mostly you need to set the first vector exactly, second vector will be made perpendicular to the first and then you Call one of the Init() functions to define the third

Nick

Post Reply