API Transforms
API Transforms
(OP)
SW2005, if it makes a difference....
I'm using API to create some drawings, and this (of course) involves some transformation matrices to convert between the different coordinate systems (component -> assembly -> drawing)
I've got a simple piping assembly made up of 90° elbows and pipe sections that i'm using to experiment...
when i run the "Get Transforms of Assembly Components Example" on it, i get some matrices that look really nice, and then some that involve rotation numbers like
-9.26450756388864E-17 and -6.47031582366316E-31.
obviously these really should be zeroes. is there a setting somewhere that will get it to round these numbers to, say, 12 decimal places, or something so they work properly?
or... any idea why it's coming up with these numbers in the first place?
I'm using API to create some drawings, and this (of course) involves some transformation matrices to convert between the different coordinate systems (component -> assembly -> drawing)
I've got a simple piping assembly made up of 90° elbows and pipe sections that i'm using to experiment...
when i run the "Get Transforms of Assembly Components Example" on it, i get some matrices that look really nice, and then some that involve rotation numbers like
-9.26450756388864E-17 and -6.47031582366316E-31.
obviously these really should be zeroes. is there a setting somewhere that will get it to round these numbers to, say, 12 decimal places, or something so they work properly?
or... any idea why it's coming up with these numbers in the first place?






RE: API Transforms
Ken
RE: API Transforms
RE: API Transforms
CODE
Dim MyArray(10000) As Double
Dim iCount As Integer
Dim MyRoundVal As Integer
Sub main()
'Fill array
MyArray(0) = 1 * 10 ^ (-16)
Debug.Print MyArray(0)
For iCount = 1 To UBound(MyArray)
MyArray(iCount) = MyArray(iCount - 1) + MyArray(0)
' Debug.Print MyArray(iCount)
Next iCount
'Round array values
MyRoundVal = 8
For iCount = 0 To UBound(MyArray)
MyArray(iCount) = Round(MyArray(iCount), MyRoundVal)
' Debug.Print MyArray(iCount)
Next iCount
End Sub