1 // Copyright (c) 2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #include <OcctJni_Viewer.hxx>
15 #include <OcctJni_MsgPrinter.hxx>
17 #include <AIS_Shape.hxx>
18 #include <Image_AlienPixMap.hxx>
19 #include <BRepTools.hxx>
20 #include <Message_Messenger.hxx>
21 #include <Message_MsgFile.hxx>
22 #include <OpenGl_GraphicDriver.hxx>
23 #include <OSD_Environment.hxx>
24 #include <OSD_Timer.hxx>
25 #include <Standard_Version.hxx>
27 #include <BRepPrimAPI_MakeBox.hxx>
29 #include <STEPControl_Reader.hxx>
30 #include <IGESControl_Reader.hxx>
31 #include <XSControl_WorkSession.hxx>
35 #include <sys/types.h>
40 //! @return true if file exists
41 static bool isFileExist (const TCollection_AsciiString& thePath)
43 struct stat64 aStatBuffer;
44 return stat64 (thePath.ToCString(), &aStatBuffer) == 0;
47 //! Cut-off the last split character from the path and everything after it.
48 static TCollection_AsciiString getParentDir (const TCollection_AsciiString& thePath)
50 TCollection_AsciiString aPath = thePath;
51 char* aSplitter = (char* )aPath.ToCString();
52 for (char* anIter = aSplitter; *anIter != '\0'; ++anIter)
60 *aSplitter = '\0'; // cut off file name or trailing folder
61 return TCollection_AsciiString (aPath.ToCString());
64 //! Set environment variable theVarName indicating location of resource
65 //! file theFile so as to correspond to actual location of this file.
67 //! The resource file is searched in directory where Test.Draw.dll is located,
68 //! and if not found - also in subdirectory ../res from there.
69 //! If file is found, environment variable is set for C subsystem.
70 //! Otherwise, environment is not changed.
72 //! If theToAddFileName is true, complete file name is set as value of the variable,
73 //! if theToAddFileName is false, only path is set.
74 Standard_Boolean setResourceEnv (const TCollection_AsciiString& theVarName,
75 const TCollection_AsciiString& theRoot,
76 const TCollection_AsciiString& theFile,
77 const Standard_Boolean theToAddFileName)
79 // use location of current assembly to figure out possible location of resource
80 TCollection_AsciiString aBaseDir = theRoot;
82 // check the same directory where binary is located
83 if (!isFileExist (aBaseDir + "/" + theFile))
85 // check subdirectory ../res
86 aBaseDir = getParentDir (aBaseDir) + "/res";
87 if (!isFileExist (aBaseDir + "/" + theFile))
89 return Standard_False;
93 // set C library environment
96 aBaseDir = aBaseDir + "/" + theFile;
99 OSD_Environment anEnv (theVarName, aBaseDir);
101 return Standard_True;
104 // =======================================================================
105 // function : OcctJni_Viewer
107 // =======================================================================
108 OcctJni_Viewer::OcctJni_Viewer()
110 // prepare necessary environment
111 TCollection_AsciiString aResRoot = "/data/data/com.opencascade.jnisample/files";
113 setResourceEnv ("CSF_TObjMessage", aResRoot + "/TObj", "TObj.msg", Standard_False);
114 setResourceEnv ("CSF_UnitsLexicon", aResRoot + "/UnitsAPI", "Lexi_Expr.dat", Standard_True);
115 setResourceEnv ("CSF_UnitsDefinition", aResRoot + "/UnitsAPI", "Units.dat", Standard_True);
116 setResourceEnv ("CSF_ShadersDirectory", aResRoot + "/Shaders", "Declarations.glsl", Standard_False);
117 setResourceEnv ("CSF_XSMessage", aResRoot + "/XSMessage", "XSTEP.us", Standard_False);
118 setResourceEnv ("CSF_SHMessage", aResRoot + "/XSMessage", "SHAPE.us", Standard_False);
119 //setResourceEnv ("CSF_PluginDefaults", "Plugin", Standard_False);
121 // make sure OCCT loads the dictionary
122 //UnitsAPI::SetLocalSystem (UnitsAPI_SI);
124 // load messages for TObj
125 Message_MsgFile::LoadFromEnv ("CSF_TObjMessage", "TObj", "msg");
128 // =======================================================================
131 // =======================================================================
132 bool OcctJni_Viewer::init()
135 int aWidth = 0, aHeight = 0;
136 EGLDisplay anEglDisplay = eglGetCurrentDisplay();
137 EGLContext anEglContext = eglGetCurrentContext();
138 EGLSurface anEglSurf = eglGetCurrentSurface (EGL_DRAW);
139 if (anEglDisplay == EGL_NO_DISPLAY
140 || anEglContext == EGL_NO_CONTEXT
141 || anEglSurf == EGL_NO_SURFACE)
143 Message::DefaultMessenger()->Send ("Error: No active EGL context!", Message_Fail);
148 eglQuerySurface (anEglDisplay, anEglSurf, EGL_WIDTH, &aWidth);
149 eglQuerySurface (anEglDisplay, anEglSurf, EGL_HEIGHT, &aHeight);
150 eglQuerySurface (anEglDisplay, anEglSurf, EGL_CONFIG_ID, &aCfgId);
151 const EGLint aConfigAttribs[] = { EGL_CONFIG_ID, aCfgId, EGL_NONE };
152 EGLint aNbConfigs = 0;
153 void* anEglConfig = NULL;
154 if (eglChooseConfig (anEglDisplay, aConfigAttribs, &anEglConfig, 1, &aNbConfigs) != EGL_TRUE)
156 Message::DefaultMessenger()->Send ("Error: EGL does not provide compatible configurations!", Message_Fail);
161 TCollection_AsciiString anEglInfo = TCollection_AsciiString()
162 + "\n EGLVersion: " + eglQueryString (anEglDisplay, EGL_VERSION)
163 + "\n EGLVendor: " + eglQueryString (anEglDisplay, EGL_VENDOR)
164 + "\n EGLClient APIs: " + eglQueryString (anEglDisplay, EGL_CLIENT_APIS)
165 + "\n GLvendor: " + (const char* )glGetString (GL_VENDOR)
166 + "\n GLdevice: " + (const char* )glGetString (GL_RENDERER)
167 + "\n GLversion: " + (const char* )glGetString (GL_VERSION) + " [GLSL: " + (const char* )glGetString (GL_SHADING_LANGUAGE_VERSION) + "]";
168 ::Message::DefaultMessenger()->Send (anEglInfo, Message_Info);
170 if (!myViewer.IsNull())
172 Handle(OpenGl_GraphicDriver) aDriver = Handle(OpenGl_GraphicDriver)::DownCast (myViewer->Driver());
173 Handle(OcctJni_Window) aWindow = Handle(OcctJni_Window)::DownCast (myView->Window());
174 if (!aDriver->InitEglContext (anEglDisplay, anEglContext, anEglConfig))
176 Message::DefaultMessenger()->Send ("Error: OpenGl_GraphicDriver can not be initialized!", Message_Fail);
181 aWindow->SetSize (aWidth, aHeight);
182 myView->SetWindow (aWindow, (Aspect_RenderingContext )anEglContext, NULL, NULL);
186 Handle(OpenGl_GraphicDriver) aDriver = new OpenGl_GraphicDriver (NULL, Standard_False);
187 aDriver->ChangeOptions().buffersNoSwap = Standard_True;
188 //aDriver->ChangeOptions().glslWarnings = Standard_True; /// for debug only!
189 if (!aDriver->InitEglContext (anEglDisplay, anEglContext, anEglConfig))
191 Message::DefaultMessenger()->Send ("Error: OpenGl_GraphicDriver can not be initialized!", Message_Fail);
197 myViewer = new V3d_Viewer (aDriver, TCollection_ExtendedString("Viewer").ToExtString(), "", 1000.0,
198 V3d_XposYnegZpos, Quantity_NOC_BLACK, V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT,
199 Standard_True, Standard_False);
200 myViewer->SetDefaultLights();
201 myViewer->SetLightOn();
203 // create AIS context
204 myContext = new AIS_InteractiveContext (myViewer);
205 //myContext->SetDisplayMode (AIS_WireFrame);
206 myContext->SetDisplayMode (AIS_Shaded);
208 Handle(OcctJni_Window) aWindow = new OcctJni_Window (aWidth, aHeight);
209 myView = myViewer->CreateView();
211 myView->SetWindow (aWindow, (Aspect_RenderingContext )anEglContext, NULL, NULL);
212 myView->TriedronDisplay (Aspect_TOTP_RIGHT_LOWER, Quantity_NOC_WHITE, 0.08, V3d_ZBUFFER);
218 // =======================================================================
219 // function : release
221 // =======================================================================
222 void OcctJni_Viewer::release()
229 // =======================================================================
232 // =======================================================================
233 void OcctJni_Viewer::resize (int theWidth,
236 if (myContext.IsNull())
238 Message::DefaultMessenger()->Send ("Resize failed - view is unavailable", Message_Fail);
242 Handle(OpenGl_GraphicDriver) aDriver = Handle(OpenGl_GraphicDriver)::DownCast (myViewer->Driver());
243 Handle(OcctJni_Window) aWindow = Handle(OcctJni_Window)::DownCast (myView->Window());
244 aWindow->SetSize (theWidth, theHeight);
245 //myView->MustBeResized(); // can be used instead of SetWindow() when EGLsurface has not been changed
247 EGLContext anEglContext = eglGetCurrentContext();
248 myView->SetWindow (aWindow, (Aspect_RenderingContext )anEglContext, NULL, NULL);
249 //saveSnapshot ("/sdcard/Download/tt.png", theWidth, theHeight);
252 // =======================================================================
253 // function : initContent
255 // =======================================================================
256 void OcctJni_Viewer::initContent()
258 myContext->RemoveAll (Standard_False);
262 if (!myShape.IsNull())
264 Handle(AIS_Shape) aShapePrs = new AIS_Shape (myShape);
265 myContext->Display (aShapePrs, Standard_False);
269 BRepPrimAPI_MakeBox aBuilder (1.0, 2.0, 3.0);
270 Handle(AIS_Shape) aShapePrs = new AIS_Shape (aBuilder.Shape());
271 myContext->Display (aShapePrs, Standard_False);
276 Message::DefaultMessenger()->Send (TCollection_AsciiString() + "Presentation computed in " + aTimer.ElapsedTime() + " seconds", Message_Info);
279 //! Load shape from IGES file
280 static TopoDS_Shape loadIGES (const TCollection_AsciiString& thePath)
283 IGESControl_Reader aReader;
284 IFSelect_ReturnStatus aReadStatus = IFSelect_RetFail;
287 aReadStatus = aReader.ReadFile (thePath.ToCString());
289 catch (Standard_Failure)
291 Message::DefaultMessenger()->Send ("Error: IGES reader, computation error", Message_Fail);
295 if (aReadStatus != IFSelect_RetDone)
297 Message::DefaultMessenger()->Send ("Error: IGES reader, bad file format", Message_Fail);
301 // now perform the translation
302 aReader.TransferRoots();
303 if (aReader.NbShapes() <= 0)
305 Handle(XSControl_WorkSession) aWorkSession = new XSControl_WorkSession();
306 aWorkSession->SelectNorm ("IGES");
307 aReader.SetWS (aWorkSession, Standard_True);
308 aReader.SetReadVisible (Standard_False);
309 aReader.TransferRoots();
311 if (aReader.NbShapes() <= 0)
313 Message::DefaultMessenger()->Send ("Error: IGES reader, no shapes has been found", Message_Fail);
316 return aReader.OneShape();
317 /*TopoDS_Shape anImportedShape = aReader.OneShape();
319 // apply sewing on the imported shape
320 BRepBuilderAPI_Sewing aTool (0.0);
321 aTool.SetNonManifoldMode (Standard_False);
322 aTool.SetFloatingEdgesMode(Standard_True);
323 aTool.Load (anImportedShape);
325 TopoDS_Shape aSewedShape = aTool.SewedShape();
327 if (aSewedShape.IsNull())
329 Message::DefaultMessenger()->Send ("Error: Sewing result is empty", Message_Fail);
332 if (aSewedShape.IsSame(anImportedShape))
334 aShape = anImportedShape;
338 // apply shape healing
339 ShapeFix_Shape aShapeFixer(aSewedShape);
340 aShapeFixer.FixSolidMode() = 1;
341 aShapeFixer.FixFreeShellMode() = 1;
342 aShapeFixer.FixFreeFaceMode() = 1;
343 aShapeFixer.FixFreeWireMode() = 0;
344 aShapeFixer.FixSameParameterMode() = 0;
345 aShapeFixer.FixVertexPositionMode() = 0;
346 aShape = aShapeFixer.Perform() ? aShapeFixer.Shape() : aSewedShape;
351 //! Load shape from STEP file
352 static TopoDS_Shape loadSTEP (const TCollection_AsciiString& thePath)
354 STEPControl_Reader aReader;
355 IFSelect_ReturnStatus aReadStatus = IFSelect_RetFail;
358 aReadStatus = aReader.ReadFile (thePath.ToCString());
360 catch (Standard_Failure)
362 Message::DefaultMessenger()->Send ("Error: STEP reader, computation error", Message_Fail);
363 return TopoDS_Shape();
366 if (aReadStatus != IFSelect_RetDone)
368 Message::DefaultMessenger()->Send ("Error: STEP reader, bad file format", Message_Fail);
369 return TopoDS_Shape();
371 else if (aReader.NbRootsForTransfer() <= 0)
373 Message::DefaultMessenger()->Send ("Error: STEP reader, shape is empty", Message_Fail);
374 return TopoDS_Shape();
377 // now perform the translation
378 aReader.TransferRoots();
379 return aReader.OneShape();
382 // =======================================================================
385 // =======================================================================
386 bool OcctJni_Viewer::open (const TCollection_AsciiString& thePath)
389 if (!myContext.IsNull())
391 myContext->RemoveAll (Standard_False);
393 if (thePath.IsEmpty())
400 TCollection_AsciiString aFormatStr;
401 const Standard_Integer aLen = thePath.Length();
403 && thePath.Value (aLen - 4) == '.')
405 aFormatStr = thePath.SubString (aLen - 3, aLen);
408 && thePath.Value (aLen - 3) == '.')
410 aFormatStr = thePath.SubString (aLen - 2, aLen);
413 && thePath.Value (aLen - 2) == '.')
415 aFormatStr = thePath.SubString (aLen - 1, aLen);
417 aFormatStr.LowerCase();
420 if (aFormatStr == "stp"
421 || aFormatStr == "step")
423 aShape = loadSTEP (thePath);
425 else if (aFormatStr == "igs"
426 || aFormatStr == "iges")
428 aShape = loadIGES (thePath);
431 // if (aFormatStr == "brep"
432 // || aFormatStr == "rle")
434 BRep_Builder aBuilder;
435 if (!BRepTools::Read (aShape, thePath.ToCString(), aBuilder))
437 Message::DefaultMessenger()->Send (TCollection_AsciiString() + "Error: file '" + thePath + "' can not be opened!", Message_Info);
446 Message::DefaultMessenger()->Send (TCollection_AsciiString() + "File '" + thePath + "' loaded in " + aTimer.ElapsedTime() + " seconds", Message_Info);
449 if (myContext.IsNull())
457 Handle(AIS_Shape) aShapePrs = new AIS_Shape (aShape);
458 myContext->Display (aShapePrs, Standard_False);
462 Message::DefaultMessenger()->Send (TCollection_AsciiString() + "Presentation computed in " + aTimer.ElapsedTime() + " seconds", Message_Info);
466 // =======================================================================
467 // function : saveSnapshot
469 // =======================================================================
470 bool OcctJni_Viewer::saveSnapshot (const TCollection_AsciiString& thePath,
474 if (myContext.IsNull()
475 || thePath.IsEmpty())
477 Message::DefaultMessenger()->Send ("Image dump failed - view is unavailable", Message_Fail);
484 myView->Window()->Size (theWidth, theHeight);
489 Message::DefaultMessenger()->Send ("Image dump failed - view is unavailable", Message_Fail);
493 Image_AlienPixMap anAlienImage;
494 if (!anAlienImage.InitTrash (Image_PixMap::ImgBGRA, theWidth, theHeight))
496 Message::DefaultMessenger()->Send (TCollection_AsciiString() + "RGBA image " + theWidth + "x" + theHeight + " allocation failed", Message_Fail);
500 // OpenGL ES does not support fetching data in BGRA format
501 // while FreeImage does not support RGBA format.
502 Image_PixMap anImage;
503 anImage.InitWrapper (Image_PixMap::ImgRGBA,
504 anAlienImage.ChangeData(),
505 anAlienImage.SizeX(),
506 anAlienImage.SizeY(),
507 anAlienImage.SizeRowBytes());
508 if (!myView->ToPixMap (anImage, theWidth, theHeight, Graphic3d_BT_RGBA))
510 Message::DefaultMessenger()->Send (TCollection_AsciiString() + "View dump to the image " + theWidth + "x" + theHeight + " failed", Message_Fail);
513 for (Standard_Size aRow = 0; aRow < anAlienImage.SizeY(); ++aRow)
515 for (Standard_Size aCol = 0; aCol < anAlienImage.SizeX(); ++aCol)
517 Image_ColorRGBA& aPixel = anAlienImage.ChangeValue<Image_ColorRGBA> (aRow, aCol);
518 std::swap (aPixel.r(), aPixel.b());
523 if (!anAlienImage.Save (thePath))
525 Message::DefaultMessenger()->Send (TCollection_AsciiString() + "Image saving to path '" + thePath + "' failed", Message_Fail);
528 Message::DefaultMessenger()->Send (TCollection_AsciiString() + "View " + theWidth + "x" + theHeight + " dumped to image '" + thePath + "'", Message_Info);
532 // =======================================================================
535 // =======================================================================
536 void OcctJni_Viewer::redraw()
546 // =======================================================================
549 // =======================================================================
550 void OcctJni_Viewer::fitAll()
560 // =======================================================================
561 // function : startRotation
563 // =======================================================================
564 void OcctJni_Viewer::startRotation (int theStartX,
572 myView->StartRotation (theStartX, theStartY, 0.45);
575 // =======================================================================
576 // function : onRotation
578 // =======================================================================
579 void OcctJni_Viewer::onRotation (int theX,
587 myView->Rotation (theX, theY);
590 // =======================================================================
591 // function : onPanning
593 // =======================================================================
594 void OcctJni_Viewer::onPanning (int theDX,
602 myView->Pan (theDX, theDY);
605 // =======================================================================
606 // function : onClick
608 // =======================================================================
609 void OcctJni_Viewer::onClick (int theX,
617 myContext->MoveTo (theX, theY, myView, Standard_False);
618 myContext->Select (Standard_True);
621 // =======================================================================
622 // function : stopAction
624 // =======================================================================
625 void OcctJni_Viewer::stopAction()
633 #define jexp extern "C" JNIEXPORT
635 jexp jlong JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppCreate (JNIEnv* theEnv,
638 return jlong(new OcctJni_Viewer());
641 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppDestroy (JNIEnv* theEnv,
645 delete (OcctJni_Viewer* )theCppPtr;
647 Handle(Message_Messenger) aMsgMgr = Message::DefaultMessenger();
648 aMsgMgr->RemovePrinters (STANDARD_TYPE (OcctJni_MsgPrinter));
651 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppRelease (JNIEnv* theEnv,
655 ((OcctJni_Viewer* )theCppPtr)->release();
658 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppInit (JNIEnv* theEnv,
662 Handle(Message_Messenger) aMsgMgr = Message::DefaultMessenger();
663 aMsgMgr->RemovePrinters (STANDARD_TYPE (OcctJni_MsgPrinter));
664 aMsgMgr->AddPrinter (new OcctJni_MsgPrinter (theEnv, theObj));
665 ((OcctJni_Viewer* )theCppPtr)->init();
668 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppResize (JNIEnv* theEnv,
674 ((OcctJni_Viewer* )theCppPtr)->resize (theWidth, theHeight);
677 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppOpen (JNIEnv* theEnv,
682 const char* aPathPtr = theEnv->GetStringUTFChars (thePath, 0);
683 const TCollection_AsciiString aPath (aPathPtr);
684 theEnv->ReleaseStringUTFChars (thePath, aPathPtr);
685 ((OcctJni_Viewer* )theCppPtr)->open (aPath);
688 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppRedraw (JNIEnv* theEnv,
692 ((OcctJni_Viewer* )theCppPtr)->redraw();
695 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppSetAxoProj (JNIEnv* theEnv,
699 ((OcctJni_Viewer* )theCppPtr)->setProj (V3d_XposYnegZpos);
702 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppSetXposProj (JNIEnv* theEnv,
706 ((OcctJni_Viewer* )theCppPtr)->setProj (V3d_Xpos);
709 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppSetYposProj (JNIEnv* theEnv,
713 ((OcctJni_Viewer* )theCppPtr)->setProj (V3d_Ypos);
716 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppSetZposProj (JNIEnv* theEnv,
720 ((OcctJni_Viewer* )theCppPtr)->setProj (V3d_Zpos);
723 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppSetXnegProj (JNIEnv* theEnv,
727 ((OcctJni_Viewer* )theCppPtr)->setProj (V3d_Xneg);
730 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppSetYnegProj (JNIEnv* theEnv,
734 ((OcctJni_Viewer* )theCppPtr)->setProj (V3d_Yneg);
737 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppSetZnegProj (JNIEnv* theEnv,
741 ((OcctJni_Viewer* )theCppPtr)->setProj (V3d_Zneg);
744 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppFitAll (JNIEnv* theEnv,
748 ((OcctJni_Viewer* )theCppPtr)->fitAll();
751 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppStartRotation (JNIEnv* theEnv,
757 ((OcctJni_Viewer* )theCppPtr)->startRotation (theStartX, theStartY);
760 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppOnRotation (JNIEnv* theEnv,
766 ((OcctJni_Viewer* )theCppPtr)->onRotation (theX, theY);
769 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppOnPanning (JNIEnv* theEnv,
775 ((OcctJni_Viewer* )theCppPtr)->onPanning (theDX, theDY);
778 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppOnClick (JNIEnv* theEnv,
784 ((OcctJni_Viewer* )theCppPtr)->onClick (theX, theY);
787 jexp void JNICALL Java_com_opencascade_jnisample_OcctJniRenderer_cppStopAction (JNIEnv* theEnv,
791 ((OcctJni_Viewer* )theCppPtr)->stopAction();
794 jexp jlong JNICALL Java_com_opencascade_jnisample_OcctJniActivity_cppOcctMajorVersion (JNIEnv* theEnv,
797 return OCC_VERSION_MAJOR;
800 jexp jlong JNICALL Java_com_opencascade_jnisample_OcctJniActivity_cppOcctMinorVersion (JNIEnv* theEnv,
803 return OCC_VERSION_MINOR;
806 jexp jlong JNICALL Java_com_opencascade_jnisample_OcctJniActivity_cppOcctMicroVersion (JNIEnv* theEnv,
809 return OCC_VERSION_MAINTENANCE;