Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Usage issues / Problem porting TKNis to OCCT 6.5.3

Problem porting TKNis to OCCT 6.5.3

Problem porting TKNis to OCCT 6.5.3
carlos 2012/08/12 17:58
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
 
 
Latest news
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map