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

Search the Forums
See All Topics
 

Intersection of TopoDS_Shape in Java #JCAE

Intersection of TopoDS_Shape in Java #JCAE
Deepak Agrawal 2012/10/16 05:30
I am trying to get intersection of two shapes and then view the resulting shape. A part of my code is as below...

BRepAlgoAPI_Section Shape =new BRepAlgoAPI_Section(p1.getShape(), q1.getShape());
TopoDS_Shape Shap1 = Shape.shape();

JFrame cadFrame=new JFrame("jcae-viewer3d-cad demo");               
cadFrame.setSize(800,600);
cadFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
final View cadView=new View(cadFrame);                         
ViewableCAD fcad=new ViewableCAD(new OCCProvider(Shap1));
cadView.add(fcad);
cadView.fitAll();
cadFrame.getContentPane().add(cadView);
cadFrame.setVisible(true);
cadView.setOriginAxisVisible(true);


But I am getting a java.lang.NullPointerException error in the first line. Can anyone please help me in figuring this out?
 
 
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