DCQ : Merge Kinematic
16
Makefile.in
@ -22,8 +22,16 @@ GEOM_fr.xml \
|
||||
GEOM.config \
|
||||
GEOMCatalog.xml \
|
||||
GEOMDS_Resources \
|
||||
animation.png \
|
||||
anim_first.png \
|
||||
anim_last.png \
|
||||
anim_next.png \
|
||||
anim_play.png \
|
||||
anim_prev.png \
|
||||
anim_stop.png \
|
||||
arc.png \
|
||||
archimede.png \
|
||||
assembly.png \
|
||||
axisinertia.png \
|
||||
basicproperties.png \
|
||||
bounding.png \
|
||||
@ -48,6 +56,7 @@ common.png \
|
||||
cone.png \
|
||||
conedxyz.png \
|
||||
conepointvector.png \
|
||||
contact.png \
|
||||
cut.png \
|
||||
cylinder.png \
|
||||
cylinderdxyz.png \
|
||||
@ -89,6 +98,10 @@ planepointvector.png \
|
||||
planeworkingface.png \
|
||||
point2.png \
|
||||
pointonedge.png \
|
||||
position.png \
|
||||
positionface.png \
|
||||
positionpoint.png \
|
||||
positionvect.png \
|
||||
prism.png \
|
||||
revol.png \
|
||||
rotate.png \
|
||||
@ -110,8 +123,11 @@ torus.png \
|
||||
torusdxyz.png \
|
||||
toruspointvector.png \
|
||||
translation.png \
|
||||
tree_animation.png \
|
||||
tree_assembly.png \
|
||||
tree_compound.png \
|
||||
tree_compsolid.png \
|
||||
tree_contact.png \
|
||||
tree_edge.png \
|
||||
tree_face.png \
|
||||
tree_shape.png \
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "SALOME_Component.idl"
|
||||
#include "SALOMEDS.idl"
|
||||
#include "GEOM_Shape.idl"
|
||||
#include "GEOM_Kinematic.idl"
|
||||
|
||||
module GEOM
|
||||
{
|
||||
@ -119,6 +120,11 @@ module GEOM
|
||||
GEOM_Shape MakeRotation(in GEOM_Shape shape,
|
||||
in AxisStruct axis,
|
||||
in double angle) raises (SALOME::SALOME_Exception) ;
|
||||
GEOM_Shape MakePosition(in GEOM_Shape shape1,
|
||||
in GEOM_Shape shape2,
|
||||
in GEOM_Shape::ListOfSubShapeID ListOfID1,
|
||||
in GEOM_Shape::ListOfSubShapeID ListOfID2,
|
||||
in short typeofshape) raises (SALOME::SALOME_Exception) ;
|
||||
GEOM_Shape MakeScaleTransform(in GEOM_Shape shape,
|
||||
in PointStruct theCenterofScale,
|
||||
in double factor) raises (SALOME::SALOME_Exception) ;
|
||||
@ -322,6 +328,28 @@ module GEOM
|
||||
//-----------------------------------------------------------//
|
||||
boolean CheckShape(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ;
|
||||
|
||||
//-----------------------------------------------------------//
|
||||
// Kinematic //
|
||||
//-----------------------------------------------------------//
|
||||
GEOM_Assembly InitAssembly() raises (SALOME::SALOME_Exception) ;
|
||||
|
||||
GEOM_Contact AddContact(in GEOM_Assembly Ass,
|
||||
in GEOM_Shape Shape1,
|
||||
in GEOM_Shape Shape2,
|
||||
in short type,
|
||||
in double step) raises (SALOME::SALOME_Exception) ;
|
||||
|
||||
GEOM_Animation AddAnimation(in GEOM_Assembly Ass,
|
||||
in GEOM_Shape Shape1,
|
||||
in double Duration,
|
||||
in short NbSeq) raises (SALOME::SALOME_Exception) ;
|
||||
|
||||
void SetPosition(in GEOM_Contact Contact) raises (SALOME::SALOME_Exception) ;
|
||||
|
||||
void SetRotation(in GEOM_Contact Contact) raises (SALOME::SALOME_Exception) ;
|
||||
|
||||
void SetTranslation(in GEOM_Contact Contact) raises (SALOME::SALOME_Exception) ;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
186
idl/GEOM_Kinematic.idl
Normal file
@ -0,0 +1,186 @@
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOM_Kinematic.idl
|
||||
// Author : Damien COQUERET
|
||||
|
||||
#ifndef __GEOM_Kinematic__
|
||||
#define __GEOM_Kinematic__
|
||||
|
||||
#include "SALOME_Exception.idl"
|
||||
#include "GEOM_Shape.idl"
|
||||
|
||||
module GEOM
|
||||
{
|
||||
|
||||
interface GEOM_Contact;
|
||||
typedef sequence<GEOM_Contact> ListOfContact;
|
||||
|
||||
//-----------------------------------------------------------------//
|
||||
// interface GEOM_Position methods //
|
||||
//-----------------------------------------------------------------//
|
||||
interface GEOM_Position {
|
||||
|
||||
void SetOrigin(in GEOM::PointStruct P0)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
void SetVX(in GEOM::DirStruct Vect)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
void SetVY(in GEOM::DirStruct Vect)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
void SetVZ(in GEOM::DirStruct Vect)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::PointStruct GetOrigin()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::DirStruct GetVX()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::DirStruct GetVY()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::DirStruct GetVZ()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------//
|
||||
// interface GEOM_Rotation methods //
|
||||
//-----------------------------------------------------------------//
|
||||
interface GEOM_Rotation {
|
||||
|
||||
void SetRotation(in long Rot1, in long Rot2, in long Rot3,
|
||||
in double Val1, in double Val2, in double Val3)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
long GetRot1()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
long GetRot2()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
long GetRot3()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
double GetVal1()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
double GetVal2()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
double GetVal3()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------//
|
||||
// interface GEOM_Translation methods //
|
||||
//-----------------------------------------------------------------//
|
||||
interface GEOM_Translation {
|
||||
|
||||
void SetTranslation(in double ValX, in double ValY, in double ValZ)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
double GetValX()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
double GetValY()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
double GetValZ()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------//
|
||||
// interface GEOM_Assembly methods //
|
||||
//-----------------------------------------------------------------//
|
||||
interface GEOM_Assembly {
|
||||
|
||||
void AddContact(in GEOM::GEOM_Contact aContact)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::ListOfContact GetContactList()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
long NbContacts()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
attribute string Name;
|
||||
attribute string ShapeId;
|
||||
attribute string StudyShapeId;
|
||||
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------//
|
||||
// interface GEOM_Contact methods //
|
||||
//-----------------------------------------------------------------//
|
||||
interface GEOM_Contact {
|
||||
|
||||
long GetType()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::GEOM_Shape GetShape1()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::GEOM_Shape GetShape2()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
double GetStep()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::GEOM_Position GetPosition()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::GEOM_Rotation GetRotation()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::GEOM_Translation GetTranslation()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
attribute string Name;
|
||||
attribute string ShapeId;
|
||||
attribute string StudyShapeId;
|
||||
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------//
|
||||
// interface GEOM_Animation methods //
|
||||
//-----------------------------------------------------------------//
|
||||
interface GEOM_Animation {
|
||||
|
||||
GEOM::GEOM_Assembly GetAssembly()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::GEOM_Shape GetFrame()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
double GetDuration()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
long GetNbSeq()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
attribute string Name;
|
||||
attribute string ShapeId;
|
||||
attribute string StudyShapeId;
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
#endif
|
@ -12,6 +12,7 @@ VPATH=.:${KERNEL_ROOT_DIR}/idl/salome
|
||||
|
||||
IDL_FILES = \
|
||||
GEOM_Shape.idl \
|
||||
GEOM_Kinematic.idl \
|
||||
GEOM_Gen.idl
|
||||
|
||||
PY_CLIENT_IDL = $(IDL_FILES)
|
||||
|
@ -112,11 +112,12 @@
|
||||
<submenu label-id="Transformation" item-id="502" pos-id="2">
|
||||
<popup-item item-id="5021" pos-id="" label-id="Translation" icon-id="translation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5022" pos-id="" label-id="Rotation" icon-id="rotate.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5023" pos-id="" label-id="Mirror by plane" icon-id="mirrorPlane.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5024" pos-id="" label-id="Scale transform" icon-id="scale.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5023" pos-id="" label-id="Position" icon-id="position.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5024" pos-id="" label-id="Mirror by plane" icon-id="mirrorPlane.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5025" pos-id="" label-id="Scale transform" icon-id="scale.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="5025" pos-id="" label-id="Multi-Translation" icon-id="multitranslation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5026" pos-id="" label-id="Multi-Rotation" icon-id="multirotation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5026" pos-id="" label-id="Multi-Translation" icon-id="multitranslation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5027" pos-id="" label-id="Multi-Rotation" icon-id="multirotation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<popup-item item-id="503" pos-id="" label-id="Partition" icon-id="partition.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
@ -136,8 +137,29 @@
|
||||
</menu-item>
|
||||
|
||||
|
||||
<!-- ************************** Kinematic (menubar) ************************************ -->
|
||||
<menu-item label-id="Kinematic" item-id="61" pos-id="6">
|
||||
<popup-item item-id="611" pos-id="" label-id="Add Assembly" icon-id="assembly.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<submenu label-id="Add Contact" item-id="612" icon-id="" pos-id="">
|
||||
<popup-item item-id="61201" pos-id="" label-id="Embedding" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61202" pos-id="" label-id="Pivot" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61203" pos-id="" label-id="Slide" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61204" pos-id="" label-id="Sliding Pivot" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61205" pos-id="" label-id="Spherical" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61206" pos-id="" label-id="Plane" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61207" pos-id="" label-id="Annular" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61208" pos-id="" label-id="Rectilinear" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61209" pos-id="" label-id="Ponctual" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="61210" pos-id="" label-id="Helicoïdal" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<popup-item item-id="614" pos-id="" label-id="Add Animation" icon-id="animation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
|
||||
|
||||
<!-- ************************** Mesures (menubar) ************************************ -->
|
||||
<menu-item label-id="Measures" item-id="70" pos-id="6">
|
||||
<menu-item label-id="Measures" item-id="70" pos-id="7">
|
||||
<popup-item item-id="701" pos-id="" label-id="Basic properties" icon-id="basicproperties.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id="4"/>
|
||||
<popup-item item-id="702" pos-id="" label-id="Center of gravity" icon-id="centergravity.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
@ -229,11 +251,12 @@
|
||||
<toolbar label-id="Transformation">
|
||||
<toolbutton-item item-id="5021" label-id="Translation" icon-id="translation.png" tooltip-id="Translate a shape"accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5022" label-id="Rotation" icon-id="rotate.png" tooltip-id="Rotate a shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5023" label-id="Mirror by plane" icon-id="mirrorPlane.png" tooltip-id="Mirror a shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5024" label-id="Scale transform" icon-id="scale.png" tooltip-id="Scale a shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5023" label-id="Position" icon-id="position.png" tooltip-id="Position a shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5024" label-id="Mirror by plane" icon-id="mirrorPlane.png" tooltip-id="Mirror a shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5025" label-id="Scale transform" icon-id="scale.png" tooltip-id="Scale a shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separatorTB/>
|
||||
<toolbutton-item item-id="5025" label-id="Multi-Translation" icon-id="multitranslation.png" tooltip-id="Multi-translate a shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5026" label-id="Multi-Rotation" icon-id="multirotation.png" tooltip-id="Multi-rotate a shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5026" label-id="Multi-Translation" icon-id="multitranslation.png" tooltip-id="Multi-translate a shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5027" label-id="Multi-Rotation" icon-id="multirotation.png" tooltip-id="Multi-rotate a shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
</toolbar>
|
||||
|
||||
|
||||
@ -257,6 +280,26 @@
|
||||
<popup-item item-id="901" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Assembly">
|
||||
<popup-item item-id="901" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="61201" pos-id="" label-id="Add Contact" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Contact">
|
||||
<popup-item item-id="901" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="6131" pos-id="" label-id="Position" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6132" pos-id="" label-id="Rotation" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6133" pos-id="" label-id="Translation" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Animation">
|
||||
<popup-item item-id="901" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="6141" pos-id="" label-id="Run Animation" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Sketch" context-id="Sketch" parent-id="Viewer" object-id="">
|
||||
<popup-item item-id="4041" pos-id="" label-id="Segment" icon-id="" tooltip-id="" accel-id="" toggle-id="true" execute-action=""/>
|
||||
<popup-item item-id="4042" pos-id="" label-id="Arc" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
|
@ -39,110 +39,157 @@
|
||||
</menu-item>
|
||||
|
||||
<!-- ************************* New Entity (menubar) ******************************* -->
|
||||
<menu-item label-id="Nouvelle entité" item-id="30" pos-id="3">
|
||||
<submenu label-id="Construction basique" item-id="301" pos-id="1">
|
||||
<popup-item item-id="3011" pos-id="" label-id="Point" icon-id="point2.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="3012" pos-id="" label-id="Ligne" icon-id="line.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="3013" pos-id="" label-id="Cercle" icon-id="circle.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="3014" pos-id="" label-id="Ellipse" icon-id="ellipse.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="3015" pos-id="" label-id="Arc" icon-id="arc.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<menu-item label-id="Nouvelle entité" item-id="40" pos-id="3">
|
||||
<submenu label-id="Construction basique" item-id="401" pos-id="1">
|
||||
<popup-item item-id="4011" pos-id="" label-id="Point" icon-id="point2.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4012" pos-id="" label-id="Ligne" icon-id="line.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4013" pos-id="" label-id="Cercle" icon-id="circle.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4014" pos-id="" label-id="Ellipse" icon-id="ellipse.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4015" pos-id="" label-id="Arc" icon-id="arc.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id="6"/>
|
||||
<popup-item item-id="3016" pos-id="" label-id="Vecteur" icon-id="vector.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="3017" pos-id="" label-id="Plan" icon-id="plane.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="3018" pos-id="" label-id="Plan de travail" icon-id="planeWorking.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4016" pos-id="" label-id="Vecteur" icon-id="vector.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4017" pos-id="" label-id="Plan" icon-id="plane.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4018" pos-id="" label-id="Plan de travail" icon-id="planeWorking.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<submenu label-id="Primitives" item-id="302" pos-id="2">
|
||||
<popup-item item-id="3021" pos-id="" label-id="Boite" icon-id="box.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="3022" pos-id="" label-id="Cylindre" icon-id="cylinder.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="3023" pos-id="" label-id="Sphère" icon-id="sphere.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="3024" pos-id="" label-id="Tore" icon-id="torus.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
|
||||
<submenu label-id="Primitives" item-id="402" pos-id="2">
|
||||
<popup-item item-id="4021" pos-id="" label-id="Boite" icon-id="box.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4022" pos-id="" label-id="Cylindre" icon-id="cylinder.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4023" pos-id="" label-id="Sphère" icon-id="sphere.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4024" pos-id="" label-id="Tore" icon-id="torus.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4025" pos-id="" label-id="Cone" icon-id="cone.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<popup-item item-id="303" pos-id="" label-id="Eclater" icon-id="subshape.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="309" pos-id="" label-id="Supprime des faces" icon-id="supressface.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="314" pos-id="" label-id="Supprime un trou" icon-id="supresshole.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<endsubmenu />
|
||||
<submenu label-id="Generation" item-id="403" pos-id="3">
|
||||
<popup-item item-id="4031" pos-id="" label-id="Extrusion" icon-id="prism.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4032" pos-id="" label-id="Revolution" icon-id="revol.png"tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4033" pos-id="" label-id="Filling" icon-id="filling.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4034" pos-id="" label-id="Pipe" icon-id="pipe.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="304" pos-id="" label-id="Arête" icon-id="build_edge.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="305" pos-id="" label-id="Wire" icon-id="build_wire.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="306" pos-id="" label-id="Face" icon-id="build_face.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="308" pos-id="" label-id="Compound" icon-id="build_compound.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="404" pos-id="" label-id="Sketch" icon-id="sketch.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<submenu label-id="Sketch Constraintes" item-id="405" pos-id="">
|
||||
<popup-item item-id="4051" pos-id="" label-id="Définir le Plan" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="4052" pos-id="" label-id="Tangent" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4053" pos-id="" label-id="Perpendiculaire" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<submenu label-id="Sketch Options" item-id="406" pos-id="">
|
||||
<popup-item item-id="4061" pos-id="" label-id="Longueur Dimension" icon-id="" tooltip-id="" accel-id="" toggle-id="true" execute-action=""/>
|
||||
<popup-item item-id="4062" pos-id="" label-id="Angle Dimension" icon-id="" tooltip-id="" accel-id="" toggle-id="true" execute-action=""/>
|
||||
<popup-item item-id="4063" pos-id="" label-id="Rayon Dimension" icon-id="" tooltip-id="" accel-id="" toggle-id="true" execute-action=""/>
|
||||
<popup-item item-id="4064" pos-id="" label-id="X Dimension" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
|
||||
<popup-item item-id="4065" pos-id="" label-id="Y Dimension" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="407" pos-id="" label-id="Eclater" icon-id="subshape.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<submenu label-id="Build" item-id="408" pos-id="">
|
||||
<popup-item item-id="4081" pos-id="" label-id="Arête" icon-id="build_edge.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4082" pos-id="" label-id="Wire" icon-id="build_wire.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4083" pos-id="" label-id="Face" icon-id="build_face.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4084" pos-id="" label-id="Shell" icon-id="build_shell.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4085" pos-id="" label-id="Solid" icon-id="build_solid.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4086" pos-id="" label-id="Compound" icon-id="build_compound.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
</menu-item>
|
||||
|
||||
|
||||
<!-- ************************ Operations (menubar) *********************************** -->
|
||||
<menu-item label-id="Opérations" item-id="40" pos-id="4">
|
||||
<submenu label-id="Booléennes" item-id="401" pos-id="1">
|
||||
<popup-item item-id="4011" pos-id="" label-id="Union" icon-id="fuse.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4012" pos-id="" label-id="Commun" icon-id="common.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4013" pos-id="" label-id="Couper" icon-id="cut.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4014" pos-id="" label-id="Section" icon-id="section.png"tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<menu-item label-id="Opérations" item-id="50" pos-id="4">
|
||||
<submenu label-id="Booléennes" item-id="501" pos-id="1">
|
||||
<popup-item item-id="5011" pos-id="" label-id="Union" icon-id="fuse.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5012" pos-id="" label-id="Commun" icon-id="common.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5013" pos-id="" label-id="Couper" icon-id="cut.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5014" pos-id="" label-id="Section" icon-id="section.png"tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<submenu label-id="Transformation" item-id="402" pos-id="2">
|
||||
<popup-item item-id="4021" pos-id="" label-id="Translation" icon-id="translation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4022" pos-id="" label-id="Rotation" icon-id="rotate.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4023" pos-id="" label-id="Symétrie par un plan" icon-id="mirrorPlane.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4024" pos-id="" label-id="Facteur d'échelle" icon-id="scale.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="4030" pos-id="" label-id="Multi-Translation" icon-id="multitranslation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4040" pos-id="" label-id="Multi-Rotation" icon-id="multirotation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<submenu label-id="Transformation" item-id="502" pos-id="2">
|
||||
<popup-item item-id="5021" pos-id="" label-id="Translation" icon-id="translation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5022" pos-id="" label-id="Rotation" icon-id="rotate.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5023" pos-id="" label-id="Position" icon-id="position.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5024" pos-id="" label-id="Symétrie par un plan" icon-id="mirrorPlane.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5025" pos-id="" label-id="Facteur d'échelle" icon-id="scale.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="5026" pos-id="" label-id="Multi-Translation" icon-id="multitranslation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5027" pos-id="" label-id="Multi-Rotation" icon-id="multirotation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<submenu label-id="Construction" item-id="403" pos-id="3">
|
||||
<popup-item item-id="4031" pos-id="" label-id="Extrusion" icon-id="prism.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4032" pos-id="" label-id="Révolution" icon-id="revol.png"tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4033" pos-id="" label-id="Filling" icon-id="filling.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4034" pos-id="" label-id="Pipe création ?" icon-id="pipe.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<popup-item item-id="4025" pos-id="" label-id="Partition" icon-id="partition.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4026" pos-id="" label-id="Archimede" icon-id="archimede.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4027" pos-id="" label-id="Congé" icon-id="fillet.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4028" pos-id="" label-id="Chanfrein" icon-id="chamfer.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="503" pos-id="" label-id="Partition" icon-id="partition.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="504" pos-id="" label-id="Archimede" icon-id="archimede.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="505" pos-id="" label-id="Congé" icon-id="fillet.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="506" pos-id="" label-id="Chanfrein" icon-id="chamfer.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
|
||||
|
||||
<!-- ************************** Advanced (menubar) ************************************** -->
|
||||
<menu-item label-id="Avancé" item-id="50" pos-id="5">
|
||||
<popup-item item-id="501" pos-id="" label-id="Couture" icon-id="sewing.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="502" pos-id="" label-id="Orientation" icon-id="orientation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<menu-item label-id="Avancé" item-id="60" pos-id="5">
|
||||
<popup-item item-id="601" pos-id="" label-id="Couture" icon-id="sewing.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="602" pos-id="" label-id="Orientation" icon-id="orientation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="603" pos-id="" label-id="Suppression de faces" icon-id="supressface.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="604" pos-id="" label-id="Suppression de trou" icon-id="supresshole.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
|
||||
|
||||
<!-- ************************** Kinematic (menubar) ************************************ -->
|
||||
<menu-item label-id="Cinématique" item-id="61" pos-id="6">
|
||||
<popup-item item-id="611" pos-id="" label-id="Ajouter un assemblage" icon-id="assembly.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<submenu label-id="Ajouter un Contact" item-id="612" icon-id="" pos-id="">
|
||||
<popup-item item-id="61201" pos-id="" label-id="Encastrement" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61202" pos-id="" label-id="Pivot" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61203" pos-id="" label-id="Glissière" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61204" pos-id="" label-id="Pivot Glissant" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61205" pos-id="" label-id="Spherique" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61206" pos-id="" label-id="Appui Plan" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61207" pos-id="" label-id="Annulaire" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61208" pos-id="" label-id="Rectilineaire" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="61209" pos-id="" label-id="Ponctuel" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="61210" pos-id="" label-id="Helicoïdale" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<popup-item item-id="614" pos-id="" label-id="Ajouter une Animation" icon-id="animation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
|
||||
|
||||
<!-- ************************** Mesures (menubar) ************************************ -->
|
||||
<menu-item label-id="Mesures" item-id="60" pos-id="6">
|
||||
<popup-item item-id="601" pos-id="" label-id="Fondamentales" icon-id="linear.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id="4"/>
|
||||
<popup-item item-id="604" pos-id="" label-id="Centre de gravité" icon-id="centergravity.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="605" pos-id="" label-id="Axes d'inertie" icon-id="axisinertia.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id="7"/>
|
||||
<submenu label-id="Dimensions" item-id="606" pos-id="8">
|
||||
<popup-item item-id="6060" pos-id="" label-id="Boite englobante" icon-id="bounding.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6061" pos-id="" label-id="Distance minimale" icon-id="mindist.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<menu-item label-id="Mesures" item-id="70" pos-id="7">
|
||||
<popup-item item-id="701" pos-id="" label-id="Fondamentales" icon-id="linear.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id="4"/>
|
||||
<popup-item item-id="702" pos-id="" label-id="Centre de gravité" icon-id="centergravity.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="703" pos-id="" label-id="Axes d'inertie" icon-id="axisinertia.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id="7"/>
|
||||
<submenu label-id="Dimensions" item-id="704" pos-id="8">
|
||||
<popup-item item-id="7041" pos-id="" label-id="Boite englobante" icon-id="bounding.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="7042" pos-id="" label-id="Distance minimale" icon-id="mindist.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id="9"/>
|
||||
<popup-item item-id="607" pos-id="" label-id="Tolérance" icon-id="tolerance.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="705" pos-id="" label-id="Tolérance" icon-id="tolerance.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="608" pos-id="" label-id="Whatis" icon-id="whatis.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="609" pos-id="" label-id="Check" icon-id="check.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="706" pos-id="" label-id="Whatis" icon-id="whatis.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="707" pos-id="" label-id="Check" icon-id="check.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
|
||||
<!-- ********************************* Tools (menubar) ************************************ -->
|
||||
<menu-item label-id="Outils" item-id="5" pos-id="">
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="5001" pos-id="" label-id="Check Géométrie" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5103" pos-id="" label-id="Check Géométrie" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5104" pos-id="" label-id="Charger Script" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
|
||||
<!-- ********************************* Settings (menubar) ********************************* -->
|
||||
<menu-item label-id="Préférences" item-id="4" pos-id="">
|
||||
<submenu label-id="Géométry" item-id="40" pos-id="-1">
|
||||
<popup-item item-id="701" pos-id="" label-id="Avec copie" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="702" pos-id="" label-id="Nommer/Ranger automatiquement" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="703" pos-id="" label-id="Couleur" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="704" pos-id="" label-id="Isos" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="705" pos-id="" label-id="Valeur d'increment" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<submenu label-id="Géométry" item-id="41" pos-id="-1">
|
||||
<popup-item item-id="411" pos-id="" label-id="Nommer/Ranger automatiquement" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="412" pos-id="" label-id="Couleur" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="413" pos-id="" label-id="Isos" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="414" pos-id="" label-id="Valeur d'increment" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id="-1"/>
|
||||
@ -150,16 +197,15 @@
|
||||
|
||||
<!-- ***************************** View (menubar) ************************************ -->
|
||||
<menu-item label-id="Affichage" item-id="2" pos-id="">
|
||||
<submenu label-id="Mode d'affichage" item-id="21" pos-id="6">
|
||||
<popup-item item-id="6021" pos-id="" label-id="Ombré" icon-id="shading.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<submenu label-id="Mode d'affichage" item-id="21" pos-id="5">
|
||||
<popup-item item-id="211" pos-id="" label-id="Ombré" icon-id="shading.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="6022" pos-id="" label-id="Afficher tout" icon-id="displayall.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6023" pos-id="" label-id="Afficher seulement" icon-id="display.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6024" pos-id="" label-id="Effacer tout" icon-id="eraseall.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6025" pos-id="" label-id="Effacer seulement" icon-id="erase.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="212" pos-id="" label-id="Afficher tout" icon-id="displayall.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="213" pos-id="" label-id="Afficher seulement" icon-id="display.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="214" pos-id="" label-id="Effacer tout" icon-id="eraseall.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="215" pos-id="" label-id="Effacer seulement" icon-id="erase.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id="7"/>
|
||||
</menu-item>
|
||||
|
||||
</menubar> <!-- MENUBAR END -->
|
||||
@ -167,80 +213,102 @@
|
||||
|
||||
<!-- ///////////////////////////////////// TOOLBARS ////////////////////////////////////// -->
|
||||
<toolbar label-id="Construction basique">
|
||||
<toolbutton-item item-id="3011" pos-id="" label-id="Point" icon-id="point2.png" tooltip-id="Point" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="3012" pos-id="" label-id="Ligne" icon-id="line.png" tooltip-id="Ligne" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="3013" pos-id="" label-id="Cercle" icon-id="circle.png" tooltip-id="Cercle" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="3014" pos-id="" label-id="Ellipse" icon-id="ellipse.png" tooltip-id="Ellipse" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="3015" pos-id="" label-id="Arc" icon-id="arc.png" tooltip-id="Arc" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="3016" pos-id="" label-id="Vecteur" icon-id="vector.png" tooltip-id="Vecteur" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="3017" pos-id="" label-id="Plan" icon-id="plane.png" tooltip-id="Plan" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="3018" pos-id="" label-id="Plan de travail" icon-id="planeWorking.png" tooltip-id="Plan de travail" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4011" pos-id="" label-id="Point" icon-id="point2.png" tooltip-id="Point" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4012" pos-id="" label-id="Ligne" icon-id="line.png" tooltip-id="Ligne" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4013" pos-id="" label-id="Cercle" icon-id="circle.png" tooltip-id="Cercle" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4014" pos-id="" label-id="Ellipse" icon-id="ellipse.png" tooltip-id="Ellipse" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4015" pos-id="" label-id="Arc" icon-id="arc.png" tooltip-id="Arc" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4016" pos-id="" label-id="Vecteur" icon-id="vector.png" tooltip-id="Vecteur" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4017" pos-id="" label-id="Plan" icon-id="plane.png" tooltip-id="Plan" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4018" pos-id="" label-id="Plan de travail" icon-id="planeWorking.png" tooltip-id="Plan de travail" accel-id="" toggle-id="" execute-action=""/>
|
||||
</toolbar>
|
||||
|
||||
<toolbar label-id="Primitives">
|
||||
<toolbutton-item item-id="3021" label-id="Boite" icon-id="box.png" tooltip-id="Construction d'une boite" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="3022" label-id="Cylindre" icon-id="cylinder.png" tooltip-id="Construction d'un cylindre" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="3023" label-id="Sphère" icon-id="sphere.png" tooltip-id="Construction d'une sphère" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="3024" label-id="Tore" icon-id="torus.png" tooltip-id="Construction d'un tore" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4021" label-id="Boite" icon-id="box.png" tooltip-id="Construction d'une boite" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4022" label-id="Cylindre" icon-id="cylinder.png" tooltip-id="Construction d'un cylindre" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4023" label-id="Sphère" icon-id="sphere.png" tooltip-id="Construction d'une sphère" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4024" label-id="Tore" icon-id="torus.png" tooltip-id="Construction d'un tore" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4025" label-id="Cone" icon-id="cone.png" tooltip-id="Cone" accel-id="" toggle-id="" execute-action=""/>
|
||||
</toolbar>
|
||||
|
||||
<toolbar label-id="Opé. Booléennes">
|
||||
<toolbutton-item item-id="4011" label-id="Union" icon-id="fuse.png" tooltip-id="Union de deux shapes" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4012" label-id="Commun" icon-id="common.png" tooltip-id="Partie commune entre deux shapes" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4013" label-id="Couper" icon-id="cut.png" tooltip-id="Coupe la première shape par la seconde" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4014" label-id="Section" icon-id="section.png" tooltip-id="Section entre deux shapes" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5011" label-id="Union" icon-id="fuse.png" tooltip-id="Union de deux shapes" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5012" label-id="Commun" icon-id="common.png" tooltip-id="Partie commune entre deux shapes" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5013" label-id="Couper" icon-id="cut.png" tooltip-id="Coupe la première shape par la seconde" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5014" label-id="Section" icon-id="section.png" tooltip-id="Section entre deux shapes" accel-id="" toggle-id="" execute-action=""/>
|
||||
</toolbar>
|
||||
|
||||
<toolbar label-id="Construction">
|
||||
<toolbutton-item item-id="4031" label-id="Extrusion" icon-id="prism.png" tooltip-id="Shape construite par extrusion" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4032" label-id="Révolution" icon-id="revol.png" tooltip-id="Shape construite par révolution" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4033" pos-id="" label-id="'Filling'" icon-id="filling.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4034" pos-id="" label-id="'Pipe' création" icon-id="pipe.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4033" label-id="Filling" icon-id="filling.png" tooltip-id="Generation by filling" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4034" label-id="Pipe" icon-id="pipe.png" tooltip-id="Pipe mode generation" accel-id="" toggle-id="" execute-action=""/>
|
||||
</toolbar>
|
||||
|
||||
<toolbar label-id="Transformation">
|
||||
<toolbutton-item item-id="4021" label-id="Translation" icon-id="translation.png" tooltip-id="Translation d'une shape"accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4022" label-id="Rotation" icon-id="rotate.png" tooltip-id="Rotation d'une shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4023" label-id="Symétrie" icon-id="mirrorPlane.png" tooltip-id="Symétrie" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4024" label-id="Facteur d'échelle" icon-id="scale.png" tooltip-id="Facteur d'échelle" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5021" label-id="Translation" icon-id="translation.png" tooltip-id="Translation d'une shape"accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5022" label-id="Rotation" icon-id="rotate.png" tooltip-id="Rotation d'une shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5023" label-id="Position" icon-id="position.png" tooltip-id="Position a shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5024" label-id="Symétrie" icon-id="mirrorPlane.png" tooltip-id="Symétrie" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5025" label-id="Facteur d'échelle" icon-id="scale.png" tooltip-id="Facteur d'échelle" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separatorTB/>
|
||||
<toolbutton-item item-id="4030" label-id="Multi-Translation" icon-id="multitranslation.png" tooltip-id="Multi-translation d'une shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="4040" label-id="Multi-Rotation" icon-id="multirotation.png" tooltip-id="Multi-rotation d'une shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5026" label-id="Multi-Translation" icon-id="multitranslation.png" tooltip-id="Multi-translation d'une shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5027" label-id="Multi-Rotation" icon-id="multirotation.png" tooltip-id="Multi-rotation d'une shape" accel-id="" toggle-id="" execute-action=""/>
|
||||
</toolbar>
|
||||
|
||||
|
||||
<!-- ################################# POPUP MENU ################################# -->
|
||||
<popupmenu label-id="Menu contextuel du Viewer" context-id="" parent-id="Viewer" object-id="">
|
||||
<submenu label-id="Propriétés" item-id="803" pos-id="6">
|
||||
<popup-item item-id="8021" pos-id="" label-id="Filaire/Ombré" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="8031" pos-id="" label-id="Filaire/Ombré" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="8031" pos-id="" label-id="Couleur" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="8032" pos-id="" label-id="Transparence" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="8033" pos-id="" label-id="Isos" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="8032" pos-id="" label-id="Couleur" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="8033" pos-id="" label-id="Transparence" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="8034" pos-id="" label-id="Isos" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="801" pos-id="" label-id="Ajouter dans l'étude" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="804" pos-id="" label-id="Ajouter dans l'étude" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Menu contextuel" context-id="" parent-id="ObjectBrowser" object-id="">
|
||||
<popup-item item-id="9024" pos-id="" label-id="Ouverture" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="901" pos-id="2" label-id="Renommer" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="901" pos-id="" label-id="Renommer" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Assembly">
|
||||
<popup-item item-id="901" pos-id="" label-id="Renommer" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="61201" pos-id="" label-id="Ajouter un Contact" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Contact">
|
||||
<popup-item item-id="901" pos-id="" label-id="Renommer" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="6131" pos-id="" label-id="Position" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6132" pos-id="" label-id="Rotation" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6133" pos-id="" label-id="Translation" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Animation">
|
||||
<popup-item item-id="901" pos-id="" label-id="Renommer" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="6141" pos-id="" label-id="Lancer l'Animation" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Sketch" context-id="Sketch" parent-id="Viewer" object-id="">
|
||||
<popup-item item-id="10000" pos-id="" label-id="Segment" icon-id="" tooltip-id="" accel-id="" toggle-id="true" execute-action=""/>
|
||||
<popup-item item-id="10001" pos-id="" label-id="Arc" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4041" pos-id="" label-id="Segment" icon-id="" tooltip-id="" accel-id="" toggle-id="true" execute-action=""/>
|
||||
<popup-item item-id="4042" pos-id="" label-id="Arc" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="10002" pos-id="" label-id="Set Angle" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="10003" pos-id="" label-id="Set X" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="10004" pos-id="" label-id="Set Y" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4043" pos-id="" label-id="Set Angle" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4044" pos-id="" label-id="Set X" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4045" pos-id="" label-id="Set Y" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="10006" pos-id="" label-id="Undo" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4046" pos-id="" label-id="Undo" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="10007" pos-id="" label-id="End" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="10008" pos-id="" label-id="Close" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4047" pos-id="" label-id="End" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="4048" pos-id="" label-id="Close" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
</desktop> <!-- DESKTOP END -->
|
||||
|
BIN
resources/anim_first.png
Normal file
After Width: | Height: | Size: 273 B |
BIN
resources/anim_last.png
Normal file
After Width: | Height: | Size: 268 B |
BIN
resources/anim_next.png
Normal file
After Width: | Height: | Size: 256 B |
BIN
resources/anim_play.png
Normal file
After Width: | Height: | Size: 223 B |
BIN
resources/anim_prev.png
Normal file
After Width: | Height: | Size: 261 B |
BIN
resources/anim_stop.png
Normal file
After Width: | Height: | Size: 195 B |
BIN
resources/animation.png
Normal file
After Width: | Height: | Size: 330 B |
BIN
resources/assembly.png
Normal file
After Width: | Height: | Size: 285 B |
BIN
resources/contact.png
Normal file
After Width: | Height: | Size: 209 B |
BIN
resources/position.png
Normal file
After Width: | Height: | Size: 311 B |
BIN
resources/positionface.png
Normal file
After Width: | Height: | Size: 306 B |
BIN
resources/positionpoint.png
Normal file
After Width: | Height: | Size: 310 B |
BIN
resources/positionvect.png
Normal file
After Width: | Height: | Size: 310 B |
BIN
resources/tree_animation.png
Normal file
After Width: | Height: | Size: 163 B |
BIN
resources/tree_assembly.png
Normal file
After Width: | Height: | Size: 151 B |
BIN
resources/tree_contact.png
Normal file
After Width: | Height: | Size: 144 B |
@ -61,7 +61,7 @@ LIB_MOC = \
|
||||
BasicGUI_PlaneDlg.h \
|
||||
BasicGUI_WorkingPlaneDlg.h
|
||||
|
||||
LIB_CLIENT_IDL =
|
||||
LIB_CLIENT_IDL = GEOM_Kinematic.idl
|
||||
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
|
@ -53,7 +53,7 @@ LIB_MOC = \
|
||||
BooleanGUI_CutDlg.h \
|
||||
BooleanGUI_SectionDlg.h
|
||||
|
||||
LIB_CLIENT_IDL =
|
||||
LIB_CLIENT_IDL = GEOM_Kinematic.idl
|
||||
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
|
@ -57,7 +57,7 @@ LIB_MOC = \
|
||||
BuildGUI_SolidDlg.h \
|
||||
BuildGUI_CompoundDlg.h
|
||||
|
||||
LIB_CLIENT_IDL =
|
||||
LIB_CLIENT_IDL = GEOM_Kinematic.idl
|
||||
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
|
@ -232,6 +232,11 @@ void DisplayGUI::BuildPresentation(const Handle(SALOME_InteractiveObject)& theIO
|
||||
if(theIO.IsNull())
|
||||
MESSAGE("BuildPresentation(): null SALOME_InteractiveObject passed")
|
||||
|
||||
Standard_Boolean testResult;
|
||||
GEOM::GEOM_Shape_var myGeomShape = myDisplayGUI->myGeomBase->ConvertIOinGEOMShape(theIO, testResult);
|
||||
if(!testResult)
|
||||
return;
|
||||
|
||||
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) {
|
||||
// VTK
|
||||
|
||||
|
@ -45,7 +45,7 @@ LIB_SRC = DisplayGUI.cxx
|
||||
LIB_MOC = \
|
||||
DisplayGUI.h
|
||||
|
||||
LIB_CLIENT_IDL = SALOME_Exception.idl
|
||||
LIB_CLIENT_IDL = SALOME_Exception.idl GEOM_Kinematic.idl
|
||||
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
|
@ -47,7 +47,7 @@ LIB_MOC = \
|
||||
EntityGUI.h \
|
||||
EntityGUI_SubShapeDlg.h
|
||||
|
||||
LIB_CLIENT_IDL =
|
||||
LIB_CLIENT_IDL = GEOM_Kinematic.idl
|
||||
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
|
152
src/GEOM/GEOM_Animation_i.cc
Normal file
@ -0,0 +1,152 @@
|
||||
// GEOM GEOM :
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOM_Animation_i.cc
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "GEOM_Animation_i.hh"
|
||||
|
||||
//=================================================================================
|
||||
// function : GEOM_Animation_i() constructor (no arguments)
|
||||
// purpose : for what now ?
|
||||
//=================================================================================
|
||||
GEOM_Animation_i::GEOM_Animation_i()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : constructor
|
||||
// purpose : constructor for servant creation
|
||||
//=================================================================================
|
||||
GEOM_Animation_i::GEOM_Animation_i(Kinematic_Animation* Animation,
|
||||
GEOM::GEOM_Assembly_ptr Ass,
|
||||
GEOM::GEOM_Shape_ptr Frame)
|
||||
{
|
||||
_Animation = Animation;
|
||||
_Ass = GEOM::GEOM_Assembly::_duplicate(Ass);
|
||||
_Frame = GEOM::GEOM_Shape::_duplicate(Frame);
|
||||
|
||||
_shapeid = "";
|
||||
_studyshapeid = "";
|
||||
|
||||
_name = "";
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : destructor
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM_Animation_i::~GEOM_Animation_i() { delete &_Animation; }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetAssembly()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::GEOM_Assembly_ptr GEOM_Animation_i::GetAssembly() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return GEOM::GEOM_Assembly::_duplicate(_Ass);
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetFrame()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::GEOM_Shape_ptr GEOM_Animation_i::GetFrame() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return GEOM::GEOM_Shape::_duplicate(_Frame);
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetDuration()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Double GEOM_Animation_i::GetDuration() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _Animation->Duration();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetNbSeq()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Long GEOM_Animation_i::GetNbSeq() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _Animation->NbSeq();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : Name (set method)
|
||||
// purpose : to set the attribute 'name'.
|
||||
// : WARNING : Register to naming service actually removed !
|
||||
//=================================================================================
|
||||
void GEOM_Animation_i::Name(const char* name)
|
||||
{
|
||||
_name = strdup(name);
|
||||
GEOM::GEOM_Animation_ptr g = GEOM::GEOM_Animation::_narrow(_this());
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : Name (get method)
|
||||
// purpose : to get the attribute 'name' of this shape
|
||||
//=================================================================================
|
||||
char* GEOM_Animation_i::Name() { return strdup(_name); }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ShapeId
|
||||
// purpose : to get the id of this shape from GEOM (OCAF entry)
|
||||
//=================================================================================
|
||||
char* GEOM_Animation_i::ShapeId() { return strdup(_shapeid); }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ShapeId (set method)
|
||||
// purpose : to set the id of this shape in GEOM/OCAF doc
|
||||
//=================================================================================
|
||||
void GEOM_Animation_i::ShapeId(const char * shapeid) { _shapeid = strdup(shapeid); }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : StudyShapeId (get method)
|
||||
// purpose : to get the id of this shape from the study document (OCAF entry)
|
||||
//=================================================================================
|
||||
char* GEOM_Animation_i::StudyShapeId() { return strdup(_studyshapeid) ; }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : StudyShapeId (set method)
|
||||
// purpose : to set the id of this shape in the Study document (OCAF entry)
|
||||
//=================================================================================
|
||||
void GEOM_Animation_i::StudyShapeId(const char * studyshapeid)
|
||||
{ _studyshapeid = strdup(studyshapeid); }
|
88
src/GEOM/GEOM_Animation_i.hh
Normal file
@ -0,0 +1,88 @@
|
||||
// GEOM GEOM :
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOM_Animation_i.hh
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header$
|
||||
|
||||
#ifndef __GEOM_ANIMATION_I_H__
|
||||
#define __GEOM_ANIMATION_I_H__
|
||||
|
||||
// IDL headers
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(GEOM_Gen)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Shape)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Kinematic)
|
||||
|
||||
#include "GEOM_Shape_i.hh"
|
||||
#include "Kinematic_Animation.hxx"
|
||||
|
||||
//=====================================================================
|
||||
// GEOM_Animation_i : class definition
|
||||
//=====================================================================
|
||||
class GEOM_Animation_i:
|
||||
public POA_GEOM::GEOM_Animation
|
||||
{
|
||||
public:
|
||||
GEOM_Animation_i();
|
||||
GEOM_Animation_i(Kinematic_Animation* Animation,
|
||||
GEOM::GEOM_Assembly_ptr Ass,
|
||||
GEOM::GEOM_Shape_ptr Frame);
|
||||
|
||||
~GEOM_Animation_i();
|
||||
|
||||
private:
|
||||
Kinematic_Animation* _Animation;
|
||||
GEOM::GEOM_Assembly_ptr _Ass;
|
||||
GEOM::GEOM_Shape_ptr _Frame;
|
||||
|
||||
char* _name;
|
||||
char* _shapeid;
|
||||
char* _studyshapeid; // exists only if added in the study document
|
||||
|
||||
public:
|
||||
GEOM::GEOM_Assembly_ptr GetAssembly()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::GEOM_Shape_ptr GetFrame()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double GetDuration()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long GetNbSeq()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
char* Name();
|
||||
void Name(const char* name);
|
||||
|
||||
char* ShapeId();
|
||||
void ShapeId(const char* shapeid);
|
||||
|
||||
char* StudyShapeId();
|
||||
void StudyShapeId(const char* studyshapeid);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
149
src/GEOM/GEOM_Assembly_i.cc
Normal file
@ -0,0 +1,149 @@
|
||||
// GEOM GEOM :
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOM_Assembly_i.cc
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "GEOM_Assembly_i.hh"
|
||||
|
||||
//=================================================================================
|
||||
// function : GEOM_Assembly_i() constructor (no arguments)
|
||||
// purpose : for what now ?
|
||||
//=================================================================================
|
||||
GEOM_Assembly_i::GEOM_Assembly_i()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : constructor
|
||||
// purpose : constructor for servant creation
|
||||
//=================================================================================
|
||||
GEOM_Assembly_i::GEOM_Assembly_i(Kinematic_Assembly* Ass)
|
||||
{
|
||||
_Ass = Ass;
|
||||
|
||||
_aContactList.length(0);
|
||||
_NbContact = 0;
|
||||
|
||||
_shapeid = "";
|
||||
_studyshapeid = "";
|
||||
|
||||
_name = "";
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : destructor
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM_Assembly_i::~GEOM_Assembly_i() { delete &_Ass; }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : AddContact()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void GEOM_Assembly_i::AddContact(GEOM::GEOM_Contact_ptr aContact) throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
_aContactList.length(_NbContact + 1);
|
||||
_aContactList[_NbContact] = GEOM::GEOM_Contact::_duplicate(aContact);
|
||||
_NbContact++;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetContactList()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::ListOfContact* GEOM_Assembly_i::GetContactList() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
GEOM::ListOfContact_var aContactList = new GEOM::ListOfContact;
|
||||
aContactList->length(_aContactList.length());
|
||||
for(int i = 0; i < _NbContact; i++) {
|
||||
aContactList[i] = GEOM::GEOM_Contact::_duplicate(_aContactList[i]);
|
||||
}
|
||||
return aContactList._retn();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : NbContacts()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Long GEOM_Assembly_i::NbContacts() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _NbContact;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : Name (set method)
|
||||
// purpose : to set the attribute 'name'.
|
||||
// : WARNING : Register to naming service actually removed !
|
||||
//=================================================================================
|
||||
void GEOM_Assembly_i::Name(const char* name)
|
||||
{
|
||||
_name = strdup(name);
|
||||
GEOM::GEOM_Assembly_ptr g = GEOM::GEOM_Assembly::_narrow(_this());
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : Name (get method)
|
||||
// purpose : to get the attribute 'name' of this shape
|
||||
//=================================================================================
|
||||
char* GEOM_Assembly_i::Name() { return strdup(_name); }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ShapeId
|
||||
// purpose : to get the id of this shape from GEOM (OCAF entry)
|
||||
//=================================================================================
|
||||
char* GEOM_Assembly_i::ShapeId() { return strdup(_shapeid); }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ShapeId (set method)
|
||||
// purpose : to set the id of this shape in GEOM/OCAF doc
|
||||
//=================================================================================
|
||||
void GEOM_Assembly_i::ShapeId(const char * shapeid) { _shapeid = strdup(shapeid); }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : StudyShapeId (get method)
|
||||
// purpose : to get the id of this shape from the study document (OCAF entry)
|
||||
//=================================================================================
|
||||
char* GEOM_Assembly_i::StudyShapeId() { return strdup(_studyshapeid) ; }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : StudyShapeId (set method)
|
||||
// purpose : to set the id of this shape in the Study document (OCAF entry)
|
||||
//=================================================================================
|
||||
void GEOM_Assembly_i::StudyShapeId(const char * studyshapeid)
|
||||
{ _studyshapeid = strdup(studyshapeid); }
|
83
src/GEOM/GEOM_Assembly_i.hh
Normal file
@ -0,0 +1,83 @@
|
||||
// GEOM GEOM :
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOM_Assembly_i.hh
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header$
|
||||
|
||||
#ifndef __GEOM_ASSEMBLY_I_H__
|
||||
#define __GEOM_ASSEMBLY_I_H__
|
||||
|
||||
// IDL headers
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(GEOM_Gen)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Shape)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Kinematic)
|
||||
|
||||
#include "Kinematic_Assembly.hxx"
|
||||
|
||||
//=====================================================================
|
||||
// GEOM_Assembly_i : class definition
|
||||
//=====================================================================
|
||||
class GEOM_Assembly_i:
|
||||
public POA_GEOM::GEOM_Assembly
|
||||
{
|
||||
public:
|
||||
GEOM_Assembly_i();
|
||||
GEOM_Assembly_i(Kinematic_Assembly* Ass);
|
||||
|
||||
~GEOM_Assembly_i();
|
||||
|
||||
private:
|
||||
Kinematic_Assembly* _Ass;
|
||||
|
||||
GEOM::ListOfContact _aContactList;
|
||||
CORBA::Long _NbContact;
|
||||
|
||||
char* _name;
|
||||
char* _shapeid;
|
||||
char* _studyshapeid; // exists only if added in the study document
|
||||
|
||||
public:
|
||||
void AddContact(GEOM::GEOM_Contact_ptr aContact)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::ListOfContact* GetContactList()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long NbContacts()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
char* Name();
|
||||
void Name(const char* name);
|
||||
|
||||
char* ShapeId();
|
||||
void ShapeId(const char* shapeid);
|
||||
|
||||
char* StudyShapeId();
|
||||
void StudyShapeId(const char* studyshapeid);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
214
src/GEOM/GEOM_Contact_i.cc
Normal file
@ -0,0 +1,214 @@
|
||||
// GEOM GEOM :
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOM_Contact_i.cc
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "GEOM_Contact_i.hh"
|
||||
#include "GEOM_Position_i.hh"
|
||||
#include "GEOM_Rotation_i.hh"
|
||||
#include "GEOM_Translation_i.hh"
|
||||
|
||||
//=================================================================================
|
||||
// function : GEOM_Contact_i() constructor (no arguments)
|
||||
// purpose : for what now ?
|
||||
//=================================================================================
|
||||
GEOM_Contact_i::GEOM_Contact_i()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : constructor
|
||||
// purpose : constructor for servant creation
|
||||
//=================================================================================
|
||||
GEOM_Contact_i::GEOM_Contact_i(Kinematic_Contact* Contact,
|
||||
GEOM::GEOM_Shape_ptr Shape1,
|
||||
GEOM::GEOM_Shape_ptr Shape2,
|
||||
GEOM::GEOM_Gen_ptr engine)
|
||||
{
|
||||
_Contact = Contact;
|
||||
_Shape1 = GEOM::GEOM_Shape::_duplicate(Shape1);
|
||||
_Shape2 = GEOM::GEOM_Shape::_duplicate(Shape2);
|
||||
|
||||
GEOM::PointStruct p0 = engine->MakePointStruct(Contact->Position().Origin().X(),
|
||||
Contact->Position().Origin().Y(),
|
||||
Contact->Position().Origin().Z());
|
||||
GEOM::PointStruct pX = engine->MakePointStruct(Contact->Position().DirX().X(),
|
||||
Contact->Position().DirX().Y(),
|
||||
Contact->Position().DirX().Z());
|
||||
GEOM::PointStruct pY = engine->MakePointStruct(Contact->Position().DirY().X(),
|
||||
Contact->Position().DirY().Y(),
|
||||
Contact->Position().DirY().Z());
|
||||
GEOM::PointStruct pZ = engine->MakePointStruct(Contact->Position().DirZ().X(),
|
||||
Contact->Position().DirZ().Y(),
|
||||
Contact->Position().DirZ().Z());
|
||||
GEOM::DirStruct VX = engine->MakeDirection(pX);
|
||||
GEOM::DirStruct VY = engine->MakeDirection(pY);
|
||||
GEOM::DirStruct VZ = engine->MakeDirection(pZ);
|
||||
GEOM_Position_i * Position_servant = new GEOM_Position_i(p0, VX, VY, VZ);
|
||||
_Position = GEOM::GEOM_Position::_narrow(Position_servant->_this());
|
||||
|
||||
GEOM_Rotation_i * Rotation_servant = new GEOM_Rotation_i(Contact->Rotation().Rot1(),
|
||||
Contact->Rotation().Rot2(),
|
||||
Contact->Rotation().Rot3(),
|
||||
Contact->Rotation().ValX(),
|
||||
Contact->Rotation().ValY(),
|
||||
Contact->Rotation().ValZ());
|
||||
_Rotation = GEOM::GEOM_Rotation::_narrow(Rotation_servant->_this());
|
||||
GEOM_Translation_i * Translation_servant = new GEOM_Translation_i(0, 0, 0);
|
||||
_Translation = GEOM::GEOM_Translation::_narrow(Translation_servant->_this());
|
||||
|
||||
_shapeid = "";
|
||||
_studyshapeid = "";
|
||||
|
||||
_name = "";
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : destructor
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM_Contact_i::~GEOM_Contact_i() { delete &_Contact; }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetType()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Long GEOM_Contact_i::GetType() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _Contact->Type();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetShape1()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::GEOM_Shape_ptr GEOM_Contact_i::GetShape1() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return GEOM::GEOM_Shape::_duplicate(_Shape1);
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetShape2()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::GEOM_Shape_ptr GEOM_Contact_i::GetShape2() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return GEOM::GEOM_Shape::_duplicate(_Shape2);
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetPosition()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::GEOM_Position_ptr GEOM_Contact_i::GetPosition() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return GEOM::GEOM_Position::_duplicate(_Position);
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetRotation()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::GEOM_Rotation_ptr GEOM_Contact_i::GetRotation() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return GEOM::GEOM_Rotation::_duplicate(_Rotation);
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetTranslation()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::GEOM_Translation_ptr GEOM_Contact_i::GetTranslation() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return GEOM::GEOM_Translation::_duplicate(_Translation);
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetStep()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Double GEOM_Contact_i::GetStep() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _Contact->Step();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : Name (set method)
|
||||
// purpose : to set the attribute 'name'.
|
||||
// : WARNING : Register to naming service actually removed !
|
||||
//=================================================================================
|
||||
void GEOM_Contact_i::Name(const char* name)
|
||||
{
|
||||
_name = strdup(name);
|
||||
GEOM::GEOM_Contact_ptr g = GEOM::GEOM_Contact::_narrow(_this());
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : Name (get method)
|
||||
// purpose : to get the attribute 'name' of this shape
|
||||
//=================================================================================
|
||||
char* GEOM_Contact_i::Name() { return strdup(_name); }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ShapeId
|
||||
// purpose : to get the id of this shape from GEOM (OCAF entry)
|
||||
//=================================================================================
|
||||
char* GEOM_Contact_i::ShapeId() { return strdup(_shapeid); }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ShapeId (set method)
|
||||
// purpose : to set the id of this shape in GEOM/OCAF doc
|
||||
//=================================================================================
|
||||
void GEOM_Contact_i::ShapeId(const char * shapeid) { _shapeid = strdup(shapeid); }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : StudyShapeId (get method)
|
||||
// purpose : to get the id of this shape from the study document (OCAF entry)
|
||||
//=================================================================================
|
||||
char* GEOM_Contact_i::StudyShapeId() { return strdup(_studyshapeid) ; }
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : StudyShapeId (set method)
|
||||
// purpose : to set the id of this shape in the Study document (OCAF entry)
|
||||
//=================================================================================
|
||||
void GEOM_Contact_i::StudyShapeId(const char * studyshapeid)
|
||||
{ _studyshapeid = strdup(studyshapeid); }
|
101
src/GEOM/GEOM_Contact_i.hh
Normal file
@ -0,0 +1,101 @@
|
||||
// GEOM GEOM :
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOM_Contact_i.hh
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header$
|
||||
|
||||
#ifndef __GEOM_CONTACT_I_H__
|
||||
#define __GEOM_CONTACT_I_H__
|
||||
|
||||
// IDL headers
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(GEOM_Gen)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Shape)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Kinematic)
|
||||
|
||||
#include "GEOM_Shape_i.hh"
|
||||
#include "Kinematic_Contact.hxx"
|
||||
|
||||
//=====================================================================
|
||||
// GEOM_Contact_i : class definition
|
||||
//=====================================================================
|
||||
class GEOM_Contact_i:
|
||||
public POA_GEOM::GEOM_Contact
|
||||
{
|
||||
public:
|
||||
GEOM_Contact_i();
|
||||
GEOM_Contact_i(Kinematic_Contact* Contact,
|
||||
GEOM::GEOM_Shape_ptr Shape1,
|
||||
GEOM::GEOM_Shape_ptr Shape2,
|
||||
GEOM::GEOM_Gen_ptr engine);
|
||||
|
||||
~GEOM_Contact_i();
|
||||
|
||||
private:
|
||||
Kinematic_Contact* _Contact;
|
||||
GEOM::GEOM_Shape_ptr _Shape1;
|
||||
GEOM::GEOM_Shape_ptr _Shape2;
|
||||
GEOM::GEOM_Position_ptr _Position;
|
||||
GEOM::GEOM_Rotation_ptr _Rotation;
|
||||
GEOM::GEOM_Translation_ptr _Translation;
|
||||
|
||||
char* _name;
|
||||
char* _shapeid;
|
||||
char* _studyshapeid; // exists only if added in the study document
|
||||
|
||||
public:
|
||||
CORBA::Long GetType()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::GEOM_Shape_ptr GetShape1()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::GEOM_Shape_ptr GetShape2()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::GEOM_Position_ptr GetPosition()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::GEOM_Rotation_ptr GetRotation()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::GEOM_Translation_ptr GetTranslation()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double GetStep()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
char* Name();
|
||||
void Name(const char* name);
|
||||
|
||||
char* ShapeId();
|
||||
void ShapeId(const char* shapeid);
|
||||
|
||||
char* StudyShapeId();
|
||||
void StudyShapeId(const char* studyshapeid);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
@ -46,6 +46,7 @@ using namespace std;
|
||||
#include <gp_Elips.hxx>
|
||||
#include <Geom_Plane.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <GeomFill_Line.hxx>
|
||||
@ -65,6 +66,7 @@ using namespace std;
|
||||
#endif
|
||||
#include <BRepAlgo_FaceRestrictor.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepBuilderAPI_Copy.hxx>
|
||||
#include <BRepAlgoAPI_Common.hxx>
|
||||
#include <BRepAlgoAPI_Cut.hxx>
|
||||
@ -146,6 +148,8 @@ using namespace std;
|
||||
#include <TDF_Label.hxx>
|
||||
#include <TDataStd_Name.hxx>
|
||||
#include <TDataStd_Comment.hxx>
|
||||
#include <TDataStd_Integer.hxx>
|
||||
#include <TDataStd_Real.hxx>
|
||||
#include <TDF_Reference.hxx>
|
||||
#include <TDF_Data.hxx>
|
||||
#include <TNaming_Builder.hxx>
|
||||
@ -213,6 +217,18 @@ char* GEOM_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
|
||||
if (!CORBA::is_nil(aShape)) {
|
||||
return strdup(aShape->ShapeId());
|
||||
}
|
||||
GEOM::GEOM_Assembly_var aAssembly = GEOM::GEOM_Assembly::_narrow(_orb->string_to_object(IORString));
|
||||
if (!CORBA::is_nil(aAssembly)) {
|
||||
return strdup(aAssembly->ShapeId());
|
||||
}
|
||||
GEOM::GEOM_Contact_var aContact = GEOM::GEOM_Contact::_narrow(_orb->string_to_object(IORString));
|
||||
if (!CORBA::is_nil(aContact)) {
|
||||
return strdup(aContact->ShapeId());
|
||||
}
|
||||
GEOM::GEOM_Animation_var aAnimation = GEOM::GEOM_Animation::_narrow(_orb->string_to_object(IORString));
|
||||
if (!CORBA::is_nil(aAnimation)) {
|
||||
return strdup(aAnimation->ShapeId());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -238,110 +254,227 @@ char* GEOM_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
|
||||
TDF_Label Lab;
|
||||
TDF_Tool::Label(aDoc->GetData(), aPersRefString, Lab );
|
||||
|
||||
Handle(TNaming_NamedShape) NS;
|
||||
Lab.FindAttribute( TNaming_NamedShape::GetID(), NS );
|
||||
TopoDS_Shape S = TNaming_Tool::GetShape(NS);
|
||||
|
||||
/* shapetype, index=0, topo, orb, shapetype, ismain=true and name are setted and modified later ? */
|
||||
GEOM::GEOM_Shape_var result = CreateObject(S);
|
||||
GEOMDS_Commands GC( aDoc->Main() ) ;
|
||||
|
||||
if ( GC.HasIOR(Lab) ) { /* shape already created/loaded */
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
/******************* Dependent object (not a main shape) *********************/
|
||||
if( GC.IsDependentShape(Lab) ) {
|
||||
|
||||
TDF_Label mainLabel ;
|
||||
Standard_Boolean mainShapeOk = GC.GetMainShapeLabel(Lab, mainLabel) ;
|
||||
|
||||
/* Main object not yet loaded we load/create it */
|
||||
if( !GC.HasIOR(mainLabel) ) {
|
||||
|
||||
TCollection_AsciiString entry;
|
||||
TDF_Tool::Entry(mainLabel,entry);
|
||||
CORBA::String_var ent = strdup(entry.ToCString());
|
||||
|
||||
/* Create the main object recursively */
|
||||
MainIOR = LocalPersistentIDToIOR(theSObject, ent, isMultiFile, isASCII) ;
|
||||
} else {
|
||||
GC.ReturnNameIOR( mainLabel, MainIOR );
|
||||
}
|
||||
|
||||
result->MainName( TCollection_AsciiString(MainIOR).ToCString() ) ;
|
||||
result->IsMainShape(false) ;
|
||||
result->ShapeId(aPersRefString);
|
||||
|
||||
Handle(TDF_Reference) aRef;
|
||||
Lab.FindAttribute( TDF_Reference::GetID(), aRef );
|
||||
TDF_Label myL = aRef->Get() ;
|
||||
Handle(TNaming_NamedShape) NN;
|
||||
myL.FindAttribute( TNaming_NamedShape::GetID(), NN );
|
||||
TopoDS_Shape mainTopo = TNaming_Tool::GetShape(NN);
|
||||
Handle(TNaming_NamedShape) NS;
|
||||
Lab.FindAttribute( TNaming_NamedShape::GetID(), NS );
|
||||
TopoDS_Shape S;
|
||||
|
||||
GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID;
|
||||
|
||||
if(S.ShapeType() != TopAbs_COMPOUND) {
|
||||
/* to set the index of a unique sub shape (Explode All ONLY for the moment !) */
|
||||
ListOfID->length(1);
|
||||
int index = 1;
|
||||
TopTools_MapOfShape M;
|
||||
TopExp_Explorer Exp ;
|
||||
for( Exp.Init(mainTopo, TopAbs_ShapeEnum( result->ShapeType() )) ; Exp.More(); Exp.Next() ) {
|
||||
if ( M.Add(Exp.Current()) ) {
|
||||
if(Exp.Current().IsSame(S) ) {
|
||||
ListOfID[0] = index;
|
||||
break;
|
||||
}
|
||||
index++ ;
|
||||
}
|
||||
Kinematic_Assembly* Assembly = new Kinematic_Assembly();
|
||||
Kinematic_Contact* Contact = new Kinematic_Contact();
|
||||
Kinematic_Animation* Animation = new Kinematic_Animation();
|
||||
|
||||
if(GC.GetShape(Lab, S)) {
|
||||
S = TNaming_Tool::GetShape(NS);
|
||||
GEOM::GEOM_Shape_var result = CreateObject(S);
|
||||
|
||||
/******************* Dependent object (not a main shape) *********************/
|
||||
if( GC.IsDependentShape(Lab) ) {
|
||||
|
||||
TDF_Label mainLabel ;
|
||||
Standard_Boolean mainShapeOk = GC.GetMainShapeLabel(Lab, mainLabel) ;
|
||||
|
||||
/* Main object not yet loaded we load/create it */
|
||||
if( !GC.HasIOR(mainLabel) ) {
|
||||
|
||||
TCollection_AsciiString entry;
|
||||
TDF_Tool::Entry(mainLabel,entry);
|
||||
CORBA::String_var ent = strdup(entry.ToCString());
|
||||
|
||||
/* Create the main object recursively */
|
||||
MainIOR = LocalPersistentIDToIOR(theSObject, ent, isMultiFile, isASCII) ;
|
||||
} else {
|
||||
GC.ReturnNameIOR( mainLabel, MainIOR );
|
||||
}
|
||||
result->Index(ListOfID) ;
|
||||
|
||||
result->MainName( TCollection_AsciiString(MainIOR).ToCString() ) ;
|
||||
result->IsMainShape(false) ;
|
||||
result->ShapeId(aPersRefString);
|
||||
|
||||
Handle(TDF_Reference) aRef;
|
||||
Lab.FindAttribute( TDF_Reference::GetID(), aRef );
|
||||
TDF_Label myL = aRef->Get() ;
|
||||
Handle(TNaming_NamedShape) NN;
|
||||
myL.FindAttribute( TNaming_NamedShape::GetID(), NN );
|
||||
TopoDS_Shape mainTopo = TNaming_Tool::GetShape(NN);
|
||||
|
||||
GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID;
|
||||
|
||||
if(S.ShapeType() != TopAbs_COMPOUND) {
|
||||
/* to set the index of a unique sub shape (Explode All ONLY for the moment !) */
|
||||
ListOfID->length(1);
|
||||
int index = 1;
|
||||
TopTools_MapOfShape M;
|
||||
TopExp_Explorer Exp ;
|
||||
for( Exp.Init(mainTopo, TopAbs_ShapeEnum( result->ShapeType() )) ; Exp.More(); Exp.Next() ) {
|
||||
if ( M.Add(Exp.Current()) ) {
|
||||
if(Exp.Current().IsSame(S) ) {
|
||||
ListOfID[0] = index;
|
||||
break;
|
||||
}
|
||||
index++ ;
|
||||
}
|
||||
}
|
||||
result->Index(ListOfID) ;
|
||||
return result->Name();
|
||||
}
|
||||
else {
|
||||
/* Here is a TopAbs_COMPOUND : we set the list/index for a compound : containing two or more sub shapes */
|
||||
/* Warning : the Corba shape has a shapetype Compound : in GEOMDS_Client we have to retrieve the kind of */
|
||||
/* subshapes contained in this compound ! */
|
||||
TopTools_SequenceOfShape SS;
|
||||
TopoDS_Iterator it ;
|
||||
TopExp_Explorer exp ;
|
||||
TopAbs_ShapeEnum subType ;
|
||||
|
||||
/* Set all sub shapes in a sequence of shapes */
|
||||
for ( it.Initialize( S, true, true ) ; it.More(); it.Next() ) {
|
||||
subType = it.Value().ShapeType() ;
|
||||
SS.Append( it.Value() ) ;
|
||||
}
|
||||
|
||||
ListOfID->length( SS.Length() ) ;
|
||||
int j, k ; /* in TopTools_SequenceOfShape index start at 1 */
|
||||
|
||||
for( k=1; k<=SS.Length(); k++ ) {
|
||||
j = 1 ;
|
||||
for( exp.Init( mainTopo, subType ); exp.More(); exp.Next() ) {
|
||||
if( exp.Current().IsSame( SS.Value(k) ) ) {
|
||||
ListOfID[k-1] = j ;
|
||||
}
|
||||
j++ ;
|
||||
}
|
||||
}
|
||||
result->Index(ListOfID) ;
|
||||
return result->Name();
|
||||
}
|
||||
|
||||
}
|
||||
/******************* Independent object (not a sub shape) *********************/
|
||||
else {
|
||||
result->IsMainShape(true) ;
|
||||
if( !GC.AddIORNameAttribute(Lab, result->Name() ) ) {
|
||||
MESSAGE("in LocalPersistentIDToIOR, NAME/IOR attribute already exist." << endl ) ;
|
||||
}
|
||||
Handle(TNaming_NamedShape) NamedShape ;
|
||||
bool notTested = Lab.FindAttribute(TNaming_NamedShape::GetID(), NamedShape) ;
|
||||
result->ShapeId(aPersRefString);
|
||||
return result->Name();
|
||||
}
|
||||
else {
|
||||
/* Here is a TopAbs_COMPOUND : we set the list/index for a compound : containing two or more sub shapes */
|
||||
/* Warning : the Corba shape has a shapetype Compound : in GEOMDS_Client we have to retrieve the kind of */
|
||||
/* subshapes contained in this compound ! */
|
||||
TopTools_SequenceOfShape SS;
|
||||
TopoDS_Iterator it ;
|
||||
TopExp_Explorer exp ;
|
||||
TopAbs_ShapeEnum subType ;
|
||||
|
||||
/* Set all sub shapes in a sequence of shapes */
|
||||
for ( it.Initialize( S, true, true ) ; it.More(); it.Next() ) {
|
||||
subType = it.Value().ShapeType() ;
|
||||
SS.Append( it.Value() ) ;
|
||||
}
|
||||
|
||||
ListOfID->length( SS.Length() ) ;
|
||||
int j, k ; /* in TopTools_SequenceOfShape index start at 1 */
|
||||
|
||||
for( k=1; k<=SS.Length(); k++ ) {
|
||||
j = 1 ;
|
||||
for( exp.Init( mainTopo, subType ); exp.More(); exp.Next() ) {
|
||||
if( exp.Current().IsSame( SS.Value(k) ) ) {
|
||||
ListOfID[k-1] = j ;
|
||||
}
|
||||
j++ ;
|
||||
}
|
||||
}
|
||||
result->Index(ListOfID) ;
|
||||
return result->Name();
|
||||
}
|
||||
|
||||
}
|
||||
/******************* Independent object (not a sub shape) *********************/
|
||||
else {
|
||||
result->IsMainShape(true) ;
|
||||
if( !GC.AddIORNameAttribute(Lab, result->Name() ) ) {
|
||||
else if(GC.GetAssembly(Lab, *Assembly)) {
|
||||
/* Create the CORBA servant holding the TopoDS_Shape */
|
||||
GEOM_Assembly_i * Assembly_servant = new GEOM_Assembly_i(Assembly);
|
||||
GEOM::GEOM_Assembly_var result = GEOM::GEOM_Assembly::_narrow(Assembly_servant->_this());
|
||||
|
||||
/* Create and set the name (IOR of shape converted into a string) */
|
||||
string name_ior = _orb->object_to_string(result);
|
||||
result->Name(name_ior.c_str());
|
||||
|
||||
if( !GC.AddIORNameAttribute(Lab, result->Name())) {
|
||||
MESSAGE("in LocalPersistentIDToIOR, NAME/IOR attribute already exist." << endl ) ;
|
||||
}
|
||||
Handle(TNaming_NamedShape) NamedShape ;
|
||||
bool notTested = Lab.FindAttribute(TNaming_NamedShape::GetID(), NamedShape) ;
|
||||
|
||||
result->ShapeId(aPersRefString);
|
||||
return result->Name();
|
||||
return result->Name();
|
||||
}
|
||||
else if(GC.GetContact(Lab, *Contact)) {
|
||||
TDF_ChildIterator it;
|
||||
int i = 1;
|
||||
GEOM::GEOM_Shape_var aShape1;
|
||||
GEOM::GEOM_Shape_var aShape2;
|
||||
TCollection_ExtendedString str;
|
||||
Handle(TDF_Reference) aRef;
|
||||
for(it.Initialize(Lab, Standard_False); it.More(); it.Next()) {
|
||||
TDF_Label L = it.Value();
|
||||
if(i == 3) {
|
||||
L.FindAttribute(TDF_Reference::GetID(), aRef);
|
||||
TDF_Label myL = aRef->Get();
|
||||
GC.ReturnNameIOR(myL, str);
|
||||
aShape1 = GetIORFromString(TCollection_AsciiString(str).ToCString());
|
||||
}
|
||||
if(i == 4) {
|
||||
L.FindAttribute(TDF_Reference::GetID(), aRef);
|
||||
TDF_Label myL = aRef->Get();
|
||||
GC.ReturnNameIOR(myL, str);
|
||||
aShape2 = GetIORFromString(TCollection_AsciiString(str).ToCString());
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
/* Create the CORBA servant holding the TopoDS_Shape */
|
||||
GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this();
|
||||
GEOM_Contact_i * Contact_servant = new GEOM_Contact_i(Contact, aShape1, aShape2, engine);
|
||||
GEOM::GEOM_Contact_var result = GEOM::GEOM_Contact::_narrow(Contact_servant->_this());
|
||||
|
||||
/* Create and set the name (IOR of shape converted into a string) */
|
||||
string name_ior = _orb->object_to_string(result);
|
||||
result->Name(name_ior.c_str());
|
||||
|
||||
if( !GC.AddIORNameAttribute(Lab, result->Name())) {
|
||||
MESSAGE("in LocalPersistentIDToIOR, NAME/IOR attribute already exist." << endl ) ;
|
||||
}
|
||||
|
||||
result->ShapeId(aPersRefString);
|
||||
|
||||
GEOM::GEOM_Assembly_var aAssPtr;
|
||||
TDF_Label AssLab = Lab.Father();
|
||||
GC.ReturnNameIOR(AssLab, str);
|
||||
if(strcmp(TCollection_AsciiString(str).ToCString(),"") != 0) {
|
||||
CORBA::Object_var anObject = _orb->string_to_object(TCollection_AsciiString(str).ToCString());
|
||||
if(!CORBA::is_nil(anObject))
|
||||
aAssPtr = GEOM::GEOM_Assembly::_narrow(anObject.in());
|
||||
}
|
||||
aAssPtr->AddContact(result);
|
||||
|
||||
return result->Name();
|
||||
}
|
||||
else if(GC.GetAnimation(Lab, *Animation)) {
|
||||
TDF_ChildIterator it;
|
||||
int i = 1;
|
||||
GEOM::GEOM_Assembly_var aAssPtr;
|
||||
GEOM::GEOM_Shape_var aFramePtr;
|
||||
TCollection_ExtendedString str;
|
||||
Handle(TDF_Reference) aRef;
|
||||
for(it.Initialize(Lab, Standard_False); it.More(); it.Next()) {
|
||||
TDF_Label L = it.Value();
|
||||
if(i == 2) {
|
||||
L.FindAttribute(TDF_Reference::GetID(), aRef);
|
||||
TDF_Label myL = aRef->Get();
|
||||
GC.ReturnNameIOR(myL, str);
|
||||
if(strcmp(TCollection_AsciiString(str).ToCString(),"") != 0) {
|
||||
CORBA::Object_var anObject = _orb->string_to_object(TCollection_AsciiString(str).ToCString());
|
||||
if(!CORBA::is_nil(anObject))
|
||||
aAssPtr = GEOM::GEOM_Assembly::_narrow(anObject.in());
|
||||
}
|
||||
}
|
||||
if(i == 3) {
|
||||
L.FindAttribute(TDF_Reference::GetID(), aRef);
|
||||
TDF_Label myL = aRef->Get();
|
||||
GC.ReturnNameIOR(myL, str);
|
||||
aFramePtr = GetIORFromString(TCollection_AsciiString(str).ToCString());
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
/* Create the CORBA servant holding the TopoDS_Shape */
|
||||
GEOM_Animation_i * Animation_servant = new GEOM_Animation_i(Animation, aAssPtr, aFramePtr);
|
||||
GEOM::GEOM_Animation_var result = GEOM::GEOM_Animation::_narrow(Animation_servant->_this());
|
||||
|
||||
/* Create and set the name (IOR of shape converted into a string) */
|
||||
string name_ior = _orb->object_to_string(result);
|
||||
result->Name(name_ior.c_str());
|
||||
|
||||
if( !GC.AddIORNameAttribute(Lab, result->Name())) {
|
||||
MESSAGE("in LocalPersistentIDToIOR, NAME/IOR attribute already exist." << endl ) ;
|
||||
}
|
||||
|
||||
result->ShapeId(aPersRefString);
|
||||
return result->Name();
|
||||
}
|
||||
}
|
||||
|
||||
@ -4416,6 +4549,121 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeRotation( GEOM::GEOM_Shape_ptr myShape,
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : MakePosition()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePosition(GEOM::GEOM_Shape_ptr shape1,
|
||||
GEOM::GEOM_Shape_ptr shape2,
|
||||
const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID1,
|
||||
const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID2,
|
||||
const CORBA::Short typeofshape)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
GEOM::GEOM_Shape_var result;
|
||||
TopoDS_Shape tds;
|
||||
TopoDS_Shape aShape1 = GetTopoShape(shape1);
|
||||
TopoDS_Shape aShape2 = GetTopoShape(shape2);
|
||||
if(aShape1.IsNull() || aShape2.IsNull()) {
|
||||
THROW_SALOME_CORBA_EXCEPTION("MakePosition aborted : null shape during operation", SALOME::BAD_PARAM);
|
||||
}
|
||||
|
||||
try {
|
||||
gp_Trsf theTransformation;
|
||||
TopoDS_Shape S1, S2;
|
||||
|
||||
GetShapeFromIndex(aShape1, (TopAbs_ShapeEnum)typeofshape, ListOfID1[0], S1);
|
||||
GetShapeFromIndex(aShape2, (TopAbs_ShapeEnum)typeofshape, ListOfID2[0], S2);
|
||||
|
||||
if(S1.ShapeType() == TopAbs_VERTEX && S2.ShapeType() == TopAbs_VERTEX) {
|
||||
gp_Pnt Pt1 = BRep_Tool::Pnt(TopoDS::Vertex(S1));
|
||||
gp_Pnt Pt2 = BRep_Tool::Pnt(TopoDS::Vertex(S2));
|
||||
|
||||
gp_Vec theVector(Pt1, Pt2);
|
||||
theTransformation.SetTranslation(theVector);
|
||||
}
|
||||
else if(S1.ShapeType() == TopAbs_EDGE && S2.ShapeType() == TopAbs_EDGE) {
|
||||
Standard_Real f, l;
|
||||
gp_Pnt Pt1, Pt2;
|
||||
gp_Vec V1, V2;
|
||||
|
||||
Handle(Geom_Curve) C = BRep_Tool::Curve(TopoDS::Edge(S1), f, l);
|
||||
C->D1(f, Pt1, V1);
|
||||
C = BRep_Tool::Curve(TopoDS::Edge(S2), f, l);
|
||||
C->D1(f, Pt2, V2);
|
||||
|
||||
gp_Vec theVector(Pt1, Pt2);
|
||||
theTransformation.SetTranslation(theVector);
|
||||
|
||||
if(!V1.IsParallel(V2, Precision::Angular())) {
|
||||
gp_Vec VN = V1.Crossed(V2);
|
||||
double Angle = V1.Angle(V2);
|
||||
|
||||
gp_Dir D(VN.X(), VN.Y(), VN.Z());
|
||||
gp_Ax1 AX(Pt1, D);
|
||||
|
||||
gp_Trsf TheRot;
|
||||
TheRot.SetRotation(AX, Angle);
|
||||
theTransformation = theTransformation * TheRot;
|
||||
}
|
||||
}
|
||||
else if(S1.ShapeType() == TopAbs_FACE && S2.ShapeType() == TopAbs_FACE) {
|
||||
TopoDS_Edge E1, E2;
|
||||
Standard_Real f, l;
|
||||
gp_Pnt P1, P2;
|
||||
gp_Vec D1, D2, N1, N2, V1, V2;
|
||||
|
||||
TopExp_Explorer Exp1(S1, TopAbs_EDGE);
|
||||
TopExp_Explorer Exp2(S2, TopAbs_EDGE);
|
||||
|
||||
for(; Exp1.More(); Exp1.Next()) {
|
||||
E1 = TopoDS::Edge(Exp1.Current());
|
||||
if(!BRep_Tool::Degenerated(E1))
|
||||
break;
|
||||
}
|
||||
for(; Exp2.More(); Exp2.Next()) {
|
||||
E2 = TopoDS::Edge(Exp2.Current());
|
||||
if(!BRep_Tool::Degenerated(E2))
|
||||
break;
|
||||
}
|
||||
|
||||
Handle(Geom_Curve) C = BRep_Tool::Curve(E1, f, l);
|
||||
C->D1(f, P1, D1);
|
||||
Handle(Geom2d_Curve) C2 = BRep_Tool::CurveOnSurface(E1, TopoDS::Face(S1), f, l);
|
||||
gp_Pnt2d P2d = C2->Value(f);
|
||||
Handle(Geom_Surface) S = BRep_Tool::Surface(TopoDS::Face(S1));
|
||||
S->D1(P2d.X(), P2d.Y(), P1, V1, V2);
|
||||
N1 = V1^V2;
|
||||
|
||||
C = BRep_Tool::Curve(E2, f, l);
|
||||
C->D1(f, P2, D2);
|
||||
C2 = BRep_Tool::CurveOnSurface(E2, TopoDS::Face(S2), f, l);
|
||||
P2d = C2->Value(f);
|
||||
S = BRep_Tool::Surface(TopoDS::Face(S2));
|
||||
S->D1(P2d.X(), P2d.Y(), P2, V1, V2);
|
||||
N2 = V1^V2;
|
||||
|
||||
gp_Ax3 Ax1(P1, N1, D1);
|
||||
gp_Ax3 Ax2(P2, N2, D2);
|
||||
|
||||
theTransformation.SetDisplacement(Ax1, Ax2);
|
||||
}
|
||||
|
||||
BRepBuilderAPI_Transform myBRepTransformation(aShape1, theTransformation, Standard_False);
|
||||
tds = myBRepTransformation.Shape();
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::MakePosition", SALOME::BAD_PARAM);
|
||||
}
|
||||
|
||||
if(!tds.IsNull()) {
|
||||
result = CreateObject(tds);
|
||||
InsertInLabelOneArgument(aShape1, shape1, tds, result, myCurrentOCAFDoc);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : MakeScaleTransform()
|
||||
// purpose : Make a shape multipling another by a scale factor
|
||||
@ -5173,6 +5421,215 @@ void GEOM_Gen_i::ExportSTEP(const char* filename,GEOM::GEOM_Shape_ptr theShape)
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : InitAssembly()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::GEOM_Assembly_ptr GEOM_Gen_i::InitAssembly() throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
Kinematic_Assembly* tds;
|
||||
|
||||
try {
|
||||
tds = new Kinematic_Assembly();
|
||||
}
|
||||
catch(Standard_Failure)
|
||||
THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::InitAssembly", SALOME::BAD_PARAM);
|
||||
|
||||
/* Create the CORBA servant holding the TopoDS_Shape */
|
||||
GEOM_Assembly_i * Assembly_servant = new GEOM_Assembly_i(tds);
|
||||
GEOM::GEOM_Assembly_var Assembly = GEOM::GEOM_Assembly::_narrow(Assembly_servant->_this());
|
||||
|
||||
/* Create and set the name (IOR of shape converted into a string) */
|
||||
string name_ior = _orb->object_to_string(Assembly);
|
||||
Assembly->Name(name_ior.c_str());
|
||||
|
||||
GEOMDS_Commands GC(myCurrentOCAFDoc->Main());
|
||||
/* add attributs S and mystr in a new label */
|
||||
TDF_Label Lab = GC.AddAssembly(*tds, Assembly->Name());
|
||||
|
||||
TCollection_AsciiString entry;
|
||||
TDF_Tool::Entry(Lab, entry);
|
||||
const char *ent = entry.ToCString();
|
||||
|
||||
Assembly->ShapeId(ent);
|
||||
return Assembly;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : AddContact()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::GEOM_Contact_ptr GEOM_Gen_i::AddContact(GEOM::GEOM_Assembly_ptr Ass,
|
||||
GEOM::GEOM_Shape_ptr Shape1,
|
||||
GEOM::GEOM_Shape_ptr Shape2,
|
||||
const short type,
|
||||
CORBA::Double step)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
Kinematic_Contact* tds;
|
||||
TDF_Label mainRefLab;
|
||||
TDF_Tool::Label(myCurrentOCAFDoc->GetData(), Ass->ShapeId(), mainRefLab);
|
||||
|
||||
try {
|
||||
TopoDS_Shape aShape1 = GetTopoShape(Shape1);
|
||||
TopoDS_Shape aShape2 = GetTopoShape(Shape2);
|
||||
tds = new Kinematic_Contact(aShape1, aShape2, type, step);
|
||||
}
|
||||
catch(Standard_Failure)
|
||||
THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::AddContact", SALOME::BAD_PARAM);
|
||||
|
||||
/* Create the CORBA servant holding the TopoDS_Shape */
|
||||
GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this();
|
||||
GEOM_Contact_i * Contact_servant = new GEOM_Contact_i(tds, Shape1, Shape2, engine);
|
||||
GEOM::GEOM_Contact_var Contact = GEOM::GEOM_Contact::_narrow(Contact_servant->_this());
|
||||
|
||||
/* Create and set the name (IOR of shape converted into a string) */
|
||||
string name_ior = _orb->object_to_string(Contact);
|
||||
Contact->Name(name_ior.c_str());
|
||||
|
||||
GEOMDS_Commands GC(myCurrentOCAFDoc->Main());
|
||||
/* add attributs S and mystr in a new label */
|
||||
TDF_Label LabContact = GC.AddContact(*tds, mainRefLab, Contact->Name());
|
||||
|
||||
TCollection_AsciiString entry;
|
||||
TDF_Tool::Entry(LabContact, entry);
|
||||
Contact->ShapeId(entry.ToCString());
|
||||
|
||||
Ass->AddContact(Contact);
|
||||
return Contact;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : AddAnimation()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::GEOM_Animation_ptr GEOM_Gen_i::AddAnimation(GEOM::GEOM_Assembly_ptr Ass,
|
||||
GEOM::GEOM_Shape_ptr Shape1,
|
||||
CORBA::Double Duration,
|
||||
const short NbSeq)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
Kinematic_Animation* tds;
|
||||
TDF_Label mainRefLab;
|
||||
TDF_Tool::Label(myCurrentOCAFDoc->GetData(), Ass->ShapeId(), mainRefLab);
|
||||
GEOMDS_Commands GC(myCurrentOCAFDoc->Main());
|
||||
|
||||
try {
|
||||
Kinematic_Assembly* aAss = new Kinematic_Assembly();
|
||||
Standard_Boolean test = GC.GetAssembly(mainRefLab, *aAss);
|
||||
TopoDS_Shape aShape1 = GetTopoShape(Shape1);
|
||||
tds = new Kinematic_Animation(aAss, aShape1, Duration, NbSeq);
|
||||
}
|
||||
catch(Standard_Failure)
|
||||
THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::AddAnimation", SALOME::BAD_PARAM);
|
||||
|
||||
/* Create the CORBA servant holding the TopoDS_Shape */
|
||||
GEOM_Animation_i * Animation_servant = new GEOM_Animation_i(tds, Ass, Shape1);
|
||||
GEOM::GEOM_Animation_var Animation = GEOM::GEOM_Animation::_narrow(Animation_servant->_this());
|
||||
|
||||
/* Create and set the name (IOR of shape converted into a string) */
|
||||
string name_ior = _orb->object_to_string(Animation);
|
||||
Animation->Name(name_ior.c_str());
|
||||
|
||||
/* add attributs S and mystr in a new label */
|
||||
TDF_Label Lab = GC.AddAnimation(*tds, mainRefLab, Animation->Name());
|
||||
|
||||
TCollection_AsciiString entry;
|
||||
TDF_Tool::Entry(Lab, entry);
|
||||
const char *ent = entry.ToCString();
|
||||
|
||||
Animation->ShapeId(ent);
|
||||
return Animation;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : SetPosition()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void GEOM_Gen_i::SetPosition(GEOM::GEOM_Contact_ptr Contact)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
try {
|
||||
TDF_Label mainRefLab;
|
||||
TDF_Tool::Label(myCurrentOCAFDoc->GetData(), Contact->ShapeId(), mainRefLab);
|
||||
GEOMDS_Commands GC(myCurrentOCAFDoc->Main());
|
||||
|
||||
GEOM::GEOM_Position_var myGeomPosition = GEOM::GEOM_Position::_narrow(Contact->GetPosition());
|
||||
GEOM::PointStruct P0 = myGeomPosition->GetOrigin();
|
||||
GEOM::DirStruct VX = myGeomPosition->GetVX();
|
||||
GEOM::DirStruct VY = myGeomPosition->GetVY();
|
||||
GEOM::DirStruct VZ = myGeomPosition->GetVZ();
|
||||
|
||||
GC.SetPosition(mainRefLab, P0.x, P0.y, P0.z,
|
||||
VX.PS.x, VX.PS.y, VX.PS.z,
|
||||
VY.PS.x, VY.PS.y, VY.PS.z,
|
||||
VZ.PS.x, VZ.PS.y, VZ.PS.z);
|
||||
}
|
||||
catch(Standard_Failure)
|
||||
THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::SetPosition", SALOME::BAD_PARAM);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : SetRotation()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void GEOM_Gen_i::SetRotation(GEOM::GEOM_Contact_ptr Contact)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
try {
|
||||
TDF_Label mainRefLab;
|
||||
TDF_Tool::Label(myCurrentOCAFDoc->GetData(), Contact->ShapeId(), mainRefLab);
|
||||
GEOMDS_Commands GC(myCurrentOCAFDoc->Main());
|
||||
|
||||
GEOM::GEOM_Rotation_var myGeomRotation = GEOM::GEOM_Rotation::_narrow(Contact->GetRotation());
|
||||
int aRot1 = myGeomRotation->GetRot1();
|
||||
int aRot2 = myGeomRotation->GetRot2();
|
||||
int aRot3 = myGeomRotation->GetRot3();
|
||||
double aVal1 = myGeomRotation->GetVal1();
|
||||
double aVal2 = myGeomRotation->GetVal2();
|
||||
double aVal3 = myGeomRotation->GetVal3();
|
||||
|
||||
GC.SetRotation(mainRefLab, aRot1, aRot2, aRot3, aVal1, aVal2, aVal3);
|
||||
}
|
||||
catch(Standard_Failure)
|
||||
THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::SetRotation", SALOME::BAD_PARAM);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : SetTranslation()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void GEOM_Gen_i::SetTranslation(GEOM::GEOM_Contact_ptr Contact)
|
||||
throw (SALOME::SALOME_Exception)
|
||||
{
|
||||
try {
|
||||
TDF_Label mainRefLab;
|
||||
TDF_Tool::Label(myCurrentOCAFDoc->GetData(), Contact->ShapeId(), mainRefLab);
|
||||
GEOMDS_Commands GC(myCurrentOCAFDoc->Main());
|
||||
|
||||
GEOM::GEOM_Translation_var myGeomTranslation = GEOM::GEOM_Translation::_narrow(Contact->GetTranslation());
|
||||
double aValX = myGeomTranslation->GetValX();
|
||||
double aValY = myGeomTranslation->GetValY();
|
||||
double aValZ = myGeomTranslation->GetValZ();
|
||||
|
||||
GC.SetTranslation(mainRefLab, aValX, aValY, aValZ);
|
||||
}
|
||||
catch(Standard_Failure)
|
||||
THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::SetTranslation", SALOME::BAD_PARAM);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=====================================================================================
|
||||
// EXPORTED METHODS
|
||||
//=====================================================================================
|
||||
|
@ -44,10 +44,14 @@
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(GEOM_Gen)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Shape)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Kinematic)
|
||||
#include CORBA_SERVER_HEADER(SALOMEDS)
|
||||
|
||||
#include "SALOME_Component_i.hxx"
|
||||
#include "GEOM_Shape_i.hh"
|
||||
#include "GEOM_Assembly_i.hh"
|
||||
#include "GEOM_Contact_i.hh"
|
||||
#include "GEOM_Animation_i.hh"
|
||||
|
||||
#include "SALOME_NamingService.hxx"
|
||||
#include <iostream.h>
|
||||
@ -396,21 +400,28 @@ class GEOM_Gen_i: public POA_GEOM::GEOM_Gen,
|
||||
//---------------------------------------------------------------------//
|
||||
// Transformations Operations //
|
||||
//---------------------------------------------------------------------//
|
||||
// Copy
|
||||
GEOM::GEOM_Shape_ptr MakeCopy( GEOM::GEOM_Shape_ptr shape)
|
||||
// Copy
|
||||
GEOM::GEOM_Shape_ptr MakeCopy(GEOM::GEOM_Shape_ptr shape)
|
||||
throw (SALOME::SALOME_Exception) ;
|
||||
|
||||
// Translation
|
||||
GEOM::GEOM_Shape_ptr MakeTranslation( GEOM::GEOM_Shape_ptr shape,
|
||||
GEOM::GEOM_Shape_ptr MakeTranslation(GEOM::GEOM_Shape_ptr shape,
|
||||
CORBA::Double x,
|
||||
CORBA::Double y,
|
||||
CORBA::Double z)
|
||||
throw (SALOME::SALOME_Exception) ;
|
||||
// Rotation
|
||||
GEOM::GEOM_Shape_ptr MakeRotation( GEOM::GEOM_Shape_ptr shape,
|
||||
GEOM::GEOM_Shape_ptr MakeRotation(GEOM::GEOM_Shape_ptr shape,
|
||||
const GEOM::AxisStruct& axis,
|
||||
CORBA::Double angle)
|
||||
throw (SALOME::SALOME_Exception) ;
|
||||
// Position
|
||||
GEOM::GEOM_Shape_ptr MakePosition(GEOM::GEOM_Shape_ptr shape1,
|
||||
GEOM::GEOM_Shape_ptr shape2,
|
||||
const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID1,
|
||||
const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID2,
|
||||
const CORBA::Short typeofshape)
|
||||
throw (SALOME::SALOME_Exception) ;
|
||||
// Create a shape using a scale factor
|
||||
GEOM::GEOM_Shape_ptr MakeScaleTransform(GEOM::GEOM_Shape_ptr shape,
|
||||
const GEOM::PointStruct& theCenterOfScale,
|
||||
@ -603,6 +614,29 @@ class GEOM_Gen_i: public POA_GEOM::GEOM_Gen,
|
||||
CORBA::Double aMeshingDeflection)
|
||||
throw (SALOME::SALOME_Exception) ;
|
||||
|
||||
//-------------------------------------------------------------------//
|
||||
// Specific method Kinematic //
|
||||
//-------------------------------------------------------------------//
|
||||
GEOM::GEOM_Assembly_ptr InitAssembly()
|
||||
throw (SALOME::SALOME_Exception) ;
|
||||
GEOM::GEOM_Contact_ptr AddContact(GEOM::GEOM_Assembly_ptr Ass,
|
||||
GEOM::GEOM_Shape_ptr Shape1,
|
||||
GEOM::GEOM_Shape_ptr Shape2,
|
||||
const short type,
|
||||
CORBA::Double step)
|
||||
throw (SALOME::SALOME_Exception) ;
|
||||
GEOM::GEOM_Animation_ptr AddAnimation(GEOM::GEOM_Assembly_ptr Ass,
|
||||
GEOM::GEOM_Shape_ptr Shape1,
|
||||
CORBA::Double Duration,
|
||||
const short NbSeq)
|
||||
throw (SALOME::SALOME_Exception) ;
|
||||
void SetPosition(GEOM::GEOM_Contact_ptr Contact)
|
||||
throw (SALOME::SALOME_Exception) ;
|
||||
void SetRotation(GEOM::GEOM_Contact_ptr Contact)
|
||||
throw (SALOME::SALOME_Exception) ;
|
||||
void SetTranslation(GEOM::GEOM_Contact_ptr Contact)
|
||||
throw (SALOME::SALOME_Exception) ;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
147
src/GEOM/GEOM_Position_i.cc
Normal file
@ -0,0 +1,147 @@
|
||||
// GEOM GEOM :
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOM_Position_i.cc
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "GEOM_Position_i.hh"
|
||||
|
||||
//=================================================================================
|
||||
// function : GEOM_Position_i() constructor (no arguments)
|
||||
// purpose : for what now ?
|
||||
//=================================================================================
|
||||
GEOM_Position_i::GEOM_Position_i()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : constructor
|
||||
// purpose : constructor for servant creation
|
||||
//=================================================================================
|
||||
GEOM_Position_i::GEOM_Position_i(const GEOM::PointStruct& P0, const GEOM::DirStruct& VX,
|
||||
const GEOM::DirStruct& VY, const GEOM::DirStruct& VZ)
|
||||
{
|
||||
|
||||
SetOrigin(P0);
|
||||
SetVX(VX);
|
||||
SetVY(VY);
|
||||
SetVZ(VZ);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : destructor
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM_Position_i::~GEOM_Position_i() {}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : SetOrigin()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void GEOM_Position_i::SetOrigin(const GEOM::PointStruct& P0)
|
||||
throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
_P0 = P0;
|
||||
return;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : SetVX()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void GEOM_Position_i::SetVX(const GEOM::DirStruct& Vect)
|
||||
throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
_VX = Vect;
|
||||
return;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : SetVY()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void GEOM_Position_i::SetVY(const GEOM::DirStruct& Vect)
|
||||
throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
_VY = Vect;
|
||||
return;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : SetVZ()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void GEOM_Position_i::SetVZ(const GEOM::DirStruct& Vect)
|
||||
throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
_VZ = Vect;
|
||||
return;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetOrigin()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::PointStruct GEOM_Position_i::GetOrigin()
|
||||
throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _P0;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetVX()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::DirStruct GEOM_Position_i::GetVX()
|
||||
throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _VX;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetVY()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::DirStruct GEOM_Position_i::GetVY()
|
||||
throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _VY;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetVZ()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM::DirStruct GEOM_Position_i::GetVZ()
|
||||
throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _VZ;
|
||||
}
|
84
src/GEOM/GEOM_Position_i.hh
Normal file
@ -0,0 +1,84 @@
|
||||
// GEOM GEOM :
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOM_Position_i.hh
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header$
|
||||
|
||||
#ifndef __GEOM_POSITION_I_H__
|
||||
#define __GEOM_POSITION_I_H__
|
||||
|
||||
// IDL headers
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(GEOM_Gen)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Shape)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Kinematic)
|
||||
|
||||
//=====================================================================
|
||||
// GEOM_Position_i : class definition
|
||||
//=====================================================================
|
||||
class GEOM_Position_i:
|
||||
public POA_GEOM::GEOM_Position
|
||||
{
|
||||
public:
|
||||
GEOM_Position_i();
|
||||
GEOM_Position_i(const GEOM::PointStruct& P0, const GEOM::DirStruct& VX,
|
||||
const GEOM::DirStruct& VY, const GEOM::DirStruct& VZ);
|
||||
|
||||
~GEOM_Position_i();
|
||||
|
||||
private:
|
||||
GEOM::PointStruct _P0;
|
||||
GEOM::DirStruct _VX;
|
||||
GEOM::DirStruct _VY;
|
||||
GEOM::DirStruct _VZ;
|
||||
|
||||
public:
|
||||
void SetOrigin(const GEOM::PointStruct& P0)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
void SetVX(const GEOM::DirStruct& Vect)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
void SetVY(const GEOM::DirStruct& Vect)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
void SetVZ(const GEOM::DirStruct& Vect)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::PointStruct GetOrigin()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::DirStruct GetVX()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::DirStruct GetVY()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
GEOM::DirStruct GetVZ()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
135
src/GEOM/GEOM_Rotation_i.cc
Normal file
@ -0,0 +1,135 @@
|
||||
// GEOM GEOM :
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOM_Rotation_i.cc
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "GEOM_Rotation_i.hh"
|
||||
|
||||
//=================================================================================
|
||||
// function : GEOM_Rotation_i() constructor (no arguments)
|
||||
// purpose : for what now ?
|
||||
//=================================================================================
|
||||
GEOM_Rotation_i::GEOM_Rotation_i()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : constructor
|
||||
// purpose : constructor for servant creation
|
||||
//=================================================================================
|
||||
GEOM_Rotation_i::GEOM_Rotation_i(CORBA::Long Rot1, CORBA::Long Rot2, CORBA::Long Rot3,
|
||||
CORBA::Double Val1, CORBA::Double Val2, CORBA::Double Val3)
|
||||
{
|
||||
|
||||
SetRotation(Rot1, Rot2, Rot3, Val1, Val2, Val3);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : destructor
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM_Rotation_i::~GEOM_Rotation_i() {}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : SetRotation()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void GEOM_Rotation_i::SetRotation(CORBA::Long Rot1, CORBA::Long Rot2, CORBA::Long Rot3,
|
||||
CORBA::Double Val1, CORBA::Double Val2, CORBA::Double Val3)
|
||||
throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
|
||||
_Rot1 = Rot1;
|
||||
_Rot2 = Rot2;
|
||||
_Rot3 = Rot3;
|
||||
|
||||
_Val1 = Val1;
|
||||
_Val2 = Val2;
|
||||
_Val3 = Val3;
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetRot1()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Long GEOM_Rotation_i::GetRot1() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _Rot1;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetRot2()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Long GEOM_Rotation_i::GetRot2() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _Rot2;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetRot3()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Long GEOM_Rotation_i::GetRot3() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _Rot3;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetVal1()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Double GEOM_Rotation_i::GetVal1() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _Val1;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetVal2()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Double GEOM_Rotation_i::GetVal2() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _Val2;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetVal3()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Double GEOM_Rotation_i::GetVal3() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _Val3;
|
||||
}
|
85
src/GEOM/GEOM_Rotation_i.hh
Normal file
@ -0,0 +1,85 @@
|
||||
// GEOM GEOM :
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOM_Rotation_i.hh
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header$
|
||||
|
||||
#ifndef __GEOM_ROTATION_I_H__
|
||||
#define __GEOM_ROTATION_I_H__
|
||||
|
||||
// IDL headers
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(GEOM_Gen)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Shape)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Kinematic)
|
||||
|
||||
//=====================================================================
|
||||
// GEOM_Rotation_i : class definition
|
||||
//=====================================================================
|
||||
class GEOM_Rotation_i:
|
||||
public POA_GEOM::GEOM_Rotation
|
||||
{
|
||||
public:
|
||||
GEOM_Rotation_i();
|
||||
GEOM_Rotation_i(CORBA::Long Rot1, CORBA::Long Rot2, CORBA::Long Rot3,
|
||||
CORBA::Double Val1, CORBA::Double Val2, CORBA::Double Val3);
|
||||
|
||||
~GEOM_Rotation_i();
|
||||
|
||||
private:
|
||||
CORBA::Long _Rot1;
|
||||
CORBA::Long _Rot2;
|
||||
CORBA::Long _Rot3;
|
||||
|
||||
CORBA::Double _Val1;
|
||||
CORBA::Double _Val2;
|
||||
CORBA::Double _Val3;
|
||||
|
||||
public:
|
||||
void SetRotation(CORBA::Long Rot1, CORBA::Long Rot2, CORBA::Long Rot3,
|
||||
CORBA::Double Val1, CORBA::Double Val2, CORBA::Double Val3)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long GetRot1()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long GetRot2()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long GetRot3()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double GetVal1()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double GetVal2()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double GetVal3()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
101
src/GEOM/GEOM_Translation_i.cc
Normal file
@ -0,0 +1,101 @@
|
||||
// GEOM GEOM :
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOM_Translation_i.cc
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "GEOM_Translation_i.hh"
|
||||
|
||||
//=================================================================================
|
||||
// function : GEOM_Translation_i() constructor (no arguments)
|
||||
// purpose : for what now ?
|
||||
//=================================================================================
|
||||
GEOM_Translation_i::GEOM_Translation_i()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : constructor
|
||||
// purpose : constructor for servant creation
|
||||
//=================================================================================
|
||||
GEOM_Translation_i::GEOM_Translation_i(CORBA::Double ValX, CORBA::Double ValY, CORBA::Double ValZ)
|
||||
{
|
||||
|
||||
SetTranslation(ValX, ValY, ValZ);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : destructor
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOM_Translation_i::~GEOM_Translation_i() {}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : SetTranslation()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void GEOM_Translation_i::SetTranslation(CORBA::Double ValX, CORBA::Double ValY, CORBA::Double ValZ)
|
||||
throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
|
||||
_ValX = ValX;
|
||||
_ValY = ValY;
|
||||
_ValZ = ValZ;
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetValX()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Double GEOM_Translation_i::GetValX() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _ValX;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetValY()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Double GEOM_Translation_i::GetValY() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _ValY;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : GetValZ()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
CORBA::Double GEOM_Translation_i::GetValZ() throw(SALOME::SALOME_Exception)
|
||||
{
|
||||
return _ValZ;
|
||||
}
|
70
src/GEOM/GEOM_Translation_i.hh
Normal file
@ -0,0 +1,70 @@
|
||||
// GEOM GEOM :
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOM_Translation_i.hh
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header$
|
||||
|
||||
#ifndef __GEOM_TRANSLATION_I_H__
|
||||
#define __GEOM_TRANSLATION_I_H__
|
||||
|
||||
// IDL headers
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(GEOM_Gen)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Shape)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Kinematic)
|
||||
|
||||
//=====================================================================
|
||||
// GEOM_Translation_i : class definition
|
||||
//=====================================================================
|
||||
class GEOM_Translation_i:
|
||||
public POA_GEOM::GEOM_Translation
|
||||
{
|
||||
public:
|
||||
GEOM_Translation_i();
|
||||
GEOM_Translation_i(CORBA::Double ValX, CORBA::Double ValY, CORBA::Double ValZ);
|
||||
|
||||
~GEOM_Translation_i();
|
||||
|
||||
private:
|
||||
CORBA::Double _ValX;
|
||||
CORBA::Double _ValY;
|
||||
CORBA::Double _ValZ;
|
||||
|
||||
public:
|
||||
void SetTranslation(CORBA::Double ValX, CORBA::Double ValY, CORBA::Double ValZ)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double GetValX()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double GetValY()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double GetValZ()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
@ -37,8 +37,8 @@ VPATH=.:@srcdir@:@top_srcdir@/idl
|
||||
# Libraries targets
|
||||
|
||||
LIB = libGEOMEngine.la
|
||||
LIB_SRC = GEOM_Shape_i.cc GEOM_Gen_i.cc
|
||||
LIB_SERVER_IDL = SALOME_Component.idl SALOMEDS.idl SALOME_Exception.idl GEOM_Gen.idl GEOM_Shape.idl
|
||||
LIB_SRC = GEOM_Shape_i.cc GEOM_Position_i.cc GEOM_Rotation_i.cc GEOM_Translation_i.cc GEOM_Contact_i.cc GEOM_Assembly_i.cc GEOM_Animation_i.cc GEOM_Gen_i.cc
|
||||
LIB_SERVER_IDL = SALOME_Component.idl SALOMEDS.idl SALOME_Exception.idl GEOM_Gen.idl GEOM_Shape.idl GEOM_Kinematic.idl
|
||||
|
||||
# Executables targets
|
||||
BIN =
|
||||
@ -51,7 +51,7 @@ EXPORT_HEADERS =
|
||||
# additionnal information to compil and link file
|
||||
CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
LDFLAGS += -lGEOMDS -lTOOLSDS -lSalomeNS -lSalomeContainer -lGEOMPartition -lGEOMArchimede $(CAS_LDPATH) -lTKIGES -lTKSTEP -lTKFillet -lTKOffset -L${KERNEL_ROOT_DIR}/lib/salome
|
||||
LDFLAGS += -lGEOMDS -lTOOLSDS -lSalomeNS -lSalomeContainer -lGEOMPartition -lGEOMArchimede -lGEOMKinematic $(CAS_LDPATH) -lTKIGES -lTKSTEP -lTKFillet -lTKOffset -L${KERNEL_ROOT_DIR}/lib/salome
|
||||
|
||||
# additional file to be cleaned
|
||||
MOSTLYCLEAN =
|
||||
|
@ -206,7 +206,28 @@ bool GEOMBase::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString
|
||||
int id = popup->idAt(0); // separator
|
||||
if(id < 0)
|
||||
popup->removeItem(id);
|
||||
|
||||
|
||||
if(theObject.compare("Assembly") == 0 || theObject.compare("Animation") == 0) {
|
||||
popup->removeItem(QAD_DisplayOnly_Popup_ID);
|
||||
popup->removeItem(QAD_Display_Popup_ID);
|
||||
popup->removeItem(QAD_Erase_Popup_ID);
|
||||
return true;
|
||||
}
|
||||
else if(theObject.compare("Contact") == 0) {
|
||||
Standard_Boolean testResult;
|
||||
Handle(SALOME_InteractiveObject) IO = Sel->firstIObject();
|
||||
GEOM::GEOM_Contact_ptr myGeomContact = myGeomBase->ConvertIOinContact(IO, testResult);
|
||||
int type = myGeomContact->GetType();
|
||||
if(type == 0 || type == 2) //EMBEDDING || SLIDE
|
||||
popup->removeItem(6132); //ROTATION
|
||||
if(type == 0 || type == 1 || type == 4) //EMBEDDING || PIVOT || SPHERICAL
|
||||
popup->removeItem(6133); //TRANSLATION
|
||||
popup->removeItem(QAD_DisplayOnly_Popup_ID);
|
||||
popup->removeItem(QAD_Display_Popup_ID);
|
||||
popup->removeItem(QAD_Erase_Popup_ID);
|
||||
return true;
|
||||
}
|
||||
|
||||
// checking for GEOM label in the selected list
|
||||
SALOME_ListIteratorOfListIO It(Sel->StoredIObjects());
|
||||
Handle(SALOME_InteractiveObject) anIObject;
|
||||
@ -349,6 +370,27 @@ bool GEOMBase::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString
|
||||
if(id < 0)
|
||||
popup->removeItem(id);
|
||||
|
||||
if(theObject.compare("Assembly") == 0 || theObject.compare("Animation") == 0) {
|
||||
popup->removeItem(QAD_DisplayOnly_Popup_ID);
|
||||
popup->removeItem(QAD_Display_Popup_ID);
|
||||
popup->removeItem(QAD_Erase_Popup_ID);
|
||||
return true;
|
||||
}
|
||||
else if(theObject.compare("Contact") == 0) {
|
||||
Standard_Boolean testResult;
|
||||
Handle(SALOME_InteractiveObject) IO = Sel->firstIObject();
|
||||
GEOM::GEOM_Contact_ptr myGeomContact = myGeomBase->ConvertIOinContact(IO, testResult);
|
||||
int type = myGeomContact->GetType();
|
||||
if(type == 0 || type == 2) //EMBEDDING || SLIDE
|
||||
popup->removeItem(6132); //ROTATION
|
||||
if(type == 0 || type == 1 || type == 4) //EMBEDDING || PIVOT || SPHERICAL
|
||||
popup->removeItem(6133); //TRANSLATION
|
||||
popup->removeItem(QAD_DisplayOnly_Popup_ID);
|
||||
popup->removeItem(QAD_Display_Popup_ID);
|
||||
popup->removeItem(QAD_Erase_Popup_ID);
|
||||
return true;
|
||||
}
|
||||
|
||||
// checking for GEOM label in the selected list
|
||||
SALOME_ListIteratorOfListIO It(Sel->StoredIObjects());
|
||||
Handle(SALOME_InteractiveObject) anIObject;
|
||||
@ -1187,6 +1229,102 @@ GEOM::GEOM_Shape_ptr GEOMBase::ConvertIOinGEOMShape(const Handle(SALOME_Interact
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : ConvertIOinAssembly()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
GEOM::GEOM_Assembly_ptr GEOMBase::ConvertIOinAssembly(const Handle(SALOME_InteractiveObject)& IO, Standard_Boolean& testResult)
|
||||
{
|
||||
GEOM::GEOM_Assembly_var aAss;
|
||||
testResult = false;
|
||||
|
||||
/* case SObject */
|
||||
if(IO->hasEntry()) {
|
||||
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
|
||||
SALOMEDS::SObject_var obj = aStudy->FindObjectID(IO->getEntry());
|
||||
SALOMEDS::GenericAttribute_var anAttr;
|
||||
SALOMEDS::AttributeIOR_var anIOR;
|
||||
if(!obj->_is_nil()) {
|
||||
if(obj->FindAttribute(anAttr, "AttributeIOR")) {
|
||||
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
|
||||
if(strcmp(anIOR->Value(),"") != 0){
|
||||
CORBA::Object_var anObject = aStudy->ConvertIORToObject(anIOR->Value());
|
||||
if(!CORBA::is_nil(anObject))
|
||||
aAss = GEOM::GEOM_Assembly::_narrow(anObject.in());
|
||||
}
|
||||
if(!CORBA::is_nil(aAss))
|
||||
testResult = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return aAss._retn();
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : ConvertIOinContact()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
GEOM::GEOM_Contact_ptr GEOMBase::ConvertIOinContact(const Handle(SALOME_InteractiveObject)& IO, Standard_Boolean& testResult)
|
||||
{
|
||||
GEOM::GEOM_Contact_var aContact;
|
||||
testResult = false;
|
||||
|
||||
/* case SObject */
|
||||
if(IO->hasEntry()) {
|
||||
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
|
||||
SALOMEDS::SObject_var obj = aStudy->FindObjectID(IO->getEntry());
|
||||
SALOMEDS::GenericAttribute_var anAttr;
|
||||
SALOMEDS::AttributeIOR_var anIOR;
|
||||
if(!obj->_is_nil()) {
|
||||
if(obj->FindAttribute(anAttr, "AttributeIOR")) {
|
||||
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
|
||||
if(strcmp(anIOR->Value(),"") != 0){
|
||||
CORBA::Object_var anObject = aStudy->ConvertIORToObject(anIOR->Value());
|
||||
if(!CORBA::is_nil(anObject))
|
||||
aContact = GEOM::GEOM_Contact::_narrow(anObject.in());
|
||||
}
|
||||
if(!CORBA::is_nil(aContact))
|
||||
testResult = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return aContact._retn();
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : ConvertIOinContact()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
GEOM::GEOM_Animation_ptr GEOMBase::ConvertIOinAnimation(const Handle(SALOME_InteractiveObject)& IO, Standard_Boolean& testResult)
|
||||
{
|
||||
GEOM::GEOM_Animation_var aAnimation;
|
||||
testResult = false;
|
||||
|
||||
/* case SObject */
|
||||
if(IO->hasEntry()) {
|
||||
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
|
||||
SALOMEDS::SObject_var obj = aStudy->FindObjectID(IO->getEntry());
|
||||
SALOMEDS::GenericAttribute_var anAttr;
|
||||
SALOMEDS::AttributeIOR_var anIOR;
|
||||
if(!obj->_is_nil()) {
|
||||
if(obj->FindAttribute(anAttr, "AttributeIOR")) {
|
||||
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
|
||||
if(strcmp(anIOR->Value(),"") != 0){
|
||||
CORBA::Object_var anObject = aStudy->ConvertIORToObject(anIOR->Value());
|
||||
if(!CORBA::is_nil(anObject))
|
||||
aAnimation = GEOM::GEOM_Animation::_narrow(anObject.in());
|
||||
}
|
||||
if(!CORBA::is_nil(aAnimation))
|
||||
testResult = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return aAnimation._retn();
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : ConvertListOfIOInListOfIOR()
|
||||
// purpose :
|
||||
|
@ -72,6 +72,12 @@ public :
|
||||
bool GetShapeTypeString(const TopoDS_Shape& aShape, Standard_CString& aTypeString);
|
||||
|
||||
/* Convertions */
|
||||
GEOM::GEOM_Assembly_ptr ConvertIOinAssembly(const Handle(SALOME_InteractiveObject)& IO,
|
||||
Standard_Boolean& testResult);
|
||||
GEOM::GEOM_Contact_ptr ConvertIOinContact(const Handle(SALOME_InteractiveObject)& IO,
|
||||
Standard_Boolean& testResult);
|
||||
GEOM::GEOM_Animation_ptr ConvertIOinAnimation(const Handle(SALOME_InteractiveObject)& IO,
|
||||
Standard_Boolean& testResult);
|
||||
GEOM::GEOM_Shape_ptr ConvertIOinGEOMShape(const Handle(SALOME_InteractiveObject)& IO,
|
||||
Standard_Boolean& testResult);
|
||||
Handle(GEOM_AISShape) ConvertIOinGEOMAISShape(const Handle(SALOME_InteractiveObject)& IO,
|
||||
|
@ -52,7 +52,8 @@ LIB_MOC = \
|
||||
|
||||
LIB_CLIENT_IDL = SALOME_Exception.idl \
|
||||
SALOMEDS.idl \
|
||||
SALOMEDS_Attributes.idl
|
||||
SALOMEDS_Attributes.idl \
|
||||
GEOM_Kinematic.idl
|
||||
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
|
@ -42,7 +42,7 @@ EXPORT_HEADERS = \
|
||||
|
||||
LIB = libGEOMClient.la
|
||||
LIB_SRC = GEOM_Client.cxx
|
||||
LIB_SERVER_IDL = SALOME_Component.idl SALOMEDS.idl SALOME_Exception.idl GEOM_Shape.idl GEOM_Gen.idl
|
||||
LIB_SERVER_IDL = SALOME_Component.idl SALOMEDS.idl SALOME_Exception.idl GEOM_Shape.idl GEOM_Gen.idl GEOM_Kinematic.idl
|
||||
|
||||
# Executables targets
|
||||
BIN =
|
||||
|
@ -18,6 +18,18 @@ msgstr "select1.png"
|
||||
msgid "ICON_OBJBROWSER_Geometry"
|
||||
msgstr "geometry.png"
|
||||
|
||||
#:
|
||||
msgid "ICON_OBJBROWSER_ANIMATION"
|
||||
msgstr "tree_animation.png"
|
||||
|
||||
#:
|
||||
msgid "ICON_OBJBROWSER_ASSEMBLY"
|
||||
msgstr "tree_assembly.png"
|
||||
|
||||
#:
|
||||
msgid "ICON_OBJBROWSER_CONTACT"
|
||||
msgstr "tree_contact.png"
|
||||
|
||||
#: QAD_ObjectBrowser.cxx:140
|
||||
msgid "ICON_OBJBROWSER_COMPOUND"
|
||||
msgstr "tree_compound.png"
|
||||
@ -358,5 +370,54 @@ msgstr "bezier.png"
|
||||
msgid "ICON_DLG_INTERPOL"
|
||||
msgstr "interpol.png"
|
||||
|
||||
#PositionDlg
|
||||
msgid "ICON_DLG_POSITION"
|
||||
msgstr "position.png"
|
||||
|
||||
#PositionDlg
|
||||
msgid "ICON_DLG_POS_POINT"
|
||||
msgstr "positionpoint.png"
|
||||
|
||||
#PositionDlg
|
||||
msgid "ICON_DLG_POS_VECT"
|
||||
msgstr "positionvect.png"
|
||||
|
||||
#PositionDlg
|
||||
msgid "ICON_DLG_POS_FACE"
|
||||
msgstr "positionface.png"
|
||||
|
||||
#:
|
||||
msgid "ICON_ANIMATION"
|
||||
msgstr "animation.png"
|
||||
|
||||
#:
|
||||
msgid "ICON_ASSEMBLY"
|
||||
msgstr "assembly.png"
|
||||
|
||||
#:
|
||||
msgid "ICON_CONTACT"
|
||||
msgstr "contact.png"
|
||||
|
||||
#:
|
||||
msgid "ICON_ANIM_FIRST"
|
||||
msgstr "anim_first.png"
|
||||
|
||||
#:
|
||||
msgid "ICON_ANIM_PREV"
|
||||
msgstr "anim_prev.png"
|
||||
|
||||
#:
|
||||
msgid "ICON_ANIM_PLAY"
|
||||
msgstr "anim_play.png"
|
||||
|
||||
#:
|
||||
msgid "ICON_ANIM_STOP"
|
||||
msgstr "anim_stop.png"
|
||||
|
||||
#:
|
||||
msgid "ICON_ANIM_NEXT"
|
||||
msgstr "anim_next.png"
|
||||
|
||||
#:
|
||||
msgid "ICON_ANIM_LAST"
|
||||
msgstr "anim_last.png"
|
||||
|
@ -1207,13 +1207,13 @@ msgid "GEOM_SKETCHER_EL"
|
||||
msgstr "Element Type"
|
||||
|
||||
msgid "GEOM_BUT_CLOSE_SKETCH"
|
||||
msgstr "Close Sketcher"
|
||||
msgstr "Close Sketch"
|
||||
|
||||
msgid "GEOM_BUT_END_SKETCH"
|
||||
msgstr "End Sketcher"
|
||||
msgstr "End Sketch"
|
||||
|
||||
msgid "GEOM_SKETCHER_TITLE"
|
||||
msgstr "Spline Construction"
|
||||
msgstr "Sketch Construction"
|
||||
|
||||
msgid "GEOM_SKETCHER_POINT"
|
||||
msgstr "Point"
|
||||
@ -1314,3 +1314,101 @@ msgstr "Fillet can't be computed with radius %1"
|
||||
msgid "GEOM_CHAMFER_ABORT"
|
||||
msgstr "Chamfer can't be computed with %1 and %2"
|
||||
|
||||
msgid "GEOM_CONTACT_TITLE"
|
||||
msgstr "Add Contact"
|
||||
|
||||
msgid "GEOM_ASSEMBLY"
|
||||
msgstr "Assembly"
|
||||
|
||||
msgid "GEOM_CONTACT"
|
||||
msgstr "Contact"
|
||||
|
||||
msgid "GEOM_TYPE"
|
||||
msgstr "Type"
|
||||
|
||||
msgid "GEOM_KROTATION_TITLE"
|
||||
msgstr "Edit Rotation"
|
||||
|
||||
msgid "GEOM_KTRANSLATION_TITLE"
|
||||
msgstr "Edit Translation"
|
||||
|
||||
msgid "GEOM_KROTATION"
|
||||
msgstr "Rotation"
|
||||
|
||||
msgid "GEOM_KTRANSLATION"
|
||||
msgstr "Translation"
|
||||
|
||||
msgid "GEOM_VALUE"
|
||||
msgstr "Value"
|
||||
|
||||
msgid "GEOM_1ROT"
|
||||
msgstr "1st Rot."
|
||||
|
||||
msgid "GEOM_2ROT"
|
||||
msgstr "2nd Rot."
|
||||
|
||||
msgid "GEOM_3ROT"
|
||||
msgstr "3rd Rot."
|
||||
|
||||
msgid "GEOM_KPOSITION_TITLE"
|
||||
msgstr "Set Position"
|
||||
|
||||
msgid "GEOM_KPOSITION"
|
||||
msgstr "Position"
|
||||
|
||||
msgid "GEOM_POS"
|
||||
msgstr "Position :"
|
||||
|
||||
msgid "GEOM_VX"
|
||||
msgstr "VX :"
|
||||
|
||||
msgid "GEOM_VY"
|
||||
msgstr "VY :"
|
||||
|
||||
msgid "GEOM_VZ"
|
||||
msgstr "VZ :"
|
||||
|
||||
msgid "GEOM_ANIMATION_TITLE"
|
||||
msgstr "Add Animation"
|
||||
|
||||
msgid "GEOM_ANIMATION"
|
||||
msgstr "Animation"
|
||||
|
||||
msgid "GEOM_FRAME"
|
||||
msgstr "Frame"
|
||||
|
||||
msgid "GEOM_DURATION"
|
||||
msgstr "Duration"
|
||||
|
||||
msgid "GEOM_NBSEQ"
|
||||
msgstr "Nb. Sequences"
|
||||
|
||||
msgid "GEOM_ANIM_EXPORT"
|
||||
msgstr "Export Animation"
|
||||
|
||||
msgid "GEOM_ANIM_SHADING"
|
||||
msgstr "In Shading"
|
||||
|
||||
msgid "GEOM_ANIM_TITLE"
|
||||
msgstr "Animate an Assembly"
|
||||
|
||||
msgid "GEOM_ANIM"
|
||||
msgstr "Animation"
|
||||
|
||||
msgid "GEOM_ANIM_INLOOP"
|
||||
msgstr "In Loop"
|
||||
|
||||
msgid "GEOM_POSITION"
|
||||
msgstr "Position"
|
||||
|
||||
msgid "GEOM_POSITION_TITLE"
|
||||
msgstr "Position Of An Object"
|
||||
|
||||
msgid "GEOM_POS_VERTEX"
|
||||
msgstr "Position by Points"
|
||||
|
||||
msgid "GEOM_POS_EDGE"
|
||||
msgstr "Position by Edges"
|
||||
|
||||
msgid "GEOM_POS_FACE"
|
||||
msgstr "Position by Faces"
|
||||
|
@ -34,6 +34,10 @@ msgstr "&Ok"
|
||||
msgid "GEOM_BUT_YES"
|
||||
msgstr "&Oui"
|
||||
|
||||
#Button No
|
||||
msgid "GEOM_BUT_NO"
|
||||
msgstr "&Non"
|
||||
|
||||
#Button Help
|
||||
msgid "GEOM_BUT_HELP"
|
||||
msgstr "&Aide"
|
||||
@ -153,6 +157,10 @@ msgstr "Fichiers IGES ( *.iges *.igs )"
|
||||
msgid "GEOM_MEN_IMPORT_STEP"
|
||||
msgstr "Fichiers STEP ( *.step *.stp )"
|
||||
|
||||
#: GeometryGUI.cxx:3763
|
||||
msgid "GEOM_MEN_LOAD_SCRIPT"
|
||||
msgstr "Fichiers PYTHON ( *.py )"
|
||||
|
||||
#: GeometryGUI.cxx:2931
|
||||
msgid "GEOM_MEN_ISOS"
|
||||
msgstr "Choisir un nombre d'isos"
|
||||
@ -216,6 +224,10 @@ msgstr "Le rayon est nul"
|
||||
msgid "GEOM_WRN_WARNING"
|
||||
msgstr "Avertissement"
|
||||
|
||||
#: GeometryGUI.cxx:3854
|
||||
msgid "GEOM_REALLY_DELETE"
|
||||
msgstr "Voulez-vous supprimer l'object(s) ?"
|
||||
|
||||
#
|
||||
#==============================================================================
|
||||
#
|
||||
@ -265,7 +277,7 @@ msgid "GEOM_CENTER_POINT"
|
||||
msgstr "Point Centre"
|
||||
|
||||
#Diagonal Points
|
||||
msgid "GEOM__DIAGONAL_POINTS"
|
||||
msgid "GEOM_DIAGONAL_POINTS"
|
||||
msgstr "Points Diagonaux"
|
||||
|
||||
#Central Point
|
||||
@ -544,6 +556,21 @@ msgstr "Boite"
|
||||
msgid "GEOM_CIRCLE"
|
||||
msgstr "Cercle"
|
||||
|
||||
#Ellipse
|
||||
msgid "GEOM_ELLIPSE"
|
||||
msgstr "Ellipse"
|
||||
|
||||
msgid "GEOM_ELLIPSE_TITLE"
|
||||
msgstr "Construction d'Ellipses"
|
||||
|
||||
#Radius major
|
||||
msgid "GEOM_RADIUS_MAJOR"
|
||||
msgstr "Rayon max. :"
|
||||
|
||||
#Radius minor
|
||||
msgid "GEOM_RADIUS_MINOR"
|
||||
msgstr "Rayon min. :"
|
||||
|
||||
#Compound
|
||||
msgid "GEOM_COMPOUND"
|
||||
msgstr "Compound"
|
||||
@ -992,9 +1019,9 @@ msgstr "Coudre des Topologies"
|
||||
msgid "GEOM_SHELL_TITLE"
|
||||
msgstr "Construction d'une Shell"
|
||||
|
||||
#: GeometryGUI_ShellDlg.cxx:74
|
||||
msgid "GEOM_SHELL_LIST"
|
||||
msgstr "List de Faces Connectees"
|
||||
#: GeometryGUI_SolidDlg.cxx:74
|
||||
msgid "GEOM_SOLID_TITLE"
|
||||
msgstr "Construction d'un Solid"
|
||||
|
||||
#: GeometryGUI_SphereDlg.cxx:50
|
||||
msgid "GEOM_SPHERE_TITLE"
|
||||
@ -1091,11 +1118,11 @@ msgid "GEOM_WIRE_CONNECT"
|
||||
msgstr "Creation d'un Wire a partir de wires/edges connectes"
|
||||
|
||||
#: GeometryGUI_WorkingPlaneDlg.cxx:50
|
||||
msgid "GEOM_WPALNE_TITLE"
|
||||
msgid "GEOM_WPLANE_TITLE"
|
||||
msgstr "plan de travail"
|
||||
|
||||
#: GeometryGUI_WorkingPlaneDlg.cxx:107
|
||||
msgid "GEOM_WPALNE_FACE"
|
||||
msgid "GEOM_WPLANE_FACE"
|
||||
msgstr "Plan Ou Face plane"
|
||||
|
||||
#: GeometryGUI_multiTranslationDlg.cxx:107
|
||||
@ -1137,9 +1164,252 @@ msgstr "Filaire"
|
||||
msgid "GEOM_MEN_SHADING"
|
||||
msgstr "Ombré"
|
||||
|
||||
msgid "GEOM_RECONSTRUCTION_LIMIT"
|
||||
msgstr "Limite de Reconstruction"
|
||||
|
||||
msgid "GEOM_SUPPRESS_RESULT"
|
||||
msgstr "Supprimer le Resultat"
|
||||
|
||||
msgid "GEOM_SUPPRESS_RESULT_INSIDE"
|
||||
msgstr "Intérieur"
|
||||
|
||||
msgid "GEOM_SUPPRESS_RESULT_OUTSIDE"
|
||||
msgstr "Extérieur"
|
||||
|
||||
msgid "GEOM_RECONSTRUCTION_LIMIT_SHAPE"
|
||||
msgstr "Shape"
|
||||
msgid "GEOM_RECONSTRUCTION_LIMIT_SOLID"
|
||||
msgstr "Solid"
|
||||
msgid "GEOM_RECONSTRUCTION_LIMIT_SHELL"
|
||||
msgstr "Shell"
|
||||
msgid "GEOM_RECONSTRUCTION_LIMIT_FACE"
|
||||
msgstr "Face"
|
||||
msgid "GEOM_RECONSTRUCTION_LIMIT_WIRE"
|
||||
msgstr "Wire"
|
||||
msgid "GEOM_RECONSTRUCTION_LIMIT_EDGE"
|
||||
msgstr "Edge"
|
||||
msgid "GEOM_RECONSTRUCTION_LIMIT_VERTEX"
|
||||
msgstr "Vertex"
|
||||
|
||||
msgid "GEOM_SPLINE_TITLE"
|
||||
msgstr "Construction de Splines"
|
||||
msgid "GEOM_SPLINE"
|
||||
msgstr "Spline"
|
||||
msgid "GEOM_BEZIER"
|
||||
msgstr "Bezier"
|
||||
msgid "GEOM_INTERPOL"
|
||||
msgstr "Interpolation"
|
||||
|
||||
#
|
||||
#==============================================================================
|
||||
#
|
||||
|
||||
msgid "GEOM_SKETCHER_EL"
|
||||
msgstr "Type d'Element"
|
||||
|
||||
msgid "GEOM_BUT_CLOSE_SKETCH"
|
||||
msgstr "Fermer Sketch"
|
||||
|
||||
msgid "GEOM_BUT_END_SKETCH"
|
||||
msgstr "Terminer Sketch"
|
||||
|
||||
msgid "GEOM_SKETCHER_TITLE"
|
||||
msgstr "Construction de Sketch"
|
||||
|
||||
msgid "GEOM_SKETCHER_POINT"
|
||||
msgstr "Point"
|
||||
|
||||
msgid "GEOM_SKETCHER_SEGMENT"
|
||||
msgstr "Sègment"
|
||||
|
||||
msgid "GEOM_SKETCHER_ARC"
|
||||
msgstr "Arc"
|
||||
|
||||
msgid "GEOM_SKETCHER_DIR"
|
||||
msgstr "Direction"
|
||||
|
||||
msgid "GEOM_SKETCHER_POINT2"
|
||||
msgstr "Point :"
|
||||
|
||||
msgid "GEOM_SKETCHER_DEST"
|
||||
msgstr "Destination"
|
||||
|
||||
msgid "GEOM_SKETCHER_ABS"
|
||||
msgstr "Absolu"
|
||||
|
||||
msgid "GEOM_SKETCHER_REL"
|
||||
msgstr "Relative"
|
||||
|
||||
msgid "GEOM_SKETCHER_SEL"
|
||||
msgstr "Sélection"
|
||||
|
||||
msgid "GEOM_SKETCHER_ANGLE"
|
||||
msgstr "Angle"
|
||||
|
||||
msgid "GEOM_SKETCHER_PER"
|
||||
msgstr "Perpendiculaire"
|
||||
|
||||
msgid "GEOM_SKETCHER_TAN"
|
||||
msgstr "Tangent"
|
||||
|
||||
msgid "GEOM_SKETCHER_VXVY"
|
||||
msgstr "VX-VY"
|
||||
|
||||
msgid "GEOM_SKETCHER_LENGTH"
|
||||
msgstr "Longueur"
|
||||
|
||||
msgid "GEOM_SKETCHER_X"
|
||||
msgstr "X"
|
||||
|
||||
msgid "GEOM_SKETCHER_Y"
|
||||
msgstr "Y"
|
||||
|
||||
msgid "GEOM_SKETCHER_X2"
|
||||
msgstr "X :"
|
||||
|
||||
msgid "GEOM_SKETCHER_Y2"
|
||||
msgstr "Y :"
|
||||
|
||||
msgid "GEOM_SKETCHER_X3"
|
||||
msgstr "Abs. X :"
|
||||
|
||||
msgid "GEOM_SKETCHER_Y3"
|
||||
msgstr "Abs. Y :"
|
||||
|
||||
msgid "GEOM_SKETCHER_DX2"
|
||||
msgstr "DX :"
|
||||
|
||||
msgid "GEOM_SKETCHER_DY2"
|
||||
msgstr "DY :"
|
||||
|
||||
msgid "GEOM_SKETCHER_VX2"
|
||||
msgstr "VX :"
|
||||
|
||||
msgid "GEOM_SKETCHER_VY2"
|
||||
msgstr "VY :"
|
||||
|
||||
msgid "GEOM_SKETCHER_LENGTH2"
|
||||
msgstr "Longueur :"
|
||||
|
||||
msgid "GEOM_SKETCHER_ANGLE2"
|
||||
msgstr "Angle :"
|
||||
|
||||
msgid "GEOM_SKETCHER_RADIUS2"
|
||||
msgstr "Radius :"
|
||||
|
||||
msgid "GEOM_SKETCHER_UNDO"
|
||||
msgstr "Undo"
|
||||
|
||||
msgid "GEOM_SKETCHER_APPLY"
|
||||
msgstr "Appliquer"
|
||||
|
||||
msgid "GEOM_SKETCHER_VALUES"
|
||||
msgstr "Valeurs"
|
||||
|
||||
msgid "GEOM_SKETCHER_TYPE"
|
||||
msgstr "Type"
|
||||
|
||||
msgid "GEOM_FILLET_ABORT"
|
||||
msgstr "Le congé ne peut-être realisé avec un rayon de %1 "
|
||||
|
||||
msgid "GEOM_CHAMFER_ABORT"
|
||||
msgstr "Le chanfrein ne peut-être realisé avec %1 et %2 "
|
||||
|
||||
msgid "GEOM_CONTACT_TITLE"
|
||||
msgstr "Nouveau Contact"
|
||||
|
||||
msgid "GEOM_ASSEMBLY"
|
||||
msgstr "Assemblage"
|
||||
|
||||
msgid "GEOM_CONTACT"
|
||||
msgstr "Contact"
|
||||
|
||||
msgid "GEOM_TYPE"
|
||||
msgstr "Type"
|
||||
|
||||
msgid "GEOM_KROTATION_TITLE"
|
||||
msgstr "Modif. Rotation"
|
||||
|
||||
msgid "GEOM_KTRANSLATION_TITLE"
|
||||
msgstr "Modif. Translation"
|
||||
|
||||
msgid "GEOM_KROTATION"
|
||||
msgstr "Rotation"
|
||||
|
||||
msgid "GEOM_KTRANSLATION"
|
||||
msgstr "Translation"
|
||||
|
||||
msgid "GEOM_VALUE"
|
||||
msgstr "Valeur"
|
||||
|
||||
msgid "GEOM_1ROT"
|
||||
msgstr "1e Rot."
|
||||
|
||||
msgid "GEOM_2ROT"
|
||||
msgstr "2e Rot."
|
||||
|
||||
msgid "GEOM_3ROT"
|
||||
msgstr "3e Rot."
|
||||
|
||||
msgid "GEOM_KPOSITION_TITLE"
|
||||
msgstr "Modif. Position"
|
||||
|
||||
msgid "GEOM_KPOSITION"
|
||||
msgstr "Position"
|
||||
|
||||
msgid "GEOM_POS"
|
||||
msgstr "Position :"
|
||||
|
||||
msgid "GEOM_VX"
|
||||
msgstr "VX :"
|
||||
|
||||
msgid "GEOM_VY"
|
||||
msgstr "VY :"
|
||||
|
||||
msgid "GEOM_VZ"
|
||||
msgstr "VZ :"
|
||||
|
||||
msgid "GEOM_ANIMATION_TITLE"
|
||||
msgstr "Nouvelle Animation"
|
||||
|
||||
msgid "GEOM_ANIMATION"
|
||||
msgstr "Animation"
|
||||
|
||||
msgid "GEOM_FRAME"
|
||||
msgstr "Bati"
|
||||
|
||||
msgid "GEOM_DURATION"
|
||||
msgstr "Durée"
|
||||
|
||||
msgid "GEOM_NBSEQ"
|
||||
msgstr "Nb. Séquences"
|
||||
|
||||
msgid "GEOM_ANIM_EXPORT"
|
||||
msgstr "Export Animation"
|
||||
|
||||
msgid "GEOM_ANIM_SHADING"
|
||||
msgstr "En Shading"
|
||||
|
||||
msgid "GEOM_ANIM_TITLE"
|
||||
msgstr "Animer un Assemblage"
|
||||
|
||||
msgid "GEOM_ANIM"
|
||||
msgstr "Animation"
|
||||
|
||||
msgid "GEOM_ANIM_INLOOP"
|
||||
msgstr "En boucle"
|
||||
|
||||
msgid "GEOM_POSITION"
|
||||
msgstr "Position"
|
||||
|
||||
msgid "GEOM_POSITION_TITLE"
|
||||
msgstr "Position d'un Objet"
|
||||
|
||||
msgid "GEOM_POS_VERTEX"
|
||||
msgstr "Position par Points"
|
||||
|
||||
msgid "GEOM_POS_EDGE"
|
||||
msgstr "Position par Edges"
|
||||
|
||||
msgid "GEOM_POS_FACE"
|
||||
msgstr "Position par Faces"
|
||||
|
@ -51,7 +51,7 @@ LIB_SRC = GEOMContext.cxx
|
||||
LIB_MOC = \
|
||||
GEOMContext.h
|
||||
|
||||
LIB_CLIENT_IDL = SALOME_Exception.idl
|
||||
LIB_CLIENT_IDL = SALOME_Exception.idl GEOM_Kinematic.idl
|
||||
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
|
@ -34,9 +34,16 @@ using namespace std;
|
||||
#include <TNaming_NamedShape.hxx>
|
||||
#include <TDataStd_Name.hxx>
|
||||
#include <TDataStd_Integer.hxx>
|
||||
#include <TDataStd_Real.hxx>
|
||||
#include <TDataStd_RealArray.hxx>
|
||||
#include <TDataStd_IntegerArray.hxx>
|
||||
#include <TDF_Reference.hxx>
|
||||
#include <TNaming_Tool.hxx>
|
||||
#include <TDF_ChildIterator.hxx>
|
||||
#include <TDF_Tool.hxx>
|
||||
|
||||
#include "Kinematic_Contact.hxx"
|
||||
#include "Kinematic_Animation.hxx"
|
||||
|
||||
|
||||
//=======================================================================
|
||||
@ -264,9 +271,10 @@ Standard_Boolean GEOMDS_Commands::ClearAllIOR(const TDF_Label& aLabel)
|
||||
TDF_Label L = it.Value() ;
|
||||
if( L.FindAttribute(TDataStd_Name::GetID(), anAttName) ) {
|
||||
notTested = L.ForgetAttribute(TDataStd_Name::GetID()) ;
|
||||
if(notTested)
|
||||
MESSAGE("in GEOMDS_Commands::ClearAllIOR : IOR CLEARED" )
|
||||
ClearAllIOR(L);
|
||||
}
|
||||
if(notTested)
|
||||
MESSAGE("in GEOMDS_Commands::ClearAllIOR : IOR CLEARED" )
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
@ -300,3 +308,368 @@ Standard_Boolean GEOMDS_Commands::ReturnNameIOR(const TDF_Label& aLabel,
|
||||
return true ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : AddAssembly()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
TDF_Label GEOMDS_Commands::AddAssembly(Kinematic_Assembly& KAss,
|
||||
const TCollection_ExtendedString& Name)
|
||||
{
|
||||
TDF_Label LabAssembly = myLab.NewChild();
|
||||
TDataStd_Name::Set(LabAssembly, Name);
|
||||
|
||||
TDF_Label LabType = LabAssembly.NewChild();
|
||||
TDataStd_Integer::Set(LabType, 1);
|
||||
|
||||
return LabAssembly;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : AddContact()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
TDF_Label GEOMDS_Commands::AddContact(Kinematic_Contact& KContact,
|
||||
const TDF_Label& mainRefLab,
|
||||
const TCollection_ExtendedString& Name)
|
||||
{
|
||||
TDF_Label LabContact = mainRefLab.NewChild();
|
||||
TDataStd_Name::Set(LabContact, Name);
|
||||
|
||||
TDF_Label LabContactType = LabContact.NewChild();
|
||||
TDataStd_Integer::Set(LabContactType, 2);
|
||||
|
||||
TDF_Label LabType = LabContact.NewChild();
|
||||
TDataStd_Integer::Set(LabType, KContact.Type());
|
||||
|
||||
int ret;
|
||||
TDF_Label NewLab1 = LabContact.NewChild();
|
||||
TNaming_Builder B1(NewLab1);
|
||||
B1.Select(KContact.Shape1(), KContact.Shape1());
|
||||
TDF_Label RefLab1 = TNaming_Tool::Label(myLab, KContact.Shape1(), ret);
|
||||
TDF_Reference::Set(NewLab1, RefLab1);
|
||||
|
||||
TDF_Label NewLab2 = LabContact.NewChild();
|
||||
TNaming_Builder B2(NewLab2);
|
||||
B2.Select(KContact.Shape2(), KContact.Shape2());
|
||||
TDF_Label RefLab2 = TNaming_Tool::Label(myLab, KContact.Shape2(), ret);
|
||||
TDF_Reference::Set(NewLab2, RefLab2);
|
||||
|
||||
TDF_Label LabPosition = LabContact.NewChild();
|
||||
Handle(TDataStd_RealArray) RealArrayP = TDataStd_RealArray::Set(LabPosition, 1, 12);
|
||||
RealArrayP->SetValue(1, KContact.Position().Origin().X());
|
||||
RealArrayP->SetValue(2, KContact.Position().Origin().Y());
|
||||
RealArrayP->SetValue(3, KContact.Position().Origin().Z());
|
||||
RealArrayP->SetValue(4, KContact.Position().DirX().X());
|
||||
RealArrayP->SetValue(5, KContact.Position().DirX().Y());
|
||||
RealArrayP->SetValue(6, KContact.Position().DirX().Z());
|
||||
RealArrayP->SetValue(7, KContact.Position().DirY().X());
|
||||
RealArrayP->SetValue(8, KContact.Position().DirY().Y());
|
||||
RealArrayP->SetValue(9, KContact.Position().DirY().Z());
|
||||
RealArrayP->SetValue(10, KContact.Position().DirZ().X());
|
||||
RealArrayP->SetValue(11, KContact.Position().DirZ().Y());
|
||||
RealArrayP->SetValue(12, KContact.Position().DirZ().Z());
|
||||
|
||||
TDF_Label LabRotation1 = LabContact.NewChild();
|
||||
Handle(TDataStd_IntegerArray) IntegerArrayR = TDataStd_IntegerArray::Set(LabRotation1, 1, 3);
|
||||
IntegerArrayR->SetValue(1, KContact.Rotation().Rot1());
|
||||
IntegerArrayR->SetValue(2, KContact.Rotation().Rot2());
|
||||
IntegerArrayR->SetValue(3, KContact.Rotation().Rot3());
|
||||
|
||||
TDF_Label LabRotation2 = LabContact.NewChild();
|
||||
Handle(TDataStd_RealArray) RealArrayR = TDataStd_RealArray::Set(LabRotation2, 1, 3);
|
||||
RealArrayR->SetValue(1, KContact.Rotation().ValX());
|
||||
RealArrayR->SetValue(2, KContact.Rotation().ValY());
|
||||
RealArrayR->SetValue(3, KContact.Rotation().ValZ());
|
||||
|
||||
TDF_Label LabTranslation = LabContact.NewChild();
|
||||
Handle(TDataStd_RealArray) RealArrayT = TDataStd_RealArray::Set(LabTranslation, 1, 3);
|
||||
RealArrayT->SetValue(1, KContact.Translation().ValX());
|
||||
RealArrayT->SetValue(2, KContact.Translation().ValY());
|
||||
RealArrayT->SetValue(3, KContact.Translation().ValZ());
|
||||
|
||||
TDF_Label LabStep = LabContact.NewChild();
|
||||
TDataStd_Real::Set(LabStep, KContact.Step());
|
||||
|
||||
return LabContact;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : AddAnimation()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
TDF_Label GEOMDS_Commands::AddAnimation(Kinematic_Animation& KAnimation,
|
||||
const TDF_Label& AssLab,
|
||||
const TCollection_ExtendedString& Name)
|
||||
{
|
||||
TDF_Label LabAnimation = myLab.NewChild();
|
||||
TDataStd_Name::Set(LabAnimation, Name);
|
||||
|
||||
TDF_Label LabType = LabAnimation.NewChild();
|
||||
TDataStd_Integer::Set(LabType, 3);
|
||||
|
||||
TDF_Label LabAssembly = LabAnimation.NewChild();
|
||||
TDF_Reference::Set(LabAssembly, AssLab);
|
||||
|
||||
int ret;
|
||||
TDF_Label LabFrame = LabAnimation.NewChild();
|
||||
TNaming_Builder B1(LabFrame);
|
||||
B1.Select(KAnimation.Frame(), KAnimation.Frame());
|
||||
TDF_Label RefLab = TNaming_Tool::Label(myLab, KAnimation.Frame(), ret);
|
||||
TDF_Reference::Set(LabFrame, RefLab);
|
||||
|
||||
TDF_Label LabDuration = LabAnimation.NewChild();
|
||||
Standard_Real duration = double(KAnimation.Duration());
|
||||
TDataStd_Real::Set(LabDuration, duration);
|
||||
|
||||
TDF_Label LabNbSeq = LabAnimation.NewChild();
|
||||
TDataStd_Integer::Set(LabNbSeq, KAnimation.NbSeq());
|
||||
|
||||
return LabAnimation;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : GetAssembly()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean GEOMDS_Commands::GetAssembly(const TDF_Label& aLabel,
|
||||
Kinematic_Assembly& returnAss)
|
||||
{
|
||||
Kinematic_Assembly* Ass = new Kinematic_Assembly();
|
||||
|
||||
TDF_ChildIterator it;
|
||||
for(it.Initialize(aLabel, Standard_False); it.More(); it.Next()) {
|
||||
TDF_Label L = it.Value();
|
||||
Handle(TDataStd_Integer) anAttInteger;
|
||||
if(L.FindAttribute(TDataStd_Integer::GetID(), anAttInteger)) {
|
||||
if(anAttInteger->Get() != 1) {
|
||||
returnAss = *Ass;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Kinematic_Contact* aContact = new Kinematic_Contact();
|
||||
if(GetContact(L, *aContact))
|
||||
Ass->AddContact(aContact);
|
||||
}
|
||||
}
|
||||
returnAss = *Ass;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : GetContact()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean GEOMDS_Commands::GetContact(const TDF_Label& aLabel,
|
||||
Kinematic_Contact& returnContact)
|
||||
{
|
||||
Kinematic_Contact* Contact = new Kinematic_Contact();
|
||||
|
||||
TDF_ChildIterator it;
|
||||
int i = 1;
|
||||
for(it.Initialize(aLabel, Standard_False); it.More(); it.Next()) {
|
||||
TDF_Label L = it.Value();
|
||||
Handle(TNaming_NamedShape) anAttTopo1;
|
||||
Handle(TNaming_NamedShape) anAttTopo2;
|
||||
Handle(TDataStd_Integer) anAttInteger1;
|
||||
Handle(TDataStd_Integer) anAttInteger2;
|
||||
Handle(TDataStd_Real) anAttReal;
|
||||
Handle(TDataStd_IntegerArray) anAttIntegerArrayR;
|
||||
Handle(TDataStd_RealArray) anAttRealArrayP;
|
||||
Handle(TDataStd_RealArray) anAttRealArrayR;
|
||||
Handle(TDataStd_RealArray) anAttRealArrayT;
|
||||
|
||||
if(i == 1 && L.FindAttribute(TDataStd_Integer::GetID(), anAttInteger1)) {
|
||||
if(anAttInteger1->Get() != 2) {
|
||||
returnContact = *Contact;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(i == 2 && L.FindAttribute(TDataStd_Integer::GetID(), anAttInteger2)) {
|
||||
Contact->Type(anAttInteger2->Get());
|
||||
}
|
||||
if(i == 3 && L.FindAttribute(TNaming_NamedShape::GetID(), anAttTopo1)) {
|
||||
Contact->Shape1(TNaming_Tool::GetShape(anAttTopo1));
|
||||
}
|
||||
if(i == 4 && L.FindAttribute(TNaming_NamedShape::GetID(), anAttTopo2)) {
|
||||
Contact->Shape2(TNaming_Tool::GetShape(anAttTopo2));
|
||||
}
|
||||
if(i == 5 && L.FindAttribute(TDataStd_RealArray::GetID(), anAttRealArrayP)) {
|
||||
gp_Pnt Center(anAttRealArrayP->Value(1), anAttRealArrayP->Value(2), anAttRealArrayP->Value(3));
|
||||
gp_Dir aDirX(anAttRealArrayP->Value(4), anAttRealArrayP->Value(5), anAttRealArrayP->Value(6));
|
||||
gp_Dir aDirY(anAttRealArrayP->Value(7), anAttRealArrayP->Value(8), anAttRealArrayP->Value(9));
|
||||
gp_Dir aDirZ(anAttRealArrayP->Value(10), anAttRealArrayP->Value(11), anAttRealArrayP->Value(12));
|
||||
Contact->Position().Origin(Center);
|
||||
Contact->Position().DirX(aDirX);
|
||||
Contact->Position().DirY(aDirY);
|
||||
Contact->Position().DirZ(aDirZ);
|
||||
}
|
||||
if(i == 6 && L.FindAttribute(TDataStd_IntegerArray::GetID(), anAttIntegerArrayR)) {
|
||||
Contact->Rotation().Rot1(anAttIntegerArrayR->Value(1));
|
||||
Contact->Rotation().Rot2(anAttIntegerArrayR->Value(2));
|
||||
Contact->Rotation().Rot3(anAttIntegerArrayR->Value(3));
|
||||
}
|
||||
if(i == 7 && L.FindAttribute(TDataStd_RealArray::GetID(), anAttRealArrayR)) {
|
||||
Contact->Rotation().ValX(anAttRealArrayR->Value(1));
|
||||
Contact->Rotation().ValY(anAttRealArrayR->Value(2));
|
||||
Contact->Rotation().ValZ(anAttRealArrayR->Value(3));
|
||||
}
|
||||
if(i == 8 && L.FindAttribute(TDataStd_RealArray::GetID(), anAttRealArrayT)) {
|
||||
Contact->Translation().ValX(anAttRealArrayT->Value(1));
|
||||
Contact->Translation().ValY(anAttRealArrayT->Value(2));
|
||||
Contact->Translation().ValZ(anAttRealArrayT->Value(3));
|
||||
}
|
||||
if(i == 9 && L.FindAttribute(TDataStd_Real::GetID(), anAttReal)) {
|
||||
Contact->Step(anAttReal->Get());
|
||||
}
|
||||
i++;
|
||||
}
|
||||
returnContact = *Contact;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : GetAnimation()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean GEOMDS_Commands::GetAnimation(const TDF_Label& aLabel,
|
||||
Kinematic_Animation& returnAnim)
|
||||
{
|
||||
Kinematic_Animation* Anim = new Kinematic_Animation();
|
||||
|
||||
TDF_ChildIterator it;
|
||||
int i = 1;
|
||||
for(it.Initialize(aLabel, Standard_False); it.More(); it.Next()) {
|
||||
TDF_Label L = it.Value();
|
||||
Handle(TNaming_NamedShape) anAttTopo;
|
||||
Handle(TDataStd_Real) anAttReal;
|
||||
Handle(TDataStd_Integer) anAttInteger;
|
||||
Handle(TDataStd_Integer) anAttInteger1;
|
||||
|
||||
if(i == 1 && L.FindAttribute(TDataStd_Integer::GetID(), anAttInteger)) {
|
||||
if(anAttInteger->Get() != 3) {
|
||||
returnAnim = *Anim;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(i == 2) {
|
||||
Kinematic_Assembly* aAss = new Kinematic_Assembly();
|
||||
Standard_Boolean test = GetAssembly(L, *aAss);
|
||||
Anim->Assembly(aAss);
|
||||
}
|
||||
if(i == 3 && L.FindAttribute(TNaming_NamedShape::GetID(), anAttTopo)) {
|
||||
Anim->Frame(TNaming_Tool::GetShape(anAttTopo));
|
||||
}
|
||||
if(i == 4 && L.FindAttribute(TDataStd_Real::GetID(), anAttReal)) {
|
||||
Anim->Duration(anAttReal->Get());
|
||||
}
|
||||
if(i == 5 && L.FindAttribute(TDataStd_Integer::GetID(), anAttInteger1)) {
|
||||
Anim->NbSeq(anAttInteger1->Get());
|
||||
}
|
||||
i++;
|
||||
}
|
||||
Anim->SetMap();
|
||||
returnAnim = *Anim;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : SetPosition()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void GEOMDS_Commands::SetPosition(const TDF_Label& aLabel,
|
||||
double P0x, double P0y, double P0z,
|
||||
double VXx, double VXy, double VXz,
|
||||
double VYx, double VYy, double VYz,
|
||||
double VZx, double VZy, double VZz)
|
||||
{
|
||||
TDF_ChildIterator it;
|
||||
int i = 1;
|
||||
for(it.Initialize(aLabel, Standard_False); it.More(); it.Next()) {
|
||||
TDF_Label L = it.Value();
|
||||
Handle(TDataStd_RealArray) anAttRealArrayP;
|
||||
|
||||
if(i == 5 && L.FindAttribute(TDataStd_RealArray::GetID(), anAttRealArrayP)) {
|
||||
anAttRealArrayP->SetValue(1, P0x);
|
||||
anAttRealArrayP->SetValue(2, P0y);
|
||||
anAttRealArrayP->SetValue(3, P0z);
|
||||
anAttRealArrayP->SetValue(4, VXx);
|
||||
anAttRealArrayP->SetValue(5, VXy);
|
||||
anAttRealArrayP->SetValue(6, VXz);
|
||||
anAttRealArrayP->SetValue(7, VYx);
|
||||
anAttRealArrayP->SetValue(8, VYy);
|
||||
anAttRealArrayP->SetValue(9, VYz);
|
||||
anAttRealArrayP->SetValue(10, VZx);
|
||||
anAttRealArrayP->SetValue(11, VZy);
|
||||
anAttRealArrayP->SetValue(12, VZz);
|
||||
return;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : SetRotation()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void GEOMDS_Commands::SetRotation(const TDF_Label& aLabel,
|
||||
int Rot1, int Rot2, int Rot3,
|
||||
double Val1, double Val2, double Val3)
|
||||
{
|
||||
TDF_ChildIterator it;
|
||||
int i = 1;
|
||||
for(it.Initialize(aLabel, Standard_False); it.More(); it.Next()) {
|
||||
TDF_Label L = it.Value();
|
||||
Handle(TDataStd_IntegerArray) anAttIntegerArrayR;
|
||||
Handle(TDataStd_RealArray) anAttRealArrayR;
|
||||
|
||||
if(i == 6 && L.FindAttribute(TDataStd_IntegerArray::GetID(), anAttIntegerArrayR)) {
|
||||
anAttIntegerArrayR->SetValue(1, Rot1);
|
||||
anAttIntegerArrayR->SetValue(2, Rot2);
|
||||
anAttIntegerArrayR->SetValue(3, Rot3);
|
||||
}
|
||||
if(i == 7 && L.FindAttribute(TDataStd_RealArray::GetID(), anAttRealArrayR)) {
|
||||
anAttRealArrayR->SetValue(1, Val1);
|
||||
anAttRealArrayR->SetValue(2, Val2);
|
||||
anAttRealArrayR->SetValue(3, Val3);
|
||||
return;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : SetTranslation()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void GEOMDS_Commands::SetTranslation(const TDF_Label& aLabel,
|
||||
double Val1, double Val2, double Val3)
|
||||
{
|
||||
TDF_ChildIterator it;
|
||||
int i = 1;
|
||||
for(it.Initialize(aLabel, Standard_False); it.More(); it.Next()) {
|
||||
TDF_Label L = it.Value();
|
||||
Handle(TDataStd_RealArray) anAttRealArrayT;
|
||||
|
||||
if(i == 8 && L.FindAttribute(TDataStd_RealArray::GetID(), anAttRealArrayT)) {
|
||||
anAttRealArrayT->SetValue(1, Val1);
|
||||
anAttRealArrayT->SetValue(2, Val2);
|
||||
anAttRealArrayT->SetValue(3, Val3);
|
||||
return;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -34,6 +34,9 @@
|
||||
#endif
|
||||
class TDF_Label;
|
||||
class TopoDS_Shape;
|
||||
class Kinematic_Assembly;
|
||||
class Kinematic_Contact;
|
||||
class Kinematic_Animation;
|
||||
class TCollection_ExtendedString;
|
||||
|
||||
|
||||
@ -123,6 +126,31 @@ public:
|
||||
Standard_EXPORT Standard_Boolean ReturnNameIOR(const TDF_Label& aLabel,
|
||||
TCollection_ExtendedString& returnNameIOR) ;
|
||||
|
||||
/* Kinematic */
|
||||
Standard_EXPORT TDF_Label AddAssembly(Kinematic_Assembly& KAss,
|
||||
const TCollection_ExtendedString& Name) ;
|
||||
Standard_EXPORT TDF_Label AddContact(Kinematic_Contact& KContact,
|
||||
const TDF_Label& mainRefLab,
|
||||
const TCollection_ExtendedString& Name) ;
|
||||
Standard_EXPORT TDF_Label AddAnimation(Kinematic_Animation& KAnimation,
|
||||
const TDF_Label& AssLab,
|
||||
const TCollection_ExtendedString& Name) ;
|
||||
Standard_EXPORT Standard_Boolean GetAssembly(const TDF_Label& aLabel,
|
||||
Kinematic_Assembly& returnAss) ;
|
||||
Standard_EXPORT Standard_Boolean GetContact(const TDF_Label& aLabel,
|
||||
Kinematic_Contact& returnContact) ;
|
||||
Standard_EXPORT Standard_Boolean GetAnimation(const TDF_Label& aLabel,
|
||||
Kinematic_Animation& returnAnimation) ;
|
||||
Standard_EXPORT void SetPosition(const TDF_Label& aLabel,
|
||||
double P0x, double P0y, double P0z,
|
||||
double VXx, double VXy, double VXz,
|
||||
double VYx, double VYy, double VYz,
|
||||
double VZx, double VZy, double VZz) ;
|
||||
Standard_EXPORT void SetRotation(const TDF_Label& aLabel, int Rot1, int Rot2, int Rot3,
|
||||
double Val1, double Val2, double Val3) ;
|
||||
Standard_EXPORT void SetTranslation(const TDF_Label& aLabel,
|
||||
double Val1, double Val2, double Val3) ;
|
||||
|
||||
protected:
|
||||
|
||||
// Methods PROTECTED
|
||||
|
@ -41,7 +41,7 @@ LIB_SRC = GEOM_ShapeTypeFilter.cxx \
|
||||
GEOM_FaceFilter.cxx \
|
||||
GEOM_EdgeFilter.cxx
|
||||
|
||||
LIB_CLIENT_IDL = SALOME_Component.idl SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Exception.idl GEOM_Shape.idl GEOM_Gen.idl
|
||||
LIB_CLIENT_IDL = SALOME_Component.idl SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Exception.idl GEOM_Shape.idl GEOM_Gen.idl GEOM_Kinematic.idl
|
||||
|
||||
# header files
|
||||
EXPORT_HEADERS= GEOM_ShapeTypeFilter.hxx \
|
||||
|
@ -43,6 +43,11 @@
|
||||
|
||||
#include "SALOME_Selection.h"
|
||||
|
||||
// IDL Headers
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SALOMEDS)
|
||||
#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
|
||||
|
||||
using namespace std;
|
||||
|
||||
/* The object itself created in the static method 'GetOrCreateGEOMBase()' */
|
||||
@ -219,10 +224,11 @@ bool GeometryGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
||||
}
|
||||
else if(theCommandID == 5021 || // MENU TRANSFORMATION - TRANSLATION
|
||||
theCommandID == 5022 || // MENU TRANSFORMATION - ROTATION
|
||||
theCommandID == 5023 || // MENU TRANSFORMATION - MIRROR
|
||||
theCommandID == 5024 || // MENU TRANSFORMATION - SCALE
|
||||
theCommandID == 5025 || // MENU TRANSFORMATION - MULTI-TRANSLATION
|
||||
theCommandID == 5026) { // MENU TRANSFORMATION - MULTI-ROTATION
|
||||
theCommandID == 5023 || // MENU TRANSFORMATION - POSITION
|
||||
theCommandID == 5024 || // MENU TRANSFORMATION - MIRROR
|
||||
theCommandID == 5025 || // MENU TRANSFORMATION - SCALE
|
||||
theCommandID == 5026 || // MENU TRANSFORMATION - MULTI-TRANSLATION
|
||||
theCommandID == 5027) { // MENU TRANSFORMATION - MULTI-ROTATION
|
||||
if(!GeomGUI->LoadLibrary("libTransformationGUI.so"))
|
||||
return false;
|
||||
}
|
||||
@ -240,6 +246,25 @@ bool GeometryGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
||||
if(!GeomGUI->LoadLibrary("libRepairGUI.so"))
|
||||
return false;
|
||||
}
|
||||
else if(theCommandID == 611 || // MENU KINEMATIC - ASSEMBLY
|
||||
theCommandID == 61201 || // MENU KINEMATIC - EMBEDDING
|
||||
theCommandID == 61202 || // MENU KINEMATIC - PIVOT
|
||||
theCommandID == 61203 || // MENU KINEMATIC - SLIDE
|
||||
theCommandID == 61204 || // MENU KINEMATIC - SLIDING PIVOT
|
||||
theCommandID == 61205 || // MENU KINEMATIC - SPHERICAL
|
||||
theCommandID == 61206 || // MENU KINEMATIC - PLANE
|
||||
theCommandID == 61207 || // MENU KINEMATIC - ANNULAR
|
||||
theCommandID == 61208 || // MENU KINEMATIC - RECTILINEAR
|
||||
theCommandID == 61209 || // MENU KINEMATIC - PONCTUAL
|
||||
theCommandID == 61210 || // MENU KINEMATIC - HELICOIDAL
|
||||
theCommandID == 6131 || // MENU KINEMATIC - POSITION
|
||||
theCommandID == 6132 || // MENU KINEMATIC - ROTATION
|
||||
theCommandID == 6133 || // MENU KINEMATIC - TRANSLATION
|
||||
theCommandID == 614 || // MENU KINEMATIC - ANIMATION
|
||||
theCommandID == 6141) { // MENU KINEMATIC - RUN ANIMATION
|
||||
if(!GeomGUI->LoadLibrary("libKinematicGUI.so"))
|
||||
return false;
|
||||
}
|
||||
else if(theCommandID == 701 || // MENU MEASURE - PROPERTIES
|
||||
theCommandID == 702 || // MENU MEASURE - CDG
|
||||
theCommandID == 703 || // MENU MEASURE - INERTIA
|
||||
@ -472,7 +497,23 @@ void GeometryGUI::DefinePopup(QString & theContext, QString & theParent, QString
|
||||
if(strcmp(scomp->GetID(), IO->getEntry()) == 0) {
|
||||
// component is selected
|
||||
theObject = "Component";
|
||||
return;
|
||||
}
|
||||
|
||||
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
|
||||
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
||||
SALOMEDS::GenericAttribute_var anAttr;
|
||||
SALOMEDS::AttributeComment_var aType;
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(sobj, "AttributeComment");
|
||||
aType = SALOMEDS::AttributeComment::_narrow(anAttr);
|
||||
QString val = QString(strdup(aType->Value()));
|
||||
if(val == "Kinematic_Assembly")
|
||||
theObject = "Assembly";
|
||||
else if(val == "Kinematic_Contact")
|
||||
theObject = "Contact";
|
||||
else if(val == "Kinematic_Animation")
|
||||
theObject = "Animation";
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ using namespace std;
|
||||
#include "OCCViewer_Viewer3d.h"
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
@ -47,6 +49,7 @@ using namespace std;
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
|
||||
#include "VTKViewer_RenderWindowInteractor.h"
|
||||
#include "VTKViewer_ViewFrame.h"
|
||||
@ -164,17 +167,36 @@ int GEOM_Swig::getIndexTopology(const char* SubIOR, const char* IOR)
|
||||
GEOM::GEOM_Shape_var aSubShape = Geom->GetIORFromString(SubIOR);
|
||||
TopoDS_Shape subshape = ShapeReader.GetShape(Geom, aSubShape);
|
||||
|
||||
TopExp_Explorer Exp ( shape, subshape.ShapeType() );
|
||||
int index = 1;
|
||||
TopTools_MapOfShape M;
|
||||
while ( Exp.More() ) {
|
||||
if ( M.Add(Exp.Current()) ) {
|
||||
if ( Exp.Current().IsSame(subshape) )
|
||||
return index;
|
||||
index++;
|
||||
}
|
||||
Exp.Next();
|
||||
}
|
||||
if(subshape.ShapeType() == TopAbs_COMPOUND) {
|
||||
TopoDS_Iterator it;
|
||||
TopTools_ListOfShape CL;
|
||||
CL.Append(shape);
|
||||
TopTools_ListIteratorOfListOfShape itC;
|
||||
for(itC.Initialize(CL); itC.More(); itC.Next()) {
|
||||
for(it.Initialize(itC.Value()); it.More(); it.Next()) {
|
||||
if (it.Value().ShapeType() == TopAbs_COMPOUND) {
|
||||
if (it.Value().IsSame(subshape))
|
||||
return index;
|
||||
else
|
||||
index++;
|
||||
CL.Append(it.Value());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
TopExp_Explorer Exp(shape, subshape.ShapeType());
|
||||
TopTools_MapOfShape M;
|
||||
while(Exp.More()) {
|
||||
if(M.Add(Exp.Current())) {
|
||||
if(Exp.Current().IsSame(subshape))
|
||||
return index;
|
||||
index++;
|
||||
}
|
||||
Exp.Next();
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,8 @@ LIB_MOC = \
|
||||
|
||||
LIB_CLIENT_IDL = SALOME_Exception.idl \
|
||||
SALOMEDS.idl \
|
||||
SALOMEDS_Attributes.idl
|
||||
SALOMEDS_Attributes.idl \
|
||||
GEOM_Kinematic.idl
|
||||
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOMBase_Tools.cxx
|
||||
// File : GEOMToolsGUI.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
@ -213,7 +213,7 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
||||
else
|
||||
IsoV = "1";
|
||||
|
||||
GEOMBase_NbIsosDlg* NbIsosDlg = new GEOMBase_NbIsosDlg(QAD_Application::getDesktop(), tr("GEOM_MEN_ISOS"), TRUE);
|
||||
GEOMToolsGUI_NbIsosDlg* NbIsosDlg = new GEOMToolsGUI_NbIsosDlg(QAD_Application::getDesktop(), tr("GEOM_MEN_ISOS"), TRUE);
|
||||
int UIso = IsoU.toInt();
|
||||
int VIso = IsoV.toInt();
|
||||
|
||||
@ -401,7 +401,7 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
||||
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
|
||||
ic = v3d->getAISContext();
|
||||
}
|
||||
GEOMBase_TransparencyDlg *aDlg = new GEOMBase_TransparencyDlg(parent, "", Sel, ic);
|
||||
GEOMToolsGUI_TransparencyDlg *aDlg = new GEOMToolsGUI_TransparencyDlg(parent, "", Sel, ic);
|
||||
break;
|
||||
}
|
||||
case 8034: // ISOS - POPUP VIEWER
|
||||
@ -427,8 +427,8 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
||||
else
|
||||
IsoV = "1";
|
||||
|
||||
GEOMBase_NbIsosDlg * NbIsosDlg =
|
||||
new GEOMBase_NbIsosDlg(QAD_Application::getDesktop(), tr("GEOM_MEN_ISOS"), TRUE);
|
||||
GEOMToolsGUI_NbIsosDlg * NbIsosDlg =
|
||||
new GEOMToolsGUI_NbIsosDlg(QAD_Application::getDesktop(), tr("GEOM_MEN_ISOS"), TRUE);
|
||||
|
||||
NbIsosDlg->SpinBoxU->setValue(IsoU.toInt());
|
||||
NbIsosDlg->SpinBoxV->setValue(IsoV.toInt());
|
||||
|
@ -21,7 +21,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOMBase_NbIsosDlg.cxx
|
||||
// File : GEOMToolsGUI_NbIsosDlg.cxx
|
||||
// Author :
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
@ -37,17 +37,17 @@ using namespace std;
|
||||
#include <qspinbox.h>
|
||||
|
||||
//=================================================================================
|
||||
// class : GEOMBase_NbIsosDlg()
|
||||
// purpose : Constructs a GEOMBase_NbIsosDlg which is a child of 'parent', with the
|
||||
// class : GEOMToolsGUI_NbIsosDlg()
|
||||
// purpose : Constructs a GEOMToolsGUI_NbIsosDlg which is a child of 'parent', with the
|
||||
// name 'name' and widget flags set to 'f'.
|
||||
// The dialog will by default be modeless, unless you set 'modal' to
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
GEOMBase_NbIsosDlg::GEOMBase_NbIsosDlg(QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||
GEOMToolsGUI_NbIsosDlg::GEOMToolsGUI_NbIsosDlg(QWidget* parent, const char* name, bool modal, WFlags fl)
|
||||
:QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
||||
{
|
||||
if( !name )
|
||||
setName("GEOMBase_NbIsosDlg");
|
||||
setName("GEOMToolsGUI_NbIsosDlg");
|
||||
setCaption(name);
|
||||
setSizeGripEnabled(TRUE);
|
||||
QGridLayout* MyDialogLayout = new QGridLayout(this);
|
||||
@ -122,10 +122,10 @@ GEOMBase_NbIsosDlg::GEOMBase_NbIsosDlg(QWidget* parent, const char* name, bool m
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ~GEOMBase_NbIsosDlg()
|
||||
// function : ~GEOMToolsGUI_NbIsosDlg()
|
||||
// purpose : Destroys the object and frees any allocated resources
|
||||
//=================================================================================
|
||||
GEOMBase_NbIsosDlg::~GEOMBase_NbIsosDlg()
|
||||
GEOMToolsGUI_NbIsosDlg::~GEOMToolsGUI_NbIsosDlg()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
@ -21,13 +21,13 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOMBase_NbIsosDlg.h
|
||||
// File : GEOMToolsGUI_NbIsosDlg.h
|
||||
// Author :
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef GEOMBASE_NBISOSDLG_H
|
||||
#define GEOMBASE_NBISOSDLG_H
|
||||
#ifndef GEOMTOOLSGUI_NBISOSDLG_H
|
||||
#define GEOMTOOLSGUI_NBISOSDLG_H
|
||||
|
||||
#include <qdialog.h>
|
||||
|
||||
@ -36,16 +36,16 @@ class QSpinBox;
|
||||
class QPushButton;
|
||||
|
||||
//=================================================================================
|
||||
// class : GEOMBase_NbIsosDlg
|
||||
// class : GEOMToolsGUI_NbIsosDlg
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
class GEOMBase_NbIsosDlg : public QDialog
|
||||
class GEOMToolsGUI_NbIsosDlg : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GEOMBase_NbIsosDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
|
||||
~GEOMBase_NbIsosDlg();
|
||||
GEOMToolsGUI_NbIsosDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
|
||||
~GEOMToolsGUI_NbIsosDlg();
|
||||
|
||||
QPushButton* buttonOk;
|
||||
QPushButton* buttonCancel;
|
||||
@ -56,4 +56,4 @@ public:
|
||||
|
||||
};
|
||||
|
||||
#endif // GEOMETRYGUI_NBISOSDLG_H
|
||||
#endif // GEOMTOOLSGUI_NBISOSDLG_H
|
||||
|
@ -21,7 +21,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOMBase_TransparencyDlg.cxx
|
||||
// File : GEOMToolsGUI_TransparencyDlg.cxx
|
||||
// Author : Lucien PIGNOLONI
|
||||
// Module : GEOM
|
||||
|
||||
@ -48,24 +48,24 @@ using namespace std;
|
||||
#include "VTKViewer_RenderWindowInteractor.h"
|
||||
|
||||
//=================================================================================
|
||||
// class : GEOMBase_TransparencyDlg()
|
||||
// class : GEOMToolsGUI_TransparencyDlg()
|
||||
// purpose : Constructs a GEOMBase_SUBSHAPE which is a child of 'parent', with the
|
||||
// name 'name' and widget flags set to 'f'.
|
||||
//
|
||||
// : WARNING : this dialog is modal !
|
||||
//
|
||||
//=================================================================================
|
||||
GEOMBase_TransparencyDlg::GEOMBase_TransparencyDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, const Handle(AIS_InteractiveContext)& ic, bool modal, WFlags fl)
|
||||
GEOMToolsGUI_TransparencyDlg::GEOMToolsGUI_TransparencyDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, const Handle(AIS_InteractiveContext)& ic, bool modal, WFlags fl)
|
||||
:QDialog(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
||||
{
|
||||
if(!name)
|
||||
setName("GEOMBase_TransparencyDlg");
|
||||
setName("GEOMToolsGUI_TransparencyDlg");
|
||||
resize(152, 107);
|
||||
setCaption(tr("GEOM_TRANSPARENCY_TITLE"));
|
||||
setSizeGripEnabled(TRUE);
|
||||
GEOMBase_TransparencyDlgLayout = new QGridLayout(this);
|
||||
GEOMBase_TransparencyDlgLayout->setSpacing(6);
|
||||
GEOMBase_TransparencyDlgLayout->setMargin(11);
|
||||
GEOMToolsGUI_TransparencyDlgLayout = new QGridLayout(this);
|
||||
GEOMToolsGUI_TransparencyDlgLayout->setSpacing(6);
|
||||
GEOMToolsGUI_TransparencyDlgLayout->setMargin(11);
|
||||
|
||||
/*************************************************************************/
|
||||
QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
|
||||
@ -112,8 +112,8 @@ GEOMBase_TransparencyDlg::GEOMBase_TransparencyDlg(QWidget* parent, const char*
|
||||
GroupC1Layout->addMultiCellWidget( Slider1, 1, 1, 0, 2 );
|
||||
/*************************************************************************/
|
||||
|
||||
GEOMBase_TransparencyDlgLayout->addWidget(GroupC1, 0, 0);
|
||||
GEOMBase_TransparencyDlgLayout->addWidget(GroupButtons, 1, 0);
|
||||
GEOMToolsGUI_TransparencyDlgLayout->addWidget(GroupC1, 0, 0);
|
||||
GEOMToolsGUI_TransparencyDlgLayout->addWidget(GroupButtons, 1, 0);
|
||||
|
||||
/* Initialisations */
|
||||
this->myGeomGUI = GEOMContext::GetGeomGUI();
|
||||
@ -133,18 +133,18 @@ GEOMBase_TransparencyDlg::GEOMBase_TransparencyDlg(QWidget* parent, const char*
|
||||
connect(Slider1, SIGNAL(valueChanged(int)), this, SLOT(ValueHasChanged(int)));
|
||||
|
||||
/* Move widget on the botton right corner of main widget */
|
||||
int x, y ;
|
||||
myGeomBase->DefineDlgPosition(this, x, y);
|
||||
this->move(x, y) ;
|
||||
// int x, y ;
|
||||
// myGeomBase->DefineDlgPosition(this, x, y);
|
||||
// this->move(x, y) ;
|
||||
this->show() ; /* Displays this Dialog */
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ~GEOMBase_TransparencyDlg()
|
||||
// function : ~GEOMToolsGUI_TransparencyDlg()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
GEOMBase_TransparencyDlg::~GEOMBase_TransparencyDlg()
|
||||
GEOMToolsGUI_TransparencyDlg::~GEOMToolsGUI_TransparencyDlg()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
@ -154,7 +154,7 @@ GEOMBase_TransparencyDlg::~GEOMBase_TransparencyDlg()
|
||||
// function : ClickOnOk()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void GEOMBase_TransparencyDlg::ClickOnOk()
|
||||
void GEOMToolsGUI_TransparencyDlg::ClickOnOk()
|
||||
{
|
||||
accept();
|
||||
return;
|
||||
@ -165,7 +165,7 @@ void GEOMBase_TransparencyDlg::ClickOnOk()
|
||||
// function : ClickOnClose()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void GEOMBase_TransparencyDlg::ClickOnClose()
|
||||
void GEOMToolsGUI_TransparencyDlg::ClickOnClose()
|
||||
{
|
||||
accept();
|
||||
return;
|
||||
@ -177,7 +177,7 @@ void GEOMBase_TransparencyDlg::ClickOnClose()
|
||||
// purpose : Called when value of slider change
|
||||
// : or the first time as initilisation
|
||||
//=================================================================================
|
||||
void GEOMBase_TransparencyDlg::ValueHasChanged(int newValue)
|
||||
void GEOMToolsGUI_TransparencyDlg::ValueHasChanged(int newValue)
|
||||
{
|
||||
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) {
|
||||
// VTK
|
||||
|
@ -21,7 +21,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : GEOMBase_TransparencyDlg.h
|
||||
// File : GEOMToolsGUI_TransparencyDlg.h
|
||||
// Author : Lucien PIGNOLONI
|
||||
// Module : GEOM
|
||||
// $Header$
|
||||
@ -51,23 +51,23 @@ class QSlider;
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// class : GEOMBase_TransparencyDlg
|
||||
// class : GEOMToolsGUI_TransparencyDlg
|
||||
// purpose :
|
||||
// : WARNING : that is a MODAL dialog.
|
||||
//=================================================================================
|
||||
class GEOMBase_TransparencyDlg : public QDialog
|
||||
class GEOMToolsGUI_TransparencyDlg : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GEOMBase_TransparencyDlg( QWidget* parent = 0,
|
||||
GEOMToolsGUI_TransparencyDlg( QWidget* parent = 0,
|
||||
const char* name = 0,
|
||||
SALOME_Selection* Sel = 0,
|
||||
const Handle(AIS_InteractiveContext)& ic = 0,
|
||||
bool modal = TRUE,
|
||||
WFlags fl = 0 );
|
||||
|
||||
~GEOMBase_TransparencyDlg();
|
||||
~GEOMToolsGUI_TransparencyDlg();
|
||||
|
||||
private :
|
||||
|
||||
@ -89,7 +89,7 @@ public slots:
|
||||
void ValueHasChanged( int newValue ) ;
|
||||
|
||||
protected:
|
||||
QGridLayout* GEOMBase_TransparencyDlgLayout;
|
||||
QGridLayout* GEOMToolsGUI_TransparencyDlgLayout;
|
||||
QHBoxLayout* Layout1;
|
||||
QHBoxLayout* Layout2;
|
||||
};
|
||||
|
@ -49,7 +49,7 @@ LIB_MOC = \
|
||||
GEOMToolsGUI_NbIsosDlg.h \
|
||||
GEOMToolsGUI_TransparencyDlg.h
|
||||
|
||||
LIB_CLIENT_IDL = SALOMEDS_Attributes.idl
|
||||
LIB_CLIENT_IDL = SALOMEDS_Attributes.idl GEOM_Kinematic.idl
|
||||
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
|
@ -58,6 +58,7 @@ LIB_CLIENT_IDL = SALOMEDS.idl \
|
||||
SALOME_Exception.idl \
|
||||
GEOM_Gen.idl \
|
||||
GEOM_Shape.idl \
|
||||
GEOM_Kinematic.idl \
|
||||
SALOME_Component.idl
|
||||
|
||||
EXPORT_SHAREDPYSCRIPTS=\
|
||||
|
@ -222,7 +222,7 @@ def MakeFace(aShapeWire,WantPlanarFace):
|
||||
|
||||
def MakeFaces(ListShape,WantPlanarFace):
|
||||
anObj = geom.MakeFaces(ListShape,WantPlanarFace)
|
||||
ior = salome.orb.object_to_string(anObj)
|
||||
ior = orb.object_to_string(anObj)
|
||||
anObj._set_Name(ior)
|
||||
return anObj
|
||||
|
||||
@ -368,10 +368,11 @@ def Partition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
|
||||
return anObj
|
||||
|
||||
def SuppressFaces(aShape,ListOfId):
|
||||
anObj = geom.SuppressFaces(aShape,ListOfId)
|
||||
ior = orb.object_to_string(anObj)
|
||||
anObj._set_Name(ior)
|
||||
return anObj
|
||||
ListObj = geom.SuppressFaces(aShape,ListOfId)
|
||||
for anObj in ListObj :
|
||||
ior = orb.object_to_string(anObj)
|
||||
anObj._set_Name(ior)
|
||||
return ListObj
|
||||
|
||||
def SuppressHole(aShape,ListOfFace,ListOfWire,ListOfEndFace):
|
||||
anObj = geom.SuppressHole(aShape,ListOfFace,ListOfWire,ListOfEndFace)
|
||||
@ -460,3 +461,166 @@ def Archimede(aShape,weight,WaterDensity,MeshingDeflection):
|
||||
def CheckShape(aShape):
|
||||
Status = geom.CheckShape(aShape)
|
||||
return Status
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Kinematic objects
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
def InitAssembly():
|
||||
anObj = geom.InitAssembly()
|
||||
ior = orb.object_to_string(anObj)
|
||||
anObj._set_Name(ior)
|
||||
return anObj
|
||||
|
||||
def AddContact(Ass,Shape1,Shape2,Type,Step):
|
||||
anObj = geom.AddContact(Ass,Shape1,Shape2,Type,Step)
|
||||
ior = orb.object_to_string(anObj)
|
||||
anObj._set_Name(ior)
|
||||
return anObj
|
||||
|
||||
def AddAnimation(Ass,Frame,Duration,NbSeq):
|
||||
anObj = geom.AddAnimation(Ass,Frame,Duration,NbSeq)
|
||||
ior = orb.object_to_string(anObj)
|
||||
anObj._set_Name(ior)
|
||||
return anObj
|
||||
|
||||
def SetPosition(aContact):
|
||||
geom.SetPosition(aContact)
|
||||
|
||||
def SetRotation(aContact):
|
||||
geom.SetRotation(aContact)
|
||||
|
||||
def SetTranslation(aContact):
|
||||
geom.SetTranslation(aContact)
|
||||
|
||||
def addAssemblyToStudy(anAss, aName):
|
||||
myBuilder.NewCommand()
|
||||
newObj = myBuilder.NewObject(father)
|
||||
ior = orb.object_to_string(anAss)
|
||||
A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR");
|
||||
ObjIOR = A1._narrow(SALOMEDS.AttributeIOR)
|
||||
ObjIOR.SetValue(ior)
|
||||
A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName");
|
||||
ObjName = A2._narrow(SALOMEDS.AttributeName)
|
||||
ObjName.SetValue(aName)
|
||||
A3 = myBuilder.FindOrCreateAttribute(newObj, "AttributeComment");
|
||||
ObjType = A3._narrow(SALOMEDS.AttributeComment)
|
||||
ObjType.SetValue("Kinematic_Assembly")
|
||||
A4 = myBuilder.FindOrCreateAttribute(newObj, "AttributePixMap");
|
||||
ObjPixmap = A4._narrow(SALOMEDS.AttributePixMap)
|
||||
ObjPixmap.SetPixMap("ICON_OBJBROWSER_ASSEMBLY")
|
||||
|
||||
id = newObj.GetID()
|
||||
anAss._set_StudyShapeId(id)
|
||||
myBuilder.CommitCommand()
|
||||
return id
|
||||
|
||||
def addContactToStudy(anAss, aContact, aName):
|
||||
myBuilder.NewCommand()
|
||||
newObj = myBuilder.NewObject(salome.IDToSObject(anAss._get_StudyShapeId()))
|
||||
ior = orb.object_to_string(aContact)
|
||||
A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR");
|
||||
ObjIOR = A1._narrow(SALOMEDS.AttributeIOR)
|
||||
ObjIOR.SetValue(ior)
|
||||
A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName");
|
||||
ObjName = A2._narrow(SALOMEDS.AttributeName)
|
||||
ObjName.SetValue(aName)
|
||||
A3 = myBuilder.FindOrCreateAttribute(newObj, "AttributeComment");
|
||||
ObjType = A3._narrow(SALOMEDS.AttributeComment)
|
||||
ObjType.SetValue("Kinematic_Contact")
|
||||
A4 = myBuilder.FindOrCreateAttribute(newObj, "AttributePixMap");
|
||||
ObjPixmap = A4._narrow(SALOMEDS.AttributePixMap)
|
||||
ObjPixmap.SetPixMap("ICON_OBJBROWSER_CONTACT")
|
||||
|
||||
aTypeName = GetContactName(aContact.GetType())
|
||||
ObjRef = myBuilder.NewObject(newObj)
|
||||
A5 = myBuilder.FindOrCreateAttribute(ObjRef, "AttributeName");
|
||||
ObjRefName = A5._narrow(SALOMEDS.AttributeName)
|
||||
ObjRefName.SetValue(aTypeName)
|
||||
A6 = myBuilder.FindOrCreateAttribute(ObjRef, "AttributeSelectable");
|
||||
ObjRefSel = A6._narrow(SALOMEDS.AttributeSelectable)
|
||||
ObjRefSel.SetSelectable(0)
|
||||
|
||||
aShape = aContact.GetShape1()
|
||||
if aShape is not None:
|
||||
if aShape._get_StudyShapeId()!="":
|
||||
Obj = salome.IDToSObject(aShape._get_StudyShapeId())
|
||||
if Obj is not None:
|
||||
Obj1 = myBuilder.NewObject(newObj)
|
||||
myBuilder.Addreference(Obj1, Obj)
|
||||
|
||||
aShape = aContact.GetShape2()
|
||||
if aShape is not None:
|
||||
if aShape._get_StudyShapeId()!="":
|
||||
Obj = salome.IDToSObject(aShape._get_StudyShapeId())
|
||||
if Obj is not None:
|
||||
Obj1 = myBuilder.NewObject(newObj)
|
||||
myBuilder.Addreference(Obj1, Obj)
|
||||
|
||||
id = newObj.GetID()
|
||||
aContact._set_StudyShapeId(id)
|
||||
myBuilder.CommitCommand()
|
||||
return id
|
||||
|
||||
def addAnimationToStudy(anAnim, aName):
|
||||
myBuilder.NewCommand()
|
||||
newObj = myBuilder.NewObject(father)
|
||||
ior = orb.object_to_string(anAnim)
|
||||
A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR");
|
||||
ObjIOR = A1._narrow(SALOMEDS.AttributeIOR)
|
||||
ObjIOR.SetValue(ior)
|
||||
A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName");
|
||||
ObjName = A2._narrow(SALOMEDS.AttributeName)
|
||||
ObjName.SetValue(aName)
|
||||
A3 = myBuilder.FindOrCreateAttribute(newObj, "AttributeComment");
|
||||
ObjType = A3._narrow(SALOMEDS.AttributeComment)
|
||||
ObjType.SetValue("Kinematic_Animation")
|
||||
A4 = myBuilder.FindOrCreateAttribute(newObj, "AttributePixMap");
|
||||
ObjPixmap = A4._narrow(SALOMEDS.AttributePixMap)
|
||||
ObjPixmap.SetPixMap("ICON_OBJBROWSER_ANIMATION")
|
||||
|
||||
anAss = anAnim.GetAssembly()
|
||||
if anAss is not None:
|
||||
if anAss._get_StudyShapeId()!="":
|
||||
Obj = salome.IDToSObject(anAss._get_StudyShapeId())
|
||||
if Obj is not None:
|
||||
Obj1 = myBuilder.NewObject(newObj)
|
||||
myBuilder.Addreference(Obj1, Obj)
|
||||
|
||||
aFrame = anAnim.GetFrame()
|
||||
if aFrame is not None:
|
||||
if aFrame._get_StudyShapeId()!="":
|
||||
Obj = salome.IDToSObject(aFrame._get_StudyShapeId())
|
||||
if Obj is not None:
|
||||
Obj1 = myBuilder.NewObject(newObj)
|
||||
myBuilder.Addreference(Obj1, Obj)
|
||||
|
||||
id = newObj.GetID()
|
||||
anAnim._set_StudyShapeId(id)
|
||||
myBuilder.CommitCommand()
|
||||
return id
|
||||
|
||||
def GetContactName(aType):
|
||||
if aType == 0:
|
||||
aName = "Embedding"
|
||||
elif aType == 1:
|
||||
aName = "Pivot"
|
||||
elif aType == 2:
|
||||
aName = "Slide"
|
||||
elif aType == 3:
|
||||
aName = "Sliding Pivot"
|
||||
elif aType == 4:
|
||||
aName = "Spherical"
|
||||
elif aType == 5:
|
||||
aName = "Plane"
|
||||
elif aType == 6:
|
||||
aName = "Annular"
|
||||
elif aType == 7:
|
||||
aName = "Rectilinear"
|
||||
elif aType == 8:
|
||||
aName = "Ponctual"
|
||||
elif aType == 9:
|
||||
aName = "Helicoidal"
|
||||
else:
|
||||
aName = "Contact"
|
||||
return aName
|
||||
|
@ -180,7 +180,7 @@ def MakeCircle(p1,d1,radius):
|
||||
|
||||
def MakeEllipse(p1,d1,radiusMaj,radiusMin):
|
||||
anObj = geom.MakeEllipse(p1,d1,radiusMaj, radiusMin)
|
||||
ior = orb.object_to_string(anObj)
|
||||
ior = salome.orb.object_to_string(anObj)
|
||||
anObj._set_Name(ior)
|
||||
return anObj
|
||||
|
||||
@ -394,10 +394,11 @@ def Partition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
|
||||
return anObj
|
||||
|
||||
def SuppressFaces(aShape,ListOfId):
|
||||
anObj = geom.SuppressFaces(aShape,ListOfId)
|
||||
ior = salome.orb.object_to_string(anObj)
|
||||
anObj._set_Name(ior)
|
||||
return anObj
|
||||
ListObj = geom.SuppressFaces(aShape,ListOfId)
|
||||
for anObj in ListObj :
|
||||
ior = salome.orb.object_to_string(anObj)
|
||||
anObj._set_Name(ior)
|
||||
return ListObj
|
||||
|
||||
def SuppressHole(aShape,ListOfFace,ListOfWire,ListOfEndFace):
|
||||
anObj = geom.SuppressHole(aShape,ListOfFace,ListOfWire,ListOfEndFace)
|
||||
@ -486,3 +487,166 @@ def Archimede(aShape,weight,WaterDensity,MeshingDeflection):
|
||||
def CheckShape(aShape):
|
||||
Status = geom.CheckShape(aShape)
|
||||
return Status
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Kinematic objects
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
def InitAssembly():
|
||||
anObj = geom.InitAssembly()
|
||||
ior = salome.orb.object_to_string(anObj)
|
||||
anObj._set_Name(ior)
|
||||
return anObj
|
||||
|
||||
def AddContact(Ass,Shape1,Shape2,Type,Step):
|
||||
anObj = geom.AddContact(Ass,Shape1,Shape2,Type,Step)
|
||||
ior = salome.orb.object_to_string(anObj)
|
||||
anObj._set_Name(ior)
|
||||
return anObj
|
||||
|
||||
def AddAnimation(Ass,Frame,Duration,NbSeq):
|
||||
anObj = geom.AddAnimation(Ass,Frame,Duration,NbSeq)
|
||||
ior = salome.orb.object_to_string(anObj)
|
||||
anObj._set_Name(ior)
|
||||
return anObj
|
||||
|
||||
def SetPosition(aContact):
|
||||
geom.SetPosition(aContact)
|
||||
|
||||
def SetRotation(aContact):
|
||||
geom.SetRotation(aContact)
|
||||
|
||||
def SetTranslation(aContact):
|
||||
geom.SetTranslation(aContact)
|
||||
|
||||
def addAssemblyToStudy(anAss, aName):
|
||||
myBuilder.NewCommand()
|
||||
newObj = myBuilder.NewObject(father)
|
||||
ior = salome.orb.object_to_string(anAss)
|
||||
A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR");
|
||||
ObjIOR = A1._narrow(SALOMEDS.AttributeIOR)
|
||||
ObjIOR.SetValue(ior)
|
||||
A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName");
|
||||
ObjName = A2._narrow(SALOMEDS.AttributeName)
|
||||
ObjName.SetValue(aName)
|
||||
A3 = myBuilder.FindOrCreateAttribute(newObj, "AttributeComment");
|
||||
ObjType = A3._narrow(SALOMEDS.AttributeComment)
|
||||
ObjType.SetValue("Kinematic_Assembly")
|
||||
A4 = myBuilder.FindOrCreateAttribute(newObj, "AttributePixMap");
|
||||
ObjPixmap = A4._narrow(SALOMEDS.AttributePixMap)
|
||||
ObjPixmap.SetPixMap("ICON_OBJBROWSER_ASSEMBLY")
|
||||
|
||||
id = newObj.GetID()
|
||||
anAss._set_StudyShapeId(id)
|
||||
myBuilder.CommitCommand()
|
||||
return id
|
||||
|
||||
def addContactToStudy(anAss, aContact, aName):
|
||||
myBuilder.NewCommand()
|
||||
newObj = myBuilder.NewObject(salome.IDToSObject(anAss._get_StudyShapeId()))
|
||||
ior = salome.orb.object_to_string(aContact)
|
||||
A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR");
|
||||
ObjIOR = A1._narrow(SALOMEDS.AttributeIOR)
|
||||
ObjIOR.SetValue(ior)
|
||||
A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName");
|
||||
ObjName = A2._narrow(SALOMEDS.AttributeName)
|
||||
ObjName.SetValue(aName)
|
||||
A3 = myBuilder.FindOrCreateAttribute(newObj, "AttributeComment");
|
||||
ObjType = A3._narrow(SALOMEDS.AttributeComment)
|
||||
ObjType.SetValue("Kinematic_Contact")
|
||||
A4 = myBuilder.FindOrCreateAttribute(newObj, "AttributePixMap");
|
||||
ObjPixmap = A4._narrow(SALOMEDS.AttributePixMap)
|
||||
ObjPixmap.SetPixMap("ICON_OBJBROWSER_CONTACT")
|
||||
|
||||
aTypeName = GetContactName(aContact.GetType())
|
||||
ObjRef = myBuilder.NewObject(newObj)
|
||||
A5 = myBuilder.FindOrCreateAttribute(ObjRef, "AttributeName");
|
||||
ObjRefName = A5._narrow(SALOMEDS.AttributeName)
|
||||
ObjRefName.SetValue(aTypeName)
|
||||
A6 = myBuilder.FindOrCreateAttribute(ObjRef, "AttributeSelectable");
|
||||
ObjRefSel = A6._narrow(SALOMEDS.AttributeSelectable)
|
||||
ObjRefSel.SetSelectable(0)
|
||||
|
||||
aShape = aContact.GetShape1()
|
||||
if aShape is not None:
|
||||
if aShape._get_StudyShapeId()!="":
|
||||
Obj = salome.IDToSObject(aShape._get_StudyShapeId())
|
||||
if Obj is not None:
|
||||
Obj1 = myBuilder.NewObject(newObj)
|
||||
myBuilder.Addreference(Obj1, Obj)
|
||||
|
||||
aShape = aContact.GetShape2()
|
||||
if aShape is not None:
|
||||
if aShape._get_StudyShapeId()!="":
|
||||
Obj = salome.IDToSObject(aShape._get_StudyShapeId())
|
||||
if Obj is not None:
|
||||
Obj1 = myBuilder.NewObject(newObj)
|
||||
myBuilder.Addreference(Obj1, Obj)
|
||||
|
||||
id = newObj.GetID()
|
||||
aContact._set_StudyShapeId(id)
|
||||
myBuilder.CommitCommand()
|
||||
return id
|
||||
|
||||
def addAnimationToStudy(anAnim, aName):
|
||||
myBuilder.NewCommand()
|
||||
newObj = myBuilder.NewObject(father)
|
||||
ior = salome.orb.object_to_string(anAnim)
|
||||
A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR");
|
||||
ObjIOR = A1._narrow(SALOMEDS.AttributeIOR)
|
||||
ObjIOR.SetValue(ior)
|
||||
A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName");
|
||||
ObjName = A2._narrow(SALOMEDS.AttributeName)
|
||||
ObjName.SetValue(aName)
|
||||
A3 = myBuilder.FindOrCreateAttribute(newObj, "AttributeComment");
|
||||
ObjType = A3._narrow(SALOMEDS.AttributeComment)
|
||||
ObjType.SetValue("Kinematic_Animation")
|
||||
A4 = myBuilder.FindOrCreateAttribute(newObj, "AttributePixMap");
|
||||
ObjPixmap = A4._narrow(SALOMEDS.AttributePixMap)
|
||||
ObjPixmap.SetPixMap("ICON_OBJBROWSER_ANIMATION")
|
||||
|
||||
anAss = anAnim.GetAssembly()
|
||||
if anAss is not None:
|
||||
if anAss._get_StudyShapeId()!="":
|
||||
Obj = salome.IDToSObject(anAss._get_StudyShapeId())
|
||||
if Obj is not None:
|
||||
Obj1 = myBuilder.NewObject(newObj)
|
||||
myBuilder.Addreference(Obj1, Obj)
|
||||
|
||||
aFrame = anAnim.GetFrame()
|
||||
if aFrame is not None:
|
||||
if aFrame._get_StudyShapeId()!="":
|
||||
Obj = salome.IDToSObject(aFrame._get_StudyShapeId())
|
||||
if Obj is not None:
|
||||
Obj1 = myBuilder.NewObject(newObj)
|
||||
myBuilder.Addreference(Obj1, Obj)
|
||||
|
||||
id = newObj.GetID()
|
||||
anAnim._set_StudyShapeId(id)
|
||||
myBuilder.CommitCommand()
|
||||
return id
|
||||
|
||||
def GetContactName(aType):
|
||||
if aType == 0:
|
||||
aName = "Embedding"
|
||||
elif aType == 1:
|
||||
aName = "Pivot"
|
||||
elif aType == 2:
|
||||
aName = "Slide"
|
||||
elif aType == 3:
|
||||
aName = "Sliding Pivot"
|
||||
elif aType == 4:
|
||||
aName = "Spherical"
|
||||
elif aType == 5:
|
||||
aName = "Plane"
|
||||
elif aType == 6:
|
||||
aName = "Annular"
|
||||
elif aType == 7:
|
||||
aName = "Rectilinear"
|
||||
elif aType == 8:
|
||||
aName = "Ponctual"
|
||||
elif aType == 9:
|
||||
aName = "Helicoidal"
|
||||
else:
|
||||
aName = "Contact"
|
||||
return aName
|
||||
|
@ -53,7 +53,7 @@ LIB_MOC = \
|
||||
GenerationGUI_FillingDlg.h \
|
||||
GenerationGUI_PipeDlg.h
|
||||
|
||||
LIB_CLIENT_IDL =
|
||||
LIB_CLIENT_IDL = GEOM_Kinematic.idl
|
||||
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
|
189
src/KINEMATIC/Kinematic_Animation.cxx
Normal file
@ -0,0 +1,189 @@
|
||||
// GEOM KINEMATIC
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : Kinematic_Animation.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
using namespace std;
|
||||
#include "Kinematic_Animation.hxx"
|
||||
|
||||
#include <Geom_Transformation.hxx>
|
||||
#include <AIS_Shape.hxx>
|
||||
#include <unistd.h>
|
||||
|
||||
//=======================================================================
|
||||
// profile
|
||||
// command to build a profile
|
||||
//=======================================================================
|
||||
Kinematic_Animation::Kinematic_Animation()
|
||||
{
|
||||
myIsShading = false;
|
||||
IsCreated = false;
|
||||
myNbAIS = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// profile
|
||||
// command to build a profile
|
||||
//=======================================================================
|
||||
Kinematic_Animation::Kinematic_Animation(Kinematic_Assembly* Ass, TopoDS_Shape frame,
|
||||
double duration, int nbseq)
|
||||
{
|
||||
myAss = Ass;
|
||||
myFrame = frame;
|
||||
myDuration = duration;
|
||||
myNbSeq = nbseq;
|
||||
myIsShading = false;
|
||||
IsCreated = false;
|
||||
myNbAIS = 0;
|
||||
this->SetMap();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ~Kinematic_Animation()
|
||||
// purpose : Destroys the object and frees any allocated resources
|
||||
//=================================================================================
|
||||
Kinematic_Animation::~Kinematic_Animation() {}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : SetMap()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void Kinematic_Animation::SetMap()
|
||||
{
|
||||
list <Kinematic_Contact *> ContactList = myAss->GetContactList();
|
||||
Kinematic_Contact* aContact;
|
||||
|
||||
list <Kinematic_Contact *>::const_iterator it = ContactList.begin();
|
||||
while(it != ContactList.end()) {
|
||||
aContact = *it;
|
||||
if(!myIndexToShape.Contains(aContact->Shape1()))
|
||||
myIndexToShape.Add(aContact->Shape1());
|
||||
|
||||
if(!myIndexToShape.Contains(aContact->Shape2()))
|
||||
myIndexToShape.Add(aContact->Shape2());
|
||||
|
||||
it++;
|
||||
}
|
||||
|
||||
for(int i = 1; i <= myIndexToShape.Extent(); i++) {
|
||||
it = ContactList.begin();
|
||||
list <Kinematic_Contact *> ContactListOfShape;
|
||||
TopoDS_Shape myShape = myIndexToShape.FindKey(i);
|
||||
while(it != ContactList.end()) {
|
||||
aContact = *it;
|
||||
if(myShape == aContact->Shape1() || myShape == aContact->Shape2())
|
||||
ContactListOfShape.push_back(aContact);
|
||||
it++;
|
||||
}
|
||||
myStlMapofShapeListOfContact[i] = ContactListOfShape;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetNextShape()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void Kinematic_Animation::GetNextShape(const Handle(AIS_InteractiveContext)& ic,
|
||||
gp_Trsf& aLoc, TopoDS_Shape Shape1, double Step)
|
||||
{
|
||||
int j = 0;
|
||||
list <Kinematic_Contact *> ContactListOfShape;
|
||||
Kinematic_Contact* aContact;
|
||||
TopoDS_Shape myShape, myShape2, aNewShape;
|
||||
|
||||
for(int i = 1; i <= myIndexToShape.Extent(); i++) {
|
||||
myShape = myIndexToShape.FindKey(i);
|
||||
if(myShape == Shape1) {
|
||||
gp_Trsf aNewLoc = aLoc;
|
||||
ContactListOfShape = myStlMapofShapeListOfContact[i];
|
||||
list <Kinematic_Contact *>::const_iterator it = ContactListOfShape.begin();
|
||||
while(it != ContactListOfShape.end()) {
|
||||
aContact = *it;
|
||||
if(aContact->Shape1() == Shape1)
|
||||
myShape2 = aContact->Shape2();
|
||||
else if(aContact->Shape2() == Shape1)
|
||||
myShape2 = aContact->Shape1();
|
||||
|
||||
if(!myMovedShape.Contains(myShape2)) {
|
||||
myMovedShape.Add(myShape2);
|
||||
|
||||
if(!IsCreated) {
|
||||
Handle(AIS_Shape) mySimulationShape;
|
||||
mySimulationShape = new AIS_Shape(TopoDS_Shape());
|
||||
mySimulationShape->Set(myShape2);
|
||||
ListOfAIS.Append(mySimulationShape);
|
||||
}
|
||||
else
|
||||
MoveShape(ic, aLoc, aContact, Step);
|
||||
|
||||
GetNextShape(ic, aLoc, myShape2, Step);
|
||||
}
|
||||
aLoc = aNewLoc;
|
||||
it++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : CreateShape()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void Kinematic_Animation::MoveShape(const Handle(AIS_InteractiveContext)& ic,
|
||||
gp_Trsf& aLoc, Kinematic_Contact* aContact,
|
||||
double Step)
|
||||
{
|
||||
gp_Trsf aTrans = aContact->GetTransformation(Step);
|
||||
aLoc = aLoc * aTrans;
|
||||
|
||||
myNbAIS++;
|
||||
Handle(AIS_Shape) mySimulationShape = Handle(AIS_Shape)::DownCast(ListOfAIS.Value(myNbAIS));
|
||||
Handle(Geom_Transformation) aGTrans = new Geom_Transformation();
|
||||
aGTrans->SetTrsf(aLoc);
|
||||
mySimulationShape->SetTransformation(aGTrans, false, false);
|
||||
|
||||
if(myIsShading) {
|
||||
mySimulationShape->SetColor(Quantity_NOC_GOLDENROD);
|
||||
ic->SetDisplayMode(mySimulationShape, 1, Standard_False);
|
||||
}
|
||||
else {
|
||||
mySimulationShape->SetColor(Quantity_NOC_GREEN);
|
||||
ic->SetDisplayMode(mySimulationShape, 0, Standard_False);
|
||||
}
|
||||
ic->Display(mySimulationShape, Standard_False);
|
||||
return;
|
||||
}
|
85
src/KINEMATIC/Kinematic_Animation.hxx
Normal file
@ -0,0 +1,85 @@
|
||||
// GEOM KINEMATIC
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : Kinematic_Animation.hxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef _KINEMATIC_ANIMATION_HXX
|
||||
#define _KINEMATIC_ANIMATION_HXX
|
||||
|
||||
#include "Kinematic_Assembly.hxx"
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TDF_Label.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_SequenceOfInteractive.hxx>
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
class Kinematic_Animation
|
||||
{
|
||||
public:
|
||||
Kinematic_Animation();
|
||||
Kinematic_Animation(Kinematic_Assembly* Ass, TopoDS_Shape frame,
|
||||
double duration, int nbseq);
|
||||
~Kinematic_Animation();
|
||||
|
||||
private:
|
||||
map <int, list <Kinematic_Contact *> > myStlMapofShapeListOfContact;
|
||||
Kinematic_Assembly* myAss;
|
||||
TopoDS_Shape myFrame;
|
||||
double myDuration;
|
||||
int myNbSeq;
|
||||
|
||||
public:
|
||||
AIS_SequenceOfInteractive ListOfAIS;
|
||||
TopTools_IndexedMapOfShape myIndexToShape;
|
||||
TopTools_IndexedMapOfShape myMovedShape;
|
||||
bool IsCreated;
|
||||
int myNbAIS;
|
||||
bool myIsShading;
|
||||
|
||||
void SetMap();
|
||||
void GetNextShape(const Handle (AIS_InteractiveContext)& ic,
|
||||
gp_Trsf& aLoc, TopoDS_Shape Shape1, double Step);
|
||||
void MoveShape(const Handle(AIS_InteractiveContext)& ic,
|
||||
gp_Trsf& aLoc, Kinematic_Contact* aContact,
|
||||
double Step);
|
||||
|
||||
void Assembly(Kinematic_Assembly* Assembly){myAss = Assembly;};
|
||||
void Frame(TopoDS_Shape Frame){myFrame = Frame;};
|
||||
void Duration(double Duration){myDuration = Duration;};
|
||||
void NbSeq(int NbSeq){myNbSeq = NbSeq;};
|
||||
|
||||
Kinematic_Assembly* Assembly(){return myAss;};
|
||||
TopoDS_Shape& Frame(){return myFrame;};
|
||||
double& Duration(){return myDuration;};
|
||||
int& NbSeq(){return myNbSeq;};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
69
src/KINEMATIC/Kinematic_Assembly.cxx
Normal file
@ -0,0 +1,69 @@
|
||||
// GEOM KINEMATIC
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : Kinematic_Assembly.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
using namespace std;
|
||||
#include "Kinematic_Assembly.hxx"
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// profile
|
||||
// command to build a profile
|
||||
//=======================================================================
|
||||
Kinematic_Assembly::Kinematic_Assembly()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ~Kinematic_Assembly()
|
||||
// purpose : Destroys the object and frees any allocated resources
|
||||
//=================================================================================
|
||||
Kinematic_Assembly::~Kinematic_Assembly()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetContactList()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
list <Kinematic_Contact *> Kinematic_Assembly::GetContactList()
|
||||
{
|
||||
return ContactList;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : AddContact()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void Kinematic_Assembly::AddContact(Kinematic_Contact* aContact)
|
||||
{
|
||||
ContactList.push_back(aContact);
|
||||
}
|
52
src/KINEMATIC/Kinematic_Assembly.hxx
Normal file
@ -0,0 +1,52 @@
|
||||
// GEOM KINEMATIC
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : Kinematic_Assembly.hxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef _KINEMATIC_ASSEMBLY_HXX
|
||||
#define _KINEMATIC_ASSEMBLY_HXX
|
||||
|
||||
#include "Kinematic_Contact.hxx"
|
||||
|
||||
#include <list>
|
||||
|
||||
class Kinematic_Assembly
|
||||
{
|
||||
|
||||
public:
|
||||
Kinematic_Assembly();
|
||||
~Kinematic_Assembly();
|
||||
|
||||
private:
|
||||
list <Kinematic_Contact *> ContactList;
|
||||
|
||||
public:
|
||||
list <Kinematic_Contact *> GetContactList();
|
||||
void AddContact(Kinematic_Contact* aContact);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
133
src/KINEMATIC/Kinematic_Contact.cxx
Normal file
@ -0,0 +1,133 @@
|
||||
// GEOM KINEMATIC
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : Kinematic_Contact.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
using namespace std;
|
||||
#include "Kinematic_Contact.hxx"
|
||||
|
||||
//=======================================================================
|
||||
// profile
|
||||
// command to build a profile
|
||||
//=======================================================================
|
||||
Kinematic_Contact::Kinematic_Contact(){}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// profile
|
||||
// command to build a profile
|
||||
//=======================================================================
|
||||
Kinematic_Contact::Kinematic_Contact(TopoDS_Shape Shape1, TopoDS_Shape Shape2,
|
||||
int type, double step)
|
||||
{
|
||||
myType = type;
|
||||
myShape1 = Shape1;
|
||||
myShape2 = Shape2;
|
||||
myStep = step;
|
||||
|
||||
gp_Pnt Origin(0, 0, 0);
|
||||
gp_Dir DirX(1, 0, 0);
|
||||
gp_Dir DirY(0, 1, 0);
|
||||
gp_Dir DirZ(0, 0, 1);
|
||||
|
||||
Kinematic_Position Pos(Origin, DirX, DirY, DirZ);
|
||||
Kinematic_Rotation Rot(1, 2, 3, 0, 0, 0);
|
||||
Kinematic_Translation Trans(0, 0, 0);
|
||||
|
||||
myPosition = Pos;
|
||||
myRotation = Rot;
|
||||
myTranslation = Trans;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ~Kinematic_Contact()
|
||||
// purpose : Destroys the object and frees any allocated resources
|
||||
//=================================================================================
|
||||
Kinematic_Contact::~Kinematic_Contact() {}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetTransformation()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
gp_Trsf Kinematic_Contact::GetTransformation(double Step)
|
||||
{
|
||||
gp_Vec aVect;
|
||||
gp_Trsf aTransformation, aRot, aRot1, aRot2, aRot3;
|
||||
|
||||
aVect.SetCoord(Step * myTranslation.ValX(), Step * myTranslation.ValY(), Step * myTranslation.ValZ());
|
||||
aTransformation.SetTranslation(aVect);
|
||||
|
||||
if(myRotation.Rot1() == 1) { //Axe X
|
||||
aRot1.SetRotation(myPosition.AxeX(), Step * myRotation.ValX() * PI / 180);
|
||||
if(myRotation.Rot2() == 2) {
|
||||
aRot2.SetRotation(myPosition.AxeY(), Step * myRotation.ValY() * PI / 180);
|
||||
aRot3.SetRotation(myPosition.AxeZ(), Step * myRotation.ValZ() * PI / 180);
|
||||
} else {
|
||||
aRot2.SetRotation(myPosition.AxeZ(), Step * myRotation.ValZ() * PI / 180);
|
||||
aRot3.SetRotation(myPosition.AxeY(), Step * myRotation.ValY() * PI / 180);
|
||||
}
|
||||
} else if(myRotation.Rot1() == 2) { //Axe Y
|
||||
aRot1.SetRotation(myPosition.AxeY(), Step * myRotation.ValY() * PI / 180);
|
||||
if(myRotation.Rot2() == 1) {
|
||||
aRot2.SetRotation(myPosition.AxeX(), Step * myRotation.ValX() * PI / 180);
|
||||
aRot3.SetRotation(myPosition.AxeZ(), Step * myRotation.ValZ() * PI / 180);
|
||||
} else {
|
||||
aRot2.SetRotation(myPosition.AxeZ(), Step * myRotation.ValZ() * PI / 180);
|
||||
aRot3.SetRotation(myPosition.AxeX(), Step * myRotation.ValX() * PI / 180);
|
||||
}
|
||||
} else if(myRotation.Rot1() == 3) { //Axe Z
|
||||
aRot1.SetRotation(myPosition.AxeZ(), Step * myRotation.ValZ() * PI / 180);
|
||||
if(myRotation.Rot2() == 1) {
|
||||
aRot2.SetRotation(myPosition.AxeX(), Step * myRotation.ValX() * PI / 180);
|
||||
aRot3.SetRotation(myPosition.AxeY(), Step * myRotation.ValY() * PI / 180);
|
||||
} else {
|
||||
aRot2.SetRotation(myPosition.AxeY(), Step * myRotation.ValY() * PI / 180);
|
||||
aRot3.SetRotation(myPosition.AxeX(), Step * myRotation.ValX() * PI / 180);
|
||||
}
|
||||
}
|
||||
|
||||
aRot = aRot1 * aRot2 * aRot3;
|
||||
aTransformation = aTransformation * aRot;
|
||||
|
||||
return aTransformation;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : GetLocation()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
TopLoc_Location Kinematic_Contact::GetLocation()
|
||||
{
|
||||
gp_Trsf aTrans;
|
||||
|
||||
aTrans.SetTransformation(myPosition.Axe3());
|
||||
TopLoc_Location aLoc(aTrans);
|
||||
|
||||
return aLoc;
|
||||
}
|
80
src/KINEMATIC/Kinematic_Contact.hxx
Normal file
@ -0,0 +1,80 @@
|
||||
// GEOM KINEMATIC
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : Kinematic_Contact.hxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef _KINEMATIC_CONTACT_HXX
|
||||
#define _KINEMATIC_CONTACT_HXX
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TDF_Label.hxx>
|
||||
#include <gp_Trsf.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
|
||||
#include "Kinematic_Position.hxx"
|
||||
#include "Kinematic_Rotation.hxx"
|
||||
#include "Kinematic_Translation.hxx"
|
||||
|
||||
class Kinematic_Contact
|
||||
{
|
||||
public:
|
||||
Kinematic_Contact();
|
||||
Kinematic_Contact(TopoDS_Shape Shape1, TopoDS_Shape Shape2,
|
||||
int type, double step);
|
||||
~Kinematic_Contact();
|
||||
|
||||
private:
|
||||
int myType;
|
||||
TopoDS_Shape myShape1;
|
||||
TopoDS_Shape myShape2;
|
||||
double myStep;
|
||||
Kinematic_Position myPosition;
|
||||
Kinematic_Rotation myRotation;
|
||||
Kinematic_Translation myTranslation;
|
||||
|
||||
public:
|
||||
gp_Trsf GetTransformation(double Step = 1);
|
||||
TopLoc_Location GetLocation();
|
||||
|
||||
void Type(int Type){myType = Type;};
|
||||
void Shape1(TopoDS_Shape Shape1){myShape1 = Shape1;};
|
||||
void Shape2(TopoDS_Shape Shape2){myShape2 = Shape2;};
|
||||
void Step(double Step){myStep = Step;};
|
||||
void Position(Kinematic_Position& Position){myPosition = Position;};
|
||||
void Rotation(Kinematic_Rotation& Rotation){myRotation = Rotation;};
|
||||
void Translation(Kinematic_Translation& Translation){myTranslation = Translation;};
|
||||
|
||||
int& Type(){return myType;};
|
||||
TopoDS_Shape& Shape1(){return myShape1;};
|
||||
TopoDS_Shape& Shape2(){return myShape2;};
|
||||
double& Step(){return myStep;};
|
||||
Kinematic_Position& Position(){return myPosition;};
|
||||
Kinematic_Rotation& Rotation(){return myRotation;};
|
||||
Kinematic_Translation& Translation(){return myTranslation;};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
107
src/KINEMATIC/Kinematic_Position.cxx
Normal file
@ -0,0 +1,107 @@
|
||||
// GEOM KINEMATIC
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : Kinematic_Position.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
using namespace std;
|
||||
#include "Kinematic_Position.hxx"
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// profile
|
||||
// command to build a profile
|
||||
//=======================================================================
|
||||
Kinematic_Position::Kinematic_Position(){}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// profile
|
||||
// command to build a profile
|
||||
//=======================================================================
|
||||
Kinematic_Position::Kinematic_Position(gp_Pnt Origin, gp_Dir DirX, gp_Dir DirY, gp_Dir DirZ)
|
||||
{
|
||||
myOrigin = Origin;
|
||||
myDirX = DirX;
|
||||
myDirY = DirY;
|
||||
myDirZ = DirZ;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ~Kinematic_Position()
|
||||
// purpose : Destroys the object and frees any allocated resources
|
||||
//=================================================================================
|
||||
Kinematic_Position::~Kinematic_Position() {}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : AxeX()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
gp_Ax1 Kinematic_Position::AxeX()
|
||||
{
|
||||
gp_Ax1 anAxe;
|
||||
anAxe.SetLocation(myOrigin);
|
||||
anAxe.SetDirection(myDirX);
|
||||
return anAxe;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : AxeY()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
gp_Ax1 Kinematic_Position::AxeY()
|
||||
{
|
||||
gp_Ax1 anAxe;
|
||||
anAxe.SetLocation(myOrigin);
|
||||
anAxe.SetDirection(myDirY);
|
||||
return anAxe;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : AxeZ()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
gp_Ax1 Kinematic_Position::AxeZ()
|
||||
{
|
||||
gp_Ax1 anAxe;
|
||||
anAxe.SetLocation(myOrigin);
|
||||
anAxe.SetDirection(myDirZ);
|
||||
return anAxe;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : Axe3()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
gp_Ax3 Kinematic_Position::Axe3()
|
||||
{
|
||||
gp_Ax3 anAxe3(myOrigin, myDirZ, myDirX);
|
||||
return anAxe3;
|
||||
}
|
70
src/KINEMATIC/Kinematic_Position.hxx
Normal file
@ -0,0 +1,70 @@
|
||||
// GEOM KINEMATIC
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : Kinematic_Position.hxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef _KINEMATIC_POSITION_HXX
|
||||
#define _KINEMATIC_POSITION_HXX
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <gp_Ax3.hxx>
|
||||
|
||||
class Kinematic_Position
|
||||
{
|
||||
public:
|
||||
Kinematic_Position();
|
||||
Kinematic_Position(gp_Pnt Origin, gp_Dir DirX, gp_Dir DirY, gp_Dir DirZ);
|
||||
~Kinematic_Position();
|
||||
|
||||
private:
|
||||
gp_Pnt myOrigin;
|
||||
gp_Dir myDirX;
|
||||
gp_Dir myDirY;
|
||||
gp_Dir myDirZ;
|
||||
|
||||
public:
|
||||
void Origin(const gp_Pnt& Origin){myOrigin = Origin;};
|
||||
void DirX(const gp_Dir& DirX){myDirX = DirX;};
|
||||
void DirY(const gp_Dir& DirY){myDirY = DirY;};
|
||||
void DirZ(const gp_Dir& DirZ){myDirZ = DirZ;};
|
||||
|
||||
gp_Pnt& Origin(){return myOrigin;};
|
||||
gp_Dir& DirX(){return myDirX;};
|
||||
gp_Dir& DirY(){return myDirY;};
|
||||
gp_Dir& DirZ(){return myDirZ;};
|
||||
|
||||
gp_Ax1 AxeX();
|
||||
gp_Ax1 AxeY();
|
||||
gp_Ax1 AxeZ();
|
||||
|
||||
gp_Ax3 Axe3();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
60
src/KINEMATIC/Kinematic_Rotation.cxx
Normal file
@ -0,0 +1,60 @@
|
||||
// GEOM KINEMATIC
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : Kinematic_Rotation.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
using namespace std;
|
||||
#include "Kinematic_Rotation.hxx"
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// profile
|
||||
// command to build a profile
|
||||
//=======================================================================
|
||||
Kinematic_Rotation::Kinematic_Rotation(){}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// profile
|
||||
// command to build a profile
|
||||
//=======================================================================
|
||||
Kinematic_Rotation::Kinematic_Rotation(int Rot1, int Rot2, int Rot3, double ValX, double ValY, double ValZ)
|
||||
{
|
||||
myRot1 = Rot1;
|
||||
myRot2 = Rot2;
|
||||
myRot3 = Rot3;
|
||||
|
||||
myValX = ValX;
|
||||
myValY = ValY;
|
||||
myValZ = ValZ;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ~Kinematic_Rotation()
|
||||
// purpose : Destroys the object and frees any allocated resources
|
||||
//=================================================================================
|
||||
Kinematic_Rotation::~Kinematic_Rotation() {}
|
65
src/KINEMATIC/Kinematic_Rotation.hxx
Normal file
@ -0,0 +1,65 @@
|
||||
// GEOM KINEMATIC
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : Kinematic_Rotation.hxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef _KINEMATIC_ROTATION_HXX
|
||||
#define _KINEMATIC_ROTATION_HXX
|
||||
|
||||
class Kinematic_Rotation
|
||||
{
|
||||
public:
|
||||
Kinematic_Rotation();
|
||||
Kinematic_Rotation(int Rot1, int Rot2, int Rot3, double ValX, double ValY, double ValZ);
|
||||
~Kinematic_Rotation();
|
||||
|
||||
private:
|
||||
int myRot1;
|
||||
int myRot2;
|
||||
int myRot3;
|
||||
|
||||
double myValX;
|
||||
double myValY;
|
||||
double myValZ;
|
||||
|
||||
public:
|
||||
void Rot1(int Rot1){myRot1 = Rot1;};
|
||||
void Rot2(int Rot2){myRot2 = Rot2;};
|
||||
void Rot3(int Rot3){myRot3 = Rot3;};
|
||||
void ValX(double ValX){myValX = ValX;};
|
||||
void ValY(double ValY){myValY = ValY;};
|
||||
void ValZ(double ValZ){myValZ = ValZ;};
|
||||
|
||||
int& Rot1(){return myRot1;};
|
||||
int& Rot2(){return myRot2;};
|
||||
int& Rot3(){return myRot3;};
|
||||
double& ValX(){return myValX;};
|
||||
double& ValY(){return myValY;};
|
||||
double& ValZ(){return myValZ;};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
56
src/KINEMATIC/Kinematic_Translation.cxx
Normal file
@ -0,0 +1,56 @@
|
||||
// GEOM KINEMATIC
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : Kinematic_Translation.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
using namespace std;
|
||||
#include "Kinematic_Translation.hxx"
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// profile
|
||||
// command to build a profile
|
||||
//=======================================================================
|
||||
Kinematic_Translation::Kinematic_Translation(){}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// profile
|
||||
// command to build a profile
|
||||
//=======================================================================
|
||||
Kinematic_Translation::Kinematic_Translation(double ValX, double ValY, double ValZ)
|
||||
{
|
||||
myValX = ValX;
|
||||
myValY = ValY;
|
||||
myValZ = ValZ;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ~Kinematic_Translation()
|
||||
// purpose : Destroys the object and frees any allocated resources
|
||||
//=================================================================================
|
||||
Kinematic_Translation::~Kinematic_Translation() {}
|
55
src/KINEMATIC/Kinematic_Translation.hxx
Normal file
@ -0,0 +1,55 @@
|
||||
// GEOM KINEMATIC
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : Kinematic_Translation.hxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef _KINEMATIC_TRANSLATION_HXX
|
||||
#define _KINEMATIC_TRANSLATION_HXX
|
||||
|
||||
class Kinematic_Translation
|
||||
{
|
||||
public:
|
||||
Kinematic_Translation();
|
||||
Kinematic_Translation(double ValX, double ValY, double ValZ);
|
||||
~Kinematic_Translation();
|
||||
|
||||
private:
|
||||
double myValX;
|
||||
double myValY;
|
||||
double myValZ;
|
||||
|
||||
public:
|
||||
void ValX(double ValX){myValX = ValX;};
|
||||
void ValY(double ValY){myValY = ValY;};
|
||||
void ValZ(double ValZ){myValZ = ValZ;};
|
||||
|
||||
double& ValX(){return myValX;};
|
||||
double& ValY(){return myValY;};
|
||||
double& ValZ(){return myValZ;};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
62
src/KINEMATIC/Makefile.in
Normal file
@ -0,0 +1,62 @@
|
||||
# GEOM GEOMBASE :
|
||||
#
|
||||
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
#
|
||||
#
|
||||
#
|
||||
# File : Makefile.in
|
||||
# Author : Damien COQUERET (OCC)
|
||||
# Module : GEOM
|
||||
# $Header:
|
||||
|
||||
top_srcdir=@top_srcdir@
|
||||
top_builddir=../..
|
||||
srcdir=@srcdir@
|
||||
VPATH=.:@srcdir@:@top_srcdir@/idl
|
||||
|
||||
|
||||
@COMMENCE@
|
||||
|
||||
# Libraries targets
|
||||
LIB = libGEOMKinematic.la
|
||||
LIB_SRC = Kinematic_Position.cxx \
|
||||
Kinematic_Rotation.cxx \
|
||||
Kinematic_Translation.cxx \
|
||||
Kinematic_Contact.cxx \
|
||||
Kinematic_Assembly.cxx \
|
||||
Kinematic_Animation.cxx
|
||||
|
||||
LIB_CLIENT_IDL =
|
||||
|
||||
# header files
|
||||
EXPORT_HEADERS = Kinematic_Position.hxx \
|
||||
Kinematic_Rotation.hxx \
|
||||
Kinematic_Translation.hxx \
|
||||
Kinematic_Contact.hxx \
|
||||
Kinematic_Assembly.hxx \
|
||||
Kinematic_Animation.hxx
|
||||
|
||||
# additionnal information to compil and link file
|
||||
CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
|
||||
LDFLAGS += -L${KERNEL_ROOT_DIR}/lib/salome
|
||||
|
||||
@CONCLUDE@
|
686
src/KinematicGUI/KinematicGUI.cxx
Normal file
@ -0,0 +1,686 @@
|
||||
// GEOM GEOMGUI : GUI for Geometry component
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : KinematicGUI.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
using namespace std;
|
||||
#include "KinematicGUI.h"
|
||||
|
||||
#include "QAD_RightFrame.h"
|
||||
#include "OCCViewer_Viewer3d.h"
|
||||
#include "SALOMEGUI_QtCatchCorbaException.hxx"
|
||||
#include "SALOMEGUI_ImportOperation.h"
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
#include "KinematicGUI_ContactDlg.h" // Method CONTACT
|
||||
#include "KinematicGUI_ContactHDlg.h" // Method CONTACT HELICOIDAL
|
||||
#include "KinematicGUI_PositionDlg.h" // Method POSITION
|
||||
#include "KinematicGUI_RotationDlg.h" // Method ROTATION
|
||||
#include "KinematicGUI_TranslationDlg.h" // Method TRANSLATION
|
||||
#include "KinematicGUI_AnimationDlg.h" // Method Create ANIMATION
|
||||
#include "KinematicGUI_AnimDlg.h" // Method Play ANIMATION
|
||||
|
||||
//=======================================================================
|
||||
// function : KinematicGUI()
|
||||
// purpose : Constructor
|
||||
//=======================================================================
|
||||
KinematicGUI::KinematicGUI() :
|
||||
QObject()
|
||||
{
|
||||
myGeomBase = new GEOMBase();
|
||||
myGeomGUI = GEOMContext::GetGeomGUI();
|
||||
myGeom = myGeomGUI->myComponentGeom;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : ~KinematicGUI()
|
||||
// purpose : Destructor
|
||||
//=======================================================================
|
||||
KinematicGUI::~KinematicGUI()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : OnGUIEvent()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
bool KinematicGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
||||
{
|
||||
KinematicGUI* myKinematicGUI = new KinematicGUI();
|
||||
myKinematicGUI->myGeomGUI->EmitSignalDeactivateDialog();
|
||||
SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection());
|
||||
|
||||
switch (theCommandID)
|
||||
{
|
||||
case 611: // ASSEMBLY
|
||||
{
|
||||
myKinematicGUI->AddNewAssembly();
|
||||
break;
|
||||
}
|
||||
case 61201: // EMBEDDING
|
||||
{
|
||||
KinematicGUI_ContactDlg *aDlg = new KinematicGUI_ContactDlg(parent, "", myKinematicGUI, Sel, 0);
|
||||
break;
|
||||
}
|
||||
case 61202: // PIVOT
|
||||
{
|
||||
KinematicGUI_ContactDlg *aDlg = new KinematicGUI_ContactDlg(parent, "", myKinematicGUI, Sel, 1);
|
||||
break;
|
||||
}
|
||||
case 61203: // SLIDE
|
||||
{
|
||||
KinematicGUI_ContactDlg *aDlg = new KinematicGUI_ContactDlg(parent, "", myKinematicGUI, Sel, 2);
|
||||
break;
|
||||
}
|
||||
case 61204: // SLIDING PIVOT
|
||||
{
|
||||
KinematicGUI_ContactDlg *aDlg = new KinematicGUI_ContactDlg(parent, "", myKinematicGUI, Sel, 3);
|
||||
break;
|
||||
}
|
||||
case 61205: // SPHERICAL
|
||||
{
|
||||
KinematicGUI_ContactDlg *aDlg = new KinematicGUI_ContactDlg(parent, "", myKinematicGUI, Sel, 4);
|
||||
break;
|
||||
}
|
||||
case 61206: // PLANE
|
||||
{
|
||||
KinematicGUI_ContactDlg *aDlg = new KinematicGUI_ContactDlg(parent, "", myKinematicGUI, Sel, 5);
|
||||
break;
|
||||
}
|
||||
case 61207: // ANNULAR
|
||||
{
|
||||
KinematicGUI_ContactDlg *aDlg = new KinematicGUI_ContactDlg(parent, "", myKinematicGUI, Sel, 6);
|
||||
break;
|
||||
}
|
||||
case 61208: // RECTILINEAR
|
||||
{
|
||||
KinematicGUI_ContactDlg *aDlg = new KinematicGUI_ContactDlg(parent, "", myKinematicGUI, Sel, 7);
|
||||
break;
|
||||
}
|
||||
case 61209: // PONCTUAL
|
||||
{
|
||||
KinematicGUI_ContactDlg *aDlg = new KinematicGUI_ContactDlg(parent, "", myKinematicGUI, Sel, 8);
|
||||
break;
|
||||
}
|
||||
case 61210: // HELICOIDAL
|
||||
{
|
||||
KinematicGUI_ContactHDlg *aDlg = new KinematicGUI_ContactHDlg(parent, "", myKinematicGUI, Sel);
|
||||
break;
|
||||
}
|
||||
case 6131: // ROTATION
|
||||
{
|
||||
KinematicGUI_PositionDlg *aDlg = new KinematicGUI_PositionDlg(parent, "", myKinematicGUI, Sel, true);
|
||||
break;
|
||||
}
|
||||
case 6132: // ROTATION
|
||||
{
|
||||
KinematicGUI_RotationDlg *aDlg = new KinematicGUI_RotationDlg(parent, "", myKinematicGUI, Sel, true);
|
||||
break;
|
||||
}
|
||||
case 6133: // TRANSLATION
|
||||
{
|
||||
KinematicGUI_TranslationDlg *aDlg = new KinematicGUI_TranslationDlg(parent, "", myKinematicGUI, Sel, true);
|
||||
break;
|
||||
}
|
||||
case 614: // ANIMATION
|
||||
{
|
||||
KinematicGUI_AnimationDlg *aDlg = new KinematicGUI_AnimationDlg(parent, "", myKinematicGUI, Sel);
|
||||
break;
|
||||
}
|
||||
case 6141: // RUN ANIMATION
|
||||
{
|
||||
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
|
||||
Handle(AIS_InteractiveContext) ic;
|
||||
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
|
||||
ic = v3d->getAISContext();
|
||||
KinematicGUI_AnimDlg *aDlg = new KinematicGUI_AnimDlg(parent, "", myKinematicGUI, Sel, ic, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : AddNewAssembly()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void KinematicGUI::AddNewAssembly()
|
||||
{
|
||||
try {
|
||||
GEOM::GEOM_Assembly_ptr result = myGeom->InitAssembly();
|
||||
if(result->_is_nil()) {
|
||||
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE"));
|
||||
return;
|
||||
}
|
||||
|
||||
if(this->AddAssemblyInStudy(result))
|
||||
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
|
||||
}
|
||||
catch(const SALOME::SALOME_Exception& S_ex) {
|
||||
QtCatchCorbaException(S_ex);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : AddContact()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void KinematicGUI::AddContact(GEOM::GEOM_Assembly_ptr Ass, GEOM::GEOM_Shape_ptr Shape1,
|
||||
GEOM::GEOM_Shape_ptr Shape2, int type, double step)
|
||||
{
|
||||
try {
|
||||
GEOM::GEOM_Contact_ptr result = myGeom->AddContact(Ass, Shape1, Shape2, type, step);
|
||||
if(result->_is_nil()) {
|
||||
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE"));
|
||||
return;
|
||||
}
|
||||
|
||||
if(this->AddContactInStudy(Ass, result))
|
||||
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
|
||||
}
|
||||
catch(const SALOME::SALOME_Exception& S_ex) {
|
||||
QtCatchCorbaException(S_ex);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : AddAnimation()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void KinematicGUI::AddAnimation(GEOM::GEOM_Assembly_ptr Ass, GEOM::GEOM_Shape_ptr Shape1,
|
||||
double Duration, int NbSeq)
|
||||
{
|
||||
try {
|
||||
GEOM::GEOM_Animation_ptr result = myGeom->AddAnimation(Ass, Shape1, Duration, NbSeq);
|
||||
if(result->_is_nil()) {
|
||||
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE"));
|
||||
return;
|
||||
}
|
||||
|
||||
if(this->AddAnimationInStudy(result))
|
||||
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
|
||||
}
|
||||
catch(const SALOME::SALOME_Exception& S_ex) {
|
||||
QtCatchCorbaException(S_ex);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=====================================================================================
|
||||
// function : AddAssemblyInStudy()
|
||||
// purpose :
|
||||
//=====================================================================================
|
||||
bool KinematicGUI::AddAssemblyInStudy(GEOM::GEOM_Assembly_ptr aAssembly)
|
||||
{
|
||||
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
|
||||
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
||||
SALOMEDS::GenericAttribute_var anAttr;
|
||||
SALOMEDS::AttributeName_var aName;
|
||||
SALOMEDS::AttributePixMap_var aPixmap;
|
||||
SALOMEDS::AttributeIOR_var anIOR;
|
||||
SALOMEDS::AttributeComment_var aType;
|
||||
|
||||
SALOMEDS::SComponent_var father = aStudy->FindComponent("GEOM");
|
||||
int aLocked = false;
|
||||
if(father->_is_nil()) {
|
||||
QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy());
|
||||
op->start();
|
||||
aLocked = aStudy->GetProperties()->IsLocked();
|
||||
if(aLocked)
|
||||
aStudy->GetProperties()->SetLocked(false);
|
||||
father = aStudyBuilder->NewComponent("GEOM");
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(father, "AttributeName");
|
||||
aName = SALOMEDS::AttributeName::_narrow(anAttr);
|
||||
aName->SetValue(QAD_Application::getDesktop()->getComponentUserName("GEOM"));
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(father, "AttributePixMap");
|
||||
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
|
||||
aPixmap->SetPixMap("ICON_OBJBROWSER_Geometry");
|
||||
if(aLocked)
|
||||
aStudy->GetProperties()->SetLocked(true);
|
||||
op->finish();
|
||||
}
|
||||
|
||||
aStudyBuilder->DefineComponentInstance(father, myGeom);
|
||||
father->ComponentIOR(myGeomGUI->GetFatherior());
|
||||
|
||||
SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry());
|
||||
|
||||
TCollection_AsciiString nameG("Assembly_");
|
||||
nameG += TCollection_AsciiString(myGeomGUI->GetNbGeom()++) + TCollection_AsciiString("\0");
|
||||
|
||||
// open transaction
|
||||
QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy());
|
||||
op->start();
|
||||
|
||||
SALOMEDS::SObject_var newObj = aStudyBuilder->NewObject(father);
|
||||
/* For the shape inserted into the study we set its field 'studyshapeid' */
|
||||
/* so the shape will contain its corresponding entry in the study Ocaf doc. */
|
||||
aAssembly->StudyShapeId(newObj->GetID());
|
||||
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeIOR");
|
||||
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
|
||||
anIOR->SetValue(aAssembly->Name());
|
||||
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeName");
|
||||
aName = SALOMEDS::AttributeName::_narrow(anAttr);
|
||||
aName->SetValue(nameG.ToCString());
|
||||
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeComment");
|
||||
aType = SALOMEDS::AttributeComment::_narrow(anAttr);
|
||||
aType->SetValue("Kinematic_Assembly");
|
||||
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributePixMap");
|
||||
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
|
||||
aPixmap->SetPixMap("ICON_OBJBROWSER_ASSEMBLY");
|
||||
|
||||
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF);
|
||||
aStudyBuilder->Addreference(newObj1, newObj);
|
||||
|
||||
op->finish();
|
||||
|
||||
QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//=====================================================================================
|
||||
// function : AddContactInStudy()
|
||||
// purpose :
|
||||
//=====================================================================================
|
||||
bool KinematicGUI::AddContactInStudy(GEOM::GEOM_Assembly_ptr Ass, GEOM::GEOM_Contact_ptr aContact)
|
||||
{
|
||||
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
|
||||
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
||||
SALOMEDS::GenericAttribute_var anAttr;
|
||||
SALOMEDS::AttributeName_var aName;
|
||||
SALOMEDS::AttributeName_var aTypeName;
|
||||
SALOMEDS::AttributePixMap_var aPixmap;
|
||||
SALOMEDS::AttributeIOR_var anIOR;
|
||||
SALOMEDS::AttributeComment_var aType;
|
||||
SALOMEDS::AttributeSelectable_var aSelAttr;
|
||||
|
||||
SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry());
|
||||
|
||||
TCollection_AsciiString nameG("Contact_");
|
||||
nameG += TCollection_AsciiString(myGeomGUI->GetNbGeom()++) + TCollection_AsciiString("\0");
|
||||
|
||||
// open transaction
|
||||
QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy());
|
||||
op->start();
|
||||
|
||||
Standard_CString AssIOR = aStudy->ConvertObjectToIOR(Ass);
|
||||
SALOMEDS::SObject_var theAss = aStudy->FindObjectIOR(AssIOR);
|
||||
SALOMEDS::SObject_var newObj = aStudyBuilder->NewObject(theAss);
|
||||
/* For the shape inserted into the study we set its field 'studyshapeid' */
|
||||
/* so the shape will contain its corresponding entry in the study Ocaf doc. */
|
||||
aContact->StudyShapeId(newObj->GetID());
|
||||
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeIOR");
|
||||
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
|
||||
anIOR->SetValue(aContact->Name());
|
||||
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeName");
|
||||
aName = SALOMEDS::AttributeName::_narrow(anAttr);
|
||||
aName->SetValue(nameG.ToCString());
|
||||
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeComment");
|
||||
aType = SALOMEDS::AttributeComment::_narrow(anAttr);
|
||||
aType->SetValue("Kinematic_Contact");
|
||||
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributePixMap");
|
||||
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
|
||||
aPixmap->SetPixMap("ICON_OBJBROWSER_CONTACT");
|
||||
|
||||
SALOMEDS::SObject_var RefType = aStudyBuilder->NewObject(newObj);
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(RefType, "AttributeName");
|
||||
aTypeName = SALOMEDS::AttributeName::_narrow(anAttr);
|
||||
aTypeName->SetValue(this->GetNameFromType(aContact->GetType()).ToCString());
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(RefType, "AttributeSelectable");
|
||||
aSelAttr = SALOMEDS::AttributeSelectable::_narrow(anAttr);
|
||||
aSelAttr->SetSelectable(false);
|
||||
|
||||
Standard_CString Shape1IOR = aStudy->ConvertObjectToIOR(aContact->GetShape1());
|
||||
SALOMEDS::SObject_var theSh1 = aStudy->FindObjectIOR(Shape1IOR);
|
||||
if(!theSh1->_is_nil()) {
|
||||
SALOMEDS::SObject_var RefObject1 = aStudyBuilder->NewObject(newObj);
|
||||
aStudyBuilder->Addreference(RefObject1, theSh1);
|
||||
}
|
||||
|
||||
Standard_CString Shape2IOR = aStudy->ConvertObjectToIOR(aContact->GetShape2());
|
||||
SALOMEDS::SObject_var theSh2 = aStudy->FindObjectIOR(Shape2IOR);
|
||||
if(!theSh2->_is_nil()) {
|
||||
SALOMEDS::SObject_var RefObject2 = aStudyBuilder->NewObject(newObj);
|
||||
aStudyBuilder->Addreference(RefObject2, theSh2);
|
||||
}
|
||||
|
||||
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF);
|
||||
aStudyBuilder->Addreference(newObj1, newObj);
|
||||
|
||||
op->finish();
|
||||
|
||||
QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//=====================================================================================
|
||||
// function : AddAnimationInStudy()
|
||||
// purpose :
|
||||
//=====================================================================================
|
||||
bool KinematicGUI::AddAnimationInStudy(GEOM::GEOM_Animation_ptr aAnimation)
|
||||
{
|
||||
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
|
||||
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
|
||||
SALOMEDS::GenericAttribute_var anAttr;
|
||||
SALOMEDS::AttributeName_var aName;
|
||||
SALOMEDS::AttributePixMap_var aPixmap;
|
||||
SALOMEDS::AttributeIOR_var anIOR;
|
||||
SALOMEDS::AttributeComment_var aType;
|
||||
|
||||
SALOMEDS::SComponent_var father = aStudy->FindComponent("GEOM");
|
||||
aStudyBuilder->DefineComponentInstance(father, myGeom);
|
||||
father->ComponentIOR(myGeomGUI->GetFatherior());
|
||||
|
||||
SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry());
|
||||
|
||||
TCollection_AsciiString nameG("Animation_");
|
||||
nameG += TCollection_AsciiString(myGeomGUI->GetNbGeom()++) + TCollection_AsciiString("\0");
|
||||
|
||||
// open transaction
|
||||
QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy());
|
||||
op->start();
|
||||
|
||||
SALOMEDS::SObject_var newObj = aStudyBuilder->NewObject(father);
|
||||
/* For the shape inserted into the study we set its field 'studyshapeid' */
|
||||
/* so the shape will contain its corresponding entry in the study Ocaf doc. */
|
||||
aAnimation->StudyShapeId(newObj->GetID());
|
||||
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeIOR");
|
||||
anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
|
||||
anIOR->SetValue(aAnimation->Name());
|
||||
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeName");
|
||||
aName = SALOMEDS::AttributeName::_narrow(anAttr);
|
||||
aName->SetValue(nameG.ToCString());
|
||||
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeComment");
|
||||
aType = SALOMEDS::AttributeComment::_narrow(anAttr);
|
||||
aType->SetValue("Kinematic_Animation");
|
||||
|
||||
anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributePixMap");
|
||||
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
|
||||
aPixmap->SetPixMap("ICON_OBJBROWSER_ANIMATION");
|
||||
|
||||
Standard_CString assIOR = aStudy->ConvertObjectToIOR(aAnimation->GetAssembly());
|
||||
SALOMEDS::SObject_var theAss = aStudy->FindObjectIOR(assIOR);
|
||||
if(!theAss->_is_nil()) {
|
||||
SALOMEDS::SObject_var RefObject = aStudyBuilder->NewObject(newObj);
|
||||
aStudyBuilder->Addreference(RefObject, theAss);
|
||||
}
|
||||
|
||||
Standard_CString Shape1IOR = aStudy->ConvertObjectToIOR(aAnimation->GetFrame());
|
||||
SALOMEDS::SObject_var theSh1 = aStudy->FindObjectIOR(Shape1IOR);
|
||||
if(!theSh1->_is_nil()) {
|
||||
SALOMEDS::SObject_var RefObject1 = aStudyBuilder->NewObject(newObj);
|
||||
aStudyBuilder->Addreference(RefObject1, theSh1);
|
||||
}
|
||||
|
||||
SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF);
|
||||
aStudyBuilder->Addreference(newObj1, newObj);
|
||||
|
||||
op->finish();
|
||||
|
||||
QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : SetPosition()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void KinematicGUI::SetPosition(GEOM::GEOM_Contact_ptr aContact, GEOM::PointStruct P0,
|
||||
GEOM::DirStruct VX, GEOM::DirStruct VY, GEOM::DirStruct VZ)
|
||||
{
|
||||
try {
|
||||
GEOM::GEOM_Position_var myGeomPosition = GEOM::GEOM_Position::_narrow(aContact->GetPosition());
|
||||
myGeomPosition->SetOrigin(P0);
|
||||
myGeomPosition->SetVX(VX);
|
||||
myGeomPosition->SetVY(VY);
|
||||
myGeomPosition->SetVZ(VZ);
|
||||
|
||||
myGeom->SetPosition(aContact);
|
||||
}
|
||||
catch(const SALOME::SALOME_Exception& S_ex) {
|
||||
QtCatchCorbaException(S_ex);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : SetRotation()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void KinematicGUI::SetRotation(GEOM::GEOM_Contact_ptr aContact,
|
||||
int Rot1, int Rot2, int Rot3,
|
||||
double Val1, double Val2, double Val3)
|
||||
{
|
||||
try {
|
||||
GEOM::GEOM_Rotation_var myGeomRotation = GEOM::GEOM_Rotation::_narrow(aContact->GetRotation());
|
||||
myGeomRotation->SetRotation(Rot1, Rot2, Rot3, Val1, Val2, Val3);
|
||||
int type = aContact->GetType();
|
||||
if(type == 9) { //HELICOIDAL
|
||||
GEOM::GEOM_Translation_var myGeomTranslation = GEOM::GEOM_Translation::_narrow(aContact->GetTranslation());
|
||||
double aValY = myGeomTranslation->GetValY();
|
||||
double aValZ = myGeomTranslation->GetValZ();
|
||||
double aStep = aContact->GetStep();
|
||||
double aValX = aStep * Val1 / 360;
|
||||
myGeomTranslation->SetTranslation(aValX, aValY, aValZ);
|
||||
}
|
||||
myGeom->SetRotation(aContact);
|
||||
}
|
||||
catch(const SALOME::SALOME_Exception& S_ex) {
|
||||
QtCatchCorbaException(S_ex);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : SetTranslation()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void KinematicGUI::SetTranslation(GEOM::GEOM_Contact_ptr aContact,
|
||||
double ValX, double ValY, double ValZ)
|
||||
{
|
||||
try {
|
||||
GEOM::GEOM_Translation_var myGeomTranslation = GEOM::GEOM_Translation::_narrow(aContact->GetTranslation());
|
||||
myGeomTranslation->SetTranslation(ValX, ValY, ValZ);
|
||||
int type = aContact->GetType();
|
||||
if(type == 9) { //HELICOIDAL
|
||||
GEOM::GEOM_Rotation_var myGeomRotation = GEOM::GEOM_Rotation::_narrow(aContact->GetRotation());
|
||||
int aRot1 = myGeomRotation->GetRot1();
|
||||
int aRot2 = myGeomRotation->GetRot2();
|
||||
int aRot3 = myGeomRotation->GetRot3();
|
||||
double aVal2 = myGeomRotation->GetVal2();
|
||||
double aVal3 = myGeomRotation->GetVal3();
|
||||
double aStep = aContact->GetStep();
|
||||
double aVal1 = 360 * ValX / aStep;
|
||||
myGeomRotation->SetRotation(aRot1, aRot2, aRot3, aVal1, aVal2, aVal3);
|
||||
}
|
||||
myGeom->SetTranslation(aContact);
|
||||
}
|
||||
catch(const SALOME::SALOME_Exception& S_ex) {
|
||||
QtCatchCorbaException(S_ex);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=====================================================================================
|
||||
// function : AddContactInStudy()
|
||||
// purpose :
|
||||
//=====================================================================================
|
||||
TCollection_AsciiString KinematicGUI::GetNameFromType(int type)
|
||||
{
|
||||
TCollection_AsciiString name("");
|
||||
switch (type)
|
||||
{
|
||||
case 0:
|
||||
{ name = "Embedding"; break; }
|
||||
case 1:
|
||||
{ name = "Pivot"; break; }
|
||||
case 2:
|
||||
{ name = "Slide"; break; }
|
||||
case 3:
|
||||
{ name = "Sliding Pivot"; break; }
|
||||
case 4:
|
||||
{ name = "Spherical"; break; }
|
||||
case 5:
|
||||
{ name = "Plane"; break; }
|
||||
case 6:
|
||||
{ name = "Annular"; break; }
|
||||
case 7:
|
||||
{ name = "Rectilinear"; break; }
|
||||
case 8:
|
||||
{ name = "Ponctual"; break; }
|
||||
case 9:
|
||||
{ name = "Helicoidal"; break; }
|
||||
default:
|
||||
{ name = "Contact"; break; }
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : CreateContact()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
Kinematic_Contact* KinematicGUI::CreateContact(GEOM::GEOM_Contact_ptr aContact)
|
||||
{
|
||||
GEOM::GEOM_Shape_var myShape1 = aContact->GetShape1();
|
||||
GEOM::GEOM_Shape_var myShape2 = aContact->GetShape2();
|
||||
GEOM::GEOM_Position_var myPosition = aContact->GetPosition();
|
||||
GEOM::GEOM_Rotation_var myRotation = aContact->GetRotation();
|
||||
GEOM::GEOM_Translation_var myTranslation = aContact->GetTranslation();
|
||||
int Type = aContact->GetType();
|
||||
double Step = aContact->GetStep();
|
||||
|
||||
|
||||
TopoDS_Shape aShape1 = myGeomGUI->GetShapeReader().GetShape(myGeom, myShape1);
|
||||
TopoDS_Shape aShape2 = myGeomGUI->GetShapeReader().GetShape(myGeom, myShape2);
|
||||
Kinematic_Contact* KContact = new Kinematic_Contact(aShape1, aShape2, Type, Step);
|
||||
|
||||
gp_Pnt Origin(myPosition->GetOrigin().x, myPosition->GetOrigin().y, myPosition->GetOrigin().z);
|
||||
gp_Dir aDirX(myPosition->GetVX().PS.x, myPosition->GetVX().PS.y, myPosition->GetVX().PS.z);
|
||||
gp_Dir aDirY(myPosition->GetVY().PS.x, myPosition->GetVY().PS.y, myPosition->GetVY().PS.z);
|
||||
gp_Dir aDirZ(myPosition->GetVZ().PS.x, myPosition->GetVZ().PS.y, myPosition->GetVZ().PS.z);
|
||||
|
||||
KContact->Position().Origin(Origin);
|
||||
KContact->Position().DirX(aDirX);
|
||||
KContact->Position().DirY(aDirY);
|
||||
KContact->Position().DirZ(aDirZ);
|
||||
|
||||
KContact->Rotation().Rot1(myRotation->GetRot1());
|
||||
KContact->Rotation().Rot2(myRotation->GetRot2());
|
||||
KContact->Rotation().Rot3(myRotation->GetRot3());
|
||||
|
||||
KContact->Rotation().ValX(myRotation->GetVal1());
|
||||
KContact->Rotation().ValY(myRotation->GetVal2());
|
||||
KContact->Rotation().ValZ(myRotation->GetVal3());
|
||||
|
||||
KContact->Translation().ValX(myTranslation->GetValX());
|
||||
KContact->Translation().ValY(myTranslation->GetValY());
|
||||
KContact->Translation().ValZ(myTranslation->GetValZ());
|
||||
|
||||
return KContact;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : CreateAssembly()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
Kinematic_Assembly* KinematicGUI::CreateAssembly(GEOM::GEOM_Assembly_ptr aAssembly)
|
||||
{
|
||||
int NbContact = aAssembly->NbContacts();
|
||||
GEOM::ListOfContact_var aContactList = aAssembly->GetContactList();
|
||||
Kinematic_Assembly* KAssembly = new Kinematic_Assembly();
|
||||
|
||||
for(int i = 0; i < NbContact; i++) {
|
||||
GEOM::GEOM_Contact_var myContact = aContactList[i];
|
||||
Kinematic_Contact* KContact = CreateContact(myContact);
|
||||
KAssembly->AddContact(KContact);
|
||||
}
|
||||
return KAssembly;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// function : ()
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
Kinematic_Animation* KinematicGUI::CreateAnimation(GEOM::GEOM_Animation_ptr aAnimation)
|
||||
{
|
||||
GEOM::GEOM_Shape_var aFrame = aAnimation->GetFrame();
|
||||
double Duration = aAnimation->GetDuration();
|
||||
int NbSeq = aAnimation->GetNbSeq();
|
||||
|
||||
GEOM::GEOM_Assembly_var myAssembly = aAnimation->GetAssembly();
|
||||
Kinematic_Assembly* KAssembly = CreateAssembly(myAssembly);
|
||||
TopoDS_Shape myFrame = myGeomGUI->GetShapeReader().GetShape(myGeom, aFrame);
|
||||
|
||||
Kinematic_Animation* KAnimation = new Kinematic_Animation(KAssembly, myFrame, Duration, NbSeq);
|
||||
return KAnimation;
|
||||
}
|
||||
|
||||
|
||||
//=====================================================================================
|
||||
// EXPORTED METHODS
|
||||
//=====================================================================================
|
||||
extern "C"
|
||||
{
|
||||
bool OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
||||
{return KinematicGUI::OnGUIEvent(theCommandID, parent);}
|
||||
}
|
87
src/KinematicGUI/KinematicGUI.h
Normal file
@ -0,0 +1,87 @@
|
||||
// GEOM GEOMGUI : GUI for Geometry component
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : KinematicGUI.h
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef KINEMATICGUI_H
|
||||
#define KINEMATICGUI_H
|
||||
|
||||
#include "GEOMBase.h"
|
||||
|
||||
// IDL headers
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(GEOM_Gen)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Shape)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Kinematic)
|
||||
|
||||
#include "Kinematic_Animation.hxx"
|
||||
#include "Kinematic_Contact.hxx"
|
||||
|
||||
//=================================================================================
|
||||
// class : KinematicGUI
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
class KinematicGUI : public QObject
|
||||
{
|
||||
Q_OBJECT /* for QT compatibility */
|
||||
|
||||
public :
|
||||
KinematicGUI();
|
||||
~KinematicGUI();
|
||||
|
||||
static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent);
|
||||
|
||||
void AddNewAssembly();
|
||||
void AddContact(GEOM::GEOM_Assembly_ptr Ass, GEOM::GEOM_Shape_ptr Shape1,
|
||||
GEOM::GEOM_Shape_ptr Shape2, int type, double step = 0);
|
||||
void AddAnimation(GEOM::GEOM_Assembly_ptr Ass, GEOM::GEOM_Shape_ptr Shape1,
|
||||
double Duration, int NbSeq);
|
||||
|
||||
bool AddContactInStudy(GEOM::GEOM_Assembly_ptr Ass,
|
||||
GEOM::GEOM_Contact_ptr aContact);
|
||||
bool AddAssemblyInStudy(GEOM::GEOM_Assembly_ptr aAssembly);
|
||||
bool AddAnimationInStudy(GEOM::GEOM_Animation_ptr aAnimation);
|
||||
TCollection_AsciiString GetNameFromType(int type);
|
||||
|
||||
void SetPosition(GEOM::GEOM_Contact_ptr aContact, GEOM::PointStruct P0,
|
||||
GEOM::DirStruct VX, GEOM::DirStruct VY, GEOM::DirStruct VZ);
|
||||
void SetRotation(GEOM::GEOM_Contact_ptr aContact,
|
||||
int Rot1, int Rot2, int Rot3,
|
||||
double Val1, double Val2, double Val3);
|
||||
void SetTranslation(GEOM::GEOM_Contact_ptr aContact,
|
||||
double ValX, double ValY, double ValZ);
|
||||
|
||||
Kinematic_Contact* CreateContact(GEOM::GEOM_Contact_ptr aContact);
|
||||
Kinematic_Assembly* CreateAssembly(GEOM::GEOM_Assembly_ptr aAssembly);
|
||||
Kinematic_Animation* CreateAnimation(GEOM::GEOM_Animation_ptr aAnimation);
|
||||
|
||||
GEOMBase* myGeomBase;
|
||||
GEOMContext* myGeomGUI;
|
||||
GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */
|
||||
|
||||
};
|
||||
|
||||
#endif
|
87
src/KinematicGUI/KinematicGUI_12Spin.cxx
Normal file
@ -0,0 +1,87 @@
|
||||
// GEOM GEOMGUI : GUI for Geometry component
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : KinematicGUI_12Spin.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#include "KinematicGUI_12Spin.h"
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qgroupbox.h>
|
||||
|
||||
/*
|
||||
* Constructs a KinematicGUI_12Spin which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'
|
||||
*/
|
||||
KinematicGUI_12Spin::KinematicGUI_12Spin(QWidget* parent, const char* name, WFlags fl)
|
||||
:KinematicGUI_12Spin_QTD(parent, name, fl)
|
||||
{
|
||||
SpinBox1->close(TRUE);
|
||||
SpinBox2->close(TRUE);
|
||||
SpinBox3->close(TRUE);
|
||||
SpinBox4->close(TRUE);
|
||||
SpinBox5->close(TRUE);
|
||||
SpinBox6->close(TRUE);
|
||||
SpinBox7->close(TRUE);
|
||||
SpinBox8->close(TRUE);
|
||||
SpinBox9->close(TRUE);
|
||||
SpinBox10->close(TRUE);
|
||||
SpinBox11->close(TRUE);
|
||||
SpinBox12->close(TRUE);
|
||||
SpinBox_11 = new DlgRef_SpinBox(GroupBox1, "SpinBox_11");
|
||||
SpinBox_12 = new DlgRef_SpinBox(GroupBox1, "SpinBox_12");
|
||||
SpinBox_13 = new DlgRef_SpinBox(GroupBox1, "SpinBox_13");
|
||||
SpinBox_21 = new DlgRef_SpinBox(GroupBox1, "SpinBox_21");
|
||||
SpinBox_22 = new DlgRef_SpinBox(GroupBox1, "SpinBox_22");
|
||||
SpinBox_23 = new DlgRef_SpinBox(GroupBox1, "SpinBox_23");
|
||||
SpinBox_31 = new DlgRef_SpinBox(GroupBox1, "SpinBox_31");
|
||||
SpinBox_32 = new DlgRef_SpinBox(GroupBox1, "SpinBox_32");
|
||||
SpinBox_33 = new DlgRef_SpinBox(GroupBox1, "SpinBox_33");
|
||||
SpinBox_41 = new DlgRef_SpinBox(GroupBox1, "SpinBox_41");
|
||||
SpinBox_42 = new DlgRef_SpinBox(GroupBox1, "SpinBox_42");
|
||||
SpinBox_43 = new DlgRef_SpinBox(GroupBox1, "SpinBox_43");
|
||||
Layout1->addWidget(SpinBox_11, 0, 2);
|
||||
Layout1->addWidget(SpinBox_12, 0, 4);
|
||||
Layout1->addWidget(SpinBox_13, 0, 6);
|
||||
Layout1->addWidget(SpinBox_21, 1, 2);
|
||||
Layout1->addWidget(SpinBox_22, 1, 4);
|
||||
Layout1->addWidget(SpinBox_23, 1, 6);
|
||||
Layout1->addWidget(SpinBox_31, 2, 2);
|
||||
Layout1->addWidget(SpinBox_32, 2, 4);
|
||||
Layout1->addWidget(SpinBox_33, 2, 6);
|
||||
Layout1->addWidget(SpinBox_41, 3, 2);
|
||||
Layout1->addWidget(SpinBox_42, 3, 4);
|
||||
Layout1->addWidget(SpinBox_43, 3, 6);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
KinematicGUI_12Spin::~KinematicGUI_12Spin()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
58
src/KinematicGUI/KinematicGUI_12Spin.h
Normal file
@ -0,0 +1,58 @@
|
||||
// GEOM GEOMGUI : GUI for Geometry component
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : KinematicGUI_12Spin.h
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef KINEMATICGUI_12SPIN_H
|
||||
#define KINEMATICGUI_12SPIN_H
|
||||
|
||||
#include "KinematicGUI_12Spin_QTD.h"
|
||||
#include "DlgRef_SpinBox.h"
|
||||
|
||||
class KinematicGUI_12Spin : public KinematicGUI_12Spin_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KinematicGUI_12Spin( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~KinematicGUI_12Spin();
|
||||
|
||||
DlgRef_SpinBox* SpinBox_11;
|
||||
DlgRef_SpinBox* SpinBox_12;
|
||||
DlgRef_SpinBox* SpinBox_13;
|
||||
DlgRef_SpinBox* SpinBox_21;
|
||||
DlgRef_SpinBox* SpinBox_22;
|
||||
DlgRef_SpinBox* SpinBox_23;
|
||||
DlgRef_SpinBox* SpinBox_31;
|
||||
DlgRef_SpinBox* SpinBox_32;
|
||||
DlgRef_SpinBox* SpinBox_33;
|
||||
DlgRef_SpinBox* SpinBox_41;
|
||||
DlgRef_SpinBox* SpinBox_42;
|
||||
DlgRef_SpinBox* SpinBox_43;
|
||||
|
||||
};
|
||||
|
||||
#endif // KINEMATICGUI_12SPIN_H
|
213
src/KinematicGUI/KinematicGUI_12Spin_QTD.cxx
Normal file
@ -0,0 +1,213 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'KinematicGUI_12Spin_QTD.ui'
|
||||
**
|
||||
** Created: ven fév 6 12:39:44 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "KinematicGUI_12Spin_QTD.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a KinematicGUI_12Spin_QTD which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
KinematicGUI_12Spin_QTD::KinematicGUI_12Spin_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||
: QWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "KinematicGUI_12Spin_QTD" );
|
||||
resize( 396, 139 );
|
||||
setCaption( trUtf8( "KinematicGUI_12Spin_QTD" ) );
|
||||
KinematicGUI_12Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "KinematicGUI_12Spin_QTDLayout");
|
||||
|
||||
GroupBox1 = new QGroupBox( this, "GroupBox1" );
|
||||
GroupBox1->setTitle( trUtf8( "" ) );
|
||||
GroupBox1->setColumnLayout(0, Qt::Vertical );
|
||||
GroupBox1->layout()->setSpacing( 6 );
|
||||
GroupBox1->layout()->setMargin( 11 );
|
||||
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
|
||||
GroupBox1Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
|
||||
|
||||
TextLabel15 = new QLabel( GroupBox1, "TextLabel15" );
|
||||
TextLabel15->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel15->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel15->setText( trUtf8( "TL15" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel15, 3, 3 );
|
||||
QSpacerItem* spacer = new QSpacerItem( 0, 80, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout1->addItem( spacer, 4, 4 );
|
||||
|
||||
TextLabel14 = new QLabel( GroupBox1, "TextLabel14" );
|
||||
TextLabel14->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel14->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel14->setText( trUtf8( "TL14" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel14, 3, 1 );
|
||||
|
||||
SpinBox5 = new QSpinBox( GroupBox1, "SpinBox5" );
|
||||
SpinBox5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox5->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox5, 1, 4 );
|
||||
|
||||
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
|
||||
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel3->setText( trUtf8( "TL3" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel3, 0, 3 );
|
||||
|
||||
TextLabel11 = new QLabel( GroupBox1, "TextLabel11" );
|
||||
TextLabel11->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel11->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel11->setText( trUtf8( "TL11" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel11, 2, 3 );
|
||||
|
||||
TextLabel8 = new QLabel( GroupBox1, "TextLabel8" );
|
||||
TextLabel8->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel8->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel8->setText( trUtf8( "TL8" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel8, 1, 5 );
|
||||
|
||||
TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
|
||||
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel4->setText( trUtf8( "TL4" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel4, 0, 5 );
|
||||
|
||||
TextLabel7 = new QLabel( GroupBox1, "TextLabel7" );
|
||||
TextLabel7->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel7->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel7->setText( trUtf8( "TL7" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel7, 1, 3 );
|
||||
|
||||
TextLabel12 = new QLabel( GroupBox1, "TextLabel12" );
|
||||
TextLabel12->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel12->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel12->setText( trUtf8( "TL12" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel12, 2, 5 );
|
||||
|
||||
TextLabel13 = new QLabel( GroupBox1, "TextLabel13" );
|
||||
TextLabel13->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel13->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel13->setText( trUtf8( "TL13" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel13, 3, 0 );
|
||||
|
||||
SpinBox12 = new QSpinBox( GroupBox1, "SpinBox12" );
|
||||
SpinBox12->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox12->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox12, 3, 6 );
|
||||
|
||||
SpinBox11 = new QSpinBox( GroupBox1, "SpinBox11" );
|
||||
SpinBox11->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox11->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox11, 3, 4 );
|
||||
|
||||
SpinBox9 = new QSpinBox( GroupBox1, "SpinBox9" );
|
||||
SpinBox9->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox9->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox9, 2, 6 );
|
||||
|
||||
SpinBox8 = new QSpinBox( GroupBox1, "SpinBox8" );
|
||||
SpinBox8->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox8->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox8, 2, 4 );
|
||||
|
||||
SpinBox7 = new QSpinBox( GroupBox1, "SpinBox7" );
|
||||
SpinBox7->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox7->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox7, 2, 2 );
|
||||
|
||||
SpinBox6 = new QSpinBox( GroupBox1, "SpinBox6" );
|
||||
SpinBox6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox6->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox6, 1, 6 );
|
||||
|
||||
SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" );
|
||||
SpinBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox3->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox3, 0, 6 );
|
||||
|
||||
TextLabel16 = new QLabel( GroupBox1, "TextLabel16" );
|
||||
TextLabel16->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel16->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel16->setText( trUtf8( "TL16" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel16, 3, 5 );
|
||||
|
||||
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
|
||||
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel1->setText( trUtf8( "TL1" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel1, 0, 0 );
|
||||
|
||||
TextLabel10 = new QLabel( GroupBox1, "TextLabel10" );
|
||||
TextLabel10->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel10->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel10->setText( trUtf8( "TL10" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel10, 2, 1 );
|
||||
|
||||
SpinBox4 = new QSpinBox( GroupBox1, "SpinBox4" );
|
||||
SpinBox4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox4->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox4, 1, 2 );
|
||||
|
||||
TextLabel6 = new QLabel( GroupBox1, "TextLabel6" );
|
||||
TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel6->setText( trUtf8( "TL6" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel6, 1, 1 );
|
||||
|
||||
SpinBox10 = new QSpinBox( GroupBox1, "SpinBox10" );
|
||||
SpinBox10->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox10->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox10, 3, 2 );
|
||||
|
||||
SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
|
||||
SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox2, 0, 4 );
|
||||
|
||||
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
|
||||
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel2->setText( trUtf8( "TL2" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel2, 0, 1 );
|
||||
|
||||
TextLabel9 = new QLabel( GroupBox1, "TextLabel9" );
|
||||
TextLabel9->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel9->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel9->setText( trUtf8( "TL9" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel9, 2, 0 );
|
||||
|
||||
TextLabel5 = new QLabel( GroupBox1, "TextLabel5" );
|
||||
TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel5->setText( trUtf8( "TL5" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel5, 1, 0 );
|
||||
|
||||
SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
|
||||
SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox1, 0, 2 );
|
||||
|
||||
GroupBox1Layout->addLayout( Layout1, 0, 0 );
|
||||
|
||||
KinematicGUI_12Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
KinematicGUI_12Spin_QTD::~KinematicGUI_12Spin_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
66
src/KinematicGUI/KinematicGUI_12Spin_QTD.h
Normal file
@ -0,0 +1,66 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'KinematicGUI_12Spin_QTD.ui'
|
||||
**
|
||||
** Created: ven fév 6 12:39:44 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef KINEMATICGUI_12SPIN_QTD_H
|
||||
#define KINEMATICGUI_12SPIN_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QGroupBox;
|
||||
class QLabel;
|
||||
class QSpinBox;
|
||||
|
||||
class KinematicGUI_12Spin_QTD : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KinematicGUI_12Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~KinematicGUI_12Spin_QTD();
|
||||
|
||||
QGroupBox* GroupBox1;
|
||||
QLabel* TextLabel15;
|
||||
QLabel* TextLabel14;
|
||||
QSpinBox* SpinBox5;
|
||||
QLabel* TextLabel3;
|
||||
QLabel* TextLabel11;
|
||||
QLabel* TextLabel8;
|
||||
QLabel* TextLabel4;
|
||||
QLabel* TextLabel7;
|
||||
QLabel* TextLabel12;
|
||||
QLabel* TextLabel13;
|
||||
QSpinBox* SpinBox12;
|
||||
QSpinBox* SpinBox11;
|
||||
QSpinBox* SpinBox9;
|
||||
QSpinBox* SpinBox8;
|
||||
QSpinBox* SpinBox7;
|
||||
QSpinBox* SpinBox6;
|
||||
QSpinBox* SpinBox3;
|
||||
QLabel* TextLabel16;
|
||||
QLabel* TextLabel1;
|
||||
QLabel* TextLabel10;
|
||||
QSpinBox* SpinBox4;
|
||||
QLabel* TextLabel6;
|
||||
QSpinBox* SpinBox10;
|
||||
QSpinBox* SpinBox2;
|
||||
QLabel* TextLabel2;
|
||||
QLabel* TextLabel9;
|
||||
QLabel* TextLabel5;
|
||||
QSpinBox* SpinBox1;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* KinematicGUI_12Spin_QTDLayout;
|
||||
QGridLayout* GroupBox1Layout;
|
||||
QGridLayout* Layout1;
|
||||
};
|
||||
|
||||
#endif // KINEMATICGUI_12SPIN_QTD_H
|
60
src/KinematicGUI/KinematicGUI_3List3Spin.cxx
Normal file
@ -0,0 +1,60 @@
|
||||
// GEOM GEOMGUI : GUI for Geometry component
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : KinematicGUI_3List3Spin.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#include "KinematicGUI_3List3Spin.h"
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qgroupbox.h>
|
||||
|
||||
/*
|
||||
* Constructs a KinematicGUI_3List3Spin which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'
|
||||
*/
|
||||
KinematicGUI_3List3Spin::KinematicGUI_3List3Spin(QWidget* parent, const char* name, WFlags fl)
|
||||
:KinematicGUI_3List3Spin_QTD(parent, name, fl)
|
||||
{
|
||||
SpinBox1->close(TRUE);
|
||||
SpinBox2->close(TRUE);
|
||||
SpinBox3->close(TRUE);
|
||||
SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
|
||||
SpinBox_DY = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY");
|
||||
SpinBox_DZ = new DlgRef_SpinBox(GroupBox1, "SpinBox_DZ");
|
||||
Layout1->addWidget(SpinBox_DX, 0, 3);
|
||||
Layout1->addWidget(SpinBox_DY, 1, 3);
|
||||
Layout1->addWidget(SpinBox_DZ, 2, 3);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
KinematicGUI_3List3Spin::~KinematicGUI_3List3Spin()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
49
src/KinematicGUI/KinematicGUI_3List3Spin.h
Normal file
@ -0,0 +1,49 @@
|
||||
// GEOM GEOMGUI : GUI for Geometry component
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : KinematicGUI_3List3Spin.h
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef KINEMATICGUI_3LIST3SPIN_H
|
||||
#define KINEMATICGUI_3LIST3SPIN_H
|
||||
|
||||
#include "KinematicGUI_3List3Spin_QTD.h"
|
||||
#include "DlgRef_SpinBox.h"
|
||||
|
||||
class KinematicGUI_3List3Spin : public KinematicGUI_3List3Spin_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KinematicGUI_3List3Spin( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~KinematicGUI_3List3Spin();
|
||||
|
||||
DlgRef_SpinBox* SpinBox_DX;
|
||||
DlgRef_SpinBox* SpinBox_DY;
|
||||
DlgRef_SpinBox* SpinBox_DZ;
|
||||
|
||||
};
|
||||
|
||||
#endif // KINEMATICGUI_3LIST3SPIN_H
|
125
src/KinematicGUI/KinematicGUI_3List3Spin_QTD.cxx
Normal file
@ -0,0 +1,125 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'KinematicGUI_3List3Spin_QTD.ui'
|
||||
**
|
||||
** Created: mer fév 4 16:57:37 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "KinematicGUI_3List3Spin_QTD.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qcombobox.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a KinematicGUI_3List3Spin_QTD which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
KinematicGUI_3List3Spin_QTD::KinematicGUI_3List3Spin_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||
: QWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "KinematicGUI_3List3Spin_QTD" );
|
||||
resize( 279, 111 );
|
||||
setMinimumSize( QSize( 100, 0 ) );
|
||||
setCaption( trUtf8( "KinematicGUI_3List3Spin_QTD" ) );
|
||||
KinematicGUI_3List3Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "KinematicGUI_3List3Spin_QTDLayout");
|
||||
|
||||
GroupBox1 = new QGroupBox( this, "GroupBox1" );
|
||||
GroupBox1->setTitle( trUtf8( "" ) );
|
||||
GroupBox1->setColumnLayout(0, Qt::Vertical );
|
||||
GroupBox1->layout()->setSpacing( 6 );
|
||||
GroupBox1->layout()->setMargin( 11 );
|
||||
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
|
||||
GroupBox1Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
|
||||
|
||||
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
|
||||
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel2->setText( trUtf8( "TL2" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel2, 0, 2 );
|
||||
QSpacerItem* spacer = new QSpacerItem( 0, 100, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout1->addItem( spacer, 3, 3 );
|
||||
|
||||
SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
|
||||
SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox1, 0, 3 );
|
||||
|
||||
TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
|
||||
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel4->setText( trUtf8( "TL4" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel4, 1, 2 );
|
||||
|
||||
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
|
||||
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel3->setText( trUtf8( "TL3" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel3, 1, 0 );
|
||||
|
||||
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
|
||||
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel1->setText( trUtf8( "TL1" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel1, 0, 0 );
|
||||
|
||||
ComboBox3 = new QComboBox( FALSE, GroupBox1, "ComboBox3" );
|
||||
ComboBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBox3->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( ComboBox3, 2, 1 );
|
||||
|
||||
SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
|
||||
SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox2, 1, 3 );
|
||||
|
||||
SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" );
|
||||
SpinBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox3->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( SpinBox3, 2, 3 );
|
||||
|
||||
TextLabel6 = new QLabel( GroupBox1, "TextLabel6" );
|
||||
TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel6->setText( trUtf8( "TL6" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel6, 2, 2 );
|
||||
|
||||
ComboBox1 = new QComboBox( FALSE, GroupBox1, "ComboBox1" );
|
||||
ComboBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBox1->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( ComboBox1, 0, 1 );
|
||||
|
||||
ComboBox2 = new QComboBox( FALSE, GroupBox1, "ComboBox2" );
|
||||
ComboBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBox2->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( ComboBox2, 1, 1 );
|
||||
|
||||
TextLabel5 = new QLabel( GroupBox1, "TextLabel5" );
|
||||
TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel5->setText( trUtf8( "TL5" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel5, 2, 0 );
|
||||
|
||||
GroupBox1Layout->addLayout( Layout1, 0, 0 );
|
||||
|
||||
KinematicGUI_3List3Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
KinematicGUI_3List3Spin_QTD::~KinematicGUI_3List3Spin_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
51
src/KinematicGUI/KinematicGUI_3List3Spin_QTD.h
Normal file
@ -0,0 +1,51 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'KinematicGUI_3List3Spin_QTD.ui'
|
||||
**
|
||||
** Created: mer fév 4 16:57:37 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef KINEMATICGUI_3LIST3SPIN_QTD_H
|
||||
#define KINEMATICGUI_3LIST3SPIN_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QComboBox;
|
||||
class QGroupBox;
|
||||
class QLabel;
|
||||
class QSpinBox;
|
||||
|
||||
class KinematicGUI_3List3Spin_QTD : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KinematicGUI_3List3Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~KinematicGUI_3List3Spin_QTD();
|
||||
|
||||
QGroupBox* GroupBox1;
|
||||
QLabel* TextLabel2;
|
||||
QSpinBox* SpinBox1;
|
||||
QLabel* TextLabel4;
|
||||
QLabel* TextLabel3;
|
||||
QLabel* TextLabel1;
|
||||
QComboBox* ComboBox3;
|
||||
QSpinBox* SpinBox2;
|
||||
QSpinBox* SpinBox3;
|
||||
QLabel* TextLabel6;
|
||||
QComboBox* ComboBox1;
|
||||
QComboBox* ComboBox2;
|
||||
QLabel* TextLabel5;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* KinematicGUI_3List3Spin_QTDLayout;
|
||||
QGridLayout* GroupBox1Layout;
|
||||
QGridLayout* Layout1;
|
||||
};
|
||||
|
||||
#endif // KINEMATICGUI_3LIST3SPIN_QTD_H
|
117
src/KinematicGUI/KinematicGUI_3Sel1List_QTD.cxx
Normal file
@ -0,0 +1,117 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'KinematicGUI_3Sel1List_QTD.ui'
|
||||
**
|
||||
** Created: mer fév 4 13:09:40 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "KinematicGUI_3Sel1List_QTD.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qcombobox.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a KinematicGUI_3Sel1List_QTD which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
KinematicGUI_3Sel1List_QTD::KinematicGUI_3Sel1List_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||
: QWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "KinematicGUI_3Sel1List_QTD" );
|
||||
resize( 129, 145 );
|
||||
setCaption( trUtf8( "KinematicGUI_3Sel1List_QTD" ) );
|
||||
KinematicGUI_3Sel1List_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "KinematicGUI_3Sel1List_QTDLayout");
|
||||
|
||||
GroupBox1 = new QGroupBox( this, "GroupBox1" );
|
||||
GroupBox1->setTitle( trUtf8( "" ) );
|
||||
GroupBox1->setColumnLayout(0, Qt::Vertical );
|
||||
GroupBox1->layout()->setSpacing( 6 );
|
||||
GroupBox1->layout()->setMargin( 11 );
|
||||
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
|
||||
GroupBox1Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
|
||||
QSpacerItem* spacer = new QSpacerItem( 0, 90, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout1->addItem( spacer, 4, 2 );
|
||||
|
||||
PushButton2 = new QPushButton( GroupBox1, "PushButton2" );
|
||||
PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) );
|
||||
PushButton2->setText( trUtf8( "" ) );
|
||||
|
||||
Layout1->addWidget( PushButton2, 2, 1 );
|
||||
|
||||
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
|
||||
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel1->setText( trUtf8( "TL1" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel1, 0, 0 );
|
||||
|
||||
TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
|
||||
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel4->setText( trUtf8( "TL4" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel4, 3, 0 );
|
||||
|
||||
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
|
||||
|
||||
Layout1->addWidget( LineEdit1, 0, 2 );
|
||||
|
||||
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
|
||||
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
|
||||
PushButton1->setText( trUtf8( "" ) );
|
||||
|
||||
Layout1->addWidget( PushButton1, 0, 1 );
|
||||
|
||||
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
|
||||
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel3->setText( trUtf8( "TL3" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel3, 2, 0 );
|
||||
|
||||
PushButton3 = new QPushButton( GroupBox1, "PushButton3" );
|
||||
PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) );
|
||||
PushButton3->setText( trUtf8( "" ) );
|
||||
|
||||
Layout1->addWidget( PushButton3, 3, 1 );
|
||||
|
||||
ComboBox1 = new QComboBox( FALSE, GroupBox1, "ComboBox1" );
|
||||
ComboBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBox1->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout1->addWidget( ComboBox1, 1, 2 );
|
||||
|
||||
LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
|
||||
|
||||
Layout1->addWidget( LineEdit2, 2, 2 );
|
||||
|
||||
LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" );
|
||||
|
||||
Layout1->addWidget( LineEdit3, 3, 2 );
|
||||
|
||||
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
|
||||
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel2->setText( trUtf8( "TL2" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel2, 1, 0 );
|
||||
|
||||
GroupBox1Layout->addLayout( Layout1, 0, 0 );
|
||||
|
||||
KinematicGUI_3Sel1List_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
KinematicGUI_3Sel1List_QTD::~KinematicGUI_3Sel1List_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
51
src/KinematicGUI/KinematicGUI_3Sel1List_QTD.h
Normal file
@ -0,0 +1,51 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'KinematicGUI_3Sel1List_QTD.ui'
|
||||
**
|
||||
** Created: mer fév 4 13:09:40 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef KINEMATICGUI_3SEL1LIST_QTD_H
|
||||
#define KINEMATICGUI_3SEL1LIST_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QComboBox;
|
||||
class QGroupBox;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
|
||||
class KinematicGUI_3Sel1List_QTD : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KinematicGUI_3Sel1List_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~KinematicGUI_3Sel1List_QTD();
|
||||
|
||||
QGroupBox* GroupBox1;
|
||||
QPushButton* PushButton2;
|
||||
QLabel* TextLabel1;
|
||||
QLabel* TextLabel4;
|
||||
QLineEdit* LineEdit1;
|
||||
QPushButton* PushButton1;
|
||||
QLabel* TextLabel3;
|
||||
QPushButton* PushButton3;
|
||||
QComboBox* ComboBox1;
|
||||
QLineEdit* LineEdit2;
|
||||
QLineEdit* LineEdit3;
|
||||
QLabel* TextLabel2;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* KinematicGUI_3Sel1List_QTDLayout;
|
||||
QGridLayout* GroupBox1Layout;
|
||||
QGridLayout* Layout1;
|
||||
};
|
||||
|
||||
#endif // KINEMATICGUI_3SEL1LIST_QTD_H
|
54
src/KinematicGUI/KinematicGUI_3Sel1Spin.cxx
Normal file
@ -0,0 +1,54 @@
|
||||
// GEOM GEOMGUI : GUI for Geometry component
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : KinematicGUI_3Sel1Spin.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#include "KinematicGUI_3Sel1Spin.h"
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qgroupbox.h>
|
||||
|
||||
/*
|
||||
* Constructs a KinematicGUI_3Sel1Spin which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'
|
||||
*/
|
||||
KinematicGUI_3Sel1Spin::KinematicGUI_3Sel1Spin(QWidget* parent, const char* name, WFlags fl)
|
||||
:KinematicGUI_3Sel1Spin_QTD(parent, name, fl)
|
||||
{
|
||||
SpinBox1->close(TRUE);
|
||||
SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
|
||||
Layout2->addWidget(SpinBox_DX, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
KinematicGUI_3Sel1Spin::~KinematicGUI_3Sel1Spin()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
47
src/KinematicGUI/KinematicGUI_3Sel1Spin.h
Normal file
@ -0,0 +1,47 @@
|
||||
// GEOM GEOMGUI : GUI for Geometry component
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : KinematicGUI_3Sel1Spin.h
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef KINEMATICGUI_3SEL1SPIN_H
|
||||
#define KINEMATICGUI_3SEL1SPIN_H
|
||||
|
||||
#include "KinematicGUI_3Sel1Spin_QTD.h"
|
||||
#include "DlgRef_SpinBox.h"
|
||||
|
||||
class KinematicGUI_3Sel1Spin : public KinematicGUI_3Sel1Spin_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KinematicGUI_3Sel1Spin( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~KinematicGUI_3Sel1Spin();
|
||||
|
||||
DlgRef_SpinBox* SpinBox_DX;
|
||||
|
||||
};
|
||||
|
||||
#endif // KINEMATICGUI_3SEL1SPIN_H
|
121
src/KinematicGUI/KinematicGUI_3Sel1Spin_QTD.cxx
Normal file
@ -0,0 +1,121 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'KinematicGUI_3Sel1Spin_QTD.ui'
|
||||
**
|
||||
** Created: mer fév 4 13:09:41 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "KinematicGUI_3Sel1Spin_QTD.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a KinematicGUI_3Sel1Spin_QTD which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
KinematicGUI_3Sel1Spin_QTD::KinematicGUI_3Sel1Spin_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||
: QWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "KinematicGUI_3Sel1Spin_QTD" );
|
||||
resize( 129, 147 );
|
||||
setCaption( trUtf8( "KinematicGUI_3Sel1Spin_QTD" ) );
|
||||
KinematicGUI_3Sel1Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "KinematicGUI_3Sel1Spin_QTDLayout");
|
||||
|
||||
GroupBox1 = new QGroupBox( this, "GroupBox1" );
|
||||
GroupBox1->setTitle( trUtf8( "" ) );
|
||||
GroupBox1->setColumnLayout(0, Qt::Vertical );
|
||||
GroupBox1->layout()->setSpacing( 6 );
|
||||
GroupBox1->layout()->setMargin( 11 );
|
||||
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
|
||||
GroupBox1Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
|
||||
|
||||
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
|
||||
|
||||
Layout1->addWidget( LineEdit1, 0, 2 );
|
||||
|
||||
PushButton3 = new QPushButton( GroupBox1, "PushButton3" );
|
||||
PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) );
|
||||
PushButton3->setText( trUtf8( "" ) );
|
||||
|
||||
Layout1->addWidget( PushButton3, 2, 1 );
|
||||
|
||||
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
|
||||
|
||||
TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
|
||||
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel4->setText( trUtf8( "TL4" ) );
|
||||
|
||||
Layout2->addWidget( TextLabel4, 0, 0 );
|
||||
|
||||
SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
|
||||
SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
|
||||
|
||||
Layout2->addWidget( SpinBox1, 0, 1 );
|
||||
|
||||
Layout1->addMultiCellLayout( Layout2, 3, 3, 0, 2 );
|
||||
|
||||
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
|
||||
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel3->setText( trUtf8( "TL3" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel3, 2, 0 );
|
||||
|
||||
LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" );
|
||||
|
||||
Layout1->addWidget( LineEdit3, 2, 2 );
|
||||
|
||||
LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
|
||||
|
||||
Layout1->addWidget( LineEdit2, 1, 2 );
|
||||
|
||||
PushButton2 = new QPushButton( GroupBox1, "PushButton2" );
|
||||
PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) );
|
||||
PushButton2->setText( trUtf8( "" ) );
|
||||
|
||||
Layout1->addWidget( PushButton2, 1, 1 );
|
||||
|
||||
TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
|
||||
TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel2->setText( trUtf8( "TL2" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel2, 1, 0 );
|
||||
QSpacerItem* spacer = new QSpacerItem( 0, 100, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout1->addItem( spacer, 4, 2 );
|
||||
|
||||
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
|
||||
TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
|
||||
TextLabel1->setText( trUtf8( "TL1" ) );
|
||||
|
||||
Layout1->addWidget( TextLabel1, 0, 0 );
|
||||
|
||||
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
|
||||
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
|
||||
PushButton1->setText( trUtf8( "" ) );
|
||||
|
||||
Layout1->addWidget( PushButton1, 0, 1 );
|
||||
|
||||
GroupBox1Layout->addLayout( Layout1, 0, 0 );
|
||||
|
||||
KinematicGUI_3Sel1Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
KinematicGUI_3Sel1Spin_QTD::~KinematicGUI_3Sel1Spin_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
52
src/KinematicGUI/KinematicGUI_3Sel1Spin_QTD.h
Normal file
@ -0,0 +1,52 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'KinematicGUI_3Sel1Spin_QTD.ui'
|
||||
**
|
||||
** Created: mer fév 4 13:09:40 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef KINEMATICGUI_3SEL1SPIN_QTD_H
|
||||
#define KINEMATICGUI_3SEL1SPIN_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QGroupBox;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
class QSpinBox;
|
||||
|
||||
class KinematicGUI_3Sel1Spin_QTD : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KinematicGUI_3Sel1Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~KinematicGUI_3Sel1Spin_QTD();
|
||||
|
||||
QGroupBox* GroupBox1;
|
||||
QLineEdit* LineEdit1;
|
||||
QPushButton* PushButton3;
|
||||
QLabel* TextLabel4;
|
||||
QSpinBox* SpinBox1;
|
||||
QLabel* TextLabel3;
|
||||
QLineEdit* LineEdit3;
|
||||
QLineEdit* LineEdit2;
|
||||
QPushButton* PushButton2;
|
||||
QLabel* TextLabel2;
|
||||
QLabel* TextLabel1;
|
||||
QPushButton* PushButton1;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* KinematicGUI_3Sel1Spin_QTDLayout;
|
||||
QGridLayout* GroupBox1Layout;
|
||||
QGridLayout* Layout1;
|
||||
QGridLayout* Layout2;
|
||||
};
|
||||
|
||||
#endif // KINEMATICGUI_3SEL1SPIN_QTD_H
|
596
src/KinematicGUI/KinematicGUI_AnimDlg.cxx
Normal file
@ -0,0 +1,596 @@
|
||||
// GEOM GEOMGUI : GUI for Geometry component
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : KinematicGUI_AnimDlg.cxx
|
||||
// Author : Damien COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
using namespace std;
|
||||
#include "KinematicGUI_AnimDlg.h"
|
||||
|
||||
#include "QAD_RightFrame.h"
|
||||
#include "OCCViewer_ViewFrame.h"
|
||||
#include "QAD_FileDlg.h"
|
||||
#include "QAD_Tools.h"
|
||||
|
||||
//=================================================================================
|
||||
// class : MyThread()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
MyThread::MyThread(Kinematic_Animation* KAnimation, Handle(AIS_InteractiveContext) ic)
|
||||
{
|
||||
myIC = ic;
|
||||
myKAnimation = KAnimation;
|
||||
myIsActive = false;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : ~MyThread()
|
||||
// purpose : Destroys the object and frees any allocated resources
|
||||
//=================================================================================
|
||||
MyThread::~MyThread() {}
|
||||
|
||||
//=================================================================================
|
||||
// class : run()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void MyThread::run()
|
||||
{
|
||||
qApp->lock();
|
||||
while(myIsActive) {
|
||||
emit frameChanged();
|
||||
|
||||
qApp->syncX();
|
||||
|
||||
double Step, Val;
|
||||
Step = 1.0 / myKAnimation->NbSeq();
|
||||
Val = myValue * Step;
|
||||
|
||||
myKAnimation->myMovedShape.Clear();
|
||||
myKAnimation->myMovedShape.Add(myKAnimation->Frame());
|
||||
|
||||
myKAnimation->myNbAIS = 0;
|
||||
myKAnimation->GetNextShape(myIC, myLoc, myKAnimation->Frame(), Val);
|
||||
|
||||
myIC->UpdateCurrentViewer();
|
||||
|
||||
qApp->unlock();
|
||||
usleep((int)(myKAnimation->Duration() / myKAnimation->NbSeq() * 1e6));
|
||||
qApp->lock();
|
||||
|
||||
if (!myIsActive) break;
|
||||
}
|
||||
|
||||
qApp->unlock();
|
||||
emit stopped();
|
||||
QThread::exit();
|
||||
return;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// class : InitAnim()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void MyThread::InitAnim()
|
||||
{
|
||||
myKAnimation->myMovedShape.Clear();
|
||||
myKAnimation->myMovedShape.Add(myKAnimation->Frame());
|
||||
|
||||
gp_Trsf aLoc;
|
||||
myLoc = aLoc;
|
||||
if(!myKAnimation->IsCreated)
|
||||
myKAnimation->GetNextShape(myIC, myLoc, myKAnimation->Frame(), 1);
|
||||
myKAnimation->IsCreated = true;
|
||||
|
||||
myAISFrame = new AIS_Shape(TopoDS_Shape());
|
||||
myAISFrame->Set(myKAnimation->Frame());
|
||||
if(myKAnimation->myIsShading) {
|
||||
myAISFrame->SetColor(Quantity_NOC_GOLDENROD);
|
||||
myIC->Display(myAISFrame, 1, 1, Standard_False);
|
||||
}
|
||||
else {
|
||||
myAISFrame->SetColor(Quantity_NOC_RED);
|
||||
myIC->Display(myAISFrame, 0, 1, Standard_False);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// class : ClearAnim()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void MyThread::ClearAnim(int ClearPrs)
|
||||
{
|
||||
myIC->Erase(myAISFrame, Standard_False, Standard_False);
|
||||
myIC->ClearPrs(myAISFrame);
|
||||
|
||||
if(!myKAnimation->ListOfAIS.IsEmpty()) {
|
||||
for(int i = 1; i <= myKAnimation->myNbAIS; i++) {
|
||||
Handle(AIS_Shape) myShape = Handle(AIS_Shape)::DownCast(myKAnimation->ListOfAIS.Value(i));
|
||||
myIC->Erase(myShape, Standard_False, Standard_False);
|
||||
if(ClearPrs)
|
||||
myIC->ClearPrs(myShape);
|
||||
}
|
||||
}
|
||||
myIC->UpdateCurrentViewer();
|
||||
return;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// class : NextFrame()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void MyThread::NextFrame() {
|
||||
double Step, Val;
|
||||
Step = 1.0 / myKAnimation->NbSeq();
|
||||
Val = myValue * Step;
|
||||
|
||||
myKAnimation->myMovedShape.Clear();
|
||||
myKAnimation->myMovedShape.Add(myKAnimation->Frame());
|
||||
|
||||
myKAnimation->myNbAIS = 0;
|
||||
myKAnimation->GetNextShape(myIC, myLoc, myKAnimation->Frame(), Val);
|
||||
|
||||
myIC->UpdateCurrentViewer();
|
||||
return;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// class : startAnimation()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void MyThread::startAnimation() {
|
||||
//DCQ : QThread doesn't work...
|
||||
// if(!myIsActive) {
|
||||
// myIsActive = true;
|
||||
// QThread::start();
|
||||
// }
|
||||
|
||||
QApplication::setOverrideCursor(Qt::waitCursor);
|
||||
myIsActive = true;
|
||||
qApp->lock();
|
||||
while(myIsActive) {
|
||||
emit frameChanged();
|
||||
|
||||
qApp->syncX();
|
||||
|
||||
double Step, Val;
|
||||
Step = 1.0 / myKAnimation->NbSeq();
|
||||
Val = myValue * Step;
|
||||
|
||||
myKAnimation->myMovedShape.Clear();
|
||||
myKAnimation->myMovedShape.Add(myKAnimation->Frame());
|
||||
|
||||
myKAnimation->myNbAIS = 0;
|
||||
myKAnimation->GetNextShape(myIC, myLoc, myKAnimation->Frame(), Val);
|
||||
|
||||
myIC->UpdateCurrentViewer();
|
||||
|
||||
qApp->unlock();
|
||||
usleep((int)(myKAnimation->Duration() / myKAnimation->NbSeq() * 1e6));
|
||||
qApp->lock();
|
||||
|
||||
if (!myIsActive) break;
|
||||
}
|
||||
|
||||
QApplication::restoreOverrideCursor();
|
||||
qApp->unlock();
|
||||
emit stopped();
|
||||
return;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// class : stopAnimation()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void MyThread::stopAnimation() {
|
||||
myIsActive = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// class : KinematicGUI_AnimDlg()
|
||||
// purpose : Constructs a KinematicGUI_AnimDlg which is a child of 'parent', with the
|
||||
// name 'name' and widget flags set to 'f'.
|
||||
// The dialog will by default be modeless, unless you set 'modal' to
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
KinematicGUI_AnimDlg::KinematicGUI_AnimDlg(QWidget* parent, const char* name, KinematicGUI* theKinematicGUI, SALOME_Selection* Sel, Handle(AIS_InteractiveContext) ic, bool modal, WFlags fl)
|
||||
:KinematicGUI_Skeleton_QTD(parent, name, modal, fl)
|
||||
{
|
||||
if (!name)
|
||||
setName("KinematicGUI_AnimDlg");
|
||||
|
||||
buttonClose->setText(tr("GEOM_BUT_CLOSE"));
|
||||
GroupMedium->close(TRUE);
|
||||
resize(0, 0);
|
||||
|
||||
setCaption(tr("GEOM_ANIM_TITLE"));
|
||||
|
||||
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_ANIMATION")));
|
||||
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_ANIM_FIRST")));
|
||||
QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_ANIM_PREV")));
|
||||
QPixmap image3(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_ANIM_STOP")));
|
||||
QPixmap image4(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_ANIM_PLAY")));
|
||||
QPixmap image5(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_ANIM_NEXT")));
|
||||
QPixmap image6(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_ANIM_LAST")));
|
||||
|
||||
/***************************************************************/
|
||||
GroupConstructors->setTitle(tr("GEOM_ANIM"));
|
||||
RadioButton1->setPixmap(image0);
|
||||
|
||||
Group1 = new KinematicGUI_Anim_QTD(this, "Group1");
|
||||
Group1->PushButton1->setPixmap(image1);
|
||||
Group1->PushButton2->setPixmap(image2);
|
||||
Group1->PushButton3->setPixmap(image3);
|
||||
Group1->PushButton4->setPixmap(image4);
|
||||
Group1->PushButton5->setPixmap(image5);
|
||||
Group1->PushButton6->setPixmap(image6);
|
||||
Group1->PushButton7->setText(tr("GEOM_ANIM_EXPORT"));
|
||||
Group1->CheckButton1->setText(tr("GEOM_ANIM_SHADING"));
|
||||
Group1->CheckButton2->setText(tr("GEOM_ANIM_INLOOP"));
|
||||
|
||||
Layout1->addWidget(Group1, 1, 0);
|
||||
/***************************************************************/
|
||||
|
||||
/* Initialisation */
|
||||
myKinematicGUI = theKinematicGUI;
|
||||
QApplication::setOverrideCursor(Qt::waitCursor);
|
||||
Init(Sel, ic);
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ~KinematicGUI_AnimDlg()
|
||||
// purpose : Destroys the object and frees any allocated resources
|
||||
//=================================================================================
|
||||
KinematicGUI_AnimDlg::~KinematicGUI_AnimDlg()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
this->destroy(TRUE, TRUE);
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : Init()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::Init(SALOME_Selection* Sel, Handle(AIS_InteractiveContext) ic)
|
||||
{
|
||||
/* init variables */
|
||||
mySelection = Sel;
|
||||
|
||||
myGeomBase = new GEOMBase();
|
||||
myGeomGUI = GEOMContext::GetGeomGUI();
|
||||
myGeomGUI->SetActiveDialogBox((QDialog*)this);
|
||||
myGeom = myGeomGUI->myComponentGeom;
|
||||
|
||||
|
||||
Standard_Boolean testResult;
|
||||
Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
|
||||
GEOM::GEOM_Animation_var myGeomAnim = myGeomBase->ConvertIOinAnimation(IO, testResult);
|
||||
if(!testResult)
|
||||
ClickOnCancel();
|
||||
|
||||
Kinematic_Animation* KAnimation = myKinematicGUI->CreateAnimation(myGeomAnim);
|
||||
|
||||
bool IsOk = false;
|
||||
for(int cpt = 1; cpt <= KAnimation->myIndexToShape.Extent(); cpt++) {
|
||||
TopoDS_Shape myShape = KAnimation->myIndexToShape.FindKey(cpt);
|
||||
if(myShape == KAnimation->Frame())
|
||||
IsOk = true;
|
||||
}
|
||||
if(!IsOk)
|
||||
ClickOnCancel();
|
||||
|
||||
Group1->CheckButton2->setEnabled(false);
|
||||
|
||||
Group1->Slider1->setMaxValue(KAnimation->NbSeq());
|
||||
Group1->Slider1->setPageStep(1);
|
||||
Group1->Slider1->setValue(0);
|
||||
|
||||
/* signals and slots connections */
|
||||
connect(buttonClose, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
|
||||
connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||
connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
|
||||
|
||||
connect(Group1->Slider1, SIGNAL(valueChanged(int)), this, SLOT(ClickOnSlider(int)));
|
||||
connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(ClickOnFirst()));
|
||||
connect(Group1->PushButton2, SIGNAL(clicked()), this, SLOT(ClickOnPrevious()));
|
||||
connect(Group1->PushButton3, SIGNAL(clicked()), this, SLOT(ClickOnStop()));
|
||||
connect(Group1->PushButton4, SIGNAL(clicked()), this, SLOT(ClickOnPlay()));
|
||||
connect(Group1->PushButton5, SIGNAL(clicked()), this, SLOT(ClickOnNext()));
|
||||
connect(Group1->PushButton6, SIGNAL(clicked()), this, SLOT(ClickOnLast()));
|
||||
connect(Group1->PushButton7, SIGNAL(clicked()), this, SLOT(ClickOnExport()));
|
||||
connect(Group1->CheckButton1, SIGNAL(clicked()), this, SLOT(ClickOnShading()));
|
||||
|
||||
myAnimator = new MyThread(KAnimation, ic);
|
||||
connect(myAnimator, SIGNAL(frameChanged()), this, SLOT(OnNext()));
|
||||
connect(myAnimator, SIGNAL(stopped()), this, SLOT(ClickOnStop()));
|
||||
myAnimator->InitAnim();
|
||||
myAnimator->myValue = 0;
|
||||
myAnimator->NextFrame();
|
||||
|
||||
/* Move widget on the botton right corner of main widget */
|
||||
// int x, y;
|
||||
// myGeomBase->DefineDlgPosition(this, x, y);
|
||||
// this->move(x, y);
|
||||
|
||||
/* displays Dialog */
|
||||
RadioButton1->setChecked(TRUE);
|
||||
Group1->show();
|
||||
this->show();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnCancel()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::ClickOnCancel()
|
||||
{
|
||||
this->ClickOnStop();
|
||||
myAnimator->ClearAnim(true);
|
||||
disconnect(mySelection, 0, this, 0);
|
||||
reject();
|
||||
QApplication::restoreOverrideCursor();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : DeactivateActiveDialog()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::DeactivateActiveDialog()
|
||||
{
|
||||
this->setEnabled(false);
|
||||
disconnect(mySelection, 0, this, 0);
|
||||
myGeomGUI->SetActiveDialogBox(0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ActivateThisDialog()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::ActivateThisDialog()
|
||||
{
|
||||
/* Emit a signal to deactivate the active dialog */
|
||||
myGeomGUI->EmitSignalDeactivateDialog();
|
||||
this->setEnabled(true);
|
||||
myGeomGUI->SetActiveDialogBox((QDialog*)this);
|
||||
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : closeEvent()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::closeEvent(QCloseEvent* e)
|
||||
{
|
||||
/* same than click on cancel button */
|
||||
this->ClickOnCancel();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : enterEvent()
|
||||
// purpose : when mouse enter onto the QWidget
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::enterEvent(QEvent * e)
|
||||
{
|
||||
if(GroupConstructors->isEnabled())
|
||||
return;
|
||||
this->ActivateThisDialog();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnSlider()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::ClickOnSlider(int newValue)
|
||||
{
|
||||
myAnimator->myValue = newValue;
|
||||
if(!myAnimator->running())
|
||||
myAnimator->NextFrame();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnFirst()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::ClickOnFirst()
|
||||
{
|
||||
this->ClickOnStop();
|
||||
int aVal = Group1->Slider1->value();
|
||||
if(aVal == 0) {
|
||||
myAnimator->myValue = 0;
|
||||
myAnimator->NextFrame();
|
||||
}
|
||||
else
|
||||
Group1->Slider1->setValue(0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnPrevious()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::ClickOnPrevious()
|
||||
{
|
||||
this->ClickOnStop();
|
||||
int aVal = Group1->Slider1->value();
|
||||
if(aVal != 0)
|
||||
Group1->Slider1->setValue(aVal - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnStop()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::ClickOnStop()
|
||||
{
|
||||
myAnimator->stopAnimation();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnPlay()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::ClickOnPlay()
|
||||
{
|
||||
if(!myAnimator->running())
|
||||
myAnimator->startAnimation();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : OnNext()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::OnNext()
|
||||
{
|
||||
int aVal = Group1->Slider1->value();
|
||||
if(aVal != myAnimator->myKAnimation->NbSeq())
|
||||
Group1->Slider1->setValue(aVal + 1);
|
||||
else {
|
||||
if(Group1->CheckButton2->isChecked())
|
||||
Group1->Slider1->setValue(0);
|
||||
else
|
||||
this->ClickOnStop();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnNext()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::ClickOnNext()
|
||||
{
|
||||
this->ClickOnStop();
|
||||
this->OnNext();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnLast()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::ClickOnLast()
|
||||
{
|
||||
this->ClickOnStop();
|
||||
int aVal = Group1->Slider1->value();
|
||||
if(aVal == myAnimator->myKAnimation->NbSeq()) {
|
||||
myAnimator->myValue = myAnimator->myKAnimation->NbSeq();
|
||||
myAnimator->NextFrame();
|
||||
}
|
||||
else
|
||||
Group1->Slider1->setValue(myAnimator->myKAnimation->NbSeq());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnShading()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::ClickOnShading()
|
||||
{
|
||||
QApplication::setOverrideCursor(Qt::waitCursor);
|
||||
this->ClickOnStop();
|
||||
myAnimator->ClearAnim(false);
|
||||
myAnimator->myKAnimation->myIsShading = Group1->CheckButton1->isChecked();
|
||||
myAnimator->InitAnim();
|
||||
this->ClickOnFirst();
|
||||
QApplication::restoreOverrideCursor();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ClickOnExport()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void KinematicGUI_AnimDlg::ClickOnExport()
|
||||
{
|
||||
this->ClickOnFirst();
|
||||
|
||||
QString fName = QAD_FileDlg::getFileName(QAD_Application::getDesktop(), QString::null, tr("OCC_IMAGE_FILES"), tr("INF_APP_DUMP_VIEW"), false);
|
||||
|
||||
QString TestFile = QAD_Tools::getFileNameFromPath(fName, false);
|
||||
if(TestFile.isEmpty())
|
||||
return;
|
||||
|
||||
QApplication::setOverrideCursor(Qt::waitCursor);
|
||||
qApp->processEvents();
|
||||
|
||||
for(int i = 0; i <= myAnimator->myKAnimation->NbSeq(); i++) {
|
||||
qApp->processEvents();
|
||||
QWidget* qw = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewWidget();
|
||||
QPixmap px = QPixmap::grabWindow(qw->winId());
|
||||
|
||||
QString fileName = QAD_Tools::getDirFromPath(fName, false);
|
||||
fileName = QAD_Tools::addSlash(fileName);
|
||||
fileName.append(TestFile);
|
||||
fileName.append(QString("_%1.").arg(i));
|
||||
QString fmt = QAD_Tools::getFileExtensionFromPath(fName);
|
||||
fileName.append(fmt);
|
||||
|
||||
fmt = fmt.upper();
|
||||
if(fmt.isEmpty())
|
||||
fmt = QString("BMP"); // default format
|
||||
if(fmt == "JPG")
|
||||
fmt = "JPEG";
|
||||
|
||||
bool bOk = px.save(fileName, fmt.latin1());
|
||||
|
||||
this->OnNext();
|
||||
}
|
||||
|
||||
QApplication::restoreOverrideCursor();
|
||||
return;
|
||||
}
|
119
src/KinematicGUI/KinematicGUI_AnimDlg.h
Normal file
@ -0,0 +1,119 @@
|
||||
// GEOM GEOMGUI : GUI for Geometry component
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : KinematicGUI_AnimDlg.h
|
||||
// Author : Damine COQUERET
|
||||
// Module : GEOM
|
||||
// $Header:
|
||||
|
||||
#ifndef KINEMATICGUI_ANIMDLG_H
|
||||
#define KINEMATICGUI_ANIMDLG_H
|
||||
|
||||
#include "KinematicGUI_Skeleton_QTD.h"
|
||||
#include "KinematicGUI_Anim_QTD.h"
|
||||
|
||||
#include "KinematicGUI.h"
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qlayout.h>
|
||||
#include <qradiobutton.h>
|
||||
#include <qbuttongroup.h>
|
||||
#include <qslider.h>
|
||||
#include <qthread.h>
|
||||
|
||||
class MyThread : public QObject, public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MyThread(Kinematic_Animation* KAnimation = 0, Handle(AIS_InteractiveContext) ic = 0);
|
||||
~MyThread();
|
||||
|
||||
private:
|
||||
bool myIsActive;
|
||||
Handle(AIS_Shape) myAISFrame;
|
||||
Handle(AIS_InteractiveContext) myIC; /* Interactive context */
|
||||
gp_Trsf myLoc;
|
||||
|
||||
public:
|
||||
Kinematic_Animation* myKAnimation;
|
||||
|
||||
int myValue;
|
||||
virtual void run();
|
||||
void startAnimation();
|
||||
void stopAnimation();
|
||||
void InitAnim();
|
||||
void ClearAnim(int ClearPrs);
|
||||
void NextFrame();
|
||||
|
||||
signals:
|
||||
void frameChanged();
|
||||
void stopped();
|
||||
|
||||
};
|
||||
|
||||
|
||||
class KinematicGUI_AnimDlg : public KinematicGUI_Skeleton_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KinematicGUI_AnimDlg(QWidget* parent = 0, const char* name = 0, KinematicGUI* theKinematicGUI = 0, SALOME_Selection* Sel = 0, Handle(AIS_InteractiveContext) ic = 0, bool modal = FALSE, WFlags fl = 0);
|
||||
~KinematicGUI_AnimDlg();
|
||||
|
||||
private :
|
||||
void Init(SALOME_Selection* Sel, Handle(AIS_InteractiveContext) ic);
|
||||
void enterEvent(QEvent * e);
|
||||
void closeEvent(QCloseEvent* e);
|
||||
|
||||
KinematicGUI* myKinematicGUI;
|
||||
|
||||
MyThread* myAnimator;
|
||||
|
||||
SALOME_Selection* mySelection; /* User shape selection */
|
||||
GEOM::GEOM_Gen_var myGeom; /* Current GeomI object */
|
||||
GEOMBase* myGeomBase;
|
||||
GEOMContext* myGeomGUI; /* Current GeomGUI object */
|
||||
|
||||
KinematicGUI_Anim_QTD* Group1;
|
||||
|
||||
private slots:
|
||||
void ClickOnCancel();
|
||||
void DeactivateActiveDialog();
|
||||
void ActivateThisDialog();
|
||||
void ClickOnSlider(int newValue);
|
||||
void ClickOnFirst();
|
||||
void ClickOnPrevious();
|
||||
void ClickOnStop();
|
||||
void ClickOnPlay();
|
||||
void OnNext();
|
||||
void ClickOnNext();
|
||||
void ClickOnLast();
|
||||
void ClickOnShading();
|
||||
void ClickOnExport();
|
||||
|
||||
};
|
||||
|
||||
#endif // KINEMATICGUI_ANIMDLG_H
|
122
src/KinematicGUI/KinematicGUI_Anim_QTD.cxx
Normal file
@ -0,0 +1,122 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'KinematicGUI_Anim_QTD.ui'
|
||||
**
|
||||
** Created: jeu mar 4 16:48:10 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#include "KinematicGUI_Anim_QTD.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qradiobutton.h>
|
||||
#include <qslider.h>
|
||||
#include <qlayout.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
/*
|
||||
* Constructs a KinematicGUI_Anim_QTD which is a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*/
|
||||
KinematicGUI_Anim_QTD::KinematicGUI_Anim_QTD( QWidget* parent, const char* name, WFlags fl )
|
||||
: QWidget( parent, name, fl )
|
||||
{
|
||||
if ( !name )
|
||||
setName( "KinematicGUI_Anim_QTD" );
|
||||
resize( 334, 121 );
|
||||
setCaption( trUtf8( "KinematicGUI_Anim_QTD" ) );
|
||||
KinematicGUI_Anim_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "KinematicGUI_Anim_QTDLayout");
|
||||
|
||||
GroupBox1 = new QGroupBox( this, "GroupBox1" );
|
||||
GroupBox1->setTitle( trUtf8( "" ) );
|
||||
GroupBox1->setColumnLayout(0, Qt::Vertical );
|
||||
GroupBox1->layout()->setSpacing( 6 );
|
||||
GroupBox1->layout()->setMargin( 11 );
|
||||
GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
|
||||
GroupBox1Layout->setAlignment( Qt::AlignTop );
|
||||
|
||||
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
|
||||
QSpacerItem* spacer = new QSpacerItem( 0, 156, QSizePolicy::Minimum, QSizePolicy::Expanding );
|
||||
Layout1->addItem( spacer, 3, 0 );
|
||||
|
||||
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
|
||||
|
||||
PushButton3 = new QPushButton( GroupBox1, "PushButton3" );
|
||||
PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) );
|
||||
PushButton3->setText( trUtf8( "" ) );
|
||||
|
||||
Layout2->addWidget( PushButton3, 0, 2 );
|
||||
|
||||
PushButton5 = new QPushButton( GroupBox1, "PushButton5" );
|
||||
PushButton5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton5->sizePolicy().hasHeightForWidth() ) );
|
||||
PushButton5->setText( trUtf8( "" ) );
|
||||
|
||||
Layout2->addWidget( PushButton5, 0, 4 );
|
||||
|
||||
PushButton2 = new QPushButton( GroupBox1, "PushButton2" );
|
||||
PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) );
|
||||
PushButton2->setText( trUtf8( "" ) );
|
||||
|
||||
Layout2->addWidget( PushButton2, 0, 1 );
|
||||
|
||||
PushButton4 = new QPushButton( GroupBox1, "PushButton4" );
|
||||
PushButton4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton4->sizePolicy().hasHeightForWidth() ) );
|
||||
PushButton4->setText( trUtf8( "" ) );
|
||||
|
||||
Layout2->addWidget( PushButton4, 0, 3 );
|
||||
|
||||
PushButton6 = new QPushButton( GroupBox1, "PushButton6" );
|
||||
PushButton6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton6->sizePolicy().hasHeightForWidth() ) );
|
||||
PushButton6->setText( trUtf8( "" ) );
|
||||
|
||||
Layout2->addWidget( PushButton6, 0, 5 );
|
||||
|
||||
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
|
||||
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
|
||||
PushButton1->setText( trUtf8( "" ) );
|
||||
|
||||
Layout2->addWidget( PushButton1, 0, 0 );
|
||||
|
||||
Layout1->addLayout( Layout2, 1, 0 );
|
||||
|
||||
Slider1 = new QSlider( GroupBox1, "Slider1" );
|
||||
Slider1->setOrientation( QSlider::Horizontal );
|
||||
|
||||
Layout1->addWidget( Slider1, 0, 0 );
|
||||
|
||||
Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3");
|
||||
|
||||
CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" );
|
||||
CheckButton1->setText( trUtf8( "" ) );
|
||||
|
||||
Layout3->addWidget( CheckButton1, 0, 0 );
|
||||
|
||||
PushButton7 = new QPushButton( GroupBox1, "PushButton7" );
|
||||
PushButton7->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton7->sizePolicy().hasHeightForWidth() ) );
|
||||
PushButton7->setText( trUtf8( "" ) );
|
||||
|
||||
Layout3->addWidget( PushButton7, 0, 2 );
|
||||
|
||||
CheckButton2 = new QRadioButton( GroupBox1, "CheckButton2" );
|
||||
CheckButton2->setText( trUtf8( "" ) );
|
||||
|
||||
Layout3->addWidget( CheckButton2, 0, 1 );
|
||||
|
||||
Layout1->addLayout( Layout3, 2, 0 );
|
||||
|
||||
GroupBox1Layout->addLayout( Layout1, 0, 0 );
|
||||
|
||||
KinematicGUI_Anim_QTDLayout->addWidget( GroupBox1, 0, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
KinematicGUI_Anim_QTD::~KinematicGUI_Anim_QTD()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
|
51
src/KinematicGUI/KinematicGUI_Anim_QTD.h
Normal file
@ -0,0 +1,51 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'KinematicGUI_Anim_QTD.ui'
|
||||
**
|
||||
** Created: jeu mar 4 16:48:10 2004
|
||||
** by: The User Interface Compiler (uic)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
#ifndef KINEMATICGUI_ANIM_QTD_H
|
||||
#define KINEMATICGUI_ANIM_QTD_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QGroupBox;
|
||||
class QPushButton;
|
||||
class QRadioButton;
|
||||
class QSlider;
|
||||
|
||||
class KinematicGUI_Anim_QTD : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KinematicGUI_Anim_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
|
||||
~KinematicGUI_Anim_QTD();
|
||||
|
||||
QGroupBox* GroupBox1;
|
||||
QPushButton* PushButton3;
|
||||
QPushButton* PushButton5;
|
||||
QPushButton* PushButton2;
|
||||
QPushButton* PushButton4;
|
||||
QPushButton* PushButton6;
|
||||
QPushButton* PushButton1;
|
||||
QSlider* Slider1;
|
||||
QRadioButton* CheckButton1;
|
||||
QPushButton* PushButton7;
|
||||
QRadioButton* CheckButton2;
|
||||
|
||||
|
||||
protected:
|
||||
QGridLayout* KinematicGUI_Anim_QTDLayout;
|
||||
QGridLayout* GroupBox1Layout;
|
||||
QGridLayout* Layout1;
|
||||
QGridLayout* Layout2;
|
||||
QGridLayout* Layout3;
|
||||
};
|
||||
|
||||
#endif // KINEMATICGUI_ANIM_QTD_H
|