mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-24 16:30:35 +05:00
DCQ : Add Multi-Wire for MakeFace
This commit is contained in:
parent
a7515cc5c4
commit
7e4743151d
@ -101,9 +101,6 @@ module GEOM
|
||||
|
||||
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) ;
|
||||
GEOM_Shape MakePanel(in GEOM_Shape shape,
|
||||
in short directiontype,
|
||||
in double delta) raises (SALOME::SALOME_Exception) ;
|
||||
GEOM_Shape MakeGlueFaces(in GEOM_Shape shape,
|
||||
in double tol3d) raises (SALOME::SALOME_Exception) ;
|
||||
|
||||
@ -237,7 +234,7 @@ module GEOM
|
||||
in PointStruct pstruct2) 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 MakeFace (in GEOM_Shape shapeWire,
|
||||
GEOM_Shape MakeFace (in ListOfIOR ListShape,
|
||||
in boolean wantplanarface ) raises (SALOME::SALOME_Exception) ;
|
||||
GEOM_Shape MakeShell (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ;
|
||||
GEOM_Shape MakeSolid (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ;
|
||||
|
@ -164,10 +164,11 @@ void BuildGUI::MakeWireAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR)
|
||||
// function : MakeFaceAndDisplay()
|
||||
// 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 {
|
||||
GEOM::GEOM_Shape_var result = myGeom->MakeFace(aWire, wantPlanar);
|
||||
GEOM::GEOM_Shape_var result = myGeom->MakeFace(listShapesIOR, wantPlanar);
|
||||
if(result->_is_nil()) {
|
||||
QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE"));
|
||||
return;
|
||||
|
@ -48,7 +48,8 @@ public :
|
||||
|
||||
void MakeLinearEdgeAndDisplay(const gp_Pnt P1, const gp_Pnt P2);
|
||||
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 MakeSolidAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR);
|
||||
void MakeCompoundAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR);
|
||||
|
@ -85,7 +85,7 @@ void BuildGUI_FaceDlg::Init()
|
||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||
GroupPoints->CheckButton1->setChecked(TRUE);
|
||||
|
||||
myOkShape = false;
|
||||
myOkListShapes = false;
|
||||
|
||||
myWireFilter = new GEOM_ShapeTypeFilter(TopAbs_WIRE, myGeom);
|
||||
mySelection->AddFilter(myWireFilter); /* first filter used */
|
||||
@ -124,8 +124,8 @@ void BuildGUI_FaceDlg::ClickOnOk()
|
||||
void BuildGUI_FaceDlg::ClickOnApply()
|
||||
{
|
||||
QAD_Application::getDesktop()->putInfo(tr(""));
|
||||
if(myOkShape)
|
||||
myBuildGUI->MakeFaceAndDisplay(myGeomShape, GroupPoints->CheckButton1->isChecked());
|
||||
if(myOkListShapes)
|
||||
myBuildGUI->MakeFaceAndDisplay(myListShapes, GroupPoints->CheckButton1->isChecked());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -139,24 +139,17 @@ void BuildGUI_FaceDlg::SelectionIntoArgument()
|
||||
myEditCurrentArgument->setText("");
|
||||
QString aString = ""; /* name of selection */
|
||||
|
||||
myOkShape = false;
|
||||
myOkListShapes = false;
|
||||
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
|
||||
if(nbSel != 1) {
|
||||
if(nbSel == 0)
|
||||
return;
|
||||
}
|
||||
if(nbSel != 1)
|
||||
aString = tr("%1_objects").arg(nbSel);
|
||||
|
||||
myGeomBase->ConvertListOfIOInListOfIOR(mySelection->StoredIObjects(), myListShapes);
|
||||
|
||||
// nbSel == 1!
|
||||
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);
|
||||
myOkShape = true;
|
||||
myOkListShapes = true;
|
||||
/* no simulation */
|
||||
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()
|
||||
// purpose :
|
||||
|
@ -57,9 +57,8 @@ private:
|
||||
/* Filter selection */
|
||||
Handle(GEOM_ShapeTypeFilter) myWireFilter;
|
||||
|
||||
TopoDS_Shape myShape; /* topology used to fuse */
|
||||
GEOM::GEOM_Shape_var myGeomShape; /* is myShape */
|
||||
bool myOkShape; /* to check when arguments is defined */
|
||||
GEOM::GEOM_Gen::ListOfIOR myListShapes;
|
||||
bool myOkListShapes; /* to check when arguments is defined */
|
||||
|
||||
DlgRef_1Sel1Check_QTD* GroupPoints;
|
||||
|
||||
@ -67,7 +66,6 @@ private slots:
|
||||
void ClickOnOk();
|
||||
void ClickOnApply();
|
||||
void ActivateThisDialog();
|
||||
void LineEditReturnPressed();
|
||||
void SelectionIntoArgument();
|
||||
void SetEditCurrentArgument();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user