ifc and 3dmatrix rotation on 2d points

Started by
3 comments, last by giugio 12 years, 3 months ago
hello.
I'm creating a ifc importer and i read a 3d transform matrix that must be multiplied for some 2d points (a section) in x and y
the matrix show a 45 degree rotation, but this matrix is a 3d matrix and not a 2d matrix.
the values are:
row0(x): 0.0/-0.707/0.707
row2(z): 1.0/0.0/0.0

row1(calculated with cross product of the two precedent axis):
row1(Y): 0.0/-0.707/-0.707

my problem is that the trasformation is applied to some 2d points and the point's are translated from x/y to y/z. Is possible?
Or there is an error?
I don't find in the ifc specifics trace of this type(from x/y to y/z).
I ask .
thanks.
Advertisement
Are you sure you created rotation matrix for correct axis? If you want to transform points on 2D plane (XY) then you need to create matrix for Z axis.

Are you sure you created rotation matrix for correct axis? If you want to transform points on 2D plane (XY) then you need to create matrix for Z axis.

thanks Ripiz.
this is the specific of the IfcAxis2Placement3D
http://buildingsmart.../html/index.htm
see the IfcAxis2Placement3D after select alphabetical listing.

from this i create a 3x3 rotation matrix, in my project the up axis is the z.

i have also the extrude direction vector , that is the axis around i must do the rotation , but how i can assemble all for create a correct 2d rotation matrix
see :IfcExtrudedAreaSolid

Can you write me an example of a 3d rotation matrix for a 2d rotation?
How i must trasform a 3x3 rotation matrix for obtain a 2d rotation matrix on xy ?
thanks.

Are you sure you created rotation matrix for correct axis? If you want to transform points on 2D plane (XY) then you need to create matrix for Z axis.

thanks Ripitz , in fact i need to do a 2d trasformation on 2d plane(XY) and i must create a matrix for the z axis.

Is a 3d importer for ifc format.

How i can create a matrix for the z axis from this matrix? and in general from any input matrix?

row0(x): 0.0/-0.707/0.707
row2(z): 1.0/0.0/0.0
row1(Y): 0.0/-0.707/-0.707

or is already a z axis rotation matrix?

in this case , i must swap all profile points , that are in the format x,y, 0.(the z component is not considered)
rather, the points of the profile are in format number1;number2, but i don't know if the number1 is the x or the y or the z.

is wrong to multiply all points of the profile of the beam for the generated z axis matrix?

or is better take an angle from the versor and then use it for rotate all points?

thanks.
i understand the problem:
I have a block in my code that return an array of x and y coords for a section manager.
The problem is that if i have the direction of the beam(a line) in the z coord i must take the y and z coords if i have a beam direction of x ,the x and the z(i suppose and this is the second question) ecc... .
The chose of the x,y or z coord to put in the x/ y array depends on the direction of the beam.

How i can calculate what are the source coord to put in the x/y array?
and that depends of the direction of the beam?
for the direction , no problem i have the start point of the beam and the end point .
but i don't know how choose the coords to send to the sectionmanager that creates the rotated section.

thanks.

This topic is closed to new replies.

Advertisement