Skip to main content
6-Contributor
Dec 16, 2021 8:51 AM UTC
Question

How to get local coordinate system of the sketching plane

Hello,

I have a sketching plane and i want Its local coordinate system needed for creating  section  where i need to pass tranf[4][3]  in ProXsceOffsetCreate(Prosolid,ProName,double tranf[4][3],Pro2dLinedef*,ProXsecOffsetSide,int flip,ProXsecExcludeModels,ProAsmpath,ProXsec*).

If any one have solution of it please help. 

1 reply

FV_01
Dec 23, 2021 5:17 PM UTC

get a component transformation matrix

get the parent datum plane or planar surface's ProGeomitem

get geomitem data with ProGeomitemdataGet(...)

get plane.e1, plane.e2, plane.e3 and plane.origin

transform e1, e2, e3 vectors and origin to assembly coordinates. normalize e1,e2,e3 - transformation might apply inch/metric scaling factor.

build transformation matrix from transformed vectors and origin with ProMatrixInit(...)

copy three elements of each four rows of the resulting matrix into 12-member array of doubles: d[0][0] = m[0][0] ... d[0][2] = m[0][2] and so on... This just gets rid of 0,0,0,1 fourth column of the transformation matrix. 

 

HIH

Translate