Resetting Transforms
Posted: Tue Jul 18, 2017 2:42 am
Good day,
Sorry - some more questions ;-((
When I create the sections in the model, for each section I create the Vertices with coordinates in the ref. frame tied to either the Pinion or Gear.
These then have to be located in the General ref. frame: Rotation of the Pitch angle and translation of the origin of the Pinion or Gear ref. frame in the General ref. frame.
I use I3DObj for this as follows:
where Angl2 is the Pitch cone angle, Dist1, Dist2 and Dist3 are the coordinates of the origin of the Pinion ref. frame in the General ref. frame.
All this is fine the 1st time I use it.
Now let's say that I make a modification to the pinion geometry and I have to recreate the complete Model because the coordinates have changed.
I first delete all that is related to the Model, as follows:
Then, I simply go through the same steps to re-create the model, but somehow, the Transforms have not been reset and now the Pinion appears in an impossible location.
Question: How can I reset the transforms after applying them ?
Thanks, Claude
Sorry - some more questions ;-((
When I create the sections in the model, for each section I create the Vertices with coordinates in the ref. frame tied to either the Pinion or Gear.
These then have to be located in the General ref. frame: Rotation of the Pitch angle and translation of the origin of the Pinion or Gear ref. frame in the General ref. frame.
I use I3DObj for this as follows:
Code: Select all
' Move it
'
Dim i3DObj As I3DObject = iSection
i3DObj.Rotate(Angl2, 0, 0, 0, 0, 1, 0)
i3DObj.Translate(Dist1, Dist2, Dist3)
All this is fine the 1st time I use it.
Now let's say that I make a modification to the pinion geometry and I have to recreate the complete Model because the coordinates have changed.
I first delete all that is related to the Model, as follows:
Code: Select all
Dim iModel2 As IModel2
Dim iArray As IArray
' Primary Model
'
iModel2 = AxKeyCad.GetModel()
iArray = DirectCast(iModel2, IArray)
If Not iArray Is Nothing Then
iArray.RemoveAll()
End If
If Not iModel2 Is Nothing Then
iModel2.RemoveAll()
End If
Question: How can I reset the transforms after applying them ?
Thanks, Claude