Problem with IMeshTopol.AddSimplex()
Posted: Thu Dec 07, 2017 8:48 pm
Hi
I have an application, which used to work with v4.4. It does not work with 5.1
Here is a code extract:
It actually crashes on the iMeshTopol.AddSimplex(..) line. Instead of 85 it used to be 0.0, after reading your help document I changed it to 85 but it made no difference.
I hint would be appreciated
Thank you
Ibi
I have an application, which used to work with v4.4. It does not work with 5.1
Here is a code extract:
Code: Select all
Dim generator As KernCADnet.DIObjGenerator = New KernCADnet.DIObjGenerator
Dim iMeshObject As ISection = generator.Create(EObjectType.eObjTypeMeshSection)
Dim i As Integer
Dim iMeshTopol As IMeshTopol = iMeshObject
For i = 0 To totalNodes - 1
iMeshTopol.AddVertex()
Next
Dim iMesh As IMesh = iMeshObject
Dim IVertexIterator As IIterator = iMesh.GetVertexIterator
Dim iMeshMods As IMeshMods = iMeshObject
Dim posVtx(1000), posVertex As Integer
posVertex = IVertexIterator.GetHeadPosition
posVtx(0) = posVertex
iMeshMods.SetVertexCoord(posVertex, points(0, 1), points(0, 2), points(0, 3))
' vertex 0 is set now continue with 1,2,3 etc.
For i = 1 To totalNodes - 1
IVertexIterator.GetNext(posVertex)
posVtx(i) = posVertex
iMeshMods.SetVertexCoord(posVertex, points(i, 1), points(i, 2), points(i, 3))
Next i
For i = 1 To totalElements
iMeshTopol.AddSimplex(posVtx(triangleNodes(i, 1)), posVtx(triangleNodes(i, 2)), posVtx(triangleNodes(i, 3)), 85.0)
Next
I hint would be appreciated
Thank you
Ibi