activizdotnet
activizdotnet copied to clipboard
Calling vtkParametricFunction from kitware.VTK
Hi All,
I need to draw a nurb curve using vtkParametricFunction in c#
I created new class for draw a nurb curve by inheriting vtkParametricFunction .
Initially create the constructor I am facing issues mentioned below ::
i)An unhandled exception of type 'System.AccessViolationException' occurred in modeling.dll Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Code below :
public wrapperparametricfunction() : base(IntPtr.Zero, false, false) { uint mteStatus = 0; uint maxValue = uint.MaxValue; uint rawRefCount = 0;
// error occured in below function in c# IntPtr rawCppThis = vtkParametricFunction_NewInstance_26(CppThis, ref mteStatus, ref maxValue, ref rawRefCount); base.SetCppThis(rawCppThis, true, (mteStatus != 0) && (rawRefCount >= 2)); }
Please do the needful to proceed further. Thanks in advance