SALOME PAL V1_4_1

This commit is contained in:
smh 2004-04-02 13:23:30 +00:00
parent a7515cc5c4
commit 3167104c42
57 changed files with 582 additions and 253 deletions

View File

@ -1,3 +1,3 @@
This is the version 1.4.0 of GEOM
This is the version 1.4.1 of GEOM
Compatible with :
- KERNEL 1.4.0
- KERNEL 1.4.1

View File

@ -14,11 +14,12 @@ VPATH=.:@srcdir@:@top_srcdir@/bin:@top_srcdir@/resources:./bin:@top_srcdir@/idl
@COMMENCE@
SUBDIRS = idl src
SUBDIRS = idl src doc
RESOURCES_FILES = \
GEOM_en.xml \
GEOM_fr.xml \
GEOM.config \
GEOMCatalog.xml \
GEOMDS_Resources \
arc.png \
@ -144,10 +145,10 @@ include/salome/SALOMEconfig.h: salome_adm/unix/SALOMEconfig.ref
# test if SALOMEconfig.h has changed (contents)
salome_adm/unix/SALOMEconfig.ref: salome_adm/unix/SALOMEconfig.h
@if ! [ -a $@ ]; then \
cp -p $< $@; \
cp -p -f $< $@; \
fi; \
if ! cmp $< $@; then \
cp -p $< $@; \
cp -p -f $< $@; \
fi; \
include/salome/sstream: salome_adm/unix/sstream
@ -169,10 +170,10 @@ install-end:
install-include: $(include_list)
$(INSTALL) -d $(includedir)
@for f in X $(include_list); do \
if test $$f != X; then \
($(INSTALL_DATA) $$f $(includedir)/. || exit 1); \
fi; \
@for f in X $(include_list); do \
if test $$f != X; then \
($(INSTALL_DATA) -p $$f $(includedir)/. || exit 1); \
fi; \
done
# install script in $(bindir) :

View File

@ -131,7 +131,7 @@ OMNIORB_CXXFLAGS = @OMNIORB_CXXFLAGS@
OMNIORB_IDL = @OMNIORB_IDL@
OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl -I$(KERNEL_ROOT_DIR)/idl/salome
OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_srcdir)/idl -I$(KERNEL_ROOT_DIR)/idl/salome
OMNIORB_IDL_CLN_H = @OMNIORB_IDL_CLN_H@
OMNIORB_IDL_CLN_CXX = @OMNIORB_IDL_CLN_CXX@
@ -148,7 +148,7 @@ CORBA_INCLUDES = @CORBA_INCLUDES@
CORBA_LIBS = @CORBA_LIBS@
CORBA_CXXFLAGS = @CORBA_CXXFLAGS@
IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl -I$(KERNEL_ROOT_DIR)/idl/salome
IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_srcdir)/idl -I$(KERNEL_ROOT_DIR)/idl/salome
IDLPYFLAGS = @IDLPYFLAGS@
IDL = @IDL@
@ -202,13 +202,13 @@ idldir=${prefix}/idl/salome
sharedpydir=@libdir@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules
incmakedir=${prefix}/salome_adm/unix
docdir=$(datadir)/doc
docdir=${prefix}/doc/salome
#
# begin of package rules
#
.PHONY: all lib bin inc resources data doc tests install uninstall dep depend depend_idl cleandep mostlyclean clean distclean
.PHONY: all lib bin inc resources data docs tests install uninstall dep depend depend_idl cleandep mostlyclean clean distclean
.SUFFIXES: .cxx .cc .c .f .o .lo .idl .py .i .ui .po .qm

View File

@ -1 +1 @@
THIS IS SALOME - GEOM VERSION: 1.4.0
THIS IS SALOME - GEOM VERSION: 1.4.1

View File

