DCQ : Add Multi-Wire for MakeFace

This commit is contained in:
dcq 2004-03-22 16:36:41 +00:00
parent a7515cc5c4
commit 7e4743151d
5 changed files with 18 additions and 45 deletions

View File

@ -101,9 +101,6 @@ module GEOM
GEOM_Shape MakePlacedBox(in double x1, in double y1, in double z1, GEOM_Shape MakePlacedBox(in double x1, in double y1, in double z1,
in double delta1, in double delta2, in double delta3) raises (SALOME::SALOME_Exception) ; in double delta1, in double delta2, in double delta3) raises (SALOME::SALOME_Exception) ;
GEOM_Shape MakePanel(in GEOM_Shape shape,
in short directiontype,
in double delta) raises (SALOME::SALOME_Exception) ;
GEOM_Shape MakeGlueFaces(in GEOM_Shape shape, GEOM_Shape MakeGlueFaces(in GEOM_Shape shape,
in double tol3d) raises (SALOME::SALOME_Exception) ; in double tol3d) raises (SALOME::SALOME_Exception) ;
@ -237,7 +234,7 @@ module GEOM
in PointStruct pstruct2) raises (SALOME::SALOME_Exception) ; in PointStruct pstruct2) raises (SALOME::SALOME_Exception) ;
GEOM_Shape MakeWire (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ; GEOM_Shape MakeWire (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ;
GEOM_Shape MakeCompound (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ; GEOM_Shape MakeCompound (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ;
GEOM_Shape MakeFace (in GEOM_Shape shapeWire, GEOM_Shape MakeFace (in ListOfIOR ListShape,
in boolean wantplanarface ) raises (SALOME::SALOME_Exception) ; in boolean wantplanarface ) raises (SALOME::SALOME_Exception) ;
GEOM_Shape MakeShell (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ; GEOM_Shape MakeShell (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ;
GEOM_Shape MakeSolid (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ; GEOM_Shape MakeSolid (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ;

View File

@ -164,10 +164,11 @@ void BuildGUI::MakeWireAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR)
// function : MakeFaceAndDisplay() // function : MakeFaceAndDisplay()
// purpose : // purpose :
//===================================================================================== //=====================================================================================
void BuildGUI::MakeFaceAndDisplay(GEOM::GEOM_Shape_ptr aWire, const Standard_Boolean wantPlanar) void BuildGUI::MakeFaceAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR,
const Standard_Boolean wantPlanar)
{ {
try { try {
GEOM::GEOM_Shape_var result = myGeom->MakeFace(aWire, wantPlanar); GEOM::GEOM_Shape_var result = myGeom->MakeFace(listShapesIOR, wantPlanar);
if(result->_is_nil()) { if(result->_is_nil()) {
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE"));
return; return;

View File

@ -48,7 +48,8 @@ public :
void MakeLinearEdgeAndDisplay(const gp_Pnt P1, const gp_Pnt P2); void MakeLinearEdgeAndDisplay(const gp_Pnt P1, const gp_Pnt P2);
void MakeWireAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR); void MakeWireAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR);
void MakeFaceAndDisplay(GEOM::GEOM_Shape_ptr aWire, const Standard_Boolean wantPlanar); void MakeFaceAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR,
const Standard_Boolean wantPlanar);
void MakeShellAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR); void MakeShellAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR);
void MakeSolidAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR); void MakeSolidAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR);
void MakeCompoundAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR); void MakeCompoundAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR);

View File

@ -85,7 +85,7 @@ void BuildGUI_FaceDlg::Init()
myEditCurrentArgument = GroupPoints->LineEdit1; myEditCurrentArgument = GroupPoints->LineEdit1;
GroupPoints->CheckButton1->setChecked(TRUE); GroupPoints->CheckButton1->setChecked(TRUE);
myOkShape = false; myOkListShapes = false;
myWireFilter = new GEOM_ShapeTypeFilter(TopAbs_WIRE, myGeom); myWireFilter = new GEOM_ShapeTypeFilter(TopAbs_WIRE, myGeom);
mySelection->AddFilter(myWireFilter); /* first filter used */ mySelection->AddFilter(myWireFilter); /* first filter used */
@ -124,8 +124,8 @@ void BuildGUI_FaceDlg::ClickOnOk()
void BuildGUI_FaceDlg::ClickOnApply() void BuildGUI_FaceDlg::ClickOnApply()
{ {
QAD_Application::getDesktop()->putInfo(tr("")); QAD_Application::getDesktop()->putInfo(tr(""));
if(myOkShape) if(myOkListShapes)
myBuildGUI->MakeFaceAndDisplay(myGeomShape, GroupPoints->CheckButton1->isChecked()); myBuildGUI->MakeFaceAndDisplay(myListShapes, GroupPoints->CheckButton1->isChecked());
return; return;
} }
@ -139,24 +139,17 @@ void BuildGUI_FaceDlg::SelectionIntoArgument()
myEditCurrentArgument->setText(""); myEditCurrentArgument->setText("");
QString aString = ""; /* name of selection */ QString aString = ""; /* name of selection */
myOkShape = false; myOkListShapes = false;
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
if(nbSel != 1) { if(nbSel == 0)
return; return;
} if(nbSel != 1)
aString = tr("%1_objects").arg(nbSel);
// nbSel == 1! myGeomBase->ConvertListOfIOInListOfIOR(mySelection->StoredIObjects(), myListShapes);
Standard_Boolean testResult;
Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
if(!myGeomBase->GetTopoFromSelection(mySelection, myShape))
return;
myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
if(!testResult)
return;
myEditCurrentArgument->setText(aString); myEditCurrentArgument->setText(aString);
myOkShape = true; myOkListShapes = true;
/* no simulation */ /* no simulation */
return; return;
} }
@ -176,23 +169,6 @@ void BuildGUI_FaceDlg::SetEditCurrentArgument()
} }
//=================================================================================
// function : LineEditReturnPressed()
// purpose :
//=================================================================================
void BuildGUI_FaceDlg::LineEditReturnPressed()
{
QLineEdit* send = (QLineEdit*)sender();
if(send == GroupPoints->LineEdit1)
myEditCurrentArgument = GroupPoints->LineEdit1;
else
return;
GEOMBase_Skeleton::LineEditReturnPressed();
return;
}
//================================================================================= //=================================================================================
// function : ActivateThisDialog() // function : ActivateThisDialog()
// purpose : // purpose :

View File

@ -57,9 +57,8 @@ private:
/* Filter selection */ /* Filter selection */
Handle(GEOM_ShapeTypeFilter) myWireFilter; Handle(GEOM_ShapeTypeFilter) myWireFilter;
TopoDS_Shape myShape; /* topology used to fuse */ GEOM::GEOM_Gen::ListOfIOR myListShapes;
GEOM::GEOM_Shape_var myGeomShape; /* is myShape */ bool myOkListShapes; /* to check when arguments is defined */
bool myOkShape; /* to check when arguments is defined */
DlgRef_1Sel1Check_QTD* GroupPoints; DlgRef_1Sel1Check_QTD* GroupPoints;
@ -67,7 +66,6 @@ private slots:
void ClickOnOk(); void ClickOnOk();
void ClickOnApply(); void ClickOnApply();
void ActivateThisDialog(); void ActivateThisDialog();
void LineEditReturnPressed();
void SelectionIntoArgument(); void SelectionIntoArgument();
void SetEditCurrentArgument(); void SetEditCurrentArgument();