
 |
| 3D modeling & numerical simulation |
|
|
 |
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? |
 |
| | | |
|
 |
|