@ -15,6 +15,7 @@
# Created from configure.in.base
#
AC_INIT(src)
AC_CONFIG_AUX_DIR(${KERNEL_ROOT_DIR}/salome_adm/unix/config_files)
AC_CANONICAL_HOST
@ -294,7 +295,7 @@ else
fi
# make other build directories
for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources share/salome/doc idl
for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl
do
# if test ! -d $rep ; then
# eval mkdir $rep
@ -327,14 +328,16 @@ dnl copy shells and utilities contained in the bin directory
dnl excluding .in files (treated in AC-OUTPUT below) and CVS
dnl directory
cd bin
mkdir -p bin/salome
cd bin/salome
for i in $ROOT_SRCDIR/bin/*
do
local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
case "$local_bin" in
*.in | *~) ;;
./bin/CVS) ;;
*) ln -fs $i; echo $local_bin ;;
./bin/CVS | ./bin/salome) ;;
*) /usr/bin/install -C $i .; echo $local_bin ;;
esac
done
cd $ROOT_BUILDDIR

View File

@ -11,9 +11,11 @@ top_builddir=..
srcdir=@srcdir@
VPATH=.:@srcdir@
SUBDIRS=html
SUBDIRS= salome
doc:
@COMMENCE@
docs:
@@SETX@; for d in $(SUBDIRS); do \
(cd $$d && $(MAKE) $@) || exit 1; \
done
@ -31,3 +33,8 @@ install:
@@SETX@; for d in $(SUBDIRS); do \
(cd $$d && $(MAKE) $@) || exit 1; \
done
uninstall:
@@SETX@; for d in $(SUBDIRS); do \
(cd $$d && $(MAKE) $@) || exit 1; \
done

View File

@ -78,6 +78,8 @@ module GEOM
// the generator engine
GEOM_Gen Engine();
// Get the TopoDS_Shape, for colocated case only
long getShape();
};
};
#endif

View File

@ -6,7 +6,7 @@
top_srcdir=@top_srcdir@
top_builddir=..
srcdir=@srcdir@
VPATH=.:$(srcdir):${KERNEL_ROOT_DIR}/idl/salome
VPATH=.:${KERNEL_ROOT_DIR}/idl/salome
@COMMENCE@
@ -17,11 +17,14 @@ IDL_FILES = \
PY_CLIENT_IDL = $(IDL_FILES)
# we copy all idl file in $(top_builddir)/idl
inc: $(IDL_FILES:%=$(top_builddir)/idl/%)
inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
$(IDL_FILES:%=$(top_builddir)/idl/%):$(top_builddir)/idl/%:%
$(top_builddir)/idl/salome:
mkdir $@
$(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%)
# $(CP) $< $@
cp -f $< $@
cp -f $^ $(top_builddir)/idl/salome
lib: pyidl
@ -33,7 +36,7 @@ pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py)
$(PYTHON_BUILD_SITE):
$(INSTALL) -d $@
$(PYTHON_BUILD_SITE)/%_idl.py: %.idl
$(PYTHON_BUILD_SITE)/%_idl.py: $(top_builddir)/idl/salome/%.idl
$(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $<
@ -41,12 +44,12 @@ $(PYTHON_BUILD_SITE)/%_idl.py: %.idl
install: install-pyidl install-idl
# create directory $(idldir) and copy idl files into it
install-idl: $(IDL_FILES)
install-idl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
$(INSTALL) -d $(idldir)
$(INSTALL_DATA) $^ $(idldir)
install-pyidl: $(IDL_FILES)
install-pyidl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
$(INSTALL) -d $(PYTHON_SITE_INSTALL)
@for file in $^ dummy; do \
if [ $$file != "dummy" ]; then \
@ -61,6 +64,6 @@ cleandep:
distclean:
-$(RM) *.py
-$(RM) $(IDL_FILES:%=$(top_builddir)/idl/%)
-$(RM) $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
-$(RM) Makefile

View File

@ -406,3 +406,4 @@ void VolumeSection::getZ( double& min, double& max)
min = Zmin;
max = Zmax;
}

View File

@ -137,6 +137,7 @@ void BasicGUI_ArcDlg::ClickOnOk()
//=================================================================================
void BasicGUI_ArcDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -147,6 +147,7 @@ void BasicGUI_CircleDlg::ClickOnOk()
//=================================================================================
void BasicGUI_CircleDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -153,6 +153,7 @@ void BasicGUI_EllipseDlg::ClickOnOk()
//=================================================================================
void BasicGUI_EllipseDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -135,6 +135,7 @@ void BasicGUI_LineDlg::ClickOnOk()
//=================================================================================
void BasicGUI_LineDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -273,6 +273,7 @@ void BasicGUI_PlaneDlg::ClickOnOk()
//=================================================================================
void BasicGUI_PlaneDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -259,6 +259,7 @@ void BasicGUI_PointDlg::ClickOnOk()
//=================================================================================
void BasicGUI_PointDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if(mySimulationTopoDs.IsNull())
return;

View File

@ -237,6 +237,7 @@ void BasicGUI_VectorDlg::ClickOnOk()
//=================================================================================
void BasicGUI_VectorDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -127,6 +127,7 @@ void BasicGUI_WorkingPlaneDlg::ClickOnOk()
//=================================================================================
void BasicGUI_WorkingPlaneDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if(myOkPlane)
myBasicGUI->MakeWorkingPlane(myLoc, myDir);

View File

@ -52,8 +52,8 @@ BooleanGUI_CutDlg::BooleanGUI_CutDlg(QWidget* parent, const char* name, BooleanG
GroupCut = new DlgRef_2Sel_QTD(this, "GroupCut");
GroupCut->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
GroupCut->TextLabel1->setText(tr("GEOM_OBJECT_I").arg("1"));
GroupCut->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("2"));
GroupCut->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
GroupCut->TextLabel2->setText(tr("GEOM_TOOL_OBJECT"));
GroupCut->PushButton1->setPixmap(image1);
GroupCut->PushButton2->setPixmap(image1);

View File

@ -41,15 +41,11 @@ DlgRef_4Sel1List_QTD::DlgRef_4Sel1List_QTD( QWidget* parent, const char* name,
Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1");
LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
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( LineEdit2, 1, 2 );
PushButton4 = new QPushButton( GroupBox1, "PushButton4" );
PushButton4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton4->sizePolicy().hasHeightForWidth() ) );
PushButton4->setText( trUtf8( "" ) );
Layout1->addWidget( PushButton4, 4, 1 );
Layout1->addWidget( TextLabel1, 0, 0 );
PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
@ -57,49 +53,10 @@ DlgRef_4Sel1List_QTD::DlgRef_4Sel1List_QTD( QWidget* parent, const char* name,
Layout1->addWidget( PushButton1, 0, 1 );
LineEdit4 = new QLineEdit( GroupBox1, "LineEdit4" );
Layout1->addWidget( LineEdit4, 4, 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, 3, 1 );
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 );
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 );
QSpacerItem* spacer = new QSpacerItem( 0, 80, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout1->addItem( spacer, 5, 2 );
LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
Layout1->addWidget( LineEdit1, 0, 2 );
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, 4, 0 );
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() ) );
@ -107,10 +64,16 @@ DlgRef_4Sel1List_QTD::DlgRef_4Sel1List_QTD( QWidget* parent, const char* name,
Layout1->addWidget( TextLabel2, 1, 0 );
ComboBox1 = new QComboBox( FALSE, GroupBox1, "ComboBox1" );
ComboBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBox1->sizePolicy().hasHeightForWidth() ) );
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 );
LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
Layout1->addWidget( LineEdit2, 1, 2 );
Layout1->addWidget( ComboBox1, 2, 2 );
TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
@ -118,9 +81,65 @@ DlgRef_4Sel1List_QTD::DlgRef_4Sel1List_QTD( QWidget* parent, const char* name,
Layout1->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 );
ComboBox1 = new QComboBox( FALSE, GroupBox1, "ComboBox1" );
ComboBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBox1->sizePolicy().hasHeightForWidth() ) );
Layout1->addWidget( ComboBox1, 2, 2 );
GroupBox1Layout->addLayout( Layout1, 0, 0 );
DlgRef_4Sel1List_QTDLayout->addWidget( GroupBox1, 0, 0 );
GroupBox2 = new QGroupBox( this, "GroupBox2" );
GroupBox2->setTitle( trUtf8( "" ) );
GroupBox2->setColumnLayout(0, Qt::Vertical );
GroupBox2->layout()->setSpacing( 6 );
GroupBox2->layout()->setMargin( 11 );
GroupBox2Layout = new QGridLayout( GroupBox2->layout() );
GroupBox2Layout->setAlignment( Qt::AlignTop );
Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2");
TextLabel4 = new QLabel( GroupBox2, "TextLabel4" );
TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
TextLabel4->setText( trUtf8( "TL4" ) );
Layout2->addWidget( TextLabel4, 0, 0 );
QSpacerItem* spacer = new QSpacerItem( 0, 80, QSizePolicy::Minimum, QSizePolicy::Expanding );
Layout1->addItem( spacer, 5, 2 );
PushButton3 = new QPushButton( GroupBox2, "PushButton3" );
PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) );
PushButton3->setText( trUtf8( "" ) );
Layout2->addWidget( PushButton3, 0, 1 );
LineEdit3 = new QLineEdit( GroupBox2, "LineEdit3" );
Layout2->addWidget( LineEdit3, 0, 2 );
TextLabel5 = new QLabel( GroupBox2, "TextLabel5" );
TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
TextLabel5->setText( trUtf8( "TL5" ) );
Layout2->addWidget( TextLabel5, 1, 0 );
PushButton4 = new QPushButton( GroupBox2, "PushButton4" );
PushButton4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton4->sizePolicy().hasHeightForWidth() ) );
PushButton4->setText( trUtf8( "" ) );
Layout2->addWidget( PushButton4, 1, 1 );
LineEdit4 = new QLineEdit( GroupBox2, "LineEdit4" );
Layout2->addWidget( LineEdit4, 1, 2 );
GroupBox2Layout->addLayout( Layout2, 0, 0 );
DlgRef_4Sel1List_QTDLayout->addWidget( GroupBox2, 1, 0 );
}
/*

View File

@ -29,6 +29,7 @@ public:
~DlgRef_4Sel1List_QTD();
QGroupBox* GroupBox1;
QGroupBox* GroupBox2;
QLineEdit* LineEdit2;
QPushButton* PushButton4;
QPushButton* PushButton1;
@ -48,7 +49,9 @@ public:
protected:
QGridLayout* DlgRef_4Sel1List_QTDLayout;
QGridLayout* GroupBox1Layout;
QGridLayout* GroupBox2Layout;
QGridLayout* Layout1;
QGridLayout* Layout2;
};
#endif // DLGREF_4SEL1LIST_QTD_H

View File

@ -579,7 +579,7 @@ bool EntityGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* Shap
}
else {
aResult->NameType(tr("GEOM_SHAPE"));
sprintf(nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
sprintf(nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->myNbGeom++);
}
SALOMEDS::SObject_var SO = aStudy->FindObjectIOR(aResult->Name());
@ -814,7 +814,7 @@ bool EntityGUI::OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char*
}
else {
aResult->NameType(tr("GEOM_SHAPE"));
sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->myNbGeom++);
}
result = new GEOM_AISShape(Exp.Current(), nameG);
IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM");
@ -823,10 +823,10 @@ bool EntityGUI::OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char*
else {
if ( myGeomBase->GetShapeTypeString(compound,Type)) {
aResult->NameType(Type);
sprintf (nameG, "%s_%d", Type, myGeomGUI->GetNbGeom()++);
sprintf (nameG, "%s_%d", Type, myGeomGUI->myNbGeom++);
} else {
aResult->NameType(tr("GEOM_SHAPE"));
sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->myNbGeom++);
}
result = new GEOM_AISShape(compound, nameG);
IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM");

View File

@ -158,6 +158,8 @@ using namespace std;
#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
#include "Utils_ExceptHandlers.hxx"
Standard_EXPORT static Standard_Boolean IsValid(const TopoDS_Shape& S) {
#if OCC_VERSION_MAJOR >= 5
return BRepAlgo::IsValid(S);
@ -362,6 +364,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
CORBA::Object_ptr theObject,
const char* theName) throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
SALOMEDS::SObject_var aResultSO;
if(CORBA::is_nil(theObject)) return aResultSO;
@ -613,7 +616,7 @@ CORBA::Boolean GEOM_Gen_i::CanCopy(SALOMEDS::SObject_ptr theObject) {
//============================================================================
SALOMEDS::TMPFile* GEOM_Gen_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID) {
// Declare a sequence of the byte to store the copied object
SALOMEDS::TMPFile_var aStreamFile;
SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile;
// Try to get GEOM_Shape object by given SObject
SALOMEDS::GenericAttribute_var anAttr;
@ -910,7 +913,15 @@ void GEOM_Gen_i::InsertInLabelMoreArguments(TopoDS_Shape main_topo,
//=================================================================================
CORBA::Short GEOM_Gen_i::NbLabels()
{
return TDF_Tool::NbLabels( myCurrentOCAFDoc->Main() );
TDF_ChildIterator ChildIterator(myCurrentOCAFDoc->Main());
unsigned int i = 1;
while (ChildIterator.More()) {
i++;
ChildIterator.Next();
}
return i;
// return TDF_Tool::NbLabels( myCurrentOCAFDoc->Main() );
}
@ -1014,6 +1025,7 @@ int GEOM_Gen_i::SuppressFacesGlue( const TopoDS_Shape& S,
TopoDS_Shape& aCompoundOfShells )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
BRepTools_Quilt Glue;
aCompoundOfShells.Nullify() ;
@ -1102,6 +1114,7 @@ GEOM::GEOM_Shape::ListOfSubShapeID* GEOM_Gen_i::IndexOfFacesOfSubShell( const To
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID;
ListOfID->length(0) ;
if( subShell.IsNull() || subShell.ShapeType() != TopAbs_SHELL ) {
@ -1218,6 +1231,7 @@ GEOM::GEOM_Gen::ListOfGeomShapes* GEOM_Gen_i::SuppressFaces( GEOM::GEOM_Shape_pt
const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Gen::ListOfGeomShapes_var listOfGeomShapes = new GEOM::GEOM_Gen::ListOfGeomShapes;
listOfGeomShapes->length(0) ;
@ -1366,6 +1380,7 @@ void GEOM_Gen_i::SuppressHoleSubRoutine( const TopoDS_Shape& mainShape,
TopTools_MapOfShape& MSwireEndEdges )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
TopTools_MapOfShape MS ;
TopTools_SequenceOfShape SU ;
FreeEdgesFromMapOfFace(MSfaces, MS) ; /* MS = free edges of MSfaces */
@ -1466,6 +1481,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::SuppressHolesInFaceOrShell( GEOM::GEOM_Shape_pt
const GEOM::GEOM_Shape::ListOfSubShapeID& ListIdWires )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
if( ListIdWires.length() < 1 )
@ -1628,6 +1644,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::SuppressHole( GEOM::GEOM_Shape_ptr shape,
const GEOM::GEOM_Shape::ListOfSubShapeID& ListIdEndFace )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
TopoDS_Face aFace ;
TopoDS_Wire aWire ;
@ -1917,6 +1934,7 @@ bool GEOM_Gen_i::BuildShapeHoleNotTraversing( const TopoDS_Shape& aShape,
TopoDS_Shape& resultTds )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
BRep_Builder B;
TopExp_Explorer exp ;
TopoDS_Face newFace ;
@ -1975,6 +1993,7 @@ bool GEOM_Gen_i::BuildShapeHoleTraversing( const TopoDS_Shape& aShape,
TopoDS_Shape& resultTds )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
BRep_Builder B;
TopExp_Explorer exp ;
TopoDS_Face newFace ;
@ -2114,6 +2133,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::SubShape(GEOM::GEOM_Shape_ptr shape,
const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
return SubShapesOne(shape, (TopAbs_ShapeEnum) ShapeType, ListOfID);
}
@ -2127,6 +2147,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::SubShapeSorted(GEOM::GEOM_Shape_ptr shape,
const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
return SubShapesOne(shape, (TopAbs_ShapeEnum) ShapeType, ListOfID, Standard_True);
}
@ -2141,6 +2162,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::SubShapesOne( GEOM::GEOM_Shape_ptr shape,
const Standard_Boolean Sort)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
TopoDS_Shape mainShape;
TopoDS_Shape mainTopo = GetTopoShape(shape);
@ -2221,6 +2243,7 @@ GEOM::GEOM_Gen::ListOfGeomShapes* GEOM_Gen_i::SubShapeAll(GEOM::GEOM_Shape_ptr s
CORBA::Short ShapeType)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
return SubShapesAll(shape, (TopAbs_ShapeEnum) ShapeType);
}
@ -2233,6 +2256,7 @@ GEOM::GEOM_Gen::ListOfGeomShapes* GEOM_Gen_i::SubShapeAllSorted(GEOM::GEOM_Shape
CORBA::Short ShapeType)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
return SubShapesAll(shape, (TopAbs_ShapeEnum) ShapeType, Standard_True);
}
@ -2247,6 +2271,7 @@ GEOM::GEOM_Gen::ListOfGeomShapes* GEOM_Gen_i::SubShapesAll(GEOM::GEOM_Shape_ptr
throw (SALOME::SALOME_Exception)
{
/* List of sub shapes returned */
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Gen::ListOfGeomShapes_var listOfGeomShapes = new GEOM::GEOM_Gen::ListOfGeomShapes;
listOfGeomShapes->length(0) ;
@ -2333,7 +2358,6 @@ GEOM::GEOM_Gen::ListOfGeomShapes* GEOM_Gen_i::SubShapesAll(GEOM::GEOM_Shape_ptr
return listOfGeomShapes._retn() ;
}
//=================================================================================
// function : MakeBoolean()
// purpose : Boolean operation according to the type 'operation'
@ -2343,6 +2367,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeBoolean(GEOM::GEOM_Shape_ptr shape1,
CORBA::Long operation)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
TopoDS_Shape shape ;
TopoDS_Shape aShape1 ;
@ -2419,6 +2444,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFuse(GEOM::GEOM_Shape_ptr shape1,
GEOM::GEOM_Shape_ptr shape2)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
TopoDS_Shape aShape1 = GetTopoShape(shape1) ;
TopoDS_Shape aShape2 = GetTopoShape(shape2) ;
@ -2476,6 +2502,7 @@ GEOM::AxisStruct GEOM_Gen_i::MakeAxisStruct(CORBA::Double x,
CORBA::Double vy,
CORBA::Double vz)
{
int a = 1; int b = 0; int c; c=a/b;
GEOM::AxisStruct A ;
A.x = x ; A.y = y ; A.z = z ;
A.vx = vx ; A.vy = vy ; A.vz = vz ;
@ -2521,6 +2548,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeBox(CORBA::Double x1,
CORBA::Double z2)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
gp_Pnt P1(x1,y1,z1);
gp_Pnt P2(x2,y2,z2);
GEOM::GEOM_Shape_var result ;
@ -2553,6 +2581,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeCylinder(const GEOM::PointStruct& pstruct,
CORBA::Double height)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
TopoDS_Shape tds ;
gp_Pnt p(pstruct.x, pstruct.y, pstruct.z) ;
@ -2585,6 +2614,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSphere(CORBA::Double x1,
CORBA::Double radius)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
try {
@ -2613,6 +2643,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeTorus( const GEOM::PointStruct& pstruct,
CORBA::Double minor_radius )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
TopoDS_Shape tds ;
gp_Pnt p(pstruct.x, pstruct.y, pstruct.z) ;
@ -2647,6 +2678,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeCone(const GEOM::PointStruct& pstruct,
CORBA::Double height)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
TopoDS_Shape tds ;
gp_Pnt p(pstruct.x, pstruct.y, pstruct.z) ;
@ -2685,6 +2717,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeCone(const GEOM::PointStruct& pstruct,
GEOM::GEOM_Shape_ptr GEOM_Gen_i::ImportIGES(const char* filename)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
//VRV: OCC 4.0 migration
IGESControl_Reader aReader;
@ -2695,8 +2728,11 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::ImportIGES(const char* filename)
THROW_SALOME_CORBA_EXCEPTION("Error in reading import file", SALOME::BAD_PARAM); }
MESSAGE("ImportIGES : all Geometry Transfer" << endl ) ;
aReader.Clear();
aReader.TransferRoots(false);
//OCC 5.1.2 porting
// aReader.Clear();
// aReader.TransferRoots(false);
aReader.ClearShapes();
aReader.TransferRoots();
MESSAGE("ImportIGES : count of shapes produced = " << aReader.NbShapes() << endl );
TopoDS_Shape shape = aReader.OneShape();
@ -2726,6 +2762,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::ImportIGES(const char* filename)
GEOM::GEOM_Shape_ptr GEOM_Gen_i::ImportSTEP(const char* filename)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
//VRV: OCC 4.0 migration
STEPControl_Reader aReader;
@ -2801,6 +2838,7 @@ GEOM::GEOM_Shape_ptr
const CORBA::Short Limit)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var aResult;
TopoDS_Shape tds ;
//MESSAGE ("In Partition");
@ -2970,6 +3008,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFilling(GEOM::GEOM_Shape_ptr myShape,
CORBA::Short nbiter)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Face tds ;
TopoDS_Shape aShape = GetTopoShape(myShape) ;
@ -3166,6 +3205,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeGlueFaces(GEOM::GEOM_Shape_ptr myShape,
// appliquer BRepTools_SameParameter au compshell
// (rendre parametres 2D des edges identiques aux parametres 3D)
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
TopoDS_Shape aShape = GetTopoShape(myShape) ;
@ -3304,6 +3344,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSewing( const GEOM::GEOM_Gen::ListOfIOR& Li
CORBA::Double precision )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
BRepOffsetAPI_Sewing aMethod ;
@ -3342,6 +3383,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSewingShape( GEOM::GEOM_Shape_ptr aShape,
CORBA::Double precision )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds, S ;
BRepOffsetAPI_Sewing aMethod ;
@ -3385,6 +3427,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSewingShape( GEOM::GEOM_Shape_ptr aShape,
GEOM::GEOM_Shape_ptr GEOM_Gen_i::OrientationChange(GEOM::GEOM_Shape_ptr aShape)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
BRep_Builder aBuilder;
@ -3527,6 +3570,7 @@ GEOM::GEOM_Gen::ListOfIOR* GEOM_Gen_i::GetObjects(GEOM::GEOM_Shape_ptr shape)
GEOM::GEOM_Shape_ptr GEOM_Gen_i::ImportBREP(const char* filename)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
TopoDS_Shape tds ;
GEOM::GEOM_Shape_var result ;
@ -3557,6 +3601,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePlane(const GEOM::PointStruct& pstruct,
CORBA::Double trimsize)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
@ -3590,13 +3635,14 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeVertex(CORBA::Double x,
CORBA::Double z)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
gp_Pnt P(x,y,z);
TopoDS_Shape tds = BRepBuilderAPI_MakeVertex(P).Shape();
if (tds.IsNull()) {
THROW_SALOME_CORBA_EXCEPTION("Make Vertex/Point aborted", SALOME::BAD_PARAM);
}
tds.Infinite(true);
result = CreateObject(tds) ;
const char *entry = InsertInLabel(tds, result->Name(), myCurrentOCAFDoc) ;
result->ShapeId(entry);
@ -3612,6 +3658,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFace( GEOM::GEOM_Shape_ptr wire,
CORBA::Boolean wantplanarface )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape aShape;
TopoDS_Shape tds;
@ -3645,6 +3692,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFace( GEOM::GEOM_Shape_ptr wire,
GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeShell( const GEOM::GEOM_Gen::ListOfIOR& ListShapes )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
BRepTools_Quilt Glue;
TopoDS_Shape C;
@ -3686,6 +3734,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeShell( const GEOM::GEOM_Gen::ListOfIOR& Lis
GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSolid( const GEOM::GEOM_Gen::ListOfIOR& ListShapes )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
Standard_Integer ish = 0;
TopoDS_Compound Res;
@ -3734,6 +3783,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeLine(const GEOM::PointStruct& pstruct,
const GEOM::DirStruct& dstruct)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
gp_Pnt P1(pstruct.x, pstruct.y, pstruct.z);
gp_Pnt P2(dstruct.PS.x, dstruct.PS.y, dstruct.PS.z) ;
@ -3750,6 +3800,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeLine(const GEOM::PointStruct& pstruct,
THROW_SALOME_CORBA_EXCEPTION("Make Line aborted : null shape", SALOME::BAD_PARAM);
}
else {
tds.Infinite(true);
result = CreateObject(tds) ;
const char *entry = InsertInLabel(tds, result->Name(), myCurrentOCAFDoc) ;
result->ShapeId(entry);
@ -3766,6 +3817,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeVector(const GEOM::PointStruct& pstruct1,
const GEOM::PointStruct& pstruct2)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
@ -3799,6 +3851,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeCircle(const GEOM::PointStruct& pstruct,
CORBA::Double radius)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
TopoDS_Shape tds ;
@ -3832,6 +3885,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeEllipse( const GEOM::PointStruct& pstruct,
CORBA::Double radius_minor )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
TopoDS_Shape tds ;
@ -3866,6 +3920,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeArc(const GEOM::PointStruct& pInit,
const GEOM::PointStruct& pEnd)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
try {
gp_Pnt pI(pInit.x, pInit.y, pInit.z) ;
@ -3905,6 +3960,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeTranslation( GEOM::GEOM_Shape_ptr myShape,
CORBA::Double z)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape aShape = GetTopoShape(myShape) ;
if( aShape.IsNull() ) {
@ -3935,6 +3991,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeMultiTranslation1D( GEOM::GEOM_Shape_ptr my
CORBA::Short nbtimes )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
@ -3990,6 +4047,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeMultiTranslation2D( GEOM::GEOM_Shape_ptr my
CORBA::Short nbtimes2 )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
@ -4047,6 +4105,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeMultiRotation1D( GEOM::GEOM_Shape_ptr mySha
CORBA::Short nbtimes)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
TopoDS_Shape aShape = GetTopoShape(myShape) ;
@ -4100,6 +4159,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeMultiRotation2D( GEOM::GEOM_Shape_ptr mySha
CORBA::Short nbtimes2 )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
TopoDS_Shape aShape = GetTopoShape(myShape) ;
@ -4184,6 +4244,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeMultiRotation2D( GEOM::GEOM_Shape_ptr mySha
GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeCopy( GEOM::GEOM_Shape_ptr Shape)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
TopoDS_Shape aShape = GetTopoShape(Shape) ;
@ -4209,6 +4270,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeMirrorByPlane(GEOM::GEOM_Shape_ptr myShape,
GEOM::GEOM_Shape_ptr shapePlane)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
TopoDS_Shape aShape = GetTopoShape(myShape) ;
@ -4261,6 +4323,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeRotation( GEOM::GEOM_Shape_ptr myShape,
CORBA::Double angle)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
TopoDS_Shape aShape = GetTopoShape(myShape) ;
@ -4299,6 +4362,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeScaleTransform(GEOM::GEOM_Shape_ptr myShape
CORBA::Double factor)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
TopoDS_Shape aShape = GetTopoShape(myShape) ;
@ -4332,6 +4396,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeScaleTransform(GEOM::GEOM_Shape_ptr myShape
GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeCompound( const GEOM::GEOM_Gen::ListOfIOR& ListShapes )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Compound C;
BRep_Builder aBuilder;
@ -4365,6 +4430,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeEdge(const GEOM::PointStruct& pstruct1,
const GEOM::PointStruct& pstruct2)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
@ -4395,6 +4461,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeEdge(const GEOM::PointStruct& pstruct1,
GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeWire( const GEOM::GEOM_Gen::ListOfIOR& ListShapes )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
BRepBuilderAPI_MakeWire MW ;
TopoDS_Shape tds, Shape ;
@ -4438,6 +4505,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeRevolution(GEOM::GEOM_Shape_ptr myShape,
double angle)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
TopoDS_Shape aShape = GetTopoShape(myShape) ;
@ -4471,6 +4539,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePipe( GEOM::GEOM_Shape_ptr pathShape,
GEOM::GEOM_Shape_ptr baseShape )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
TopoDS_Wire aWire ;
@ -4527,6 +4596,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePrism( GEOM::GEOM_Shape_ptr myShape,
const GEOM::PointStruct& P2 )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
TopoDS_Shape aShape = GetTopoShape(myShape) ;
@ -4560,6 +4630,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePrism( GEOM::GEOM_Shape_ptr myShape,
GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeCDG(GEOM::GEOM_Shape_ptr aShape)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
TopoDS_Shape shape = GetTopoShape(aShape) ;
@ -4614,6 +4685,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::Archimede(GEOM::GEOM_Shape_ptr aShape,
CORBA::Double aMeshingDeflection)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
double cste = -1;
@ -4687,6 +4759,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFillet( GEOM::GEOM_Shape_ptr shape,
const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
TopoDS_Shape tds ;
@ -4706,7 +4779,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFillet( GEOM::GEOM_Shape_ptr shape,
fill.Add(E);
}
for (int i = 1;i<=fill.NbContours();i++) {
fill.SetRadius(radius,i);
fill.SetRadius(radius,i,i);
}
tds = fill.Shape();
@ -4721,7 +4794,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFillet( GEOM::GEOM_Shape_ptr shape,
}
}
for (int i = 1;i<=fill.NbContours();i++) {
fill.SetRadius(radius,i);
fill.SetRadius(radius,i,i);
}
tds = fill.Shape();
}
@ -4751,6 +4824,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeChamfer( GEOM::GEOM_Shape_ptr shape,
const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID )
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result;
TopoDS_Shape tds ;
@ -4809,6 +4883,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeChamfer( GEOM::GEOM_Shape_ptr shape,
CORBA::Boolean GEOM_Gen_i::CheckShape(GEOM::GEOM_Shape_ptr shape)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
TopoDS_Shape S = GetTopoShape(shape) ;
if( S.IsNull() ) {
THROW_SALOME_CORBA_EXCEPTION("Shape is null", SALOME::BAD_PARAM);
@ -4829,6 +4904,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePlacedBox(CORBA::Double x1, CORBA::Double
CORBA::Double delta1, CORBA::Double delta2, CORBA::Double delta3)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
@ -4868,6 +4944,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePanel(GEOM::GEOM_Shape_ptr shape,
CORBA::Double delta)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
GEOM::GEOM_Shape_var result ;
TopoDS_Shape tds ;
TopoDS_Shape aShape = GetTopoShape(shape) ;
@ -4944,6 +5021,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePanel(GEOM::GEOM_Shape_ptr shape,
void GEOM_Gen_i::ExportIGES(const char* filename,GEOM::GEOM_Shape_ptr theShape)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
if (theShape->_is_nil())
{
THROW_SALOME_CORBA_EXCEPTION("Export IGES aborted", SALOME::BAD_PARAM);
@ -4976,6 +5054,7 @@ void GEOM_Gen_i::ExportIGES(const char* filename,GEOM::GEOM_Shape_ptr theShape)
void GEOM_Gen_i::ExportBREP(const char* filename,GEOM::GEOM_Shape_ptr theShape)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
if (theShape->_is_nil())
{
THROW_SALOME_CORBA_EXCEPTION("Export BRep aborted", SALOME::BAD_PARAM);
@ -5000,6 +5079,7 @@ void GEOM_Gen_i::ExportBREP(const char* filename,GEOM::GEOM_Shape_ptr theShape)
void GEOM_Gen_i::ExportSTEP(const char* filename,GEOM::GEOM_Shape_ptr theShape)
throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
if (theShape->_is_nil())
{
THROW_SALOME_CORBA_EXCEPTION("Export STEP aborted", SALOME::BAD_PARAM);

View File

@ -246,3 +246,12 @@ GEOM::GEOM_Gen_ptr GEOM_Shape_i::Engine()
{
return _engine;
}
//=======================================================================
//function : getShape
//purpose : return the TopoDS_Shape when client and servant are colocated, be careful
//=======================================================================
long GEOM_Shape_i::getShape() {
return((long)(&_geom));
}

View File

@ -112,6 +112,8 @@ public:
GEOM::GEOM_Shape::TMPFile* GetShapeStream();
GEOM::GEOM_Gen_ptr Engine();
long getShape();
};
#endif

View File

@ -227,6 +227,7 @@ bool GEOMBase::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString
needDisplay = true;
SALOMEDS::SObject_var obj = ActiveStudy->getStudyDocument()->FindObjectID(anIObject->getEntry());
if(!obj->_is_nil()) {
if (strcmp(obj->GetFatherComponent()->GetName(), "GEOM")) continue;
GEOM::GEOM_Shape_var aShape;
if(obj->FindAttribute(aTmpAttr, "AttributeIOR")) {
char *str = SALOMEDS::AttributeIOR::_narrow(aTmpAttr)->Value();
@ -370,6 +371,7 @@ bool GEOMBase::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString
SALOMEDS::SObject_var obj = ActiveStudy->getStudyDocument()->FindObjectID(anIObject->getEntry());
if(!obj->_is_nil()) {
if (strcmp(obj->GetFatherComponent()->GetName(), "GEOM")) continue;
GEOM::GEOM_Shape_var aShape;
if(obj->FindAttribute(aTmpAttr, "AttributeIOR")) {
char *str = SALOMEDS::AttributeIOR::_narrow(aTmpAttr)->Value();
@ -506,10 +508,10 @@ bool GEOMBase::Display(GEOM::GEOM_Shape_ptr aShape, Standard_CString name)
Standard_CString type;
GetShapeTypeString(shape,type);
aShape->NameType(type);
nameG += TCollection_AsciiString(type) + TCollection_AsciiString("_") + TCollection_AsciiString(myGeomGUI->GetNbGeom()++) + TCollection_AsciiString("\0");
nameG += TCollection_AsciiString(type) + TCollection_AsciiString("_") + TCollection_AsciiString(myGeomGUI->myNbGeom++) + TCollection_AsciiString("\0");
}
else
nameG += TCollection_AsciiString(aShape->NameType()) + TCollection_AsciiString("_") + TCollection_AsciiString(myGeomGUI->GetNbGeom()++) + TCollection_AsciiString("\0");
nameG += TCollection_AsciiString(aShape->NameType()) + TCollection_AsciiString("_") + TCollection_AsciiString(myGeomGUI->myNbGeom++) + TCollection_AsciiString("\0");
}
else
nameG = TCollection_AsciiString(name);

View File

@ -47,34 +47,58 @@ using namespace std;
#include <TopTools_ListOfShape.hxx>
#include <unistd.h>
#define HST_CLIENT_LEN 256
//=======================================================================
// function : Load()
// purpose :
//=======================================================================
static TopoDS_Shape Load( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape )
TopoDS_Shape GEOM_Client::Load( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape )
{
TopoDS_Shape S;
/* get sequence of bytes of resulting brep shape from GEOM server */
GEOM::GEOM_Shape::TMPFile_var SeqFile = aShape->GetShapeStream();
int sizebuf = SeqFile->length();
char* buf;
buf = (char*) &SeqFile[0];
istrstream streamBrep(buf,sizebuf);
BRep_Builder aBuilder;
BRepTools::Read(S, streamBrep, aBuilder);
return S;
char hst_client[HST_CLIENT_LEN];
gethostname(hst_client, HST_CLIENT_LEN);
Engines::Container_var ctn_server = geom->GetContainerRef();
long pid_server = ctn_server->getPID();
if ( (pid_client==pid_server) && (strcmp(hst_client, ctn_server->getHostName())==0) ) {
TopoDS_Shape* S = (TopoDS_Shape*)(aShape->getShape());
return(*S);
} else {
/* get sequence of bytes of resulting brep shape from GEOM server */
TopoDS_Shape S;
GEOM::GEOM_Shape::TMPFile_var SeqFile = aShape->GetShapeStream();
int sizebuf = SeqFile->length();
char* buf;
buf = (char*) &SeqFile[0];
istrstream streamBrep(buf,sizebuf);
BRep_Builder aBuilder;
BRepTools::Read(S, streamBrep, aBuilder);
return(S);
};
}
//=======================================================================
// function : Create()
// purpose :
// purpose : Create in client not in a container
//=======================================================================
GEOM_Client::GEOM_Client()
{
pid_client = (-1);
}
//=======================================================================
// function : Create()
// purpose :
//=======================================================================
GEOM_Client::GEOM_Client(Engines::Container_ptr client)
{
pid_client = client->getPID();
}
//=======================================================================
// function : Find()

View File

@ -75,18 +75,21 @@ public:
// Methods PUBLIC
//
Standard_EXPORT GEOM_Client();
Standard_EXPORT GEOM_Client(Engines::Container_ptr client);
Standard_EXPORT Standard_Integer Find( const TCollection_AsciiString& ShapeIOR, TopoDS_Shape& S ) ;
Standard_EXPORT void Bind( const TCollection_AsciiString& ShapeIOR, const TopoDS_Shape& S ) ;
Standard_EXPORT TopoDS_Shape GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape );
Standard_EXPORT void RemoveShapeFromBuffer( const TCollection_AsciiString& shapeIOR ) ;
Standard_EXPORT void ClearClientBuffer() ;
Standard_EXPORT unsigned int BufferLength() ;
TopoDS_Shape Load( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape);
private:
// Fields PRIVATE
//
TColStd_SequenceOfAsciiString myIORs ;
TopTools_SequenceOfShape myShapes ;
long pid_client;
};

View File

@ -81,9 +81,16 @@ GEOMContext* GEOMContext::GetOrCreateGeomGUI(QAD_Desktop* desktop)
/* GetCurrentStudy */
int studyId = desktop->getActiveStudy()->getStudyId();
GeomGUI->myComponentGeom->GetCurrentStudy(studyId);
GeomGUI->myNbGeom = GeomGUI->myComponentGeom->NbLabels();
}
/* GetCurrentStudy */
int studyId = desktop->getActiveStudy()->getStudyId();
GeomGUI->myComponentGeom->GetCurrentStudy(studyId);
//GeomGUI->myNbGeom = GeomGUI->myComponentGeom->NbLabels();
return GeomGUI;
}

View File

@ -49,12 +49,13 @@ public :
private :
QDialog* myActiveDialogBox; /* Unique active dialog box */
int myNbGeom; /* Unique name for a geom entity */
GEOM_Client myShapeReader;
Standard_CString myFatherior;
Sketch mySketcher;
public :
int myNbGeom; /* Unique name for a geom entity */
static GEOMContext* GetOrCreateGeomGUI(QAD_Desktop* desktop);
static GEOMContext* GetGeomGUI();

View File

@ -937,6 +937,10 @@ msgstr "Keep Object"
msgid "GEOM_PARTITION_ORIENTATION"
msgstr "Change Orientation"
#: GeometryGUI_PartitionDlg.cxx:45
msgid "SUPPRESS_RESULT"
msgstr "Suppress Result"
#: GeometryGUI_PipeDlg.cxx:47
msgid "GEOM_PIPE_TITLE"
msgstr "Pipe Construction"
@ -1299,3 +1303,10 @@ msgstr "Values"
msgid "GEOM_SKETCHER_TYPE"
msgstr "Type"
msgid "GEOM_FILLET_ABORT"
msgstr "Fillet can't be computed with radius %1"
msgid "GEOM_CHAMFER_ABORT"
msgstr "Chamfer can't be computed with %1 and %2"

View File

@ -49,7 +49,7 @@ msgstr "&Exploser"
#: GeometryGUI.cxx:563
msgid "GEOM_INF_LOADED"
msgstr "Le fichier %1 est chargé."
msgstr "Le fichier %1 est chargé."
#
#==============================================================================
@ -57,15 +57,15 @@ msgstr "Le fichier %1 est charg
#: GeometryGUI.cxx:3069
msgid "GEOM_PRP_COMMAND"
msgstr "Pas de commande associée à l'id = %1."
msgstr "Pas de commande associée à l'id = %1."
#: GeometryGUI.cxx:4977
msgid "GEOM_PRP_ABORT"
msgstr "L'opération a echoué"
msgstr "L'opération a echoué"
#: GeometryGUI.cxx:5058
msgid "GEOM_PRP_DONE"
msgstr "Opération effectuée"
msgstr "Opération effectuée"
#: GeometryGUI.cxx:3717
msgid "GEOM_PRP_LOADING"
@ -73,11 +73,11 @@ msgstr "Chargement de %1 ..."
#: GeometryGUI.cxx:1412
msgid "GEOM_PRP_NULLSHAPE"
msgstr "Erreur, objet inconsistant ou inapproprié !"
msgstr "Erreur, objet inconsistant ou inapproprié !"
#: GeometryGUI.cxx:5072
msgid "GEOM_PRP_READY"
msgstr "Prêt..."
msgstr "Prêt..."
#: GeometryGUI.cxx:1690
msgid "GEOM_PRP_SELECT_SUBSHAPES"
@ -127,11 +127,11 @@ msgstr "Angle :"
#: GeometryGUI.cxx:3941
msgid "GEOM_MEN_COMPONENT"
msgstr "Géometrie"
msgstr "Géometrie"
#: GeometryGUI.cxx:4389
msgid "GEOM_MEN_ENTER_ANGLE"
msgstr "Saisir un angle en degrés"
msgstr "Saisir un angle en degrés"
#: GeometryGUI.cxx:3758
msgid "GEOM_MEN_EXPORT"
@ -250,7 +250,7 @@ msgstr "Objet %1"
#Object and result
msgid "GEOM_OBJECT_RESULT"
msgstr "Objet Et Résultat"
msgstr "Objet Et Résultat"
#Point
msgid "GEOM_POINT"
@ -310,7 +310,7 @@ msgstr "poids"
#Coordinates
msgid "GEOM_COORDINATES"
msgstr "Coordonnées"
msgstr "Coordonnées"
#Coor.
msgid "GEOM_COOR"
@ -362,11 +362,11 @@ msgstr "Base"
#Water Density
msgid "GEOM_WATER_DENSITY"
msgstr "Densité de l'eau :"
msgstr "Densité de l'eau :"
#Meshing Deflection
msgid "GEOM_MESHING_DEFLECTION"
msgstr "Déflection Du Maillage :"
msgstr "Déflection Du Maillage :"
#Dimensions
msgid "GEOM_DIMENSIONS"
@ -374,11 +374,11 @@ msgstr "Dimensions"
#Precision
msgid "GEOM_PRECISION"
msgstr "Précision :"
msgstr "Précision :"
#Selection
msgid "GEOM_SELECTION"
msgstr "Sélection"
msgstr "Sélection"
#Nb. Times
msgid "GEOM_NB_TIMES"
@ -414,7 +414,7 @@ msgstr "Partition"
#Tolerance
msgid "GEOM_TOLERANCE"
msgstr "Tolérance"
msgstr "Tolérance"
#Orientation
msgid "GEOM_ORIENTATION"
@ -426,7 +426,7 @@ msgstr "Pipe"
#Revolution
msgid "GEOM_REVOLUTION"
msgstr "Révolution"
msgstr "Révolution"
#Rotation
msgid "GEOM_ROTATION"
@ -434,7 +434,7 @@ msgstr "Rotation"
#Archimede
msgid "GEOM_ARCHIMEDE"
msgstr "Archimède"
msgstr "Archimède"
#Common
msgid "GEOM_COMMON"
@ -594,7 +594,7 @@ msgstr "Solide"
#Sphere
msgid "GEOM_SPHERE"
msgstr "Sphère"
msgstr "Sphère"
#Conical Face
msgid "GEOM_SURFCONE"
@ -606,7 +606,7 @@ msgstr "Face Cylindrique"
#Spherical Face
msgid "GEOM_SURFSPHERE"
msgstr "Face Sphèrique"
msgstr "Face Sphèrique"
#Toroidal Face
msgid "GEOM_SURFTORUS"
@ -638,7 +638,7 @@ msgstr "Wire"
#Parameter
msgid "GEOM_PARAMETER"
msgstr "Paramètre :"
msgstr "Paramètre :"
#
@ -691,7 +691,7 @@ msgstr "D2 :"
#: GeometryGUI.cxx
msgid "GEOM_STEP_TITLE"
msgstr "Increment par défaut lors des constructions"
msgstr "Increment par défaut lors des constructions"
#: GeometryGUI_ArcDlg.cxx:45
msgid "GEOM_ARC_TITLE"
@ -699,7 +699,7 @@ msgstr "Construction d'un Arc"
#: GeometryGUI_ArchimedeDlg.cxx:55
msgid "GEOM_ARCHIMEDE_TITLE"
msgstr "Construction d'Archimède"
msgstr "Construction d'Archimède"
#: GeometryGUI_BndBoxDlg.cxx:59
msgid "GEOM_BNDBOX_TITLE"
@ -739,7 +739,7 @@ msgstr "Construction d'un Cercle"
#: GeometryGUI_CenterMassDlg.cxx:77
msgid "GEOM_CMASS_TITLE"
msgstr "Centre De Gravité"
msgstr "Centre De Gravité"
msgid "GEOM_PLANE_SIZE"
msgstr "Taille du plan :"
@ -750,7 +750,7 @@ msgstr "BOOLEEN : Jonction De Deux Objets"
#: GeometryGUI_CompoundDlg.cxx:44
msgid "GEOM_COMPOUND_TITLE"
msgstr "Création d'un Compound"
msgstr "Création d'un Compound"
#: GeometryGUI_ConeDlg.cxx:49
msgid "GEOM_CONE_TITLE"
@ -782,27 +782,27 @@ msgstr "Objets Et Resultats"
#: GeometryGUI_EdgeDlg.cxx:47
msgid "GEOM_EDGE_TITLE"
msgstr "Création d'un Edge"
msgstr "Création d'un Edge"
#: GeometryGUI_FilletDlg.cxx:58
msgid "GEOM_FILLET_TITLE"
msgstr "Construction d'un Congé"
msgstr "Construction d'un Congé"
#: GeometryGUI_FilletDlg.cxx:58
msgid "GEOM_FILLET_ALL"
msgstr "Congé sur toute la Shape"
msgstr "Congé sur toute la Shape"
#: GeometryGUI_FilletDlg.cxx:58
msgid "GEOM_FILLET_EDGES"
msgstr "Congé sur Edges de la Shape"
msgstr "Congé sur Edges de la Shape"
#: GeometryGUI_FilletDlg.cxx:58
msgid "GEOM_FILLET_FACES"
msgstr "Congé sur Faces de la Shape"
msgstr "Congé sur Faces de la Shape"
#: GeometryGUI_FaceDlg.cxx:49
msgid "GEOM_FACE_TITLE"
msgstr "Création d'une Face"
msgstr "Création d'une Face"
#: GeometryGUI_FaceDlg.cxx:78
msgid "GEOM_FACE_FFW"
@ -810,7 +810,7 @@ msgstr "Face a partir d'un wire"
#: GeometryGUI_FaceDlg.cxx:103
msgid "GEOM_FACE_OPT"
msgstr "Création d'une Face plane"
msgstr "Création d'une Face plane"
#: GeometryGUI_FillingDlg.cxx:53
msgid "GEOM_FILLING_TITLE"
@ -912,6 +912,10 @@ msgstr "Objet garde"
msgid "GEOM_PARTITION_ORIENTATION"
msgstr "Change l'orientation"
#: GeometryGUI_PartitionDlg.cxx:45
msgid "SUPPRESS_RESULT"
msgstr "Suppress Result"
#: GeometryGUI_PipeDlg.cxx:47
msgid "GEOM_PIPE_TITLE"
msgstr "Construction d'une Pipe"
@ -1115,7 +1119,7 @@ msgid "GEOM_MULTIROTATION_DOUBLE"
msgstr "Multi Rotation Double"
msgid "GEOM_PARAM_POINT"
msgstr "Point paramétrique"
msgstr "Point paramétrique"
#
#==============================================================================
@ -1127,4 +1131,11 @@ msgstr "Filaire"
#: GeometryGUI.cxx:4613
msgid "GEOM_MEN_SHADING"
msgstr "Ombré"
msgstr "Ombré"
msgid "GEOM_FILLET_ABORT"
msgstr "Le congé ne peut-être realisé avec un rayon de %1 "
msgid "GEOM_CHAMFER_ABORT"
msgstr "Le chanfrein ne peut-être realisé avec %1 et %2 "

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "GeometryGUI.h"
// Open CASCADE Includes
@ -40,9 +39,12 @@ using namespace std;
#include "OCCViewer_Viewer3d.h"
#include "OCCViewer_ViewPort3d.h"
#include "VTKViewer_ViewFrame.h"
#include "VTKViewer_InteractorStyleSALOME.h"
#include "SALOME_Selection.h"
using namespace std;
/* The object itself created in the static method 'GetOrCreateGEOMBase()' */
static GEOMContext* GeomGUI = 0;
@ -336,6 +338,30 @@ bool GeometryGUI::OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFr
return false;
}
static void UpdateVtkSelection(QAD_Desktop* parent)
{
if (!parent->getActiveStudy()) return;
QList<QAD_StudyFrame> aFrameList = parent->getActiveStudy()->getStudyFrames();
for (QAD_StudyFrame* aStudyFrame = aFrameList.first(); aStudyFrame; aStudyFrame = aFrameList.next()) {
if (aStudyFrame->getTypeView() == VIEW_VTK) {
QAD_ViewFrame* aViewFrame = aStudyFrame->getRightFrame()->getViewFrame();
VTKViewer_ViewFrame* aVtkViewFrame = dynamic_cast<VTKViewer_ViewFrame*>(aViewFrame);
if (!aVtkViewFrame) continue;
VTKViewer_RenderWindowInteractor* anInteractor = aVtkViewFrame->getRWInteractor();
if (anInteractor) {
anInteractor->SetSelectionProp();
anInteractor->SetSelectionTolerance();
VTKViewer_InteractorStyleSALOME* aStyle = anInteractor->GetInteractorStyleSALOME();
if (aStyle) {
aStyle->setPreselectionProp();
}
}
}
}
}
//=================================================================================
// function : SetSettings()
@ -409,6 +435,9 @@ bool GeometryGUI::SetSettings(QAD_Desktop* parent)
Mb->setItemEnabled(413, ViewOCC);// ShadingColor Settings
Mb->setItemEnabled(414, ViewOCC);// Isos Settings
// PAL5356: update VTK selection
::UpdateVtkSelection(parent);
return true;
}
@ -507,6 +536,7 @@ void GeometryGUI::activeStudyChanged(QAD_Desktop* parent)
if(GeomGUI != 0) {
QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
GeomGUI->myNbGeom = GeomGUI->myComponentGeom->NbLabels();
if(GeomGUI->myState == 2) {
Mb->setItemEnabled(405, false);//SKETCHER
GeomGUI->GetSketcher().Clear();
@ -529,6 +559,10 @@ void GeometryGUI::activeStudyChanged(QAD_Desktop* parent)
GeomGUI->EmitSignalCloseAllDialogs();
GeomGUI = 0;
}
// PAL5356: update VTK selection
::UpdateVtkSelection(parent);
return;
}
@ -594,4 +628,10 @@ extern "C"
buffer[0] = (int)VIEW_OCC;
if (--bufferSize) buffer[1] = (int)VIEW_VTK;
}
void deactivate()
{
if ( GeomGUI )
GeomGUI->EmitSignalCloseAllDialogs();
}
}

View File

@ -163,7 +163,7 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
}
else {
Quantity_Color Default = Quantity_Color();
color = QColor ((int)Default.Red() * 255.0, (int)Default.Green()* 255.0, (int)Default.Blue() * 255.0);
color = QColor ((int)( Default.Red() * 255.0 ), (int)( Default.Green() * 255.0 ), (int)( Default.Blue() * 255.0 ) );
}
QColor c = QColorDialog::getColor(color, QAD_Application::getDesktop());
@ -372,7 +372,7 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
Quantity_Color CSFColor;
Shape->Color(CSFColor);
QColor c = QColorDialog::getColor(QColor(CSFColor.Red() * 255.0, CSFColor.Green()* 255.0, CSFColor.Blue() * 255.0), QAD_Application::getDesktop());
QColor c = QColorDialog::getColor(QColor((int)(CSFColor.Red() * 255.0), (int)(CSFColor.Green() * 255.0), (int)(CSFColor.Blue() * 255.0)), QAD_Application::getDesktop());
if(c.isValid()) {
CSFColor = Quantity_Color (c.red()/255., c.green()/255., c.blue()/255., Quantity_TOC_RGB);
@ -478,12 +478,49 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
while(useSubItems?anIter->More():!anAttr->_is_nil()) {
if(!obj->FindAttribute(anAttr, "AttributeIOR") &&
obj->FindAttribute(anAttr, "AttributePersistentRef")) {
// load
Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer","GEOM");
if (!CORBA::is_nil(comp)) {
SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp);
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
aStudyBuilder->LoadWith(aStudy->FindComponent("GEOM"),driver);
SALOMEDS::SComponent_var FComp = obj->GetFatherComponent();
if (!CORBA::is_nil(FComp)) {
if (FComp->FindAttribute(anAttr, "AttributeName")) {
SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
QString compName = parent->getComponentName(aName->Value());
// parent->loadComponentData(parent->getComponentName(aName->Value()));
Engines::Component_var comp ;
if ( compName.compare("SUPERV") == 0 ) {
comp = parent->getEngine( "SuperVisionContainer", compName) ;
}
else {
comp = parent->getEngine( "FactoryServer", compName);
if ( comp->_is_nil() )
comp = parent->getEngine( "FactoryServerPy", compName);
}
if (!CORBA::is_nil(comp)) {
SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp);
if (!CORBA::is_nil(driver)) {
SALOMEDS::StudyBuilder_var B = aStudy->NewBuilder();
if (!CORBA::is_nil(B)) {
B->LoadWith(FComp,driver);
} else {
return false;
}
} else {
MESSAGE("loadComponentData(): Driver is null");
return false;
}
} else {
MESSAGE("loadComponentData(): Engine is null");
return false;
}
// // load
// Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer","GEOM");
// if (!CORBA::is_nil(comp)) {
// SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp);
// SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
// SALOMEDS::SComponent_var SC = aStudy->FindComponent("GEOM");
// if (!CORBA::is_nil(SC))
// aStudyBuilder->LoadWith(SC,driver);
}
}
else {
MESSAGE("Component is null");
@ -752,7 +789,7 @@ bool GEOMToolsGUI::Import(int aState)
// if (aLocked) return false;
father->ComponentIOR(myGeomGUI->GetFatherior());
QString nameShape = QAD_Tools::getFileNameFromPath(file,false) + QString("_%1").arg(myGeomGUI->GetNbGeom()++);
QString nameShape = QAD_Tools::getFileNameFromPath(file,false) + QString("_%1").arg(myGeomGUI->myNbGeom++);
if(myGeomBase->Display(aShape, strdup(nameShape.latin1()))) {
QAD_Application::getDesktop()->getActiveStudy()->setMessage( tr("GEOM_INF_LOADED").arg(QAD_Tools::getFileNameFromPath( file )) );

View File

@ -172,6 +172,7 @@ void GenerationGUI_FillingDlg::ClickOnOk()
//=================================================================================
void GenerationGUI_FillingDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -187,7 +187,7 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
}
else if(myEditCurrentArgument == GroupPoints->LineEdit2) {
myOkShape2 = false;
if(S.ShapeType() != TopAbs_COMPSOLID && S.ShapeType() != TopAbs_COMPOUND && S.ShapeType() != TopAbs_SOLID && S.ShapeType() != TopAbs_SHAPE && S.ShapeType() != TopAbs_VERTEX) {
if(S.ShapeType() == TopAbs_WIRE || S.ShapeType() == TopAbs_EDGE ) {
myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult)
return;

View File

@ -146,6 +146,7 @@ void GenerationGUI_PrismDlg::ClickOnOk()
//=================================================================================
void GenerationGUI_PrismDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -145,6 +145,7 @@ void GenerationGUI_RevolDlg::ClickOnOk()
//=================================================================================
void GenerationGUI_RevolDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -37,6 +37,8 @@ using namespace std;
#include <qtextedit.h>
#include <BRep_Tool.hxx>
//=================================================================================
// class : MeasureGUI_WhatisDlg()
// purpose : Constructs a MeasureGUI_WhatisDlg which is a child of 'parent', with the
@ -211,6 +213,13 @@ void MeasureGUI_WhatisDlg::CalculateWhatis(const TopoDS_Shape& S)
return;
TCollection_AsciiString Astr;
if ( S.ShapeType() == TopAbs_EDGE ) {
if( BRep_Tool::Degenerated(TopoDS::Edge(S)) ) {
Astr = Astr + " " + strdup(SelectedName.latin1()) + " is a degenerated edge \n";
}
}
Astr = Astr + " Number of shapes in " + strdup(SelectedName.latin1()) + " : \n";
try {

View File

@ -152,6 +152,7 @@ void OperationGUI_ArchimedeDlg::ClickOnOk()
//=================================================================================
void OperationGUI_ArchimedeDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if(myOkIO)
myOperationGUI->Archimede(myIO, myWeight, myWaterDensity, myMeshingDeflection);

View File

@ -30,6 +30,7 @@ using namespace std;
#include "OperationGUI_ChamferDlg.h"
#include "DisplayGUI.h"
#include "QAD_MessageBox.h"
#include <AIS_InteractiveContext.hxx>
#include <BRepFilletAPI_MakeChamfer.hxx>
@ -38,6 +39,9 @@ using namespace std;
#include <TopExp.hxx>
#include <Precision.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
//=================================================================================
// class : OperationGUI_ChamferDlg()
// purpose : Constructs a OperationGUI_ChamferDlg which is a child of 'parent', with the
@ -200,6 +204,11 @@ void OperationGUI_ChamferDlg::ConstructorsClicked(int constructorId)
myUseLocalContext = false;
}
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC) {
myConstructorId = constructorId = 0; //No subshape selection if viewer is not OCC
RadioButton1->setChecked(TRUE);
}
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
switch (constructorId)
{
@ -271,6 +280,7 @@ void OperationGUI_ChamferDlg::ClickOnOk()
//=================================================================================
void OperationGUI_ChamferDlg::ClickOnApply()
{
buttonApply->setFocus();
QApplication::setOverrideCursor(Qt::waitCursor);
QAD_Application::getDesktop()->putInfo(tr(""));
myGeomBase->EraseSimulationShape();
@ -538,49 +548,45 @@ void OperationGUI_ChamferDlg::ResetStateOfDialog()
//=================================================================================
void OperationGUI_ChamferDlg::MakePreview()
{
QApplication::setOverrideCursor(Qt::waitCursor);
if(!myOkShape) {
QApplication::restoreOverrideCursor();
return;
}
GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID;
ListOfID->length(0);
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(myShapeIOR);
if(theObj->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY"));
QApplication::restoreOverrideCursor();
return;
}
try {
if(myD1 <= Precision::Confusion() || myD2 <= Precision::Confusion()) {
QApplication::restoreOverrideCursor();
return;
QApplication::setOverrideCursor( Qt::waitCursor );
TopoDS_Shape tds ;
try
{
BRepFilletAPI_MakeChamfer MC(myShape);
switch (myConstructorId)
{
case 0: /* Chamfer All */
{
TopTools_IndexedDataMapOfShapeListOfShape M;
TopExp::MapShapesAndAncestors(myShape,TopAbs_EDGE,TopAbs_FACE,M);
for (int i = 1;i<=M.Extent();i++)
{
TopoDS_Edge E = TopoDS::Edge(M.FindKey(i));
TopoDS_Face F = TopoDS::Face(M.FindFromIndex(i).First());
if (!BRepTools::IsReallyClosed(E, F) && !BRep_Tool::Degenerated(E))
MC.Add(myD1, myD2,E,F);
}
tds = MC.Shape();
break;
}
// case 1: /* Chamfer edges */
// case 2: /* Chamfer Faces */
}
if (!tds.IsNull())
{
mySimulationTopoDs = tds;
myGeomBase->DisplaySimulationShape( mySimulationTopoDs ) ;
}
GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(myShapeIOR);
GEOM::GEOM_Shape_var result = myGeom->MakeChamfer(aShape, myD1, myD2, myShapeType, ListOfID);
if(result->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT"));
}
catch(Standard_Failure)
{
QAD_MessageBox::warn1 (QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_CHAMFER_ABORT").arg(myD1).arg(myD2), tr("GEOM_BUT_OK"));
Group1->SpinBox_DX->SetValue(5.0);
Group1->SpinBox_DY->SetValue(5.0);
myGeomBase->EraseSimulationShape() ;
mySimulationTopoDs.Nullify() ;
QApplication::restoreOverrideCursor();
return;
}
TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result);
mySimulationTopoDs = S;
myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
}
catch(Standard_Failure) {
MESSAGE("Exception catched in MakePreview");
QApplication::restoreOverrideCursor();
return;
}
QApplication::restoreOverrideCursor();
return;
}

View File

@ -30,12 +30,16 @@ using namespace std;
#include "OperationGUI_FilletDlg.h"
#include "DisplayGUI.h"
#include "QAD_MessageBox.h"
#include <AIS_InteractiveContext.hxx>
#include <TopExp_Explorer.hxx>
#include <BRepFilletAPI_MakeFillet.hxx>
#include <Precision.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
//=================================================================================
// class : OperationGUI_FilletDlg()
// purpose : Constructs a OperationGUI_FilletDlg which is a child of 'parent', with the
@ -181,6 +185,11 @@ void OperationGUI_FilletDlg::ConstructorsClicked(int constructorId)
myUseLocalContext = false;
}
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC) {
myConstructorId = constructorId = 0; //No subshape selection if viewer is not OCC
RadioButton1->setChecked(TRUE);
}
connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
switch (constructorId)
{
@ -249,6 +258,7 @@ void OperationGUI_FilletDlg::ClickOnOk()
//=================================================================================
void OperationGUI_FilletDlg::ClickOnApply()
{
buttonApply->setFocus();
QApplication::setOverrideCursor(Qt::waitCursor);
QAD_Application::getDesktop()->putInfo(tr(""));
myGeomBase->EraseSimulationShape();
@ -504,47 +514,56 @@ void OperationGUI_FilletDlg::ValueChangedInSpinBox(double newValue)
//=================================================================================
void OperationGUI_FilletDlg::MakePreview()
{
QApplication::setOverrideCursor(Qt::waitCursor);
if(!myOkShape) {
QApplication::restoreOverrideCursor();
return;
}
GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID;
ListOfID->length(0);
SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(myShapeIOR);
if(theObj->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY"));
QApplication::restoreOverrideCursor();
return;
}
try {
if(myRadius <= Precision::Confusion()) {
QApplication::restoreOverrideCursor();
return;
QApplication::setOverrideCursor( Qt::waitCursor );
TopoDS_Shape tds ;
try
{
BRepFilletAPI_MakeFillet fill(myShape);
switch (myConstructorId)
{
case 0: /* Fillet All */
{
TopExp_Explorer Exp ( myShape, TopAbs_EDGE );
for (Exp; Exp.More(); Exp.Next())
{
TopoDS_Edge E =TopoDS::Edge(Exp.Current());
fill.Add(E);
}
for (int i = 1;i<=fill.NbContours();i++) {
try
{
fill.SetRadius(myRadius,i,i);
}
catch(Standard_Failure)
{
QAD_MessageBox::warn1 (QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_FILLET_ABORT").arg(myRadius), tr("GEOM_BUT_OK"));
Group1->SpinBox_DX->SetValue(5.0);
myGeomBase->EraseSimulationShape() ;
mySimulationTopoDs.Nullify() ;
QApplication::restoreOverrideCursor();
return;
}
}
tds = fill.Shape();
break;
}
// case 1: /* Fillet edges */
// case 2: /* Fillet Faces */
}
if (!tds.IsNull())
{
mySimulationTopoDs = tds;
myGeomBase->DisplaySimulationShape( mySimulationTopoDs ) ;
}
}
GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(myShapeIOR);
GEOM::GEOM_Shape_var result = myGeom->MakeFillet(aShape, myRadius, myShapeType, ListOfID);
if(result->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT"));
catch(Standard_Failure)
{
QAD_MessageBox::warn1 (QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_FILLET_ABORT").arg(myRadius), tr("GEOM_BUT_OK"));
Group1->SpinBox_DX->SetValue(5.0);
myGeomBase->EraseSimulationShape() ;
mySimulationTopoDs.Nullify() ;
QApplication::restoreOverrideCursor();
return;
}
TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result);
mySimulationTopoDs = S;
myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
}
catch(Standard_Failure) {
MESSAGE("Exception catched in MakePreview");
QApplication::restoreOverrideCursor();
return;
}
}
QApplication::restoreOverrideCursor();
return;
}

View File

@ -52,6 +52,7 @@ OperationGUI_PartitionDlg::OperationGUI_PartitionDlg(QWidget* parent, const char
GroupPoints = new DlgRef_4Sel1List_QTD(this, "GroupPoints");
GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION"));
GroupPoints->GroupBox2->setTitle(tr("SUPPRESS_RESULT"));
GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS"));
GroupPoints->TextLabel2->setText(tr("GEOM_TOOL_OBJECT"));
GroupPoints->TextLabel3->setText(tr("GEOM_RECONSTRUCTION_LIMIT"));

View File

@ -216,14 +216,17 @@ void PrimitiveGUI::MakeConeAndDisplay(const gp_Pnt BasePoint, const gp_Dir aDir,
const double Radius1, const double Radius2, const double aHeight)
{
try {
if((Radius1 <= Precision::Confusion() && Radius2 <= Precision::Confusion()) || aHeight <= Precision::Confusion())
double myRadius2 = Radius2;
if(myRadius2 < Precision::Confusion())
myRadius2 = Precision::Confusion();
if(Radius1 <= Precision::Confusion() || aHeight <= Precision::Confusion())
return;
GEOM::PointStruct pstruct = myGeom->MakePointStruct(BasePoint.X(), BasePoint.Y(), BasePoint.Z());
GEOM::PointStruct d = myGeom->MakePointStruct(aDir.X(), aDir.Y(), aDir.Z());
GEOM::DirStruct dstruct = myGeom->MakeDirection(d);
GEOM::GEOM_Shape_var result = myGeom->MakeCone(pstruct, dstruct, Radius1, Radius2, aHeight);
GEOM::GEOM_Shape_var result = myGeom->MakeCone(pstruct, dstruct, Radius1, myRadius2, aHeight);
if(result->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT"));
return;

View File

@ -221,6 +221,7 @@ void PrimitiveGUI_BoxDlg::ClickOnOk()
//=================================================================================
void PrimitiveGUI_BoxDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -120,11 +120,11 @@ void PrimitiveGUI_ConeDlg::Init()
step = St.toDouble();
/* min, max, step and decimals for spin boxes & initial values */
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3);
GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, step, 3);
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.000, 999.999, step, 3);
GroupPoints->SpinBox_DY->RangeStepAndValidator(0.000, 999.999, step, 3);
GroupPoints->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3);
GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3);
GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, step, 3);
GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.000, 999.999, step, 3);
GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.000, 999.999, step, 3);
GroupDimensions->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3);
GroupPoints->SpinBox_DX->SetValue(myRadius1);
@ -247,6 +247,7 @@ void PrimitiveGUI_ConeDlg::ClickOnOk()
//=================================================================================
void PrimitiveGUI_ConeDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -234,6 +234,7 @@ void PrimitiveGUI_CylinderDlg::ClickOnOk()
//=================================================================================
void PrimitiveGUI_CylinderDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -205,6 +205,7 @@ void PrimitiveGUI_SphereDlg::ClickOnOk()
//=================================================================================
void PrimitiveGUI_SphereDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if(mySimulationTopoDs.IsNull())
return;

View File

@ -230,6 +230,7 @@ void PrimitiveGUI_TorusDlg::ClickOnOk()
//=================================================================================
void PrimitiveGUI_TorusDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -311,11 +311,11 @@ bool RepairGUI::OnSuppressFaces(const TopoDS_Shape& ShapeTopo, const char* Shape
Standard_CString Type;
if(myGeomBase->GetShapeTypeString(S, Type)) {
aShellOrFace->NameType(Type);
sprintf (nameG, "%s_%d", Type, myGeomGUI->GetNbGeom()++);
sprintf (nameG, "%s_%d", Type, myGeomGUI->myNbGeom++);
}
else {
aShellOrFace->NameType(tr("GEOM_SHAPE"));
sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->myNbGeom++);
}
/* Display with name */

View File

@ -140,6 +140,7 @@ void RepairGUI_OrientationDlg::ClickOnOk()
//=================================================================================
void RepairGUI_OrientationDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -134,6 +134,7 @@ void RepairGUI_SewingDlg::ClickOnOk()
//=================================================================================
void RepairGUI_SewingDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if(myOkListShapes)
myRepairGUI->MakeSewingAndDisplay(myListShapes, myPrecision);

View File

@ -131,6 +131,7 @@ void TransformationGUI_MirrorDlg::ClickOnOk()
//=================================================================================
void TransformationGUI_MirrorDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -258,6 +258,7 @@ void TransformationGUI_MultiRotationDlg::ClickOnOk()
//=================================================================================
void TransformationGUI_MultiRotationDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;
@ -429,13 +430,13 @@ void TransformationGUI_MultiRotationDlg::ValueChangedInSpinBox(double newValue)
QObject* send = (QObject*)sender();
if(send == GroupPoints->SpinBox_DX || send == GroupDimensions->SpinBox_DY1)
myNbTimes1 = newValue;
myNbTimes1 = (int)newValue;
else if(send == GroupDimensions->SpinBox_DX1)
myAng = newValue;
else if(send == GroupDimensions->SpinBox_DX2)
myStep = newValue;
else if(send == GroupDimensions->SpinBox_DY2)
myNbTimes2 = newValue;
myNbTimes2 = (int)newValue;
if(myOkBase && myOkDir)
this->MakeMultiRotationSimulationAndDisplay();

View File

@ -269,6 +269,7 @@ void TransformationGUI_MultiTranslationDlg::ClickOnOk()
//=================================================================================
void TransformationGUI_MultiTranslationDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;
@ -488,7 +489,7 @@ void TransformationGUI_MultiTranslationDlg::ValueChangedInSpinBox(double newValu
if(send == GroupPoints->SpinBox_DX)
myStep1 = newValue;
else if(send == GroupPoints->SpinBox_DY)
myNbTimes1 = newValue;
myNbTimes1 = (int)newValue;
if(myOkBase && myOkDir1)
this->MakeMultiTranslationSimulationAndDisplay();
break;
@ -498,11 +499,11 @@ void TransformationGUI_MultiTranslationDlg::ValueChangedInSpinBox(double newValu
if(send == GroupDimensions->SpinBox_DX1)
myStep1 = newValue;
else if(send == GroupDimensions->SpinBox_DY1)
myNbTimes1 = newValue;
myNbTimes1 = (int)newValue;
else if(send == GroupDimensions->SpinBox_DX2)
myStep2 = newValue;
else if(send == GroupDimensions->SpinBox_DY2)
myNbTimes2 = newValue;
myNbTimes2 = (int)newValue;
if(myOkBase && myOkDir1 && myOkDir2)
this->MakeMultiTranslationSimulationAndDisplay();
break;

View File

@ -142,6 +142,7 @@ void TransformationGUI_RotationDlg::ClickOnOk()
//=================================================================================
void TransformationGUI_RotationDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -140,6 +140,7 @@ void TransformationGUI_ScaleDlg::ClickOnOk()
//=================================================================================
void TransformationGUI_ScaleDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;

View File

@ -148,6 +148,7 @@ void TransformationGUI_TranslationDlg::ClickOnOk()
//=================================================================================
void TransformationGUI_TranslationDlg::ClickOnApply()
{
buttonApply->setFocus();
QAD_Application::getDesktop()->putInfo(tr(""));
if (mySimulationTopoDs.IsNull())
return;