For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Problem porting TKNis to OCCT 6.5.3

carlos's picture
Forums: 

I'm trying to port my code to OCCT 6.5.3 and I have the following issue:

In 6.5.2 I use this code to create a line using TKNis.

Handle(NCollection_BaseAllocator) theAlloc;
Handle_NIS_Triangulated miNIS=new NIS_Triangulated(10,Standard_False,theAlloc);
int nodo;

miNIS->SetLinePrs(2,Standard_False,2);
nodo=0;
gp_XYZ Coord0(x1, y1, z1);
miNIS->SetNode(nodo, Coord0);
nodo=1;
gp_XYZ Coord1(x2, y2, z2);
miNIS->SetNode(nodo, Coord1);
miNIS->SetLineNode(0,0);
miNIS->SetLineNode(1,1);

myNISContext->Display(miNIS,Standard_False);

When I try to compile with 6.5.3 two errors appears:

1>OCCViewer.cpp(912): error C2248: 'NIS_Triangulated::operator new' : cannot access protected member declared in class 'NIS_Triangulated'
1> C:\OpenCASCADE653_source\inc\NIS_Triangulated.hxx(482) : see declaration of 'NIS_Triangulated::operator new'
1> C:\OpenCASCADE653_source\inc\NIS_Triangulated.hxx(56) : see declaration of 'NIS_Triangulated'
1>OCCViewer.cpp(912): error C2248: 'NIS_Triangulated::operator delete' : cannot access protected member declared in class 'NIS_Triangulated'
1> C:\OpenCASCADE653_source\inc\NIS_Triangulated.hxx(482) : see declaration of 'NIS_Triangulated::operator delete'
1> C:\OpenCASCADE653_source\inc\NIS_Triangulated.hxx(56) : see declaration of 'NIS_Triangulated'

I have been checking the Release notes for this new version and I know that TKNis have some changes but I can not figure how to port the
previous code.

Could you please tell me how to create a line using NIS.

Best regards,

Carlos