mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 10:08:35 +05:00
untabify
This commit is contained in:
parent
f1d7f0b544
commit
0b6826bc5f
@ -88,29 +88,29 @@ void VolumeSection::CenterOfGravity()
|
|||||||
TopoDS_Face F = TopoDS::Face(ex.Current());
|
TopoDS_Face F = TopoDS::Face(ex.Current());
|
||||||
Handle(Poly_Triangulation) Tr = BRep_Tool::Triangulation(F, L);
|
Handle(Poly_Triangulation) Tr = BRep_Tool::Triangulation(F, L);
|
||||||
if(Tr.IsNull())
|
if(Tr.IsNull())
|
||||||
MESSAGE("Error, null layer" )
|
MESSAGE("Error, null layer" )
|
||||||
nbNodes = Tr->NbNodes();
|
nbNodes = Tr->NbNodes();
|
||||||
const TColgp_Array1OfPnt& Nodes = Tr->Nodes();
|
const TColgp_Array1OfPnt& Nodes = Tr->Nodes();
|
||||||
|
|
||||||
// Calcul des dimensions de la boite englobante du solide
|
// Calcul des dimensions de la boite englobante du solide
|
||||||
|
|
||||||
for(i=1;i<=nbNodes;i++)
|
for(i=1;i<=nbNodes;i++)
|
||||||
{
|
{
|
||||||
InitPoint = Nodes(i).Transformed(L.Transformation());
|
InitPoint = Nodes(i).Transformed(L.Transformation());
|
||||||
if(InitPoint.X() < Xmin)
|
if(InitPoint.X() < Xmin)
|
||||||
Xmin = InitPoint.X();
|
Xmin = InitPoint.X();
|
||||||
if(InitPoint.X() > Xmax)
|
if(InitPoint.X() > Xmax)
|
||||||
Xmax = InitPoint.X();
|
Xmax = InitPoint.X();
|
||||||
if(InitPoint.Y() < Ymin)
|
if(InitPoint.Y() < Ymin)
|
||||||
Ymin = InitPoint.Y();
|
Ymin = InitPoint.Y();
|
||||||
if(InitPoint.Y() > Ymax)
|
if(InitPoint.Y() > Ymax)
|
||||||
Ymax = InitPoint.Y();
|
Ymax = InitPoint.Y();
|
||||||
if(InitPoint.Z() < Zmin)
|
if(InitPoint.Z() < Zmin)
|
||||||
Zmin = InitPoint.Z();
|
Zmin = InitPoint.Z();
|
||||||
if(InitPoint.Z() > Zmax)
|
if(InitPoint.Z() > Zmax)
|
||||||
Zmax = InitPoint.Z();
|
Zmax = InitPoint.Z();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creation du point d'initialisation, c'est € dire le centre de gravit‰
|
// Creation du point d'initialisation, c'est € dire le centre de gravit‰
|
||||||
@ -141,7 +141,7 @@ Standard_Real VolumeSection::CalculateVolume(Standard_Real Elevation)
|
|||||||
TopoDS_Face F = TopoDS::Face(ex.Current());
|
TopoDS_Face F = TopoDS::Face(ex.Current());
|
||||||
Handle(Poly_Triangulation) Tr = BRep_Tool::Triangulation(F, L);
|
Handle(Poly_Triangulation) Tr = BRep_Tool::Triangulation(F, L);
|
||||||
if(Tr.IsNull())
|
if(Tr.IsNull())
|
||||||
MESSAGE("Error, null layer" )
|
MESSAGE("Error, null layer" )
|
||||||
const Poly_Array1OfTriangle& triangles = Tr->Triangles();
|
const Poly_Array1OfTriangle& triangles = Tr->Triangles();
|
||||||
Standard_Integer nbTriangles = Tr->NbTriangles();
|
Standard_Integer nbTriangles = Tr->NbTriangles();
|
||||||
nbNodes = Tr->NbNodes();
|
nbNodes = Tr->NbNodes();
|
||||||
@ -151,70 +151,70 @@ Standard_Real VolumeSection::CalculateVolume(Standard_Real Elevation)
|
|||||||
//en tenant compte des triangles coup‰s par le plan de section
|
//en tenant compte des triangles coup‰s par le plan de section
|
||||||
|
|
||||||
for (i=1;i<=nbTriangles;i++)
|
for (i=1;i<=nbTriangles;i++)
|
||||||
{
|
{
|
||||||
Determinant=0;
|
Determinant=0;
|
||||||
//Gardons la meme orientation des noeuds
|
//Gardons la meme orientation des noeuds
|
||||||
if (F.Orientation() == TopAbs_REVERSED)
|
if (F.Orientation() == TopAbs_REVERSED)
|
||||||
triangles(i).Get(noeud[0], noeud[2], noeud[1]);
|
triangles(i).Get(noeud[0], noeud[2], noeud[1]);
|
||||||
else
|
else
|
||||||
triangles(i).Get(noeud[0], noeud[1], noeud[2]);
|
triangles(i).Get(noeud[0], noeud[1], noeud[2]);
|
||||||
|
|
||||||
P[0] = Nodes(noeud[0]).Transformed(L.Transformation());
|
P[0] = Nodes(noeud[0]).Transformed(L.Transformation());
|
||||||
z[0] = P[0].Z();
|
z[0] = P[0].Z();
|
||||||
P[1] = Nodes(noeud[1]).Transformed(L.Transformation());
|
P[1] = Nodes(noeud[1]).Transformed(L.Transformation());
|
||||||
z[1] = P[1].Z();
|
z[1] = P[1].Z();
|
||||||
P[2] = Nodes(noeud[2]).Transformed(L.Transformation());
|
P[2] = Nodes(noeud[2]).Transformed(L.Transformation());
|
||||||
z[2] = P[2].Z();
|
z[2] = P[2].Z();
|
||||||
|
|
||||||
// Determination des cas aux limites pour les triangles
|
// Determination des cas aux limites pour les triangles
|
||||||
Standard_Integer i,compteur=0;
|
Standard_Integer i,compteur=0;
|
||||||
|
|
||||||
for (i=0;i<=2;i++)
|
for (i=0;i<=2;i++)
|
||||||
{
|
{
|
||||||
flag[i]=Standard_False;
|
flag[i]=Standard_False;
|
||||||
if(z[i]>=Elevation)
|
if(z[i]>=Elevation)
|
||||||
{
|
{
|
||||||
flag[i]=Standard_True;
|
flag[i]=Standard_True;
|
||||||
compteur++;
|
compteur++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(compteur)
|
switch(compteur)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
Determinant = ElementaryVolume(P[0],P[1],P[2]);
|
Determinant = ElementaryVolume(P[0],P[1],P[2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
for (i=0;i<=2;i++)
|
for (i=0;i<=2;i++)
|
||||||
{
|
{
|
||||||
if (flag[i]==Standard_True)
|
if (flag[i]==Standard_True)
|
||||||
{
|
{
|
||||||
gp_Pnt Result1 = Intersection(P[i],P[(i+1)%3],Elevation);
|
gp_Pnt Result1 = Intersection(P[i],P[(i+1)%3],Elevation);
|
||||||
gp_Pnt Result2 = Intersection(P[i],P[(i+2)%3],Elevation);
|
gp_Pnt Result2 = Intersection(P[i],P[(i+2)%3],Elevation);
|
||||||
Determinant = ElementaryVolume(Result1,P[(i+1)%3],P[(i+2)%3])
|
Determinant = ElementaryVolume(Result1,P[(i+1)%3],P[(i+2)%3])
|
||||||
+ ElementaryVolume(Result1,P[(i+2)%3],Result2);
|
+ ElementaryVolume(Result1,P[(i+2)%3],Result2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
for (i=0;i<=2;i++)
|
for (i=0;i<=2;i++)
|
||||||
{
|
{
|
||||||
if (flag[i]==Standard_False)
|
if (flag[i]==Standard_False)
|
||||||
{
|
{
|
||||||
gp_Pnt Result1 = Intersection(P[i],P[(i+1)%3],Elevation);
|
gp_Pnt Result1 = Intersection(P[i],P[(i+1)%3],Elevation);
|
||||||
gp_Pnt Result2 = Intersection(P[i],P[(i+2)%3],Elevation);
|
gp_Pnt Result2 = Intersection(P[i],P[(i+2)%3],Elevation);
|
||||||
Determinant = ElementaryVolume(P[i],Result1,Result2);
|
Determinant = ElementaryVolume(P[i],Result1,Result2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Volume += Determinant;
|
Volume += Determinant;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Volume;
|
return Volume;
|
||||||
@ -258,30 +258,30 @@ Standard_Real VolumeSection::Archimede(Standard_Real Constante , Standard_Real E
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
while((Bsup-Binf)>Epsilon)
|
while((Bsup-Binf)>Epsilon)
|
||||||
{
|
{
|
||||||
if((tempBinfVolume-Constante)*(tempCVolume-Constante)>0 && Abs(tempCVolume-Constante)>Epsilon)
|
if((tempBinfVolume-Constante)*(tempCVolume-Constante)>0 && Abs(tempCVolume-Constante)>Epsilon)
|
||||||
{
|
{
|
||||||
Binf = c;
|
Binf = c;
|
||||||
tempBinfVolume=tempCVolume;
|
tempBinfVolume=tempCVolume;
|
||||||
|
|
||||||
c = ((Binf*(tempBsupVolume-Constante))-(Bsup*(tempBinfVolume-Constante)))
|
c = ((Binf*(tempBsupVolume-Constante))-(Bsup*(tempBinfVolume-Constante)))
|
||||||
/((tempBsupVolume-Constante)-(tempBinfVolume-Constante));
|
/((tempBsupVolume-Constante)-(tempBinfVolume-Constante));
|
||||||
tempCVolume=CalculateVolume(c);
|
tempCVolume=CalculateVolume(c);
|
||||||
}
|
}
|
||||||
else if((tempBinfVolume-Constante)*(tempCVolume-Constante)<0 && Abs(tempCVolume-Constante)>Epsilon)
|
else if((tempBinfVolume-Constante)*(tempCVolume-Constante)<0 && Abs(tempCVolume-Constante)>Epsilon)
|
||||||
{
|
{
|
||||||
Bsup = c;
|
Bsup = c;
|
||||||
tempBsupVolume =tempCVolume;
|
tempBsupVolume =tempCVolume;
|
||||||
|
|
||||||
c = ((Binf*(tempBsupVolume-Constante))-(Bsup*(tempBinfVolume-Constante)))
|
c = ((Binf*(tempBsupVolume-Constante))-(Bsup*(tempBinfVolume-Constante)))
|
||||||
/((tempBsupVolume-Constante)-(tempBinfVolume-Constante));
|
/((tempBsupVolume-Constante)-(tempBinfVolume-Constante));
|
||||||
tempCVolume=CalculateVolume(c);
|
tempCVolume=CalculateVolume(c);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
goto endMethod;
|
goto endMethod;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
goto endMethod;
|
goto endMethod;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: BREPExport.cxx
|
// File: BREPExport.cxx
|
||||||
// Created: Wed May 19 13:10:05 2004
|
// Created: Wed May 19 13:10:05 2004
|
||||||
// Author: Pavel TELKOV
|
// Author: Pavel TELKOV
|
||||||
// <ptv@mutex.nnov.opencascade.com>
|
// <ptv@mutex.nnov.opencascade.com>
|
||||||
//
|
//
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: BREPImport.cxx
|
// File: BREPImport.cxx
|
||||||
// Created: Wed May 19 14:29:52 2004
|
// Created: Wed May 19 14:29:52 2004
|
||||||
// Author: Pavel TELKOV
|
// Author: Pavel TELKOV
|
||||||
// <ptv@mutex.nnov.opencascade.com>
|
// <ptv@mutex.nnov.opencascade.com>
|
||||||
//
|
//
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ BREPIMPORT_EXPORT
|
|||||||
TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
|
TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
|
||||||
const TCollection_AsciiString& /*theFormatName*/,
|
const TCollection_AsciiString& /*theFormatName*/,
|
||||||
TCollection_AsciiString& theError,
|
TCollection_AsciiString& theError,
|
||||||
const TDF_Label&)
|
const TDF_Label&)
|
||||||
{
|
{
|
||||||
MESSAGE("Import BREP from file " << theFileName);
|
MESSAGE("Import BREP from file " << theFileName);
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_ArcDlg::BasicGUI_ArcDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_ArcDlg::BasicGUI_ArcDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
bool modal, Qt::WindowFlags fl )
|
bool modal, Qt::WindowFlags fl )
|
||||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||||
{
|
{
|
||||||
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
||||||
@ -198,7 +198,7 @@ void BasicGUI_ArcDlg::Init()
|
|||||||
connect( Group3Pnts3->LineEdit3, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
connect( Group3Pnts3->LineEdit3, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT( SelectionIntoArgument() ) );
|
this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_ARC" ) );
|
initName( tr( "GEOM_ARC" ) );
|
||||||
|
|
||||||
@ -284,15 +284,15 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
|
|||||||
int anIndex = aMap(1);
|
int anIndex = aMap(1);
|
||||||
aName += QString(":vertex_%1").arg(anIndex);
|
aName += QString(":vertex_%1").arg(anIndex);
|
||||||
|
|
||||||
//Find SubShape Object in Father
|
//Find SubShape Object in Father
|
||||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
||||||
|
|
||||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
aSelectedObject = aFindedObject; // get Object from study
|
aSelectedObject = aFindedObject; // get Object from study
|
||||||
}
|
}
|
||||||
else // Global Selection
|
else // Global Selection
|
||||||
{
|
{
|
||||||
@ -313,53 +313,53 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
|
|||||||
switch ( getConstructorId() ) {
|
switch ( getConstructorId() ) {
|
||||||
case 0:
|
case 0:
|
||||||
if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) {
|
if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) {
|
||||||
myPoint1 = aSelectedObject;
|
myPoint1 = aSelectedObject;
|
||||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||||
Group3Pnts->PushButton2->click();
|
Group3Pnts->PushButton2->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) {
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) {
|
||||||
myPoint2 = aSelectedObject;
|
myPoint2 = aSelectedObject;
|
||||||
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
||||||
Group3Pnts->PushButton3->click();
|
Group3Pnts->PushButton3->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) {
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) {
|
||||||
myPoint3 = aSelectedObject;
|
myPoint3 = aSelectedObject;
|
||||||
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
||||||
Group3Pnts->PushButton1->click();
|
Group3Pnts->PushButton1->click();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if ( myEditCurrentArgument == Group3Pnts2->LineEdit1 ) {
|
if ( myEditCurrentArgument == Group3Pnts2->LineEdit1 ) {
|
||||||
myPoint1 = aSelectedObject;
|
myPoint1 = aSelectedObject;
|
||||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||||
Group3Pnts2->PushButton2->click();
|
Group3Pnts2->PushButton2->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit2 ) {
|
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit2 ) {
|
||||||
myPoint2 = aSelectedObject;
|
myPoint2 = aSelectedObject;
|
||||||
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
||||||
Group3Pnts2->PushButton3->click();
|
Group3Pnts2->PushButton3->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit3 ) {
|
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit3 ) {
|
||||||
myPoint3 = aSelectedObject;
|
myPoint3 = aSelectedObject;
|
||||||
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
||||||
Group3Pnts2->PushButton1->click();
|
Group3Pnts2->PushButton1->click();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if ( myEditCurrentArgument == Group3Pnts3->LineEdit1 ) {
|
if ( myEditCurrentArgument == Group3Pnts3->LineEdit1 ) {
|
||||||
myPoint1 = aSelectedObject;
|
myPoint1 = aSelectedObject;
|
||||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||||
Group3Pnts3->PushButton2->click();
|
Group3Pnts3->PushButton2->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group3Pnts3->LineEdit2 ) {
|
else if ( myEditCurrentArgument == Group3Pnts3->LineEdit2 ) {
|
||||||
myPoint2 = aSelectedObject;
|
myPoint2 = aSelectedObject;
|
||||||
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
||||||
Group3Pnts3->PushButton3->click();
|
Group3Pnts3->PushButton3->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group3Pnts3->LineEdit3 ) {
|
else if ( myEditCurrentArgument == Group3Pnts3->LineEdit3 ) {
|
||||||
myPoint3 = aSelectedObject;
|
myPoint3 = aSelectedObject;
|
||||||
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
||||||
Group3Pnts3->PushButton1->click();
|
Group3Pnts3->PushButton1->click();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -491,9 +491,9 @@ void BasicGUI_ArcDlg::ActivateThisDialog()
|
|||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ),
|
SIGNAL( currentSelectionChanged() ),
|
||||||
this,
|
this,
|
||||||
SLOT(SelectionIntoArgument() ) );
|
SLOT(SelectionIntoArgument() ) );
|
||||||
|
|
||||||
ConstructorsClicked( getConstructorId() );
|
ConstructorsClicked( getConstructorId() );
|
||||||
}
|
}
|
||||||
@ -536,25 +536,25 @@ bool BasicGUI_ArcDlg::isValid( QString& msg )
|
|||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
if (Group3Pnts->LineEdit1->text().trimmed().isEmpty() ||
|
if (Group3Pnts->LineEdit1->text().trimmed().isEmpty() ||
|
||||||
Group3Pnts->LineEdit2->text().trimmed().isEmpty() ||
|
Group3Pnts->LineEdit2->text().trimmed().isEmpty() ||
|
||||||
Group3Pnts->LineEdit3->text().trimmed().isEmpty())
|
Group3Pnts->LineEdit3->text().trimmed().isEmpty())
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
if (Group3Pnts2->LineEdit1->text().trimmed().isEmpty() ||
|
if (Group3Pnts2->LineEdit1->text().trimmed().isEmpty() ||
|
||||||
Group3Pnts2->LineEdit2->text().trimmed().isEmpty() ||
|
Group3Pnts2->LineEdit2->text().trimmed().isEmpty() ||
|
||||||
Group3Pnts2->LineEdit3->text().trimmed().isEmpty())
|
Group3Pnts2->LineEdit3->text().trimmed().isEmpty())
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
if (Group3Pnts3->LineEdit1->text().trimmed().isEmpty() ||
|
if (Group3Pnts3->LineEdit1->text().trimmed().isEmpty() ||
|
||||||
Group3Pnts3->LineEdit2->text().trimmed().isEmpty() ||
|
Group3Pnts3->LineEdit2->text().trimmed().isEmpty() ||
|
||||||
Group3Pnts3->LineEdit3->text().trimmed().isEmpty())
|
Group3Pnts3->LineEdit3->text().trimmed().isEmpty())
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -577,8 +577,8 @@ bool BasicGUI_ArcDlg::execute( ObjectList& objects )
|
|||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) {
|
if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) {
|
||||||
anObj = anOper->MakeArc( myPoint1, myPoint2, myPoint3 );
|
anObj = anOper->MakeArc( myPoint1, myPoint2, myPoint3 );
|
||||||
res = true;
|
res = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -586,16 +586,16 @@ bool BasicGUI_ArcDlg::execute( ObjectList& objects )
|
|||||||
{
|
{
|
||||||
bool Sense = Group3Pnts2->CheckButton1->isChecked();
|
bool Sense = Group3Pnts2->CheckButton1->isChecked();
|
||||||
if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) {
|
if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) {
|
||||||
anObj = anOper->MakeArcCenter( myPoint1, myPoint2, myPoint3, Sense );
|
anObj = anOper->MakeArcCenter( myPoint1, myPoint2, myPoint3, Sense );
|
||||||
res = true;
|
res = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) {
|
if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) {
|
||||||
anObj = anOper->MakeArcOfEllipse( myPoint1, myPoint2, myPoint3 );
|
anObj = anOper->MakeArcOfEllipse( myPoint1, myPoint2, myPoint3 );
|
||||||
res = true;
|
res = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -689,7 +689,7 @@ void BasicGUI_ArcDlg::ConstructorsClicked( int constructorId )
|
|||||||
|
|
||||||
myEditCurrentArgument->setFocus();
|
myEditCurrentArgument->setFocus();
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT( SelectionIntoArgument() ) );
|
this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
if ( CORBA::is_nil( myPoint1 ) )
|
if ( CORBA::is_nil( myPoint1 ) )
|
||||||
SelectionIntoArgument();
|
SelectionIntoArgument();
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_CircleDlg::BasicGUI_CircleDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_CircleDlg::BasicGUI_CircleDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
bool modal, Qt::WindowFlags fl )
|
bool modal, Qt::WindowFlags fl )
|
||||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CIRCLE_PV" ) ) );
|
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CIRCLE_PV" ) ) );
|
||||||
@ -276,7 +276,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
|
|||||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ),
|
||||||
this, SLOT( SelectionIntoArgument() ) );
|
this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
@ -353,16 +353,16 @@ void BasicGUI_CircleDlg::SelectionIntoArgument()
|
|||||||
else
|
else
|
||||||
aName += QString( ":vertex_%1" ).arg( anIndex );
|
aName += QString( ":vertex_%1" ).arg( anIndex );
|
||||||
|
|
||||||
//Find SubShape Object in Father
|
//Find SubShape Object in Father
|
||||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
|
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
|
||||||
|
|
||||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||||
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aSelectedObject = aFindedObject; // get Object from study
|
aSelectedObject = aFindedObject; // get Object from study
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // Global Selection
|
else { // Global Selection
|
||||||
if ( aShape.ShapeType() != aNeedType ) {
|
if ( aShape.ShapeType() != aNeedType ) {
|
||||||
@ -382,42 +382,42 @@ void BasicGUI_CircleDlg::SelectionIntoArgument()
|
|||||||
if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) {
|
if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) {
|
||||||
myPoint = aSelectedObject;
|
myPoint = aSelectedObject;
|
||||||
if ( !myPoint->_is_nil() && myDir->_is_nil() )
|
if ( !myPoint->_is_nil() && myDir->_is_nil() )
|
||||||
GroupPntVecR->PushButton2->click();
|
GroupPntVecR->PushButton2->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) {
|
else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) {
|
||||||
myDir = aSelectedObject;
|
myDir = aSelectedObject;
|
||||||
if ( !myDir->_is_nil() && myPoint->_is_nil() )
|
if ( !myDir->_is_nil() && myPoint->_is_nil() )
|
||||||
GroupPntVecR->PushButton1->click();
|
GroupPntVecR->PushButton1->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) {
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) {
|
||||||
myPoint1 = aSelectedObject;
|
myPoint1 = aSelectedObject;
|
||||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||||
Group3Pnts->PushButton2->click();
|
Group3Pnts->PushButton2->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) {
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) {
|
||||||
myPoint2 = aSelectedObject;
|
myPoint2 = aSelectedObject;
|
||||||
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
||||||
Group3Pnts->PushButton3->click();
|
Group3Pnts->PushButton3->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) {
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) {
|
||||||
myPoint3 = aSelectedObject;
|
myPoint3 = aSelectedObject;
|
||||||
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
||||||
Group3Pnts->PushButton1->click();
|
Group3Pnts->PushButton1->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) {
|
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) {
|
||||||
myPoint4 = aSelectedObject;
|
myPoint4 = aSelectedObject;
|
||||||
if ( !myPoint4->_is_nil() && myPoint5->_is_nil() )
|
if ( !myPoint4->_is_nil() && myPoint5->_is_nil() )
|
||||||
GroupCenter2Pnts->PushButton2->click();
|
GroupCenter2Pnts->PushButton2->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) {
|
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) {
|
||||||
myPoint5 = aSelectedObject;
|
myPoint5 = aSelectedObject;
|
||||||
if ( !myPoint5->_is_nil() && myPoint6->_is_nil() )
|
if ( !myPoint5->_is_nil() && myPoint6->_is_nil() )
|
||||||
GroupCenter2Pnts->PushButton3->click();
|
GroupCenter2Pnts->PushButton3->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) {
|
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) {
|
||||||
myPoint6 = aSelectedObject;
|
myPoint6 = aSelectedObject;
|
||||||
if ( !myPoint6->_is_nil() && myPoint4->_is_nil() )
|
if ( !myPoint6->_is_nil() && myPoint4->_is_nil() )
|
||||||
GroupCenter2Pnts->PushButton1->click();
|
GroupCenter2Pnts->PushButton1->click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -543,7 +543,7 @@ void BasicGUI_CircleDlg::ActivateThisDialog()
|
|||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT( SelectionIntoArgument() ) );
|
this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
ConstructorsClicked( getConstructorId() );
|
ConstructorsClicked( getConstructorId() );
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_EllipseDlg::BasicGUI_EllipseDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_EllipseDlg::BasicGUI_EllipseDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
bool modal, Qt::WindowFlags fl )
|
bool modal, Qt::WindowFlags fl )
|
||||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_ELLIPSE_PV" ) ) );
|
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_ELLIPSE_PV" ) ) );
|
||||||
@ -153,7 +153,7 @@ void BasicGUI_EllipseDlg::Init()
|
|||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) );
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_ELLIPSE" ) );
|
initName( tr( "GEOM_ELLIPSE" ) );
|
||||||
|
|
||||||
@ -256,16 +256,16 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument()
|
|||||||
else
|
else
|
||||||
aName += QString(":vertex_%1").arg(anIndex);
|
aName += QString(":vertex_%1").arg(anIndex);
|
||||||
|
|
||||||
//Find SubShape Object in Father
|
//Find SubShape Object in Father
|
||||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
||||||
|
|
||||||
if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study
|
if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aSelectedObject = aFindedObject; // get Object from study
|
aSelectedObject = aFindedObject; // get Object from study
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // Global Selection
|
else { // Global Selection
|
||||||
if (aShape.ShapeType() != aNeedType) {
|
if (aShape.ShapeType() != aNeedType) {
|
||||||
@ -285,17 +285,17 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument()
|
|||||||
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
|
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
|
||||||
myPoint = aSelectedObject;
|
myPoint = aSelectedObject;
|
||||||
if ( !myPoint->_is_nil() && myDir->_is_nil() )
|
if ( !myPoint->_is_nil() && myDir->_is_nil() )
|
||||||
GroupPoints->PushButton2->click();
|
GroupPoints->PushButton2->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
|
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
|
||||||
myDir = aSelectedObject;
|
myDir = aSelectedObject;
|
||||||
if ( !myDir->_is_nil() && myMajor->_is_nil() )
|
if ( !myDir->_is_nil() && myMajor->_is_nil() )
|
||||||
GroupPoints->PushButton3->click();
|
GroupPoints->PushButton3->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit3 ) {
|
else if ( myEditCurrentArgument == GroupPoints->LineEdit3 ) {
|
||||||
myMajor = aSelectedObject;
|
myMajor = aSelectedObject;
|
||||||
if ( !myMajor->_is_nil() && myPoint->_is_nil() )
|
if ( !myMajor->_is_nil() && myPoint->_is_nil() )
|
||||||
GroupPoints->PushButton1->click();
|
GroupPoints->PushButton1->click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ void BasicGUI_EllipseDlg::ActivateThisDialog()
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT( SelectionIntoArgument() ) );
|
this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
GroupPoints->LineEdit1->setFocus();
|
GroupPoints->LineEdit1->setFocus();
|
||||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_LineDlg::BasicGUI_LineDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_LineDlg::BasicGUI_LineDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
bool modal, Qt::WindowFlags fl )
|
bool modal, Qt::WindowFlags fl )
|
||||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_LINE_2P" ) ) );
|
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_LINE_2P" ) ) );
|
||||||
@ -145,7 +145,7 @@ void BasicGUI_LineDlg::Init()
|
|||||||
connect( GroupFaces->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
connect( GroupFaces->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT( SelectionIntoArgument() ) );
|
this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_LINE" ) );
|
initName( tr( "GEOM_LINE" ) );
|
||||||
|
|
||||||
@ -258,7 +258,7 @@ void BasicGUI_LineDlg::SelectionIntoArgument()
|
|||||||
QString aName = GEOMBase::GetName( aSelectedObject );
|
QString aName = GEOMBase::GetName( aSelectedObject );
|
||||||
TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
|
TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
|
||||||
if ( myEditCurrentArgument == GroupFaces->LineEdit1 ||
|
if ( myEditCurrentArgument == GroupFaces->LineEdit1 ||
|
||||||
myEditCurrentArgument == GroupFaces->LineEdit2 )
|
myEditCurrentArgument == GroupFaces->LineEdit2 )
|
||||||
aNeedType = TopAbs_FACE;
|
aNeedType = TopAbs_FACE;
|
||||||
|
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
@ -266,22 +266,22 @@ void BasicGUI_LineDlg::SelectionIntoArgument()
|
|||||||
TColStd_IndexedMapOfInteger aMap;
|
TColStd_IndexedMapOfInteger aMap;
|
||||||
aSelMgr->GetIndexes(aSelList.First(), aMap);
|
aSelMgr->GetIndexes(aSelList.First(), aMap);
|
||||||
if ( aMap.Extent() == 1 ) { // Local Selection
|
if ( aMap.Extent() == 1 ) { // Local Selection
|
||||||
int anIndex = aMap( 1 );
|
int anIndex = aMap( 1 );
|
||||||
if ( aNeedType == TopAbs_FACE )
|
if ( aNeedType == TopAbs_FACE )
|
||||||
aName += QString( ":face_%1" ).arg( anIndex );
|
aName += QString( ":face_%1" ).arg( anIndex );
|
||||||
else
|
else
|
||||||
aName += QString( ":vertex_%1" ).arg( anIndex );
|
aName += QString( ":vertex_%1" ).arg( anIndex );
|
||||||
|
|
||||||
//Find SubShape Object in Father
|
//Find SubShape Object in Father
|
||||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
|
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
|
||||||
|
|
||||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||||
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aSelectedObject = aFindedObject; // get Object from study
|
aSelectedObject = aFindedObject; // get Object from study
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // Global Selection
|
else { // Global Selection
|
||||||
if ( aShape.ShapeType() != aNeedType ) {
|
if ( aShape.ShapeType() != aNeedType ) {
|
||||||
@ -301,22 +301,22 @@ void BasicGUI_LineDlg::SelectionIntoArgument()
|
|||||||
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
|
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
|
||||||
myPoint1 = aSelectedObject;
|
myPoint1 = aSelectedObject;
|
||||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||||
GroupPoints->PushButton2->click();
|
GroupPoints->PushButton2->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
|
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
|
||||||
myPoint2 = aSelectedObject;
|
myPoint2 = aSelectedObject;
|
||||||
if ( !myPoint2->_is_nil() && myPoint1->_is_nil() )
|
if ( !myPoint2->_is_nil() && myPoint1->_is_nil() )
|
||||||
GroupPoints->PushButton1->click();
|
GroupPoints->PushButton1->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == GroupFaces->LineEdit1 ) {
|
else if ( myEditCurrentArgument == GroupFaces->LineEdit1 ) {
|
||||||
myFace1 = aSelectedObject;
|
myFace1 = aSelectedObject;
|
||||||
if ( !myFace1->_is_nil() && myFace2->_is_nil() )
|
if ( !myFace1->_is_nil() && myFace2->_is_nil() )
|
||||||
GroupFaces->PushButton2->click();
|
GroupFaces->PushButton2->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == GroupFaces->LineEdit2 ) {
|
else if ( myEditCurrentArgument == GroupFaces->LineEdit2 ) {
|
||||||
myFace2 = aSelectedObject;
|
myFace2 = aSelectedObject;
|
||||||
if ( !myFace2->_is_nil() && myFace1->_is_nil() )
|
if ( !myFace2->_is_nil() && myFace1->_is_nil() )
|
||||||
GroupFaces->PushButton1->click();
|
GroupFaces->PushButton1->click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -393,7 +393,7 @@ void BasicGUI_LineDlg::ActivateThisDialog()
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT( SelectionIntoArgument() ) );
|
this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
ConstructorsClicked( getConstructorId() );
|
ConstructorsClicked( getConstructorId() );
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* theParent )
|
BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* theParent )
|
||||||
: GEOMBase_Skeleton( theGeometryGUI, theParent, false,
|
: GEOMBase_Skeleton( theGeometryGUI, theParent, false,
|
||||||
Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
|
Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
|
||||||
{
|
{
|
||||||
QPixmap iconCS1 ( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_MARKER" ) ) );
|
QPixmap iconCS1 ( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_MARKER" ) ) );
|
||||||
QPixmap iconCS2 ( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_MARKER2" ) ) );
|
QPixmap iconCS2 ( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_MARKER2" ) ) );
|
||||||
@ -197,7 +197,7 @@ void BasicGUI_MarkerDlg::Init()
|
|||||||
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( onApply() ) );
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( onApply() ) );
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) );
|
||||||
|
|
||||||
initName( tr( "LCS_NAME" ) );
|
initName( tr( "LCS_NAME" ) );
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
|
|||||||
resize( minimumSizeHint() );
|
resize( minimumSizeHint() );
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT( onSelectionDone() ) );
|
this, SLOT( onSelectionDone() ) );
|
||||||
onSelectionDone();
|
onSelectionDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -373,19 +373,19 @@ void BasicGUI_MarkerDlg::onSelectionDone0()
|
|||||||
myData[ DX2 ]->setValue( aYDir.X() );
|
myData[ DX2 ]->setValue( aYDir.X() );
|
||||||
myData[ DY2 ]->setValue( aYDir.Y() );
|
myData[ DY2 ]->setValue( aYDir.Y() );
|
||||||
myData[ DZ2 ]->setValue( aYDir.Z() );
|
myData[ DZ2 ]->setValue( aYDir.Z() );
|
||||||
aSelMgr->clearSelected();
|
aSelMgr->clearSelected();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TColStd_IndexedMapOfInteger aMap;
|
TColStd_IndexedMapOfInteger aMap;
|
||||||
aSelMgr->GetIndexes( anIO, aMap );
|
aSelMgr->GetIndexes( anIO, aMap );
|
||||||
if ( aMap.Extent() == 1 ) { // Local Selection
|
if ( aMap.Extent() == 1 ) { // Local Selection
|
||||||
int anIndex = aMap( 1 );
|
int anIndex = aMap( 1 );
|
||||||
TopTools_IndexedMapOfShape aShapes;
|
TopTools_IndexedMapOfShape aShapes;
|
||||||
TopExp::MapShapes( aShape, aShapes );
|
TopExp::MapShapes( aShape, aShapes );
|
||||||
aShape = aShapes.FindKey( anIndex );
|
aShape = aShapes.FindKey( anIndex );
|
||||||
aSelMgr->clearSelected(); // ???
|
aSelMgr->clearSelected(); // ???
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) {
|
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) {
|
||||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||||
@ -486,60 +486,60 @@ void BasicGUI_MarkerDlg::onSelectionDone()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( myEditCurrentArgument == Group2->LineEdit1 ) {
|
if ( myEditCurrentArgument == Group2->LineEdit1 ) {
|
||||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) {
|
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) {
|
||||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||||
myData[ X ]->setValue( aPnt.X() );
|
myData[ X ]->setValue( aPnt.X() );
|
||||||
myData[ Y ]->setValue( aPnt.Y() );
|
myData[ Y ]->setValue( aPnt.Y() );
|
||||||
myData[ Z ]->setValue( aPnt.Z() );
|
myData[ Z ]->setValue( aPnt.Z() );
|
||||||
myEditCurrentArgument->setText( aName );
|
myEditCurrentArgument->setText( aName );
|
||||||
if (Group2->LineEdit2->text() == "")
|
if (Group2->LineEdit2->text() == "")
|
||||||
Group2->PushButton2->click();
|
Group2->PushButton2->click();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myData[ X ]->setValue( 0 );
|
myData[ X ]->setValue( 0 );
|
||||||
myData[ Y ]->setValue( 0 );
|
myData[ Y ]->setValue( 0 );
|
||||||
myData[ Z ]->setValue( 0 );
|
myData[ Z ]->setValue( 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (myEditCurrentArgument == Group2->LineEdit2) {
|
else if (myEditCurrentArgument == Group2->LineEdit2) {
|
||||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) {
|
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) {
|
||||||
gp_Pnt aP1 = BRep_Tool::Pnt( TopExp::FirstVertex( TopoDS::Edge( aShape ) ) );
|
gp_Pnt aP1 = BRep_Tool::Pnt( TopExp::FirstVertex( TopoDS::Edge( aShape ) ) );
|
||||||
gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) );
|
gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) );
|
||||||
gp_Dir aDir( gp_Vec( aP1, aP2 ) );
|
gp_Dir aDir( gp_Vec( aP1, aP2 ) );
|
||||||
|
|
||||||
myData[ DX1 ]->setValue( aDir.X() );
|
myData[ DX1 ]->setValue( aDir.X() );
|
||||||
myData[ DY1 ]->setValue( aDir.Y() );
|
myData[ DY1 ]->setValue( aDir.Y() );
|
||||||
myData[ DZ1 ]->setValue( aDir.Z() );
|
myData[ DZ1 ]->setValue( aDir.Z() );
|
||||||
myEditCurrentArgument->setText( aName );
|
myEditCurrentArgument->setText( aName );
|
||||||
if (Group2->LineEdit3->text() == "")
|
if (Group2->LineEdit3->text() == "")
|
||||||
Group2->PushButton3->click();
|
Group2->PushButton3->click();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myData[ DX1 ]->setValue( 0 );
|
myData[ DX1 ]->setValue( 0 );
|
||||||
myData[ DY1 ]->setValue( 0 );
|
myData[ DY1 ]->setValue( 0 );
|
||||||
myData[ DZ1 ]->setValue( 0 );
|
myData[ DZ1 ]->setValue( 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
|
else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
|
||||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) {
|
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) {
|
||||||
gp_Pnt aP1 = BRep_Tool::Pnt( TopExp::FirstVertex( TopoDS::Edge( aShape ) ) );
|
gp_Pnt aP1 = BRep_Tool::Pnt( TopExp::FirstVertex( TopoDS::Edge( aShape ) ) );
|
||||||
gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) );
|
gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) );
|
||||||
gp_Dir aDir(gp_Vec( aP1, aP2 ));
|
gp_Dir aDir(gp_Vec( aP1, aP2 ));
|
||||||
|
|
||||||
myData[ DX2 ]->setValue( aDir.X() );
|
myData[ DX2 ]->setValue( aDir.X() );
|
||||||
myData[ DY2 ]->setValue( aDir.Y() );
|
myData[ DY2 ]->setValue( aDir.Y() );
|
||||||
myData[ DZ2 ]->setValue( aDir.Z() );
|
myData[ DZ2 ]->setValue( aDir.Z() );
|
||||||
myEditCurrentArgument->setText( aName );
|
myEditCurrentArgument->setText( aName );
|
||||||
if (Group2->LineEdit1->text() == "")
|
if (Group2->LineEdit1->text() == "")
|
||||||
Group2->PushButton1->click();
|
Group2->PushButton1->click();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myData[ DX2 ]->setValue( 0 );
|
myData[ DX2 ]->setValue( 0 );
|
||||||
myData[ DY2 ]->setValue( 0 );
|
myData[ DY2 ]->setValue( 0 );
|
||||||
myData[ DZ2 ]->setValue( 0 );
|
myData[ DZ2 ]->setValue( 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -559,19 +559,19 @@ void BasicGUI_MarkerDlg::onSelectionDone()
|
|||||||
}
|
}
|
||||||
else if ( getConstructorId() == 2 ) {
|
else if ( getConstructorId() == 2 ) {
|
||||||
if ( myEditCurrentArgument == Group2->LineEdit1 ) {
|
if ( myEditCurrentArgument == Group2->LineEdit1 ) {
|
||||||
myData[ X ]->setValue( 0 );
|
myData[ X ]->setValue( 0 );
|
||||||
myData[ Y ]->setValue( 0 );
|
myData[ Y ]->setValue( 0 );
|
||||||
myData[ Z ]->setValue( 0 );
|
myData[ Z ]->setValue( 0 );
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group2->LineEdit2 ) {
|
else if ( myEditCurrentArgument == Group2->LineEdit2 ) {
|
||||||
myData[ DX1 ]->setValue( 0 );
|
myData[ DX1 ]->setValue( 0 );
|
||||||
myData[ DY1 ]->setValue( 0 );
|
myData[ DY1 ]->setValue( 0 );
|
||||||
myData[ DZ1 ]->setValue( 0 );
|
myData[ DZ1 ]->setValue( 0 );
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
|
else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
|
||||||
myData[ DX2 ]->setValue( 0 );
|
myData[ DX2 ]->setValue( 0 );
|
||||||
myData[ DY2 ]->setValue( 0 );
|
myData[ DY2 ]->setValue( 0 );
|
||||||
myData[ DZ2 ]->setValue( 0 );
|
myData[ DZ2 ]->setValue( 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -645,7 +645,7 @@ void BasicGUI_MarkerDlg::onActivate()
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT( onSelectionDone() ) );
|
this, SLOT( onSelectionDone() ) );
|
||||||
|
|
||||||
ConstructorsClicked( getConstructorId() );
|
ConstructorsClicked( getConstructorId() );
|
||||||
}
|
}
|
||||||
@ -722,14 +722,14 @@ bool BasicGUI_MarkerDlg::execute( ObjectList& objects )
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_IBasicOperations_var anOper = GEOM::GEOM_IBasicOperations::_narrow( getOperation() );
|
GEOM::GEOM_IBasicOperations_var anOper = GEOM::GEOM_IBasicOperations::_narrow( getOperation() );
|
||||||
GEOM::GEOM_Object_var anObj = anOper->MakeMarker( myData[ X ]->value(),
|
GEOM::GEOM_Object_var anObj = anOper->MakeMarker( myData[ X ]->value(),
|
||||||
myData[ Y ]->value(),
|
myData[ Y ]->value(),
|
||||||
myData[ Z ]->value(),
|
myData[ Z ]->value(),
|
||||||
myData[ DX1 ]->value(),
|
myData[ DX1 ]->value(),
|
||||||
myData[ DY1 ]->value(),
|
myData[ DY1 ]->value(),
|
||||||
myData[ DZ1 ]->value(),
|
myData[ DZ1 ]->value(),
|
||||||
myData[ DX2 ]->value(),
|
myData[ DX2 ]->value(),
|
||||||
myData[ DY2 ]->value(),
|
myData[ DY2 ]->value(),
|
||||||
myData[ DZ2 ]->value() );
|
myData[ DZ2 ]->value() );
|
||||||
QStringList aParameters;
|
QStringList aParameters;
|
||||||
aParameters<<myData[X]->text();
|
aParameters<<myData[X]->text();
|
||||||
aParameters<<myData[Y]->text();
|
aParameters<<myData[Y]->text();
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_PlaneDlg::BasicGUI_PlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_PlaneDlg::BasicGUI_PlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
bool modal, Qt::WindowFlags fl )
|
bool modal, Qt::WindowFlags fl )
|
||||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_PLANE_PV" ) ) );
|
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_PLANE_PV" ) ) );
|
||||||
@ -366,7 +366,7 @@ void BasicGUI_PlaneDlg::ConstructorsClicked( int constructorId )
|
|||||||
|
|
||||||
myEditCurrentArgument->setFocus();
|
myEditCurrentArgument->setFocus();
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT( SelectionIntoArgument() ) );
|
this, SLOT( SelectionIntoArgument() ) );
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -465,16 +465,16 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument()
|
|||||||
else
|
else
|
||||||
aName += QString( ":vertex_%1" ).arg( anIndex );
|
aName += QString( ":vertex_%1" ).arg( anIndex );
|
||||||
|
|
||||||
//Find SubShape Object in Father
|
//Find SubShape Object in Father
|
||||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
|
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
|
||||||
|
|
||||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||||
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aSelectedObject = aFindedObject; // get Object from study
|
aSelectedObject = aFindedObject; // get Object from study
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // Global Selection
|
else { // Global Selection
|
||||||
if ( aShape.ShapeType() != aNeedType ) {
|
if ( aShape.ShapeType() != aNeedType ) {
|
||||||
@ -489,50 +489,50 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument()
|
|||||||
/* if (!aSelectedObject->_is_nil()) { // clear selection if something selected
|
/* if (!aSelectedObject->_is_nil()) { // clear selection if something selected
|
||||||
globalSelection();
|
globalSelection();
|
||||||
if ( myEditCurrentArgument == GroupFace->LineEdit1 ) {
|
if ( myEditCurrentArgument == GroupFace->LineEdit1 ) {
|
||||||
TColStd_MapOfInteger aMap;
|
TColStd_MapOfInteger aMap;
|
||||||
aMap.Add( GEOM_PLANE );
|
aMap.Add( GEOM_PLANE );
|
||||||
aMap.Add( GEOM_MARKER );
|
aMap.Add( GEOM_MARKER );
|
||||||
globalSelection( aMap );
|
globalSelection( aMap );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
|
localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if ( myEditCurrentArgument == GroupPntDir->LineEdit1 ) {
|
if ( myEditCurrentArgument == GroupPntDir->LineEdit1 ) {
|
||||||
myPoint = aSelectedObject;
|
myPoint = aSelectedObject;
|
||||||
if ( !myPoint->_is_nil() && myDir->_is_nil() )
|
if ( !myPoint->_is_nil() && myDir->_is_nil() )
|
||||||
GroupPntDir->PushButton2->click();
|
GroupPntDir->PushButton2->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == GroupPntDir->LineEdit2 ) {
|
else if ( myEditCurrentArgument == GroupPntDir->LineEdit2 ) {
|
||||||
myDir = aSelectedObject;
|
myDir = aSelectedObject;
|
||||||
if ( !myDir->_is_nil() && myPoint->_is_nil() )
|
if ( !myDir->_is_nil() && myPoint->_is_nil() )
|
||||||
GroupPntDir->PushButton1->click();
|
GroupPntDir->PushButton1->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) {
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) {
|
||||||
myPoint1 = aSelectedObject;
|
myPoint1 = aSelectedObject;
|
||||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||||
Group3Pnts->PushButton2->click();
|
Group3Pnts->PushButton2->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) {
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) {
|
||||||
myPoint2 = aSelectedObject;
|
myPoint2 = aSelectedObject;
|
||||||
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
||||||
Group3Pnts->PushButton3->click();
|
Group3Pnts->PushButton3->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) {
|
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) {
|
||||||
myPoint3 = aSelectedObject;
|
myPoint3 = aSelectedObject;
|
||||||
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
||||||
Group3Pnts->PushButton1->click();
|
Group3Pnts->PushButton1->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == GroupFace->LineEdit1 )
|
else if ( myEditCurrentArgument == GroupFace->LineEdit1 )
|
||||||
myFace = aSelectedObject;
|
myFace = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == Group2Vec->LineEdit1 ) {
|
else if ( myEditCurrentArgument == Group2Vec->LineEdit1 ) {
|
||||||
myVec1 = aSelectedObject;
|
myVec1 = aSelectedObject;
|
||||||
if ( !myVec1->_is_nil() && myVec2->_is_nil() )
|
if ( !myVec1->_is_nil() && myVec2->_is_nil() )
|
||||||
Group2Vec->PushButton2->click();
|
Group2Vec->PushButton2->click();
|
||||||
} else if ( myEditCurrentArgument == Group2Vec->LineEdit2 ) {
|
} else if ( myEditCurrentArgument == Group2Vec->LineEdit2 ) {
|
||||||
myVec2 = aSelectedObject;
|
myVec2 = aSelectedObject;
|
||||||
if ( !myVec2->_is_nil() && myVec1->_is_nil() )
|
if ( !myVec2->_is_nil() && myVec1->_is_nil() )
|
||||||
Group2Vec->PushButton1->click();
|
Group2Vec->PushButton1->click();
|
||||||
} else if ( myEditCurrentArgument == GroupLCS->LineEdit1 )
|
} else if ( myEditCurrentArgument == GroupLCS->LineEdit1 )
|
||||||
myLCS = aSelectedObject;
|
myLCS = aSelectedObject;
|
||||||
|
|
||||||
@ -660,7 +660,7 @@ void BasicGUI_PlaneDlg::ActivateThisDialog()
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT( SelectionIntoArgument() ) );
|
this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
ConstructorsClicked( getConstructorId() );
|
ConstructorsClicked( getConstructorId() );
|
||||||
SelectionIntoArgument();
|
SelectionIntoArgument();
|
||||||
@ -741,7 +741,7 @@ GEOM::GEOM_IOperations_ptr BasicGUI_PlaneDlg::createOperation()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
static bool isEqual( const GEOM::GEOM_Object_var& thePnt1, const GEOM::GEOM_Object_var& thePnt2 )
|
static bool isEqual( const GEOM::GEOM_Object_var& thePnt1, const GEOM::GEOM_Object_var& thePnt2 )
|
||||||
{
|
{
|
||||||
return thePnt1->_is_equivalent( thePnt2 );
|
return thePnt1->_is_equivalent( thePnt2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_PointDlg::BasicGUI_PointDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_PointDlg::BasicGUI_PointDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
bool modal, Qt::WindowFlags fl )
|
bool modal, Qt::WindowFlags fl )
|
||||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POINT") ) );
|
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POINT") ) );
|
||||||
@ -275,7 +275,7 @@ void BasicGUI_PointDlg::Init()
|
|||||||
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) );
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) );
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ),
|
||||||
this, SLOT(SelectionIntoArgument() ) );
|
this, SLOT(SelectionIntoArgument() ) );
|
||||||
|
|
||||||
|
|
||||||
initName( tr( "GEOM_VERTEX" ) );
|
initName( tr( "GEOM_VERTEX" ) );
|
||||||
@ -496,18 +496,18 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
|
|||||||
else
|
else
|
||||||
aName += QString( ":vertex_%1" ).arg( anIndex );
|
aName += QString( ":vertex_%1" ).arg( anIndex );
|
||||||
|
|
||||||
//Find SubShape Object in Father
|
//Find SubShape Object in Father
|
||||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
||||||
|
|
||||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
||||||
getGeomEngine()->GetIShapesOperations(getStudyId());
|
getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aSelectedObject = aFindedObject; // get Object from study
|
aSelectedObject = aFindedObject; // get Object from study
|
||||||
}
|
}
|
||||||
GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE );
|
GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE );
|
||||||
}
|
}
|
||||||
else { // Global Selection
|
else { // Global Selection
|
||||||
if ( aShape.ShapeType() != aNeedType ) {
|
if ( aShape.ShapeType() != aNeedType ) {
|
||||||
@ -519,7 +519,7 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( aShape.IsNull() || aShape.ShapeType() != aNeedType)
|
if ( aShape.IsNull() || aShape.ShapeType() != aNeedType)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( id == GEOM_POINT_XYZ ) {
|
if ( id == GEOM_POINT_XYZ ) {
|
||||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||||
@ -536,24 +536,24 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
|
|||||||
GroupOnCurve->LineEdit1->setText( aName );
|
GroupOnCurve->LineEdit1->setText( aName );
|
||||||
}
|
}
|
||||||
else if ( id == GEOM_POINT_INTINT ) {
|
else if ( id == GEOM_POINT_INTINT ) {
|
||||||
myEditCurrentArgument->setText( aName );
|
myEditCurrentArgument->setText( aName );
|
||||||
globalSelection();
|
globalSelection();
|
||||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
|
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
|
||||||
if ( myEditCurrentArgument == GroupLineIntersection->LineEdit1 ) {
|
if ( myEditCurrentArgument == GroupLineIntersection->LineEdit1 ) {
|
||||||
myLine1 = aSelectedObject;
|
myLine1 = aSelectedObject;
|
||||||
if ( !myLine1->_is_nil() && myLine2->_is_nil() )
|
if ( !myLine1->_is_nil() && myLine2->_is_nil() )
|
||||||
GroupLineIntersection->PushButton2->click();
|
GroupLineIntersection->PushButton2->click();
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == GroupLineIntersection->LineEdit2 ) {
|
else if ( myEditCurrentArgument == GroupLineIntersection->LineEdit2 ) {
|
||||||
myLine2 = aSelectedObject;
|
myLine2 = aSelectedObject;
|
||||||
if ( !myLine2->_is_nil() && myLine1->_is_nil() )
|
if ( !myLine2->_is_nil() && myLine1->_is_nil() )
|
||||||
GroupLineIntersection->PushButton1->click();
|
GroupLineIntersection->PushButton1->click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( id == GEOM_POINT_SURF )
|
else if ( id == GEOM_POINT_SURF )
|
||||||
{
|
{
|
||||||
myFace = aSelectedObject;
|
myFace = aSelectedObject;
|
||||||
GroupOnSurface->LineEdit1->setText( aName );
|
GroupOnSurface->LineEdit1->setText( aName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -648,7 +648,7 @@ void BasicGUI_PointDlg::ActivateThisDialog( )
|
|||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT( SelectionIntoArgument() ) );
|
this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
ConstructorsClicked( getConstructorId() );
|
ConstructorsClicked( getConstructorId() );
|
||||||
}
|
}
|
||||||
@ -869,9 +869,9 @@ bool BasicGUI_PointDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
const int id = getConstructorId();
|
const int id = getConstructorId();
|
||||||
if(!anObj->_is_nil() && !IsPreview() && (id == GEOM_POINT_XYZ ||
|
if(!anObj->_is_nil() && !IsPreview() && (id == GEOM_POINT_XYZ ||
|
||||||
id == GEOM_POINT_REF ||
|
id == GEOM_POINT_REF ||
|
||||||
id == GEOM_POINT_EDGE ||
|
id == GEOM_POINT_EDGE ||
|
||||||
id == GEOM_POINT_SURF) ) {
|
id == GEOM_POINT_SURF) ) {
|
||||||
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
|
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_VectorDlg::BasicGUI_VectorDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_VectorDlg::BasicGUI_VectorDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
bool modal, Qt::WindowFlags fl )
|
bool modal, Qt::WindowFlags fl )
|
||||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_VECTOR_2P" ) ) );
|
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_VECTOR_2P" ) ) );
|
||||||
@ -161,7 +161,7 @@ void BasicGUI_VectorDlg::Init()
|
|||||||
connect( GroupDimensions->CheckButton1, SIGNAL( stateChanged( int ) ), this, SLOT( ReverseVector( int ) ) );
|
connect( GroupDimensions->CheckButton1, SIGNAL( stateChanged( int ) ), this, SLOT( ReverseVector( int ) ) );
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr("GEOM_VECTOR") );
|
initName( tr("GEOM_VECTOR") );
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId )
|
|||||||
globalSelection(); // close local contexts, if any
|
globalSelection(); // close local contexts, if any
|
||||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
@ -297,16 +297,16 @@ void BasicGUI_VectorDlg::SelectionIntoArgument()
|
|||||||
int anIndex = aMap(1);
|
int anIndex = aMap(1);
|
||||||
aName += QString(":vertex_%1").arg(anIndex);
|
aName += QString(":vertex_%1").arg(anIndex);
|
||||||
|
|
||||||
//Find SubShape Object in Father
|
//Find SubShape Object in Father
|
||||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
||||||
|
|
||||||
if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study
|
if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aSelectedObject = aFindedObject; // get Object from study
|
aSelectedObject = aFindedObject; // get Object from study
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // Global Selection
|
else { // Global Selection
|
||||||
if (aShape.ShapeType() != TopAbs_VERTEX) {
|
if (aShape.ShapeType() != TopAbs_VERTEX) {
|
||||||
@ -326,12 +326,12 @@ void BasicGUI_VectorDlg::SelectionIntoArgument()
|
|||||||
if (myEditCurrentArgument == GroupPoints->LineEdit1) {
|
if (myEditCurrentArgument == GroupPoints->LineEdit1) {
|
||||||
myPoint1 = aSelectedObject;
|
myPoint1 = aSelectedObject;
|
||||||
if (!myPoint1->_is_nil() && myPoint2->_is_nil())
|
if (!myPoint1->_is_nil() && myPoint2->_is_nil())
|
||||||
GroupPoints->PushButton2->click();
|
GroupPoints->PushButton2->click();
|
||||||
}
|
}
|
||||||
else if (myEditCurrentArgument == GroupPoints->LineEdit2) {
|
else if (myEditCurrentArgument == GroupPoints->LineEdit2) {
|
||||||
myPoint2 = aSelectedObject;
|
myPoint2 = aSelectedObject;
|
||||||
if (!myPoint2->_is_nil() && myPoint1->_is_nil())
|
if (!myPoint2->_is_nil() && myPoint1->_is_nil())
|
||||||
GroupPoints->PushButton1->click();
|
GroupPoints->PushButton1->click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
BasicGUI_WorkingPlaneDlg::BasicGUI_WorkingPlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
BasicGUI_WorkingPlaneDlg::BasicGUI_WorkingPlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
bool modal, Qt::WindowFlags fl )
|
bool modal, Qt::WindowFlags fl )
|
||||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
||||||
@ -174,7 +174,7 @@ void BasicGUI_WorkingPlaneDlg::Init()
|
|||||||
connect( myReverseCB, SIGNAL( clicked() ), this, SLOT( onReverse() ) );
|
connect( myReverseCB, SIGNAL( clicked() ), this, SLOT( onReverse() ) );
|
||||||
|
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_WPLANE" ) );
|
initName( tr( "GEOM_WPLANE" ) );
|
||||||
|
|
||||||
@ -322,7 +322,7 @@ void BasicGUI_WorkingPlaneDlg::SelectionIntoArgument()
|
|||||||
if ( myEditCurrentArgument == Group1->LineEdit1 )
|
if ( myEditCurrentArgument == Group1->LineEdit1 )
|
||||||
myFace = aSelectedObject;
|
myFace = aSelectedObject;
|
||||||
else if ( myEditCurrentArgument == Group2->LineEdit1 ||
|
else if ( myEditCurrentArgument == Group2->LineEdit1 ||
|
||||||
myEditCurrentArgument == Group2->LineEdit2 ) {
|
myEditCurrentArgument == Group2->LineEdit2 ) {
|
||||||
if ( aRes && !aSelectedObject->_is_nil() ) {
|
if ( aRes && !aSelectedObject->_is_nil() ) {
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
|
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
|
||||||
@ -332,18 +332,18 @@ void BasicGUI_WorkingPlaneDlg::SelectionIntoArgument()
|
|||||||
int anIndex = aMap( 1 );
|
int anIndex = aMap( 1 );
|
||||||
aName = aName + ":edge_" + QString::number( anIndex );
|
aName = aName + ":edge_" + QString::number( anIndex );
|
||||||
|
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
||||||
getGeomEngine()->GetIShapesOperations( getStudyId() );
|
getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||||
if ( myEditCurrentArgument == Group2->LineEdit1 )
|
if ( myEditCurrentArgument == Group2->LineEdit1 )
|
||||||
myVectX = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
myVectX = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||||
else
|
else
|
||||||
myVectZ = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
myVectZ = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( aShape.ShapeType() != TopAbs_EDGE ) {
|
if ( aShape.ShapeType() != TopAbs_EDGE ) {
|
||||||
aSelectedObject = GEOM::GEOM_Object::_nil();
|
aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||||
aName = "";
|
aName = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aSelMgr->clearSelected();
|
aSelMgr->clearSelected();
|
||||||
}
|
}
|
||||||
@ -437,7 +437,7 @@ void BasicGUI_WorkingPlaneDlg::ActivateThisDialog( )
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication( ) ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication( ) ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
ConstructorsClicked( getConstructorId() );
|
ConstructorsClicked( getConstructorId() );
|
||||||
}
|
}
|
||||||
@ -476,7 +476,7 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
|||||||
if ( id == 0 ) { // by planar face selection
|
if ( id == 0 ) { // by planar face selection
|
||||||
if ( CORBA::is_nil( myFace ) ) {
|
if ( CORBA::is_nil( myFace ) ) {
|
||||||
if ( !showPreview )
|
if ( !showPreview )
|
||||||
showError( "Face has to be selected" );
|
showError( "Face has to be selected" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -498,14 +498,14 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( !showPreview )
|
if ( !showPreview )
|
||||||
showError( "Wrong shape selected (has to be a planar face)" );
|
showError( "Wrong shape selected (has to be a planar face)" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( id == 1 ) { // by two vectors (Ox & Oz)
|
else if ( id == 1 ) { // by two vectors (Ox & Oz)
|
||||||
if ( CORBA::is_nil( myVectX ) || CORBA::is_nil( myVectZ ) ) {
|
if ( CORBA::is_nil( myVectX ) || CORBA::is_nil( myVectZ ) ) {
|
||||||
if ( !showPreview )
|
if ( !showPreview )
|
||||||
showError( "Two vectors have to be selected" );
|
showError( "Two vectors have to be selected" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -514,9 +514,9 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
|||||||
gp_Vec aVX, aVZ;
|
gp_Vec aVX, aVZ;
|
||||||
|
|
||||||
if ( !GEOMBase::GetShape( myVectX, aVectX, TopAbs_EDGE ) ||
|
if ( !GEOMBase::GetShape( myVectX, aVectX, TopAbs_EDGE ) ||
|
||||||
!GEOMBase::GetShape( myVectZ, aVectZ, TopAbs_EDGE ) ) {
|
!GEOMBase::GetShape( myVectZ, aVectZ, TopAbs_EDGE ) ) {
|
||||||
if ( !showPreview )
|
if ( !showPreview )
|
||||||
showError( "Wrong shape selected (two vectors(edges) have to be selected)" );
|
showError( "Wrong shape selected (two vectors(edges) have to be selected)" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -525,12 +525,12 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
|||||||
|
|
||||||
if ( VX1.IsNull() || VX2.IsNull() ) {
|
if ( VX1.IsNull() || VX2.IsNull() ) {
|
||||||
if ( !showPreview )
|
if ( !showPreview )
|
||||||
showError( "Bad OX vector" );
|
showError( "Bad OX vector" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ( VZ1.IsNull() || VZ2.IsNull() ) {
|
if ( VZ1.IsNull() || VZ2.IsNull() ) {
|
||||||
if ( !showPreview )
|
if ( !showPreview )
|
||||||
showError( "Bad OZ vector" );
|
showError( "Bad OZ vector" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -539,12 +539,12 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
|||||||
|
|
||||||
if ( aVX.Magnitude() < Precision::Confusion() ) {
|
if ( aVX.Magnitude() < Precision::Confusion() ) {
|
||||||
if ( !showPreview )
|
if ( !showPreview )
|
||||||
showError( "Bad OX vector" );
|
showError( "Bad OX vector" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ( aVZ.Magnitude() < Precision::Confusion() ) {
|
if ( aVZ.Magnitude() < Precision::Confusion() ) {
|
||||||
if ( !showPreview )
|
if ( !showPreview )
|
||||||
showError( "Bad OZ vector" );
|
showError( "Bad OZ vector" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -553,7 +553,7 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
|||||||
|
|
||||||
if ( aDirX.IsParallel( aDirZ, Precision::Angular() ) ) {
|
if ( aDirX.IsParallel( aDirZ, Precision::Angular() ) ) {
|
||||||
if ( !showPreview )
|
if ( !showPreview )
|
||||||
showError( "Parallel vectors selected" );
|
showError( "Parallel vectors selected" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ void BlocksGUI_ExplodeDlg::Init()
|
|||||||
connect( myGrp1->CheckBox1, SIGNAL( stateChanged( int ) ), this, SLOT( SubShapeToggled() ) );
|
connect( myGrp1->CheckBox1, SIGNAL( stateChanged( int ) ), this, SLOT( SubShapeToggled() ) );
|
||||||
|
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
myConstructorId = -1;
|
myConstructorId = -1;
|
||||||
ConstructorsClicked( 0 );
|
ConstructorsClicked( 0 );
|
||||||
@ -179,10 +179,10 @@ bool BlocksGUI_ExplodeDlg::ClickOnApply()
|
|||||||
// More than 30 subshapes : ask confirmation
|
// More than 30 subshapes : ask confirmation
|
||||||
if ( myNbBlocks > 30 ) {
|
if ( myNbBlocks > 30 ) {
|
||||||
if ( SUIT_MessageBox::warning( this,
|
if ( SUIT_MessageBox::warning( this,
|
||||||
tr( "GEOM_CONFIRM" ),
|
tr( "GEOM_CONFIRM" ),
|
||||||
tr( "GEOM_CONFIRM_INFO" ).arg( myNbBlocks ),
|
tr( "GEOM_CONFIRM_INFO" ).arg( myNbBlocks ),
|
||||||
tr( "GEOM_BUT_EXPLODE" ),
|
tr( "GEOM_BUT_EXPLODE" ),
|
||||||
tr( "GEOM_BUT_CANCEL" ) ) != 0 )
|
tr( "GEOM_BUT_CANCEL" ) ) != 0 )
|
||||||
return false; /* aborted */
|
return false; /* aborted */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ void BlocksGUI_ExplodeDlg::ActivateThisDialog()
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
activateSelection();
|
activateSelection();
|
||||||
}
|
}
|
||||||
@ -297,13 +297,13 @@ void BlocksGUI_ExplodeDlg::activateSelection()
|
|||||||
|
|
||||||
if ( isAllSubShapes() ) { // Sub-shapes selection disabled
|
if ( isAllSubShapes() ) { // Sub-shapes selection disabled
|
||||||
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
globalSelection( GEOM_ALLSHAPES );
|
globalSelection( GEOM_ALLSHAPES );
|
||||||
if ( myObject->_is_nil() ) {
|
if ( myObject->_is_nil() ) {
|
||||||
SelectionIntoArgument();
|
SelectionIntoArgument();
|
||||||
}
|
}
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
displayPreview( true, true, false );
|
displayPreview( true, true, false );
|
||||||
@ -334,9 +334,9 @@ void BlocksGUI_ExplodeDlg::updateButtonState()
|
|||||||
else {
|
else {
|
||||||
GEOM::GEOM_IBlocksOperations_var anOper = GEOM::GEOM_IBlocksOperations::_narrow(getOperation());
|
GEOM::GEOM_IBlocksOperations_var anOper = GEOM::GEOM_IBlocksOperations::_narrow(getOperation());
|
||||||
bool isOnlyBlocks = anOper->IsCompoundOfBlocks( myObject,
|
bool isOnlyBlocks = anOper->IsCompoundOfBlocks( myObject,
|
||||||
myGrp1->SpinBox1->value(),
|
myGrp1->SpinBox1->value(),
|
||||||
myGrp1->SpinBox2->value(),
|
myGrp1->SpinBox2->value(),
|
||||||
myNbBlocks );
|
myNbBlocks );
|
||||||
if ( isOnlyBlocks )
|
if ( isOnlyBlocks )
|
||||||
myGrp1->TextBrowser1->setText( tr( "GEOM_NB_BLOCKS_NO_OTHERS" ).arg( myNbBlocks ) );
|
myGrp1->TextBrowser1->setText( tr( "GEOM_NB_BLOCKS_NO_OTHERS" ).arg( myNbBlocks ) );
|
||||||
else
|
else
|
||||||
@ -406,8 +406,8 @@ bool BlocksGUI_ExplodeDlg::execute( ObjectList& objects )
|
|||||||
switch ( getConstructorId() ) {
|
switch ( getConstructorId() ) {
|
||||||
case 0:
|
case 0:
|
||||||
aList = anOper->ExplodeCompoundOfBlocks( myObject,
|
aList = anOper->ExplodeCompoundOfBlocks( myObject,
|
||||||
myGrp1->SpinBox1->value(),
|
myGrp1->SpinBox1->value(),
|
||||||
myGrp1->SpinBox2->value() );
|
myGrp1->SpinBox2->value() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -452,7 +452,7 @@ bool BlocksGUI_ExplodeDlg::execute( ObjectList& objects )
|
|||||||
CORBA::String_var objStr = myGeomGUI->getApp()->orb()->object_to_string( *anIter );
|
CORBA::String_var objStr = myGeomGUI->getApp()->orb()->object_to_string( *anIter );
|
||||||
if ( selected.contains( QString( objStr.in() ) ) )
|
if ( selected.contains( QString( objStr.in() ) ) )
|
||||||
{
|
{
|
||||||
if ( !IsPreview() )
|
if ( !IsPreview() )
|
||||||
(*anIter)->SetParameters(aParameters.join(":").toLatin1().constData());
|
(*anIter)->SetParameters(aParameters.join(":").toLatin1().constData());
|
||||||
objects.push_back( *anIter );
|
objects.push_back( *anIter );
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ void BlocksGUI_PropagateDlg::activateSelection()
|
|||||||
SelectionIntoArgument();
|
SelectionIntoArgument();
|
||||||
}
|
}
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//================================================================
|
//================================================================
|
||||||
|
@ -581,8 +581,8 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects)
|
|||||||
switch (getConstructorId()) {
|
switch (getConstructorId()) {
|
||||||
case 0:
|
case 0:
|
||||||
anObj = anOper->MakeMultiTransformation1D(myShape,
|
anObj = anOper->MakeMultiTransformation1D(myShape,
|
||||||
myFaces[Face1], myFaces[Face2],
|
myFaces[Face1], myFaces[Face2],
|
||||||
mySpinBox[SpinBox1]->value());
|
mySpinBox[SpinBox1]->value());
|
||||||
if (!anObj->_is_nil() && !IsPreview())
|
if (!anObj->_is_nil() && !IsPreview())
|
||||||
{
|
{
|
||||||
QStringList aParameters;
|
QStringList aParameters;
|
||||||
@ -594,10 +594,10 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects)
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
anObj = anOper->MakeMultiTransformation2D (myShape,
|
anObj = anOper->MakeMultiTransformation2D (myShape,
|
||||||
myFaces[Face1U], myFaces[Face2U],
|
myFaces[Face1U], myFaces[Face2U],
|
||||||
mySpinBox[SpinBox2U]->value(),
|
mySpinBox[SpinBox2U]->value(),
|
||||||
myFaces[Face1V], myFaces[Face2V],
|
myFaces[Face1V], myFaces[Face2V],
|
||||||
mySpinBox[SpinBox2V]->value());
|
mySpinBox[SpinBox2V]->value());
|
||||||
if (!anObj->_is_nil() && !IsPreview())
|
if (!anObj->_is_nil() && !IsPreview())
|
||||||
{
|
{
|
||||||
QStringList aParameters;
|
QStringList aParameters;
|
||||||
|
@ -283,7 +283,7 @@ void BooleanGUI_Dialog::ActivateThisDialog()
|
|||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT( SelectionIntoArgument() ) );
|
this, SLOT( SelectionIntoArgument() ) );
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ class BooleanGUI_Dialog : public GEOMBase_Skeleton
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
BooleanGUI_Dialog( const int, GeometryGUI*, QWidget* = 0,
|
BooleanGUI_Dialog( const int, GeometryGUI*, QWidget* = 0,
|
||||||
bool = false, Qt::WindowFlags = 0 );
|
bool = false, Qt::WindowFlags = 0 );
|
||||||
~BooleanGUI_Dialog();
|
~BooleanGUI_Dialog();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -107,7 +107,7 @@ void BuildGUI_CompoundDlg::Init()
|
|||||||
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
connect( GroupShapes->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupShapes->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( ( (SalomeApp_Application*)(SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)(SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL(currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL(currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
globalSelection( GEOM_ALLSHAPES );
|
globalSelection( GEOM_ALLSHAPES );
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ void BuildGUI_CompoundDlg::ActivateThisDialog()
|
|||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
globalSelection( GEOM_ALLSHAPES );
|
globalSelection( GEOM_ALLSHAPES );
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ void BuildGUI_CompoundDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy,
|
|||||||
if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
|
if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
|
||||||
// empty list of arguments means that all arguments should be restored
|
// empty list of arguments means that all arguments should be restored
|
||||||
getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
|
getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
|
||||||
/*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
|
/*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
|
||||||
/*theInheritFirstArg=*/false );
|
/*theInheritFirstArg=*/false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ void BuildGUI_EdgeDlg::ActivateThisDialog()
|
|||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT( SelectionIntoArgument() ) );
|
this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ void BuildGUI_FaceDlg::Init()
|
|||||||
connect( GroupWire->LineEdit1, SIGNAL( returnPressed()), this, SLOT( LineEditReturnPressed() ) );
|
connect( GroupWire->LineEdit1, SIGNAL( returnPressed()), this, SLOT( LineEditReturnPressed() ) );
|
||||||
connect( GroupWire->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupWire->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_FACE" ) );
|
initName( tr( "GEOM_FACE" ) );
|
||||||
}
|
}
|
||||||
@ -203,7 +203,7 @@ void BuildGUI_FaceDlg::ActivateThisDialog()
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
TColStd_MapOfInteger aMap;
|
TColStd_MapOfInteger aMap;
|
||||||
aMap.Add( GEOM_EDGE );
|
aMap.Add( GEOM_EDGE );
|
||||||
aMap.Add( GEOM_WIRE );
|
aMap.Add( GEOM_WIRE );
|
||||||
|
@ -119,7 +119,7 @@ void BuildGUI_ShellDlg::Init()
|
|||||||
connect( GroupShell->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupShell->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
|
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_SHELL" ) );
|
initName( tr( "GEOM_SHELL" ) );
|
||||||
}
|
}
|
||||||
@ -213,7 +213,7 @@ void BuildGUI_ShellDlg::ActivateThisDialog()
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
TColStd_MapOfInteger aMap;
|
TColStd_MapOfInteger aMap;
|
||||||
aMap.Add( GEOM_SHELL );
|
aMap.Add( GEOM_SHELL );
|
||||||
aMap.Add( GEOM_FACE );
|
aMap.Add( GEOM_FACE );
|
||||||
|
@ -113,7 +113,7 @@ void BuildGUI_SolidDlg::Init()
|
|||||||
connect( GroupSolid->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( EnableNameField( bool ) ) );
|
connect( GroupSolid->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( EnableNameField( bool ) ) );
|
||||||
|
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_SOLID" ) );
|
initName( tr( "GEOM_SOLID" ) );
|
||||||
}
|
}
|
||||||
@ -208,7 +208,7 @@ void BuildGUI_SolidDlg::ActivateThisDialog()
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
globalSelection( GEOM_SHELL );
|
globalSelection( GEOM_SHELL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ private:
|
|||||||
private:
|
private:
|
||||||
GEOM::ListOfGO myShells;
|
GEOM::ListOfGO myShells;
|
||||||
bool myOkShells; /* to check when arguments is defined and
|
bool myOkShells; /* to check when arguments is defined and
|
||||||
all shells are closed */
|
all shells are closed */
|
||||||
|
|
||||||
DlgRef_1Sel1Check* GroupSolid;
|
DlgRef_1Sel1Check* GroupSolid;
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ void BuildGUI_WireDlg::Init()
|
|||||||
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
connect( GroupArgs->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
connect( GroupArgs->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_WIRE" ) );
|
initName( tr( "GEOM_WIRE" ) );
|
||||||
}
|
}
|
||||||
@ -209,7 +209,7 @@ void BuildGUI_WireDlg::ActivateThisDialog()
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
TColStd_MapOfInteger aMap;
|
TColStd_MapOfInteger aMap;
|
||||||
aMap.Add( GEOM_WIRE );
|
aMap.Add( GEOM_WIRE );
|
||||||
aMap.Add( GEOM_EDGE );
|
aMap.Add( GEOM_EDGE );
|
||||||
|
@ -212,8 +212,8 @@ void DisplayGUI::EraseAll()
|
|||||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
||||||
SUIT_ViewManager* vman = vw->getViewManager();
|
SUIT_ViewManager* vman = vw->getViewManager();
|
||||||
if ( vman->getType() == OCCViewer_Viewer::Type() ||
|
if ( vman->getType() == OCCViewer_Viewer::Type() ||
|
||||||
vman->getType() == SVTK_Viewer::Type() ) {
|
vman->getType() == SVTK_Viewer::Type() ) {
|
||||||
GEOM_Displayer( appStudy ).EraseAll();
|
GEOM_Displayer( appStudy ).EraseAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -258,25 +258,25 @@ void DisplayGUI::Display()
|
|||||||
if ( anIObject->hasEntry() ) {
|
if ( anIObject->hasEntry() ) {
|
||||||
_PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
|
_PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
|
||||||
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
|
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
|
||||||
_PTR(SComponent) SC ( SO->GetFatherComponent() );
|
_PTR(SComponent) SC ( SO->GetFatherComponent() );
|
||||||
// if component is selected
|
// if component is selected
|
||||||
listIO.Clear();
|
listIO.Clear();
|
||||||
_PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
|
_PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
|
||||||
anIter->InitEx( true );
|
anIter->InitEx( true );
|
||||||
while( anIter->More() ) {
|
while( anIter->More() ) {
|
||||||
_PTR(SObject) valSO ( anIter->Value() );
|
_PTR(SObject) valSO ( anIter->Value() );
|
||||||
_PTR(SObject) refSO;
|
_PTR(SObject) refSO;
|
||||||
if ( !valSO->ReferencedObject( refSO ) ) {
|
if ( !valSO->ReferencedObject( refSO ) ) {
|
||||||
listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
|
listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
|
||||||
SC->ComponentDataType().c_str(),
|
SC->ComponentDataType().c_str(),
|
||||||
valSO->GetName().c_str()) );
|
valSO->GetName().c_str()) );
|
||||||
}
|
}
|
||||||
anIter->Next();
|
anIter->Next();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
listIO.Append( anIObject );
|
listIO.Append( anIObject );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -316,25 +316,25 @@ void DisplayGUI::Erase()
|
|||||||
if ( anIObject->hasEntry() ) {
|
if ( anIObject->hasEntry() ) {
|
||||||
_PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
|
_PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
|
||||||
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
|
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
|
||||||
_PTR(SComponent) SC ( SO->GetFatherComponent() );
|
_PTR(SComponent) SC ( SO->GetFatherComponent() );
|
||||||
// if component is selected
|
// if component is selected
|
||||||
listIO.Clear();
|
listIO.Clear();
|
||||||
_PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
|
_PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
|
||||||
anIter->InitEx( true );
|
anIter->InitEx( true );
|
||||||
while( anIter->More() ) {
|
while( anIter->More() ) {
|
||||||
_PTR(SObject) valSO ( anIter->Value() );
|
_PTR(SObject) valSO ( anIter->Value() );
|
||||||
_PTR(SObject) refSO;
|
_PTR(SObject) refSO;
|
||||||
if ( !valSO->ReferencedObject( refSO ) ) {
|
if ( !valSO->ReferencedObject( refSO ) ) {
|
||||||
listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
|
listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
|
||||||
SC->ComponentDataType().c_str(),
|
SC->ComponentDataType().c_str(),
|
||||||
valSO->GetName().c_str()) );
|
valSO->GetName().c_str()) );
|
||||||
}
|
}
|
||||||
anIter->Next();
|
anIter->Next();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
listIO.Append( anIObject );
|
listIO.Append( anIObject );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -378,8 +378,8 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
|
|||||||
AIS_ListIteratorOfListOfInteractive ite( List );
|
AIS_ListIteratorOfListOfInteractive ite( List );
|
||||||
while( ite.More() ) {
|
while( ite.More() ) {
|
||||||
if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
|
if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
|
||||||
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
|
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
|
||||||
ic->SetDisplayMode( aSh, Standard_Integer( newmode ),true );
|
ic->SetDisplayMode( aSh, Standard_Integer( newmode ),true );
|
||||||
}
|
}
|
||||||
ite.Next();
|
ite.Next();
|
||||||
}
|
}
|
||||||
@ -427,12 +427,12 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
|
|||||||
allActors->InitTraversal();
|
allActors->InitTraversal();
|
||||||
while (vtkActor* actor = allActors->GetNextActor()) {
|
while (vtkActor* actor = allActors->GetNextActor()) {
|
||||||
if (actor->GetVisibility()) { // only for visible actors
|
if (actor->GetVisibility()) { // only for visible actors
|
||||||
GEOM_Actor* aGeomActor = 0;
|
GEOM_Actor* aGeomActor = 0;
|
||||||
if ( actor->IsA( "GEOM_Actor" ) ) {
|
if ( actor->IsA( "GEOM_Actor" ) ) {
|
||||||
aGeomActor = GEOM_Actor::SafeDownCast( actor );
|
aGeomActor = GEOM_Actor::SafeDownCast( actor );
|
||||||
if ( aGeomActor )
|
if ( aGeomActor )
|
||||||
aGeomActor->SetVectorMode( mode );
|
aGeomActor->SetVectorMode( mode );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -449,9 +449,9 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
|
|||||||
AIS_ListIteratorOfListOfInteractive ite( List );
|
AIS_ListIteratorOfListOfInteractive ite( List );
|
||||||
while( ite.More() ) {
|
while( ite.More() ) {
|
||||||
if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
|
if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
|
||||||
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
|
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
|
||||||
aSh->SetDisplayVectors(mode);
|
aSh->SetDisplayVectors(mode);
|
||||||
ic->RecomputePrsOnly(ite.Value());
|
ic->RecomputePrsOnly(ite.Value());
|
||||||
}
|
}
|
||||||
ite.Next();
|
ite.Next();
|
||||||
}
|
}
|
||||||
|
@ -581,7 +581,7 @@ void DlgRef_3Sel3Spin1Check::ShowRows( int fromRow, int toRow, bool toShow )
|
|||||||
int row, col, rowspan, colspan;
|
int row, col, rowspan, colspan;
|
||||||
gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
|
gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
|
||||||
if ( w && row >= fromRow && row <= toRow )
|
if ( w && row >= fromRow && row <= toRow )
|
||||||
w->setVisible( toShow );
|
w->setVisible( toShow );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -611,7 +611,7 @@ void DlgRef_3Sel3Spin2Check::ShowRows( int fromRow, int toRow, bool toShow )
|
|||||||
int row, col, rowspan, colspan;
|
int row, col, rowspan, colspan;
|
||||||
gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
|
gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
|
||||||
if ( w && row >= fromRow && row <= toRow )
|
if ( w && row >= fromRow && row <= toRow )
|
||||||
w->setVisible( toShow );
|
w->setVisible( toShow );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -725,7 +725,7 @@ void DlgRef_4Sel1Spin2Check::ShowRows( int fromRow, int toRow, bool toShow )
|
|||||||
int row, col, rowspan, colspan;
|
int row, col, rowspan, colspan;
|
||||||
gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
|
gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
|
||||||
if ( w && row >= fromRow && row <= toRow )
|
if ( w && row >= fromRow && row <= toRow )
|
||||||
w->setVisible( toShow );
|
w->setVisible( toShow );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -793,7 +793,7 @@ QString DlgRef::PrintDoubleValue( double theValue, int thePrecision )
|
|||||||
double v = aRes.toDouble();
|
double v = aRes.toDouble();
|
||||||
double err = qAbs( theValue - v );
|
double err = qAbs( theValue - v );
|
||||||
if ( err > 0 && err <= prec )
|
if ( err > 0 && err <= prec )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#include "ui_DlgRef_1List1Spin1Btn_QTD.h"
|
#include "ui_DlgRef_1List1Spin1Btn_QTD.h"
|
||||||
|
|
||||||
class DLGREF_EXPORT DlgRef_1List1Spin1Btn : public QWidget,
|
class DLGREF_EXPORT DlgRef_1List1Spin1Btn : public QWidget,
|
||||||
public Ui::DlgRef_1List1Spin1Btn_QTD
|
public Ui::DlgRef_1List1Spin1Btn_QTD
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ public:
|
|||||||
#include "ui_DlgRef_1Sel1Check1List_QTD.h"
|
#include "ui_DlgRef_1Sel1Check1List_QTD.h"
|
||||||
|
|
||||||
class DLGREF_EXPORT DlgRef_1Sel1Check1List : public QWidget,
|
class DLGREF_EXPORT DlgRef_1Sel1Check1List : public QWidget,
|
||||||
public Ui::DlgRef_1Sel1Check1List_QTD
|
public Ui::DlgRef_1Sel1Check1List_QTD
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ public:
|
|||||||
#include "ui_DlgRef_1Sel1Check1Sel_QTD.h"
|
#include "ui_DlgRef_1Sel1Check1Sel_QTD.h"
|
||||||
|
|
||||||
class DLGREF_EXPORT DlgRef_1Sel1Check1Sel : public QWidget,
|
class DLGREF_EXPORT DlgRef_1Sel1Check1Sel : public QWidget,
|
||||||
public Ui::DlgRef_1Sel1Check1Sel_QTD
|
public Ui::DlgRef_1Sel1Check1Sel_QTD
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ public:
|
|||||||
#include "ui_DlgRef_1Sel1Check_QTD.h"
|
#include "ui_DlgRef_1Sel1Check_QTD.h"
|
||||||
|
|
||||||
class DLGREF_EXPORT DlgRef_1Sel1Check : public QWidget,
|
class DLGREF_EXPORT DlgRef_1Sel1Check : public QWidget,
|
||||||
public Ui::DlgRef_1Sel1Check_QTD
|
public Ui::DlgRef_1Sel1Check_QTD
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ public:
|
|||||||
#include "ui_DlgRef_1Sel1List1Check3Btn_QTD.h"
|
#include "ui_DlgRef_1Sel1List1Check3Btn_QTD.h"
|
||||||
|
|
||||||
class DLGREF_EXPORT DlgRef_1Sel1List1Check3Btn : public QWidget,
|
class DLGREF_EXPORT DlgRef_1Sel1List1Check3Btn : public QWidget,
|
||||||
public Ui::DlgRef_1Sel1List1Check3Btn_QTD
|
public Ui::DlgRef_1Sel1List1Check3Btn_QTD
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public:
|
|||||||
#include "ui_DlgRef_1Sel1Spin1Check_QTD.h"
|
#include "ui_DlgRef_1Sel1Spin1Check_QTD.h"
|
||||||
|
|
||||||
class DLGREF_EXPORT DlgRef_1Sel1Spin1Check : public QWidget,
|
class DLGREF_EXPORT DlgRef_1Sel1Spin1Check : public QWidget,
|
||||||
public Ui::DlgRef_1Sel1Spin1Check_QTD
|
public Ui::DlgRef_1Sel1Spin1Check_QTD
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ public:
|
|||||||
#include "ui_DlgRef_1Sel1Spin_QTD.h"
|
#include "ui_DlgRef_1Sel1Spin_QTD.h"
|
||||||
|
|
||||||
class DLGREF_EXPORT DlgRef_1Sel1Spin : public QWidget,
|
class DLGREF_EXPORT DlgRef_1Sel1Spin : public QWidget,
|
||||||
public Ui::DlgRef_1Sel1Spin_QTD
|
public Ui::DlgRef_1Sel1Spin_QTD
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -195,13 +195,13 @@ bool EntityGUI::SObjectExist( const _PTR(SObject)& theFatherObject, const char*
|
|||||||
if ( SO->FindAttribute( anAttr, "AttributeIOR" ) ) {
|
if ( SO->FindAttribute( anAttr, "AttributeIOR" ) ) {
|
||||||
_PTR(AttributeIOR) anIOR ( anAttr );
|
_PTR(AttributeIOR) anIOR ( anAttr );
|
||||||
if ( strcmp( anIOR->Value().c_str(), IOR ) == 0 )
|
if ( strcmp( anIOR->Value().c_str(), IOR ) == 0 )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if ( SO->ReferencedObject( RefSO ) ) {
|
if ( SO->ReferencedObject( RefSO ) ) {
|
||||||
if ( RefSO->FindAttribute( anAttr, "AttributeIOR" ) ) {
|
if ( RefSO->FindAttribute( anAttr, "AttributeIOR" ) ) {
|
||||||
_PTR(AttributeIOR) anIOR ( anAttr );
|
_PTR(AttributeIOR) anIOR ( anAttr );
|
||||||
if ( strcmp( anIOR->Value().c_str(), IOR ) == 0 )
|
if ( strcmp( anIOR->Value().c_str(), IOR ) == 0 )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,8 +67,8 @@ private:
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
EntityGUI_3DSketcherDlg::EntityGUI_3DSketcherDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
EntityGUI_3DSketcherDlg::EntityGUI_3DSketcherDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
bool modal, Qt::WindowFlags fl,
|
bool modal, Qt::WindowFlags fl,
|
||||||
const double lineWidth )
|
const double lineWidth )
|
||||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ),
|
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ),
|
||||||
myGeometryGUI( theGeometryGUI ),
|
myGeometryGUI( theGeometryGUI ),
|
||||||
myLineWidth( lineWidth )
|
myLineWidth( lineWidth )
|
||||||
@ -306,45 +306,45 @@ void EntityGUI_3DSketcherDlg::SelectionIntoArgument()
|
|||||||
if (!CORBA::is_nil(aSelectedObject) && aRes) {
|
if (!CORBA::is_nil(aSelectedObject) && aRes) {
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE)) { // Explore the shape if its a local selection
|
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE)) { // Explore the shape if its a local selection
|
||||||
TColStd_IndexedMapOfInteger aMap;
|
TColStd_IndexedMapOfInteger aMap;
|
||||||
aSelMgr->GetIndexes(aSelList.First(), aMap);
|
aSelMgr->GetIndexes(aSelList.First(), aMap);
|
||||||
if (aMap.Extent() == 1)
|
if (aMap.Extent() == 1)
|
||||||
{
|
{
|
||||||
int anIndex = aMap(1);
|
int anIndex = aMap(1);
|
||||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool isOk = true;
|
bool isOk = true;
|
||||||
if ( aShape.ShapeType() != TopAbs_VERTEX )
|
if ( aShape.ShapeType() != TopAbs_VERTEX )
|
||||||
isOk = GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_VERTEX);
|
isOk = GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_VERTEX);
|
||||||
if (isOk) {
|
if (isOk) {
|
||||||
gp_Pnt aPnt;
|
gp_Pnt aPnt;
|
||||||
if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) {
|
if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) {
|
||||||
// set coordinates to the Spin Boxes
|
// set coordinates to the Spin Boxes
|
||||||
double aX, aY, aZ;
|
double aX, aY, aZ;
|
||||||
aX = aPnt.X();
|
aX = aPnt.X();
|
||||||
aY = aPnt.Y();
|
aY = aPnt.Y();
|
||||||
aZ = aPnt.Z();
|
aZ = aPnt.Z();
|
||||||
bool blocked = Group3Spin->SpinBox_DX->signalsBlocked();
|
bool blocked = Group3Spin->SpinBox_DX->signalsBlocked();
|
||||||
Group3Spin->SpinBox_DX->blockSignals(true);
|
Group3Spin->SpinBox_DX->blockSignals(true);
|
||||||
Group3Spin->SpinBox_DY->blockSignals(true);
|
Group3Spin->SpinBox_DY->blockSignals(true);
|
||||||
Group3Spin->SpinBox_DZ->blockSignals(true);
|
Group3Spin->SpinBox_DZ->blockSignals(true);
|
||||||
if ( GroupType->RadioButton1->isChecked() ) {
|
if ( GroupType->RadioButton1->isChecked() ) {
|
||||||
Group3Spin->SpinBox_DX->setValue( aX );
|
Group3Spin->SpinBox_DX->setValue( aX );
|
||||||
Group3Spin->SpinBox_DY->setValue( aY );
|
Group3Spin->SpinBox_DY->setValue( aY );
|
||||||
Group3Spin->SpinBox_DZ->setValue( aZ );
|
Group3Spin->SpinBox_DZ->setValue( aZ );
|
||||||
} else if ( GroupType->RadioButton2->isChecked() ) {
|
} else if ( GroupType->RadioButton2->isChecked() ) {
|
||||||
double x, y, z;
|
double x, y, z;
|
||||||
GetLastPoints(x, y, z);
|
GetLastPoints(x, y, z);
|
||||||
Group3Spin->SpinBox_DX->setValue( aX - x );
|
Group3Spin->SpinBox_DX->setValue( aX - x );
|
||||||
Group3Spin->SpinBox_DY->setValue( aY - y );
|
Group3Spin->SpinBox_DY->setValue( aY - y );
|
||||||
Group3Spin->SpinBox_DZ->setValue( aZ - z );
|
Group3Spin->SpinBox_DZ->setValue( aZ - z );
|
||||||
}
|
}
|
||||||
Group3Spin->SpinBox_DX->blockSignals(blocked);
|
Group3Spin->SpinBox_DX->blockSignals(blocked);
|
||||||
Group3Spin->SpinBox_DY->blockSignals(blocked);
|
Group3Spin->SpinBox_DY->blockSignals(blocked);
|
||||||
Group3Spin->SpinBox_DZ->blockSignals(blocked);
|
Group3Spin->SpinBox_DZ->blockSignals(blocked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -375,7 +375,7 @@ void EntityGUI_3DSketcherDlg::ActivateThisDialog()
|
|||||||
myGeomGUI->SetActiveDialogBox( this );
|
myGeomGUI->SetActiveDialogBox( this );
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
||||||
GEOMBase_Helper::displayPreview( false, true, true, myLineWidth );
|
GEOMBase_Helper::displayPreview( false, true, true, myLineWidth );
|
||||||
@ -461,8 +461,8 @@ bool EntityGUI_3DSketcherDlg::execute( ObjectList& objects )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
|
||||||
void EntityGUI_3DSketcherDlg::initSpinBox( QDoubleSpinBox* spinBox,
|
void EntityGUI_3DSketcherDlg::initSpinBox( QDoubleSpinBox* spinBox,
|
||||||
double min, double max,
|
double min, double max,
|
||||||
double step, int decimals )
|
double step, int decimals )
|
||||||
{
|
{
|
||||||
spinBox->setDecimals( decimals );
|
spinBox->setDecimals( decimals );
|
||||||
spinBox->setRange( min, max );
|
spinBox->setRange( min, max );
|
||||||
@ -551,12 +551,12 @@ void EntityGUI_3DSketcherDlg::GetCurrentPoints(double& x, double& y, double& z)
|
|||||||
// Redefined from GEOMBase_Helper.
|
// Redefined from GEOMBase_Helper.
|
||||||
//================================================================
|
//================================================================
|
||||||
void EntityGUI_3DSketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object,
|
void EntityGUI_3DSketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object,
|
||||||
const bool append,
|
const bool append,
|
||||||
const bool activate,
|
const bool activate,
|
||||||
const bool update,
|
const bool update,
|
||||||
const double lineWidth,
|
const double lineWidth,
|
||||||
const int displayMode,
|
const int displayMode,
|
||||||
const int color )
|
const int color )
|
||||||
{
|
{
|
||||||
// Set color for preview shape
|
// Set color for preview shape
|
||||||
getDisplayer()->SetColor( Quantity_NOC_RED );
|
getDisplayer()->SetColor( Quantity_NOC_RED );
|
||||||
@ -597,8 +597,8 @@ void EntityGUI_3DSketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object,
|
|||||||
// Purpose : Create applyed wire, and last segment from entry object
|
// Purpose : Create applyed wire, and last segment from entry object
|
||||||
//================================================================
|
//================================================================
|
||||||
bool EntityGUI_3DSketcherDlg::createShapes( GEOM::GEOM_Object_ptr theObject,
|
bool EntityGUI_3DSketcherDlg::createShapes( GEOM::GEOM_Object_ptr theObject,
|
||||||
TopoDS_Shape& theApplyedWire,
|
TopoDS_Shape& theApplyedWire,
|
||||||
TopoDS_Shape& theLastSegment )
|
TopoDS_Shape& theLastSegment )
|
||||||
{
|
{
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
if ( !GEOMBase::GetShape( theObject, aShape ) ||
|
if ( !GEOMBase::GetShape( theObject, aShape ) ||
|
||||||
|
@ -53,8 +53,8 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initSpinBox( QDoubleSpinBox*,
|
void initSpinBox( QDoubleSpinBox*,
|
||||||
double, double, double = 0.1,
|
double, double, double = 0.1,
|
||||||
int = 3 );
|
int = 3 );
|
||||||
|
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
@ -66,16 +66,16 @@ private:
|
|||||||
void enterEvent( QEvent* );
|
void enterEvent( QEvent* );
|
||||||
|
|
||||||
virtual void displayPreview( GEOM::GEOM_Object_ptr,
|
virtual void displayPreview( GEOM::GEOM_Object_ptr,
|
||||||
const bool = false,
|
const bool = false,
|
||||||
const bool = false,
|
const bool = false,
|
||||||
const bool = true,
|
const bool = true,
|
||||||
const double = -1,
|
const double = -1,
|
||||||
const int = -1,
|
const int = -1,
|
||||||
const int = -1);
|
const int = -1);
|
||||||
|
|
||||||
bool createShapes( GEOM::GEOM_Object_ptr,
|
bool createShapes( GEOM::GEOM_Object_ptr,
|
||||||
TopoDS_Shape&,
|
TopoDS_Shape&,
|
||||||
TopoDS_Shape& );
|
TopoDS_Shape& );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList<double> myPointsList;
|
QList<double> myPointsList;
|
||||||
|
@ -64,8 +64,8 @@
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
EntityGUI_SketcherDlg::EntityGUI_SketcherDlg( GeometryGUI* GUI, QWidget* parent,
|
EntityGUI_SketcherDlg::EntityGUI_SketcherDlg( GeometryGUI* GUI, QWidget* parent,
|
||||||
bool modal, Qt::WindowFlags fl,
|
bool modal, Qt::WindowFlags fl,
|
||||||
const double lineWidth )
|
const double lineWidth )
|
||||||
: QDialog( parent, fl ),
|
: QDialog( parent, fl ),
|
||||||
myIsAllAdded( false ),
|
myIsAllAdded( false ),
|
||||||
myIsApply( false ),
|
myIsApply( false ),
|
||||||
@ -466,7 +466,7 @@ void EntityGUI_SketcherDlg::PointClicked( int constructorId )
|
|||||||
mySketchType = PT_SEL;
|
mySketchType = PT_SEL;
|
||||||
myEditCurrentArgument = Group1Sel->LineEdit1;
|
myEditCurrentArgument = Group1Sel->LineEdit1;
|
||||||
connect( myGeometryGUI->getApp()->selectionMgr(),
|
connect( myGeometryGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
Group1Sel->show();
|
Group1Sel->show();
|
||||||
Group1Sel->buttonApply->setFocus();
|
Group1Sel->buttonApply->setFocus();
|
||||||
SelectionIntoArgument();
|
SelectionIntoArgument();
|
||||||
@ -512,19 +512,19 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
|||||||
Group2Spin->show();
|
Group2Spin->show();
|
||||||
|
|
||||||
if ( constructorId == 2 ) { // Length
|
if ( constructorId == 2 ) { // Length
|
||||||
mySketchType = DIR_ANGLE_LENGTH;
|
mySketchType = DIR_ANGLE_LENGTH;
|
||||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
||||||
Group2Spin->SpinBox_DY->setValue( myLength );
|
Group2Spin->SpinBox_DY->setValue( myLength );
|
||||||
}
|
}
|
||||||
else if ( constructorId == 0 ) { // X
|
else if ( constructorId == 0 ) { // X
|
||||||
mySketchType = DIR_ANGLE_X;
|
mySketchType = DIR_ANGLE_X;
|
||||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_X3" ) );
|
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_X3" ) );
|
||||||
Group2Spin->SpinBox_DY->setValue( myX );
|
Group2Spin->SpinBox_DY->setValue( myX );
|
||||||
}
|
}
|
||||||
else if ( constructorId == 1 ) { // Y
|
else if ( constructorId == 1 ) { // Y
|
||||||
mySketchType = DIR_ANGLE_Y;
|
mySketchType = DIR_ANGLE_Y;
|
||||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
||||||
Group2Spin->SpinBox_DY->setValue( myY );
|
Group2Spin->SpinBox_DY->setValue( myY );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( myConstructorDirId == 0 ) { // Perpendicular
|
else if ( myConstructorDirId == 0 ) { // Perpendicular
|
||||||
@ -532,19 +532,19 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
|||||||
Group1Spin->buttonApply->setFocus();
|
Group1Spin->buttonApply->setFocus();
|
||||||
|
|
||||||
if ( constructorId == 2 ) { // Length
|
if ( constructorId == 2 ) { // Length
|
||||||
mySketchType = DIR_PER_LENGTH;
|
mySketchType = DIR_PER_LENGTH;
|
||||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
||||||
Group1Spin->SpinBox_DX->setValue( myLength );
|
Group1Spin->SpinBox_DX->setValue( myLength );
|
||||||
}
|
}
|
||||||
else if ( constructorId == 0 ) { // X
|
else if ( constructorId == 0 ) { // X
|
||||||
mySketchType = DIR_PER_X;
|
mySketchType = DIR_PER_X;
|
||||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X3" ) );
|
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X3" ) );
|
||||||
Group1Spin->SpinBox_DX->setValue( myX );
|
Group1Spin->SpinBox_DX->setValue( myX );
|
||||||
}
|
}
|
||||||
else if ( constructorId == 1 ) { // Y
|
else if ( constructorId == 1 ) { // Y
|
||||||
mySketchType = DIR_PER_Y;
|
mySketchType = DIR_PER_Y;
|
||||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
||||||
Group1Spin->SpinBox_DX->setValue( myY );
|
Group1Spin->SpinBox_DX->setValue( myY );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( myConstructorDirId == 1 ) { // Tangent
|
else if ( myConstructorDirId == 1 ) { // Tangent
|
||||||
@ -552,19 +552,19 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
|||||||
Group1Spin->buttonApply->setFocus();
|
Group1Spin->buttonApply->setFocus();
|
||||||
|
|
||||||
if ( constructorId == 2 ) { // Length
|
if ( constructorId == 2 ) { // Length
|
||||||
mySketchType = DIR_TAN_LENGTH;
|
mySketchType = DIR_TAN_LENGTH;
|
||||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
||||||
Group1Spin->SpinBox_DX->setValue( myLength );
|
Group1Spin->SpinBox_DX->setValue( myLength );
|
||||||
}
|
}
|
||||||
else if ( constructorId == 0 ) { // X
|
else if ( constructorId == 0 ) { // X
|
||||||
mySketchType = DIR_TAN_X;
|
mySketchType = DIR_TAN_X;
|
||||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X3" ) );
|
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X3" ) );
|
||||||
Group1Spin->SpinBox_DX->setValue( myX );
|
Group1Spin->SpinBox_DX->setValue( myX );
|
||||||
}
|
}
|
||||||
else if ( constructorId == 1 ) { // Y
|
else if ( constructorId == 1 ) { // Y
|
||||||
mySketchType = DIR_TAN_Y;
|
mySketchType = DIR_TAN_Y;
|
||||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
||||||
Group1Spin->SpinBox_DX->setValue( myY );
|
Group1Spin->SpinBox_DX->setValue( myY );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( myConstructorDirId == 3 ) { // DXDY
|
else if ( myConstructorDirId == 3 ) { // DXDY
|
||||||
@ -581,88 +581,88 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
|||||||
Group3Spin->buttonApply->setFocus();
|
Group3Spin->buttonApply->setFocus();
|
||||||
|
|
||||||
if ( constructorId == 2 ) { // Length
|
if ( constructorId == 2 ) { // Length
|
||||||
mySketchType = DIR_DXDY_LENGTH;
|
mySketchType = DIR_DXDY_LENGTH;
|
||||||
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
||||||
Group3Spin->SpinBox_DZ->setValue( myLength );
|
Group3Spin->SpinBox_DZ->setValue( myLength );
|
||||||
}
|
}
|
||||||
else if ( constructorId == 0 ) { // X
|
else if ( constructorId == 0 ) { // X
|
||||||
mySketchType = DIR_DXDY_X;
|
mySketchType = DIR_DXDY_X;
|
||||||
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_X3" ) );
|
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_X3" ) );
|
||||||
Group3Spin->SpinBox_DZ->setValue( myX );
|
Group3Spin->SpinBox_DZ->setValue( myX );
|
||||||
}
|
}
|
||||||
else if ( constructorId == 1 ) { // Y
|
else if ( constructorId == 1 ) { // Y
|
||||||
mySketchType = DIR_DXDY_Y;
|
mySketchType = DIR_DXDY_Y;
|
||||||
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
||||||
Group3Spin->SpinBox_DZ->setValue( myY );
|
Group3Spin->SpinBox_DZ->setValue( myY );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( myConstructorId == 1 ) { // ARC
|
else if ( myConstructorId == 1 ) { // ARC
|
||||||
if ( myConstructorDirId == 2 ) { // Angle
|
if ( myConstructorDirId == 2 ) { // Angle
|
||||||
if ( constructorId == 2 ) { // Length
|
if ( constructorId == 2 ) { // Length
|
||||||
mySketchType = DIR_ANGLE_LENGTH;
|
mySketchType = DIR_ANGLE_LENGTH;
|
||||||
initSpinBox( Group3Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||||
initSpinBox( Group3Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||||
initSpinBox( Group3Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group3Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||||
Group3Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
Group3Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
||||||
Group3Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
Group3Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
||||||
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_ANGLE2" ));
|
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_ANGLE2" ));
|
||||||
Group3Spin->SpinBox_DX->setValue( myAngle );
|
Group3Spin->SpinBox_DX->setValue( myAngle );
|
||||||
myRadius = 100.0;
|
myRadius = 100.0;
|
||||||
Group3Spin->SpinBox_DY->setValue( myRadius );
|
Group3Spin->SpinBox_DY->setValue( myRadius );
|
||||||
myLength = 30.0;
|
myLength = 30.0;
|
||||||
Group3Spin->SpinBox_DZ->setValue( myLength );
|
Group3Spin->SpinBox_DZ->setValue( myLength );
|
||||||
Group3Spin->show();
|
Group3Spin->show();
|
||||||
Group3Spin->buttonApply->setFocus();
|
Group3Spin->buttonApply->setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( myConstructorDirId == 0 ) { // Perpendicular
|
else if ( myConstructorDirId == 0 ) { // Perpendicular
|
||||||
if ( constructorId == 2 ) { // Length
|
if ( constructorId == 2 ) { // Length
|
||||||
mySketchType = DIR_PER_LENGTH;
|
mySketchType = DIR_PER_LENGTH;
|
||||||
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||||
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||||
Group2Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
Group2Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
||||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
||||||
myRadius = 100.0;
|
myRadius = 100.0;
|
||||||
Group2Spin->SpinBox_DX->setValue( myRadius );
|
Group2Spin->SpinBox_DX->setValue( myRadius );
|
||||||
myLength = 30.0;
|
myLength = 30.0;
|
||||||
Group2Spin->SpinBox_DY->setValue( myLength );
|
Group2Spin->SpinBox_DY->setValue( myLength );
|
||||||
Group2Spin->show();
|
Group2Spin->show();
|
||||||
Group2Spin->buttonApply->setFocus();
|
Group2Spin->buttonApply->setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( myConstructorDirId == 1 ) { // Tangent
|
else if ( myConstructorDirId == 1 ) { // Tangent
|
||||||
if ( constructorId == 2 ) { // Length
|
if ( constructorId == 2 ) { // Length
|
||||||
mySketchType = DIR_TAN_LENGTH;
|
mySketchType = DIR_TAN_LENGTH;
|
||||||
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||||
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||||
Group2Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
Group2Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
||||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
||||||
myRadius = 100.0;
|
myRadius = 100.0;
|
||||||
Group2Spin->SpinBox_DX->setValue( myRadius );
|
Group2Spin->SpinBox_DX->setValue( myRadius );
|
||||||
myLength = 30.0;
|
myLength = 30.0;
|
||||||
Group2Spin->SpinBox_DY->setValue( myLength );
|
Group2Spin->SpinBox_DY->setValue( myLength );
|
||||||
Group2Spin->show();
|
Group2Spin->show();
|
||||||
Group2Spin->buttonApply->setFocus();
|
Group2Spin->buttonApply->setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( myConstructorDirId == 3 ) { // DXDY
|
else if ( myConstructorDirId == 3 ) { // DXDY
|
||||||
if ( constructorId == 2 ) { // Length
|
if ( constructorId == 2 ) { // Length
|
||||||
mySketchType = DIR_DXDY_LENGTH;
|
mySketchType = DIR_DXDY_LENGTH;
|
||||||
Group4Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_VX2" ) );
|
Group4Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_VX2" ) );
|
||||||
Group4Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_VY2" ) );
|
Group4Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_VY2" ) );
|
||||||
Group4Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
Group4Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
||||||
Group4Spin->TextLabel4->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
Group4Spin->TextLabel4->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
||||||
myDX = 0.0;
|
myDX = 0.0;
|
||||||
Group4Spin->SpinBox_DX->setValue( myDX );
|
Group4Spin->SpinBox_DX->setValue( myDX );
|
||||||
myDY = 0.0;
|
myDY = 0.0;
|
||||||
Group4Spin->SpinBox_DY->setValue( myDY );
|
Group4Spin->SpinBox_DY->setValue( myDY );
|
||||||
myRadius = 100.0;
|
myRadius = 100.0;
|
||||||
Group4Spin->SpinBox_DZ->setValue( myRadius );
|
Group4Spin->SpinBox_DZ->setValue( myRadius );
|
||||||
myLength = 30.0;
|
myLength = 30.0;
|
||||||
Group4Spin->SpinBox_DS->setValue( myLength );
|
Group4Spin->SpinBox_DS->setValue( myLength );
|
||||||
Group4Spin->show();
|
Group4Spin->show();
|
||||||
Group4Spin->buttonApply->setFocus();
|
Group4Spin->buttonApply->setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -691,7 +691,7 @@ void EntityGUI_SketcherDlg::ClickOnEnd()
|
|||||||
// Verify validity of commands
|
// Verify validity of commands
|
||||||
if ( myCommand.count() <= 2 ) {
|
if ( myCommand.count() <= 2 ) {
|
||||||
SUIT_MessageBox::critical( SUIT_Session::session()->activeApplication()->desktop(),
|
SUIT_MessageBox::critical( SUIT_Session::session()->activeApplication()->desktop(),
|
||||||
tr( "GEOM_ERROR_STATUS" ), tr( "CANNOT_CLOSE" ), tr( "BUT_OK" ) );
|
tr( "GEOM_ERROR_STATUS" ), tr( "CANNOT_CLOSE" ), tr( "BUT_OK" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -711,10 +711,10 @@ void EntityGUI_SketcherDlg::ClickOnEnd()
|
|||||||
else {
|
else {
|
||||||
// PAL16008 (Sketcher Validation should be equal to Apply&Close)
|
// PAL16008 (Sketcher Validation should be equal to Apply&Close)
|
||||||
if ( Group1Spin->buttonApply->isEnabled() && Group1Spin->isVisible() ||
|
if ( Group1Spin->buttonApply->isEnabled() && Group1Spin->isVisible() ||
|
||||||
Group2Spin->buttonApply->isEnabled() && Group2Spin->isVisible() ||
|
Group2Spin->buttonApply->isEnabled() && Group2Spin->isVisible() ||
|
||||||
Group3Spin->buttonApply->isEnabled() && Group3Spin->isVisible() ||
|
Group3Spin->buttonApply->isEnabled() && Group3Spin->isVisible() ||
|
||||||
Group4Spin->buttonApply->isEnabled() && Group4Spin->isVisible() ||
|
Group4Spin->buttonApply->isEnabled() && Group4Spin->isVisible() ||
|
||||||
Group1Sel ->buttonApply->isEnabled() && Group1Sel->isVisible() ) {
|
Group1Sel ->buttonApply->isEnabled() && Group1Sel->isVisible() ) {
|
||||||
ClickOnApply();
|
ClickOnApply();
|
||||||
}
|
}
|
||||||
myIsAllAdded = true;
|
myIsAllAdded = true;
|
||||||
@ -794,9 +794,9 @@ void EntityGUI_SketcherDlg::ClickOnHelp()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
SUIT_MessageBox::warning( 0, QObject::tr( "WRN_WARNING" ),
|
SUIT_MessageBox::warning( 0, QObject::tr( "WRN_WARNING" ),
|
||||||
QObject::tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ).
|
QObject::tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ).
|
||||||
arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( myHelpFileName ),
|
arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( myHelpFileName ),
|
||||||
QObject::tr( "BUT_OK" ) );
|
QObject::tr( "BUT_OK" ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -899,19 +899,19 @@ void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
|||||||
if (!CORBA::is_nil(aSelectedObject) && aRes) {
|
if (!CORBA::is_nil(aSelectedObject) && aRes) {
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_VERTEX)) {
|
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_VERTEX)) {
|
||||||
gp_Trsf aTrans;
|
gp_Trsf aTrans;
|
||||||
gp_Ax3 aWPlane = GetActiveLocalCS();
|
gp_Ax3 aWPlane = GetActiveLocalCS();
|
||||||
|
|
||||||
aTrans.SetTransformation(aWPlane);
|
aTrans.SetTransformation(aWPlane);
|
||||||
BRepBuilderAPI_Transform aTransformation (aShape, aTrans, Standard_False);
|
BRepBuilderAPI_Transform aTransformation (aShape, aTrans, Standard_False);
|
||||||
aShape = aTransformation.Shape();
|
aShape = aTransformation.Shape();
|
||||||
|
|
||||||
gp_Pnt aPnt;
|
gp_Pnt aPnt;
|
||||||
if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) {
|
if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) {
|
||||||
myX = aPnt.X();
|
myX = aPnt.X();
|
||||||
myY = aPnt.Y();
|
myY = aPnt.Y();
|
||||||
Group1Sel->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
|
Group1Sel->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -985,7 +985,7 @@ void EntityGUI_SketcherDlg::ActivateThisDialog()
|
|||||||
myGeometryGUI->SetActiveDialogBox( this );
|
myGeometryGUI->SetActiveDialogBox( this );
|
||||||
|
|
||||||
connect( myGeometryGUI->getApp()->selectionMgr(),
|
connect( myGeometryGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
//myGeometryGUI->SetState( 0 );
|
//myGeometryGUI->SetState( 0 );
|
||||||
globalSelection( GEOM_POINT );
|
globalSelection( GEOM_POINT );
|
||||||
@ -1397,16 +1397,16 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects )
|
|||||||
TopoDS_Vertex V1, V2;
|
TopoDS_Vertex V1, V2;
|
||||||
gp_Pnt pt;
|
gp_Pnt pt;
|
||||||
if ( myShape1.ShapeType() == TopAbs_VERTEX ) {
|
if ( myShape1.ShapeType() == TopAbs_VERTEX ) {
|
||||||
//the last shape is the first point
|
//the last shape is the first point
|
||||||
pt = BRep_Tool::Pnt( TopoDS::Vertex( myShape1 ) );
|
pt = BRep_Tool::Pnt( TopoDS::Vertex( myShape1 ) );
|
||||||
myLastX1 = pt.X();
|
myLastX1 = pt.X();
|
||||||
myLastY1 = pt.Y();
|
myLastY1 = pt.Y();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TopExp::Vertices( TopoDS::Wire( myShape1 ), V1, V2 );
|
TopExp::Vertices( TopoDS::Wire( myShape1 ), V1, V2 );
|
||||||
pt = BRep_Tool::Pnt( V2 );
|
pt = BRep_Tool::Pnt( V2 );
|
||||||
myLastX1 = pt.X();
|
myLastX1 = pt.X();
|
||||||
myLastY1 = pt.Y();
|
myLastY1 = pt.Y();
|
||||||
}
|
}
|
||||||
TopExp::Vertices( TopoDS::Wire( myShape2 ), V1, V2 );
|
TopExp::Vertices( TopoDS::Wire( myShape2 ), V1, V2 );
|
||||||
pt = BRep_Tool::Pnt( V2 );
|
pt = BRep_Tool::Pnt( V2 );
|
||||||
@ -1417,7 +1417,7 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
QString cmd;
|
QString cmd;
|
||||||
if ( ( mySketchState != FIRST_POINT &&
|
if ( ( mySketchState != FIRST_POINT &&
|
||||||
myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) {
|
myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) {
|
||||||
cmd = myCommand.join( "" );
|
cmd = myCommand.join( "" );
|
||||||
|
|
||||||
if ( Group1Sel->isVisible() ) {
|
if ( Group1Sel->isVisible() ) {
|
||||||
@ -1603,8 +1603,8 @@ void EntityGUI_SketcherDlg::keyPressEvent( QKeyEvent* e )
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EntityGUI_SketcherDlg::initSpinBox( SalomeApp_DoubleSpinBox* spinBox,
|
void EntityGUI_SketcherDlg::initSpinBox( SalomeApp_DoubleSpinBox* spinBox,
|
||||||
double min, double max,
|
double min, double max,
|
||||||
double step, int decimals )
|
double step, int decimals )
|
||||||
{
|
{
|
||||||
spinBox->setDecimals( decimals );
|
spinBox->setDecimals( decimals );
|
||||||
spinBox->setRange( min, max );
|
spinBox->setRange( min, max );
|
||||||
@ -1682,12 +1682,12 @@ void EntityGUI_SketcherDlg::FindLocalCS()
|
|||||||
gp_Ax3 aLCS;
|
gp_Ax3 aLCS;
|
||||||
aLCS.Transform(aShape.Location().Transformation());
|
aLCS.Transform(aShape.Location().Transformation());
|
||||||
if (aShape.ShapeType() == TopAbs_FACE) {
|
if (aShape.ShapeType() == TopAbs_FACE) {
|
||||||
Handle(Geom_Surface) aGS = BRep_Tool::Surface(TopoDS::Face(aShape));
|
Handle(Geom_Surface) aGS = BRep_Tool::Surface(TopoDS::Face(aShape));
|
||||||
if (!aGS.IsNull() && aGS->IsKind(STANDARD_TYPE(Geom_Plane))) {
|
if (!aGS.IsNull() && aGS->IsKind(STANDARD_TYPE(Geom_Plane))) {
|
||||||
Handle(Geom_Plane) aGPlane = Handle(Geom_Plane)::DownCast(aGS);
|
Handle(Geom_Plane) aGPlane = Handle(Geom_Plane)::DownCast(aGS);
|
||||||
gp_Pln aPln = aGPlane->Pln();
|
gp_Pln aPln = aGPlane->Pln();
|
||||||
aLCS = aPln.Position();
|
aLCS = aPln.Position();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
myLCSList.push_back(aLCS);
|
myLCSList.push_back(aLCS);
|
||||||
}
|
}
|
||||||
|
@ -64,15 +64,15 @@ class EntityGUI_SketcherDlg : public QDialog, GEOMBase_Helper
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
EntityGUI_SketcherDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0,
|
EntityGUI_SketcherDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0,
|
||||||
const double = 2. );
|
const double = 2. );
|
||||||
~EntityGUI_SketcherDlg();
|
~EntityGUI_SketcherDlg();
|
||||||
|
|
||||||
bool eventFilter (QObject* object, QEvent* event);
|
bool eventFilter (QObject* object, QEvent* event);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initSpinBox( SalomeApp_DoubleSpinBox*,
|
void initSpinBox( SalomeApp_DoubleSpinBox*,
|
||||||
double, double, double = 0.1,
|
double, double, double = 0.1,
|
||||||
int = 3 );
|
int = 3 );
|
||||||
|
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
@ -92,16 +92,16 @@ private:
|
|||||||
QString GetNewCommand( QString& );
|
QString GetNewCommand( QString& );
|
||||||
|
|
||||||
virtual void displayPreview( GEOM::GEOM_Object_ptr,
|
virtual void displayPreview( GEOM::GEOM_Object_ptr,
|
||||||
const bool = false,
|
const bool = false,
|
||||||
const bool = false,
|
const bool = false,
|
||||||
const bool = true,
|
const bool = true,
|
||||||
const double = -1,
|
const double = -1,
|
||||||
const int = -1,
|
const int = -1,
|
||||||
const int = -1);
|
const int = -1);
|
||||||
|
|
||||||
bool createShapes( GEOM::GEOM_Object_ptr,
|
bool createShapes( GEOM::GEOM_Object_ptr,
|
||||||
TopoDS_Shape&,
|
TopoDS_Shape&,
|
||||||
TopoDS_Shape& );
|
TopoDS_Shape& );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int myConstructorId;
|
int myConstructorId;
|
||||||
@ -157,10 +157,10 @@ private:
|
|||||||
enum SketchState { FIRST_POINT, NEXT_POINT };
|
enum SketchState { FIRST_POINT, NEXT_POINT };
|
||||||
|
|
||||||
enum SketchType { PT_ABS, PT_RELATIVE, PT_SEL,
|
enum SketchType { PT_ABS, PT_RELATIVE, PT_SEL,
|
||||||
DIR_ANGLE_LENGTH, DIR_ANGLE_X, DIR_ANGLE_Y,
|
DIR_ANGLE_LENGTH, DIR_ANGLE_X, DIR_ANGLE_Y,
|
||||||
DIR_PER_LENGTH, DIR_PER_X, DIR_PER_Y,
|
DIR_PER_LENGTH, DIR_PER_X, DIR_PER_Y,
|
||||||
DIR_TAN_LENGTH, DIR_TAN_X, DIR_TAN_Y,
|
DIR_TAN_LENGTH, DIR_TAN_X, DIR_TAN_Y,
|
||||||
DIR_DXDY_LENGTH, DIR_DXDY_X, DIR_DXDY_Y };
|
DIR_DXDY_LENGTH, DIR_DXDY_X, DIR_DXDY_Y };
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ClickOnEnd();
|
void ClickOnEnd();
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
bool modal, Qt::WindowFlags fl )
|
bool modal, Qt::WindowFlags fl )
|
||||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||||
{
|
{
|
||||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_SUBSHAPE" ) ) );
|
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_SUBSHAPE" ) ) );
|
||||||
@ -140,7 +140,7 @@ void EntityGUI_SubShapeDlg::Init()
|
|||||||
connect( GroupPoints->CheckButton1, SIGNAL( stateChanged( int ) ), this, SLOT( SubShapeToggled() ) );
|
connect( GroupPoints->CheckButton1, SIGNAL( stateChanged( int ) ), this, SLOT( SubShapeToggled() ) );
|
||||||
|
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged( )), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged( )), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
updateButtonState();
|
updateButtonState();
|
||||||
resize(100,100);
|
resize(100,100);
|
||||||
@ -344,7 +344,7 @@ void EntityGUI_SubShapeDlg::ActivateThisDialog()
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
SubShapeToggled();
|
SubShapeToggled();
|
||||||
updateButtonState();
|
updateButtonState();
|
||||||
}
|
}
|
||||||
@ -427,7 +427,7 @@ void EntityGUI_SubShapeDlg::ComboTextChanged()
|
|||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
unsigned int EntityGUI_SubShapeDlg::NumberOfSubShapes( const TopoDS_Shape& S,
|
unsigned int EntityGUI_SubShapeDlg::NumberOfSubShapes( const TopoDS_Shape& S,
|
||||||
const int shapeType ) const
|
const int shapeType ) const
|
||||||
{
|
{
|
||||||
if ( S.IsNull() )
|
if ( S.IsNull() )
|
||||||
return 0;
|
return 0;
|
||||||
@ -437,13 +437,13 @@ unsigned int EntityGUI_SubShapeDlg::NumberOfSubShapes( const TopoDS_Shape& S,
|
|||||||
|
|
||||||
if ( S.ShapeType() == TopAbs_COMPOUND &&
|
if ( S.ShapeType() == TopAbs_COMPOUND &&
|
||||||
( TopAbs_ShapeEnum(shapeType) == TopAbs_SHAPE ||
|
( TopAbs_ShapeEnum(shapeType) == TopAbs_SHAPE ||
|
||||||
TopAbs_ShapeEnum(shapeType) == TopAbs_COMPSOLID ||
|
TopAbs_ShapeEnum(shapeType) == TopAbs_COMPSOLID ||
|
||||||
TopAbs_ShapeEnum(shapeType) == TopAbs_COMPOUND ) ) {
|
TopAbs_ShapeEnum(shapeType) == TopAbs_COMPOUND ) ) {
|
||||||
TopoDS_Iterator It( S, Standard_True, Standard_True );
|
TopoDS_Iterator It( S, Standard_True, Standard_True );
|
||||||
for ( ; It.More(); It.Next() ) {
|
for ( ; It.More(); It.Next() ) {
|
||||||
if ( M.Add( It.Value() ) ) {
|
if ( M.Add( It.Value() ) ) {
|
||||||
if ( TopAbs_ShapeEnum( shapeType ) == TopAbs_SHAPE ||
|
if ( TopAbs_ShapeEnum( shapeType ) == TopAbs_SHAPE ||
|
||||||
TopAbs_ShapeEnum( shapeType ) == It.Value().ShapeType() ) {
|
TopAbs_ShapeEnum( shapeType ) == It.Value().ShapeType() ) {
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -574,18 +574,18 @@ bool EntityGUI_SubShapeDlg::execute (ObjectList& objects)
|
|||||||
if (aSelList.Extent() == 1) {
|
if (aSelList.Extent() == 1) {
|
||||||
Standard_Boolean aResult = Standard_False;
|
Standard_Boolean aResult = Standard_False;
|
||||||
GEOM::GEOM_Object_var anObj =
|
GEOM::GEOM_Object_var anObj =
|
||||||
GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
|
GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
|
||||||
|
|
||||||
if (aResult && !anObj->_is_nil()) {
|
if (aResult && !anObj->_is_nil()) {
|
||||||
TColStd_IndexedMapOfInteger aMapIndex;
|
TColStd_IndexedMapOfInteger aMapIndex;
|
||||||
aSelMgr->GetIndexes(aSelList.First(), aMapIndex);
|
aSelMgr->GetIndexes(aSelList.First(), aMapIndex);
|
||||||
|
|
||||||
GEOM::GEOM_ILocalOperations_var aLocOp =
|
GEOM::GEOM_ILocalOperations_var aLocOp =
|
||||||
getGeomEngine()->GetILocalOperations(getStudyId());
|
getGeomEngine()->GetILocalOperations(getStudyId());
|
||||||
|
|
||||||
for (int i = 0, n = aList->length(); i < n; i++)
|
for (int i = 0, n = aList->length(); i < n; i++)
|
||||||
if (aMapIndex.Contains(aLocOp->GetSubShapeIndex(myObject, aList[i])))
|
if (aMapIndex.Contains(aLocOp->GetSubShapeIndex(myObject, aList[i])))
|
||||||
objects.push_back(GEOM::GEOM_Object::_duplicate(aList[i]));
|
objects.push_back(GEOM::GEOM_Object::_duplicate(aList[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ private:
|
|||||||
|
|
||||||
void ResetStateOfDialog();
|
void ResetStateOfDialog();
|
||||||
unsigned int NumberOfSubShapes( const TopoDS_Shape&,
|
unsigned int NumberOfSubShapes( const TopoDS_Shape&,
|
||||||
const int ) const;
|
const int ) const;
|
||||||
|
|
||||||
void updateButtonState();
|
void updateButtonState();
|
||||||
bool isAllSubShapes() const;
|
bool isAllSubShapes() const;
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: BlockFix.cxx
|
// File: BlockFix.cxx
|
||||||
// Created: Tue Dec 7 11:59:05 2004
|
// Created: Tue Dec 7 11:59:05 2004
|
||||||
// Author: Pavel DURANDIN
|
// Author: Pavel DURANDIN
|
||||||
//
|
//
|
||||||
#include <BlockFix.hxx>
|
#include <BlockFix.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
|
@ -77,7 +77,7 @@ public:
|
|||||||
//
|
//
|
||||||
Standard_EXPORT friend Handle_Standard_Type& BlockFix_BlockFixAPI_Type_();
|
Standard_EXPORT friend Handle_Standard_Type& BlockFix_BlockFixAPI_Type_();
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Fields PRIVATE
|
// Fields PRIVATE
|
||||||
|
@ -40,10 +40,10 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_BlockFixAPI_Type_()
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_BlockFixAPI",
|
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_BlockFixAPI",
|
||||||
sizeof(BlockFix_BlockFixAPI),
|
sizeof(BlockFix_BlockFixAPI),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ Standard_EXPORT ~BlockFix_PeriodicSurfaceModifier();
|
|||||||
//
|
//
|
||||||
Standard_EXPORT friend Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_();
|
Standard_EXPORT friend Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_();
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -42,10 +42,10 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_()
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_PeriodicSurfaceModifier",
|
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_PeriodicSurfaceModifier",
|
||||||
sizeof(BlockFix_PeriodicSurfaceModifier),
|
sizeof(BlockFix_PeriodicSurfaceModifier),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: BlockFix.cxx
|
// File: BlockFix.cxx
|
||||||
// Created: Tue Dec 7 11:59:05 2004
|
// Created: Tue Dec 7 11:59:05 2004
|
||||||
// Author: Pavel DURANDIN
|
// Author: Pavel DURANDIN
|
||||||
//
|
//
|
||||||
#include <BlockFix_SphereSpaceModifier.ixx>
|
#include <BlockFix_SphereSpaceModifier.ixx>
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ Standard_EXPORT ~BlockFix_SphereSpaceModifier();
|
|||||||
//
|
//
|
||||||
Standard_EXPORT friend Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_();
|
Standard_EXPORT friend Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_();
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -42,10 +42,10 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_()
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_SphereSpaceModifier",
|
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_SphereSpaceModifier",
|
||||||
sizeof(BlockFix_SphereSpaceModifier),
|
sizeof(BlockFix_SphereSpaceModifier),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_Algo.cxx
|
// File: GEOMAlgo_Algo.cxx
|
||||||
// Created: Sat Dec 04 12:39:47 2004
|
// Created: Sat Dec 04 12:39:47 2004
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <peter@PREFEX>
|
// <peter@PREFEX>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_Algo.ixx>
|
#include <GEOMAlgo_Algo.ixx>
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_Builder.cxx
|
// File: GEOMAlgo_Builder.cxx
|
||||||
// Created:
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_Builder.ixx>
|
#include <GEOMAlgo_Builder.ixx>
|
||||||
|
|
||||||
@ -223,19 +223,19 @@
|
|||||||
aType=aS.ShapeType();
|
aType=aS.ShapeType();
|
||||||
if (aType==theType) {
|
if (aType==theType) {
|
||||||
if (myImages.HasImage(aS)){
|
if (myImages.HasImage(aS)){
|
||||||
const TopTools_ListOfShape& aLSIm=myImages.Image(aS);
|
const TopTools_ListOfShape& aLSIm=myImages.Image(aS);
|
||||||
aItIm.Initialize(aLSIm);
|
aItIm.Initialize(aLSIm);
|
||||||
for (; aItIm.More(); aItIm.Next()) {
|
for (; aItIm.More(); aItIm.Next()) {
|
||||||
const TopoDS_Shape& aSIm=aItIm.Value();
|
const TopoDS_Shape& aSIm=aItIm.Value();
|
||||||
if (aM.Add(aSIm)) {
|
if (aM.Add(aSIm)) {
|
||||||
aBB.Add(myShape, aSIm);
|
aBB.Add(myShape, aSIm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (aM.Add(aS)) {
|
if (aM.Add(aS)) {
|
||||||
aBB.Add(myShape, aS);
|
aBB.Add(myShape, aS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_BuilderArea.cxx
|
// File: GEOMAlgo_BuilderArea.cxx
|
||||||
// Created:
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_BuilderArea.ixx>
|
#include <GEOMAlgo_BuilderArea.ixx>
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_BuilderFace.cxx
|
// File: GEOMAlgo_BuilderFace.cxx
|
||||||
// Created:
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_BuilderFace.ixx>
|
#include <GEOMAlgo_BuilderFace.ixx>
|
||||||
|
|
||||||
@ -83,15 +83,15 @@
|
|||||||
static
|
static
|
||||||
Standard_Boolean IsGrowthWire(const TopoDS_Shape& ,
|
Standard_Boolean IsGrowthWire(const TopoDS_Shape& ,
|
||||||
|
|
||||||
const TopTools_IndexedMapOfShape& );
|
const TopTools_IndexedMapOfShape& );
|
||||||
|
|
||||||
static
|
static
|
||||||
Standard_Boolean IsInside(const TopoDS_Shape& ,
|
Standard_Boolean IsInside(const TopoDS_Shape& ,
|
||||||
const TopoDS_Shape& ,
|
const TopoDS_Shape& ,
|
||||||
IntTools_PContext& );
|
IntTools_PContext& );
|
||||||
static
|
static
|
||||||
void MakeInternalWires(const TopTools_MapOfShape& ,
|
void MakeInternalWires(const TopTools_MapOfShape& ,
|
||||||
TopTools_ListOfShape& );
|
TopTools_ListOfShape& );
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
@ -187,10 +187,10 @@ static
|
|||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aE=aIt.Value();
|
const TopoDS_Shape& aE=aIt.Value();
|
||||||
if (!myShapesToAvoid.Contains(aE)) {
|
if (!myShapesToAvoid.Contains(aE)) {
|
||||||
TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
|
TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int a=0;
|
int a=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aNbV=aMVE.Extent();
|
aNbV=aMVE.Extent();
|
||||||
@ -202,33 +202,33 @@ static
|
|||||||
TopTools_ListOfShape& aLE=aMVE.ChangeFromKey(aV);
|
TopTools_ListOfShape& aLE=aMVE.ChangeFromKey(aV);
|
||||||
aNbE=aLE.Extent();
|
aNbE=aLE.Extent();
|
||||||
if (!aNbE) {
|
if (!aNbE) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const TopoDS_Edge& aE1=TopoDS::Edge(aLE.First());
|
const TopoDS_Edge& aE1=TopoDS::Edge(aLE.First());
|
||||||
if (aNbE==1) {
|
if (aNbE==1) {
|
||||||
if (BRep_Tool::Degenerated(aE1)) {
|
if (BRep_Tool::Degenerated(aE1)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (aV.Orientation()==TopAbs_INTERNAL) {
|
if (aV.Orientation()==TopAbs_INTERNAL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
bFound=Standard_True;
|
bFound=Standard_True;
|
||||||
myShapesToAvoid.Add(aE1);
|
myShapesToAvoid.Add(aE1);
|
||||||
}
|
}
|
||||||
else if (aNbE==2) {
|
else if (aNbE==2) {
|
||||||
const TopoDS_Edge& aE2=TopoDS::Edge(aLE.Last());
|
const TopoDS_Edge& aE2=TopoDS::Edge(aLE.Last());
|
||||||
if (aE2.IsSame(aE1)) {
|
if (aE2.IsSame(aE1)) {
|
||||||
TopoDS_Vertex aV1x, aV2x;
|
TopoDS_Vertex aV1x, aV2x;
|
||||||
//
|
//
|
||||||
TopExp::Vertices(aE1, aV1x, aV2x);
|
TopExp::Vertices(aE1, aV1x, aV2x);
|
||||||
if (aV1x.IsSame(aV2x)) {
|
if (aV1x.IsSame(aV2x)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
bFound=Standard_True;
|
bFound=Standard_True;
|
||||||
myShapesToAvoid.Add(aE1);
|
myShapesToAvoid.Add(aE1);
|
||||||
myShapesToAvoid.Add(aE2);
|
myShapesToAvoid.Add(aE2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}// for (i=1; i<=aNbE; ++i) {
|
}// for (i=1; i<=aNbE; ++i) {
|
||||||
//
|
//
|
||||||
@ -342,18 +342,18 @@ static
|
|||||||
//
|
//
|
||||||
TopoDS_Iterator aItE(aE);
|
TopoDS_Iterator aItE(aE);
|
||||||
for (; aItE.More()&&bFlag; aItE.Next()) {
|
for (; aItE.More()&&bFlag; aItE.Next()) {
|
||||||
const TopoDS_Vertex& aV = TopoDS::Vertex(aItE.Value());
|
const TopoDS_Vertex& aV = TopoDS::Vertex(aItE.Value());
|
||||||
const TopTools_ListOfShape& aLE=aVEMap.FindFromKey(aV);
|
const TopTools_ListOfShape& aLE=aVEMap.FindFromKey(aV);
|
||||||
aIt.Initialize(aLE);
|
aIt.Initialize(aLE);
|
||||||
for (; aIt.More()&&bFlag; aIt.Next()) {
|
for (; aIt.More()&&bFlag; aIt.Next()) {
|
||||||
const TopoDS_Shape& aEx=aIt.Value();
|
const TopoDS_Shape& aEx=aIt.Value();
|
||||||
if (aMAdded.Add(aEx)) {
|
if (aMAdded.Add(aEx)) {
|
||||||
aBB.Add(aW, aEx);
|
aBB.Add(aW, aEx);
|
||||||
if(aMAdded.Extent()==aNbEA) {
|
if(aMAdded.Extent()==aNbEA) {
|
||||||
bFlag=!bFlag;
|
bFlag=!bFlag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}//for (; aIt.More(); aIt.Next()) {
|
}//for (; aIt.More(); aIt.Next()) {
|
||||||
}//for (; aItE.More(); aItE.Next()) {
|
}//for (; aItE.More(); aItE.Next()) {
|
||||||
}//for (; aItW.More(); aItW.Next()) {
|
}//for (; aItW.More(); aItW.Next()) {
|
||||||
myLoopsInternal.Append(aW);
|
myLoopsInternal.Append(aW);
|
||||||
@ -406,16 +406,16 @@ static
|
|||||||
bIsHole=GEOMAlgo_BuilderTools::IsHole(aWire, myFace);
|
bIsHole=GEOMAlgo_BuilderTools::IsHole(aWire, myFace);
|
||||||
//XX
|
//XX
|
||||||
if (bIsHole) {
|
if (bIsHole) {
|
||||||
aHoleWires.Append(aWire);
|
aHoleWires.Append(aWire);
|
||||||
TopExp::MapShapes(aWire, TopAbs_EDGE, aMHE);
|
TopExp::MapShapes(aWire, TopAbs_EDGE, aMHE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// make a growth face from a wire
|
// make a growth face from a wire
|
||||||
TopoDS_Face aFace;
|
TopoDS_Face aFace;
|
||||||
aBB.MakeFace(aFace, aS, aLoc, aTol);
|
aBB.MakeFace(aFace, aS, aLoc, aTol);
|
||||||
aBB.Add (aFace, aWire);
|
aBB.Add (aFace, aWire);
|
||||||
//
|
//
|
||||||
aNewFaces.Append (aFace);
|
aNewFaces.Append (aFace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -449,13 +449,13 @@ static
|
|||||||
if (aInOutMap.IsBound(aHole)){
|
if (aInOutMap.IsBound(aHole)){
|
||||||
const TopoDS_Shape& aF=aInOutMap(aHole);
|
const TopoDS_Shape& aF=aInOutMap(aHole);
|
||||||
if (aMSH.IsBound(aF)) {
|
if (aMSH.IsBound(aF)) {
|
||||||
TopTools_ListOfShape& aLH=aMSH.ChangeFind(aF);
|
TopTools_ListOfShape& aLH=aMSH.ChangeFind(aF);
|
||||||
aLH.Append(aHole);
|
aLH.Append(aHole);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TopTools_ListOfShape aLH;
|
TopTools_ListOfShape aLH;
|
||||||
aLH.Append(aHole);
|
aLH.Append(aHole);
|
||||||
aMSH.Bind(aF, aLH);
|
aMSH.Bind(aF, aLH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}// for (; aIt2.More(); aIt2.Next())
|
}// for (; aIt2.More(); aIt2.Next())
|
||||||
@ -531,7 +531,7 @@ static
|
|||||||
for (; aItME.More(); aItME.Next()) {
|
for (; aItME.More(); aItME.Next()) {
|
||||||
const TopoDS_Edge& aE=TopoDS::Edge(aItME.Key());
|
const TopoDS_Edge& aE=TopoDS::Edge(aItME.Key());
|
||||||
if (IsInside(aE, aF, myContext)) {
|
if (IsInside(aE, aF, myContext)) {
|
||||||
aMEP.Add(aE);
|
aMEP.Add(aE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -564,7 +564,7 @@ static
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void MakeInternalWires(const TopTools_MapOfShape& theME,
|
void MakeInternalWires(const TopTools_MapOfShape& theME,
|
||||||
TopTools_ListOfShape& theWires)
|
TopTools_ListOfShape& theWires)
|
||||||
{
|
{
|
||||||
TopTools_MapIteratorOfMapOfShape aItM;
|
TopTools_MapIteratorOfMapOfShape aItM;
|
||||||
TopTools_MapOfShape aAddedMap;
|
TopTools_MapOfShape aAddedMap;
|
||||||
@ -598,15 +598,15 @@ void MakeInternalWires(const TopTools_MapOfShape& theME,
|
|||||||
TopExp_Explorer aExp(aE, TopAbs_VERTEX);
|
TopExp_Explorer aExp(aE, TopAbs_VERTEX);
|
||||||
for (; aExp.More(); aExp.Next()) {
|
for (; aExp.More(); aExp.Next()) {
|
||||||
const TopoDS_Shape& aV =aExp.Current();
|
const TopoDS_Shape& aV =aExp.Current();
|
||||||
const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
|
const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
|
||||||
aItE.Initialize(aLE);
|
aItE.Initialize(aLE);
|
||||||
for (; aItE.More(); aItE.Next()) {
|
for (; aItE.More(); aItE.Next()) {
|
||||||
TopoDS_Shape aEL=aItE.Value();
|
TopoDS_Shape aEL=aItE.Value();
|
||||||
if (aAddedMap.Add(aEL)){
|
if (aAddedMap.Add(aEL)){
|
||||||
aEL.Orientation(TopAbs_INTERNAL);
|
aEL.Orientation(TopAbs_INTERNAL);
|
||||||
aBB.Add(aW, aEL);
|
aBB.Add(aW, aEL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
theWires.Append(aW);
|
theWires.Append(aW);
|
||||||
@ -617,8 +617,8 @@ void MakeInternalWires(const TopTools_MapOfShape& theME,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean IsInside(const TopoDS_Shape& theHole,
|
Standard_Boolean IsInside(const TopoDS_Shape& theHole,
|
||||||
const TopoDS_Shape& theF2,
|
const TopoDS_Shape& theF2,
|
||||||
IntTools_PContext& theContext)
|
IntTools_PContext& theContext)
|
||||||
{
|
{
|
||||||
Standard_Boolean bRet;
|
Standard_Boolean bRet;
|
||||||
Standard_Real aT, aU, aV;
|
Standard_Real aT, aU, aV;
|
||||||
@ -658,7 +658,7 @@ Standard_Boolean IsInside(const TopoDS_Shape& theHole,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
|
Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
|
||||||
const TopTools_IndexedMapOfShape& theMHE)
|
const TopTools_IndexedMapOfShape& theMHE)
|
||||||
{
|
{
|
||||||
Standard_Boolean bRet;
|
Standard_Boolean bRet;
|
||||||
TopoDS_Iterator aIt;
|
TopoDS_Iterator aIt;
|
||||||
@ -669,7 +669,7 @@ Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
|
|||||||
for(; aIt.More(); aIt.Next()) {
|
for(; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aE=aIt.Value();
|
const TopoDS_Shape& aE=aIt.Value();
|
||||||
if (theMHE.Contains(aE)) {
|
if (theMHE.Contains(aE)) {
|
||||||
return !bRet;
|
return !bRet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -688,8 +688,8 @@ Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean IsInside(const TopoDS_Shape& theHole,
|
Standard_Boolean IsInside(const TopoDS_Shape& theHole,
|
||||||
const TopoDS_Shape& theF2,
|
const TopoDS_Shape& theF2,
|
||||||
IntTools_PContext& theContext)
|
IntTools_PContext& theContext)
|
||||||
{
|
{
|
||||||
Standard_Real aT, aU, aV;
|
Standard_Real aT, aU, aV;
|
||||||
TopExp_Explorer aExp;
|
TopExp_Explorer aExp;
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_BuilderShape.cxx
|
// File: GEOMAlgo_BuilderShape.cxx
|
||||||
// Created:
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_BuilderShape.ixx>
|
#include <GEOMAlgo_BuilderShape.ixx>
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_BuilderSolid.cxx
|
// File: GEOMAlgo_BuilderSolid.cxx
|
||||||
// Created:
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_BuilderSolid.ixx>
|
#include <GEOMAlgo_BuilderSolid.ixx>
|
||||||
|
|
||||||
@ -82,17 +82,17 @@
|
|||||||
//
|
//
|
||||||
static
|
static
|
||||||
Standard_Boolean IsGrowthShell(const TopoDS_Shape& ,
|
Standard_Boolean IsGrowthShell(const TopoDS_Shape& ,
|
||||||
const TopTools_IndexedMapOfShape& );
|
const TopTools_IndexedMapOfShape& );
|
||||||
static
|
static
|
||||||
Standard_Boolean IsHole(const TopoDS_Shape& ,
|
Standard_Boolean IsHole(const TopoDS_Shape& ,
|
||||||
IntTools_PContext& );
|
IntTools_PContext& );
|
||||||
static
|
static
|
||||||
Standard_Boolean IsInside(const TopoDS_Shape& ,
|
Standard_Boolean IsInside(const TopoDS_Shape& ,
|
||||||
const TopoDS_Shape& ,
|
const TopoDS_Shape& ,
|
||||||
IntTools_PContext& );
|
IntTools_PContext& );
|
||||||
static
|
static
|
||||||
void MakeInternalShells(const TopTools_MapOfShape& ,
|
void MakeInternalShells(const TopTools_MapOfShape& ,
|
||||||
TopTools_ListOfShape& );
|
TopTools_ListOfShape& );
|
||||||
|
|
||||||
//modified by NIZNHY-PKV Tue Aug 5 15:06:50 2008f
|
//modified by NIZNHY-PKV Tue Aug 5 15:06:50 2008f
|
||||||
static
|
static
|
||||||
@ -184,10 +184,10 @@ static
|
|||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aF=aIt.Value();
|
const TopoDS_Shape& aF=aIt.Value();
|
||||||
if (!myShapesToAvoid.Contains(aF)) {
|
if (!myShapesToAvoid.Contains(aF)) {
|
||||||
TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int a=0;
|
int a=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aNbE=aMEF.Extent();
|
aNbE=aMEF.Extent();
|
||||||
@ -196,51 +196,51 @@ static
|
|||||||
for (i=1; i<=aNbE; ++i) {
|
for (i=1; i<=aNbE; ++i) {
|
||||||
const TopoDS_Edge& aE=TopoDS::Edge(aMEF.FindKey(i));
|
const TopoDS_Edge& aE=TopoDS::Edge(aMEF.FindKey(i));
|
||||||
if (BRep_Tool::Degenerated(aE)) {
|
if (BRep_Tool::Degenerated(aE)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
TopTools_ListOfShape& aLF=aMEF.ChangeFromKey(aE);
|
TopTools_ListOfShape& aLF=aMEF.ChangeFromKey(aE);
|
||||||
//
|
//
|
||||||
aNbF=aLF.Extent();
|
aNbF=aLF.Extent();
|
||||||
if (!aNbF) {
|
if (!aNbF) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aOrE=aE.Orientation();
|
aOrE=aE.Orientation();
|
||||||
//
|
//
|
||||||
const TopoDS_Face& aF1=TopoDS::Face(aLF.First());
|
const TopoDS_Face& aF1=TopoDS::Face(aLF.First());
|
||||||
if (aNbF==1) {
|
if (aNbF==1) {
|
||||||
if (aOrE==TopAbs_INTERNAL) {
|
if (aOrE==TopAbs_INTERNAL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
bFound=Standard_True;
|
bFound=Standard_True;
|
||||||
myShapesToAvoid.Add(aF1);
|
myShapesToAvoid.Add(aF1);
|
||||||
}
|
}
|
||||||
else if (aNbF==2) {
|
else if (aNbF==2) {
|
||||||
const TopoDS_Face& aF2=TopoDS::Face(aLF.Last());
|
const TopoDS_Face& aF2=TopoDS::Face(aLF.Last());
|
||||||
if (aF2.IsSame(aF1)) {
|
if (aF2.IsSame(aF1)) {
|
||||||
if (BRep_Tool::IsClosed(aE, aF1)) {
|
if (BRep_Tool::IsClosed(aE, aF1)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (aOrE==TopAbs_INTERNAL) {
|
if (aOrE==TopAbs_INTERNAL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
bFound=Standard_True;
|
bFound=Standard_True;
|
||||||
myShapesToAvoid.Add(aF1);
|
myShapesToAvoid.Add(aF1);
|
||||||
myShapesToAvoid.Add(aF2);
|
myShapesToAvoid.Add(aF2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//DEB
|
//DEB
|
||||||
else {
|
else {
|
||||||
TopTools_ListIteratorOfListOfShape aItLF;
|
TopTools_ListIteratorOfListOfShape aItLF;
|
||||||
//
|
//
|
||||||
aItLF.Initialize (aLF);
|
aItLF.Initialize (aLF);
|
||||||
for (; aItLF.More(); aItLF.Next()) {
|
for (; aItLF.More(); aItLF.Next()) {
|
||||||
const TopoDS_Shape& aFx=aItLF.Value();
|
const TopoDS_Shape& aFx=aItLF.Value();
|
||||||
int a=0;
|
int a=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//DEB
|
//DEB
|
||||||
}// for (i=1; i<=aNbE; ++i) {
|
}// for (i=1; i<=aNbE; ++i) {
|
||||||
@ -309,78 +309,78 @@ static
|
|||||||
TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
|
TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
|
||||||
for (; aEdgeExp.More(); aEdgeExp.Next()) {
|
for (; aEdgeExp.More(); aEdgeExp.Next()) {
|
||||||
const TopoDS_Edge& aE = TopoDS::Edge(aEdgeExp.Current());
|
const TopoDS_Edge& aE = TopoDS::Edge(aEdgeExp.Current());
|
||||||
//
|
//
|
||||||
//1
|
//1
|
||||||
if (aMEFP.Contains(aE)) {
|
if (aMEFP.Contains(aE)) {
|
||||||
const TopTools_ListOfShape& aLFP=aMEFP.FindFromKey(aE);
|
const TopTools_ListOfShape& aLFP=aMEFP.FindFromKey(aE);
|
||||||
aNbFP=aLFP.Extent();
|
aNbFP=aLFP.Extent();
|
||||||
if (aNbFP>1) {
|
if (aNbFP>1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//2
|
//2
|
||||||
anOr=aE.Orientation();
|
anOr=aE.Orientation();
|
||||||
if (anOr==TopAbs_INTERNAL) {
|
if (anOr==TopAbs_INTERNAL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//3
|
//3
|
||||||
if (BRep_Tool::Degenerated(aE)) {
|
if (BRep_Tool::Degenerated(aE)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// candidate faces list
|
// candidate faces list
|
||||||
const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE);
|
const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE);
|
||||||
aNbLF=aLF.Extent();
|
aNbLF=aLF.Extent();
|
||||||
if (!aNbLF) {
|
if (!aNbLF) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// try to select one of neighbors
|
// try to select one of neighbors
|
||||||
// check if a face already added to Shell shares E
|
// check if a face already added to Shell shares E
|
||||||
Standard_Boolean bFound;
|
Standard_Boolean bFound;
|
||||||
TopTools_ListIteratorOfListOfShape aItLF;
|
TopTools_ListIteratorOfListOfShape aItLF;
|
||||||
NMTTools_ListOfCoupleOfShape aLCSOff;
|
NMTTools_ListOfCoupleOfShape aLCSOff;
|
||||||
//
|
//
|
||||||
aItLF.Initialize(aLF);
|
aItLF.Initialize(aLF);
|
||||||
for (; aItLF.More(); aItLF.Next()) {
|
for (; aItLF.More(); aItLF.Next()) {
|
||||||
const TopoDS_Face& aFL=TopoDS::Face(aItLF.Value());
|
const TopoDS_Face& aFL=TopoDS::Face(aItLF.Value());
|
||||||
if (myShapesToAvoid.Contains(aFL)) {
|
if (myShapesToAvoid.Contains(aFL)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (aF.IsSame(aFL)) {
|
if (aF.IsSame(aFL)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (AddedFacesMap.Contains(aFL)){
|
if (AddedFacesMap.Contains(aFL)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
bFound=GEOMAlgo_Tools3D::GetEdgeOff(aE, aFL, aEL);
|
bFound=GEOMAlgo_Tools3D::GetEdgeOff(aE, aFL, aEL);
|
||||||
if (!bFound) {
|
if (!bFound) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aCSOff.SetShape1(aEL);
|
aCSOff.SetShape1(aEL);
|
||||||
aCSOff.SetShape2(aFL);
|
aCSOff.SetShape2(aFL);
|
||||||
aLCSOff.Append(aCSOff);
|
aLCSOff.Append(aCSOff);
|
||||||
}//for (; aItLF.More(); aItLF.Next()) {
|
}//for (; aItLF.More(); aItLF.Next()) {
|
||||||
//
|
//
|
||||||
aNbOff=aLCSOff.Extent();
|
aNbOff=aLCSOff.Extent();
|
||||||
if (!aNbOff){
|
if (!aNbOff){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
TopoDS_Face aSelF;
|
TopoDS_Face aSelF;
|
||||||
if (aNbOff==1) {
|
if (aNbOff==1) {
|
||||||
aSelF=TopoDS::Face(aLCSOff.First().Shape2());
|
aSelF=TopoDS::Face(aLCSOff.First().Shape2());
|
||||||
}
|
}
|
||||||
else if (aNbOff>1){
|
else if (aNbOff>1){
|
||||||
GEOMAlgo_Tools3D::GetFaceOff(aE, aF, aLCSOff, aSelF);
|
GEOMAlgo_Tools3D::GetFaceOff(aE, aF, aLCSOff, aSelF);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (!aSelF.IsNull() && AddedFacesMap.Add(aSelF)) {
|
if (!aSelF.IsNull() && AddedFacesMap.Add(aSelF)) {
|
||||||
aBB.Add(aShell, aSelF);
|
aBB.Add(aShell, aSelF);
|
||||||
TopExp::MapShapesAndAncestors(aSelF, TopAbs_EDGE, TopAbs_FACE, aMEFP);
|
TopExp::MapShapesAndAncestors(aSelF, TopAbs_EDGE, TopAbs_FACE, aMEFP);
|
||||||
}
|
}
|
||||||
} // for (; aEdgeExp.More(); aEdgeExp.Next()) {
|
} // for (; aEdgeExp.More(); aEdgeExp.Next()) {
|
||||||
} //for (; aItAddedF.More(); aItAddedF.Next()) {
|
} //for (; aItAddedF.More(); aItAddedF.Next()) {
|
||||||
//modified by NIZNHY-PKV Tue Aug 5 15:07:08 2008f
|
//modified by NIZNHY-PKV Tue Aug 5 15:07:08 2008f
|
||||||
@ -393,8 +393,8 @@ static
|
|||||||
TopoDS_Iterator aItS;
|
TopoDS_Iterator aItS;
|
||||||
aItS.Initialize(aShell);
|
aItS.Initialize(aShell);
|
||||||
for (; aItS.More(); aItS.Next()) {
|
for (; aItS.More(); aItS.Next()) {
|
||||||
const TopoDS_Shape& aFs=aItS.Value();
|
const TopoDS_Shape& aFs=aItS.Value();
|
||||||
aMFP.Add(aFs);
|
aMFP.Add(aFs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
@ -468,14 +468,14 @@ static
|
|||||||
TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
|
TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
|
||||||
for (; aEdgeExp.More(); aEdgeExp.Next()) {
|
for (; aEdgeExp.More(); aEdgeExp.Next()) {
|
||||||
const TopoDS_Edge& aE = TopoDS::Edge(aEdgeExp.Current());
|
const TopoDS_Edge& aE = TopoDS::Edge(aEdgeExp.Current());
|
||||||
const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE);
|
const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE);
|
||||||
aItF.Initialize(aLF);
|
aItF.Initialize(aLF);
|
||||||
for (; aItF.More(); aItF.Next()) {
|
for (; aItF.More(); aItF.Next()) {
|
||||||
const TopoDS_Face& aFL=TopoDS::Face(aItF.Value());
|
const TopoDS_Face& aFL=TopoDS::Face(aItF.Value());
|
||||||
if (AddedFacesMap.Add(aFL)){
|
if (AddedFacesMap.Add(aFL)){
|
||||||
aBB.Add(aShell, aFL);
|
aBB.Add(aShell, aFL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
myLoopsInternal.Append(aShell);
|
myLoopsInternal.Append(aShell);
|
||||||
@ -522,16 +522,16 @@ static
|
|||||||
//bIsHole=GEOMAlgo_BuilderTools::IsHole(aShell);
|
//bIsHole=GEOMAlgo_BuilderTools::IsHole(aShell);
|
||||||
//XX
|
//XX
|
||||||
if (bIsHole) {
|
if (bIsHole) {
|
||||||
aHoleShells.Append(aShell);
|
aHoleShells.Append(aShell);
|
||||||
TopExp::MapShapes(aShell, TopAbs_FACE, aMHF);
|
TopExp::MapShapes(aShell, TopAbs_FACE, aMHF);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// make a growth solid from a shell
|
// make a growth solid from a shell
|
||||||
TopoDS_Solid Solid;
|
TopoDS_Solid Solid;
|
||||||
aBB.MakeSolid(Solid);
|
aBB.MakeSolid(Solid);
|
||||||
aBB.Add (Solid, aShell);
|
aBB.Add (Solid, aShell);
|
||||||
//
|
//
|
||||||
aNewSolids.Append (Solid);
|
aNewSolids.Append (Solid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -565,13 +565,13 @@ static
|
|||||||
if (aInOutMap.IsBound(aHole)){
|
if (aInOutMap.IsBound(aHole)){
|
||||||
const TopoDS_Shape& aSolid=aInOutMap(aHole);
|
const TopoDS_Shape& aSolid=aInOutMap(aHole);
|
||||||
if (aMSH.IsBound(aSolid)) {
|
if (aMSH.IsBound(aSolid)) {
|
||||||
TopTools_ListOfShape& aLH=aMSH.ChangeFind(aSolid);
|
TopTools_ListOfShape& aLH=aMSH.ChangeFind(aSolid);
|
||||||
aLH.Append(aHole);
|
aLH.Append(aHole);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TopTools_ListOfShape aLH;
|
TopTools_ListOfShape aLH;
|
||||||
aLH.Append(aHole);
|
aLH.Append(aHole);
|
||||||
aMSH.Bind(aSolid, aLH);
|
aMSH.Bind(aSolid, aLH);
|
||||||
}
|
}
|
||||||
//aBB.Add (aSolid, aHole);
|
//aBB.Add (aSolid, aHole);
|
||||||
}
|
}
|
||||||
@ -647,7 +647,7 @@ static
|
|||||||
for (; aItMF.More(); aItMF.Next()) {
|
for (; aItMF.More(); aItMF.Next()) {
|
||||||
const TopoDS_Face& aF=TopoDS::Face(aItMF.Key());
|
const TopoDS_Face& aF=TopoDS::Face(aItMF.Key());
|
||||||
if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, *myContext)) {
|
if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, *myContext)) {
|
||||||
aMFP.Add(aF);
|
aMFP.Add(aF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -681,7 +681,7 @@ static
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void MakeInternalShells(const TopTools_MapOfShape& theMF,
|
void MakeInternalShells(const TopTools_MapOfShape& theMF,
|
||||||
TopTools_ListOfShape& theShells)
|
TopTools_ListOfShape& theShells)
|
||||||
{
|
{
|
||||||
TopTools_MapIteratorOfMapOfShape aItM;
|
TopTools_MapIteratorOfMapOfShape aItM;
|
||||||
TopTools_MapOfShape aAddedFacesMap;
|
TopTools_MapOfShape aAddedFacesMap;
|
||||||
@ -715,15 +715,15 @@ void MakeInternalShells(const TopTools_MapOfShape& theMF,
|
|||||||
TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
|
TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
|
||||||
for (; aEdgeExp.More(); aEdgeExp.Next()) {
|
for (; aEdgeExp.More(); aEdgeExp.Next()) {
|
||||||
const TopoDS_Shape& aE =aEdgeExp.Current();
|
const TopoDS_Shape& aE =aEdgeExp.Current();
|
||||||
const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE);
|
const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE);
|
||||||
aItF.Initialize(aLF);
|
aItF.Initialize(aLF);
|
||||||
for (; aItF.More(); aItF.Next()) {
|
for (; aItF.More(); aItF.Next()) {
|
||||||
TopoDS_Shape aFL=aItF.Value();
|
TopoDS_Shape aFL=aItF.Value();
|
||||||
if (aAddedFacesMap.Add(aFL)){
|
if (aAddedFacesMap.Add(aFL)){
|
||||||
aFL.Orientation(TopAbs_INTERNAL);
|
aFL.Orientation(TopAbs_INTERNAL);
|
||||||
aBB.Add(aShell, aFL);
|
aBB.Add(aShell, aFL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
theShells.Append(aShell);
|
theShells.Append(aShell);
|
||||||
@ -734,7 +734,7 @@ void MakeInternalShells(const TopTools_MapOfShape& theMF,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean IsHole(const TopoDS_Shape& theS2,
|
Standard_Boolean IsHole(const TopoDS_Shape& theS2,
|
||||||
IntTools_PContext& theContext)
|
IntTools_PContext& theContext)
|
||||||
{
|
{
|
||||||
TopoDS_Solid *pS2=(TopoDS_Solid *)&theS2;
|
TopoDS_Solid *pS2=(TopoDS_Solid *)&theS2;
|
||||||
BRepClass3d_SolidClassifier& aClsf=theContext->SolidClassifier(*pS2);
|
BRepClass3d_SolidClassifier& aClsf=theContext->SolidClassifier(*pS2);
|
||||||
@ -748,8 +748,8 @@ Standard_Boolean IsHole(const TopoDS_Shape& theS2,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean IsInside(const TopoDS_Shape& theS1,
|
Standard_Boolean IsInside(const TopoDS_Shape& theS1,
|
||||||
const TopoDS_Shape& theS2,
|
const TopoDS_Shape& theS2,
|
||||||
IntTools_PContext& theContext)
|
IntTools_PContext& theContext)
|
||||||
{
|
{
|
||||||
TopExp_Explorer aExp;
|
TopExp_Explorer aExp;
|
||||||
TopAbs_State aState;
|
TopAbs_State aState;
|
||||||
@ -774,7 +774,7 @@ Standard_Boolean IsInside(const TopoDS_Shape& theS1,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean IsGrowthShell(const TopoDS_Shape& theShell,
|
Standard_Boolean IsGrowthShell(const TopoDS_Shape& theShell,
|
||||||
const TopTools_IndexedMapOfShape& theMHF)
|
const TopTools_IndexedMapOfShape& theMHF)
|
||||||
{
|
{
|
||||||
Standard_Boolean bRet;
|
Standard_Boolean bRet;
|
||||||
TopoDS_Iterator aIt;
|
TopoDS_Iterator aIt;
|
||||||
@ -785,7 +785,7 @@ Standard_Boolean IsGrowthShell(const TopoDS_Shape& theShell,
|
|||||||
for(; aIt.More(); aIt.Next()) {
|
for(; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aF=aIt.Value();
|
const TopoDS_Shape& aF=aIt.Value();
|
||||||
if (theMHF.Contains(aF)) {
|
if (theMHF.Contains(aF)) {
|
||||||
return !bRet;
|
return !bRet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -812,18 +812,18 @@ Standard_Boolean IsClosedShell(const TopoDS_Shell& theShell)
|
|||||||
for (; aExp.More(); aExp.Next()) {
|
for (; aExp.More(); aExp.Next()) {
|
||||||
const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
|
const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
|
||||||
if (BRep_Tool::Degenerated(aE)) {
|
if (BRep_Tool::Degenerated(aE)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if (BRep_Tool::IsClosed(aE, aF)) {
|
if (BRep_Tool::IsClosed(aE, aF)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if (aE.Orientation()==TopAbs_INTERNAL) {
|
if (aE.Orientation()==TopAbs_INTERNAL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!aM.Add(aE)) {
|
if (!aM.Add(aE)) {
|
||||||
aM.Remove(aE);
|
aM.Remove(aE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_BuilderTools.cxx
|
// File: GEOMAlgo_BuilderTools.cxx
|
||||||
// Created:
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_BuilderTools.ixx>
|
#include <GEOMAlgo_BuilderTools.ixx>
|
||||||
|
|
||||||
@ -60,8 +60,8 @@
|
|||||||
|
|
||||||
static
|
static
|
||||||
Standard_Integer ComputeProps(const TopoDS_Face& aF,
|
Standard_Integer ComputeProps(const TopoDS_Face& aF,
|
||||||
Standard_Real& aA,
|
Standard_Real& aA,
|
||||||
Standard_Real& aV);
|
Standard_Real& aV);
|
||||||
static
|
static
|
||||||
void BuildTriangulation(const TopoDS_Face& aF);
|
void BuildTriangulation(const TopoDS_Face& aF);
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ static
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aW,
|
Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aW,
|
||||||
const TopoDS_Shape& aFace)
|
const TopoDS_Shape& aFace)
|
||||||
{
|
{
|
||||||
Standard_Boolean bIsHole;
|
Standard_Boolean bIsHole;
|
||||||
Standard_Integer i, aNbS;
|
Standard_Integer i, aNbS;
|
||||||
@ -96,7 +96,7 @@ static
|
|||||||
const TopoDS_Edge& aE=TopoDS::Edge(aItW.Value());
|
const TopoDS_Edge& aE=TopoDS::Edge(aItW.Value());
|
||||||
aOr=aE.Orientation();
|
aOr=aE.Orientation();
|
||||||
if (!(aOr==TopAbs_FORWARD ||
|
if (!(aOr==TopAbs_FORWARD ||
|
||||||
aOr==TopAbs_REVERSED)) {
|
aOr==TopAbs_REVERSED)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -168,8 +168,8 @@ static
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Integer ComputeProps(const TopoDS_Face& aF,
|
Standard_Integer ComputeProps(const TopoDS_Face& aF,
|
||||||
Standard_Real& aA,
|
Standard_Real& aA,
|
||||||
Standard_Real& aV)
|
Standard_Real& aV)
|
||||||
{
|
{
|
||||||
Standard_Integer j, i, i1, i2, aNbNodes, aNbTrigs, n[3];
|
Standard_Integer j, i, i1, i2, aNbNodes, aNbTrigs, n[3];
|
||||||
Standard_Real aAi, aVi;
|
Standard_Real aAi, aVi;
|
||||||
@ -225,7 +225,7 @@ Standard_Integer ComputeProps(const TopoDS_Face& aF,
|
|||||||
Standard_Real aSx, aZx;
|
Standard_Real aSx, aZx;
|
||||||
gp_Dir aDN(aVN);
|
gp_Dir aDN(aVN);
|
||||||
if (aOr==TopAbs_REVERSED) {
|
if (aOr==TopAbs_REVERSED) {
|
||||||
aDN.Reverse();
|
aDN.Reverse();
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aSx=aAi*aDN.Z();
|
aSx=aAi*aDN.Z();
|
||||||
@ -269,11 +269,11 @@ void BuildTriangulation(const TopoDS_Face& aF)
|
|||||||
aDiscret=aCoeff*dMax;
|
aDiscret=aCoeff*dMax;
|
||||||
//
|
//
|
||||||
BRepMesh_FastDiscret aMesher(aDiscret,
|
BRepMesh_FastDiscret aMesher(aDiscret,
|
||||||
aAngle,
|
aAngle,
|
||||||
aBox,
|
aBox,
|
||||||
bWithShare,
|
bWithShare,
|
||||||
Standard_True,
|
Standard_True,
|
||||||
Standard_False,
|
Standard_False,
|
||||||
Standard_True);
|
Standard_True);
|
||||||
aMesher.Add(aF);
|
aMesher.Add(aF);
|
||||||
}
|
}
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_Builder_1.cxx
|
// File: GEOMAlgo_Builder_1.cxx
|
||||||
// Created:
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_Builder.hxx>
|
#include <GEOMAlgo_Builder.hxx>
|
||||||
//
|
//
|
||||||
@ -64,12 +64,12 @@
|
|||||||
|
|
||||||
static
|
static
|
||||||
void FillImagesCompounds(const TopTools_MapOfShape& ,
|
void FillImagesCompounds(const TopTools_MapOfShape& ,
|
||||||
BRepAlgo_Image& );
|
BRepAlgo_Image& );
|
||||||
|
|
||||||
static
|
static
|
||||||
void FillImagesCompound(const TopoDS_Shape& ,
|
void FillImagesCompound(const TopoDS_Shape& ,
|
||||||
BRepAlgo_Image& ,
|
BRepAlgo_Image& ,
|
||||||
TopTools_MapOfShape& );
|
TopTools_MapOfShape& );
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : FillImagesVertices
|
//function : FillImagesVertices
|
||||||
@ -90,12 +90,12 @@ static
|
|||||||
if (aV.ShapeType()==TopAbs_VERTEX) {
|
if (aV.ShapeType()==TopAbs_VERTEX) {
|
||||||
iV=pPF->FindSDVertex(i);
|
iV=pPF->FindSDVertex(i);
|
||||||
if (iV) {
|
if (iV) {
|
||||||
const TopoDS_Shape& aVSD=aDS.Shape(iV);
|
const TopoDS_Shape& aVSD=aDS.Shape(iV);
|
||||||
if (!myImages.HasImage(aV)) {
|
if (!myImages.HasImage(aV)) {
|
||||||
myImages.Bind(aV, aVSD);
|
myImages.Bind(aV, aVSD);
|
||||||
//
|
//
|
||||||
mySameDomainShapes.Add(aV, aVSD);
|
mySameDomainShapes.Add(aV, aVSD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -158,22 +158,22 @@ static
|
|||||||
//modified by NIZNHY-PKV Fri Nov 30 10:41:39 2007f
|
//modified by NIZNHY-PKV Fri Nov 30 10:41:39 2007f
|
||||||
//if (aSpR.IsSame(aSp) && aSpR.IsSame(aE)) {
|
//if (aSpR.IsSame(aSp) && aSpR.IsSame(aE)) {
|
||||||
if (aSpR.IsSame(aSp) && aSpR.IsSame(aE) && !aIsCB) {
|
if (aSpR.IsSame(aSp) && aSpR.IsSame(aE) && !aIsCB) {
|
||||||
//modified by NIZNHY-PKV Fri Nov 30 10:41:46 2007t
|
//modified by NIZNHY-PKV Fri Nov 30 10:41:46 2007t
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aESpR=TopoDS::Edge(aSpR);
|
aESpR=TopoDS::Edge(aSpR);
|
||||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx);
|
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx);
|
||||||
if (bToReverse) {
|
if (bToReverse) {
|
||||||
aESpR.Reverse();
|
aESpR.Reverse();
|
||||||
}
|
}
|
||||||
aLSp.Append(aESpR);
|
aLSp.Append(aESpR);
|
||||||
//
|
//
|
||||||
aItLB.Initialize(aLB);
|
aItLB.Initialize(aLB);
|
||||||
for (; aItLB.More(); aItLB.Next()) {
|
for (; aItLB.More(); aItLB.Next()) {
|
||||||
nSpx=aItLB.Value();
|
nSpx=aItLB.Value();
|
||||||
const TopoDS_Shape& aSpx=aDS.Shape(nSpx);
|
const TopoDS_Shape& aSpx=aDS.Shape(nSpx);
|
||||||
mySameDomainShapes.Add(aSpx ,aSpR);
|
mySameDomainShapes.Add(aSpx ,aSpR);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@ -181,28 +181,28 @@ static
|
|||||||
else {
|
else {
|
||||||
aIt.Initialize(aLPB);
|
aIt.Initialize(aLPB);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const BOPTools_PaveBlock& aPB=aIt.Value();
|
const BOPTools_PaveBlock& aPB=aIt.Value();
|
||||||
//modified by NIZNHY-PKV Fri Nov 30 10:42:15 2007f
|
//modified by NIZNHY-PKV Fri Nov 30 10:42:15 2007f
|
||||||
//const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB);
|
//const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB);
|
||||||
const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB, aIsCB);
|
const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB, aIsCB);
|
||||||
//modified by NIZNHY-PKV Fri Nov 30 10:42:20 2007t
|
//modified by NIZNHY-PKV Fri Nov 30 10:42:20 2007t
|
||||||
nSpR=aPBR.Edge();
|
nSpR=aPBR.Edge();
|
||||||
const TopoDS_Shape& aSpR=aDS.Shape(nSpR);
|
const TopoDS_Shape& aSpR=aDS.Shape(nSpR);
|
||||||
//
|
//
|
||||||
aESpR=TopoDS::Edge(aSpR);
|
aESpR=TopoDS::Edge(aSpR);
|
||||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx);
|
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx);
|
||||||
if (bToReverse) {
|
if (bToReverse) {
|
||||||
aESpR.Reverse();
|
aESpR.Reverse();
|
||||||
}
|
}
|
||||||
aLSp.Append(aESpR);
|
aLSp.Append(aESpR);
|
||||||
//
|
//
|
||||||
aItLB.Initialize(aLB);
|
aItLB.Initialize(aLB);
|
||||||
for (; aItLB.More(); aItLB.Next()) {
|
for (; aItLB.More(); aItLB.Next()) {
|
||||||
nSpx=aItLB.Value();
|
nSpx=aItLB.Value();
|
||||||
const TopoDS_Shape& aSpx=aDS.Shape(nSpx);
|
const TopoDS_Shape& aSpx=aDS.Shape(nSpx);
|
||||||
mySameDomainShapes.Add(aSpx ,aSpR);
|
mySameDomainShapes.Add(aSpx ,aSpR);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -254,8 +254,8 @@ static
|
|||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aF=aIt.Value();
|
const TopoDS_Shape& aF=aIt.Value();
|
||||||
if (myImages.HasImage(aF)) {
|
if (myImages.HasImage(aF)) {
|
||||||
bInterferred=!bInterferred;
|
bInterferred=!bInterferred;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!bInterferred){
|
if (!bInterferred){
|
||||||
@ -269,20 +269,20 @@ static
|
|||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aF=aIt.Value();
|
const TopoDS_Shape& aF=aIt.Value();
|
||||||
if (myImages.HasImage(aF)) {
|
if (myImages.HasImage(aF)) {
|
||||||
const TopTools_ListOfShape& aLFIm=myImages.Image(aF);
|
const TopTools_ListOfShape& aLFIm=myImages.Image(aF);
|
||||||
aItIm.Initialize(aLFIm);
|
aItIm.Initialize(aLFIm);
|
||||||
for (; aItIm.More(); aItIm.Next()) {
|
for (; aItIm.More(); aItIm.Next()) {
|
||||||
TopoDS_Shape aFIm=aItIm.Value();
|
TopoDS_Shape aFIm=aItIm.Value();
|
||||||
//
|
//
|
||||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFIm, aF, aCtx);
|
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFIm, aF, aCtx);
|
||||||
if (bToReverse) {
|
if (bToReverse) {
|
||||||
aFIm.Reverse();
|
aFIm.Reverse();
|
||||||
}
|
}
|
||||||
aBB.Add(aCIm, aFIm);
|
aBB.Add(aCIm, aFIm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aBB.Add(aCIm, aF);
|
aBB.Add(aCIm, aF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
myImages.Bind(aC, aCIm);
|
myImages.Bind(aC, aCIm);
|
||||||
@ -293,7 +293,7 @@ static
|
|||||||
// purpose:
|
// purpose:
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void FillImagesCompounds(const TopTools_MapOfShape& theMS,
|
void FillImagesCompounds(const TopTools_MapOfShape& theMS,
|
||||||
BRepAlgo_Image& theImages)
|
BRepAlgo_Image& theImages)
|
||||||
{
|
{
|
||||||
TopTools_MapOfShape aMFP;
|
TopTools_MapOfShape aMFP;
|
||||||
TopTools_MapIteratorOfMapOfShape aItS;
|
TopTools_MapIteratorOfMapOfShape aItS;
|
||||||
@ -309,8 +309,8 @@ void FillImagesCompounds(const TopTools_MapOfShape& theMS,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void FillImagesCompound(const TopoDS_Shape& theS,
|
void FillImagesCompound(const TopoDS_Shape& theS,
|
||||||
BRepAlgo_Image& theImages,
|
BRepAlgo_Image& theImages,
|
||||||
TopTools_MapOfShape& theMFP)
|
TopTools_MapOfShape& theMFP)
|
||||||
{
|
{
|
||||||
Standard_Boolean bInterferred;
|
Standard_Boolean bInterferred;
|
||||||
TopAbs_ShapeEnum aTypeX;
|
TopAbs_ShapeEnum aTypeX;
|
||||||
@ -350,9 +350,9 @@ void FillImagesCompound(const TopoDS_Shape& theS,
|
|||||||
const TopTools_ListOfShape& aLFIm=theImages.Image(aSX);
|
const TopTools_ListOfShape& aLFIm=theImages.Image(aSX);
|
||||||
aItIm.Initialize(aLFIm);
|
aItIm.Initialize(aLFIm);
|
||||||
for (; aItIm.More(); aItIm.Next()) {
|
for (; aItIm.More(); aItIm.Next()) {
|
||||||
TopoDS_Shape aSXIm=aItIm.Value();
|
TopoDS_Shape aSXIm=aItIm.Value();
|
||||||
aSXIm.Orientation(aOrX);
|
aSXIm.Orientation(aOrX);
|
||||||
aBB.Add(aCIm, aSXIm);
|
aBB.Add(aCIm, aSXIm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_Builder_2.cxx
|
// File: GEOMAlgo_Builder_2.cxx
|
||||||
// Created:
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_Builder.hxx>
|
#include <GEOMAlgo_Builder.hxx>
|
||||||
|
|
||||||
@ -87,8 +87,8 @@
|
|||||||
|
|
||||||
static
|
static
|
||||||
void UpdateCandidates(const Standard_Integer ,
|
void UpdateCandidates(const Standard_Integer ,
|
||||||
const Standard_Integer ,
|
const Standard_Integer ,
|
||||||
NMTTools_IndexedDataMapOfIndexedMapOfInteger& );
|
NMTTools_IndexedDataMapOfIndexedMapOfInteger& );
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : FillImagesFaces
|
//function : FillImagesFaces
|
||||||
@ -145,15 +145,15 @@ static
|
|||||||
NMTTools_ListOfCommonBlock& aLCB=aCBP(j);
|
NMTTools_ListOfCommonBlock& aLCB=aCBP(j);
|
||||||
aItCB.Initialize(aLCB);
|
aItCB.Initialize(aLCB);
|
||||||
for (; aItCB.More(); aItCB.Next()) {
|
for (; aItCB.More(); aItCB.Next()) {
|
||||||
NMTTools_CommonBlock& aCB=aItCB.Value();
|
NMTTools_CommonBlock& aCB=aItCB.Value();
|
||||||
if (aCB.IsPaveBlockOnFace(nF)) {
|
if (aCB.IsPaveBlockOnFace(nF)) {
|
||||||
const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1();
|
const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1();
|
||||||
nSpIn=aPB1.Edge();
|
nSpIn=aPB1.Edge();
|
||||||
const TopoDS_Shape& aSpIn=aDS.Shape(nSpIn);
|
const TopoDS_Shape& aSpIn=aDS.Shape(nSpIn);
|
||||||
if (aMFence.Add(aSpIn)){
|
if (aMFence.Add(aSpIn)){
|
||||||
aLSpIn.Append(aSpIn);
|
aLSpIn.Append(aSpIn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -162,24 +162,24 @@ static
|
|||||||
BOPTools_SSInterference& aFF=aFFs(j);
|
BOPTools_SSInterference& aFF=aFFs(j);
|
||||||
aFF.Indices(n1, n2);
|
aFF.Indices(n1, n2);
|
||||||
if (!(n1==nF || n2==nF)) {
|
if (!(n1==nF || n2==nF)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
BOPTools_SequenceOfCurves& aSC=aFF.Curves();
|
BOPTools_SequenceOfCurves& aSC=aFF.Curves();
|
||||||
aNbCurves=aSC.Length();
|
aNbCurves=aSC.Length();
|
||||||
if (!aNbCurves) {
|
if (!aNbCurves) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const BOPTools_Curve& aBC=aSC(1);
|
const BOPTools_Curve& aBC=aSC(1);
|
||||||
const BOPTools_ListOfPaveBlock& aLPB=aBC.NewPaveBlocks();
|
const BOPTools_ListOfPaveBlock& aLPB=aBC.NewPaveBlocks();
|
||||||
aItPB.Initialize(aLPB);
|
aItPB.Initialize(aLPB);
|
||||||
for (; aItPB.More(); aItPB.Next()) {
|
for (; aItPB.More(); aItPB.Next()) {
|
||||||
const BOPTools_PaveBlock& aPBSc=aItPB.Value();
|
const BOPTools_PaveBlock& aPBSc=aItPB.Value();
|
||||||
nSpSc=aPBSc.Edge();
|
nSpSc=aPBSc.Edge();
|
||||||
const TopoDS_Shape& aSpSc=aDS.Shape(nSpSc);
|
const TopoDS_Shape& aSpSc=aDS.Shape(nSpSc);
|
||||||
if (aMFence.Add(aSpSc)){
|
if (aMFence.Add(aSpSc)){
|
||||||
aLSpIn.Append(aSpSc);
|
aLSpIn.Append(aSpSc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aNbSpIn=aLSpIn.Extent();
|
aNbSpIn=aLSpIn.Extent();
|
||||||
@ -232,8 +232,8 @@ static
|
|||||||
for (; anExp.More(); anExp.Next()) {
|
for (; anExp.More(); anExp.Next()) {
|
||||||
const TopoDS_Shape& aE=anExp.Current();
|
const TopoDS_Shape& aE=anExp.Current();
|
||||||
if (myImages.HasImage(aE)) {
|
if (myImages.HasImage(aE)) {
|
||||||
aMFP.Add(i);
|
aMFP.Add(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -243,17 +243,17 @@ static
|
|||||||
//
|
//
|
||||||
aNbFFs=aFFs.Extent();
|
aNbFFs=aFFs.Extent();
|
||||||
for (j=1; j<=aNbFFs; ++j) {
|
for (j=1; j<=aNbFFs; ++j) {
|
||||||
BOPTools_SSInterference& aFFj=aFFs(j);
|
BOPTools_SSInterference& aFFj=aFFs(j);
|
||||||
aFFj.Indices(n1, n2);
|
aFFj.Indices(n1, n2);
|
||||||
if (!(n1==i || n2==i)) {
|
if (!(n1==i || n2==i)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const TColStd_ListOfInteger& aLSE=aFFj.SharedEdges();
|
const TColStd_ListOfInteger& aLSE=aFFj.SharedEdges();
|
||||||
aNbSE=aLSE.Extent();
|
aNbSE=aLSE.Extent();
|
||||||
if (aNbSE) {
|
if (aNbSE) {
|
||||||
aMFP.Add(i);
|
aMFP.Add(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//===
|
//===
|
||||||
@ -282,17 +282,17 @@ static
|
|||||||
anOriE=aE.Orientation();
|
anOriE=aE.Orientation();
|
||||||
//
|
//
|
||||||
if (!myImages.HasImage(aE)) {
|
if (!myImages.HasImage(aE)) {
|
||||||
if (anOriE==TopAbs_INTERNAL) {
|
if (anOriE==TopAbs_INTERNAL) {
|
||||||
aEE=aE;
|
aEE=aE;
|
||||||
aEE.Orientation(TopAbs_FORWARD);
|
aEE.Orientation(TopAbs_FORWARD);
|
||||||
aWES.AddStartElement(aEE);
|
aWES.AddStartElement(aEE);
|
||||||
aEE.Orientation(TopAbs_REVERSED);
|
aEE.Orientation(TopAbs_REVERSED);
|
||||||
aWES.AddStartElement(aEE);
|
aWES.AddStartElement(aEE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aWES.AddStartElement(aE);
|
aWES.AddStartElement(aE);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
bIsDegenerated=BRep_Tool::Degenerated(aE);
|
bIsDegenerated=BRep_Tool::Degenerated(aE);
|
||||||
@ -301,43 +301,43 @@ static
|
|||||||
const TopTools_ListOfShape& aLIE=myImages.Image(aE);
|
const TopTools_ListOfShape& aLIE=myImages.Image(aE);
|
||||||
aIt.Initialize(aLIE);
|
aIt.Initialize(aLIE);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
aSp=TopoDS::Edge(aIt.Value());
|
aSp=TopoDS::Edge(aIt.Value());
|
||||||
//
|
//
|
||||||
if (bIsDegenerated) {
|
if (bIsDegenerated) {
|
||||||
aSp.Orientation(anOriE);
|
aSp.Orientation(anOriE);
|
||||||
aWES.AddStartElement(aSp);
|
aWES.AddStartElement(aSp);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (anOriE==TopAbs_INTERNAL) {
|
if (anOriE==TopAbs_INTERNAL) {
|
||||||
aSp.Orientation(TopAbs_FORWARD);
|
aSp.Orientation(TopAbs_FORWARD);
|
||||||
aWES.AddStartElement(aSp);
|
aWES.AddStartElement(aSp);
|
||||||
aSp.Orientation(TopAbs_REVERSED);
|
aSp.Orientation(TopAbs_REVERSED);
|
||||||
aWES.AddStartElement(aSp);
|
aWES.AddStartElement(aSp);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (bIsClosed){
|
if (bIsClosed){
|
||||||
if (aMFence.Add(aSp)) {
|
if (aMFence.Add(aSp)) {
|
||||||
//
|
//
|
||||||
if (!BRep_Tool::IsClosed(aSp, aF)){
|
if (!BRep_Tool::IsClosed(aSp, aF)){
|
||||||
BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF);
|
BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aSp.Orientation(TopAbs_FORWARD);
|
aSp.Orientation(TopAbs_FORWARD);
|
||||||
aWES.AddStartElement(aSp);
|
aWES.AddStartElement(aSp);
|
||||||
aSp.Orientation(TopAbs_REVERSED);
|
aSp.Orientation(TopAbs_REVERSED);
|
||||||
aWES.AddStartElement(aSp);
|
aWES.AddStartElement(aSp);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}// if (aMFence.Add(aSp))
|
}// if (aMFence.Add(aSp))
|
||||||
//
|
//
|
||||||
aSp.Orientation(anOriE);
|
aSp.Orientation(anOriE);
|
||||||
bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx);
|
bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx);
|
||||||
if (bToReverse) {
|
if (bToReverse) {
|
||||||
aSp.Reverse();
|
aSp.Reverse();
|
||||||
}
|
}
|
||||||
aWES.AddStartElement(aSp);
|
aWES.AddStartElement(aSp);
|
||||||
}// for (; aIt.More(); aIt.Next()) {
|
}// for (; aIt.More(); aIt.Next()) {
|
||||||
}// for (; anExp.More(); anExp.Next()) {
|
}// for (; anExp.More(); anExp.Next()) {
|
||||||
//
|
//
|
||||||
@ -346,13 +346,13 @@ static
|
|||||||
const TopTools_ListOfShape& aLE=myInParts.FindFromKey(aF);
|
const TopTools_ListOfShape& aLE=myInParts.FindFromKey(aF);
|
||||||
aIt.Initialize(aLE);
|
aIt.Initialize(aLE);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
aSp=TopoDS::Edge(aIt.Value());
|
aSp=TopoDS::Edge(aIt.Value());
|
||||||
//
|
//
|
||||||
aSp.Orientation(TopAbs_FORWARD);
|
aSp.Orientation(TopAbs_FORWARD);
|
||||||
aWES.AddStartElement(aSp);
|
aWES.AddStartElement(aSp);
|
||||||
//
|
//
|
||||||
aSp.Orientation(TopAbs_REVERSED);
|
aSp.Orientation(TopAbs_REVERSED);
|
||||||
aWES.AddStartElement(aSp);
|
aWES.AddStartElement(aSp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -374,8 +374,8 @@ static
|
|||||||
aBBx.Add(aCx, aFF);
|
aBBx.Add(aCx, aFF);
|
||||||
aItx.Initialize(aSE);
|
aItx.Initialize(aSE);
|
||||||
for (; aItx.More(); aItx.Next()) {
|
for (; aItx.More(); aItx.Next()) {
|
||||||
TopoDS_Shape& aEx=aItx.Value();
|
TopoDS_Shape& aEx=aItx.Value();
|
||||||
aBBx.Add(aCx, aEx);
|
aBBx.Add(aCx, aEx);
|
||||||
}
|
}
|
||||||
int a=0;
|
int a=0;
|
||||||
}
|
}
|
||||||
@ -394,7 +394,7 @@ static
|
|||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
TopoDS_Shape& aFR=aIt.Value();
|
TopoDS_Shape& aFR=aIt.Value();
|
||||||
if (anOriF==TopAbs_REVERSED) {
|
if (anOriF==TopAbs_REVERSED) {
|
||||||
aFR.Orientation(TopAbs_REVERSED);
|
aFR.Orientation(TopAbs_REVERSED);
|
||||||
}
|
}
|
||||||
aLFR.Append(aFR);
|
aLFR.Append(aFR);
|
||||||
}
|
}
|
||||||
@ -466,35 +466,35 @@ static
|
|||||||
//
|
//
|
||||||
aItF2.Initialize(aLF2);
|
aItF2.Initialize(aLF2);
|
||||||
for (; aItF2.More(); aItF2.Next()) {
|
for (; aItF2.More(); aItF2.Next()) {
|
||||||
const TopoDS_Face& aF2y=TopoDS::Face(aItF2.Value());
|
const TopoDS_Face& aF2y=TopoDS::Face(aItF2.Value());
|
||||||
bIsSDF=NMTTools_Tools::AreFacesSameDomain(aF1x, aF2y, aCtx);
|
bIsSDF=NMTTools_Tools::AreFacesSameDomain(aF1x, aF2y, aCtx);
|
||||||
if (bIsSDF) {
|
if (bIsSDF) {
|
||||||
if (aMFence.Contains(aF1x) ||
|
if (aMFence.Contains(aF1x) ||
|
||||||
aMFence.Contains(aF2y)) {
|
aMFence.Contains(aF2y)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
aMFence.Add(aF1x);
|
aMFence.Add(aF1x);
|
||||||
aMFence.Add(aF2y);
|
aMFence.Add(aF2y);
|
||||||
//
|
//
|
||||||
NMTTools_CoupleOfShape aCS;
|
NMTTools_CoupleOfShape aCS;
|
||||||
//
|
//
|
||||||
aCS.SetShape1(aF1x);
|
aCS.SetShape1(aF1x);
|
||||||
aCS.SetShape2(aF2y);
|
aCS.SetShape2(aF2y);
|
||||||
aLCS.Append(aCS);
|
aLCS.Append(aCS);
|
||||||
//
|
//
|
||||||
if (aF1x==aF1) {
|
if (aF1x==aF1) {
|
||||||
if (!mySplitFaces.HasImage(aF1)) {
|
if (!mySplitFaces.HasImage(aF1)) {
|
||||||
mySplitFaces.Bind(aF1, aF1);
|
mySplitFaces.Bind(aF1, aF1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (aF2y==aF2) {
|
if (aF2y==aF2) {
|
||||||
if (!mySplitFaces.HasImage(aF2)) {
|
if (!mySplitFaces.HasImage(aF2)) {
|
||||||
mySplitFaces.Bind(aF2, aF2);
|
mySplitFaces.Bind(aF2, aF2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}//for (i=1; i<=aNbFF; ++i)
|
}//for (i=1; i<=aNbFF; ++i)
|
||||||
@ -555,16 +555,16 @@ static
|
|||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
aFSp=TopoDS::Face(aIt.Value());
|
aFSp=TopoDS::Face(aIt.Value());
|
||||||
if (!mySameDomainShapes.Contains(aFSp)) {
|
if (!mySameDomainShapes.Contains(aFSp)) {
|
||||||
aLFx.Append(aFSp);
|
aLFx.Append(aFSp);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const TopoDS_Shape& aSx=mySameDomainShapes.FindFromKey(aFSp);
|
const TopoDS_Shape& aSx=mySameDomainShapes.FindFromKey(aFSp);
|
||||||
aFSD=TopoDS::Face(aSx);
|
aFSD=TopoDS::Face(aSx);
|
||||||
iSense=GEOMAlgo_Tools3D::Sense(aFSp, aFSD);
|
iSense=GEOMAlgo_Tools3D::Sense(aFSp, aFSD);
|
||||||
if (iSense<0) {
|
if (iSense<0) {
|
||||||
aFSD.Reverse();
|
aFSD.Reverse();
|
||||||
}
|
}
|
||||||
aLFx.Append(aFSD);
|
aLFx.Append(aFSD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!myImages.HasImage(aF)) {//XX
|
if (!myImages.HasImage(aF)) {//XX
|
||||||
@ -659,13 +659,13 @@ static
|
|||||||
const TColStd_IndexedMapOfInteger& aMAVF=aMAV.FindFromKey(nF);
|
const TColStd_IndexedMapOfInteger& aMAVF=aMAV.FindFromKey(nF);
|
||||||
aNbAVF=aMAVF.Extent();
|
aNbAVF=aMAVF.Extent();
|
||||||
for (j=1; j<=aNbAVF; ++j) {
|
for (j=1; j<=aNbAVF; ++j) {
|
||||||
nV=aMAVF(j);
|
nV=aMAVF(j);
|
||||||
nVSD=pPF->FindSDVertex(nV);
|
nVSD=pPF->FindSDVertex(nV);
|
||||||
if (nVSD) {
|
if (nVSD) {
|
||||||
nV=nVSD;
|
nV=nVSD;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
UpdateCandidates(nF, nV, aMFMV);
|
UpdateCandidates(nF, nV, aMFMV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -676,12 +676,12 @@ static
|
|||||||
nV=aExp.Current();
|
nV=aExp.Current();
|
||||||
const TopoDS_Shape& aV=aDS.Shape(nV);
|
const TopoDS_Shape& aV=aDS.Shape(nV);
|
||||||
if (aV.Orientation()==TopAbs_INTERNAL) {
|
if (aV.Orientation()==TopAbs_INTERNAL) {
|
||||||
nVSD=pPF->FindSDVertex(nV);
|
nVSD=pPF->FindSDVertex(nV);
|
||||||
if (nVSD) {
|
if (nVSD) {
|
||||||
nV=nVSD;
|
nV=nVSD;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
UpdateCandidates(nF, nV, aMFMV);
|
UpdateCandidates(nF, nV, aMFMV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -705,8 +705,8 @@ static
|
|||||||
const TopTools_ListOfShape& aLFx=myImages.Image(aF);
|
const TopTools_ListOfShape& aLFx=myImages.Image(aF);
|
||||||
aIt.Initialize(aLFx);
|
aIt.Initialize(aLFx);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aFx=aIt.Value();
|
const TopoDS_Shape& aFx=aIt.Value();
|
||||||
TopExp::MapShapesAndAncestors(aFx, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
|
TopExp::MapShapesAndAncestors(aFx, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -715,15 +715,15 @@ static
|
|||||||
TopExp::MapShapesAndAncestors(aF, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
|
TopExp::MapShapesAndAncestors(aF, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
|
||||||
bFaceToProcess=Standard_False;
|
bFaceToProcess=Standard_False;
|
||||||
for (j=1; j<=aNbVC; ++j) {
|
for (j=1; j<=aNbVC; ++j) {
|
||||||
nV=aMVC(j);
|
nV=aMVC(j);
|
||||||
const TopoDS_Shape& aV=aDS.Shape(nV);
|
const TopoDS_Shape& aV=aDS.Shape(nV);
|
||||||
if (!aMVE.Contains(aV)) {
|
if (!aMVE.Contains(aV)) {
|
||||||
bFaceToProcess=!bFaceToProcess;
|
bFaceToProcess=!bFaceToProcess;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!bFaceToProcess) {
|
if (!bFaceToProcess) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}// else
|
}// else
|
||||||
//
|
//
|
||||||
@ -731,11 +731,11 @@ static
|
|||||||
nV=aMVC(j);
|
nV=aMVC(j);
|
||||||
const TopoDS_Shape& aV=aDS.Shape(nV);
|
const TopoDS_Shape& aV=aDS.Shape(nV);
|
||||||
if (aMVE.Contains(aV)) {
|
if (aMVE.Contains(aV)) {
|
||||||
const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
|
const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
|
||||||
aNbE=aLE.Extent();
|
aNbE=aLE.Extent();
|
||||||
if (aNbE) {
|
if (aNbE) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aLV.Append(aV);
|
aLV.Append(aV);
|
||||||
}
|
}
|
||||||
@ -745,41 +745,41 @@ static
|
|||||||
// 3. Try to put vertices into the face(s)
|
// 3. Try to put vertices into the face(s)
|
||||||
aItV.Initialize(aLV);
|
aItV.Initialize(aLV);
|
||||||
for (; aItV.More(); aItV.Next()) {
|
for (; aItV.More(); aItV.Next()) {
|
||||||
TopoDS_Vertex aV=TopoDS::Vertex(aItV.Value());
|
TopoDS_Vertex aV=TopoDS::Vertex(aItV.Value());
|
||||||
aV.Orientation(TopAbs_INTERNAL);
|
aV.Orientation(TopAbs_INTERNAL);
|
||||||
//
|
//
|
||||||
bHasImage=myImages.HasImage(aF);
|
bHasImage=myImages.HasImage(aF);
|
||||||
if (bHasImage) {
|
if (bHasImage) {
|
||||||
const TopTools_ListOfShape& aLFx=myImages.Image(aF);
|
const TopTools_ListOfShape& aLFx=myImages.Image(aF);
|
||||||
aIt.Initialize(aLFx);
|
aIt.Initialize(aLFx);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
TopoDS_Face aFx=TopoDS::Face(aIt.Value());
|
TopoDS_Face aFx=TopoDS::Face(aIt.Value());
|
||||||
// update classifier
|
// update classifier
|
||||||
IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
|
IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
|
||||||
aClsf.Init(aFx, aTol);
|
aClsf.Init(aFx, aTol);
|
||||||
//
|
//
|
||||||
iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
|
iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
|
||||||
if (!iFlag) {
|
if (!iFlag) {
|
||||||
aBB.Add(aFx, aV);
|
aBB.Add(aFx, aV);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const TopoDS_Face& aFx=TopoDS::Face(aF);
|
const TopoDS_Face& aFx=TopoDS::Face(aF);
|
||||||
// update classifier
|
// update classifier
|
||||||
IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
|
IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
|
||||||
aClsf.Init(aFx, aTol);
|
aClsf.Init(aFx, aTol);
|
||||||
//
|
//
|
||||||
iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
|
iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
|
||||||
if (!iFlag) {
|
if (!iFlag) {
|
||||||
TopoDS_Face aFz;
|
TopoDS_Face aFz;
|
||||||
//
|
//
|
||||||
GEOMAlgo_Tools3D::CopyFace(aFx, aFz);
|
GEOMAlgo_Tools3D::CopyFace(aFx, aFz);
|
||||||
aBB.Add(aFz, aV);
|
aBB.Add(aFz, aV);
|
||||||
myImages.Bind(aF, aFz);
|
myImages.Bind(aF, aFz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}// for (; aItV.More(); aItV.Next()) {
|
}// for (; aItV.More(); aItV.Next()) {
|
||||||
}// if (aNbV) {
|
}// if (aNbV) {
|
||||||
}// for (nF=1; nF<=aNb; ++nF) {
|
}// for (nF=1; nF<=aNb; ++nF) {
|
||||||
@ -789,8 +789,8 @@ static
|
|||||||
// purpose:
|
// purpose:
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void UpdateCandidates(const Standard_Integer theNF,
|
void UpdateCandidates(const Standard_Integer theNF,
|
||||||
const Standard_Integer theNV,
|
const Standard_Integer theNV,
|
||||||
NMTTools_IndexedDataMapOfIndexedMapOfInteger& theMFMV)
|
NMTTools_IndexedDataMapOfIndexedMapOfInteger& theMFMV)
|
||||||
{
|
{
|
||||||
if (theMFMV.Contains(theNF)) {
|
if (theMFMV.Contains(theNF)) {
|
||||||
TColStd_IndexedMapOfInteger& aMV=theMFMV.ChangeFromKey(theNF);
|
TColStd_IndexedMapOfInteger& aMV=theMFMV.ChangeFromKey(theNF);
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_Builder_3.cxx
|
// File: GEOMAlgo_Builder_3.cxx
|
||||||
// Created:
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_Builder.hxx>
|
#include <GEOMAlgo_Builder.hxx>
|
||||||
|
|
||||||
@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
static
|
static
|
||||||
void OwnInternalShapes(const TopoDS_Shape& ,
|
void OwnInternalShapes(const TopoDS_Shape& ,
|
||||||
TopTools_IndexedMapOfShape& );
|
TopTools_IndexedMapOfShape& );
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : FillImagesSolids
|
//function : FillImagesSolids
|
||||||
@ -89,8 +89,8 @@ static
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::BuildDraftSolid(const TopoDS_Shape& theSolid,
|
void GEOMAlgo_Builder::BuildDraftSolid(const TopoDS_Shape& theSolid,
|
||||||
TopoDS_Shape& theDraftSolid,
|
TopoDS_Shape& theDraftSolid,
|
||||||
TopTools_ListOfShape& theLIF)
|
TopTools_ListOfShape& theLIF)
|
||||||
{
|
{
|
||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
@ -128,49 +128,49 @@ static
|
|||||||
aOrF=aF.Orientation();
|
aOrF=aF.Orientation();
|
||||||
//
|
//
|
||||||
if (myImages.HasImage(aF)) {
|
if (myImages.HasImage(aF)) {
|
||||||
const TopTools_ListOfShape& aLSp=myImages.Image(aF);
|
const TopTools_ListOfShape& aLSp=myImages.Image(aF);
|
||||||
aItS.Initialize(aLSp);
|
aItS.Initialize(aLSp);
|
||||||
for (; aItS.More(); aItS.Next()) {
|
for (; aItS.More(); aItS.Next()) {
|
||||||
aFx=aItS.Value();
|
aFx=aItS.Value();
|
||||||
//
|
//
|
||||||
if (mySameDomainShapes.Contains(aFx)) {
|
if (mySameDomainShapes.Contains(aFx)) {
|
||||||
aFSDx=mySameDomainShapes.FindFromKey(aFx);
|
aFSDx=mySameDomainShapes.FindFromKey(aFx);
|
||||||
//
|
//
|
||||||
if (aOrF==TopAbs_INTERNAL) {
|
if (aOrF==TopAbs_INTERNAL) {
|
||||||
aFSDx.Orientation(aOrF);
|
aFSDx.Orientation(aOrF);
|
||||||
theLIF.Append(aFSDx);
|
theLIF.Append(aFSDx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFSDx, aF, aCtx);
|
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFSDx, aF, aCtx);
|
||||||
if (bToReverse) {
|
if (bToReverse) {
|
||||||
aFSDx.Reverse();
|
aFSDx.Reverse();
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
iFlag=1;
|
iFlag=1;
|
||||||
aBB.Add(aShD, aFSDx);
|
aBB.Add(aShD, aFSDx);
|
||||||
}
|
}
|
||||||
}// if (mySameDomainShapes.Contains(aFx)) {
|
}// if (mySameDomainShapes.Contains(aFx)) {
|
||||||
else {
|
else {
|
||||||
aFx.Orientation(aOrF);
|
aFx.Orientation(aOrF);
|
||||||
if (aOrF==TopAbs_INTERNAL) {
|
if (aOrF==TopAbs_INTERNAL) {
|
||||||
theLIF.Append(aFx);
|
theLIF.Append(aFx);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
iFlag=1;
|
iFlag=1;
|
||||||
aBB.Add(aShD, aFx);
|
aBB.Add(aShD, aFx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} //if (myImages.HasImage(aF)) {
|
} //if (myImages.HasImage(aF)) {
|
||||||
//
|
//
|
||||||
else {
|
else {
|
||||||
if (aOrF==TopAbs_INTERNAL) {
|
if (aOrF==TopAbs_INTERNAL) {
|
||||||
theLIF.Append(aF);
|
theLIF.Append(aF);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
iFlag=1;
|
iFlag=1;
|
||||||
aBB.Add(aShD, aF);
|
aBB.Add(aShD, aF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} //for (; aIt2.More(); aIt2.Next()) {
|
} //for (; aIt2.More(); aIt2.Next()) {
|
||||||
//
|
//
|
||||||
@ -218,28 +218,28 @@ static
|
|||||||
else if (aType==TopAbs_FACE) {
|
else if (aType==TopAbs_FACE) {
|
||||||
// all faces (originals from DS or theirs images)
|
// all faces (originals from DS or theirs images)
|
||||||
if (myImages.HasImage(aS)) {
|
if (myImages.HasImage(aS)) {
|
||||||
const TopTools_ListOfShape& aLS=myImages.Image(aS);
|
const TopTools_ListOfShape& aLS=myImages.Image(aS);
|
||||||
aItS.Initialize(aLS);
|
aItS.Initialize(aLS);
|
||||||
for (; aItS.More(); aItS.Next()) {
|
for (; aItS.More(); aItS.Next()) {
|
||||||
const TopoDS_Shape& aFx=aItS.Value();
|
const TopoDS_Shape& aFx=aItS.Value();
|
||||||
//
|
//
|
||||||
if (mySameDomainShapes.Contains(aFx)) {
|
if (mySameDomainShapes.Contains(aFx)) {
|
||||||
const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aFx);
|
const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aFx);
|
||||||
aMFaces.Add(aFSDx);
|
aMFaces.Add(aFSDx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aMFaces.Add(aFx);
|
aMFaces.Add(aFx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (mySameDomainShapes.Contains(aS)) {
|
if (mySameDomainShapes.Contains(aS)) {
|
||||||
const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aS);
|
const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aS);
|
||||||
aMFaces.Add(aFSDx);
|
aMFaces.Add(aFSDx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aMFaces.Add(aS);
|
aMFaces.Add(aS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -268,22 +268,22 @@ static
|
|||||||
const TopoDS_Shape& aShell=aIt.Value();
|
const TopoDS_Shape& aShell=aIt.Value();
|
||||||
//
|
//
|
||||||
if (myImages.HasImage(aShell)) {
|
if (myImages.HasImage(aShell)) {
|
||||||
bHasImage=Standard_True;
|
bHasImage=Standard_True;
|
||||||
//
|
//
|
||||||
const TopTools_ListOfShape& aLS=myImages.Image(aShell);
|
const TopTools_ListOfShape& aLS=myImages.Image(aShell);
|
||||||
aItS.Initialize(aLS);
|
aItS.Initialize(aLS);
|
||||||
for (; aItS.More(); aItS.Next()) {
|
for (; aItS.More(); aItS.Next()) {
|
||||||
const TopoDS_Shape& aSx=aItS.Value();
|
const TopoDS_Shape& aSx=aItS.Value();
|
||||||
aMS.Add(aSx);
|
aMS.Add(aSx);
|
||||||
TopExp::MapShapes(aSx, TopAbs_FACE, aMS);
|
TopExp::MapShapes(aSx, TopAbs_FACE, aMS);
|
||||||
TopExp::MapShapes(aSx, TopAbs_EDGE, aMS);
|
TopExp::MapShapes(aSx, TopAbs_EDGE, aMS);
|
||||||
TopExp::MapShapesAndAncestors(aSx, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
TopExp::MapShapesAndAncestors(aSx, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//aMS.Add(aShell);
|
//aMS.Add(aShell);
|
||||||
TopExp::MapShapes(aShell, TopAbs_FACE, aMS);
|
TopExp::MapShapes(aShell, TopAbs_FACE, aMS);
|
||||||
TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -298,7 +298,7 @@ static
|
|||||||
for (j=1; j<=aNbFaces; ++j) {
|
for (j=1; j<=aNbFaces; ++j) {
|
||||||
const TopoDS_Shape& aFace=aMFaces(j);
|
const TopoDS_Shape& aFace=aMFaces(j);
|
||||||
if (!aMS.Contains(aFace)) {
|
if (!aMS.Contains(aFace)) {
|
||||||
TopExp::MapShapesAndAncestors(aFace, TopAbs_EDGE, TopAbs_FACE, aMEFP);
|
TopExp::MapShapesAndAncestors(aFace, TopAbs_EDGE, TopAbs_FACE, aMEFP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -311,17 +311,17 @@ static
|
|||||||
const TopoDS_Shape& aE=aMEFP.FindKey(j);
|
const TopoDS_Shape& aE=aMEFP.FindKey(j);
|
||||||
//
|
//
|
||||||
if (aMEF.Contains(aE)) { // !!
|
if (aMEF.Contains(aE)) { // !!
|
||||||
const TopTools_ListOfShape& aLF=aMEFP(j);
|
const TopTools_ListOfShape& aLF=aMEFP(j);
|
||||||
aItFP.Initialize(aLF);
|
aItFP.Initialize(aLF);
|
||||||
for (; aItFP.More(); aItFP.Next()) {
|
for (; aItFP.More(); aItFP.Next()) {
|
||||||
const TopoDS_Shape& aF=aItFP.Value();
|
const TopoDS_Shape& aF=aItFP.Value();
|
||||||
if (aMFence.Add(aF)) {
|
if (aMFence.Add(aF)) {
|
||||||
aLFP1.Append(aF);
|
aLFP1.Append(aF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aLEx.Append(aE);
|
aLEx.Append(aE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -331,10 +331,10 @@ static
|
|||||||
const TopTools_ListOfShape& aLF=aMEFP.FindFromKey(aE);
|
const TopTools_ListOfShape& aLF=aMEFP.FindFromKey(aE);
|
||||||
aItFP.Initialize(aLF);
|
aItFP.Initialize(aLF);
|
||||||
for (; aItFP.More(); aItFP.Next()) {
|
for (; aItFP.More(); aItFP.Next()) {
|
||||||
const TopoDS_Shape& aF=aItFP.Value();
|
const TopoDS_Shape& aF=aItFP.Value();
|
||||||
if (aMFence.Add(aF)) {
|
if (aMFence.Add(aF)) {
|
||||||
aLFP2.Append(aF);
|
aLFP2.Append(aF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aLFP1.Append(aLFP2);
|
aLFP1.Append(aLFP2);
|
||||||
@ -346,7 +346,7 @@ static
|
|||||||
for (; aItFP.More(); aItFP.Next()) {
|
for (; aItFP.More(); aItFP.Next()) {
|
||||||
const TopoDS_Shape& aSP=aItFP.Value();
|
const TopoDS_Shape& aSP=aItFP.Value();
|
||||||
if (!aMFDone.Add(aSP)) {
|
if (!aMFDone.Add(aSP)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -360,10 +360,10 @@ static
|
|||||||
aLFP.Append(aFP);
|
aLFP.Append(aFP);
|
||||||
aItS.Initialize(aLFP1);
|
aItS.Initialize(aLFP1);
|
||||||
for (; aItS.More(); aItS.Next()) {
|
for (; aItS.More(); aItS.Next()) {
|
||||||
const TopoDS_Shape& aSk=aItS.Value();
|
const TopoDS_Shape& aSk=aItS.Value();
|
||||||
if (!aMFDone.Contains(aSk)) {
|
if (!aMFDone.Contains(aSk)) {
|
||||||
aLFP.Append(aSk);
|
aLFP.Append(aSk);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Connexity Block that spreads from aFP the Bound
|
// Connexity Block that spreads from aFP the Bound
|
||||||
@ -374,16 +374,16 @@ static
|
|||||||
// fill states for the Connexity Block
|
// fill states for the Connexity Block
|
||||||
aItS.Initialize(aLCBF);
|
aItS.Initialize(aLCBF);
|
||||||
for (; aItS.More(); aItS.Next()) {
|
for (; aItS.More(); aItS.Next()) {
|
||||||
const TopoDS_Shape& aSx=aItS.Value();
|
const TopoDS_Shape& aSx=aItS.Value();
|
||||||
aMFDone.Add(aSx);
|
aMFDone.Add(aSx);
|
||||||
if (aState==TopAbs_IN) {
|
if (aState==TopAbs_IN) {
|
||||||
aMFIN.Add(aSx);
|
aMFIN.Add(aSx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aNbFPx=aMFDone.Extent();
|
aNbFPx=aMFDone.Extent();
|
||||||
if (aNbFPx==aNbFP) {
|
if (aNbFPx==aNbFP) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}//for (; aItFP.More(); aItFP.Next())
|
}//for (; aItFP.More(); aItFP.Next())
|
||||||
//
|
//
|
||||||
@ -392,14 +392,14 @@ static
|
|||||||
aNbFIN=aMFIN.Extent();
|
aNbFIN=aMFIN.Extent();
|
||||||
if (aNbFIN || aNbLIF) {
|
if (aNbFIN || aNbLIF) {
|
||||||
for (j=1; j<=aNbFIN; ++j) {
|
for (j=1; j<=aNbFIN; ++j) {
|
||||||
const TopoDS_Shape& aFIN=aMFIN(j);
|
const TopoDS_Shape& aFIN=aMFIN(j);
|
||||||
aLFIN.Append(aFIN);
|
aLFIN.Append(aFIN);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aItS.Initialize(aLIF);
|
aItS.Initialize(aLIF);
|
||||||
for (; aItS.More(); aItS.Next()) {
|
for (; aItS.More(); aItS.Next()) {
|
||||||
const TopoDS_Shape& aFIN=aItS.Value();
|
const TopoDS_Shape& aFIN=aItS.Value();
|
||||||
aLFIN.Append(aFIN);
|
aLFIN.Append(aFIN);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
myInParts.Add(aSolid, aLFIN);
|
myInParts.Add(aSolid, aLFIN);
|
||||||
@ -499,18 +499,18 @@ static
|
|||||||
const TopoDS_Shape& aSR=aItSS.Key();
|
const TopoDS_Shape& aSR=aItSS.Key();
|
||||||
const GEOMAlgo_ShapeSet& aSSR=aItSS.Value();
|
const GEOMAlgo_ShapeSet& aSSR=aItSS.Value();
|
||||||
if (aSSi.Contains(aSSR)) {
|
if (aSSi.Contains(aSSR)) {
|
||||||
// the aSR is SD solid for aS
|
// the aSR is SD solid for aS
|
||||||
aSSi.Subtract(aSSR);
|
aSSi.Subtract(aSSR);
|
||||||
// update images
|
// update images
|
||||||
if(myImages.HasImage(aS)) {
|
if(myImages.HasImage(aS)) {
|
||||||
myImages.Add(aS, aSR);
|
myImages.Add(aS, aSR);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myImages.Bind(aS, aSR);
|
myImages.Bind(aS, aSR);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// update SD Shapes
|
// update SD Shapes
|
||||||
mySameDomainShapes.Add(aSR, aSR);
|
mySameDomainShapes.Add(aSR, aSR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const TopTools_ListOfShape& aSFS1=aSSi.GetSet();
|
const TopTools_ListOfShape& aSFS1=aSSi.GetSet();
|
||||||
@ -535,8 +535,8 @@ static
|
|||||||
aSSi.Clear();
|
aSSi.Clear();
|
||||||
aExp.Init(aSR, TopAbs_FACE);
|
aExp.Init(aSR, TopAbs_FACE);
|
||||||
for (; aExp.More(); aExp.Next()) {
|
for (; aExp.More(); aExp.Next()) {
|
||||||
const TopoDS_Shape& aF=aExp.Current();
|
const TopoDS_Shape& aF=aExp.Current();
|
||||||
aSSi.Add(aF);
|
aSSi.Add(aF);
|
||||||
}
|
}
|
||||||
aMSS.Bind(aSR, aSSi);
|
aMSS.Bind(aSR, aSSi);
|
||||||
}
|
}
|
||||||
@ -574,8 +574,8 @@ static
|
|||||||
const TopoDS_Shape& aSR=aItSS.Key();
|
const TopoDS_Shape& aSR=aItSS.Key();
|
||||||
const GEOMAlgo_ShapeSet& aSSR=aItSS.Value();
|
const GEOMAlgo_ShapeSet& aSSR=aItSS.Value();
|
||||||
if (aSSi.Contains(aSSR)) {
|
if (aSSi.Contains(aSSR)) {
|
||||||
myImages.Bind(aS, aSR);
|
myImages.Bind(aS, aSR);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} //for (i=1; i<=aNbS; ++i)
|
} //for (i=1; i<=aNbS; ++i)
|
||||||
@ -618,7 +618,7 @@ static
|
|||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aS=aIt.Value();
|
const TopoDS_Shape& aS=aIt.Value();
|
||||||
if (aMFence.Add(aS)) {
|
if (aMFence.Add(aS)) {
|
||||||
aLSI.Append(aS);
|
aLSI.Append(aS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -631,10 +631,10 @@ static
|
|||||||
const TopoDS_Shape& aW=aIt.Value();
|
const TopoDS_Shape& aW=aIt.Value();
|
||||||
aItS.Initialize(aW);
|
aItS.Initialize(aW);
|
||||||
for (; aItS.More(); aItS.Next()) {
|
for (; aItS.More(); aItS.Next()) {
|
||||||
const TopoDS_Shape& aE=aItS.Value();
|
const TopoDS_Shape& aE=aItS.Value();
|
||||||
if (aMFence.Add(aE)) {
|
if (aMFence.Add(aE)) {
|
||||||
aLSI.Append(aE);
|
aLSI.Append(aE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -646,8 +646,8 @@ static
|
|||||||
const TopTools_ListOfShape &aLSp=myImages.Image(aS);
|
const TopTools_ListOfShape &aLSp=myImages.Image(aS);
|
||||||
aIt.Initialize(aLSp);
|
aIt.Initialize(aLSp);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aSI=aIt.Value();
|
const TopoDS_Shape& aSI=aIt.Value();
|
||||||
aMSI.Add(aSI);
|
aMSI.Add(aSI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -672,42 +672,42 @@ static
|
|||||||
//
|
//
|
||||||
aNbSx=aMx.Extent();
|
aNbSx=aMx.Extent();
|
||||||
for (j=1; j<=aNbSx; ++j) {
|
for (j=1; j<=aNbSx; ++j) {
|
||||||
const TopoDS_Shape& aSI=aMx(j);
|
const TopoDS_Shape& aSI=aMx(j);
|
||||||
if (myImages.HasImage(aSI)) {
|
if (myImages.HasImage(aSI)) {
|
||||||
const TopTools_ListOfShape &aLSp=myImages.Image(aSI);
|
const TopTools_ListOfShape &aLSp=myImages.Image(aSI);
|
||||||
aIt.Initialize(aLSp);
|
aIt.Initialize(aLSp);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aSp=aIt.Value();
|
const TopoDS_Shape& aSp=aIt.Value();
|
||||||
aMSI.Add(aSp);
|
aMSI.Add(aSp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aMSI.Add(aSI);
|
aMSI.Add(aSI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// build aux map from splits of solids
|
// build aux map from splits of solids
|
||||||
if (myImages.HasImage(aS)) {
|
if (myImages.HasImage(aS)) {
|
||||||
const TopTools_ListOfShape &aLSp=myImages.Image(aS);
|
const TopTools_ListOfShape &aLSp=myImages.Image(aS);
|
||||||
aIt.Initialize(aLSp);
|
aIt.Initialize(aLSp);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aSp=aIt.Value();
|
const TopoDS_Shape& aSp=aIt.Value();
|
||||||
if (aMFence.Add(aSp)) {
|
if (aMFence.Add(aSp)) {
|
||||||
TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
|
TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
|
||||||
TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_FACE, aMSx);
|
TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_FACE, aMSx);
|
||||||
TopExp::MapShapesAndAncestors(aSp, TopAbs_EDGE , TopAbs_FACE, aMSx);
|
TopExp::MapShapesAndAncestors(aSp, TopAbs_EDGE , TopAbs_FACE, aMSx);
|
||||||
aLSd.Append(aSp);
|
aLSd.Append(aSp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (aMFence.Add(aS)) {
|
if (aMFence.Add(aS)) {
|
||||||
TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
|
TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
|
||||||
TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_FACE, aMSx);
|
TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_FACE, aMSx);
|
||||||
TopExp::MapShapesAndAncestors(aS, TopAbs_EDGE , TopAbs_FACE, aMSx);
|
TopExp::MapShapesAndAncestors(aS, TopAbs_EDGE , TopAbs_FACE, aMSx);
|
||||||
aLSd.Append(aS);
|
aLSd.Append(aS);
|
||||||
aMSOr.Add(aS);
|
aMSOr.Add(aS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}//if (aType==TopAbs_SOLID)
|
}//if (aType==TopAbs_SOLID)
|
||||||
}
|
}
|
||||||
@ -723,7 +723,7 @@ static
|
|||||||
const TopTools_ListOfShape &aLSx=aMSx.FindFromKey(aSI);
|
const TopTools_ListOfShape &aLSx=aMSx.FindFromKey(aSI);
|
||||||
aNbSx=aLSx.Extent();
|
aNbSx=aLSx.Extent();
|
||||||
if (aNbSx) {
|
if (aNbSx) {
|
||||||
aMSI.Remove(aSI);
|
aMSI.Remove(aSI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -747,29 +747,29 @@ static
|
|||||||
//
|
//
|
||||||
aState=GEOMAlgo_Tools3D::ComputeStateByOnePoint(aSI, aSd, 1.e-11, aCtx);
|
aState=GEOMAlgo_Tools3D::ComputeStateByOnePoint(aSI, aSd, 1.e-11, aCtx);
|
||||||
if (aState==TopAbs_IN) {
|
if (aState==TopAbs_IN) {
|
||||||
//
|
//
|
||||||
if(aMSOr.Contains(aSd)) {
|
if(aMSOr.Contains(aSd)) {
|
||||||
//
|
//
|
||||||
TopoDS_Solid aSdx;
|
TopoDS_Solid aSdx;
|
||||||
//
|
//
|
||||||
aBB.MakeSolid(aSdx);
|
aBB.MakeSolid(aSdx);
|
||||||
aItS.Initialize(aSd);
|
aItS.Initialize(aSd);
|
||||||
for (; aItS.More(); aItS.Next()) {
|
for (; aItS.More(); aItS.Next()) {
|
||||||
const TopoDS_Shape& aSh=aItS.Value();
|
const TopoDS_Shape& aSh=aItS.Value();
|
||||||
aBB.Add(aSdx, aSh);
|
aBB.Add(aSdx, aSh);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aBB.Add(aSdx, aSI);
|
aBB.Add(aSdx, aSI);
|
||||||
//
|
//
|
||||||
myImages.Bind(aSd, aSdx);
|
myImages.Bind(aSd, aSdx);
|
||||||
aMSOr.Remove(aSd);
|
aMSOr.Remove(aSd);
|
||||||
aSd=aSdx;
|
aSd=aSdx;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aBB.Add(aSd, aSI);
|
aBB.Add(aSd, aSI);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aMSI.Remove(aSI);
|
aMSI.Remove(aSI);
|
||||||
} //if (aState==TopAbs_IN) {
|
} //if (aState==TopAbs_IN) {
|
||||||
}// for (; aItM.More(); aItM.Next()) {
|
}// for (; aItM.More(); aItM.Next()) {
|
||||||
}//for (; aIt1.More(); aIt1.Next()) {
|
}//for (; aIt1.More(); aIt1.Next()) {
|
||||||
@ -779,7 +779,7 @@ static
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void OwnInternalShapes(const TopoDS_Shape& theS,
|
void OwnInternalShapes(const TopoDS_Shape& theS,
|
||||||
TopTools_IndexedMapOfShape& theMx)
|
TopTools_IndexedMapOfShape& theMx)
|
||||||
{
|
{
|
||||||
TopoDS_Iterator aIt;
|
TopoDS_Iterator aIt;
|
||||||
//
|
//
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_Builder_4.cxx
|
// File: GEOMAlgo_Builder_4.cxx
|
||||||
// Created:
|
// Created:
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_Builder.hxx>
|
#include <GEOMAlgo_Builder.hxx>
|
||||||
|
|
||||||
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
static
|
static
|
||||||
void MapShapes(const TopoDS_Shape& aS,
|
void MapShapes(const TopoDS_Shape& aS,
|
||||||
TopTools_MapOfShape& aM);
|
TopTools_MapOfShape& aM);
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Generated
|
//function : Generated
|
||||||
@ -78,21 +78,21 @@ static
|
|||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aSp=aIt.Value();
|
const TopoDS_Shape& aSp=aIt.Value();
|
||||||
if (mySameDomainShapes.Contains(aSp)) {
|
if (mySameDomainShapes.Contains(aSp)) {
|
||||||
if (myMapShape.Contains(aSp)) {
|
if (myMapShape.Contains(aSp)) {
|
||||||
TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
|
TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
|
||||||
//
|
//
|
||||||
if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
||||||
aSpR.Orientation(theS.Orientation());
|
aSpR.Orientation(theS.Orientation());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSpR, theS, aCtx);
|
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSpR, theS, aCtx);
|
||||||
if (bToReverse) {
|
if (bToReverse) {
|
||||||
aSpR.Reverse();
|
aSpR.Reverse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
myHistShapes.Append(aSpR);
|
myHistShapes.Append(aSpR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -133,20 +133,20 @@ static
|
|||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
TopoDS_Shape aSp=aIt.Value();
|
TopoDS_Shape aSp=aIt.Value();
|
||||||
if (!mySameDomainShapes.Contains(aSp)) {
|
if (!mySameDomainShapes.Contains(aSp)) {
|
||||||
if (myMapShape.Contains(aSp)) {
|
if (myMapShape.Contains(aSp)) {
|
||||||
//
|
//
|
||||||
if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
||||||
aSp.Orientation(theS.Orientation());
|
aSp.Orientation(theS.Orientation());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSp, theS, aCtx);
|
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSp, theS, aCtx);
|
||||||
if (bToReverse) {
|
if (bToReverse) {
|
||||||
aSp.Reverse();
|
aSp.Reverse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
myHistShapes.Append(aSp);
|
myHistShapes.Append(aSp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -188,15 +188,15 @@ static
|
|||||||
TopoDS_Shape aSp=aIt.Value();
|
TopoDS_Shape aSp=aIt.Value();
|
||||||
//
|
//
|
||||||
if (!mySameDomainShapes.Contains(aSp)) {
|
if (!mySameDomainShapes.Contains(aSp)) {
|
||||||
if (myMapShape.Contains(aSp)) {
|
if (myMapShape.Contains(aSp)) {
|
||||||
return bRet; //false
|
return bRet; //false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
|
TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
|
||||||
if (myMapShape.Contains(aSpR)) {
|
if (myMapShape.Contains(aSpR)) {
|
||||||
return bRet; //false
|
return bRet; //false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -244,18 +244,18 @@ static
|
|||||||
bHasImage=myImages.HasImage(aSx);
|
bHasImage=myImages.HasImage(aSx);
|
||||||
if (!bHasImage) {
|
if (!bHasImage) {
|
||||||
if (myMapShape.Contains(aSx)) {
|
if (myMapShape.Contains(aSx)) {
|
||||||
aLSx.Append(aSx);
|
aLSx.Append(aSx);
|
||||||
myImagesResult.Add(aSx, aLSx);
|
myImagesResult.Add(aSx, aLSx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
|
const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
|
||||||
aIt.Initialize(aLSp);
|
aIt.Initialize(aLSp);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aSp=aIt.Value();
|
const TopoDS_Shape& aSp=aIt.Value();
|
||||||
if (myMapShape.Contains(aSp)) {
|
if (myMapShape.Contains(aSp)) {
|
||||||
aLSx.Append(aSp);
|
aLSx.Append(aSp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
myImagesResult.Add(aSx, aLSx);
|
myImagesResult.Add(aSx, aLSx);
|
||||||
}
|
}
|
||||||
@ -269,32 +269,32 @@ static
|
|||||||
//
|
//
|
||||||
if (!myHasGenerated || !myHasModified) {
|
if (!myHasGenerated || !myHasModified) {
|
||||||
if (aType==TopAbs_EDGE || aType==TopAbs_FACE ||
|
if (aType==TopAbs_EDGE || aType==TopAbs_FACE ||
|
||||||
aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
||||||
//modified by NIZNHY-PKV Thu Dec 7 11:53:01 2006f
|
//modified by NIZNHY-PKV Thu Dec 7 11:53:01 2006f
|
||||||
//bHasImage=myImages.HasImage(aSx);
|
//bHasImage=myImages.HasImage(aSx);
|
||||||
//modified by NIZNHY-PKV Thu Dec 7 11:53:04 2006t
|
//modified by NIZNHY-PKV Thu Dec 7 11:53:04 2006t
|
||||||
if (bHasImage) {
|
if (bHasImage) {
|
||||||
const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
|
const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
|
||||||
aIt.Initialize(aLSp);
|
aIt.Initialize(aLSp);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aSp=aIt.Value();
|
const TopoDS_Shape& aSp=aIt.Value();
|
||||||
//
|
//
|
||||||
if (myMapShape.Contains(aSp)) {
|
if (myMapShape.Contains(aSp)) {
|
||||||
bContainsSD=mySameDomainShapes.Contains(aSp);
|
bContainsSD=mySameDomainShapes.Contains(aSp);
|
||||||
//
|
//
|
||||||
if (!myHasGenerated) {
|
if (!myHasGenerated) {
|
||||||
if (bContainsSD) {
|
if (bContainsSD) {
|
||||||
myHasGenerated=Standard_True;
|
myHasGenerated=Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!myHasModified) {
|
if (!myHasModified) {
|
||||||
if (!bContainsSD) {
|
if (!bContainsSD) {
|
||||||
myHasModified=Standard_True;
|
myHasModified=Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // if (myMapShape.Contains(aSp))
|
} // if (myMapShape.Contains(aSp))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -305,7 +305,7 @@ static
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void MapShapes(const TopoDS_Shape& theS,
|
void MapShapes(const TopoDS_Shape& theS,
|
||||||
TopTools_MapOfShape& theM)
|
TopTools_MapOfShape& theM)
|
||||||
{
|
{
|
||||||
theM.Add(theS);
|
theM.Add(theS);
|
||||||
TopoDS_Iterator anIt;
|
TopoDS_Iterator anIt;
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_Classifier.cxx
|
// File: GEOMAlgo_Classifier.cxx
|
||||||
// Created: Wed Nov 22 10:23:04 2006
|
// Created: Wed Nov 22 10:23:04 2006
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_Clsf.ixx>
|
#include <GEOMAlgo_Clsf.ixx>
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aS
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -39,10 +39,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_Clsf_Type_()
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_Clsf",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_Clsf",
|
||||||
sizeof(GEOMAlgo_Clsf),
|
sizeof(GEOMAlgo_Clsf),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_ClsfSurf.cxx
|
// File: GEOMAlgo_ClsfSurf.cxx
|
||||||
// Created: Wed Nov 22 10:41:47 2006
|
// Created: Wed Nov 22 10:41:47 2006
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_ClsfBox.ixx>
|
#include <GEOMAlgo_ClsfBox.ixx>
|
||||||
#include <GeomAbs_SurfaceType.hxx>
|
#include <GeomAbs_SurfaceType.hxx>
|
||||||
@ -165,18 +165,18 @@
|
|||||||
switch (aSt) {
|
switch (aSt) {
|
||||||
case TopAbs_OUT:
|
case TopAbs_OUT:
|
||||||
myState=aSt;
|
myState=aSt;
|
||||||
iNext=0;
|
iNext=0;
|
||||||
break;
|
break;
|
||||||
case TopAbs_ON:
|
case TopAbs_ON:
|
||||||
++aNbON;
|
++aNbON;
|
||||||
break;
|
break;
|
||||||
case TopAbs_IN:
|
case TopAbs_IN:
|
||||||
++aNbIN;
|
++aNbIN;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
myState=TopAbs_UNKNOWN;
|
myState=TopAbs_UNKNOWN;
|
||||||
iNext=0;
|
iNext=0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -88,7 +88,7 @@ Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aS
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -40,10 +40,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ClsfBox_Type_()
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfBox",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfBox",
|
||||||
sizeof(GEOMAlgo_ClsfBox),
|
sizeof(GEOMAlgo_ClsfBox),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_ClsfSolid.cxx
|
// File: GEOMAlgo_ClsfSolid.cxx
|
||||||
// Created: Mon Jan 29 10:35:46 2007
|
// Created: Mon Jan 29 10:35:46 2007
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_ClsfSolid.ixx>
|
#include <GEOMAlgo_ClsfSolid.ixx>
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ Standard_EXPORT virtual void CheckData() ;
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -40,10 +40,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ClsfSolid_Type_()
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfSolid",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfSolid",
|
||||||
sizeof(GEOMAlgo_ClsfSolid),
|
sizeof(GEOMAlgo_ClsfSolid),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_ClsfSurf.cxx
|
// File: GEOMAlgo_ClsfSurf.cxx
|
||||||
// Created: Wed Nov 22 10:41:47 2006
|
// Created: Wed Nov 22 10:41:47 2006
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_ClsfSurf.ixx>
|
#include <GEOMAlgo_ClsfSurf.ixx>
|
||||||
#include <GeomAbs_SurfaceType.hxx>
|
#include <GeomAbs_SurfaceType.hxx>
|
||||||
@ -79,8 +79,8 @@
|
|||||||
myGAS.Load(myS);
|
myGAS.Load(myS);
|
||||||
aType=myGAS.GetType();
|
aType=myGAS.GetType();
|
||||||
if (!(aType==GeomAbs_Plane ||
|
if (!(aType==GeomAbs_Plane ||
|
||||||
aType==GeomAbs_Cylinder ||
|
aType==GeomAbs_Cylinder ||
|
||||||
aType==GeomAbs_Sphere)) {
|
aType==GeomAbs_Sphere)) {
|
||||||
myErrorStatus=11; // unallowed surface type
|
myErrorStatus=11; // unallowed surface type
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aS
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -40,10 +40,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ClsfSurf_Type_()
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfSurf",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfSurf",
|
||||||
sizeof(GEOMAlgo_ClsfSurf),
|
sizeof(GEOMAlgo_ClsfSurf),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_CoupleOfShapes.cxx
|
// File: GEOMAlgo_CoupleOfShapes.cxx
|
||||||
// Created: Wed Dec 15 13:03:52 2004
|
// Created: Wed Dec 15 13:03:52 2004
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_CoupleOfShapes.ixx>
|
#include <GEOMAlgo_CoupleOfShapes.ixx>
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -36,7 +36,7 @@ GEOMAlgo_CoupleOfShapes::GEOMAlgo_CoupleOfShapes()
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1,
|
void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1,
|
||||||
const TopoDS_Shape& aS2)
|
const TopoDS_Shape& aS2)
|
||||||
{
|
{
|
||||||
myShape1=aS1;
|
myShape1=aS1;
|
||||||
myShape2=aS2;
|
myShape2=aS2;
|
||||||
@ -46,7 +46,7 @@ void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1,
|
void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1,
|
||||||
TopoDS_Shape& aS2)const
|
TopoDS_Shape& aS2)const
|
||||||
{
|
{
|
||||||
aS1=myShape1;
|
aS1=myShape1;
|
||||||
aS2=myShape2;
|
aS2=myShape2;
|
||||||
|
@ -67,7 +67,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger(const GEOMAlgo_PassKey& K,const St
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInte
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger",
|
||||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger),
|
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape(const GEOMAlgo_PassKeyShape& K,
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -54,10 +54,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShap
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape",
|
||||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape),
|
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape(const Standard_Real& K,const TopT
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfRealListOfS
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape",
|
||||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape),
|
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfShapeReal(const TopoDS_Shape& K,const Standard_Re
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_T
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeReal",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeReal",
|
||||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal),
|
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet(const TopoDS_Shape& K,const GEOMAlg
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -54,10 +54,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeS
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet",
|
||||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet),
|
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_FinderShapeOn.cxx
|
// File: GEOMAlgo_FinderShapeOn.cxx
|
||||||
// Created: Tue Jan 11 14:44:31 2005
|
// Created: Tue Jan 11 14:44:31 2005
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_FinderShapeOn.ixx>
|
#include <GEOMAlgo_FinderShapeOn.ixx>
|
||||||
|
|
||||||
@ -352,12 +352,12 @@ void GEOMAlgo_FinderShapeOn::Find(const TopoDS_Shape& aS)
|
|||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aSImage=aIt.Value();
|
const TopoDS_Shape& aSImage=aIt.Value();
|
||||||
if (myImages.IsBound(aSImage)) {
|
if (myImages.IsBound(aSImage)) {
|
||||||
const TopoDS_Shape& aSx=myImages.Find(aSImage);
|
const TopoDS_Shape& aSx=myImages.Find(aSImage);
|
||||||
myMSS.Add(aSx, aSts[i]);
|
myMSS.Add(aSx, aSts[i]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myErrorStatus=33;// can not find original shape
|
myErrorStatus=33;// can not find original shape
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -403,21 +403,21 @@ void GEOMAlgo_FinderShapeOn::MakeArgument1()
|
|||||||
switch (aType) {
|
switch (aType) {
|
||||||
case TopAbs_VERTEX: {
|
case TopAbs_VERTEX: {
|
||||||
const TopoDS_Vertex& aVx=TopoDS::Vertex(aS);
|
const TopoDS_Vertex& aVx=TopoDS::Vertex(aS);
|
||||||
aBB.UpdateVertex(aVx, myTolerance);
|
aBB.UpdateVertex(aVx, myTolerance);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TopAbs_EDGE: {
|
case TopAbs_EDGE: {
|
||||||
const TopoDS_Edge& aEx=TopoDS::Edge(aS);
|
const TopoDS_Edge& aEx=TopoDS::Edge(aS);
|
||||||
aBB.UpdateEdge(aEx, myTolerance);
|
aBB.UpdateEdge(aEx, myTolerance);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TopAbs_FACE: {
|
case TopAbs_FACE: {
|
||||||
const TopoDS_Face& aFx=TopoDS::Face(aS);
|
const TopoDS_Face& aFx=TopoDS::Face(aS);
|
||||||
aBB.UpdateFace(aFx, myTolerance);
|
aBB.UpdateFace(aFx, myTolerance);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} //
|
} //
|
||||||
@ -468,9 +468,9 @@ void GEOMAlgo_FinderShapeOn::CheckData()
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (!(myShapeType==TopAbs_VERTEX ||
|
if (!(myShapeType==TopAbs_VERTEX ||
|
||||||
myShapeType==TopAbs_EDGE ||
|
myShapeType==TopAbs_EDGE ||
|
||||||
myShapeType==TopAbs_FACE ||
|
myShapeType==TopAbs_FACE ||
|
||||||
myShapeType==TopAbs_SOLID)) {
|
myShapeType==TopAbs_SOLID)) {
|
||||||
myErrorStatus=12; // unallowed subshape type
|
myErrorStatus=12; // unallowed subshape type
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -487,9 +487,9 @@ void GEOMAlgo_FinderShapeOn::CheckData()
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_FinderShapeOn::CopySource(const TopoDS_Shape& aE,
|
void GEOMAlgo_FinderShapeOn::CopySource(const TopoDS_Shape& aE,
|
||||||
TopTools_DataMapOfShapeShape& aImages,
|
TopTools_DataMapOfShapeShape& aImages,
|
||||||
TopTools_DataMapOfShapeShape& aOriginals,
|
TopTools_DataMapOfShapeShape& aOriginals,
|
||||||
TopoDS_Shape& aEx)
|
TopoDS_Shape& aEx)
|
||||||
{
|
{
|
||||||
Standard_Boolean bFree;
|
Standard_Boolean bFree;
|
||||||
TopAbs_ShapeEnum aType;
|
TopAbs_ShapeEnum aType;
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_FinderShapeOn1.cxx
|
// File: GEOMAlgo_FinderShapeOn1.cxx
|
||||||
// Created: Fri Mar 4 10:31:06 2005
|
// Created: Fri Mar 4 10:31:06 2005
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_FinderShapeOn1.ixx>
|
#include <GEOMAlgo_FinderShapeOn1.ixx>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@ -280,7 +280,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessVertices()
|
|||||||
//
|
//
|
||||||
if (myShapeType==TopAbs_VERTEX){
|
if (myShapeType==TopAbs_VERTEX){
|
||||||
if (bIsConformState) {
|
if (bIsConformState) {
|
||||||
myMSS.Add(aV, aSt);
|
myMSS.Add(aV, aSt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (bIsConformState || aSt==TopAbs_ON) {
|
else if (bIsConformState || aSt==TopAbs_ON) {
|
||||||
@ -320,11 +320,11 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges()
|
|||||||
//
|
//
|
||||||
bIsConformState=myMSS.Contains(aV);
|
bIsConformState=myMSS.Contains(aV);
|
||||||
if (!bIsConformState) {
|
if (!bIsConformState) {
|
||||||
break;// vertex has non-conformed state
|
break;// vertex has non-conformed state
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aSt=myMSS.FindFromKey(aV);
|
aSt=myMSS.FindFromKey(aV);
|
||||||
aSC.AppendState(aSt);
|
aSC.AppendState(aSt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -348,7 +348,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges()
|
|||||||
//
|
//
|
||||||
aType2=aGAC.GetType();
|
aType2=aGAC.GetType();
|
||||||
if (aType2==GeomAbs_Line) {
|
if (aType2==GeomAbs_Line) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -361,16 +361,16 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges()
|
|||||||
aIt.Initialize(aLP);
|
aIt.Initialize(aLP);
|
||||||
for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
|
for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
|
||||||
if (myNbPntsMax) {
|
if (myNbPntsMax) {
|
||||||
if (iCnt > myNbPntsMax) {
|
if (iCnt > myNbPntsMax) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const gp_Pnt& aP=aIt.Value();
|
const gp_Pnt& aP=aIt.Value();
|
||||||
aSt = GetPointState( aP );
|
aSt = GetPointState( aP );
|
||||||
bIsToBreak=aSC.AppendState(aSt);
|
bIsToBreak=aSC.AppendState(aSt);
|
||||||
if (bIsToBreak) {
|
if (bIsToBreak) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -379,7 +379,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges()
|
|||||||
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
|
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
|
||||||
if (myShapeType==TopAbs_EDGE) {
|
if (myShapeType==TopAbs_EDGE) {
|
||||||
if (bIsConformState) {
|
if (bIsConformState) {
|
||||||
myMSS.Add(aE, aSt);
|
myMSS.Add(aE, aSt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (bIsConformState || aSt==TopAbs_ON) {
|
else if (bIsConformState || aSt==TopAbs_ON) {
|
||||||
@ -421,7 +421,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces()
|
|||||||
aGAS.Load(aS);
|
aGAS.Load(aS);
|
||||||
aType2=aGAS.GetType();
|
aType2=aGAS.GetType();
|
||||||
if (aType2!=aType1) {
|
if (aType2!=aType1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -430,11 +430,11 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces()
|
|||||||
const TopoDS_Shape& aE=aExp.Current();
|
const TopoDS_Shape& aE=aExp.Current();
|
||||||
bIsConformState=myMSS.Contains(aE);
|
bIsConformState=myMSS.Contains(aE);
|
||||||
if (!bIsConformState) {
|
if (!bIsConformState) {
|
||||||
break;// edge has non-conformed state
|
break;// edge has non-conformed state
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aSt=myMSS.FindFromKey(aE);
|
aSt=myMSS.FindFromKey(aE);
|
||||||
aSC.AppendState(aSt);
|
aSC.AppendState(aSt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -451,16 +451,16 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces()
|
|||||||
aIt.Initialize(aLP);
|
aIt.Initialize(aLP);
|
||||||
for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
|
for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
|
||||||
if (myNbPntsMax) {
|
if (myNbPntsMax) {
|
||||||
if (iCnt > myNbPntsMax) {
|
if (iCnt > myNbPntsMax) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const gp_Pnt& aP=aIt.Value();
|
const gp_Pnt& aP=aIt.Value();
|
||||||
aSt = GetPointState( aP );
|
aSt = GetPointState( aP );
|
||||||
bIsToBreak=aSC.AppendState(aSt);
|
bIsToBreak=aSC.AppendState(aSt);
|
||||||
if (bIsToBreak) {
|
if (bIsToBreak) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -469,7 +469,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces()
|
|||||||
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
|
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
|
||||||
if (myShapeType==TopAbs_FACE) {
|
if (myShapeType==TopAbs_FACE) {
|
||||||
if (bIsConformState) {
|
if (bIsConformState) {
|
||||||
myMSS.Add(aF, aSt);
|
myMSS.Add(aF, aSt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (bIsConformState || aSt==TopAbs_ON) {
|
else if (bIsConformState || aSt==TopAbs_ON) {
|
||||||
@ -503,11 +503,11 @@ void GEOMAlgo_FinderShapeOn1::ProcessSolids()
|
|||||||
const TopoDS_Shape& aF=aMF(j);
|
const TopoDS_Shape& aF=aMF(j);
|
||||||
bIsConformState=myMSS.Contains(aF);
|
bIsConformState=myMSS.Contains(aF);
|
||||||
if (!bIsConformState) {
|
if (!bIsConformState) {
|
||||||
break;// face has non-conformed state
|
break;// face has non-conformed state
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aSt=myMSS.FindFromKey(aF);
|
aSt=myMSS.FindFromKey(aF);
|
||||||
aSC.AppendState(aSt);
|
aSC.AppendState(aSt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -529,7 +529,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessSolids()
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
|
void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
|
||||||
GEOMAlgo_ListOfPnt& aLP)
|
GEOMAlgo_ListOfPnt& aLP)
|
||||||
{
|
{
|
||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
@ -568,11 +568,11 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
|
|||||||
//
|
//
|
||||||
aPK.SetIds(n[k], n[k+1]);
|
aPK.SetIds(n[k], n[k+1]);
|
||||||
if (aMPKI.IsBound(aPK)) {
|
if (aMPKI.IsBound(aPK)) {
|
||||||
Standard_Integer& iCntX=aMPKI.ChangeFind(aPK);
|
Standard_Integer& iCntX=aMPKI.ChangeFind(aPK);
|
||||||
++iCntX;
|
++iCntX;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aMPKI.Bind(aPK, 1);
|
aMPKI.Bind(aPK, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -589,8 +589,8 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
|
|||||||
aNbMax=aPK.NbMax();
|
aNbMax=aPK.NbMax();
|
||||||
pIds=(Standard_Integer*)aPK.Key();
|
pIds=(Standard_Integer*)aPK.Key();
|
||||||
for (k=1; k<3; ++k) {
|
for (k=1; k<3; ++k) {
|
||||||
aNx=*(pIds+aNbMax-k);
|
aNx=*(pIds+aNbMax-k);
|
||||||
aMBN.Add(aNx);
|
aMBN.Add(aNx);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
aNx=(Standard_Integer)aPK.Id(1);
|
aNx=(Standard_Integer)aPK.Id(1);
|
||||||
@ -629,49 +629,49 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
|
|||||||
aNbLinks=aMPKI.Extent();
|
aNbLinks=aMPKI.Extent();
|
||||||
aIt.Initialize(aMPKI);
|
aIt.Initialize(aMPKI);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
iCnt=aIt.Value();
|
iCnt=aIt.Value();
|
||||||
if (iCnt>1) {
|
if (iCnt>1) {
|
||||||
// take the first having occured inner link
|
// take the first having occured inner link
|
||||||
// and discretize it
|
// and discretize it
|
||||||
const GEOMAlgo_PassKey& aPK=aIt.Key();
|
const GEOMAlgo_PassKey& aPK=aIt.Key();
|
||||||
//qf
|
//qf
|
||||||
/*
|
/*
|
||||||
aNbMax=aPK.NbMax();
|
aNbMax=aPK.NbMax();
|
||||||
pIds=(Standard_Integer*)aPK.Key();
|
pIds=(Standard_Integer*)aPK.Key();
|
||||||
aN1=*(pIds+aNbMax-1);
|
aN1=*(pIds+aNbMax-1);
|
||||||
aN2=*(pIds+aNbMax-2);
|
aN2=*(pIds+aNbMax-2);
|
||||||
*/
|
*/
|
||||||
//
|
//
|
||||||
aN1=(Standard_Integer)aPK.Id(1);
|
aN1=(Standard_Integer)aPK.Id(1);
|
||||||
aN2=(Standard_Integer)aPK.Id(2);
|
aN2=(Standard_Integer)aPK.Id(2);
|
||||||
//qt
|
//qt
|
||||||
aP1=aNodes(aN1).Transformed(aTrsf);
|
aP1=aNodes(aN1).Transformed(aTrsf);
|
||||||
aP2=aNodes(aN2).Transformed(aTrsf);
|
aP2=aNodes(aN2).Transformed(aTrsf);
|
||||||
//
|
//
|
||||||
if (aType==GeomAbs_Cylinder) {
|
if (aType==GeomAbs_Cylinder) {
|
||||||
Standard_Real aTolSM;
|
Standard_Real aTolSM;
|
||||||
gp_Cylinder aCyl;
|
gp_Cylinder aCyl;
|
||||||
//
|
//
|
||||||
aTolSM=1.523e-6;//~1.-cos(0.1 deg)
|
aTolSM=1.523e-6;//~1.-cos(0.1 deg)
|
||||||
aCyl=aGAS.Cylinder();
|
aCyl=aGAS.Cylinder();
|
||||||
if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) {
|
if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
BRepLib_MakeEdge aBME(aP1, aP2);
|
BRepLib_MakeEdge aBME(aP1, aP2);
|
||||||
bIsDone=aBME.IsDone();
|
bIsDone=aBME.IsDone();
|
||||||
if (!bIsDone) {
|
if (!bIsDone) {
|
||||||
myErrorStatus=30; //can not obtain the line fron the link
|
myErrorStatus=30; //can not obtain the line fron the link
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const TopoDS_Shape& aSx=aBME.Shape();
|
const TopoDS_Shape& aSx=aBME.Shape();
|
||||||
const TopoDS_Edge& aE=TopoDS::Edge(aSx);
|
const TopoDS_Edge& aE=TopoDS::Edge(aSx);
|
||||||
//
|
//
|
||||||
InnerPoints(aE, myNbPntsMin, aLP);
|
InnerPoints(aE, myNbPntsMin, aLP);
|
||||||
break;
|
break;
|
||||||
}// if (iCnt>1)
|
}// if (iCnt>1)
|
||||||
}// for (; aIt.More(); aIt.Next())
|
}// for (; aIt.More(); aIt.Next())
|
||||||
}// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder)
|
}// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder)
|
||||||
}// if (!aNb && myNbPntsMin) {
|
}// if (!aNb && myNbPntsMin) {
|
||||||
@ -681,7 +681,7 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
|
void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
|
||||||
GEOMAlgo_ListOfPnt& aLP)
|
GEOMAlgo_ListOfPnt& aLP)
|
||||||
{
|
{
|
||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
@ -737,8 +737,8 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
|
void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
|
||||||
const Standard_Integer aNbPntsMin,
|
const Standard_Integer aNbPntsMin,
|
||||||
GEOMAlgo_ListOfPnt& aLP)
|
GEOMAlgo_ListOfPnt& aLP)
|
||||||
{
|
{
|
||||||
// try to fill it yourself
|
// try to fill it yourself
|
||||||
Standard_Boolean bInf1, bInf2;
|
Standard_Boolean bInf1, bInf2;
|
||||||
@ -786,9 +786,9 @@ void GEOMAlgo_FinderShapeOn1::CheckData()
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (!(myShapeType==TopAbs_VERTEX ||
|
if (!(myShapeType==TopAbs_VERTEX ||
|
||||||
myShapeType==TopAbs_EDGE ||
|
myShapeType==TopAbs_EDGE ||
|
||||||
myShapeType==TopAbs_FACE ||
|
myShapeType==TopAbs_FACE ||
|
||||||
myShapeType==TopAbs_SOLID)) {
|
myShapeType==TopAbs_SOLID)) {
|
||||||
myErrorStatus=12; // unallowed subshape type
|
myErrorStatus=12; // unallowed subshape type
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -804,8 +804,8 @@ void GEOMAlgo_FinderShapeOn1::CheckData()
|
|||||||
myGAS.Load(mySurface);
|
myGAS.Load(mySurface);
|
||||||
aType=myGAS.GetType();
|
aType=myGAS.GetType();
|
||||||
if (!(aType==GeomAbs_Plane ||
|
if (!(aType==GeomAbs_Plane ||
|
||||||
aType==GeomAbs_Cylinder ||
|
aType==GeomAbs_Cylinder ||
|
||||||
aType==GeomAbs_Sphere)) {
|
aType==GeomAbs_Sphere)) {
|
||||||
myErrorStatus=14; // unallowed surface type
|
myErrorStatus=14; // unallowed surface type
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_FinderShapeOn1.cxx
|
// File: GEOMAlgo_FinderShapeOn1.cxx
|
||||||
// Created: Fri Mar 4 10:31:06 2005
|
// Created: Fri Mar 4 10:31:06 2005
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_FinderShapeOn2.ixx>
|
#include <GEOMAlgo_FinderShapeOn2.ixx>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@ -285,9 +285,9 @@
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (!(myShapeType==TopAbs_VERTEX ||
|
if (!(myShapeType==TopAbs_VERTEX ||
|
||||||
myShapeType==TopAbs_EDGE ||
|
myShapeType==TopAbs_EDGE ||
|
||||||
myShapeType==TopAbs_FACE ||
|
myShapeType==TopAbs_FACE ||
|
||||||
myShapeType==TopAbs_SOLID)) {
|
myShapeType==TopAbs_SOLID)) {
|
||||||
myErrorStatus=12; // unallowed subshape type
|
myErrorStatus=12; // unallowed subshape type
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -331,7 +331,7 @@
|
|||||||
//
|
//
|
||||||
if (myShapeType==TopAbs_VERTEX){
|
if (myShapeType==TopAbs_VERTEX){
|
||||||
if (bIsConformState) {
|
if (bIsConformState) {
|
||||||
myMSS.Add(aV, aSt);
|
myMSS.Add(aV, aSt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (bIsConformState || aSt==TopAbs_ON) {
|
else if (bIsConformState || aSt==TopAbs_ON) {
|
||||||
@ -368,11 +368,11 @@
|
|||||||
//
|
//
|
||||||
bIsConformState=myMSS.Contains(aV);
|
bIsConformState=myMSS.Contains(aV);
|
||||||
if (!bIsConformState) {
|
if (!bIsConformState) {
|
||||||
break;// vertex has non-conformed state
|
break;// vertex has non-conformed state
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aSt=myMSS.FindFromKey(aV);
|
aSt=myMSS.FindFromKey(aV);
|
||||||
aSC.AppendState(aSt);
|
aSC.AppendState(aSt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -393,7 +393,7 @@
|
|||||||
aC=BRep_Tool::Curve(aE, aT1, aT2);
|
aC=BRep_Tool::Curve(aE, aT1, aT2);
|
||||||
bCanBeON=myClsf->CanBeON(aC);
|
bCanBeON=myClsf->CanBeON(aC);
|
||||||
if(!bCanBeON) {
|
if(!bCanBeON) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -406,9 +406,9 @@
|
|||||||
aIt.Initialize(aLP);
|
aIt.Initialize(aLP);
|
||||||
for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
|
for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
|
||||||
if (myNbPntsMax) {
|
if (myNbPntsMax) {
|
||||||
if (iCnt > myNbPntsMax) {
|
if (iCnt > myNbPntsMax) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const gp_Pnt& aP=aIt.Value();
|
const gp_Pnt& aP=aIt.Value();
|
||||||
@ -417,15 +417,15 @@
|
|||||||
myClsf->Perform();
|
myClsf->Perform();
|
||||||
iErr=myClsf->ErrorStatus();
|
iErr=myClsf->ErrorStatus();
|
||||||
if (iErr) {
|
if (iErr) {
|
||||||
myErrorStatus=40; // point can not be classified
|
myErrorStatus=40; // point can not be classified
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aSt=myClsf->State();
|
aSt=myClsf->State();
|
||||||
//
|
//
|
||||||
bIsToBreak=aSC.AppendState(aSt);
|
bIsToBreak=aSC.AppendState(aSt);
|
||||||
if (bIsToBreak) {
|
if (bIsToBreak) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -434,7 +434,7 @@
|
|||||||
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
|
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
|
||||||
if (myShapeType==TopAbs_EDGE) {
|
if (myShapeType==TopAbs_EDGE) {
|
||||||
if (bIsConformState) {
|
if (bIsConformState) {
|
||||||
myMSS.Add(aE, aSt);
|
myMSS.Add(aE, aSt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (bIsConformState || aSt==TopAbs_ON) {
|
else if (bIsConformState || aSt==TopAbs_ON) {
|
||||||
@ -471,7 +471,7 @@
|
|||||||
aS=BRep_Tool::Surface(aF);
|
aS=BRep_Tool::Surface(aF);
|
||||||
bCanBeON=myClsf->CanBeON(aS);
|
bCanBeON=myClsf->CanBeON(aS);
|
||||||
if(!bCanBeON) {
|
if(!bCanBeON) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -480,11 +480,11 @@
|
|||||||
const TopoDS_Shape& aE=aExp.Current();
|
const TopoDS_Shape& aE=aExp.Current();
|
||||||
bIsConformState=myMSS.Contains(aE);
|
bIsConformState=myMSS.Contains(aE);
|
||||||
if (!bIsConformState) {
|
if (!bIsConformState) {
|
||||||
break;// edge has non-conformed state
|
break;// edge has non-conformed state
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aSt=myMSS.FindFromKey(aE);
|
aSt=myMSS.FindFromKey(aE);
|
||||||
aSC.AppendState(aSt);
|
aSC.AppendState(aSt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -501,9 +501,9 @@
|
|||||||
aIt.Initialize(aLP);
|
aIt.Initialize(aLP);
|
||||||
for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
|
for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
|
||||||
if (myNbPntsMax) {
|
if (myNbPntsMax) {
|
||||||
if (iCnt > myNbPntsMax) {
|
if (iCnt > myNbPntsMax) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const gp_Pnt& aP=aIt.Value();
|
const gp_Pnt& aP=aIt.Value();
|
||||||
@ -512,15 +512,15 @@
|
|||||||
myClsf->Perform();
|
myClsf->Perform();
|
||||||
iErr=myClsf->ErrorStatus();
|
iErr=myClsf->ErrorStatus();
|
||||||
if (iErr) {
|
if (iErr) {
|
||||||
myErrorStatus=40; // point can not be classified
|
myErrorStatus=40; // point can not be classified
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aSt=myClsf->State();
|
aSt=myClsf->State();
|
||||||
//
|
//
|
||||||
bIsToBreak=aSC.AppendState(aSt);
|
bIsToBreak=aSC.AppendState(aSt);
|
||||||
if (bIsToBreak) {
|
if (bIsToBreak) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -529,7 +529,7 @@
|
|||||||
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
|
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
|
||||||
if (myShapeType==TopAbs_FACE) {
|
if (myShapeType==TopAbs_FACE) {
|
||||||
if (bIsConformState) {
|
if (bIsConformState) {
|
||||||
myMSS.Add(aF, aSt);
|
myMSS.Add(aF, aSt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (bIsConformState || aSt==TopAbs_ON) {
|
else if (bIsConformState || aSt==TopAbs_ON) {
|
||||||
@ -563,11 +563,11 @@
|
|||||||
const TopoDS_Shape& aF=aMF(j);
|
const TopoDS_Shape& aF=aMF(j);
|
||||||
bIsConformState=myMSS.Contains(aF);
|
bIsConformState=myMSS.Contains(aF);
|
||||||
if (!bIsConformState) {
|
if (!bIsConformState) {
|
||||||
break;// face has non-conformed state
|
break;// face has non-conformed state
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aSt=myMSS.FindFromKey(aF);
|
aSt=myMSS.FindFromKey(aF);
|
||||||
aSC.AppendState(aSt);
|
aSC.AppendState(aSt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -589,7 +589,7 @@
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
|
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
|
||||||
GEOMAlgo_ListOfPnt& aLP)
|
GEOMAlgo_ListOfPnt& aLP)
|
||||||
{
|
{
|
||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
@ -628,11 +628,11 @@
|
|||||||
//
|
//
|
||||||
aPK.SetIds(n[k], n[k+1]);
|
aPK.SetIds(n[k], n[k+1]);
|
||||||
if (aMPKI.IsBound(aPK)) {
|
if (aMPKI.IsBound(aPK)) {
|
||||||
Standard_Integer& iCntX=aMPKI.ChangeFind(aPK);
|
Standard_Integer& iCntX=aMPKI.ChangeFind(aPK);
|
||||||
++iCntX;
|
++iCntX;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aMPKI.Bind(aPK, 1);
|
aMPKI.Bind(aPK, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -649,8 +649,8 @@
|
|||||||
aNbMax=aPK.NbMax();
|
aNbMax=aPK.NbMax();
|
||||||
pIds=(Standard_Integer*)aPK.Key();
|
pIds=(Standard_Integer*)aPK.Key();
|
||||||
for (k=1; k<3; ++k) {
|
for (k=1; k<3; ++k) {
|
||||||
aNx=*(pIds+aNbMax-k);
|
aNx=*(pIds+aNbMax-k);
|
||||||
aMBN.Add(aNx);
|
aMBN.Add(aNx);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
aNx=(Standard_Integer)aPK.Id(1);
|
aNx=(Standard_Integer)aPK.Id(1);
|
||||||
@ -689,49 +689,49 @@
|
|||||||
aNbLinks=aMPKI.Extent();
|
aNbLinks=aMPKI.Extent();
|
||||||
aIt.Initialize(aMPKI);
|
aIt.Initialize(aMPKI);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
iCnt=aIt.Value();
|
iCnt=aIt.Value();
|
||||||
if (iCnt>1) {
|
if (iCnt>1) {
|
||||||
// take the first having occured inner link
|
// take the first having occured inner link
|
||||||
// and discretize it
|
// and discretize it
|
||||||
const GEOMAlgo_PassKey& aPK=aIt.Key();
|
const GEOMAlgo_PassKey& aPK=aIt.Key();
|
||||||
//qf
|
//qf
|
||||||
/*
|
/*
|
||||||
aNbMax=aPK.NbMax();
|
aNbMax=aPK.NbMax();
|
||||||
pIds=(Standard_Integer*)aPK.Key();
|
pIds=(Standard_Integer*)aPK.Key();
|
||||||
aN1=*(pIds+aNbMax-1);
|
aN1=*(pIds+aNbMax-1);
|
||||||
aN2=*(pIds+aNbMax-2);
|
aN2=*(pIds+aNbMax-2);
|
||||||
*/
|
*/
|
||||||
//
|
//
|
||||||
aN1=(Standard_Integer)aPK.Id(1);
|
aN1=(Standard_Integer)aPK.Id(1);
|
||||||
aN2=(Standard_Integer)aPK.Id(2);
|
aN2=(Standard_Integer)aPK.Id(2);
|
||||||
//qt
|
//qt
|
||||||
aP1=aNodes(aN1).Transformed(aTrsf);
|
aP1=aNodes(aN1).Transformed(aTrsf);
|
||||||
aP2=aNodes(aN2).Transformed(aTrsf);
|
aP2=aNodes(aN2).Transformed(aTrsf);
|
||||||
//
|
//
|
||||||
if (aType==GeomAbs_Cylinder) {
|
if (aType==GeomAbs_Cylinder) {
|
||||||
Standard_Real aTolSM;
|
Standard_Real aTolSM;
|
||||||
gp_Cylinder aCyl;
|
gp_Cylinder aCyl;
|
||||||
//
|
//
|
||||||
aTolSM=1.523e-6;//~1.-cos(0.1 deg)
|
aTolSM=1.523e-6;//~1.-cos(0.1 deg)
|
||||||
aCyl=aGAS.Cylinder();
|
aCyl=aGAS.Cylinder();
|
||||||
if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) {
|
if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
BRepLib_MakeEdge aBME(aP1, aP2);
|
BRepLib_MakeEdge aBME(aP1, aP2);
|
||||||
bIsDone=aBME.IsDone();
|
bIsDone=aBME.IsDone();
|
||||||
if (!bIsDone) {
|
if (!bIsDone) {
|
||||||
myErrorStatus=30; //can not obtain the line fron the link
|
myErrorStatus=30; //can not obtain the line fron the link
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const TopoDS_Shape& aSx=aBME.Shape();
|
const TopoDS_Shape& aSx=aBME.Shape();
|
||||||
const TopoDS_Edge& aE=TopoDS::Edge(aSx);
|
const TopoDS_Edge& aE=TopoDS::Edge(aSx);
|
||||||
//
|
//
|
||||||
InnerPoints(aE, myNbPntsMin, aLP);
|
InnerPoints(aE, myNbPntsMin, aLP);
|
||||||
break;
|
break;
|
||||||
}// if (iCnt>1)
|
}// if (iCnt>1)
|
||||||
}// for (; aIt.More(); aIt.Next())
|
}// for (; aIt.More(); aIt.Next())
|
||||||
}// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder)
|
}// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder)
|
||||||
}// if (!aNb && myNbPntsMin) {
|
}// if (!aNb && myNbPntsMin) {
|
||||||
@ -741,7 +741,7 @@
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE,
|
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE,
|
||||||
GEOMAlgo_ListOfPnt& aLP)
|
GEOMAlgo_ListOfPnt& aLP)
|
||||||
{
|
{
|
||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
@ -797,8 +797,8 @@
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE,
|
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE,
|
||||||
const Standard_Integer aNbPntsMin,
|
const Standard_Integer aNbPntsMin,
|
||||||
GEOMAlgo_ListOfPnt& aLP)
|
GEOMAlgo_ListOfPnt& aLP)
|
||||||
{
|
{
|
||||||
// try to fill it yourself
|
// try to fill it yourself
|
||||||
Standard_Boolean bInf1, bInf2;
|
Standard_Boolean bInf1, bInf2;
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_GlueDetector.cxx
|
// File: GEOMAlgo_GlueDetector.cxx
|
||||||
// Created: Wed Dec 15 11:08:09 2004
|
// Created: Wed Dec 15 11:08:09 2004
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_GlueAnalyser.ixx>
|
#include <GEOMAlgo_GlueAnalyser.ixx>
|
||||||
|
|
||||||
@ -212,7 +212,7 @@
|
|||||||
aIndex=aIt.Value();
|
aIndex=aIt.Value();
|
||||||
const TopoDS_Shape& aVx=aMIS.FindFromKey(aIndex);
|
const TopoDS_Shape& aVx=aMIS.FindFromKey(aIndex);
|
||||||
if(!j) {
|
if(!j) {
|
||||||
aVF=aVx;
|
aVF=aVx;
|
||||||
}
|
}
|
||||||
aLVSD.Append(aVx);
|
aLVSD.Append(aVx);
|
||||||
aMVProcessed.Add(aVx);
|
aMVProcessed.Add(aVx);
|
||||||
@ -229,7 +229,7 @@
|
|||||||
for (; aItS.More(); aItS.Next()) {
|
for (; aItS.More(); aItS.Next()) {
|
||||||
const TopoDS_Shape& aVSD=aItS.Value();
|
const TopoDS_Shape& aVSD=aItS.Value();
|
||||||
if (!myOrigins.IsBound(aVSD)) {
|
if (!myOrigins.IsBound(aVSD)) {
|
||||||
myOrigins.Bind(aVSD, aV);
|
myOrigins.Bind(aVSD, aV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -323,7 +323,7 @@
|
|||||||
for (; aItS.More(); aItS.Next()) {
|
for (; aItS.More(); aItS.Next()) {
|
||||||
const TopoDS_Shape& aFSD=aItS.Value();
|
const TopoDS_Shape& aFSD=aItS.Value();
|
||||||
if (!myOrigins.IsBound(aFSD)) {
|
if (!myOrigins.IsBound(aFSD)) {
|
||||||
myOrigins.Bind(aFSD, aNewShape);
|
myOrigins.Bind(aFSD, aNewShape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -370,13 +370,13 @@
|
|||||||
aFx[1]=aLF.Last();
|
aFx[1]=aLF.Last();
|
||||||
for (i=0; i<2; ++i) {
|
for (i=0; i<2; ++i) {
|
||||||
if (!aMFS.Contains(aFx[i])) {
|
if (!aMFS.Contains(aFx[i])) {
|
||||||
continue;// it must not be so
|
continue;// it must not be so
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const TopTools_ListOfShape& aLS=aMFS.FindFromKey(aFx[i]);
|
const TopTools_ListOfShape& aLS=aMFS.FindFromKey(aFx[i]);
|
||||||
aNbS=aLS.Extent();
|
aNbS=aLS.Extent();
|
||||||
if (aNbS!=1) {
|
if (aNbS!=1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
aSx[i]=aLS.First();
|
aSx[i]=aLS.First();
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_Gluer.cxx
|
// File: GEOMAlgo_Gluer.cxx
|
||||||
// Created: Sat Dec 04 12:45:53 2004
|
// Created: Sat Dec 04 12:45:53 2004
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <peter@PREFEX>
|
// <peter@PREFEX>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_Gluer.ixx>
|
#include <GEOMAlgo_Gluer.ixx>
|
||||||
|
|
||||||
@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
static
|
static
|
||||||
void GetSubShapes(const TopoDS_Shape& aS,
|
void GetSubShapes(const TopoDS_Shape& aS,
|
||||||
TopTools_IndexedMapOfShape& aMSS);
|
TopTools_IndexedMapOfShape& aMSS);
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GEOMAlgo_Gluer
|
//function : GEOMAlgo_Gluer
|
||||||
@ -251,49 +251,49 @@ void GEOMAlgo_Gluer::MakeVertices()
|
|||||||
aNbIP=aMIP.Extent();
|
aNbIP=aMIP.Extent();
|
||||||
aIt1.Initialize(aMIP);
|
aIt1.Initialize(aMIP);
|
||||||
for(; aIt1.More(); aIt1.Next()) {
|
for(; aIt1.More(); aIt1.Next()) {
|
||||||
aIP=aIt1.Key();
|
aIP=aIt1.Key();
|
||||||
if (aMIPC.Contains(aIP)) {
|
if (aMIPC.Contains(aIP)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
|
const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
|
||||||
const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP);
|
const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP);
|
||||||
//
|
//
|
||||||
aSelector.Clear();
|
aSelector.Clear();
|
||||||
aSelector.SetBox(aBoxVP);
|
aSelector.SetBox(aBoxVP);
|
||||||
//
|
//
|
||||||
aNbVSD=aBBTree.Select(aSelector);
|
aNbVSD=aBBTree.Select(aSelector);
|
||||||
if (!aNbVSD) {
|
if (!aNbVSD) {
|
||||||
continue; // it must not be
|
continue; // it must not be
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const TColStd_ListOfInteger& aLI=aSelector.Indices();
|
const TColStd_ListOfInteger& aLI=aSelector.Indices();
|
||||||
aIt.Initialize(aLI);
|
aIt.Initialize(aLI);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
aIP1=aIt.Value();
|
aIP1=aIt.Value();
|
||||||
if (aMIP.Contains(aIP1)) {
|
if (aMIP.Contains(aIP1)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
aMIP1.Add(aIP1);
|
aMIP1.Add(aIP1);
|
||||||
} //for (; aIt.More(); aIt.Next()) {
|
} //for (; aIt.More(); aIt.Next()) {
|
||||||
}//for(; aIt1.More(); aIt1.Next()) {
|
}//for(; aIt1.More(); aIt1.Next()) {
|
||||||
//
|
//
|
||||||
aNbIP1=aMIP1.Extent();
|
aNbIP1=aMIP1.Extent();
|
||||||
if (!aNbIP1) {
|
if (!aNbIP1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aIt1.Initialize(aMIP);
|
aIt1.Initialize(aMIP);
|
||||||
for(; aIt1.More(); aIt1.Next()) {
|
for(; aIt1.More(); aIt1.Next()) {
|
||||||
aIP=aIt1.Key();
|
aIP=aIt1.Key();
|
||||||
aMIPC.Add(aIP);
|
aMIPC.Add(aIP);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aMIP.Clear();
|
aMIP.Clear();
|
||||||
aIt1.Initialize(aMIP1);
|
aIt1.Initialize(aMIP1);
|
||||||
for(; aIt1.More(); aIt1.Next()) {
|
for(; aIt1.More(); aIt1.Next()) {
|
||||||
aIP=aIt1.Key();
|
aIP=aIt1.Key();
|
||||||
aMIP.Add(aIP);
|
aMIP.Add(aIP);
|
||||||
}
|
}
|
||||||
aMIP1.Clear();
|
aMIP1.Clear();
|
||||||
}// while(1)
|
}// while(1)
|
||||||
@ -309,13 +309,13 @@ void GEOMAlgo_Gluer::MakeVertices()
|
|||||||
else { // SD vertices founded [ aMIPC ]
|
else { // SD vertices founded [ aMIPC ]
|
||||||
aIt1.Initialize(aMIPC);
|
aIt1.Initialize(aMIPC);
|
||||||
for(j=0; aIt1.More(); aIt1.Next(), ++j) {
|
for(j=0; aIt1.More(); aIt1.Next(), ++j) {
|
||||||
aIP=aIt1.Key();
|
aIP=aIt1.Key();
|
||||||
const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
|
const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
|
||||||
if (!j) {
|
if (!j) {
|
||||||
aVF=aVP;
|
aVF=aVP;
|
||||||
}
|
}
|
||||||
aLVSD.Append(aVP);
|
aLVSD.Append(aVP);
|
||||||
aMVProcessed.Add(aVP);
|
aMVProcessed.Add(aVP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
myImages.Bind(aVF, aLVSD);
|
myImages.Bind(aVF, aLVSD);
|
||||||
@ -360,7 +360,7 @@ void GEOMAlgo_Gluer::MakeVertices()
|
|||||||
for (; aItS.More(); aItS.Next()) {
|
for (; aItS.More(); aItS.Next()) {
|
||||||
const TopoDS_Shape& aVSD=aItS.Value();
|
const TopoDS_Shape& aVSD=aItS.Value();
|
||||||
if (!myOrigins.IsBound(aVSD)) {
|
if (!myOrigins.IsBound(aVSD)) {
|
||||||
myOrigins.Bind(aVSD, aV);
|
myOrigins.Bind(aVSD, aV);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -532,12 +532,12 @@ void GEOMAlgo_Gluer::MakeShells()
|
|||||||
const TopoDS_Face& aF=TopoDS::Face(aExp.Current());
|
const TopoDS_Face& aF=TopoDS::Face(aExp.Current());
|
||||||
aFR=TopoDS::Face(myOrigins.Find(aF));
|
aFR=TopoDS::Face(myOrigins.Find(aF));
|
||||||
if (aFR.IsSame(aF)) {
|
if (aFR.IsSame(aF)) {
|
||||||
aBB.Add(aNewShell, aF);
|
aBB.Add(aNewShell, aF);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
bIsToReverse=IsToReverse(aFR, aF);
|
bIsToReverse=IsToReverse(aFR, aF);
|
||||||
if (bIsToReverse) {
|
if (bIsToReverse) {
|
||||||
aFR.Reverse();
|
aFR.Reverse();
|
||||||
}
|
}
|
||||||
aBB.Add(aNewShell, aFR);
|
aBB.Add(aNewShell, aFR);
|
||||||
}
|
}
|
||||||
@ -638,25 +638,25 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType)
|
|||||||
if (aNbSDF==1) {
|
if (aNbSDF==1) {
|
||||||
bHasNewSubShape=HasNewSubShape(aS1);
|
bHasNewSubShape=HasNewSubShape(aS1);
|
||||||
if (!bHasNewSubShape) {
|
if (!bHasNewSubShape) {
|
||||||
aNewShape=aS1;
|
aNewShape=aS1;
|
||||||
aNewShape.Orientation(TopAbs_FORWARD);
|
aNewShape.Orientation(TopAbs_FORWARD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (bHasNewSubShape) {
|
if (bHasNewSubShape) {
|
||||||
if (aType==TopAbs_FACE) {
|
if (aType==TopAbs_FACE) {
|
||||||
TopoDS_Face aNewFace;
|
TopoDS_Face aNewFace;
|
||||||
//
|
//
|
||||||
const TopoDS_Face& aF1=TopoDS::Face(aS1);
|
const TopoDS_Face& aF1=TopoDS::Face(aS1);
|
||||||
MakeFace(aF1, aNewFace);
|
MakeFace(aF1, aNewFace);
|
||||||
aNewShape=aNewFace;
|
aNewShape=aNewFace;
|
||||||
}
|
}
|
||||||
else if (aType==TopAbs_EDGE) {
|
else if (aType==TopAbs_EDGE) {
|
||||||
TopoDS_Edge aNewEdge;
|
TopoDS_Edge aNewEdge;
|
||||||
//
|
//
|
||||||
const TopoDS_Edge& aE1=TopoDS::Edge(aS1);
|
const TopoDS_Edge& aE1=TopoDS::Edge(aS1);
|
||||||
MakeEdge(aE1, aNewEdge);
|
MakeEdge(aE1, aNewEdge);
|
||||||
aNewShape=aNewEdge;
|
aNewShape=aNewEdge;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -666,7 +666,7 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType)
|
|||||||
for (; aItS.More(); aItS.Next()) {
|
for (; aItS.More(); aItS.Next()) {
|
||||||
const TopoDS_Shape& aFSD=aItS.Value();
|
const TopoDS_Shape& aFSD=aItS.Value();
|
||||||
if (!myOrigins.IsBound(aFSD)) {
|
if (!myOrigins.IsBound(aFSD)) {
|
||||||
myOrigins.Bind(aFSD, aNewShape);
|
myOrigins.Bind(aFSD, aNewShape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -706,12 +706,12 @@ void GEOMAlgo_Gluer::CheckResult()
|
|||||||
for (j=1; j<=aNbFS; ++j) {
|
for (j=1; j<=aNbFS; ++j) {
|
||||||
const TopoDS_Shape& aFS=aMFS(j);
|
const TopoDS_Shape& aFS=aMFS(j);
|
||||||
if (aMFR.Contains(aFS)) {
|
if (aMFR.Contains(aFS)) {
|
||||||
const TopTools_ListOfShape& aLSx=aMFR.FindFromKey(aFS);
|
const TopTools_ListOfShape& aLSx=aMFR.FindFromKey(aFS);
|
||||||
aNbSx=aLSx.Extent();
|
aNbSx=aLSx.Extent();
|
||||||
if (aNbSx==2) {
|
if (aNbSx==2) {
|
||||||
bFound=!bFound;
|
bFound=!bFound;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -773,7 +773,7 @@ void GEOMAlgo_Gluer::InnerTolerance()
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF,
|
void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF,
|
||||||
GEOMAlgo_PassKeyShape& aPK)
|
GEOMAlgo_PassKeyShape& aPK)
|
||||||
{
|
{
|
||||||
Standard_Integer i, aNbE;
|
Standard_Integer i, aNbE;
|
||||||
TopTools_ListOfShape aLE;
|
TopTools_ListOfShape aLE;
|
||||||
@ -798,7 +798,7 @@ void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE,
|
void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE,
|
||||||
GEOMAlgo_PassKeyShape& aPK)
|
GEOMAlgo_PassKeyShape& aPK)
|
||||||
{
|
{
|
||||||
TopoDS_Vertex aV1, aV2;
|
TopoDS_Vertex aV1, aV2;
|
||||||
//
|
//
|
||||||
@ -817,7 +817,7 @@ void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV,
|
void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV,
|
||||||
TopoDS_Vertex& aNewVertex)
|
TopoDS_Vertex& aNewVertex)
|
||||||
{
|
{
|
||||||
Standard_Integer aNbV;
|
Standard_Integer aNbV;
|
||||||
Standard_Real aTolV, aD, aDmax;
|
Standard_Real aTolV, aD, aDmax;
|
||||||
@ -863,7 +863,7 @@ void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
|
void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
|
||||||
TopoDS_Edge& aNewEdge)
|
TopoDS_Edge& aNewEdge)
|
||||||
{
|
{
|
||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
@ -917,7 +917,7 @@ void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
|
void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
|
||||||
TopoDS_Face& aNewFace)
|
TopoDS_Face& aNewFace)
|
||||||
{
|
{
|
||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
@ -953,20 +953,20 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
|
|||||||
//
|
//
|
||||||
aER.Orientation(TopAbs_FORWARD);
|
aER.Orientation(TopAbs_FORWARD);
|
||||||
if (!BRep_Tool::Degenerated(aER)) {
|
if (!BRep_Tool::Degenerated(aER)) {
|
||||||
// build p-curve
|
// build p-curve
|
||||||
if (bIsUPeriodic) {
|
if (bIsUPeriodic) {
|
||||||
GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax);
|
GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax);
|
||||||
}
|
}
|
||||||
BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD);
|
BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD);
|
||||||
|
|
||||||
// orient image
|
// orient image
|
||||||
bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext);
|
bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext);
|
||||||
if (bIsToReverse) {
|
if (bIsToReverse) {
|
||||||
aER.Reverse();
|
aER.Reverse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
aER.Orientation(aE.Orientation());
|
aER.Orientation(aE.Orientation());
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
aBB.Add(newWire, aER);
|
aBB.Add(newWire, aER);
|
||||||
@ -987,7 +987,7 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR,
|
Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR,
|
||||||
const TopoDS_Face& aF)
|
const TopoDS_Face& aF)
|
||||||
{
|
{
|
||||||
Standard_Boolean bRet;
|
Standard_Boolean bRet;
|
||||||
Standard_Real aT, aT1, aT2, aTR, aScPr;
|
Standard_Real aT, aT1, aT2, aTR, aScPr;
|
||||||
@ -1066,7 +1066,7 @@ Standard_Boolean GEOMAlgo_Gluer::HasNewSubShape(const TopoDS_Shape& aS)const
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GetSubShapes(const TopoDS_Shape& aS,
|
void GetSubShapes(const TopoDS_Shape& aS,
|
||||||
TopTools_IndexedMapOfShape& aMSS)
|
TopTools_IndexedMapOfShape& aMSS)
|
||||||
{
|
{
|
||||||
Standard_Integer aR;
|
Standard_Integer aR;
|
||||||
TopAbs_ShapeEnum aType;
|
TopAbs_ShapeEnum aType;
|
||||||
@ -1105,7 +1105,7 @@ const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS)
|
|||||||
if(myOrigins.IsBound(aS)) {
|
if(myOrigins.IsBound(aS)) {
|
||||||
const TopoDS_Shape& aSnew=myOrigins.Find(aS);
|
const TopoDS_Shape& aSnew=myOrigins.Find(aS);
|
||||||
if (!aSnew.IsSame(aS)) {
|
if (!aSnew.IsSame(aS)) {
|
||||||
myGenerated.Append(aSnew);
|
myGenerated.Append(aSnew);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_Gluer1.cxx
|
// File: GEOMAlgo_Gluer1.cxx
|
||||||
// Created: Wed Jan 24 11:52:27 2007
|
// Created: Wed Jan 24 11:52:27 2007
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <pkv@irinox>
|
// <pkv@irinox>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_Gluer1.ixx>
|
#include <GEOMAlgo_Gluer1.ixx>
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ class GEOMAlgo_CoupleOfInteger {
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
void SetValues(const Standard_Integer aI1,
|
void SetValues(const Standard_Integer aI1,
|
||||||
const Standard_Integer aI2) {
|
const Standard_Integer aI2) {
|
||||||
myInt1=aI1;
|
myInt1=aI1;
|
||||||
myInt2=aI2;
|
myInt2=aI2;
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ class GEOMAlgo_CoupleOfInteger {
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
void Values(Standard_Integer& aI1,
|
void Values(Standard_Integer& aI1,
|
||||||
Standard_Integer& aI2) const {
|
Standard_Integer& aI2) const {
|
||||||
aI1=myInt1;
|
aI1=myInt1;
|
||||||
aI2=myInt2;
|
aI2=myInt2;
|
||||||
}
|
}
|
||||||
@ -108,14 +108,14 @@ class GEOMAlgo_CoupleOfInteger {
|
|||||||
//
|
//
|
||||||
static
|
static
|
||||||
void SortShell(const Standard_Integer ,
|
void SortShell(const Standard_Integer ,
|
||||||
GEOMAlgo_CoupleOfInteger* );
|
GEOMAlgo_CoupleOfInteger* );
|
||||||
static
|
static
|
||||||
void RefineSolid(const TopoDS_Shape& ,
|
void RefineSolid(const TopoDS_Shape& ,
|
||||||
const TopTools_DataMapOfShapeShape& ,
|
const TopTools_DataMapOfShapeShape& ,
|
||||||
TopTools_DataMapOfShapeShape& );
|
TopTools_DataMapOfShapeShape& );
|
||||||
static
|
static
|
||||||
void MakeFaceToReplace(const TopoDS_Face& ,
|
void MakeFaceToReplace(const TopoDS_Face& ,
|
||||||
TopoDS_Face& );
|
TopoDS_Face& );
|
||||||
//
|
//
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GEOMAlgo_Gluer1
|
//function : GEOMAlgo_Gluer1
|
||||||
@ -276,10 +276,10 @@ static
|
|||||||
aPKS.Clear();
|
aPKS.Clear();
|
||||||
aPKS.SetShapes(aS1, aS2);
|
aPKS.SetShapes(aS1, aS2);
|
||||||
if (!myMapGN.IsBound(aPKS)) {
|
if (!myMapGN.IsBound(aPKS)) {
|
||||||
//some faces, wanted to unglue, are not glued at all;
|
//some faces, wanted to unglue, are not glued at all;
|
||||||
myWarningStatus=2;
|
myWarningStatus=2;
|
||||||
myRejectedFaces.Append(aCS);
|
myRejectedFaces.Append(aCS);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const TopoDS_Shape& aFN=myMapGN.Find(aPKS);
|
const TopoDS_Shape& aFN=myMapGN.Find(aPKS);
|
||||||
@ -316,13 +316,13 @@ static
|
|||||||
for (; aItLS.More(); aItLS.Next()) {
|
for (; aItLS.More(); aItLS.Next()) {
|
||||||
const TopoDS_Shape& aS=aItLS.Value();
|
const TopoDS_Shape& aS=aItLS.Value();
|
||||||
if (aMSF.Contains(aS)) {
|
if (aMSF.Contains(aS)) {
|
||||||
TopTools_ListOfShape& aLF=aMSF.ChangeFromKey(aS);
|
TopTools_ListOfShape& aLF=aMSF.ChangeFromKey(aS);
|
||||||
aLF.Append(aFN);
|
aLF.Append(aFN);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TopTools_ListOfShape aLF;
|
TopTools_ListOfShape aLF;
|
||||||
aLF.Append(aFN);
|
aLF.Append(aFN);
|
||||||
aMSF.Add(aS, aLF);
|
aMSF.Add(aS, aLF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -373,7 +373,7 @@ static
|
|||||||
for (; aItLS.More(); aItLS.Next()) {
|
for (; aItLS.More(); aItLS.Next()) {
|
||||||
const TopoDS_Shape& aFN=aItLS.Value();
|
const TopoDS_Shape& aFN=aItLS.Value();
|
||||||
if (!aMFNP.Add(aFN)) {
|
if (!aMFNP.Add(aFN)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// original face from original solid -> FD
|
// original face from original solid -> FD
|
||||||
@ -383,12 +383,12 @@ static
|
|||||||
const TopTools_ListOfShape& aLFD=myImages.Find(aFN);
|
const TopTools_ListOfShape& aLFD=myImages.Find(aFN);
|
||||||
aItLS1.Initialize(aLFD);
|
aItLS1.Initialize(aLFD);
|
||||||
for (; aItLS1.More(); aItLS1.Next()) {
|
for (; aItLS1.More(); aItLS1.Next()) {
|
||||||
const TopoDS_Shape& aFDx=aItLS1.Value();
|
const TopoDS_Shape& aFDx=aItLS1.Value();
|
||||||
if (aMFD.Contains(aFDx)) {
|
if (aMFD.Contains(aFDx)) {
|
||||||
aFD=aFDx;
|
aFD=aFDx;
|
||||||
bFound=Standard_True;
|
bFound=Standard_True;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//if (!bFound) {...}
|
//if (!bFound) {...}
|
||||||
aMFNFD.Bind(aFN, aFD);
|
aMFNFD.Bind(aFN, aFD);
|
||||||
@ -418,10 +418,10 @@ static
|
|||||||
TopTools_ListOfShape& aLFD=myImages.ChangeFind(aFN);
|
TopTools_ListOfShape& aLFD=myImages.ChangeFind(aFN);
|
||||||
aItLS.Initialize(aLFD);
|
aItLS.Initialize(aLFD);
|
||||||
for (; aItLS.More(); aItLS.Next()) {
|
for (; aItLS.More(); aItLS.Next()) {
|
||||||
const TopoDS_Shape& aFDx=aItLS.Value();
|
const TopoDS_Shape& aFDx=aItLS.Value();
|
||||||
if (!aFDx.IsSame(aFD)) {
|
if (!aFDx.IsSame(aFD)) {
|
||||||
aLFDx.Append(aFDx);
|
aLFDx.Append(aFDx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
aLFD=aLFDx;
|
aLFD=aLFDx;
|
||||||
//
|
//
|
||||||
@ -438,8 +438,8 @@ static
|
|||||||
// purpose : replace faces (aMFN) of solid aSd by new ones
|
// purpose : replace faces (aMFN) of solid aSd by new ones
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void RefineSolid(const TopoDS_Shape& aSd,
|
void RefineSolid(const TopoDS_Shape& aSd,
|
||||||
const TopTools_DataMapOfShapeShape& aMFNFD,
|
const TopTools_DataMapOfShapeShape& aMFNFD,
|
||||||
TopTools_DataMapOfShapeShape& aMFNFN2)
|
TopTools_DataMapOfShapeShape& aMFNFN2)
|
||||||
{
|
{
|
||||||
TopoDS_Shape *pSh;
|
TopoDS_Shape *pSh;
|
||||||
TopoDS_Face aF2;
|
TopoDS_Face aF2;
|
||||||
@ -458,7 +458,7 @@ void RefineSolid(const TopoDS_Shape& aSd,
|
|||||||
for (; aItSh.More(); aItSh.Next()) {
|
for (; aItSh.More(); aItSh.Next()) {
|
||||||
const TopoDS_Shape& aF=aItSh.Value();
|
const TopoDS_Shape& aF=aItSh.Value();
|
||||||
if (aMFNFD.IsBound(aF)) {
|
if (aMFNFD.IsBound(aF)) {
|
||||||
aLF.Append(aF);
|
aLF.Append(aF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -480,7 +480,7 @@ void RefineSolid(const TopoDS_Shape& aSd,
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void MakeFaceToReplace(const TopoDS_Face& aF,
|
void MakeFaceToReplace(const TopoDS_Face& aF,
|
||||||
TopoDS_Face& aFR)
|
TopoDS_Face& aFR)
|
||||||
{
|
{
|
||||||
Standard_Real aTol;
|
Standard_Real aTol;
|
||||||
Handle(Geom_Surface) aS;
|
Handle(Geom_Surface) aS;
|
||||||
@ -508,7 +508,7 @@ void MakeFaceToReplace(const TopoDS_Face& aF,
|
|||||||
// purpose :
|
// purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SortShell(const Standard_Integer n,
|
void SortShell(const Standard_Integer n,
|
||||||
GEOMAlgo_CoupleOfInteger* a)
|
GEOMAlgo_CoupleOfInteger* a)
|
||||||
{
|
{
|
||||||
Standard_Integer nd, i, j, l, d=1;
|
Standard_Integer nd, i, j, l, d=1;
|
||||||
GEOMAlgo_CoupleOfInteger x;
|
GEOMAlgo_CoupleOfInteger x;
|
||||||
@ -526,13 +526,13 @@ void SortShell(const Standard_Integer n,
|
|||||||
m30:;
|
m30:;
|
||||||
l=j+d;
|
l=j+d;
|
||||||
if (a[l].Value1() < a[j].Value1()) {
|
if (a[l].Value1() < a[j].Value1()) {
|
||||||
x=a[j];
|
x=a[j];
|
||||||
a[j]=a[l];
|
a[j]=a[l];
|
||||||
a[l]=x;
|
a[l]=x;
|
||||||
j-=d;
|
j-=d;
|
||||||
if (j > -1) {
|
if (j > -1) {
|
||||||
goto m30;
|
goto m30;
|
||||||
}
|
}
|
||||||
}//if (a[l] < a[j]){
|
}//if (a[l] < a[j]){
|
||||||
}//for (i=0; i<nd; ++i)
|
}//for (i=0; i<nd; ++i)
|
||||||
}//while (1)
|
}//while (1)
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
// File: GEOMAlgo_Algo.cxx
|
// File: GEOMAlgo_Algo.cxx
|
||||||
// Created: Sat Dec 04 12:39:47 2004
|
// Created: Sat Dec 04 12:39:47 2004
|
||||||
// Author: Peter KURNEV
|
// Author: Peter KURNEV
|
||||||
// <peter@PREFEX>
|
// <peter@PREFEX>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_HAlgo.ixx>
|
#include <GEOMAlgo_HAlgo.ixx>
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ Standard_EXPORT Standard_Integer WarningStatus() const;
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -38,10 +38,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_HAlgo_Type_()
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_HAlgo",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_HAlgo",
|
||||||
sizeof(GEOMAlgo_HAlgo),
|
sizeof(GEOMAlgo_HAlgo),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape(const Standard_Integer
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape",
|
||||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape),
|
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape
|
|||||||
//
|
//
|
||||||
Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_();
|
Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_();
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -54,10 +54,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape",
|
||||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape),
|
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape(const GEOMA
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape",
|
||||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape),
|
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox(const TopoDS_Shape& K1,con
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox",
|
||||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox),
|
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo(const TopoDS_Shape&
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo",
|
||||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo),
|
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState(const TopoDS_Shape& K1,c
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState",
|
||||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState),
|
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ GEOMAlgo_ListNodeOfListOfCoupleOfShapes(const GEOMAlgo_CoupleOfShapes& I,const T
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Ty
|
|||||||
|
|
||||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ListNodeOfListOfCoupleOfShapes",
|
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ListNodeOfListOfCoupleOfShapes",
|
||||||
sizeof(GEOMAlgo_ListNodeOfListOfCoupleOfShapes),
|
sizeof(GEOMAlgo_ListNodeOfListOfCoupleOfShapes),
|
||||||
1,
|
1,
|
||||||
(Standard_Address)_Ancestors,
|
(Standard_Address)_Ancestors,
|
||||||
(Standard_Address)NULL);
|
(Standard_Address)NULL);
|
||||||
|
|
||||||
return _aType;
|
return _aType;
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ GEOMAlgo_ListNodeOfListOfPnt(const gp_Pnt& I,const TCollection_MapNodePtr& n);
|
|||||||
// Type management
|
// Type management
|
||||||
//
|
//
|
||||||
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
|
||||||
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
//Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user