' COPYRIGHT DASSAULT SYSTEMES 2001
Option Explicit
' ***********************************************************************
' Purpose : Copy and paste products while keeping their absolute position.
' Assumptions : Products to copy/paste have to be selected.
' Author :
' Languages : VBScript
' Locales : English
' CATIA Level : V5R7
' ***********************************************************************
' ***********************************************************************
'
' Purpose: Define the product of two matrix.
'
' Inputs : matrix1 Array array corresponding to the first matrix
' matrix2 Array array corresponding to the second matrix
'
' Outputs: res Array array corresponding to the product
'
' ***********************************************************************
Sub MatrixProduct ( ByVal matrix1, ByVal matrix2, ByRef res )
Dim a(11)
Dim b(11)
Dim I As Integer
For I = 0 to 11
a(I) = matrix1(I)
b(I) = matrix2(I)
Next
res( 0) = a(0)*b(0) + a(1)*b(3) + a(2)*b(6)
res( 3) = a(3)*b(0) + a(4)*b(3) + a(5)*b(6)
res( 6) = a(6)*b(0) + a(7)*b(3) + a(8)*b(6)
res( 1) = a(0)*b(1) + a(1)*b(4) + a(2)*b(7)
res( 4) = a(3)*b(1) + a(4)*b(4) + a(5)*b(7)
res( 7) = a(6)*b(1) + a(7)*b(4) + a(8)*b(7)
res( 2) = a(0)*b(2) + a(1)*b(5) + a(2)*b(8)
res( 5) = a(3)*b(2) + a(4)*b(5) + a(5)*b(8)
res( 8) = a(6)*b(2) + a(7)*b(5) + a(8)*b(8)
res( 9) = a( 9)*b(0) + a(10)*b(3) + a(11)*b(6) + b( 9)
res(10) = a( 9)*b(1) + a(10)*b(4) + a(11)*b(7) + b(10)
res(11) = a( 9)*b(2) + a(10)*b(5) + a(11)*b(8) + b(11)
End Sub
' ***********************************************************************
'
' Purpose: Define the inverse of a position matrix.
'
' Inputs : matrix Array array corresponding to the matrix
'
' Outputs: inverse Array array corresponding to the inverse of the matrix
'
' ***********************************************************************
Sub MatrixInverse ( ByVal matrix, ByRef inverse )
Dim a(11)
Dim I As Integer
For I = 0 to 11
a(I) = matrix(I)
Next
inverse( 0) = a(4)*a(8) - a(7)*a(5)
inverse( 1) = a(2)*a(7) - a(8)*a(1)
inverse( 2) = a(1)*a(5) - a(4)*a(2)
inverse( 3) = a(5)*a(6) - a(8)*a(3)
inverse( 4) = a(0)*a(8) - a(6)*a(2)
inverse( 5) = a(2)*a(3) - a(5)*a(0)
inverse( 6) = a(3)*a(7) - a(6)*a(4)
inverse( 7) = a(1)*a(6) - a(7)*a(0)
inverse( 8) = a(0)*a(4) - a(1)*a(3)
inverse( 9) = -(a( 9)*inverse(0)+a(10)*inverse(3)+a(11)*inverse(6))
inverse(10) = -(a( 9)*inverse(1)+a(10)*inverse(4)+a(11)*inverse(7))
inverse(11) = -(a( 9)*inverse(2)+a(10)*inverse(5)+a(11)*inverse(8))
End Sub
' ***********************************************************************
'
' Purpose: Print the content of a matrix.
'
' Inputs : sName String name of the matrix
' matrix Array array corresponding to the matrix
'
' ***********************************************************************
Sub MatrixPrint ( ByVal sName, ByVal matrix )
Dim a(11)
Dim I As Integer
For I = 0 to 11
If ((matrix(I) < 0.001) AND (matrix(I) > -0.001)) Then
a武汉格发信息技术有限公司,格发许可优化管理系统可以帮你评估贵公司软件许可的真实需求,再低成本合规性管理软件许可,帮助贵司提高软件投资回报率,为软件采购、使用提供科学决策依据。支持的软件有: CAD,CAE,PDM,PLM,Catia,Ugnx, AutoCAD, Pro/E, Solidworks ,Hyperworks, Protel,CAXA,OpenWorks LandMark,MATLAB,Enovia,Winchill,TeamCenter,MathCAD,Ansys, Abaqus,ls-dyna, Fluent, MSC,Bentley,License,UG,ug,catia,Dassault Systèmes,AutoDesk,Altair,autocad,PTC,SolidWorks,Ansys,Siemens PLM Software,Paradigm,Mathworks,Borland,AVEVA,ESRI,hP,Solibri,Progman,Leica,Cadence,IBM,SIMULIA,Citrix,Sybase,Schlumberger,MSC Products...