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,
|
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) ;
|
||||||
|
@ -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;
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
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);
|
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 :
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user