Congratulations this interesting software!
i'm working on linux, and in my project i need to work with java and use opencascade for 3D visualization of data so i m interested in occ java and i would like to know if it is possible to learn more about how to use it and where i can find occjava.jar and also if it gives the possibility to use all opencascade's fonctionalities
> if it is possible to learn more about how to use it
> where i can find occjava.jar
Build it from sources (http://jcae.sourceforge.net/developpers.html) or take it from the last jCAE archive in the directory jcae/modules/ext. You also need the OccJava.dll file which is in jcae/modules/lib.
> if it gives the possibility to use all opencascade's fonctionalities
oops I meant libOccJava.so (you work on linux), not OccJava.dll.
thanks for replying ,
i would like to know if it is possible to use occjava independently from jcae.
the fact is that i didn t start using opencascade, so i don t really know which functions i will need .so my question is how difficult would it be to get the needed functions "covered" by occjava.
> I would like to know if it is possible to use occjava independently from jcae.
Yes occjava can be used independently.
> the fact is that i didn t start using opencascade, so i don t
> really know which functions i will need .so my question is how
> difficult would it be to get the needed functions "covered" by
Without additionnal informations I cannot be more precise than that:
i tryed the exemples given for occjava with eclipse on linux.i did add the occjava.jar and the LD_LIBRARY_PATH and i have problems when compiling dimention.java and curvature.java it 's like this
Exception in thread "main" java.lang.Error: Unresolved compilation
The method surfaceProperties(TopoDS_Shape, GProp_GProps) is
undefined for the type BRepGProp
The method volumeProperties(TopoDS_Shape, GProp_GProps) is
for the type BRepGProp
and i would like to know what shall i do to have visual results for the ones that compiled correctly (using eclipse).
help me please!!
The examples are link to the head of the subversion repository. They may not work with older versions of occjava. The methods used by this example were add on Wed May 2:
jCAE 0.14.1 was release on April 26 so the occjava bundled with it cannot run this example. If you want to do so you will need to build the lasted revision of occjava from source.
Visualisation require a dependency on the viewer3d module. As I want to keep occjava independent I removed or commented visualisation code from tests. In this example it's only commented, so easy to re-enable:
You will need to add jcae-viewer3d.jar to your Eclipse project and Java3d to your VM to be able to display geometries.
An other way could be saving the shape (BRepTools.write) and open it in jCAE.
i'm sorry for asking so much questions but i have to decide quickly which software i should use for the project .
i have two more questions :
1) is it possible (or easy) to interface occjava with swing ?
2) the data i should visualize is in the form of XML files so is it going to be difficult to adapt it to be possible to display it using occjava (or jcae viewer3D)
thanks for your help
> i'm sorry for asking so much questions but i have to decide quickly which software i should use for the project .
> is it possible (or easy) to interface occjava with swing ?
occjava only manage/create geometrical data. It does not provide any service to display them. The visualisation is provided by the Viewer3d module. The Viewer3d (based Java3d) module was created to be interfaced with Swing. All the screenshots form the website are GUI create with Swing (or Netbeans which is also Swing based).
> the data i should visualize is in the form of XML files so is it going to be difficult to adapt it to be possible to display it using occjava (or jcae viewer3D)
Opencascade nativelly load BRep, IGES and STEP.
If your XML file contains geometry data (i.e. Nurbs and other primitives) you will have to build the matching opencascade structure. If your XML format is rich it may be huge work. You will also have to add many method to occjava as many will lack (nobody used occjava to do such think before).
If your XML file contains triangulation, don't use occjava, use only viewer3d (http://jcae.sourceforge.net/viewer3d.html). You may also use directly Java3d, or even VTK.
one of the most important criteria i should check is the rapidity and the number of volumes that viewer3D can display at the same time so that i verify if it can be integrated in the project i'm working in.
so do you have any idea about (even approximatively) on the scale of data that could be treated at the same time -- the volumes to be displayed are elementary space volumes: some vertex points and two planes Which aren't necessarily horizontal --
i hope i'm not Disturbing you with my questions.
thanks for your help anyway
I do not understand what are your elementary volumes. For me it could be for example, tethraedrons (4 planes, 4 points) or hexadrons (6 planes, 6 points), but what I do not undestand what could be define with "two planes".
A viewer3d API exists for volume rendering but there is no implementation. So if you want to display tetraedrons or hexa with viewer3d you will have to either:
- convert them to triangles or quads
- implement the viewer3d API for volume rendering
For static 3D scenes, the performance (Frame rate) do not depends on the library but on the hardware so viewer3d (java3d) has the same performance as OpenGL. For changing scenes (adding or removing triangles), I don't know, as I don't need it. The number of triangles which can be displayed with an acceptable frame rate on my graphic card (Quadro FX 330) is 1 million.
thanks a lot for your help
the elementary volumes are cylindric (approximatively) and the two planes are the top and the bottom of the cylindr.
sorry for asking so much questions but it's for my training at thalesatm and they are asking me to study and choose a software for their project and give a document where i explain if the product Corresponds to the criteria of selection to be integrated to the project.
is the viewer3d or occjava (or both) relly dependent of netbeans (is it possible to use it independently from netbeans)?
is it difficult to change the GUI of the viewer3d to adapt it the needed features for the project?
under which type of licence is it distributed.
thanks a lot for the information.
> sorry for asking so much questions
Again, no problems
> is the viewer3d or occjava (or both) relly dependent of netbeans (is it possible to use it independently from netbeans)?
Both are totally independent.
> is it difficult to change the GUI of the viewer3d to adapt it the needed features for the project?
There is no GUI in viewer3d. It only looks like a black rectangle where you display 3D objects. All other GUI features (navigation buttons) you see on the screenshots are part of the jcae-netbeans module. viewer3d provide navigation features but you will have to call them from your own GUI.
> under which type of licence is it distributed.
in the package BRepTools i think i'm going to need BRepTools::OuterWire in my algorithms, and when i looked for it in occjava's documentation i didn't find it so would you please give me the steps to add this function to occjava.
I've just wrote a small howto: http://jcae.sourceforge.net/occjava.html#Extending
thanks a lot!!!!
This is a bit offtopic but I would like to ask something related to OccJava, does it provide access to the modeling algorithms in OpenCascade under the Geometry utility section ? i.e. http://www.opencascade.org/occ/overview/compocc7/
If not, how hard or is it possible at all to use swig to do provide the java interface to it ?
Some modeling algorithms are availables, Fillet and Chamfer, Solid Primitives and boolean operation, some geometric tools, sewing ...
It's possible to add the missing ones. Telling you if it's hard is difficult but you may have look at this: