2 // Copyright (C) 1991 - 2000 by
3 // Matra Datavision SA. All rights reserved.
5 // Copyright (C) 2001 - 2004 by
6 // Open CASCADE SA. All rights reserved.
8 // This file is part of the Open CASCADE Technology software.
10 // This software may be distributed and/or modified under the terms and
11 // conditions of the Open CASCADE Public License as defined by Open CASCADE SA
12 // and appearing in the file LICENSE included in the packaging of this file.
14 // This software is distributed on an "AS IS" basis, without warranty of any
15 // kind, and Open CASCADE SA hereby disclaims all such warranties,
16 // including without limitation, any warranties of merchantability, fitness
17 // for a particular purpose or non-infringement. Please see the License for
18 // the specific terms and conditions governing rights and limitations under the
21 #include <CASCADESamplesJni_AIS_InteractiveObject.h>
22 #include <AIS_InteractiveObject.hxx>
25 #include <Standard_ErrorHandler.hxx>
26 #include <Standard_Failure.hxx>
27 #include <Standard_SStream.hxx>
29 #include <AIS_KindOfInteractive.hxx>
30 #include <Standard_Integer.hxx>
31 #include <Standard_Boolean.hxx>
32 #include <Aspect_TypeOfFacingModel.hxx>
33 #include <Quantity_Color.hxx>
34 #include <Quantity_NameOfColor.hxx>
35 #include <Standard_Real.hxx>
36 #include <AIS_InteractiveContext.hxx>
37 #include <Standard_Transient.hxx>
38 #include <TColStd_ListOfTransient.hxx>
39 #include <Graphic3d_NameOfMaterial.hxx>
40 #include <Graphic3d_MaterialAspect.hxx>
41 #include <AIS_Drawer.hxx>
42 #include <Aspect_TypeOfDegenerateModel.hxx>
43 #include <Geom_Transformation.hxx>
44 #include <Prs3d_Presentation.hxx>
45 #include <Prs3d_BasicAspect.hxx>
51 JNIEXPORT jshort JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_Type (JNIEnv *env, jobject theobj)
55 jcas_Locking alock(env);
58 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
59 thejret = the_this->Type();
62 catch (Standard_Failure) {
64 Err << Standard_Failure::Caught();
66 jcas_ThrowException(env,Err.str().c_str());
75 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_Signature (JNIEnv *env, jobject theobj)
79 jcas_Locking alock(env);
82 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
83 thejret = the_this->Signature();
86 catch (Standard_Failure) {
88 Err << Standard_Failure::Caught();
90 jcas_ThrowException(env,Err.str().c_str());
99 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_AcceptShapeDecomposition (JNIEnv *env, jobject theobj)
103 jcas_Locking alock(env);
106 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
107 thejret = the_this->AcceptShapeDecomposition();
110 catch (Standard_Failure) {
111 Standard_SStream Err;
112 Err << Standard_Failure::Caught();
114 jcas_ThrowException(env,Err.str().c_str());
123 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetCurrentFacingModel (JNIEnv *env, jobject theobj, jshort aModel)
126 jcas_Locking alock(env);
129 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
130 the_this->SetCurrentFacingModel((Aspect_TypeOfFacingModel) aModel);
133 catch (Standard_Failure) {
134 Standard_SStream Err;
135 Err << Standard_Failure::Caught();
137 jcas_ThrowException(env,Err.str().c_str());
146 JNIEXPORT jshort JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_CurrentFacingModel (JNIEnv *env, jobject theobj)
150 jcas_Locking alock(env);
153 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
154 thejret = the_this->CurrentFacingModel();
157 catch (Standard_Failure) {
158 Standard_SStream Err;
159 Err << Standard_Failure::Caught();
161 jcas_ThrowException(env,Err.str().c_str());
170 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_AIS_1InteractiveObject_1SetColor_11 (JNIEnv *env, jobject theobj, jobject aColor)
173 jcas_Locking alock(env);
176 Quantity_Color* the_aColor = (Quantity_Color*) jcas_GetHandle(env,aColor);
177 if ( the_aColor == NULL ) {
179 // The following assumes availability of the default constructor (what may not
180 // always be the case). Therefore explicit exception is thrown if the null
181 // object has been passed.
182 // the_aColor = new Quantity_Color ();
183 // jcas_SetHandle ( env, aColor, the_aColor );
184 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
187 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
188 the_this->SetColor(*the_aColor);
191 catch (Standard_Failure) {
192 Standard_SStream Err;
193 Err << Standard_Failure::Caught();
195 jcas_ThrowException(env,Err.str().c_str());
204 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_AIS_1InteractiveObject_1SetColor_12 (JNIEnv *env, jobject theobj, jshort aColor)
207 jcas_Locking alock(env);
210 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
211 the_this->SetColor((Quantity_NameOfColor) aColor);
214 catch (Standard_Failure) {
215 Standard_SStream Err;
216 Err << Standard_Failure::Caught();
218 jcas_ThrowException(env,Err.str().c_str());
227 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_UnsetColor (JNIEnv *env, jobject theobj)
230 jcas_Locking alock(env);
233 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
234 the_this->UnsetColor();
237 catch (Standard_Failure) {
238 Standard_SStream Err;
239 Err << Standard_Failure::Caught();
241 jcas_ThrowException(env,Err.str().c_str());
250 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetWidth (JNIEnv *env, jobject theobj, jdouble aValue)
253 jcas_Locking alock(env);
256 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
257 the_this->SetWidth((Standard_Real) aValue);
260 catch (Standard_Failure) {
261 Standard_SStream Err;
262 Err << Standard_Failure::Caught();
264 jcas_ThrowException(env,Err.str().c_str());
273 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_UnsetWidth (JNIEnv *env, jobject theobj)
276 jcas_Locking alock(env);
279 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
280 the_this->UnsetWidth();
283 catch (Standard_Failure) {
284 Standard_SStream Err;
285 Err << Standard_Failure::Caught();
287 jcas_ThrowException(env,Err.str().c_str());
296 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_AcceptDisplayMode (JNIEnv *env, jobject theobj, jint aMode)
300 jcas_Locking alock(env);
303 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
304 thejret = the_this->AcceptDisplayMode((Standard_Integer) aMode);
307 catch (Standard_Failure) {
308 Standard_SStream Err;
309 Err << Standard_Failure::Caught();
311 jcas_ThrowException(env,Err.str().c_str());
320 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_DefaultDisplayMode (JNIEnv *env, jobject theobj)
324 jcas_Locking alock(env);
327 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
328 thejret = the_this->DefaultDisplayMode();
331 catch (Standard_Failure) {
332 Standard_SStream Err;
333 Err << Standard_Failure::Caught();
335 jcas_ThrowException(env,Err.str().c_str());
344 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_Redisplay (JNIEnv *env, jobject theobj, jboolean AllModes)
347 jcas_Locking alock(env);
350 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
351 the_this->Redisplay((Standard_Boolean) AllModes);
354 catch (Standard_Failure) {
355 Standard_SStream Err;
356 Err << Standard_Failure::Caught();
358 jcas_ThrowException(env,Err.str().c_str());
367 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetInfiniteState (JNIEnv *env, jobject theobj, jboolean aFlag)
370 jcas_Locking alock(env);
373 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
374 the_this->SetInfiniteState((Standard_Boolean) aFlag);
377 catch (Standard_Failure) {
378 Standard_SStream Err;
379 Err << Standard_Failure::Caught();
381 jcas_ThrowException(env,Err.str().c_str());
390 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_IsInfinite (JNIEnv *env, jobject theobj)
394 jcas_Locking alock(env);
397 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
398 thejret = the_this->IsInfinite();
401 catch (Standard_Failure) {
402 Standard_SStream Err;
403 Err << Standard_Failure::Caught();
405 jcas_ThrowException(env,Err.str().c_str());
414 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HasInteractiveContext (JNIEnv *env, jobject theobj)
418 jcas_Locking alock(env);
421 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
422 thejret = the_this->HasInteractiveContext();
425 catch (Standard_Failure) {
426 Standard_SStream Err;
427 Err << Standard_Failure::Caught();
429 jcas_ThrowException(env,Err.str().c_str());
438 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_GetContext (JNIEnv *env, jobject theobj)
442 jcas_Locking alock(env);
445 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
446 Handle(AIS_InteractiveContext)* theret = new Handle(AIS_InteractiveContext);
447 *theret = the_this->GetContext();
448 thejret = jcas_CreateObject(env,"CASCADESamplesJni/AIS_InteractiveContext",theret);
451 catch (Standard_Failure) {
452 Standard_SStream Err;
453 Err << Standard_Failure::Caught();
455 jcas_ThrowException(env,Err.str().c_str());
464 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetContext (JNIEnv *env, jobject theobj, jobject aCtx)
467 jcas_Locking alock(env);
470 Handle( AIS_InteractiveContext ) the_aCtx;
471 void* ptr_aCtx = jcas_GetHandle(env,aCtx);
473 if ( ptr_aCtx != NULL ) the_aCtx = *( ( Handle( AIS_InteractiveContext )* )ptr_aCtx );
475 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
476 the_this->SetContext(the_aCtx);
479 catch (Standard_Failure) {
480 Standard_SStream Err;
481 Err << Standard_Failure::Caught();
483 jcas_ThrowException(env,Err.str().c_str());
492 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HasOwner (JNIEnv *env, jobject theobj)
496 jcas_Locking alock(env);
499 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
500 thejret = the_this->HasOwner();
503 catch (Standard_Failure) {
504 Standard_SStream Err;
505 Err << Standard_Failure::Caught();
507 jcas_ThrowException(env,Err.str().c_str());
516 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_GetOwner (JNIEnv *env, jobject theobj)
520 jcas_Locking alock(env);
523 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
524 Handle(Standard_Transient)* theret = new Handle(Standard_Transient);
525 *theret = the_this->GetOwner();
526 thejret = jcas_CreateObject(env,"CASCADESamplesJni/Standard_Transient",theret);
529 catch (Standard_Failure) {
530 Standard_SStream Err;
531 Err << Standard_Failure::Caught();
533 jcas_ThrowException(env,Err.str().c_str());
542 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetOwner (JNIEnv *env, jobject theobj, jobject ApplicativeEntity)
545 jcas_Locking alock(env);
548 Handle( Standard_Transient ) the_ApplicativeEntity;
549 void* ptr_ApplicativeEntity = jcas_GetHandle(env,ApplicativeEntity);
551 if ( ptr_ApplicativeEntity != NULL ) the_ApplicativeEntity = *( ( Handle( Standard_Transient )* )ptr_ApplicativeEntity );
553 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
554 the_this->SetOwner(the_ApplicativeEntity);
557 catch (Standard_Failure) {
558 Standard_SStream Err;
559 Err << Standard_Failure::Caught();
561 jcas_ThrowException(env,Err.str().c_str());
570 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_ClearOwner (JNIEnv *env, jobject theobj)
573 jcas_Locking alock(env);
576 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
577 the_this->ClearOwner();
580 catch (Standard_Failure) {
581 Standard_SStream Err;
582 Err << Standard_Failure::Caught();
584 jcas_ThrowException(env,Err.str().c_str());
593 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HasUsers (JNIEnv *env, jobject theobj)
597 jcas_Locking alock(env);
600 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
601 thejret = the_this->HasUsers();
604 catch (Standard_Failure) {
605 Standard_SStream Err;
606 Err << Standard_Failure::Caught();
608 jcas_ThrowException(env,Err.str().c_str());
617 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_Users (JNIEnv *env, jobject theobj)
621 jcas_Locking alock(env);
624 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
625 const TColStd_ListOfTransient& theret = the_this->Users();
626 thejret = jcas_CreateObject(env,"CASCADESamplesJni/TColStd_ListOfTransient",&theret,0);
629 catch (Standard_Failure) {
630 Standard_SStream Err;
631 Err << Standard_Failure::Caught();
633 jcas_ThrowException(env,Err.str().c_str());
642 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_AddUser (JNIEnv *env, jobject theobj, jobject aUser)
645 jcas_Locking alock(env);
648 Handle( Standard_Transient ) the_aUser;
649 void* ptr_aUser = jcas_GetHandle(env,aUser);
651 if ( ptr_aUser != NULL ) the_aUser = *( ( Handle( Standard_Transient )* )ptr_aUser );
653 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
654 the_this->AddUser(the_aUser);
657 catch (Standard_Failure) {
658 Standard_SStream Err;
659 Err << Standard_Failure::Caught();
661 jcas_ThrowException(env,Err.str().c_str());
670 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_ClearUsers (JNIEnv *env, jobject theobj)
673 jcas_Locking alock(env);
676 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
677 the_this->ClearUsers();
680 catch (Standard_Failure) {
681 Standard_SStream Err;
682 Err << Standard_Failure::Caught();
684 jcas_ThrowException(env,Err.str().c_str());
693 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HasDisplayMode (JNIEnv *env, jobject theobj)
697 jcas_Locking alock(env);
700 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
701 thejret = the_this->HasDisplayMode();
704 catch (Standard_Failure) {
705 Standard_SStream Err;
706 Err << Standard_Failure::Caught();
708 jcas_ThrowException(env,Err.str().c_str());
717 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetDisplayMode (JNIEnv *env, jobject theobj, jint aMode)
720 jcas_Locking alock(env);
723 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
724 the_this->SetDisplayMode((Standard_Integer) aMode);
727 catch (Standard_Failure) {
728 Standard_SStream Err;
729 Err << Standard_Failure::Caught();
731 jcas_ThrowException(env,Err.str().c_str());
740 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_UnsetDisplayMode (JNIEnv *env, jobject theobj)
743 jcas_Locking alock(env);
746 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
747 the_this->UnsetDisplayMode();
750 catch (Standard_Failure) {
751 Standard_SStream Err;
752 Err << Standard_Failure::Caught();
754 jcas_ThrowException(env,Err.str().c_str());
763 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_DisplayMode (JNIEnv *env, jobject theobj)
767 jcas_Locking alock(env);
770 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
771 thejret = the_this->DisplayMode();
774 catch (Standard_Failure) {
775 Standard_SStream Err;
776 Err << Standard_Failure::Caught();
778 jcas_ThrowException(env,Err.str().c_str());
787 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HasSelectionMode (JNIEnv *env, jobject theobj)
791 jcas_Locking alock(env);
794 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
795 thejret = the_this->HasSelectionMode();
798 catch (Standard_Failure) {
799 Standard_SStream Err;
800 Err << Standard_Failure::Caught();
802 jcas_ThrowException(env,Err.str().c_str());
811 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SelectionMode (JNIEnv *env, jobject theobj)
815 jcas_Locking alock(env);
818 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
819 thejret = the_this->SelectionMode();
822 catch (Standard_Failure) {
823 Standard_SStream Err;
824 Err << Standard_Failure::Caught();
826 jcas_ThrowException(env,Err.str().c_str());
835 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetSelectionMode (JNIEnv *env, jobject theobj, jint aMode)
838 jcas_Locking alock(env);
841 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
842 the_this->SetSelectionMode((Standard_Integer) aMode);
845 catch (Standard_Failure) {
846 Standard_SStream Err;
847 Err << Standard_Failure::Caught();
849 jcas_ThrowException(env,Err.str().c_str());
858 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_UnsetSelectionMode (JNIEnv *env, jobject theobj)
861 jcas_Locking alock(env);
864 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
865 the_this->UnsetSelectionMode();
868 catch (Standard_Failure) {
869 Standard_SStream Err;
870 Err << Standard_Failure::Caught();
872 jcas_ThrowException(env,Err.str().c_str());
881 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SelectionPriority (JNIEnv *env, jobject theobj)
885 jcas_Locking alock(env);
888 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
889 thejret = the_this->SelectionPriority();
892 catch (Standard_Failure) {
893 Standard_SStream Err;
894 Err << Standard_Failure::Caught();
896 jcas_ThrowException(env,Err.str().c_str());
905 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetSelectionPriority (JNIEnv *env, jobject theobj, jint aPriority)
908 jcas_Locking alock(env);
911 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
912 the_this->SetSelectionPriority((Standard_Integer) aPriority);
915 catch (Standard_Failure) {
916 Standard_SStream Err;
917 Err << Standard_Failure::Caught();
919 jcas_ThrowException(env,Err.str().c_str());
928 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_UnsetSelectionPriority (JNIEnv *env, jobject theobj)
931 jcas_Locking alock(env);
934 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
935 the_this->UnsetSelectionPriority();
938 catch (Standard_Failure) {
939 Standard_SStream Err;
940 Err << Standard_Failure::Caught();
942 jcas_ThrowException(env,Err.str().c_str());
951 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HasSelectionPriority (JNIEnv *env, jobject theobj)
955 jcas_Locking alock(env);
958 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
959 thejret = the_this->HasSelectionPriority();
962 catch (Standard_Failure) {
963 Standard_SStream Err;
964 Err << Standard_Failure::Caught();
966 jcas_ThrowException(env,Err.str().c_str());
975 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HasHilightMode (JNIEnv *env, jobject theobj)
979 jcas_Locking alock(env);
982 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
983 thejret = the_this->HasHilightMode();
986 catch (Standard_Failure) {
987 Standard_SStream Err;
988 Err << Standard_Failure::Caught();
990 jcas_ThrowException(env,Err.str().c_str());
999 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HilightMode (JNIEnv *env, jobject theobj)
1003 jcas_Locking alock(env);
1006 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1007 thejret = the_this->HilightMode();
1010 catch (Standard_Failure) {
1011 Standard_SStream Err;
1012 Err << Standard_Failure::Caught();
1014 jcas_ThrowException(env,Err.str().c_str());
1023 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetHilightMode (JNIEnv *env, jobject theobj, jint anIndex)
1026 jcas_Locking alock(env);
1029 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1030 the_this->SetHilightMode((Standard_Integer) anIndex);
1033 catch (Standard_Failure) {
1034 Standard_SStream Err;
1035 Err << Standard_Failure::Caught();
1037 jcas_ThrowException(env,Err.str().c_str());
1046 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_UnsetHilightMode (JNIEnv *env, jobject theobj)
1049 jcas_Locking alock(env);
1052 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1053 the_this->UnsetHilightMode();
1056 catch (Standard_Failure) {
1057 Standard_SStream Err;
1058 Err << Standard_Failure::Caught();
1060 jcas_ThrowException(env,Err.str().c_str());
1069 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HasColor (JNIEnv *env, jobject theobj)
1073 jcas_Locking alock(env);
1076 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1077 thejret = the_this->HasColor();
1080 catch (Standard_Failure) {
1081 Standard_SStream Err;
1082 Err << Standard_Failure::Caught();
1084 jcas_ThrowException(env,Err.str().c_str());
1093 JNIEXPORT jshort JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_AIS_1InteractiveObject_1Color_11 (JNIEnv *env, jobject theobj)
1097 jcas_Locking alock(env);
1100 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1101 thejret = the_this->Color();
1104 catch (Standard_Failure) {
1105 Standard_SStream Err;
1106 Err << Standard_Failure::Caught();
1108 jcas_ThrowException(env,Err.str().c_str());
1117 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_AIS_1InteractiveObject_1Color_12 (JNIEnv *env, jobject theobj, jobject aColor)
1120 jcas_Locking alock(env);
1123 Quantity_Color* the_aColor = (Quantity_Color*) jcas_GetHandle(env,aColor);
1124 if ( the_aColor == NULL ) {
1126 // The following assumes availability of the default constructor (what may not
1127 // always be the case). Therefore explicit exception is thrown if the null
1128 // object has been passed.
1129 // the_aColor = new Quantity_Color ();
1130 // jcas_SetHandle ( env, aColor, the_aColor );
1131 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1134 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1135 the_this->Color(*the_aColor);
1138 catch (Standard_Failure) {
1139 Standard_SStream Err;
1140 Err << Standard_Failure::Caught();
1142 jcas_ThrowException(env,Err.str().c_str());
1151 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HasWidth (JNIEnv *env, jobject theobj)
1155 jcas_Locking alock(env);
1158 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1159 thejret = the_this->HasWidth();
1162 catch (Standard_Failure) {
1163 Standard_SStream Err;
1164 Err << Standard_Failure::Caught();
1166 jcas_ThrowException(env,Err.str().c_str());
1175 JNIEXPORT jdouble JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_Width (JNIEnv *env, jobject theobj)
1179 jcas_Locking alock(env);
1182 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1183 thejret = the_this->Width();
1186 catch (Standard_Failure) {
1187 Standard_SStream Err;
1188 Err << Standard_Failure::Caught();
1190 jcas_ThrowException(env,Err.str().c_str());
1199 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HasMaterial (JNIEnv *env, jobject theobj)
1203 jcas_Locking alock(env);
1206 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1207 thejret = the_this->HasMaterial();
1210 catch (Standard_Failure) {
1211 Standard_SStream Err;
1212 Err << Standard_Failure::Caught();
1214 jcas_ThrowException(env,Err.str().c_str());
1223 JNIEXPORT jshort JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_Material (JNIEnv *env, jobject theobj)
1227 jcas_Locking alock(env);
1230 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1231 thejret = the_this->Material();
1234 catch (Standard_Failure) {
1235 Standard_SStream Err;
1236 Err << Standard_Failure::Caught();
1238 jcas_ThrowException(env,Err.str().c_str());
1247 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_AIS_1InteractiveObject_1SetMaterial_11 (JNIEnv *env, jobject theobj, jshort aName)
1250 jcas_Locking alock(env);
1253 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1254 the_this->SetMaterial((Graphic3d_NameOfMaterial) aName);
1257 catch (Standard_Failure) {
1258 Standard_SStream Err;
1259 Err << Standard_Failure::Caught();
1261 jcas_ThrowException(env,Err.str().c_str());
1270 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_AIS_1InteractiveObject_1SetMaterial_12 (JNIEnv *env, jobject theobj, jobject aName)
1273 jcas_Locking alock(env);
1276 Graphic3d_MaterialAspect* the_aName = (Graphic3d_MaterialAspect*) jcas_GetHandle(env,aName);
1277 if ( the_aName == NULL ) {
1279 // The following assumes availability of the default constructor (what may not
1280 // always be the case). Therefore explicit exception is thrown if the null
1281 // object has been passed.
1282 // the_aName = new Graphic3d_MaterialAspect ();
1283 // jcas_SetHandle ( env, aName, the_aName );
1284 jcas_ThrowException (env, "NULL object has been passed while expecting an object manipulated by value");
1287 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1288 the_this->SetMaterial(*the_aName);
1291 catch (Standard_Failure) {
1292 Standard_SStream Err;
1293 Err << Standard_Failure::Caught();
1295 jcas_ThrowException(env,Err.str().c_str());
1304 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_UnsetMaterial (JNIEnv *env, jobject theobj)
1307 jcas_Locking alock(env);
1310 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1311 the_this->UnsetMaterial();
1314 catch (Standard_Failure) {
1315 Standard_SStream Err;
1316 Err << Standard_Failure::Caught();
1318 jcas_ThrowException(env,Err.str().c_str());
1327 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetTransparency (JNIEnv *env, jobject theobj, jdouble aValue)
1330 jcas_Locking alock(env);
1333 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1334 the_this->SetTransparency((Standard_Real) aValue);
1337 catch (Standard_Failure) {
1338 Standard_SStream Err;
1339 Err << Standard_Failure::Caught();
1341 jcas_ThrowException(env,Err.str().c_str());
1350 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_IsTransparent (JNIEnv *env, jobject theobj)
1354 jcas_Locking alock(env);
1357 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1358 thejret = the_this->IsTransparent();
1361 catch (Standard_Failure) {
1362 Standard_SStream Err;
1363 Err << Standard_Failure::Caught();
1365 jcas_ThrowException(env,Err.str().c_str());
1374 JNIEXPORT jdouble JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_Transparency (JNIEnv *env, jobject theobj)
1378 jcas_Locking alock(env);
1381 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1382 thejret = the_this->Transparency();
1385 catch (Standard_Failure) {
1386 Standard_SStream Err;
1387 Err << Standard_Failure::Caught();
1389 jcas_ThrowException(env,Err.str().c_str());
1398 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_UnsetTransparency (JNIEnv *env, jobject theobj)
1401 jcas_Locking alock(env);
1404 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1405 the_this->UnsetTransparency();
1408 catch (Standard_Failure) {
1409 Standard_SStream Err;
1410 Err << Standard_Failure::Caught();
1412 jcas_ThrowException(env,Err.str().c_str());
1421 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetAttributes (JNIEnv *env, jobject theobj, jobject aDrawer)
1424 jcas_Locking alock(env);
1427 Handle( AIS_Drawer ) the_aDrawer;
1428 void* ptr_aDrawer = jcas_GetHandle(env,aDrawer);
1430 if ( ptr_aDrawer != NULL ) the_aDrawer = *( ( Handle( AIS_Drawer )* )ptr_aDrawer );
1432 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1433 the_this->SetAttributes(the_aDrawer);
1436 catch (Standard_Failure) {
1437 Standard_SStream Err;
1438 Err << Standard_Failure::Caught();
1440 jcas_ThrowException(env,Err.str().c_str());
1449 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_Attributes (JNIEnv *env, jobject theobj)
1453 jcas_Locking alock(env);
1456 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1457 Handle(AIS_Drawer)* theret = new Handle(AIS_Drawer);
1458 *theret = the_this->Attributes();
1459 thejret = jcas_CreateObject(env,"CASCADESamplesJni/AIS_Drawer",theret);
1462 catch (Standard_Failure) {
1463 Standard_SStream Err;
1464 Err << Standard_Failure::Caught();
1466 jcas_ThrowException(env,Err.str().c_str());
1475 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_UnsetAttributes (JNIEnv *env, jobject theobj)
1478 jcas_Locking alock(env);
1481 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1482 the_this->UnsetAttributes();
1485 catch (Standard_Failure) {
1486 Standard_SStream Err;
1487 Err << Standard_Failure::Caught();
1489 jcas_ThrowException(env,Err.str().c_str());
1498 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_AIS_1InteractiveObject_1State_11 (JNIEnv *env, jobject theobj, jint theState)
1501 jcas_Locking alock(env);
1504 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1505 the_this->State((Standard_Integer) theState);
1508 catch (Standard_Failure) {
1509 Standard_SStream Err;
1510 Err << Standard_Failure::Caught();
1512 jcas_ThrowException(env,Err.str().c_str());
1521 JNIEXPORT jint JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_AIS_1InteractiveObject_1State_12 (JNIEnv *env, jobject theobj)
1525 jcas_Locking alock(env);
1528 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1529 thejret = the_this->State();
1532 catch (Standard_Failure) {
1533 Standard_SStream Err;
1534 Err << Standard_Failure::Caught();
1536 jcas_ThrowException(env,Err.str().c_str());
1545 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetDegenerateModel (JNIEnv *env, jobject theobj, jshort aModel, jdouble aRatio)
1548 jcas_Locking alock(env);
1551 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1552 the_this->SetDegenerateModel((Aspect_TypeOfDegenerateModel) aModel,(Quantity_Ratio) aRatio);
1555 catch (Standard_Failure) {
1556 Standard_SStream Err;
1557 Err << Standard_Failure::Caught();
1559 jcas_ThrowException(env,Err.str().c_str());
1568 JNIEXPORT jshort JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_DegenerateModel (JNIEnv *env, jobject theobj, jobject aRatio)
1572 jcas_Locking alock(env);
1575 Standard_Real the_aRatio = jcas_GetReal(env,aRatio);
1576 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1577 thejret = the_this->DegenerateModel(the_aRatio);
1578 jcas_SetReal(env,aRatio,the_aRatio);
1581 catch (Standard_Failure) {
1582 Standard_SStream Err;
1583 Err << Standard_Failure::Caught();
1585 jcas_ThrowException(env,Err.str().c_str());
1594 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetTransformation (JNIEnv *env, jobject theobj, jobject aTranformation, jboolean postConcatenate, jboolean updateSelection)
1597 jcas_Locking alock(env);
1600 Handle( Geom_Transformation ) the_aTranformation;
1601 void* ptr_aTranformation = jcas_GetHandle(env,aTranformation);
1603 if ( ptr_aTranformation != NULL ) the_aTranformation = *( ( Handle( Geom_Transformation )* )ptr_aTranformation );
1605 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1606 the_this->SetTransformation(the_aTranformation,(Standard_Boolean) postConcatenate,(Standard_Boolean) updateSelection);
1609 catch (Standard_Failure) {
1610 Standard_SStream Err;
1611 Err << Standard_Failure::Caught();
1613 jcas_ThrowException(env,Err.str().c_str());
1622 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_UnsetTransformation (JNIEnv *env, jobject theobj)
1625 jcas_Locking alock(env);
1628 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1629 the_this->UnsetTransformation();
1632 catch (Standard_Failure) {
1633 Standard_SStream Err;
1634 Err << Standard_Failure::Caught();
1636 jcas_ThrowException(env,Err.str().c_str());
1645 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_Transformation (JNIEnv *env, jobject theobj)
1649 jcas_Locking alock(env);
1652 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1653 Handle(Geom_Transformation)* theret = new Handle(Geom_Transformation);
1654 *theret = the_this->Transformation();
1655 thejret = jcas_CreateObject(env,"CASCADESamplesJni/Geom_Transformation",theret);
1658 catch (Standard_Failure) {
1659 Standard_SStream Err;
1660 Err << Standard_Failure::Caught();
1662 jcas_ThrowException(env,Err.str().c_str());
1671 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HasTransformation (JNIEnv *env, jobject theobj)
1675 jcas_Locking alock(env);
1678 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1679 thejret = the_this->HasTransformation();
1682 catch (Standard_Failure) {
1683 Standard_SStream Err;
1684 Err << Standard_Failure::Caught();
1686 jcas_ThrowException(env,Err.str().c_str());
1695 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HasPresentation (JNIEnv *env, jobject theobj)
1699 jcas_Locking alock(env);
1702 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1703 thejret = the_this->HasPresentation();
1706 catch (Standard_Failure) {
1707 Standard_SStream Err;
1708 Err << Standard_Failure::Caught();
1710 jcas_ThrowException(env,Err.str().c_str());
1719 JNIEXPORT jobject JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_Presentation (JNIEnv *env, jobject theobj)
1723 jcas_Locking alock(env);
1726 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1727 Handle(Prs3d_Presentation)* theret = new Handle(Prs3d_Presentation);
1728 *theret = the_this->Presentation();
1729 thejret = jcas_CreateObject(env,"CASCADESamplesJni/Prs3d_Presentation",theret);
1732 catch (Standard_Failure) {
1733 Standard_SStream Err;
1734 Err << Standard_Failure::Caught();
1736 jcas_ThrowException(env,Err.str().c_str());
1745 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetAspect (JNIEnv *env, jobject theobj, jobject anAspect, jboolean globalChange)
1748 jcas_Locking alock(env);
1751 Handle( Prs3d_BasicAspect ) the_anAspect;
1752 void* ptr_anAspect = jcas_GetHandle(env,anAspect);
1754 if ( ptr_anAspect != NULL ) the_anAspect = *( ( Handle( Prs3d_BasicAspect )* )ptr_anAspect );
1756 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1757 the_this->SetAspect(the_anAspect,(Standard_Boolean) globalChange);
1760 catch (Standard_Failure) {
1761 Standard_SStream Err;
1762 Err << Standard_Failure::Caught();
1764 jcas_ThrowException(env,Err.str().c_str());
1773 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_SetPolygonOffsets (JNIEnv *env, jobject theobj, jint aMode, jdouble aFactor, jdouble aUnits)
1776 jcas_Locking alock(env);
1779 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1780 the_this->SetPolygonOffsets((Standard_Integer) aMode,(Standard_Real) aFactor,(Standard_Real) aUnits);
1783 catch (Standard_Failure) {
1784 Standard_SStream Err;
1785 Err << Standard_Failure::Caught();
1787 jcas_ThrowException(env,Err.str().c_str());
1796 JNIEXPORT jboolean JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_HasPolygonOffsets (JNIEnv *env, jobject theobj)
1800 jcas_Locking alock(env);
1803 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1804 thejret = the_this->HasPolygonOffsets();
1807 catch (Standard_Failure) {
1808 Standard_SStream Err;
1809 Err << Standard_Failure::Caught();
1811 jcas_ThrowException(env,Err.str().c_str());
1820 JNIEXPORT void JNICALL Java_CASCADESamplesJni_AIS_1InteractiveObject_PolygonOffsets (JNIEnv *env, jobject theobj, jobject aMode, jobject aFactor, jobject aUnits)
1823 jcas_Locking alock(env);
1826 Standard_Integer the_aMode = jcas_GetInteger(env,aMode);
1827 Standard_Real the_aFactor = jcas_GetReal(env,aFactor);
1828 Standard_Real the_aUnits = jcas_GetReal(env,aUnits);
1829 Handle(AIS_InteractiveObject) the_this = *((Handle(AIS_InteractiveObject)*) jcas_GetHandle(env,theobj));
1830 the_this->PolygonOffsets(the_aMode,the_aFactor,the_aUnits);
1831 jcas_SetInteger(env,aMode,the_aMode);
1832 jcas_SetReal(env,aFactor,the_aFactor);
1833 jcas_SetReal(env,aUnits,the_aUnits);
1836 catch (Standard_Failure) {
1837 Standard_SStream Err;
1838 Err << Standard_Failure::Caught();
1840 jcas_ThrowException(env,Err.str().c_str());