DCQ : merge

This commit is contained in:
dcq 2004-05-04 14:16:44 +00:00
parent d973076d2f
commit 8b14e1e649
28 changed files with 156 additions and 38 deletions

View File

@ -26,12 +26,15 @@
// Module : GEOM
// $Header$
using namespace std;
#include "BuildGUI_EdgeDlg.h"
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <Precision.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : BuildGUI_EdgeDlg()
// purpose : Constructs a BuildGUI_EdgeDlg which is a child of 'parent', with the

View File

@ -264,6 +264,7 @@ const char* GEOM_Swig::getShapeTypeString(const char* IOR)
case TopAbs_SHAPE:
{ return "Shape" ;}
}
return 0;
}

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header:
using namespace std;
#include "GEOMToolsGUI.h"
#include "QAD_Config.h"
@ -61,6 +60,10 @@ using namespace std;
#include "GEOMToolsGUI_NbIsosDlg.h" // Method ISOS adjustement
#include "GEOMToolsGUI_TransparencyDlg.h" // Method TRANSPARENCY adjustement
#include "utilities.h"
using namespace std;
//=======================================================================
// function : GEOMToolsGUI()
// purpose : Constructor
@ -151,7 +154,7 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
{
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC)
break;
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
Handle (AIS_InteractiveContext) ic = v3d->getAISContext();
@ -792,7 +795,7 @@ bool GEOMToolsGUI::Import(int aState)
QString nameShape = QAD_Tools::getFileNameFromPath(file,false) + QString("_%1").arg(myGeomGUI->myNbGeom++);
if(myGeomBase->Display(aShape, strdup(nameShape.latin1()))) {
if(myGeomBase->Display(aShape, (char*)nameShape.latin1())) {
QAD_Application::getDesktop()->getActiveStudy()->setMessage( tr("GEOM_INF_LOADED").arg(QAD_Tools::getFileNameFromPath( file )) );
QAD_Application::getDesktop()->putInfo( tr("GEOM_PRP_READY"));
}
@ -840,7 +843,7 @@ bool GEOMToolsGUI::Export(int aState)
QApplication::setOverrideCursor( Qt::waitCursor );
// Standard_Boolean result = BRepTools::Write(Shape->Shape(), strdup(file.latin1()) );
try {
myGeom->ExportBREP(strdup( file.latin1()), aShape);
myGeom->ExportBREP((char*)file.latin1(), aShape);
}
catch (const SALOME::SALOME_Exception& S_ex) {
QtCatchCorbaException(S_ex);
@ -867,7 +870,7 @@ bool GEOMToolsGUI::Export(int aState)
if ( !file.isEmpty() && !aShape->_is_nil() ) {
QApplication::setOverrideCursor( Qt::waitCursor );
try {
myGeom->ExportIGES(strdup( file.latin1()), aShape);
myGeom->ExportIGES((char*)file.latin1(), aShape);
}
catch (const SALOME::SALOME_Exception& S_ex) {
QtCatchCorbaException(S_ex);
@ -913,7 +916,7 @@ bool GEOMToolsGUI::Export(int aState)
QApplication::setOverrideCursor( Qt::waitCursor ) ;
try {
myGeom->ExportSTEP(strdup( file.latin1()), aShape);
myGeom->ExportSTEP((char*)file.latin1(), aShape);
}
catch (const SALOME::SALOME_Exception& S_ex) {
QtCatchCorbaException(S_ex);
@ -939,6 +942,7 @@ bool GEOMToolsGUI::Export(int aState)
}
QApplication::restoreOverrideCursor() ;
return true;
}

View File

@ -26,9 +26,9 @@
// Module : GEOM
// $Header$
using namespace std;
#include "GenerationGUI_FillingDlg.h"
#include "QAD_WaitCursor.h"
#include "QAD_Config.h"
#include <GeomFill_SectionGenerator.hxx>
@ -38,8 +38,14 @@ using namespace std;
#include <Geom_TrimmedCurve.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Iterator.hxx>
#include <BRep_Tool.hxx>
#include <Precision.hxx>
#include <Standard_ErrorHandler.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : GenerationGUI_FillingDlg()
@ -210,10 +216,14 @@ void GenerationGUI_FillingDlg::SelectionIntoArgument()
return;
if(myEditCurrentArgument == GroupPoints->LineEdit1 && mySectionShape.ShapeType() == TopAbs_COMPOUND) {
myEditCurrentArgument->setText(aString);
myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult)
return;
// mySectionShape should be a compound of edges
for ( TopoDS_Iterator it( mySectionShape ); it.More(); it.Next() )
if ( it.Value().ShapeType() != TopAbs_EDGE )
return;
myEditCurrentArgument->setText(aString);
myOkSectionShape = true;
}
@ -319,6 +329,8 @@ void GenerationGUI_FillingDlg::ValueChangedInSpinBox(double newValue)
//=================================================================================
void GenerationGUI_FillingDlg::MakeFillingSimulationAndDisplay()
{
QAD_WaitCursor wc;
myGeomBase->EraseSimulationShape();
mySimulationTopoDs.Nullify();
@ -336,6 +348,7 @@ void GenerationGUI_FillingDlg::MakeFillingSimulationAndDisplay()
if( Scurrent.IsNull() || Scurrent.ShapeType() != TopAbs_EDGE)
return;
C = BRep_Tool::Curve(TopoDS::Edge(Scurrent), First, Last);
if (C.IsNull()) continue;
C = new Geom_TrimmedCurve(C, First, Last);
Section.AddCurve(C) ;
i++ ;

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "GenerationGUI_PipeDlg.h"
#include <TopoDS_Edge.hxx>
@ -38,6 +37,10 @@ using namespace std;
#include <BRepAlgoAPI.hxx>
#endif
#include "utilities.h"
using namespace std;
//=================================================================================
// class : GenerationGUI_PipeDlg()
// purpose : Constructs a GenerationGUI_PipeDlg which is a child of 'parent', with the

View File

@ -26,12 +26,15 @@
// Module : GEOM
// $Header$
using namespace std;
#include "GenerationGUI_PrismDlg.h"
#include <BRepPrimAPI_MakePrism.hxx>
#include "QAD_Config.h"
#include "utilities.h"
using namespace std;
//=================================================================================
// class : GenerationGUI_PrismDlg()
// purpose : Constructs a GenerationGUI_PrismDlg which is a child of 'parent', with the

View File

@ -26,13 +26,18 @@
// Module : GEOM
// $Header$
using namespace std;
#include "GenerationGUI_RevolDlg.h"
#include <gp_Lin.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepPrimAPI_MakeRevol.hxx>
#include "QAD_Config.h"
#include <TopExp_Explorer.hxx>
#include <Standard_ErrorHandler.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : GenerationGUI_RevolDlg()
@ -157,6 +162,32 @@ void GenerationGUI_RevolDlg::ClickOnApply()
return;
}
//=======================================================================
//function : isAcceptableBase
//purpose : return true if theBase can be used as algo argument
//=======================================================================
static bool isAcceptableBase(const TopoDS_Shape& theBase)
{
switch ( theBase.ShapeType() ) {
case TopAbs_VERTEX:
case TopAbs_EDGE:
case TopAbs_WIRE:
case TopAbs_FACE:
case TopAbs_SHELL:
return true;
case TopAbs_SOLID:
case TopAbs_COMPSOLID:
return false;
case TopAbs_COMPOUND: {
TopExp_Explorer exp( theBase, TopAbs_SOLID);
return !exp.More();
}
default:
return false;
}
return false;
}
//=================================================================================
// function : SelectionIntoArgument()
@ -189,8 +220,7 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument()
myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult)
return;
TopAbs_ShapeEnum aType = S.ShapeType();
if(aType != TopAbs_VERTEX && aType != TopAbs_EDGE && aType != TopAbs_WIRE && aType != TopAbs_FACE && aType != TopAbs_SHELL && aType != TopAbs_COMPOUND)
if( !isAcceptableBase( S ))
return;
myEditCurrentArgument->setText(aString);
myOkBase = true;
@ -318,8 +348,7 @@ void GenerationGUI_RevolDlg::MakeRevolutionSimulationAndDisplay()
myGeomBase->EraseSimulationShape();
mySimulationTopoDs.Nullify();
TopAbs_ShapeEnum aType = myBase.ShapeType();
if(aType != TopAbs_VERTEX && aType != TopAbs_EDGE && aType != TopAbs_WIRE && aType != TopAbs_FACE && aType != TopAbs_SHELL && aType !=TopAbs_COMPOUND)
if (!isAcceptableBase( myBase ))
return;
try {

View File

@ -26,12 +26,15 @@
// Module : GEOM
// $Header$
using namespace std;
#include "MeasureGUI_BndBoxDlg.h"
#include <BRepPrimAPI_MakeBox.hxx>
#include <BRepBndLib.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : MeasureGUI_BndBoxDlg()
// purpose : Constructs a MeasureGUI_BndBoxDlg which is a child of 'parent', with the

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "MeasureGUI_CenterMassDlg.h"
#include <BRepBuilderAPI_MakeVertex.hxx>
@ -34,6 +33,10 @@ using namespace std;
#include <GProp_GProps.hxx>
#include <GProp_PrincipalProps.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : MeasureGUI_CenterMassDlg()
// purpose : Constructs a MeasureGUI_CenterMassDlg which is a child of 'parent', with the

View File

@ -26,13 +26,16 @@
// Module : GEOM
// $Header$
using namespace std;
#include "MeasureGUI_CheckShapeDlg.h"
#include <BRepCheck_Analyzer.hxx>
#include <qtextedit.h>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : MeasureGUI_CheckShapeDlg()
// purpose : Constructs a MeasureGUI_CheckShapeDlg which is a child of 'parent', with the

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "MeasureGUI_DistanceDlg.h"
#include "QAD_RightFrame.h"
@ -42,6 +41,10 @@ using namespace std;
#include <gce_MakePln.hxx>
#include <Precision.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : MeasureGUI_DistanceDlg()
// purpose : Constructs a MeasureGUI_DistanceDlg which is a child of 'parent', with the
@ -322,7 +325,9 @@ void MeasureGUI_DistanceDlg::MakeDistanceSimulationAndDisplay(const TopoDS_Shape
gp_Pln gp_P = gce_MP.Value();
Handle(Geom_Plane) P = new Geom_Plane(gp_P);
Handle(AIS_LengthDimension) Distance = new AIS_LengthDimension(V1, V2, P, Dist, TCollection_ExtendedString(strdup(S)));
char* aCopyS = CORBA::string_dup(S);
Handle(AIS_LengthDimension) Distance = new AIS_LengthDimension(V1, V2, P, Dist, TCollection_ExtendedString(aCopyS));
delete(aCopyS);
GroupC1->LineEdit3->setText(S);

View File

@ -25,13 +25,16 @@
// Author : Lucien PIGNOLONI
// Module : GEOM
using namespace std;
#include "MeasureGUI_InertiaDlg.h"
#include <BRepGProp.hxx>
#include <GProp_GProps.hxx>
#include <GProp_PrincipalProps.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : MeasureGUI_InertiaDlg()
// purpose : Constructs a MeasureGUI_InertiaDlg which is a child of 'parent', with the

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "MeasureGUI_MaxToleranceDlg.h"
#include <TopoDS_Vertex.hxx>
@ -35,6 +34,10 @@ using namespace std;
#include <TopExp_Explorer.hxx>
#include <BRep_Tool.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : MeasureGUI_MaxToleranceDlg()
// purpose : Constructs a MeasureGUI_MaxToleranceDlg which is a child of 'parent', with the

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "MeasureGUI_PropertiesDlg.h"
#include <TopExp_Explorer.hxx>
@ -34,6 +33,10 @@ using namespace std;
#include <GProp_GProps.hxx>
#include <GProp_PrincipalProps.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : MeasureGUI_PropertiesDlg()
// purpose : Constructs a MeasureGUI_PropertiesDlg which is a child of 'parent', with the

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "MeasureGUI_WhatisDlg.h"
#include <TopTools_MapOfShape.hxx>
@ -39,6 +38,10 @@ using namespace std;
#include <BRep_Tool.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : MeasureGUI_WhatisDlg()
// purpose : Constructs a MeasureGUI_WhatisDlg which is a child of 'parent', with the
@ -216,11 +219,11 @@ void MeasureGUI_WhatisDlg::CalculateWhatis(const TopoDS_Shape& S)
if ( S.ShapeType() == TopAbs_EDGE ) {
if( BRep_Tool::Degenerated(TopoDS::Edge(S)) ) {
Astr = Astr + " " + strdup(SelectedName.latin1()) + " is a degenerated edge \n";
Astr = Astr + " " + CORBA::string_dup(SelectedName.latin1()) + " is a degenerated edge \n";
}
}
Astr = Astr + " Number of shapes in " + strdup(SelectedName.latin1()) + " : \n";
Astr = Astr + " Number of shapes in " + CORBA::string_dup(SelectedName.latin1()) + " : \n";
try {
int iType, nbTypes [TopAbs_SHAPE];

View File

@ -32,6 +32,8 @@ using namespace std;
#include "DisplayGUI.h"
#include "QAD_MessageBox.h"
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <AIS_InteractiveContext.hxx>
#include <BRepFilletAPI_MakeChamfer.hxx>
#include <BRepTools.hxx>

View File

@ -32,6 +32,7 @@ using namespace std;
#include "DisplayGUI.h"
#include "QAD_MessageBox.h"
#include <TopoDS_Edge.hxx>
#include <AIS_InteractiveContext.hxx>
#include <TopExp_Explorer.hxx>
#include <BRepFilletAPI_MakeFillet.hxx>

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "PrimitiveGUI_ConeDlg.h"
#include <gp_Lin.hxx>
@ -36,6 +35,10 @@ using namespace std;
#include <Precision.hxx>
#include "QAD_Config.h"
#include "utilities.h"
using namespace std;
//=================================================================================
// class : PrimitiveGUI_ConeDlg()
// purpose : Constructs a PrimitiveGUI_ConeDlg which is a child of 'parent', with the

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "PrimitiveGUI_CylinderDlg.h"
#include <gp_Lin.hxx>
@ -35,6 +34,10 @@ using namespace std;
#include <Precision.hxx>
#include "QAD_Config.h"
#include "utilities.h"
using namespace std;
//=================================================================================
// class : PrimitiveGUI_CylinderDlg()
// purpose : Constructs a PrimitiveGUI_CylinderDlg which is a child of 'parent', with the

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "PrimitiveGUI_TorusDlg.h"
#include <gp_Lin.hxx>
@ -34,6 +33,10 @@ using namespace std;
#include <BRepAdaptor_Curve.hxx>
#include "QAD_Config.h"
#include "utilities.h"
using namespace std;
//=================================================================================
// class : PrimitiveGUI_TorusDlg()
// purpose : Constructs a PrimitiveGUI_TorusDlg which is a child of 'parent', with the

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header:
using namespace std;
#include "RepairGUI.h"
#include "QAD_RightFrame.h"
@ -38,6 +37,10 @@ using namespace std;
#include "RepairGUI_SuppressFacesDlg.h" // Method SUPPRESS FACES
#include "RepairGUI_SuppressHoleDlg.h" // Method SUPPRESS HOLE
#include "utilities.h"
using namespace std;
//=======================================================================
// function : RepairGUI()
// purpose : Constructor

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "RepairGUI_OrientationDlg.h"
#include <Precision.hxx>
@ -36,6 +35,10 @@ using namespace std;
#include <BRepAdaptor_Surface.hxx>
#include <TopExp_Explorer.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : RepairGUI_OrientationDlg()
// purpose : Constructs a RepairGUI_OrientationDlg which is a child of 'parent', with the

View File

@ -26,13 +26,16 @@
// Module : GEOM
// $Header$
using namespace std;
#include "TransformationGUI_MirrorDlg.h"
#include <BRepBuilderAPI_Transform.hxx>
#include <Geom_Plane.hxx>
#include <BRep_Tool.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : TransformationGUI_MirrorDlg()
// purpose : Constructs a TransformationGUI_MirrorDlg which is a child of 'parent', with the

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "TransformationGUI_MultiRotationDlg.h"
#include <gp_Lin.hxx>
@ -42,6 +41,10 @@ using namespace std;
#include <BRepBuilderAPI_Transform.hxx>
#include "QAD_Config.h"
#include "utilities.h"
using namespace std;
//=================================================================================
// class : TransformationGUI_MultiRotationDlg()
// purpose : Constructs a TransformationGUI_MultiRotationDlg which is a child of 'parent', with the

View File

@ -26,7 +26,6 @@
// Module : GEOM
// $Header$
using namespace std;
#include "TransformationGUI_MultiTranslationDlg.h"
#include <gp_Lin.hxx>
@ -39,6 +38,10 @@ using namespace std;
#include <TopoDS_Compound.hxx>
#include "QAD_Config.h"
#include "utilities.h"
using namespace std;
//=================================================================================
// class : TransformationGUI_MultiTranslationDlg()
// purpose : Constructs a TransformationGUI_MultiTranslationDlg which is a child of 'parent', with the

View File

@ -26,13 +26,16 @@
// Module : GEOM
// $Header$
using namespace std;
#include "TransformationGUI_RotationDlg.h"
#include <gp_Lin.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <BRepAdaptor_Curve.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : TransformationGUI_RotationDlg()
// purpose : Constructs a TransformationGUI_RotationDlg which is a child of 'parent', with the

View File

@ -26,11 +26,14 @@
// Module : GEOM
// $Header$
using namespace std;
#include "TransformationGUI_ScaleDlg.h"
#include <BRepBuilderAPI_Transform.hxx>
#include "utilities.h"
using namespace std;
//=================================================================================
// class : TransformationGUI_ScaleDlg()
// purpose : Constructs a TransformationGUI_ScaleDlg which is a child of 'parent', with the

View File

@ -26,12 +26,15 @@
// Module : GEOM
// $Header$
using namespace std;
#include "TransformationGUI_TranslationDlg.h"
#include <BRepBuilderAPI_Transform.hxx>
#include "QAD_Config.h"
#include "utilities.h"
using namespace std;
//=================================================================================
// class : TransformationGUI_TranslationDlg()
// purpose : Constructs a TransformationGUI_TranslationDlg which is a child of 'parent', with the