3 Replies Latest reply on Aug 12, 2016 3:49 PM by Amen Allah Jlili

# Please explain the relationships between the different coordinate Systems

It is clear that transforms are needed to "reflect" points from one coordinate system to another.  From what I can remember, when a point is selected from a part in an assembly model it needs to be transformed into the assembly model (or something like this).  I have not been able to find a concise description of the different coordinate systems and how they are related to each other.  Hopefully someone will be able to explain this.  Is there a good article available?

A related question is a description of what (not how) the transform functions do?  In theory transforms can rotate and translate points but very little information is actually needed for the transform functions.  Why is this?  Is it because it is built into the transforms to "translate" from the part models to the assembly model, or what?  If there is a need to translate in the other directions, is the answer really as simple as the inverse of the transform function?  If so, what does that look like?

Ed

• ###### Re: Please explain the relationships between the different coordinate Systems

Hi Edwin

Each environment (sketch, Drawing, Model, Assembly ) has its own coordinate system. Transformation is like a math coefficient which you can get from API and use to multiply on coordinates.

So if needed to measure the distance between two entities from the same environments then they have the the same coordinate system and transformation is not needed.

If the entities are located in assembly but belong to different components then we should get the coefficient for the first component COEFF_1 and multiply to the entity of the first component. Then get the coefficient for the second component COEFF_2 and multiply to the entity of the second component. Now these multiplied entities have the same coordinate system (the same as active assembly) and we can get the correct distance between them and also between each component and  some assembly point (like center of mass )

Hope this can help as a start

Regards

Viktor

• ###### Re: Please explain the relationships between the different coordinate Systems

Victor,

This is a great start.  It appears that when a point is selected within an Assembly model that SW returns the point from the perspective of the individual model.  So, if the points are selected between two parts within an assembly.  It makes sense that the the two points need to be "transformed" into the assembly coordinate system.  Is this correct?

One thing that confuses me is that if two points are selected on the same part within an Assembly model, and a line is to be drawin between the two selected points, the two points need to be transformed if a proper line is to be drawn between them, even though they are on the same model.  What this implies is that when placing point (and lines) into an Assembly model they will be placed within Assembly coordinate system.  So, even though two points are selected within the same model part, and relative to each other they are correct, when they are "drawn" they must be translated to the assembly coordinate system.  Is this correct?

If this is all correct, it is not clear why SW would not just automatically provide Assembly coordinate points when working within an Assembly model?  Any ideas why SW didn't do this?

• ###### Re: Please explain the relationships between the different coordinate Systems

If you take a random point, it surely belongs to a sketch. If the sketch is from a part, then the default coordinates are with regards to the part's coordinate system.  So it depends on the perspective. To compute the transformation, simply express it in the matrix form. SolidWorks' coordinate system are cartesian(x, y, and z) so the transform matrix is rather not difficult to understand.  Actually SolidWorks has an interface for handling matrix data.

Take a look at this:

SolidWorks resource:
2015 SOLIDWORKS API Help - IMathTransform Interface Members