Transform face coordinates to assembly(global) coordinates

Hello,

I have an assembly with some parts.
I select a Face and try to get the Face normal and a point on theface in assembly coordinates.

Dim swSelMgr As ISelectionMgr = Nothing
Dim MathUtil As IMathUtility = Nothing
Dim myface As IFace2
Dim facecmp As IComponent2
Dim facefeat As IFeature = Nothing
Dim vecarr As Object = Nothing

Dim transface As IMathTransform = Nothing
Dim mathFaceNormalVec As IMathVector = Nothing
Dim Dfacenormalvec As Double()
Dim mathPntonface As IMathPoint = Nothing
Dim Dpntonface As Double()


swSelMgr = MyOwnClass.getRootModelDoc().SelectionManager
MathUtil = MyOwnClass.SWApplicationObj.GetMathUtility()
facefeat = myface.GetFeature()
facefeat.Select2(False, -1)
facecmp = swSelMgr.GetSelectedObjectsComponent3(1, -1)

Dfacenormalvec = myface.Normal
transface = facecmp.Transform2
mathFaceNormalVec = MathUtil.CreateVector(Dfacenormalvec)
mathFaceNormalVec = mathFaceNormalVec.MultiplyTransform(transface)
vecarr = mathFaceNormalVec.ArrayData
' Get any point on face
Dpntonface = myface.GetClosestPointOn(0.0, 0.0, 0.0)
mathPntonface = MathUtil.CreatePoint(Dpntonface)
mathPntonface = mathPntonface.MultiplyTransform(transface)
Dpntonface = mathPntonface.ArrayData


The point that I recieve lies on a parallel plane which containsthe origin of my part and not on the selected plane.
I think my error is, that I have not transformed the facecoordinates
to part coordinates. I don´t know how to get thetransformation matrix for the face. Any idea ?


Thanks in advance,

Matthias SenffSolidworksApi macros