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 / Intersection of TopoDS_Shape in Java #JCAE

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
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

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