-This is the version 1.3.0 of GEOM
+This is the version 1.4.0 of GEOM
Compatible with :
- - KERNEL 1.3.0
+ - KERNEL 1.4.0
GEOM_fr.xml \
GEOMCatalog.xml \
GEOMDS_Resources \
+animation.png \
arc.png \
archimede.png \
+assembly.png \
axisinertia.png \
basicproperties.png \
bounding.png \
cone.png \
conedxyz.png \
conepointvector.png \
+contact.png \
cut.png \
cylinder.png \
cylinderdxyz.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 \
-THIS IS SALOME - GEOM VERSION: 1.3.0
+THIS IS SALOME - GEOM VERSION: 1.4.0
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
-PROJECT_NAME = "SALOME - GEOM - v.1.3.0"
+PROJECT_NAME = "SALOME - GEOM - v.1.4.0"
PROJECT_NUMBER = id#1.1
OUTPUT_DIRECTORY = ../
OUTPUT_LANGUAGE = English
-foldersTree = gFld("<b>SALOME v.1.3.0 </b>", "", "")
+foldersTree = gFld("<b>SALOME v.1.4.0 </b>", "", "")
insDoc(foldersTree, gLnk("Main Page", "", "main.html"))
aux1 = insFld(foldersTree, gFld("TUI Reference Guide", ""))
rm -rf INPUT
install:
+ $(INSTALL) -d $(docdir); \
cp -rf html $(docdir)
uninstall:
#include "SALOME_Component.idl"
#include "SALOMEDS.idl"
#include "GEOM_Shape.idl"
+#include "GEOM_Kinematic.idl"
module GEOM
{
void ExportIGES(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ;
void ExportBREP(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ;
void ExportSTEP(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ;
+
//-----------------------------------------------------------//
// Check Shape //
//-----------------------------------------------------------//
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,
+ in boolean IsInLoop) raises (SALOME::SALOME_Exception) ;
+
};
};
--- /dev/null
+// 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 Val1, in double Val2, in double Val3)
+ raises (SALOME::SALOME_Exception);
+
+ double GetVal1()
+ raises (SALOME::SALOME_Exception);
+ double GetVal2()
+ raises (SALOME::SALOME_Exception);
+ double GetVal3()
+ 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;
+
+ GEOM_Gen Engine();
+
+ };
+
+ //-----------------------------------------------------------------//
+ // 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;
+
+ GEOM_Gen Engine();
+
+ };
+
+ //-----------------------------------------------------------------//
+ // 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);
+
+ boolean GetIsInLoop()
+ raises (SALOME::SALOME_Exception);
+
+ attribute string Name;
+ attribute string ShapeId;
+ attribute string StudyShapeId;
+
+ GEOM_Gen Engine();
+
+ };
+
+};
+#endif
IDL_FILES = \
GEOM_Shape.idl \
+ GEOM_Kinematic.idl \
GEOM_Gen.idl
PY_CLIENT_IDL = $(IDL_FILES)
</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="contact.png" 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=""/>
<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="Tools" item-id="5" pos-id="">
<separator pos-id=""/>
<separator pos-id="-1"/>
</menu-item>
+
<!-- ***************************** View (menubar) ************************************ -->
<menu-item label-id="View" item-id="2" pos-id="">
<submenu label-id="Display mode" item-id="21" pos-id="5">
<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=""/>
BasicGUI_PlaneDlg.h \
BasicGUI_WorkingPlaneDlg.h
-LIB_CLIENT_IDL =
+LIB_CLIENT_IDL = GEOM_Kinematic.idl
LIB_SERVER_IDL =
{
/* init variables */
myEditCurrentArgument = GroupCommon->LineEdit1;
-
- myShape1.Nullify();
- myShape2.Nullify();
myOkShape1 = myOkShape2 = false;
/* signals and slots connections */
myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult)
return;
- myShape1 = S;
GroupCommon->LineEdit1->setText(aString);
myOkShape1 = true;
}
myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult)
return;
- myShape2 = S;
GroupCommon->LineEdit2->setText(aString);
myOkShape2 = true;
}
BooleanGUI* myBooleanGUI;
- TopoDS_Shape myShape1; /* topology used */
- TopoDS_Shape myShape2; /* topology used */
GEOM::GEOM_Shape_var myGeomShape1; /* is myShape1 */
GEOM::GEOM_Shape_var myGeomShape2; /* is myShape2 */
bool myOkShape1;
{
/* init variables */
myEditCurrentArgument = GroupCut->LineEdit1;
-
- myShape1.Nullify();
- myShape2.Nullify();
myOkShape1 = myOkShape2 = false;
/* signals and slots connections */
myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult)
return;
- myShape1 = S;
GroupCut->LineEdit1->setText(aString);
myOkShape1 = true;
}
myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult)
return;
- myShape2 = S;
GroupCut->LineEdit2->setText(aString);
myOkShape2 = true;
}
BooleanGUI* myBooleanGUI;
- TopoDS_Shape myShape1; /* topology used to fuse */
- TopoDS_Shape myShape2; /* topology used to fuse */
GEOM::GEOM_Shape_var myGeomShape1; /* is myShape1 */
GEOM::GEOM_Shape_var myGeomShape2; /* is myShape2 */
bool myOkShape1; /* to check when arguments are defined */
{
/* init variables */
myEditCurrentArgument = GroupFuse->LineEdit1;
-
- myShape1.Nullify();
- myShape2.Nullify();
myOkShape1 = myOkShape2 = false;
/* signals and slots connections */
myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult)
return;
- myShape1 = S;
GroupFuse->LineEdit1->setText(aString);
myOkShape1 = true;
}
myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult)
return;
- myShape2 = S;
GroupFuse->LineEdit2->setText(aString);
myOkShape2 = true;
}
BooleanGUI* myBooleanGUI;
- TopoDS_Shape myShape1; /* topology used to fuse */
- TopoDS_Shape myShape2; /* topology used to fuse */
GEOM::GEOM_Shape_var myGeomShape1; /* is myShape1 */
GEOM::GEOM_Shape_var myGeomShape2; /* is myShape2 */
bool myOkShape1; /* to check when arguments are defined */
{
/* init variables */
myEditCurrentArgument = GroupSection->LineEdit1;
-
- myShape1.Nullify();
- myShape2.Nullify();
myOkShape1 = myOkShape2 = false;
/* signals and slots connections */
myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult)
return;
- myShape1 = S;
GroupSection->LineEdit1->setText(aString);
myOkShape1 = true;
}
myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult)
return;
- myShape2 = S;
GroupSection->LineEdit2->setText(aString);
myOkShape2 = true;
}
BooleanGUI* myBooleanGUI;
- TopoDS_Shape myShape1; /* topology used to fuse */
- TopoDS_Shape myShape2; /* topology used to fuse */
GEOM::GEOM_Shape_var myGeomShape1; /* is myShape1 */
GEOM::GEOM_Shape_var myGeomShape2; /* is myShape2 */
bool myOkShape1; /* to check when arguments are defined */
BooleanGUI_CutDlg.h \
BooleanGUI_SectionDlg.h
-LIB_CLIENT_IDL =
+LIB_CLIENT_IDL = GEOM_Kinematic.idl
LIB_SERVER_IDL =
BuildGUI_SolidDlg.h \
BuildGUI_CompoundDlg.h
-LIB_CLIENT_IDL =
+LIB_CLIENT_IDL = GEOM_Kinematic.idl
LIB_SERVER_IDL =
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
}
Handle(GEOM_AISShape) aSh = new GEOM_AISShape(Shape, aName->Value());
aSh->SetShadingColor(myDisplayGUI->myGeomBase->myShadingColor);
+ aSh->SetInfiniteState(Shape.Infinite());
Handle(GEOM_InteractiveObject) IO = new GEOM_InteractiveObject(anIOR->Value(), myDisplayGUI->myGeomGUI->GetFatherior(), "GEOM");
IO->setEntry(obj->GetID());
aSh->setIO(IO);
LIB_MOC = \
DisplayGUI.h
-LIB_CLIENT_IDL = SALOME_Exception.idl
+LIB_CLIENT_IDL = SALOME_Exception.idl GEOM_Kinematic.idl
LIB_SERVER_IDL =
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
/* Reset all arguments and local context to allow user a new selection ...*/
- this->ResetStateOfDialog();
+ //this->ResetStateOfDialog();
return;
}
EntityGUI.h \
EntityGUI_SubShapeDlg.h
-LIB_CLIENT_IDL =
+LIB_CLIENT_IDL = GEOM_Kinematic.idl
LIB_SERVER_IDL =
--- /dev/null
+// 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,
+ CORBA::ORB_ptr orb,
+ GEOM::GEOM_Gen_ptr engine)
+{
+ _Animation = Animation;
+ _Ass = GEOM::GEOM_Assembly::_duplicate(Ass);
+ _Frame = GEOM::GEOM_Shape::_duplicate(Frame);
+
+ _orb = orb;
+ _engine = engine;
+
+ _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 : GetDuration()
+// purpose :
+//=================================================================================
+CORBA::Long GEOM_Animation_i::GetNbSeq() throw(SALOME::SALOME_Exception)
+{
+ return _Animation->NbSeq();
+}
+
+
+//=================================================================================
+// function : GetDuration()
+// purpose :
+//=================================================================================
+CORBA::Boolean GEOM_Animation_i::GetIsInLoop() throw(SALOME::SALOME_Exception)
+{
+ return _Animation->IsInLoop();
+}
+
+
+//=================================================================================
+// 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); }
+
+
+//=======================================================================
+//function : Engine
+//purpose : return generator engine
+//=======================================================================
+GEOM::GEOM_Gen_ptr GEOM_Animation_i::Engine() { return _engine; }
--- /dev/null
+// 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,
+ CORBA::ORB_ptr orb,
+ GEOM::GEOM_Gen_ptr engine);
+
+ ~GEOM_Animation_i();
+
+private:
+ Kinematic_Animation* _Animation;
+ GEOM::GEOM_Assembly_ptr _Ass;
+ GEOM::GEOM_Shape_ptr _Frame;
+ CORBA::ORB_ptr _orb;
+ GEOM::GEOM_Gen_ptr _engine;
+
+ 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);
+
+ CORBA::Boolean GetIsInLoop()
+ 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);
+
+ GEOM::GEOM_Gen_ptr Engine();
+
+};
+
+#endif
--- /dev/null
+// 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,
+ CORBA::ORB_ptr orb,
+ GEOM::GEOM_Gen_ptr engine)
+{
+ _Ass = Ass;
+ _orb = orb;
+ _engine = engine;
+
+ _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); }
+
+
+//=======================================================================
+//function : Engine
+//purpose : return generator engine
+//=======================================================================
+GEOM::GEOM_Gen_ptr GEOM_Assembly_i::Engine() { return _engine; }
--- /dev/null
+// 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,
+ CORBA::ORB_ptr orb,
+ GEOM::GEOM_Gen_ptr engine);
+
+ ~GEOM_Assembly_i();
+
+private:
+ Kinematic_Assembly* _Ass;
+ CORBA::ORB_ptr _orb;
+ GEOM::GEOM_Gen_ptr _engine;
+
+ 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);
+
+ GEOM::GEOM_Gen_ptr Engine();
+
+};
+
+#endif
--- /dev/null
+// 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,
+ CORBA::ORB_ptr orb,
+ GEOM::GEOM_Gen_ptr engine)
+{
+ _Contact = Contact;
+ _Shape1 = GEOM::GEOM_Shape::_duplicate(Shape1);
+ _Shape2 = GEOM::GEOM_Shape::_duplicate(Shape2);
+
+ GEOM::PointStruct p0 = engine->MakePointStruct(0, 0, 0);
+ GEOM::PointStruct pX = engine->MakePointStruct(1, 0, 0);
+ GEOM::PointStruct pY = engine->MakePointStruct(0, 1, 0);
+ GEOM::PointStruct pZ = engine->MakePointStruct(0, 0, 1);
+ 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(1, 2, 3, 0, 0, 0);
+ _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());
+
+ _orb = orb;
+ _engine = engine;
+
+ _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); }
+
+
+//=======================================================================
+//function : Engine
+//purpose : return generator engine
+//=======================================================================
+GEOM::GEOM_Gen_ptr GEOM_Contact_i::Engine() { return _engine; }
--- /dev/null
+// 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,
+ CORBA::ORB_ptr orb,
+ 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;
+ CORBA::ORB_ptr _orb;
+ GEOM::GEOM_Gen_ptr _engine;
+
+ 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);
+
+ GEOM::GEOM_Gen_ptr Engine();
+
+};
+
+#endif
#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>
SALOMEDS::ListOfFileNames_var aSeq = new SALOMEDS::ListOfFileNames;
aSeq->length(1);
// Prepare a file name to open
- TCollection_AsciiString aNameWithExt(SALOMEDS_Tool::GetNameFromPath(theComponent->GetStudy()->URL()));
+ TCollection_AsciiString aNameWithExt("");
+ if (isMultiFile)
+ aNameWithExt = TCollection_AsciiString(SALOMEDS_Tool::GetNameFromPath(theComponent->GetStudy()->URL()));
aNameWithExt += TCollection_AsciiString("_GEOM.sgd");
aSeq[0] = CORBA::string_dup(aNameWithExt.ToCString());
// Build a full file name of temporary file
isMultiFile);
// Prepare a file name to open
- TCollection_AsciiString aNameWithExt(aSeq[0]);
+ TCollection_AsciiString aNameWithExt("");
+ if (isMultiFile)
+ aNameWithExt = TCollection_AsciiString(SALOMEDS_Tool::GetNameFromPath(theComponent->GetStudy()->URL()));
+ aNameWithExt += TCollection_AsciiString("_GEOM.sgd");
TCollection_AsciiString aFullName = aTmpDir + aNameWithExt;
// Open document
}
+//=================================================================================
+// 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::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this();
+ GEOM_Assembly_i * Assembly_servant = new GEOM_Assembly_i(tds, _orb, engine);
+ 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, _orb, 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());
+
+ 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,
+ CORBA::Boolean IsInLoop)
+ 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, IsInLoop);
+ }
+ 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::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this();
+ GEOM_Animation_i * Animation_servant = new GEOM_Animation_i(tds, Ass, Shape1, _orb, engine);
+ 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, Animation->Name());
+
+ TCollection_AsciiString entry;
+ TDF_Tool::Entry(Lab, entry);
+ const char *ent = entry.ToCString();
+
+ Animation->ShapeId(ent);
+ return Animation;
+}
+
+
//=====================================================================================
// EXPORTED METHODS
//=====================================================================================
#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>
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,
+ CORBA::Boolean IsInLoop)
+ throw (SALOME::SALOME_Exception) ;
+
};
#endif
--- /dev/null
+// 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;
+}
--- /dev/null
+// 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
--- /dev/null
+// 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;
+}
--- /dev/null
+// 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
--- /dev/null
+// 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 Val1, CORBA::Double Val2, CORBA::Double Val3)
+{
+
+ SetTranslation(Val1, Val2, Val3);
+ return;
+
+}
+
+
+//=================================================================================
+// function : destructor
+// purpose :
+//=================================================================================
+GEOM_Translation_i::~GEOM_Translation_i() {}
+
+
+//=================================================================================
+// function : SetTranslation()
+// purpose :
+//=================================================================================
+void GEOM_Translation_i::SetTranslation(CORBA::Double Val1, CORBA::Double Val2, CORBA::Double Val3)
+ throw(SALOME::SALOME_Exception)
+{
+
+ _Val1 = Val1;
+ _Val2 = Val2;
+ _Val3 = Val3;
+ return;
+
+}
+
+//=================================================================================
+// function : GetVal1()
+// purpose :
+//=================================================================================
+CORBA::Double GEOM_Translation_i::GetVal1() throw(SALOME::SALOME_Exception)
+{
+ return _Val1;
+}
+
+//=================================================================================
+// function : GetVal2()
+// purpose :
+//=================================================================================
+CORBA::Double GEOM_Translation_i::GetVal2() throw(SALOME::SALOME_Exception)
+{
+ return _Val2;
+}
+
+//=================================================================================
+// function : GetVal3()
+// purpose :
+//=================================================================================
+CORBA::Double GEOM_Translation_i::GetVal3() throw(SALOME::SALOME_Exception)
+{
+ return _Val3;
+}
--- /dev/null
+// 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 Val1, CORBA::Double Val2, CORBA::Double Val3);
+
+ ~GEOM_Translation_i();
+
+private:
+ CORBA::Double _Val1;
+ CORBA::Double _Val2;
+ CORBA::Double _Val3;
+
+public:
+ void SetTranslation(CORBA::Double Val1, CORBA::Double Val2, CORBA::Double Val3)
+ 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
# 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 =
BIN_CLIENT_IDL =
BIN_SERVER_IDL =
-EXPORT_HEADERS =
+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 =
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;
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;
anAttr = aStudyBuilder->FindOrCreateAttribute(father, "AttributePixMap");
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
aPixmap->SetPixMap("ICON_OBJBROWSER_Geometry");
+ aStudyBuilder->DefineComponentInstance(father, myGeom);
QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser();
if(aLocked)
aStudy->GetProperties()->SetLocked(true);
op->finish();
}
- aStudyBuilder->DefineComponentInstance(father, myGeom);
father->ComponentIOR(myGeomGUI->GetFatherior());
TCollection_AsciiString nameG("");
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
Handle(GEOM_AISShape) theResult = new GEOM_AISShape(shape, nameG.ToCString());
+ theResult->SetInfiniteState(shape.Infinite());
theResult->SetShadingColor(myShadingColor);
IO = new GEOM_InteractiveObject(aShape->Name(), myGeomGUI->GetFatherior(), "GEOM");
theResult->setIO(IO);
anAttr = aStudyBuilder->FindOrCreateAttribute(father, "AttributePixMap");
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
aPixmap->SetPixMap("ICON_OBJBROWSER_Geometry");
+ aStudyBuilder->DefineComponentInstance(father, myGeom);
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());
}
+//=======================================================================
+// 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 :
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,
LIB_CLIENT_IDL = SALOME_Exception.idl \
SALOMEDS.idl \
- SALOMEDS_Attributes.idl
+ SALOMEDS_Attributes.idl \
+ GEOM_Kinematic.idl
LIB_SERVER_IDL =
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 =
msgid "ICON_OBJBROWSER_Geometry"
msgstr "geometry.png"
+#:
+msgid "ICON_ANIMATION"
+msgstr "animation.png"
+
+#:
+msgid "ICON_ASSEMBLY"
+msgstr "assembly.png"
+
+#:
+msgid "ICON_CONTACT"
+msgstr "contact.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"
msgid "GEOM_SKETCHER_TYPE"
msgstr "Type"
+
+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_IS_IN_LOOP"
+msgstr "In Loop"
LIB_MOC = \
GEOMContext.h
-LIB_CLIENT_IDL = SALOME_Exception.idl
+LIB_CLIENT_IDL = SALOME_Exception.idl GEOM_Kinematic.idl
LIB_SERVER_IDL =
#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"
//=======================================================================
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);
+ 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 LabType = LabContact.NewChild();
+ TDataStd_Integer::Set(LabType, KContact.Type());
+
+ TDF_Label NewLab1 = LabContact.NewChild();
+ TNaming_Builder B1(NewLab1);
+ B1.Select(KContact.Shape1(), KContact.Shape1());
+// TDF_Label RefLab1 = TNaming_Tool::Label(myLab, KContact.Shape1());
+// 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());
+// 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 TCollection_ExtendedString& Name)
+{
+ TDF_Label LabAnimation = myLab.NewChild();
+ TDataStd_Name::Set(LabAnimation, Name);
+
+ Standard_Real duration = double(KAnimation.Duration());
+
+ TDF_Label LabDuration = LabAnimation.NewChild();
+ TDataStd_Real::Set(LabDuration, duration);
+
+ TDF_Label LabNbSeq = LabAnimation.NewChild();
+ TDataStd_Integer::Set(LabNbSeq, KAnimation.NbSeq());
+
+ TDF_Label LabIsInLoop = LabAnimation.NewChild();
+ TDataStd_Integer::Set(LabIsInLoop, KAnimation.IsInLoop());
+
+ return LabAnimation;
+}
+
+
+//=======================================================================
+// function : GetAssembly()
+// purpose :
+//=======================================================================
+Standard_Boolean GEOMDS_Commands::GetAssembly(const TDF_Label& aLabel,
+ Kinematic_Assembly& returnAss)
+{
+ Kinematic_Assembly* Ass = new Kinematic_Assembly();
+ Handle(TDataStd_Name) anAttName;
+ if(!aLabel.FindAttribute(TDataStd_Name::GetID(), anAttName))
+ return false;
+ else {
+ TDF_ChildIterator it;
+ for(it.Initialize(aLabel, Standard_False); it.More(); it.Next()) {
+ TDF_Label L = it.Value();
+ Kinematic_Contact* aContact = new Kinematic_Contact();
+ Standard_Boolean test = 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();
+ Handle(TDataStd_Name) anAttName;
+ if(!aLabel.FindAttribute(TDataStd_Name::GetID(), anAttName))
+ return false;
+ else {
+ 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) anAttInteger;
+ 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(), anAttInteger)) {
+ Contact->Type(anAttInteger->Get());
+ }
+ if(i == 2 && L.FindAttribute(TNaming_NamedShape::GetID(), anAttTopo1)) {
+ Contact->Shape1(TNaming_Tool::GetShape(anAttTopo1));
+ }
+ if(i == 3 && L.FindAttribute(TNaming_NamedShape::GetID(), anAttTopo2)) {
+ Contact->Shape2(TNaming_Tool::GetShape(anAttTopo2));
+ }
+ if(i == 4 && 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 == 5 && 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 == 6 && 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 == 7 && 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 == 8 && L.FindAttribute(TDataStd_Real::GetID(), anAttReal)) {
+ Contact->Step(anAttReal->Get());
+ }
+ i++;
+ }
+ returnContact = *Contact;
+ return true;
+ }
+}
#endif
class TDF_Label;
class TopoDS_Shape;
+class Kinematic_Assembly;
+class Kinematic_Contact;
+class Kinematic_Animation;
class TCollection_ExtendedString;
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 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) ;
+
protected:
// Methods PROTECTED
#endif
#ifndef _GEOMDS_Commands_HeaderFile
#include "GEOMDS_Commands.hxx"
-#endif
\ No newline at end of file
+#endif
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 \
#include "SALOME_Selection.h"
+// IDL Headers
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SALOMEDS)
+#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
+
/* The object itself created in the static method 'GetOrCreateGEOMBase()' */
static GEOMContext* GeomGUI = 0;
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
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;
}
}
}
LIB_CLIENT_IDL = SALOME_Exception.idl \
SALOMEDS.idl \
- SALOMEDS_Attributes.idl
+ SALOMEDS_Attributes.idl \
+ GEOM_Kinematic.idl
LIB_SERVER_IDL =
//
//
//
-// File : GEOMBase_Tools.cxx
+// File : GEOMToolsGUI.cxx
// Author : Damien COQUERET
// Module : GEOM
// $Header:
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();
{
QAD_PyEditor* PyEditor = QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getPyEditor();
PyEditor->setText("from GEOM_usinggeom import *\n");
- PyEditor->setText(">>> ");
+ //PyEditor->setText(">>> ");
PyEditor->handleReturn();
break;
}
}
case 8033: // TRANSPARENCY - POPUP VIEWER
{
- OCCViewer_Viewer3d* v3d;
Handle(AIS_InteractiveContext) ic;
- if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) {
+ if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
- Handle (AIS_InteractiveContext) ic = v3d->getAISContext();
+ 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
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());
SALOMEDS::AttributeIOR_var anIOR;
SALOME_ListIteratorOfListIO It(Sel->StoredIObjects());
+ QAD_Operation* op = new SALOMEGUI_ImportOperation( QAD_Application::getDesktop()->getActiveStudy() );
+ op->start();
+ Standard_Boolean deleted = false;
for(;It.More();It.Next()) {
Handle(SALOME_InteractiveObject) IObject = It.Value();
if(IObject->hasEntry()) {
/* Erase objects in Study */
SALOMEDS::SObject_var obj = aStudy->FindObjectID(IObject->getEntry());
if(!obj->_is_nil()) {
- QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy());
- op->start();
aStudyBuilder->RemoveObject(obj);
- op->finish();
+ deleted = true;
}
} /* IObject->hasEntry() */
} /* more/next */
+ if (deleted) op->finish();
+ else op->abort();
+
/* Clear any previous selection */
Sel->ClearIObjects();
QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser();
anAttr = aStudyBuilder->FindOrCreateAttribute(father, "AttributePixMap");
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
aPixmap->SetPixMap( "ICON_OBJBROWSER_Geometry" );
+ aStudyBuilder->DefineComponentInstance( father, myGeom );
if (aLocked) aStudy->GetProperties()->SetLocked(true);
op->finish();
}
// if (aLocked) return false;
- aStudyBuilder->DefineComponentInstance( father, myGeom );
father->ComponentIOR(myGeomGUI->GetFatherior());
QString nameShape = QAD_Tools::getFileNameFromPath(file,false) + QString("_%1").arg(myGeomGUI->GetNbGeom()++);
//
//
//
-// File : GEOMBase_NbIsosDlg.cxx
+// File : GEOMToolsGUI_NbIsosDlg.cxx
// Author :
// Module : GEOM
// $Header:
#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);
//=================================================================================
-// 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
}
//
//
//
-// 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>
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;
};
-#endif // GEOMETRYGUI_NBISOSDLG_H
+#endif // GEOMTOOLSGUI_NBISOSDLG_H
//
//
//
-// File : GEOMBase_TransparencyDlg.cxx
+// File : GEOMToolsGUI_TransparencyDlg.cxx
// Author : Lucien PIGNOLONI
// Module : GEOM
#include "QAD_RightFrame.h"
#include "SALOME_ListIteratorOfListIO.hxx"
+#include "OCCViewer_Viewer3d.h"
#include <AIS_InteractiveContext.hxx>
#include <qframe.h>
#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" );
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();
//=================================================================================
-// 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
}
// function : ClickOnOk()
// purpose :
//=======================================================================
-void GEOMBase_TransparencyDlg::ClickOnOk()
+void GEOMToolsGUI_TransparencyDlg::ClickOnOk()
{
accept();
return;
// function : ClickOnClose()
// purpose :
//=======================================================================
-void GEOMBase_TransparencyDlg::ClickOnClose()
+void GEOMToolsGUI_TransparencyDlg::ClickOnClose()
{
accept();
return;
// 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
}
QApplication::setOverrideCursor(Qt::waitCursor);
+ OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
+ Handle (AIS_InteractiveContext) ic = v3d->getAISContext();
for(;It.More(); It.Next()) {
Handle(SALOME_InteractiveObject) IObject = It.Value();
Standard_Boolean found;
QApplication::restoreOverrideCursor();
return;
}
- this->myIc->SetTransparency(Shape, newValue / 10.0, false);
- myIc->Redisplay(Shape, Standard_False, Standard_True);
+ ic->SetTransparency(Shape, newValue / 10.0, false);
+ ic->Redisplay(Shape, Standard_False, Standard_True);
}
- myIc->UpdateCurrentViewer();
+ ic->UpdateCurrentViewer();
}
QApplication::restoreOverrideCursor();
return;
//
//
//
-// File : GEOMBase_TransparencyDlg.h
+// File : GEOMToolsGUI_TransparencyDlg.h
// Author : Lucien PIGNOLONI
// Module : GEOM
// $Header$
//=================================================================================
-// 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 :
void ValueHasChanged( int newValue ) ;
protected:
- QGridLayout* GEOMBase_TransparencyDlgLayout;
+ QGridLayout* GEOMToolsGUI_TransparencyDlgLayout;
QHBoxLayout* Layout1;
QHBoxLayout* Layout2;
};
GEOMToolsGUI_NbIsosDlg.h \
GEOMToolsGUI_TransparencyDlg.h
-LIB_CLIENT_IDL = SALOMEDS_Attributes.idl
+LIB_CLIENT_IDL = SALOMEDS_Attributes.idl GEOM_Kinematic.idl
LIB_SERVER_IDL =
SALOME_Exception.idl \
GEOM_Gen.idl \
GEOM_Shape.idl \
+ GEOM_Kinematic.idl \
SALOME_Component.idl
EXPORT_SHAREDPYSCRIPTS=\
#NRI : BugID 1682 : sg = SALOMEGUI_Swig()
#NRI : BugID 1682 : sg.updateObjBrowser(0)
- salome.sg.updateObjBrowser(0)
+# salome.sg.updateObjBrowser(0)
return id
def addToStudyInFather(aFather, aShape, aName):
addArguments( aShape )
#NRI : BugID 1682 : sg.updateObjBrowser(0)
- salome.sg.updateObjBrowser(0)
+# salome.sg.updateObjBrowser(0)
return id
# -----------------------------------------------------------------------------
GenerationGUI_FillingDlg.h \
GenerationGUI_PipeDlg.h
-LIB_CLIENT_IDL =
+LIB_CLIENT_IDL = GEOM_Kinematic.idl
LIB_SERVER_IDL =
--- /dev/null
+// 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(){}
+
+
+//=======================================================================
+// profile
+// command to build a profile
+//=======================================================================
+Kinematic_Animation::Kinematic_Animation(Kinematic_Assembly* Ass, TopoDS_Shape frame,
+ double duration, int nbseq, bool isinloop)
+{
+ myAss = Ass;
+ myFrame = frame;
+ myDuration = duration;
+ myNbSeq = nbseq;
+ myIsInLoop = isinloop;
+ IsCreated = false;
+ myNbAIS = 1;
+ 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 : Animate()
+// purpose :
+//=================================================================================
+void Kinematic_Animation::Animate(const Handle(AIS_InteractiveContext)& ic)
+{
+ bool IsOk = false;
+ for(int cpt = 1; cpt <= myIndexToShape.Extent(); cpt++) {
+ TopoDS_Shape myShape = myIndexToShape.FindKey(cpt);
+ if(myShape == myFrame)
+ IsOk = true;
+ }
+ if(!IsOk)
+ return;
+
+ myMovedShape.Clear();
+ myMovedShape.Add(myFrame);
+
+ IsCreated = false;
+ gp_Trsf aLoc;
+ GetNextShape(ic, aLoc, myFrame, 1);
+ IsCreated = true;
+
+ Handle(AIS_Shape) mySimulationShape;
+ mySimulationShape = new AIS_Shape(TopoDS_Shape());
+ mySimulationShape->Set(myFrame);
+ mySimulationShape->SetColor(Quantity_NOC_RED);
+ ic->Deactivate(mySimulationShape);
+ ic->Display(mySimulationShape, Standard_False);
+ ic->UpdateCurrentViewer();
+
+ double Step, Val;
+ Step = 1.0 / myNbSeq;
+ for(int i = 0; i <= myNbSeq; i++) {
+ Val = i * Step;
+
+ myMovedShape.Clear();
+ myMovedShape.Add(myFrame);
+
+ myNbAIS = 1;
+ GetNextShape(ic, aLoc, myFrame, Val);
+
+ ic->UpdateCurrentViewer();
+ usleep(myDuration / myNbSeq * 1e6);
+ }
+
+ ic->Erase(mySimulationShape, Standard_True, Standard_False);
+ ic->ClearPrs(mySimulationShape);
+
+ for(int i = 1; i <= myNbAIS; i++) {
+ Handle(AIS_Shape) myShape = Handle(AIS_Shape)::DownCast(ListOfAIS.Value(i));
+ ic->Erase(myShape, Standard_True, Standard_False);
+ ic->ClearPrs(myShape);
+ }
+
+ ic->UpdateCurrentViewer();
+
+ 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);
+ mySimulationShape->SetColor(Quantity_NOC_GREEN);
+ ic->Deactivate(mySimulationShape);
+ 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;
+
+ 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);
+
+ ic->Display(mySimulationShape, Standard_False);
+
+ myNbAIS++;
+ return;
+}
--- /dev/null
+// 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, bool isinloop);
+ ~Kinematic_Animation();
+
+private:
+ AIS_SequenceOfInteractive ListOfAIS;
+ TopTools_IndexedMapOfShape myIndexToShape;
+ TopTools_IndexedMapOfShape myMovedShape;
+ map <int, list <Kinematic_Contact *> > myStlMapofShapeListOfContact;
+ Kinematic_Assembly* myAss;
+ TopoDS_Shape myFrame;
+ double myDuration;
+ int myNbSeq;
+ int myNbAIS;
+ bool myIsInLoop;
+ bool IsCreated;
+
+public:
+ void SetMap();
+ void Animate(const Handle(AIS_InteractiveContext)& ic);
+ 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);
+
+ TopoDS_Shape& Frame(){return myFrame;};
+ double& Duration(){return myDuration;};
+ int& NbSeq(){return myNbSeq;};
+ bool& IsInLoop(){return myIsInLoop;};
+
+};
+
+#endif
--- /dev/null
+// 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);
+}
--- /dev/null
+// 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
--- /dev/null
+// 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;
+}
--- /dev/null
+// 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
--- /dev/null
+// 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;
+}
--- /dev/null
+// 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
--- /dev/null
+// 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() {}
--- /dev/null
+// 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
--- /dev/null
+// 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() {}
--- /dev/null
+// 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
--- /dev/null
+# 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@
--- /dev/null
+// 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 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)
+ break;
+ myKinematicGUI->RunAnimation(Sel);
+ 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;
+ }
+
+ Ass->AddContact(result);
+ 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, bool IsInLoop)
+{
+ try {
+ GEOM::GEOM_Animation_ptr result = myGeom->AddAnimation(Ass, Shape1, Duration, NbSeq, IsInLoop);
+ 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);
+ }
+ 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 aVal2 = myGeomTranslation->GetVal2();
+ double aVal3 = myGeomTranslation->GetVal3();
+ double aStep = aContact->GetStep();
+ double aVal1 = aStep * Val1 / 360;
+ myGeomTranslation->SetTranslation(aVal1, aVal2, aVal3);
+ }
+ }
+ catch(const SALOME::SALOME_Exception& S_ex) {
+ QtCatchCorbaException(S_ex);
+ }
+ return;
+}
+
+
+//=======================================================================
+// function : SetTranslation()
+// purpose :
+//=======================================================================
+void KinematicGUI::SetTranslation(GEOM::GEOM_Contact_ptr aContact,
+ double Val1, double Val2, double Val3)
+{
+ try {
+ GEOM::GEOM_Translation_var myGeomTranslation = GEOM::GEOM_Translation::_narrow(aContact->GetTranslation());
+ myGeomTranslation->SetTranslation(Val1, Val2, Val3);
+ 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 * Val1 / aStep;
+ myGeomRotation->SetRotation(aRot1, aRot2, aRot3, aVal1, aVal2, aVal3);
+ }
+ }
+ 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 : RunAnimation()
+// purpose :
+//=======================================================================
+void KinematicGUI::RunAnimation(SALOME_Selection* Sel)
+{
+ QApplication::setOverrideCursor(Qt::waitCursor);
+ Standard_Boolean testResult;
+ Handle(SALOME_InteractiveObject) IO = Sel->firstIObject();
+
+ GEOM::GEOM_Animation_var myGeomAnimation = myGeomBase->ConvertIOinAnimation(IO, testResult);
+ if(!testResult)
+ return;
+
+ Handle(AIS_InteractiveContext) ic;
+ OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
+ ic = v3d->getAISContext();
+
+ Kinematic_Animation* KAnimation = CreateAnimation(myGeomAnimation);
+ KAnimation->Animate(ic);
+ QApplication::restoreOverrideCursor();
+
+ return;
+}
+
+
+//=======================================================================
+// 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->GetVal1());
+ KContact->Translation().ValY(myTranslation->GetVal2());
+ KContact->Translation().ValZ(myTranslation->GetVal3());
+
+ 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();
+ bool IsInLoop = aAnimation->GetIsInLoop();
+
+ 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, IsInLoop);
+
+ return KAnimation;
+}
+
+
+//=====================================================================================
+// EXPORTED METHODS
+//=====================================================================================
+extern "C"
+{
+ bool OnGUIEvent(int theCommandID, QAD_Desktop* parent)
+ {return KinematicGUI::OnGUIEvent(theCommandID, parent);}
+}
--- /dev/null
+// 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 IsInLoop);
+
+ 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 Val1, double Val2, double Val3);
+
+ void RunAnimation(SALOME_Selection* Sel);
+
+ 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
--- /dev/null
+// 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
+}
--- /dev/null
+// 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
--- /dev/null
+/****************************************************************************
+** 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
+}
+
--- /dev/null
+/****************************************************************************
+** 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
--- /dev/null
+// 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_2Sel2Spin1Check.cxx
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+#include "KinematicGUI_2Sel2Spin1Check.h"
+
+#include <qlayout.h>
+#include <qspinbox.h>
+#include <qgroupbox.h>
+
+/*
+ * Constructs a KinematicGUI_2Sel2Spin1Check which is a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'
+ */
+KinematicGUI_2Sel2Spin1Check::KinematicGUI_2Sel2Spin1Check(QWidget* parent, const char* name, WFlags fl)
+ :KinematicGUI_2Sel2Spin1Check_QTD(parent, name, fl)
+{
+ SpinBox1->close(TRUE);
+ SpinBox2->close(TRUE);
+ SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
+ SpinBox_DY = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY");
+ Layout2->addWidget(SpinBox_DX, 0, 1);
+ Layout2->addWidget(SpinBox_DY, 1, 1);
+}
+
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+KinematicGUI_2Sel2Spin1Check::~KinematicGUI_2Sel2Spin1Check()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
--- /dev/null
+// 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_2Sel2Spin1Check.h
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+#ifndef KINEMATICGUI_2SEL2SPIN1CHECK_H
+#define KINEMATICGUI_2SEL2SPIN1CHECK_H
+
+#include "KinematicGUI_2Sel2Spin1Check_QTD.h"
+#include "DlgRef_SpinBox.h"
+
+class KinematicGUI_2Sel2Spin1Check : public KinematicGUI_2Sel2Spin1Check_QTD
+{
+ Q_OBJECT
+
+public:
+ KinematicGUI_2Sel2Spin1Check( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~KinematicGUI_2Sel2Spin1Check();
+
+ DlgRef_SpinBox* SpinBox_DX;
+ DlgRef_SpinBox* SpinBox_DY;
+
+};
+
+#endif // KINEMATICGUI_2SEL2SPIN1CHECK_H
--- /dev/null
+/****************************************************************************
+** Form implementation generated from reading ui file 'KinematicGUI_2Sel2Spin1Check_QTD.ui'
+**
+** Created: ven fév 6 18:56:14 2004
+** by: The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "KinematicGUI_2Sel2Spin1Check_QTD.h"
+
+#include <qvariant.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qspinbox.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/*
+ * Constructs a KinematicGUI_2Sel2Spin1Check_QTD which is a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'.
+ */
+KinematicGUI_2Sel2Spin1Check_QTD::KinematicGUI_2Sel2Spin1Check_QTD( QWidget* parent, const char* name, WFlags fl )
+ : QWidget( parent, name, fl )
+{
+ if ( !name )
+ setName( "KinematicGUI_2Sel2Spin1Check_QTD" );
+ resize( 129, 164 );
+ setCaption( trUtf8( "KinematicGUI_2Sel2Spin1Check_QTD" ) );
+ KinematicGUI_2Sel2Spin1Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "KinematicGUI_2Sel2Spin1Check_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");
+
+ CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" );
+ CheckButton1->setText( trUtf8( "" ) );
+
+ Layout1->addMultiCellWidget( CheckButton1, 3, 3, 0, 2 );
+
+ LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
+
+ Layout1->addWidget( LineEdit1, 0, 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 );
+
+ 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 );
+
+ Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
+
+ SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
+ SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
+
+ Layout2->addWidget( SpinBox2, 1, 1 );
+
+ SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
+ SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
+
+ Layout2->addWidget( SpinBox1, 0, 1 );
+
+ 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, 1, 0 );
+
+ TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
+ TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
+ TextLabel3->setText( trUtf8( "TL3" ) );
+
+ Layout2->addWidget( TextLabel3, 0, 0 );
+
+ Layout1->addMultiCellLayout( Layout2, 2, 2, 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 );
+ QSpacerItem* spacer = new QSpacerItem( 0, 120, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ Layout1->addItem( spacer, 4, 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 );
+
+ LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
+
+ Layout1->addWidget( LineEdit2, 1, 2 );
+
+ GroupBox1Layout->addLayout( Layout1, 0, 0 );
+
+ KinematicGUI_2Sel2Spin1Check_QTDLayout->addWidget( GroupBox1, 0, 0 );
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+KinematicGUI_2Sel2Spin1Check_QTD::~KinematicGUI_2Sel2Spin1Check_QTD()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
--- /dev/null
+/****************************************************************************
+** Form interface generated from reading ui file 'KinematicGUI_2Sel2Spin1Check_QTD.ui'
+**
+** Created: ven fév 6 18:56:14 2004
+** by: The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef KINEMATICGUI_2SEL2SPIN1CHECK_QTD_H
+#define KINEMATICGUI_2SEL2SPIN1CHECK_QTD_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QRadioButton;
+class QSpinBox;
+
+class KinematicGUI_2Sel2Spin1Check_QTD : public QWidget
+{
+ Q_OBJECT
+
+public:
+ KinematicGUI_2Sel2Spin1Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~KinematicGUI_2Sel2Spin1Check_QTD();
+
+ QGroupBox* GroupBox1;
+ QRadioButton* CheckButton1;
+ QLineEdit* LineEdit1;
+ QLabel* TextLabel1;
+ QPushButton* PushButton2;
+ QSpinBox* SpinBox2;
+ QSpinBox* SpinBox1;
+ QLabel* TextLabel4;
+ QLabel* TextLabel3;
+ QPushButton* PushButton1;
+ QLabel* TextLabel2;
+ QLineEdit* LineEdit2;
+
+
+protected:
+ QGridLayout* KinematicGUI_2Sel2Spin1Check_QTDLayout;
+ QGridLayout* GroupBox1Layout;
+ QGridLayout* Layout1;
+ QGridLayout* Layout2;
+};
+
+#endif // KINEMATICGUI_2SEL2SPIN1CHECK_QTD_H
--- /dev/null
+// 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
+}
--- /dev/null
+// 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
--- /dev/null
+/****************************************************************************
+** 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
+}
+
--- /dev/null
+/****************************************************************************
+** 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
--- /dev/null
+/****************************************************************************
+** 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
+}
+
--- /dev/null
+/****************************************************************************
+** 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
--- /dev/null
+// 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
+}
--- /dev/null
+// 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
--- /dev/null
+/****************************************************************************
+** 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
+}
+
--- /dev/null
+/****************************************************************************
+** 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
--- /dev/null
+// 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_AnimationDlg.cxx
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+using namespace std;
+#include "KinematicGUI_AnimationDlg.h"
+
+//=================================================================================
+// class : KinematicGUI_AnimationDlg()
+// purpose : Constructs a KinematicGUI_AnimationDlg 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_AnimationDlg::KinematicGUI_AnimationDlg(QWidget* parent, const char* name, KinematicGUI* theKinematicGUI, SALOME_Selection* Sel, bool modal, WFlags fl)
+ :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+ QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_ANIMATION")));
+ QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+ setCaption(tr("GEOM_ANIMATION_TITLE"));
+
+ /***************************************************************/
+ GroupConstructors->setTitle(tr("GEOM_ANIMATION"));
+ RadioButton1->setPixmap(image0);
+ RadioButton2->close(TRUE);
+ RadioButton3->close(TRUE);
+
+ Group1 = new KinematicGUI_2Sel2Spin1Check(this, "Group1");
+ Group1->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
+ Group1->TextLabel1->setText(tr("GEOM_ASSEMBLY"));
+ Group1->TextLabel2->setText(tr("GEOM_FRAME"));
+ Group1->TextLabel3->setText(tr("GEOM_DURATION"));
+ Group1->TextLabel4->setText(tr("GEOM_NBSEQ"));
+ Group1->CheckButton1->setText(tr("GEOM_IS_IN_LOOP"));
+ Group1->PushButton1->setPixmap(image1);
+ Group1->PushButton2->setPixmap(image1);
+
+ Layout1->addWidget(Group1, 1, 0);
+ /***************************************************************/
+
+ /* Initialisation */
+ myKinematicGUI = theKinematicGUI;
+ Init();
+}
+
+
+//=================================================================================
+// function : ~KinematicGUI_AnimationDlg()
+// purpose : Destroys the object and frees any allocated resources
+//=================================================================================
+KinematicGUI_AnimationDlg::~KinematicGUI_AnimationDlg()
+{
+ /* no need to delete child widgets, Qt does it all for us */
+}
+
+
+
+//=================================================================================
+// function : Init()
+// purpose :
+//=================================================================================
+void KinematicGUI_AnimationDlg::Init()
+{
+ /* init variables */
+ myEditCurrentArgument = Group1->LineEdit1;
+ myOkAssembly = myOkShape1 = false;
+
+ myDuration = 5.0;
+ myNbSeq = 50;
+ /* min, max, step and decimals for spin boxes & initial values */
+ Group1->SpinBox_DX->RangeStepAndValidator(0.001, 99999.999, 0.1, 3);
+ Group1->SpinBox_DY->RangeStepAndValidator(1, 99999.999, 5, 3);
+
+ Group1->SpinBox_DX->SetValue(myDuration);
+ Group1->SpinBox_DY->SetValue(myNbSeq);
+
+ Group1->CheckButton1->setEnabled(false);
+
+ /* signals and slots connections */
+ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+ connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+
+ connect(Group1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+ connect(Group1->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+
+ connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+ connect(Group1->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+ connect(Group1->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DX, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DY, SLOT(SetStep(double)));
+
+ connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+ /* displays Dialog */
+ Group1->show();
+ this->show();
+
+ return;
+}
+
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose :
+//=================================================================================
+void KinematicGUI_AnimationDlg::ClickOnOk()
+{
+ this->ClickOnApply();
+ ClickOnCancel();
+ return ;
+}
+
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose :
+//=================================================================================
+void KinematicGUI_AnimationDlg::ClickOnApply()
+{
+ QAD_Application::getDesktop()->putInfo(tr(""));
+
+ bool IsInLoop = Group1->CheckButton1->isChecked();
+ if(myOkAssembly && myOkShape1)
+ myKinematicGUI->AddAnimation(myGeomAssembly, myGeomShape1, myDuration, myNbSeq, IsInLoop);
+
+ return;
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose : Called when selection has changed
+//=================================================================================
+void KinematicGUI_AnimationDlg::SelectionIntoArgument()
+{
+ myEditCurrentArgument->setText("");
+ QString aString = "";
+
+ int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
+ if(nbSel != 1) {
+ if(myEditCurrentArgument == Group1->LineEdit1)
+ myOkAssembly = false;
+ else if( myEditCurrentArgument == Group1->LineEdit2)
+ myOkShape1 = false;
+ return;
+ }
+
+ /* nbSel == 1 */
+ Standard_Boolean testResult;
+ Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
+
+ if(myEditCurrentArgument == Group1->LineEdit1) {
+ myGeomAssembly = myGeomBase->ConvertIOinAssembly(IO, testResult);
+ if(!testResult)
+ return;
+ Group1->LineEdit1->setText(aString);
+ myOkAssembly = true;
+ }
+ else {
+ TopoDS_Shape S;
+ if(!myGeomBase->GetTopoFromSelection(mySelection, S))
+ return;
+
+ if(myEditCurrentArgument == Group1->LineEdit2) {
+ myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
+ if(!testResult)
+ return;
+ Group1->LineEdit2->setText(aString);
+ myOkShape1 = true;
+ }
+ }
+ return;
+}
+
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose :
+//=================================================================================
+void KinematicGUI_AnimationDlg::SetEditCurrentArgument()
+{
+ QPushButton* send = (QPushButton*)sender();
+
+ if(send == Group1->PushButton1) {
+ Group1->LineEdit1->setFocus();
+ myEditCurrentArgument = Group1->LineEdit1;
+ }
+ else if(send == Group1->PushButton2) {
+ Group1->LineEdit2->setFocus();
+ myEditCurrentArgument = Group1->LineEdit2;
+ }
+ SelectionIntoArgument();
+
+ return;
+}
+
+
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose :
+//=================================================================================
+void KinematicGUI_AnimationDlg::LineEditReturnPressed()
+{
+ QLineEdit* send = (QLineEdit*)sender();
+ if(send == Group1->LineEdit1)
+ myEditCurrentArgument = Group1->LineEdit1;
+ else if(send == Group1->LineEdit2)
+ myEditCurrentArgument = Group1->LineEdit2;
+ else
+ return;
+
+ GEOMBase_Skeleton::LineEditReturnPressed();
+ return;
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose :
+//=================================================================================
+void KinematicGUI_AnimationDlg::ActivateThisDialog()
+{
+ GEOMBase_Skeleton::ActivateThisDialog();
+ connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ return;
+}
+
+
+//=================================================================================
+// function : enterEvent()
+// purpose : when mouse enter onto the QWidget
+//=================================================================================
+void KinematicGUI_AnimationDlg::enterEvent(QEvent * e)
+{
+ if (GroupConstructors->isEnabled())
+ return;
+ this->ActivateThisDialog();
+ return;
+}
+
+
+//=================================================================================
+// function : ValueChangedInSpinBox()
+// purpose :
+//=================================================================================
+void KinematicGUI_AnimationDlg::ValueChangedInSpinBox(double newValue)
+{
+ DlgRef_SpinBox* send = (DlgRef_SpinBox*)sender();
+
+ if(send == Group1->SpinBox_DX)
+ myDuration = newValue;
+ else if(send == Group1->SpinBox_DY)
+ myNbSeq = newValue;
+
+ return;
+}
--- /dev/null
+// 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_AnimationDlg.h
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+#ifndef DIALOGBOX_ANIMATION_H
+#define DIALOGBOX_ANIMATION_H
+
+#include "GEOMBase_Skeleton.h"
+#include "KinematicGUI_2Sel2Spin1Check.h"
+
+#include "KinematicGUI.h"
+
+//=================================================================================
+// class : KinematicGUI_AnimationDlg
+// purpose :
+//=================================================================================
+class KinematicGUI_AnimationDlg : public GEOMBase_Skeleton
+{
+ Q_OBJECT
+
+public:
+ KinematicGUI_AnimationDlg(QWidget* parent = 0, const char* name = 0, KinematicGUI* theKinematicGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+ ~KinematicGUI_AnimationDlg();
+
+private:
+ void Init();
+ void enterEvent(QEvent * e);
+
+ KinematicGUI* myKinematicGUI;
+
+ GEOM::GEOM_Assembly_var myGeomAssembly;
+ GEOM::GEOM_Shape_var myGeomShape1; /* is myShape1 */
+ bool myOkAssembly;
+ bool myOkShape1; /* to check when arguments are defined */
+ double myDuration;
+ int myNbSeq;
+
+ KinematicGUI_2Sel2Spin1Check* Group1;
+
+private slots:
+ void ClickOnOk();
+ void ClickOnApply();
+ void SetEditCurrentArgument();
+ void SelectionIntoArgument();
+ void LineEditReturnPressed();
+ void ActivateThisDialog();
+ void ValueChangedInSpinBox(double newValue);
+
+};
+
+#endif // DIALOGBOX_ANIMATION_H
--- /dev/null
+// 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_ContactDlg.cxx
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+using namespace std;
+#include "KinematicGUI_ContactDlg.h"
+
+//=================================================================================
+// class : KinematicGUI_ContactDlg()
+// purpose : Constructs a KinematicGUI_ContactDlg 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_ContactDlg::KinematicGUI_ContactDlg(QWidget* parent, const char* name, KinematicGUI* theKinematicGUI, SALOME_Selection* Sel, int type, bool modal, WFlags fl)
+ :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+ QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_CONTACT")));
+ QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+ setCaption(tr("GEOM_CONTACT_TITLE"));
+
+ /***************************************************************/
+ GroupConstructors->setTitle(tr("GEOM_CONTACT"));
+ RadioButton1->setPixmap(image0);
+ RadioButton2->close(TRUE);
+ RadioButton3->close(TRUE);
+
+ Group1 = new KinematicGUI_3Sel1List_QTD(this, "Group1");
+ Group1->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
+ Group1->TextLabel1->setText(tr("GEOM_ASSEMBLY"));
+ Group1->TextLabel2->setText(tr("GEOM_TYPE"));
+ Group1->TextLabel3->setText(tr("GEOM_OBJECT_I").arg("1"));
+ Group1->TextLabel4->setText(tr("GEOM_OBJECT_I").arg("2"));
+ Group1->PushButton1->setPixmap(image1);
+ Group1->PushButton2->setPixmap(image1);
+ Group1->PushButton3->setPixmap(image1);
+
+ Layout1->addWidget(Group1, 1, 0);
+ /***************************************************************/
+
+ /* Initialisation */
+ myKinematicGUI = theKinematicGUI;
+ myType = type;
+ Init();
+}
+
+
+//=================================================================================
+// function : ~KinematicGUI_ContactDlg()
+// purpose : Destroys the object and frees any allocated resources
+//=================================================================================
+KinematicGUI_ContactDlg::~KinematicGUI_ContactDlg()
+{
+ /* no need to delete child widgets, Qt does it all for us */
+}
+
+
+
+//=================================================================================
+// function : Init()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactDlg::Init()
+{
+ /* init variables */
+ myEditCurrentArgument = Group1->LineEdit1;
+ myOkAssembly = myOkShape1 = myOkShape2 = false;
+
+ /* type for sub shape selection */
+ Group1->ComboBox1->insertItem("Embedding");
+ Group1->ComboBox1->insertItem("Pivot");
+ Group1->ComboBox1->insertItem("Slide");
+ Group1->ComboBox1->insertItem("Sliding Pivot");
+ Group1->ComboBox1->insertItem("Spherical");
+ Group1->ComboBox1->insertItem("Plane");
+ Group1->ComboBox1->insertItem("Annular");
+ Group1->ComboBox1->insertItem("Rectilinear");
+ Group1->ComboBox1->insertItem("Ponctual");
+
+ Group1->ComboBox1->setCurrentItem(myType);
+
+ /* signals and slots connections */
+ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+ connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+
+ connect(Group1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+ connect(Group1->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+ connect(Group1->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+
+ connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+ connect(Group1->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+ connect(Group1->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+ connect(Group1->ComboBox1, SIGNAL(activated(int)), this, SLOT(ComboTextChanged()));
+
+ connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+ /* displays Dialog */
+ Group1->show();
+ this->show();
+
+ return;
+}
+
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactDlg::ClickOnOk()
+{
+ this->ClickOnApply();
+ ClickOnCancel();
+ return ;
+}
+
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactDlg::ClickOnApply()
+{
+ QAD_Application::getDesktop()->putInfo(tr(""));
+
+ if(myOkAssembly && myOkShape1 && myOkShape2)
+ myKinematicGUI->AddContact(myGeomAssembly, myGeomShape1, myGeomShape2, myType);
+
+ return;
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose : Called when selection has changed
+//=================================================================================
+void KinematicGUI_ContactDlg::SelectionIntoArgument()
+{
+ myEditCurrentArgument->setText("");
+ QString aString = "";
+
+ int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
+ if(nbSel != 1) {
+ if(myEditCurrentArgument == Group1->LineEdit1)
+ myOkAssembly = false;
+ else if( myEditCurrentArgument == Group1->LineEdit2)
+ myOkShape1 = false;
+ else if( myEditCurrentArgument == Group1->LineEdit3)
+ myOkShape2 = false;
+ return;
+ }
+
+ /* nbSel == 1 */
+ Standard_Boolean testResult;
+ Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
+
+ if(myEditCurrentArgument == Group1->LineEdit1) {
+ myGeomAssembly = myGeomBase->ConvertIOinAssembly(IO, testResult);
+ if(!testResult)
+ return;
+ Group1->LineEdit1->setText(aString);
+ myOkAssembly = true;
+ }
+ else {
+ TopoDS_Shape S;
+ if(!myGeomBase->GetTopoFromSelection(mySelection, S))
+ return;
+
+ if(myEditCurrentArgument == Group1->LineEdit2) {
+ myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
+ if(!testResult)
+ return;
+ Group1->LineEdit2->setText(aString);
+ myOkShape1 = true;
+ }
+ else if(myEditCurrentArgument == Group1->LineEdit3) {
+ myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
+ if(!testResult)
+ return;
+ Group1->LineEdit3->setText(aString);
+ myOkShape2 = true;
+ }
+ }
+ return;
+}
+
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactDlg::SetEditCurrentArgument()
+{
+ QPushButton* send = (QPushButton*)sender();
+
+ if(send == Group1->PushButton1) {
+ Group1->LineEdit1->setFocus();
+ myEditCurrentArgument = Group1->LineEdit1;
+ }
+ else if(send == Group1->PushButton2) {
+ Group1->LineEdit2->setFocus();
+ myEditCurrentArgument = Group1->LineEdit2;
+ }
+ else if(send == Group1->PushButton3) {
+ Group1->LineEdit3->setFocus();
+ myEditCurrentArgument = Group1->LineEdit3;
+ }
+ SelectionIntoArgument();
+
+ return;
+}
+
+
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactDlg::LineEditReturnPressed()
+{
+ QLineEdit* send = (QLineEdit*)sender();
+ if(send == Group1->LineEdit1)
+ myEditCurrentArgument = Group1->LineEdit1;
+ else if(send == Group1->LineEdit2)
+ myEditCurrentArgument = Group1->LineEdit2;
+ else if(send == Group1->LineEdit3)
+ myEditCurrentArgument = Group1->LineEdit3;
+ else
+ return;
+
+ GEOMBase_Skeleton::LineEditReturnPressed();
+ return;
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactDlg::ActivateThisDialog()
+{
+ GEOMBase_Skeleton::ActivateThisDialog();
+ connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ return;
+}
+
+
+//=================================================================================
+// function : enterEvent()
+// purpose : when mouse enter onto the QWidget
+//=================================================================================
+void KinematicGUI_ContactDlg::enterEvent(QEvent * e)
+{
+ if (GroupConstructors->isEnabled())
+ return;
+ this->ActivateThisDialog();
+ return;
+}
+
+
+//=================================================================================
+// function : ComboTextChanged()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactDlg::ComboTextChanged()
+{
+ myType = Group1->ComboBox1->currentItem();
+ return;
+}
--- /dev/null
+// 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_ContactDlg.h
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+#ifndef DIALOGBOX_CONTACT_H
+#define DIALOGBOX_CONTACT_H
+
+#include "GEOMBase_Skeleton.h"
+#include "KinematicGUI_3Sel1List_QTD.h"
+
+#include "KinematicGUI.h"
+
+//=================================================================================
+// class : KinematicGUI_ContactDlg
+// purpose :
+//=================================================================================
+class KinematicGUI_ContactDlg : public GEOMBase_Skeleton
+{
+ Q_OBJECT
+
+public:
+ KinematicGUI_ContactDlg(QWidget* parent = 0, const char* name = 0, KinematicGUI* theKinematicGUI = 0, SALOME_Selection* Sel = 0, int type = 0, bool modal = FALSE, WFlags fl = 0);
+ ~KinematicGUI_ContactDlg();
+
+private:
+ void Init();
+ void enterEvent(QEvent * e);
+
+ KinematicGUI* myKinematicGUI;
+
+ GEOM::GEOM_Assembly_var myGeomAssembly;
+ GEOM::GEOM_Shape_var myGeomShape1; /* is myShape1 */
+ GEOM::GEOM_Shape_var myGeomShape2; /* is myShape2 */
+ bool myOkAssembly;
+ bool myOkShape1;
+ bool myOkShape2; /* to check when arguments are defined */
+ int myType;
+
+ KinematicGUI_3Sel1List_QTD* Group1;
+
+private slots:
+ void ClickOnOk();
+ void ClickOnApply();
+ void SetEditCurrentArgument();
+ void SelectionIntoArgument();
+ void LineEditReturnPressed();
+ void ActivateThisDialog();
+ void ComboTextChanged();
+
+};
+
+#endif // DIALOGBOX_CONTACT_H
--- /dev/null
+// 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_ContactHDlg.cxx
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+using namespace std;
+#include "KinematicGUI_ContactHDlg.h"
+
+//=================================================================================
+// class : KinematicGUI_ContactHDlg()
+// purpose : Constructs a KinematicGUI_ContactHDlg 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_ContactHDlg::KinematicGUI_ContactHDlg(QWidget* parent, const char* name, KinematicGUI* theKinematicGUI, SALOME_Selection* Sel, bool modal, WFlags fl)
+ :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+ QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_CONTACT")));
+ QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+ setCaption(tr("GEOM_CONTACT_TITLE"));
+
+ /***************************************************************/
+ GroupConstructors->setTitle(tr("GEOM_CONTACT"));
+ RadioButton1->setPixmap(image0);
+ RadioButton2->close(TRUE);
+ RadioButton3->close(TRUE);
+
+ Group1 = new KinematicGUI_3Sel1Spin(this, "Group1");
+ Group1->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
+ Group1->TextLabel1->setText(tr("GEOM_ASSEMBLY"));
+ Group1->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("1"));
+ Group1->TextLabel3->setText(tr("GEOM_OBJECT_I").arg("2"));
+ Group1->TextLabel4->setText(tr("GEOM_STEP"));
+ Group1->PushButton1->setPixmap(image1);
+ Group1->PushButton2->setPixmap(image1);
+ Group1->PushButton3->setPixmap(image1);
+
+ Layout1->addWidget(Group1, 1, 0);
+ /***************************************************************/
+
+ /* Initialisation */
+ myKinematicGUI = theKinematicGUI;
+ Init();
+}
+
+
+//=================================================================================
+// function : ~KinematicGUI_ContactHDlg()
+// purpose : Destroys the object and frees any allocated resources
+//=================================================================================
+KinematicGUI_ContactHDlg::~KinematicGUI_ContactHDlg()
+{
+ /* no need to delete child widgets, Qt does it all for us */
+}
+
+
+
+//=================================================================================
+// function : Init()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactHDlg::Init()
+{
+ /* init variables */
+ myEditCurrentArgument = Group1->LineEdit1;
+ myOkAssembly = myOkShape1 = myOkShape2 = false;
+
+ myStep = 1.0;
+ /* min, max, step and decimals for spin boxes & initial values */
+ Group1->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, 0.1, 3);
+ Group1->SpinBox_DX->SetValue(myStep);
+
+ /* signals and slots connections */
+ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+ connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+
+ connect(Group1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+ connect(Group1->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+ connect(Group1->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+
+ connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+ connect(Group1->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+ connect(Group1->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+ connect(Group1->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DX, SLOT(SetStep(double)));
+
+ connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+ /* displays Dialog */
+ Group1->show();
+ this->show();
+
+ return;
+}
+
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactHDlg::ClickOnOk()
+{
+ this->ClickOnApply();
+ ClickOnCancel();
+ return ;
+}
+
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactHDlg::ClickOnApply()
+{
+ QAD_Application::getDesktop()->putInfo(tr(""));
+
+ if(myOkAssembly && myOkShape1 && myOkShape2)
+ myKinematicGUI->AddContact(myGeomAssembly, myGeomShape1, myGeomShape2, 9, myStep);
+
+ return;
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose : Called when selection has changed
+//=================================================================================
+void KinematicGUI_ContactHDlg::SelectionIntoArgument()
+{
+ myEditCurrentArgument->setText("");
+ QString aString = "";
+
+ int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
+ if(nbSel != 1) {
+ if(myEditCurrentArgument == Group1->LineEdit1)
+ myOkAssembly = false;
+ else if( myEditCurrentArgument == Group1->LineEdit2)
+ myOkShape1 = false;
+ else if( myEditCurrentArgument == Group1->LineEdit3)
+ myOkShape2 = false;
+ return;
+ }
+
+ /* nbSel == 1 */
+ Standard_Boolean testResult;
+ Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
+
+ if(myEditCurrentArgument == Group1->LineEdit1) {
+ myGeomAssembly = myGeomBase->ConvertIOinAssembly(IO, testResult);
+ if(!testResult)
+ return;
+ Group1->LineEdit1->setText(aString);
+ myOkAssembly = true;
+ }
+ else {
+ TopoDS_Shape S;
+ if(!myGeomBase->GetTopoFromSelection(mySelection, S))
+ return;
+
+ if(myEditCurrentArgument == Group1->LineEdit2) {
+ myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
+ if(!testResult)
+ return;
+ Group1->LineEdit2->setText(aString);
+ myOkShape1 = true;
+ }
+ else if(myEditCurrentArgument == Group1->LineEdit3) {
+ myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
+ if(!testResult)
+ return;
+ Group1->LineEdit3->setText(aString);
+ myOkShape2 = true;
+ }
+ }
+ return;
+}
+
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactHDlg::SetEditCurrentArgument()
+{
+ QPushButton* send = (QPushButton*)sender();
+
+ if(send == Group1->PushButton1) {
+ Group1->LineEdit1->setFocus();
+ myEditCurrentArgument = Group1->LineEdit1;
+ }
+ else if(send == Group1->PushButton2) {
+ Group1->LineEdit2->setFocus();
+ myEditCurrentArgument = Group1->LineEdit2;
+ }
+ else if(send == Group1->PushButton3) {
+ Group1->LineEdit3->setFocus();
+ myEditCurrentArgument = Group1->LineEdit3;
+ }
+ SelectionIntoArgument();
+
+ return;
+}
+
+
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactHDlg::LineEditReturnPressed()
+{
+ QLineEdit* send = (QLineEdit*)sender();
+ if(send == Group1->LineEdit1)
+ myEditCurrentArgument = Group1->LineEdit1;
+ else if(send == Group1->LineEdit2)
+ myEditCurrentArgument = Group1->LineEdit2;
+ else if(send == Group1->LineEdit3)
+ myEditCurrentArgument = Group1->LineEdit3;
+ else
+ return;
+
+ GEOMBase_Skeleton::LineEditReturnPressed();
+ return;
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactHDlg::ActivateThisDialog()
+{
+ GEOMBase_Skeleton::ActivateThisDialog();
+ connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ return;
+}
+
+
+//=================================================================================
+// function : enterEvent()
+// purpose : when mouse enter onto the QWidget
+//=================================================================================
+void KinematicGUI_ContactHDlg::enterEvent(QEvent * e)
+{
+ if (GroupConstructors->isEnabled())
+ return;
+ this->ActivateThisDialog();
+ return;
+}
+
+
+//=================================================================================
+// function : ValueChangedInSpinBox()
+// purpose :
+//=================================================================================
+void KinematicGUI_ContactHDlg::ValueChangedInSpinBox(double newValue)
+{
+ myStep = newValue;
+ return;
+}
--- /dev/null
+// 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_ContactHDlg.h
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+#ifndef DIALOGBOX_CONTACTH_H
+#define DIALOGBOX_CONTACTH_H
+
+#include "GEOMBase_Skeleton.h"
+#include "KinematicGUI_3Sel1Spin.h"
+
+#include "KinematicGUI.h"
+
+//=================================================================================
+// class : KinematicGUI_ContactHDlg
+// purpose :
+//=================================================================================
+class KinematicGUI_ContactHDlg : public GEOMBase_Skeleton
+{
+ Q_OBJECT
+
+public:
+ KinematicGUI_ContactHDlg(QWidget* parent = 0, const char* name = 0, KinematicGUI* theKinematicGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+ ~KinematicGUI_ContactHDlg();
+
+private:
+ void Init();
+ void enterEvent(QEvent * e);
+
+ KinematicGUI* myKinematicGUI;
+
+ GEOM::GEOM_Assembly_var myGeomAssembly;
+ GEOM::GEOM_Shape_var myGeomShape1; /* is myShape1 */
+ GEOM::GEOM_Shape_var myGeomShape2; /* is myShape2 */
+ bool myOkAssembly;
+ bool myOkShape1;
+ bool myOkShape2; /* to check when arguments are defined */
+ double myStep;
+
+ KinematicGUI_3Sel1Spin* Group1;
+
+private slots:
+ void ClickOnOk();
+ void ClickOnApply();
+ void SetEditCurrentArgument();
+ void SelectionIntoArgument();
+ void LineEditReturnPressed();
+ void ActivateThisDialog();
+ void ValueChangedInSpinBox(double newValue);
+
+};
+
+#endif // DIALOGBOX_CONTACT_H
--- /dev/null
+// 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_PositionDlg.cxx
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+using namespace std;
+#include "KinematicGUI_PositionDlg.h"
+
+//=================================================================================
+// class : KinematicGUI_PositionDlg()
+// purpose : Constructs a KinematicGUI_PositionDlg 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_PositionDlg::KinematicGUI_PositionDlg(QWidget* parent, const char* name, KinematicGUI* theKinematicGUI, SALOME_Selection* Sel, bool modal, WFlags fl)
+ :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+ //QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_COMMON")));
+ //QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+ setCaption(tr("GEOM_KPOSITION_TITLE"));
+
+ /***************************************************************/
+ GroupConstructors->setTitle(tr("GEOM_KPOSITION"));
+ //RadioButton1->setPixmap(image0);
+ RadioButton2->close(TRUE);
+ RadioButton3->close(TRUE);
+
+ Group1 = new KinematicGUI_12Spin(this, "Group1");
+ Group1->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
+ Group1->TextLabel1->setText(tr("GEOM_POS"));
+ Group1->TextLabel2->setText(tr("GEOM_X"));
+ Group1->TextLabel3->setText(tr("GEOM_Y"));
+ Group1->TextLabel4->setText(tr("GEOM_Z"));
+ Group1->TextLabel5->setText(tr("GEOM_VX"));
+ Group1->TextLabel6->setText(tr("GEOM_X"));
+ Group1->TextLabel7->setText(tr("GEOM_Y"));
+ Group1->TextLabel8->setText(tr("GEOM_Z"));
+ Group1->TextLabel9->setText(tr("GEOM_VY"));
+ Group1->TextLabel10->setText(tr("GEOM_X"));
+ Group1->TextLabel11->setText(tr("GEOM_Y"));
+ Group1->TextLabel12->setText(tr("GEOM_Z"));
+ Group1->TextLabel13->setText(tr("GEOM_VZ"));
+ Group1->TextLabel14->setText(tr("GEOM_X"));
+ Group1->TextLabel15->setText(tr("GEOM_Y"));
+ Group1->TextLabel16->setText(tr("GEOM_Z"));
+
+ Layout1->addWidget(Group1, 1, 0);
+ /***************************************************************/
+
+ /* Initialisation */
+ myKinematicGUI = theKinematicGUI;
+ Init();
+}
+
+
+//=================================================================================
+// function : ~KinematicGUI_PositionDlg()
+// purpose : Destroys the object and frees any allocated resources
+//=================================================================================
+KinematicGUI_PositionDlg::~KinematicGUI_PositionDlg()
+{
+ /* no need to delete child widgets, Qt does it all for us */
+}
+
+
+
+//=================================================================================
+// function : Init()
+// purpose :
+//=================================================================================
+void KinematicGUI_PositionDlg::Init()
+{
+ /* Get setting of step value from file configuration */
+ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep");
+ double step = St.toDouble();
+ double specificstep = 1.0;
+
+ Group1->SpinBox_11->RangeStepAndValidator(-99999.999, 99999.999, step, 3);
+ Group1->SpinBox_12->RangeStepAndValidator(-99999.999, 99999.999, step, 3);
+ Group1->SpinBox_13->RangeStepAndValidator(-99999.999, 99999.999, step, 3);
+ Group1->SpinBox_21->RangeStepAndValidator(-99999.999, 99999.999, specificstep, 3);
+ Group1->SpinBox_22->RangeStepAndValidator(-99999.999, 99999.999, specificstep, 3);
+ Group1->SpinBox_23->RangeStepAndValidator(-99999.999, 99999.999, specificstep, 3);
+ Group1->SpinBox_31->RangeStepAndValidator(-99999.999, 99999.999, specificstep, 3);
+ Group1->SpinBox_32->RangeStepAndValidator(-99999.999, 99999.999, specificstep, 3);
+ Group1->SpinBox_33->RangeStepAndValidator(-99999.999, 99999.999, specificstep, 3);
+ Group1->SpinBox_41->RangeStepAndValidator(-99999.999, 99999.999, specificstep, 3);
+ Group1->SpinBox_42->RangeStepAndValidator(-99999.999, 99999.999, specificstep, 3);
+ Group1->SpinBox_43->RangeStepAndValidator(-99999.999, 99999.999, specificstep, 3);
+
+ Standard_Boolean testResult;
+ Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
+ myGeomContact = myGeomBase->ConvertIOinContact(IO, testResult);
+ if(!testResult)
+ ClickOnCancel();
+
+ myGeomPosition = GEOM::GEOM_Position::_narrow(myGeomContact->GetPosition());
+
+ P0 = myGeomPosition->GetOrigin();
+ VX = myGeomPosition->GetVX();
+ VY = myGeomPosition->GetVY();
+ VZ = myGeomPosition->GetVZ();
+
+ Group1->SpinBox_11->SetValue(P0.x);
+ Group1->SpinBox_12->SetValue(P0.y);
+ Group1->SpinBox_13->SetValue(P0.z);
+ Group1->SpinBox_21->SetValue(VX.PS.x);
+ Group1->SpinBox_22->SetValue(VX.PS.y);
+ Group1->SpinBox_23->SetValue(VX.PS.z);
+ Group1->SpinBox_31->SetValue(VY.PS.x);
+ Group1->SpinBox_32->SetValue(VY.PS.y);
+ Group1->SpinBox_33->SetValue(VY.PS.z);
+ Group1->SpinBox_41->SetValue(VZ.PS.x);
+ Group1->SpinBox_42->SetValue(VZ.PS.y);
+ Group1->SpinBox_43->SetValue(VZ.PS.z);
+
+ SetEnabledValues();
+
+ /* signals and slots connections */
+ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+ connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+
+ connect(Group1->SpinBox_11, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_12, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_13, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_21, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_22, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_23, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_31, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_32, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_33, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_41, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_42, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_43, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_11, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_12, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_13, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_21, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_22, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_23, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_31, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_32, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_33, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_41, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_42, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_43, SLOT(SetStep(double)));
+
+ /* displays Dialog */
+ Group1->show();
+ this->show();
+ return;
+}
+
+
+//=================================================================================
+// function : InitValues()
+// purpose :
+//=================================================================================
+void KinematicGUI_PositionDlg::SetEnabledValues()
+{
+ int type = myGeomContact->GetType();
+
+ if(type == 1 || type == 3 || type == 5 || type == 9) { //PIVOT || SLIDING PIVOT || PLANE || HELICOIDAL
+ Group1->SpinBox_31->setEnabled(false);
+ Group1->SpinBox_32->setEnabled(false);
+ Group1->SpinBox_33->setEnabled(false);
+ Group1->SpinBox_41->setEnabled(false);
+ Group1->SpinBox_42->setEnabled(false);
+ Group1->SpinBox_43->setEnabled(false);
+ Group1->TextLabel9->setEnabled(false);
+ Group1->TextLabel10->setEnabled(false);
+ Group1->TextLabel11->setEnabled(false);
+ Group1->TextLabel12->setEnabled(false);
+ Group1->TextLabel13->setEnabled(false);
+ Group1->TextLabel14->setEnabled(false);
+ Group1->TextLabel15->setEnabled(false);
+ Group1->TextLabel16->setEnabled(false);
+ }
+ else if(type == 7) { //RECTILINEAR
+ Group1->SpinBox_41->setEnabled(false);
+ Group1->SpinBox_42->setEnabled(false);
+ Group1->SpinBox_43->setEnabled(false);
+ Group1->TextLabel13->setEnabled(false);
+ Group1->TextLabel14->setEnabled(false);
+ Group1->TextLabel15->setEnabled(false);
+ Group1->TextLabel16->setEnabled(false);
+ }
+
+ return;
+}
+
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose :
+//=================================================================================
+void KinematicGUI_PositionDlg::ClickOnOk()
+{
+ this->ClickOnApply();
+ ClickOnCancel();
+ return ;
+}
+
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose :
+//=================================================================================
+void KinematicGUI_PositionDlg::ClickOnApply()
+{
+ QAD_Application::getDesktop()->putInfo(tr(""));
+
+ myKinematicGUI->SetPosition(myGeomContact, P0, VX, VY, VZ);
+
+ return;
+}
+
+
+//=================================================================================
+// function : ValueChangedInSpinBox()
+// purpose :
+//=================================================================================
+void KinematicGUI_PositionDlg::ValueChangedInSpinBox(double newValue)
+{
+ DlgRef_SpinBox* send = (DlgRef_SpinBox*)sender();
+
+ if(send == Group1->SpinBox_11)
+ P0.x = newValue;
+ else if(send == Group1->SpinBox_12)
+ P0.y = newValue;
+ else if(send == Group1->SpinBox_13)
+ P0.z = newValue;
+ else if(send == Group1->SpinBox_21)
+ VX.PS.x = newValue;
+ else if(send == Group1->SpinBox_22)
+ VX.PS.y = newValue;
+ else if(send == Group1->SpinBox_23)
+ VX.PS.z = newValue;
+ else if(send == Group1->SpinBox_31)
+ VY.PS.x = newValue;
+ else if(send == Group1->SpinBox_32)
+ VY.PS.y = newValue;
+ else if(send == Group1->SpinBox_33)
+ VY.PS.z = newValue;
+ else if(send == Group1->SpinBox_41)
+ VZ.PS.x = newValue;
+ else if(send == Group1->SpinBox_42)
+ VZ.PS.y = newValue;
+ else if(send == Group1->SpinBox_43)
+ VZ.PS.z = newValue;
+
+ return;
+}
--- /dev/null
+// 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_PositionDlg.h
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+#ifndef DIALOGBOX_POSITION_H
+#define DIALOGBOX_POSITION_H
+
+#include "GEOMBase_Skeleton.h"
+#include "KinematicGUI_12Spin.h"
+
+#include "KinematicGUI.h"
+
+//=================================================================================
+// class : KinematicGUI_PositionDlg
+// purpose :
+//=================================================================================
+class KinematicGUI_PositionDlg : public GEOMBase_Skeleton
+{
+ Q_OBJECT
+
+public:
+ KinematicGUI_PositionDlg(QWidget* parent = 0, const char* name = 0, KinematicGUI* theKinematicGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+ ~KinematicGUI_PositionDlg();
+
+private:
+ void Init();
+ void SetEnabledValues();
+
+ KinematicGUI* myKinematicGUI;
+
+ GEOM::GEOM_Contact_var myGeomContact;
+ GEOM::GEOM_Position_var myGeomPosition;
+
+ GEOM::PointStruct P0;
+ GEOM::DirStruct VX;
+ GEOM::DirStruct VY;
+ GEOM::DirStruct VZ;
+
+ KinematicGUI_12Spin* Group1;
+
+private slots:
+ void ClickOnOk();
+ void ClickOnApply();
+ void ValueChangedInSpinBox(double newValue);
+
+};
+
+#endif // DIALOGBOX_TRANSLATION_H
--- /dev/null
+// 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_RotationDlg.cxx
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+using namespace std;
+#include "KinematicGUI_RotationDlg.h"
+
+//=================================================================================
+// class : KinematicGUI_RotationDlg()
+// purpose : Constructs a KinematicGUI_RotationDlg 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_RotationDlg::KinematicGUI_RotationDlg(QWidget* parent, const char* name, KinematicGUI* theKinematicGUI, SALOME_Selection* Sel, bool modal, WFlags fl)
+ :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+ //QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_COMMON")));
+ //QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+ setCaption(tr("GEOM_KROTATION_TITLE"));
+
+ /***************************************************************/
+ GroupConstructors->setTitle(tr("GEOM_KROTATION"));
+ //RadioButton1->setPixmap(image0);
+ RadioButton2->close(TRUE);
+ RadioButton3->close(TRUE);
+
+ Group1 = new KinematicGUI_3List3Spin(this, "Group1");
+ Group1->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
+ Group1->TextLabel1->setText(tr("GEOM_1ROT"));
+ Group1->TextLabel2->setText(tr("GEOM_VALUE"));
+ Group1->TextLabel3->setText(tr("GEOM_2ROT"));
+ Group1->TextLabel4->setText(tr("GEOM_VALUE"));
+ Group1->TextLabel5->setText(tr("GEOM_3ROT"));
+ Group1->TextLabel6->setText(tr("GEOM_VALUE"));
+
+ Layout1->addWidget(Group1, 1, 0);
+ /***************************************************************/
+
+ /* Initialisation */
+ myKinematicGUI = theKinematicGUI;
+ Init();
+}
+
+
+//=================================================================================
+// function : ~KinematicGUI_RotationDlg()
+// purpose : Destroys the object and frees any allocated resources
+//=================================================================================
+KinematicGUI_RotationDlg::~KinematicGUI_RotationDlg()
+{
+ /* no need to delete child widgets, Qt does it all for us */
+}
+
+
+
+//=================================================================================
+// function : Init()
+// purpose :
+//=================================================================================
+void KinematicGUI_RotationDlg::Init()
+{
+ double step = 5.0;
+
+ Group1->SpinBox_DX->RangeStepAndValidator(-99999.999, 99999.999, step, 3);
+ Group1->SpinBox_DY->RangeStepAndValidator(-99999.999, 99999.999, step, 3);
+ Group1->SpinBox_DZ->RangeStepAndValidator(-99999.999, 99999.999, step, 3);
+
+ Standard_Boolean testResult;
+ Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
+ myGeomContact = myGeomBase->ConvertIOinContact(IO, testResult);
+ if(!testResult)
+ ClickOnCancel();
+
+ myGeomRotation = GEOM::GEOM_Rotation::_narrow(myGeomContact->GetRotation());
+
+ myVal1 = myGeomRotation->GetVal1();
+ myVal2 = myGeomRotation->GetVal2();
+ myVal3 = myGeomRotation->GetVal3();
+
+ Group1->SpinBox_DX->SetValue(myVal1);
+ Group1->SpinBox_DY->SetValue(myVal2);
+ Group1->SpinBox_DZ->SetValue(myVal3);
+
+ myRot1 = myGeomRotation->GetRot1();
+ myRot2 = myGeomRotation->GetRot2();
+ myRot3 = myGeomRotation->GetRot3();
+
+ Group1->ComboBox1->insertItem("X");
+ Group1->ComboBox1->insertItem("Y");
+ Group1->ComboBox1->insertItem("Z");
+ Group1->ComboBox2->insertItem("Y");
+ Group1->ComboBox2->insertItem("Z");
+ Group1->ComboBox3->insertItem("Z");
+
+ Group1->ComboBox1->setCurrentItem(myRot1 - 1);
+
+ InitValues();
+ SetEnabledValues();
+
+ /* signals and slots connections */
+ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+ connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+
+ connect(Group1->ComboBox1, SIGNAL(activated(int)), this, SLOT(ComboTextChanged()));
+ connect(Group1->ComboBox2, SIGNAL(activated(int)), this, SLOT(ComboTextChanged()));
+ connect(Group1->ComboBox3, SIGNAL(activated(int)), this, SLOT(ComboTextChanged()));
+
+ connect(Group1->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DX, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DY, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DZ, SLOT(SetStep(double)));
+
+ /* displays Dialog */
+ Group1->show();
+ this->show();
+
+ return;
+}
+
+
+//=================================================================================
+// function : InitValues()
+// purpose :
+//=================================================================================
+void KinematicGUI_RotationDlg::InitValues()
+{
+ if(myRot1 == 1) {
+ Group1->ComboBox2->changeItem("Y", 0);
+ Group1->ComboBox2->changeItem("Z", 1);
+ if(myRot2 == 2) {
+ Group1->ComboBox3->changeItem("Z", 0);
+ Group1->ComboBox2->setCurrentItem(0);
+ }
+ else if(myRot2 == 3) {
+ Group1->ComboBox3->changeItem("Y", 0);
+ Group1->ComboBox2->setCurrentItem(1);
+ }
+ }
+ else if(myRot1 == 2) {
+ Group1->ComboBox2->changeItem("X", 0);
+ Group1->ComboBox2->changeItem("Z", 1);
+ if(myRot2 == 1) {
+ Group1->ComboBox3->changeItem("Z", 0);
+ Group1->ComboBox2->setCurrentItem(0);
+ }
+ else if(myRot2 == 3) {
+ Group1->ComboBox3->changeItem("X", 0);
+ Group1->ComboBox2->setCurrentItem(1);
+ }
+ }
+ else if(myRot1 == 3) {
+ Group1->ComboBox2->changeItem("X", 0);
+ Group1->ComboBox2->changeItem("Y", 1);
+ if(myRot2 == 1) {
+ Group1->ComboBox3->changeItem("Y", 0);
+ Group1->ComboBox2->setCurrentItem(0);
+ }
+ else if(myRot2 == 2) {
+ Group1->ComboBox3->changeItem("X", 0);
+ Group1->ComboBox2->setCurrentItem(1);
+ }
+ }
+ return;
+}
+
+
+//=================================================================================
+// function : InitValues()
+// purpose :
+//=================================================================================
+void KinematicGUI_RotationDlg::SetEnabledValues()
+{
+ int type = myGeomContact->GetType();
+
+ if(type == 1 || type == 3 || type == 5 || type == 9) { //PIVOT || SLIDING PIVOT || PLANE || HELICOIDAL
+ Group1->TextLabel3->setEnabled(false);
+ Group1->ComboBox2->setEnabled(false);
+ Group1->TextLabel4->setEnabled(false);
+ Group1->SpinBox_DY->setEnabled(false);
+ Group1->TextLabel5->setEnabled(false);
+ Group1->ComboBox3->setEnabled(false);
+ Group1->TextLabel6->setEnabled(false);
+ Group1->SpinBox_DZ->setEnabled(false);
+ }
+ else if(type == 7) { //RECTILINEAR
+ Group1->TextLabel5->setEnabled(false);
+ Group1->ComboBox3->setEnabled(false);
+ Group1->TextLabel6->setEnabled(false);
+ Group1->SpinBox_DZ->setEnabled(false);
+ }
+
+ return;
+}
+
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose :
+//=================================================================================
+void KinematicGUI_RotationDlg::ClickOnOk()
+{
+ this->ClickOnApply();
+ ClickOnCancel();
+ return;
+}
+
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose :
+//=================================================================================
+void KinematicGUI_RotationDlg::ClickOnApply()
+{
+ QAD_Application::getDesktop()->putInfo(tr(""));
+
+ myKinematicGUI->SetRotation(myGeomContact, myRot1, myRot2, myRot3,
+ myVal1, myVal2, myVal3);
+
+ return;
+}
+
+
+//=================================================================================
+// function : ComboTextChanged()
+// purpose :
+//=================================================================================
+void KinematicGUI_RotationDlg::ComboTextChanged()
+{
+ QComboBox* send = (QComboBox*)sender();
+
+ if(send == Group1->ComboBox1) {
+ myRot1 = Group1->ComboBox1->currentItem() + 1;
+ if(myRot1 == 1) { //X
+ myRot2 = 2; //Y
+ myRot3 = 3; //Z
+ } else if(myRot1 == 2) { //Y
+ myRot2 = 1;//X
+ myRot3 = 3;//Z
+ } else if(myRot1 == 3) { //Z
+ myRot2 = 1;//X
+ myRot3 = 2;//Y
+ }
+ } else if(send == Group1->ComboBox2) {
+ if(myRot1 == 1) {
+ if(Group1->ComboBox2->currentItem() == 0) {
+ myRot2 = 2;
+ myRot3 = 3;
+ } else if(Group1->ComboBox2->currentItem() == 1) {
+ myRot2 = 3;
+ myRot3 = 2;
+ }
+ } else if(myRot1 == 2) {
+ if(Group1->ComboBox2->currentItem() == 0) {
+ myRot2 = 1;
+ myRot3 = 3;
+ } else if(Group1->ComboBox2->currentItem() == 1) {
+ myRot2 = 3;
+ myRot3 = 1;
+ }
+ } else if(myRot1 == 3) {
+ if(Group1->ComboBox2->currentItem() == 0) {
+ myRot2 = 1;
+ myRot3 = 2;
+ } else if(Group1->ComboBox2->currentItem() == 1) {
+ myRot2 = 2;
+ myRot3 = 1;
+ }
+ }
+ }
+
+ InitValues();
+ return;
+}
+
+
+//=================================================================================
+// function : ValueChangedInSpinBox()
+// purpose :
+//=================================================================================
+void KinematicGUI_RotationDlg::ValueChangedInSpinBox(double newValue)
+{
+ DlgRef_SpinBox* send = (DlgRef_SpinBox*)sender();
+
+ if(send == Group1->SpinBox_DX)
+ myVal1 = newValue;
+ else if(send == Group1->SpinBox_DY)
+ myVal2 = newValue;
+ else if(send == Group1->SpinBox_DZ)
+ myVal3 = newValue;
+
+ return;
+}
--- /dev/null
+// 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_RotationDlg.h
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+#ifndef DIALOGBOX_ROTATION_H
+#define DIALOGBOX_ROTATION_H
+
+#include "GEOMBase_Skeleton.h"
+#include "KinematicGUI_3List3Spin.h"
+
+#include "KinematicGUI.h"
+
+//=================================================================================
+// class : KinematicGUI_RotationDlg
+// purpose :
+//=================================================================================
+class KinematicGUI_RotationDlg : public GEOMBase_Skeleton
+{
+ Q_OBJECT
+
+public:
+ KinematicGUI_RotationDlg(QWidget* parent = 0, const char* name = 0, KinematicGUI* theKinematicGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+ ~KinematicGUI_RotationDlg();
+
+private:
+ void Init();
+ void InitValues();
+ void SetEnabledValues();
+
+ KinematicGUI* myKinematicGUI;
+
+ GEOM::GEOM_Contact_var myGeomContact;
+ GEOM::GEOM_Rotation_var myGeomRotation;
+
+ int myRot1;
+ int myRot2;
+ int myRot3;
+
+ double myVal1;
+ double myVal2;
+ double myVal3;
+
+ KinematicGUI_3List3Spin* Group1;
+
+private slots:
+ void ClickOnOk();
+ void ClickOnApply();
+ void ComboTextChanged();
+ void ValueChangedInSpinBox(double newValue);
+
+};
+
+#endif // DIALOGBOX_ROTATION_H
--- /dev/null
+// 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_TranslationDlg.cxx
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+using namespace std;
+#include "KinematicGUI_TranslationDlg.h"
+
+//=================================================================================
+// class : KinematicGUI_TranslationDlg()
+// purpose : Constructs a KinematicGUI_TranslationDlg 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_TranslationDlg::KinematicGUI_TranslationDlg(QWidget* parent, const char* name, KinematicGUI* theKinematicGUI, SALOME_Selection* Sel, bool modal, WFlags fl)
+ :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+ //QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_COMMON")));
+ //QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+ setCaption(tr("GEOM_KTRANSLATION_TITLE"));
+
+ /***************************************************************/
+ GroupConstructors->setTitle(tr("GEOM_KTRANSLATION"));
+ //RadioButton1->setPixmap(image0);
+ RadioButton2->close(TRUE);
+ RadioButton3->close(TRUE);
+
+ Group1 = new DlgRef_3Spin(this, "Group1");
+ Group1->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
+ Group1->TextLabel1->setText(tr("GEOM_X"));
+ Group1->TextLabel2->setText(tr("GEOM_Y"));
+ Group1->TextLabel3->setText(tr("GEOM_Z"));
+
+ Layout1->addWidget(Group1, 1, 0);
+ /***************************************************************/
+
+ /* Initialisation */
+ myKinematicGUI = theKinematicGUI;
+ Init();
+}
+
+
+//=================================================================================
+// function : ~KinematicGUI_TranslationDlg()
+// purpose : Destroys the object and frees any allocated resources
+//=================================================================================
+KinematicGUI_TranslationDlg::~KinematicGUI_TranslationDlg()
+{
+ /* no need to delete child widgets, Qt does it all for us */
+}
+
+
+
+//=================================================================================
+// function : Init()
+// purpose :
+//=================================================================================
+void KinematicGUI_TranslationDlg::Init()
+{
+ /* Get setting of step value from file configuration */
+ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep");
+ double step = St.toDouble();
+
+ Group1->SpinBox_DX->RangeStepAndValidator(-99999.999, 99999.999, step, 3);
+ Group1->SpinBox_DY->RangeStepAndValidator(-99999.999, 99999.999, step, 3);
+ Group1->SpinBox_DZ->RangeStepAndValidator(-99999.999, 99999.999, step, 3);
+
+ Standard_Boolean testResult;
+ Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
+ myGeomContact = myGeomBase->ConvertIOinContact(IO, testResult);
+ if(!testResult)
+ ClickOnCancel();
+
+ myGeomTranslation = GEOM::GEOM_Translation::_narrow(myGeomContact->GetTranslation());
+
+ myVal1 = myGeomTranslation->GetVal1();
+ myVal2 = myGeomTranslation->GetVal2();
+ myVal3 = myGeomTranslation->GetVal3();
+
+ Group1->SpinBox_DX->SetValue(myVal1);
+ Group1->SpinBox_DY->SetValue(myVal2);
+ Group1->SpinBox_DZ->SetValue(myVal3);
+
+ SetEnabledValues();
+
+ /* signals and slots connections */
+ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+ connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+
+ connect(Group1->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(Group1->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DX, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DY, SLOT(SetStep(double)));
+ connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DZ, SLOT(SetStep(double)));
+
+ /* displays Dialog */
+ Group1->show();
+ this->show();
+
+ return;
+}
+
+
+//=================================================================================
+// function : InitValues()
+// purpose :
+//=================================================================================
+void KinematicGUI_TranslationDlg::SetEnabledValues()
+{
+ int type = myGeomContact->GetType();
+
+ if(type == 2 || type == 3 || type == 6 || type == 9) { //SLIDE || SLIDING PIVOT || ANNULAR || HELICOIDAL
+ Group1->TextLabel2->setEnabled(false);
+ Group1->SpinBox_DY->setEnabled(false);
+ Group1->TextLabel3->setEnabled(false);
+ Group1->SpinBox_DZ->setEnabled(false);
+ }
+ else if(type == 7) { //RECTILINEAR
+ Group1->TextLabel2->setEnabled(false);
+ Group1->SpinBox_DY->setEnabled(false);
+ }
+ else if(type == 5 || type == 8) { //PLANE || PONCTUAL
+ Group1->TextLabel1->setEnabled(false);
+ Group1->SpinBox_DX->setEnabled(false);
+ }
+
+ return;
+}
+
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose :
+//=================================================================================
+void KinematicGUI_TranslationDlg::ClickOnOk()
+{
+ this->ClickOnApply();
+ ClickOnCancel();
+ return ;
+}
+
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose :
+//=================================================================================
+void KinematicGUI_TranslationDlg::ClickOnApply()
+{
+ QAD_Application::getDesktop()->putInfo(tr(""));
+
+ myKinematicGUI->SetTranslation(myGeomContact, myVal1, myVal2, myVal3);
+
+ return;
+}
+
+
+//=================================================================================
+// function : ValueChangedInSpinBox()
+// purpose :
+//=================================================================================
+void KinematicGUI_TranslationDlg::ValueChangedInSpinBox(double newValue)
+{
+ DlgRef_SpinBox* send = (DlgRef_SpinBox*)sender();
+
+ if(send == Group1->SpinBox_DX)
+ myVal1 = newValue;
+ else if(send == Group1->SpinBox_DY)
+ myVal2 = newValue;
+ else if(send == Group1->SpinBox_DZ)
+ myVal3 = newValue;
+
+ return;
+}
--- /dev/null
+// 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_TranslationDlg.h
+// Author : Damien COQUERET
+// Module : GEOM
+// $Header:
+
+#ifndef DIALOGBOX_TRANSLATION_H
+#define DIALOGBOX_TRANSLATION_H
+
+#include "GEOMBase_Skeleton.h"
+#include "DlgRef_3Spin.h"
+
+#include "KinematicGUI.h"
+
+//=================================================================================
+// class : KinematicGUI_TranslationDlg
+// purpose :
+//=================================================================================
+class KinematicGUI_TranslationDlg : public GEOMBase_Skeleton
+{
+ Q_OBJECT
+
+public:
+ KinematicGUI_TranslationDlg(QWidget* parent = 0, const char* name = 0, KinematicGUI* theKinematicGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+ ~KinematicGUI_TranslationDlg();
+
+private:
+ void Init();
+ void SetEnabledValues();
+
+ KinematicGUI* myKinematicGUI;
+
+ GEOM::GEOM_Contact_var myGeomContact;
+ GEOM::GEOM_Translation_var myGeomTranslation;
+
+ double myVal1;
+ double myVal2;
+ double myVal3;
+
+ DlgRef_3Spin* Group1;
+
+private slots:
+ void ClickOnOk();
+ void ClickOnApply();
+ void ValueChangedInSpinBox(double newValue);
+
+};
+
+#endif // DIALOGBOX_TRANSLATION_H
--- /dev/null
+# GEOM KINETICGUI :
+#
+# 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@
+
+# header files
+EXPORT_HEADERS=
+
+# Libraries targets
+LIB = libKinematicGUI.la
+
+LIB_SRC = KinematicGUI.cxx \
+ KinematicGUI_3Sel1List_QTD.cxx \
+ KinematicGUI_3Sel1Spin_QTD.cxx \
+ KinematicGUI_3List3Spin_QTD.cxx \
+ KinematicGUI_12Spin_QTD.cxx \
+ KinematicGUI_2Sel2Spin1Check_QTD.cxx \
+ KinematicGUI_3Sel1Spin.cxx \
+ KinematicGUI_3List3Spin.cxx \
+ KinematicGUI_12Spin.cxx \
+ KinematicGUI_2Sel2Spin1Check.cxx \
+ KinematicGUI_ContactDlg.cxx \
+ KinematicGUI_ContactHDlg.cxx \
+ KinematicGUI_PositionDlg.cxx \
+ KinematicGUI_RotationDlg.cxx \
+ KinematicGUI_TranslationDlg.cxx \
+ KinematicGUI_AnimationDlg.cxx
+
+LIB_MOC = \
+ KinematicGUI.h \
+ KinematicGUI_3Sel1List_QTD.h \
+ KinematicGUI_3Sel1Spin_QTD.h \
+ KinematicGUI_3List3Spin_QTD.h \
+ KinematicGUI_12Spin_QTD.h \
+ KinematicGUI_2Sel2Spin1Check_QTD.h \
+ KinematicGUI_3Sel1Spin.h \
+ KinematicGUI_3List3Spin.h \
+ KinematicGUI_12Spin.h \
+ KinematicGUI_2Sel2Spin1Check.h \
+ KinematicGUI_ContactDlg.h \
+ KinematicGUI_ContactHDlg.h \
+ KinematicGUI_PositionDlg.h \
+ KinematicGUI_RotationDlg.h \
+ KinematicGUI_TranslationDlg.h \
+ KinematicGUI_AnimationDlg.h
+
+LIB_CLIENT_IDL = GEOM_Kinematic.idl
+
+LIB_SERVER_IDL =
+
+# additionnal information to compil and link file
+
+CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
+CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
+
+LDFLAGS += -lGEOMBase -lGEOMKinematic
+
+@CONCLUDE@
--- /dev/null
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>KinematicGUI_12Spin_QTD</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>KinematicGUI_12Spin_QTD</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>396</width>
+ <height>139</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>KinematicGUI_12Spin_QTD</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="3" column="3">
+ <property name="name">
+ <cstring>TextLabel15</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL15</string>
+ </property>
+ </widget>
+ <spacer row="4" column="4">
+ <property name="name">
+ <cstring>Spacer7</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>80</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="3" column="1">
+ <property name="name">
+ <cstring>TextLabel14</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL14</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="4">
+ <property name="name">
+ <cstring>SpinBox5</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="3">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL3</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="3">
+ <property name="name">
+ <cstring>TextLabel11</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL11</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="5">
+ <property name="name">
+ <cstring>TextLabel8</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL8</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="5">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL4</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="3">
+ <property name="name">
+ <cstring>TextLabel7</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL7</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="5">
+ <property name="name">
+ <cstring>TextLabel12</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL12</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel13</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL13</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="3" column="6">
+ <property name="name">
+ <cstring>SpinBox12</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="3" column="4">
+ <property name="name">
+ <cstring>SpinBox11</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="2" column="6">
+ <property name="name">
+ <cstring>SpinBox9</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="2" column="4">
+ <property name="name">
+ <cstring>SpinBox8</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="2" column="2">
+ <property name="name">
+ <cstring>SpinBox7</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="6">
+ <property name="name">
+ <cstring>SpinBox6</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="0" column="6">
+ <property name="name">
+ <cstring>SpinBox3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="5">
+ <property name="name">
+ <cstring>TextLabel16</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL16</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL1</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="1">
+ <property name="name">
+ <cstring>TextLabel10</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL10</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="2">
+ <property name="name">
+ <cstring>SpinBox4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="1">
+ <property name="name">
+ <cstring>TextLabel6</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL6</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="3" column="2">
+ <property name="name">
+ <cstring>SpinBox10</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="0" column="4">
+ <property name="name">
+ <cstring>SpinBox2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="1">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL2</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel9</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL9</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel5</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL5</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="0" column="2">
+ <property name="name">
+ <cstring>SpinBox1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
--- /dev/null
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>KinematicGUI_2Sel2Spin1Check_QTD</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>KinematicGUI_2Sel2Spin1Check_QTD</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>129</width>
+ <height>164</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>KinematicGUI_2Sel2Spin1Check_QTD</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QRadioButton" row="3" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>CheckButton1</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="2">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL1</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>PushButton2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>Layout2</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QSpinBox" row="1" column="1">
+ <property name="name">
+ <cstring>SpinBox2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>SpinBox1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL4</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL3</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>PushButton1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="4" column="2">
+ <property name="name">
+ <cstring>Spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>120</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL2</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="2">
+ <property name="name">
+ <cstring>LineEdit2</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
--- /dev/null
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>KinematicGUI_3List3Spin_QTD</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>KinematicGUI_3List3Spin_QTD</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>279</width>
+ <height>111</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>KinematicGUI_3List3Spin_QTD</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="0" column="2">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL2</string>
+ </property>
+ </widget>
+ <spacer row="3" column="3">
+ <property name="name">
+ <cstring>Spacer7</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>100</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox" row="0" column="3">
+ <property name="name">
+ <cstring>SpinBox1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="2">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL4</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL3</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL1</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="2" column="1">
+ <property name="name">
+ <cstring>ComboBox3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="3">
+ <property name="name">
+ <cstring>SpinBox2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="2" column="3">
+ <property name="name">
+ <cstring>SpinBox3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="2">
+ <property name="name">
+ <cstring>TextLabel6</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL6</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>ComboBox1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>ComboBox2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel5</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL5</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
--- /dev/null
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>KinematicGUI_3Sel1List_QTD</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>KinematicGUI_3Sel1List_QTD</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>129</width>
+ <height>145</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>KinematicGUI_3Sel1List_QTD</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer row="4" column="2">
+ <property name="name">
+ <cstring>Spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>90</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>PushButton2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL1</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL4</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="2">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>PushButton1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL3</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="3" column="1">
+ <property name="name">
+ <cstring>PushButton3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="2">
+ <property name="name">
+ <cstring>ComboBox1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="2">
+ <property name="name">
+ <cstring>LineEdit2</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="3" column="2">
+ <property name="name">
+ <cstring>LineEdit3</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL2</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
--- /dev/null
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>KinematicGUI_3Sel1Spin_QTD</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>KinematicGUI_3Sel1Spin_QTD</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>129</width>
+ <height>147</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>KinematicGUI_3Sel1Spin_QTD</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLineEdit" row="0" column="2">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>PushButton3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>Layout2</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL4</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>SpinBox1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL3</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="2">
+ <property name="name">
+ <cstring>LineEdit3</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="2">
+ <property name="name">
+ <cstring>LineEdit2</cstring>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>PushButton2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL2</string>
+ </property>
+ </widget>
+ <spacer row="4" column="2">
+ <property name="name">
+ <cstring>Spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>100</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>TL1</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>PushButton1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
--- /dev/null
+#!/bin/sh
+
+#uic -o KinematicGUI_3Sel1List_QTD.h KinematicGUI_3Sel1List_QTD.ui
+#uic -o KinematicGUI_3Sel1List_QTD.cxx -impl KinematicGUI_3Sel1List_QTD.h KinematicGUI_3Sel1List_QTD.ui
+
+#uic -o KinematicGUI_3Sel1Spin_QTD.h KinematicGUI_3Sel1Spin_QTD.ui
+#uic -o KinematicGUI_3Sel1Spin_QTD.cxx -impl KinematicGUI_3Sel1Spin_QTD.h KinematicGUI_3Sel1Spin_QTD.ui
+
+#uic -o KinematicGUI_3List3Spin_QTD.h KinematicGUI_3List3Spin_QTD.ui
+#uic -o KinematicGUI_3List3Spin_QTD.cxx -impl KinematicGUI_3List3Spin_QTD.h KinematicGUI_3List3Spin_QTD.ui
+
+#uic -o KinematicGUI_12Spin_QTD.h KinematicGUI_12Spin_QTD.ui
+#uic -o KinematicGUI_12Spin_QTD.cxx -impl KinematicGUI_12Spin_QTD.h KinematicGUI_12Spin_QTD.ui
+
+uic -o KinematicGUI_2Sel2Spin1Check_QTD.h KinematicGUI_2Sel2Spin1Check_QTD.ui
+uic -o KinematicGUI_2Sel2Spin1Check_QTD.cxx -impl KinematicGUI_2Sel2Spin1Check_QTD.h KinematicGUI_2Sel2Spin1Check_QTD.ui
@COMMENCE@
-SUBDIRS = OBJECT ARCHIMEDE PARTITION SKETCHER GEOMDS GEOM GEOMClient GEOMFiltersSelection DlgRef GEOMContext GEOMBase DisplayGUI GEOMToolsGUI BasicGUI PrimitiveGUI GenerationGUI EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI RepairGUI MeasureGUI GEOMGUI GEOM_SWIG
+SUBDIRS = OBJECT ARCHIMEDE PARTITION SKETCHER KINEMATIC GEOMDS GEOM GEOMClient GEOMFiltersSelection DlgRef GEOMContext GEOMBase DisplayGUI GEOMToolsGUI BasicGUI PrimitiveGUI GenerationGUI EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI RepairGUI KinematicGUI MeasureGUI GEOMGUI GEOM_SWIG
@MODULE@
MeasureGUI_WhatisDlg.h \
MeasureGUI_CheckShapeDlg.h
-LIB_CLIENT_IDL =
+LIB_CLIENT_IDL = GEOM_Kinematic.idl
LIB_SERVER_IDL =
myDrawer->ShadingAspect()->Aspect()->SetDistinguishOn();
Graphic3d_MaterialAspect aMatAspect;
- aMatAspect.SetAmbient( 1 );
- aMatAspect.SetDiffuse( 0 );
- aMatAspect.SetEmissive( 0 );
- aMatAspect.SetShininess(1 );
- aMatAspect.SetSpecular( 0 );
+ aMatAspect.SetAmbient( 0.5 );
+ aMatAspect.SetDiffuse( 0.5 );
+ aMatAspect.SetEmissive( 0.5 );
+ aMatAspect.SetShininess(0.5 );
+ aMatAspect.SetSpecular( 0.5 );
myDrawer->ShadingAspect()->Aspect()->SetFrontMaterial(aMatAspect);
myDrawer->ShadingAspect()->Aspect()->SetBackMaterial(Graphic3d_NOM_JADE);
this->ishighlighted = false;
this->subshape = false;
+ this->myIsInfinite = false;
}
GEOM_Actor::~GEOM_Actor()
// Mapper creating function
//-------------------------------------------------------------
void GEOM_Actor::CreateMapper(int theMode) {
+ this->myIsInfinite = myShape.Infinite();
if(myShape.ShapeType() == TopAbs_VERTEX) {
gp_Pnt aPnt = BRep_Tool::Pnt(TopoDS::Vertex(myShape));
this->SetPosition(aPnt.X(),aPnt.Y(),aPnt.Z());
}
if(!ishighlighted) {
- if(myDisplayMode >= 1) {
+ if ( ispreselected )
+ this->Property = PreviewProperty;
+ else if(myDisplayMode >= 1) {
// SHADING
this->Property = ShadingProperty;
}
this->Property = WireframeProperty;
}
- if ( ispreselected )
- this->Property = PreviewProperty;
}
this->Property->Render(this, ren);
// Color
void SetColor(float r,float g,float b);
void GetColor(float& r,float& g,float& b);
-
+
+ virtual bool IsInfinite() {return myIsInfinite;}
protected:
GEOM_Actor();
private:
bool subshape;
+ bool myIsInfinite;
TopoDS_Shape myShape;
double deflection;
{
// Shading like default OCC material
FaceProp->SetRepresentationToSurface();
- FaceProp->SetInterpolation(1);
+ FaceProp->SetInterpolationToGouraud();
FaceProp->SetAmbient(1.0);
FaceProp->SetDiffuse(1.0);
FaceProp->SetSpecular(0.4);
// Wireframe for Preview edge
EdgePVProp->SetRepresentationToWireframe();
- EdgePVProp->SetAmbientColor(0, 1, 1);
- EdgePVProp->SetDiffuseColor(0, 1, 1);
- EdgePVProp->SetSpecularColor(0, 1, 1);
+ EdgePVProp->SetAmbientColor(1, 1, 0);
+ EdgePVProp->SetDiffuseColor(1, 1, 0);
+ EdgePVProp->SetSpecularColor(1, 1, 0);
// Wireframe for vertex
VertexProp->SetRepresentationToWireframe();
OperationGUI_FilletDlg.h \
OperationGUI_ChamferDlg.h
-LIB_CLIENT_IDL =
+LIB_CLIENT_IDL = GEOM_Kinematic.idl
LIB_SERVER_IDL =
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
if(nbSel < 1) {
- if(myEditCurrentArgument == GroupPoints->LineEdit1)
+ if(myEditCurrentArgument == GroupPoints->LineEdit1) {
+ myListShapes.length(0);
myOkListShapes = false;
- else if(myEditCurrentArgument == GroupPoints->LineEdit2)
+ } else if(myEditCurrentArgument == GroupPoints->LineEdit2) {
+ myListTools.length(0);
myOkListTools = false;
- else if(myEditCurrentArgument == GroupPoints->LineEdit3)
+ } else if(myEditCurrentArgument == GroupPoints->LineEdit3) {
+ myListRemoveInside.length(0);
myOkKeepShape = false;
- else if(myEditCurrentArgument == GroupPoints->LineEdit4)
+ } else if(myEditCurrentArgument == GroupPoints->LineEdit4) {
+ myListKeepInside.length(0);
myOkRemoveShape = false;
+ }
return;
}
if (!OnE1 && !OnE2 && !theF.IsNull())
{
- // analitically find vertices E1 and E2 must pass trough
+ // if 3 faces intersects each others, 3 new edges on them must pass
+ // through one vertex but real intersection points of each
+ // pair of edges are sometimes more far than a tolerance.
+ // Try to analitically find vertices that E1 and E2 must pass trough
TopoDS_Shape F1 = getOtherShape( theF, AsDes->Ascendant( E1 ));
TopoDS_Shape F2 = getOtherShape( theF, AsDes->Ascendant( E2 ));
- if (!F1.IsNull() && !F2.IsNull())
+ if (!F1.IsNull() && !F2.IsNull() && !F1.IsSame( F2 ))
{
OnE1 = findVOnE ( theV, E1, E2, F1, F2, AsDes, V1 );
OnE2 = findVOnE ( theV, E2, E1, F1, F2, AsDes, V2 );
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_SphericalSurface.hxx>
#include <Geom_Surface.hxx>
-#include <Geom_ToroidalSurface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Precision.hxx>
#include <TColStd_MapOfInteger.hxx>
// avoid intersecting faces of one shape
TopoDS_Shape S1;
if (FaceShapeMap.IsBound(F1)) S1 = FaceShapeMap.Find(F1);
- // avoid intersecting faces sharing vertices, suppose they belong to
- // shapes sharing same faces
- TopTools_IndexedMapOfShape VM;
- TopExp::MapShapes( F1, TopAbs_VERTEX, VM);
+
+ // to filter faces sharing an edge
+ TopTools_IndexedMapOfShape EM;
+ TopExp::MapShapes( F1, TopAbs_EDGE, EM);
TColStd_ListIteratorOfListOfInteger itLI = BOS.Compare(F1);
for (; itLI.More(); itLI.Next()) {
if (!S1.IsNull() && S1.IsSame(S2))
continue; // descendants of one shape
- TopExp_Explorer expV (F2, TopAbs_VERTEX);
- for ( ; expV.More(); expV.Next())
- if (VM.Contains( expV.Current() ))
+ TopExp_Explorer expE (F2, TopAbs_EDGE);
+ for ( ; expE.More(); expE.Next())
+ if (EM.Contains( expE.Current() ))
break;
- if (expV.More())
- continue; // faces have a common edge
-
+ if (expE.More())
+ {
+ // faces have a common edge, check if they are a tool and a face
+ // generated by the tool in another shape; in that case they are
+ // to be intersected
+ TopLoc_Location L1, L2;
+ Handle(Geom_Surface) S1 = BRep_Tool::Surface( F1, L1 );
+ Handle(Geom_Surface) S2 = BRep_Tool::Surface( F2, L2 );
+ if ( S1 != S2 || L1 != L2 )
+ continue;
+ }
+
F1.Orientation(TopAbs_FORWARD);
F2.Orientation(TopAbs_FORWARD);
FacesPartition(F1,F2);
// UPeriodic, sometimes it is in domain but nontheless it has
// wrong position.
// Check pcurve position by 3D point
- if (S->IsKind(STANDARD_TYPE( Geom_SphericalSurface )) ||
- S->IsKind(STANDARD_TYPE( Geom_ToroidalSurface )))
+ if (S->IsKind(STANDARD_TYPE( Geom_SphericalSurface )))
{
// get point on the surface
gp_Pnt Ps = S->Value( Pm.X(), Pm.Y() );
TopoDS_Edge se = TopoDS::Edge( itLSE.Value() );
+ // move itLSE to the next se
Standard_Integer ancRank = DS.AncestorRank(se);
if (ME[ancRank-1].Contains( se ))
+ {
LSE.Remove( itLSE ); // se is an edge of face it intersects
+ continue;
+ }
else
+ {
itLSE.Next();
+ }
const TopoDS_Face& F = (ancRank == 1) ? F2 : F1;
myEqualEdges : MapOfShape from TopTools; -- equal splits
myNewSection : MapOfShape from TopTools; -- new secton edges
myClosedShapes : MapOfShape from TopTools;
+ mySharedFaces : MapOfShape from TopTools; -- faces shared by several shapes
myWrappingSolid: MapOfShape from TopTools; -- solids having other shapes inside
myFaceShapeMap : DataMapOfShapeShape from TopTools; -- to find a shape by face
myListShapes.Clear();
myMapFaces.Clear();
myMapTools.Clear();
- myClosedShapes.Clear();
myEqualEdges.Clear();
myNewSection.Clear();
+ myClosedShapes.Clear();
+ mySharedFaces.Clear();
myWrappingSolid.Clear();
myFaceShapeMap.Clear();
MakeShells (S , NSL);
if (makeSolids && S.ShapeType() == TopAbs_SOLID )
MakeSolids( S, NSL );
-
+
+ // store new shells or solids
TopTools_ListIteratorOfListOfShape itNSL (NSL);
for ( ; itNSL.More(); itNSL.Next())
myBuilder.Add (myShape, itNSL.Value());
}
}
- // find outer a shell most close to each hole shell
+ // find an outer shell most close to each hole shell
TopTools_DataMapOfShapeShape aInOutMap;
for (aShellIt.Initialize( aHoleShells ); aShellIt.More(); aShellIt.Next())
{
Standard_Boolean isSolid = (theShape.ShapeType() == TopAbs_SOLID);
if (All || isSolid) // All is for sub-result removal
{
+ // loop on not used faces; checked faces will be removed from MFP
+ // during the loop
for ( itm.Initialize( MFP ); itm.More(); itm.Next() ) {
- TopoDS_Shape aFace = itm.Key();
+ const TopoDS_Shape & aFace = itm.Key();
- // find a shape aFace originates from
+ // a shape which aFace originates from
TopoDS_Shape anOrigShape = GetOriginalShape( aFace );
- // find out if all faces of anOrigShape are not in MFP
+ // find out if all split faces of anOrigShape are not in MFP
// and by the way remove them from MFP
Standard_Boolean isAllOut = Standard_True;
TopoDS_Shape aSplitFaces = anOrigShape;
if (myImageShape.HasImage(anOrigShape))
aSplitFaces = myImageShape.Image(anOrigShape).First();
- TopTools_ListOfShape aSplitFaceL;
+ TopTools_ListOfShape aSplitFaceL; // faces candidate to be kept
for (expl.Init( aSplitFaces, TopAbs_FACE ); expl.More(); expl.Next())
{
const TopoDS_Shape & aSpFace = expl.Current();
- // a tool face which become object has image but the whole tool shape has not
+ // a tool face which became object has image but the whole tool shape has not
if (myImageShape.HasImage( aSpFace ))
{
TopExp_Explorer exF (myImageShape.Image( aSpFace ).First(), TopAbs_FACE );
for ( ; exF.More(); exF.Next() )
{
aSplitFaceL.Append( exF.Current() );
- if ( ! MFP.Remove( exF.Current() ))
- isAllOut = Standard_False;
+ if ( ! MFP.Remove( exF.Current() ) && isAllOut )
+ // a shared face might be removed from MFP during a prev loop
+ isAllOut = mySharedFaces.Contains( exF.Current() );
}
}
else
{
aSplitFaceL.Append( aSpFace );
- if ( ! MFP.Remove( aSpFace ))
- isAllOut = Standard_False;
+ if ( ! MFP.Remove( aSpFace ) && isAllOut)
+ // a shared face might be removed from MFP during a prev loop
+ isAllOut = mySharedFaces.Contains( aSpFace );
}
}
- itm.Initialize( MFP );
+ itm.Initialize( MFP ); // iterate remaining faces
if ( !isAllOut )
continue;
myImagesFaces.Bind(F,LNF);
// replace the result faces that have already been built
- // during same domain faces reconstruction
- if (myInter3d.HasSameDomainF( F )) {
- // build map edge to same domain faces
+ // during same domain faces reconstruction done earlier
+ if (myInter3d.HasSameDomainF( F ))
+ {
+ // build map edge to same domain faces: EFM
TopTools_IndexedDataMapOfShapeListOfShape EFM;
TopTools_MapOfShape SDFM; // avoid doubling
itl.Initialize( myInter3d.SameDomain( F ));
for (; itl.More(); itl.Next()) {
if ( !myImagesFaces.HasImage( itl.Value() ))
continue;
+ // loop on splits of a SD face
TopTools_ListIteratorOfListOfShape itNF;
itNF.Initialize (myImagesFaces.Image( itl.Value() ));
for ( ; itNF.More(); itNF.Next()) {
TopExp::MapShapesAndAncestors(SDF, TopAbs_EDGE, TopAbs_FACE, EFM);
}
}
- // do replace
+ // do replace faces in the LNF
TopTools_ListOfShape LOF;
if ( !EFM.IsEmpty() )
itl.Initialize( LNF );
Standard_Real dot;
Partition_Loop3d::IsInside (E, TopoDS::Face(NF), TopoDS::Face(SDF),
1, dot, GoodOri);
- if (dot < 0) {
+ if (dot < 0)
+ {
+ // NF and SDF are on different side of E
if (SDFL.Extent() == 1) {
itl.Next();
continue;
}
else
- SDF = SDFL.Last();
+ SDF = SDFL.Last(); // next face must be on the same side
}
gp_Vec V1 = Partition_Loop3d::Normal( E, TopoDS::Face( NF ));
gp_Vec V2 = Partition_Loop3d::Normal( E, TopoDS::Face( SDF ));
if (!myImagesFaces.HasImage( NF ))
myImagesFaces.Bind( NF, SDF );
+ // mySharedFaces is used in FindFacesInside()
+ mySharedFaces.Add( SDF );
+
LOF.Prepend ( SDF );
LNF.Remove (itl);
}
myImagesFaces.Bind(F,LNF);
}
} // if (myImagesFaces.HasImage( F ))
-
+
+ // fill the resulting compound
for (itl.Initialize(LNF); itl.More(); itl.Next())
myBuilder.Add ( C, itl.Value());
+
} // loop on faces of S
return C;
TopTools_MapOfShape myEqualEdges;
TopTools_MapOfShape myNewSection;
TopTools_MapOfShape myClosedShapes;
+TopTools_MapOfShape mySharedFaces;
TopTools_MapOfShape myWrappingSolid;
TopTools_DataMapOfShapeShape myFaceShapeMap;
TopTools_DataMapOfShapeShape myInternalFaces;
PrimitiveGUI_TorusDlg.h \
PrimitiveGUI_ConeDlg.h
-LIB_CLIENT_IDL =
+LIB_CLIENT_IDL = GEOM_Kinematic.idl
LIB_SERVER_IDL =
RepairGUI_SuppressFacesDlg.h \
RepairGUI_SuppressHoleDlg.h
-LIB_CLIENT_IDL =
+LIB_CLIENT_IDL = GEOM_Kinematic.idl
LIB_SERVER_IDL =
#include "QAD_Desktop.h"
#include "utilities.h"
+
+
#include <qbuttongroup.h>
#include <qcheckbox.h>
#include <qgroupbox.h>
# Libraries targets
LIB = libGEOMSketcher.la
LIB_SRC = GEOM_Sketcher.cxx
-LIB_CLIENT_IDL = SALOME_Component.idl SALOMEDS.idl SALOME_Exception.idl GEOM_Shape.idl GEOM_Gen.idl
+LIB_CLIENT_IDL = SALOME_Component.idl SALOMEDS.idl SALOME_Exception.idl GEOM_Shape.idl GEOM_Gen.idl GEOM_Kinematic.idl
# header files
EXPORT_HEADERS= GEOM_Sketcher.h \
TransformationGUI_MirrorDlg.h \
TransformationGUI_ScaleDlg.h
-LIB_CLIENT_IDL =
+LIB_CLIENT_IDL = GEOM_Kinematic.idl
LIB_SERVER_IDL =