The model I have is almost 4MB large. When saving this model, I ask to set the mouse pointer to a HourGlass, but it does not respond for some reason. Any idea ? Would be nice since saving takes quite a bit of time for such a large model.
I also extended my rotation and zooming routines to the KernelCad control. Problem is each time I make a rotation, it seems that a copy of the model is made, and memory consumption increases and increases and increases until full. Then I have to stop he app and restart. This happens even with only 1 tooth displayed.
My rotation function appears below.
Code: Select all
Sub RotateAxKCad(ByRef IDesWin As Int32, _
ByVal RotX As Double, _
ByVal RotY As Double, _
ByVal RotZ As Double)
With ChildWindow(IDesWin)
Dim Ii As Int32
Dim IAxis As Int32 = -1
Dim RotAngl As Double = 0#
Dim iKCModel As KernCADnet.IModel = .m_iModel2
Dim NumSect As Int32 = iKCModel.GetSectionCount()
Dim iKCSect As KernCADnet.ISection
Dim iKCFrm As KernCADnet.IFrame
Dim LView2 As KernCADnet.IView2
' Detect which axis
If RotX <> 0 Then
IAxis = 0
RotAngl = RotX '/ Degr
ElseIf RotY <> 0 Then
IAxis = 1
RotAngl = RotY '/ Degr
ElseIf RotZ <> 0 Then
IAxis = 2
RotAngl = RotZ '/ Degr
Else
Return
End If
' Rotate all sections
For Ii = 0 To NumSect - 1
iKCSect = iKCModel.GetSection(Ii)
iKCFrm = iKCSect
iKCFrm.RotateStd(RotAngl, IAxis)
Next
' Recenter display
LView2 = .AxKCad.GetView()
LView2.ResetEx(KernCADnet.EViewReset.eViewResetAll)
' Update display
.AxKCad.UpdateSurface()
DoEvent()
End With
End Sub
Thanks
Warren