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());
|
||||
Handle(Poly_Triangulation) Tr = BRep_Tool::Triangulation(F, L);
|
||||
if(Tr.IsNull())
|
||||
MESSAGE("Error, null layer" )
|
||||
MESSAGE("Error, null layer" )
|
||||
nbNodes = Tr->NbNodes();
|
||||
const TColgp_Array1OfPnt& Nodes = Tr->Nodes();
|
||||
|
||||
// Calcul des dimensions de la boite englobante du solide
|
||||
|
||||
for(i=1;i<=nbNodes;i++)
|
||||
{
|
||||
InitPoint = Nodes(i).Transformed(L.Transformation());
|
||||
if(InitPoint.X() < Xmin)
|
||||
Xmin = InitPoint.X();
|
||||
if(InitPoint.X() > Xmax)
|
||||
Xmax = InitPoint.X();
|
||||
if(InitPoint.Y() < Ymin)
|
||||
Ymin = InitPoint.Y();
|
||||
if(InitPoint.Y() > Ymax)
|
||||
Ymax = InitPoint.Y();
|
||||
if(InitPoint.Z() < Zmin)
|
||||
Zmin = InitPoint.Z();
|
||||
if(InitPoint.Z() > Zmax)
|
||||
Zmax = InitPoint.Z();
|
||||
|
||||
}
|
||||
{
|
||||
InitPoint = Nodes(i).Transformed(L.Transformation());
|
||||
if(InitPoint.X() < Xmin)
|
||||
Xmin = InitPoint.X();
|
||||
if(InitPoint.X() > Xmax)
|
||||
Xmax = InitPoint.X();
|
||||
if(InitPoint.Y() < Ymin)
|
||||
Ymin = InitPoint.Y();
|
||||
if(InitPoint.Y() > Ymax)
|
||||
Ymax = InitPoint.Y();
|
||||
if(InitPoint.Z() < Zmin)
|
||||
Zmin = InitPoint.Z();
|
||||
if(InitPoint.Z() > Zmax)
|
||||
Zmax = InitPoint.Z();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 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());
|
||||
Handle(Poly_Triangulation) Tr = BRep_Tool::Triangulation(F, L);
|
||||
if(Tr.IsNull())
|
||||
MESSAGE("Error, null layer" )
|
||||
MESSAGE("Error, null layer" )
|
||||
const Poly_Array1OfTriangle& triangles = Tr->Triangles();
|
||||
Standard_Integer nbTriangles = Tr->NbTriangles();
|
||||
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
|
||||
|
||||
for (i=1;i<=nbTriangles;i++)
|
||||
{
|
||||
Determinant=0;
|
||||
//Gardons la meme orientation des noeuds
|
||||
if (F.Orientation() == TopAbs_REVERSED)
|
||||
triangles(i).Get(noeud[0], noeud[2], noeud[1]);
|
||||
else
|
||||
triangles(i).Get(noeud[0], noeud[1], noeud[2]);
|
||||
|
||||
{
|
||||
Determinant=0;
|
||||
//Gardons la meme orientation des noeuds
|
||||
if (F.Orientation() == TopAbs_REVERSED)
|
||||
triangles(i).Get(noeud[0], noeud[2], noeud[1]);
|
||||
else
|
||||
triangles(i).Get(noeud[0], noeud[1], noeud[2]);
|
||||
|
||||
P[0] = Nodes(noeud[0]).Transformed(L.Transformation());
|
||||
z[0] = P[0].Z();
|
||||
P[1] = Nodes(noeud[1]).Transformed(L.Transformation());
|
||||
z[1] = P[1].Z();
|
||||
z[0] = P[0].Z();
|
||||
P[1] = Nodes(noeud[1]).Transformed(L.Transformation());
|
||||
z[1] = P[1].Z();
|
||||
P[2] = Nodes(noeud[2]).Transformed(L.Transformation());
|
||||
z[2] = P[2].Z();
|
||||
|
||||
// Determination des cas aux limites pour les triangles
|
||||
Standard_Integer i,compteur=0;
|
||||
// Determination des cas aux limites pour les triangles
|
||||
Standard_Integer i,compteur=0;
|
||||
|
||||
for (i=0;i<=2;i++)
|
||||
{
|
||||
for (i=0;i<=2;i++)
|
||||
{
|
||||
flag[i]=Standard_False;
|
||||
if(z[i]>=Elevation)
|
||||
{
|
||||
flag[i]=Standard_True;
|
||||
compteur++;
|
||||
}
|
||||
}
|
||||
|
||||
switch(compteur)
|
||||
{
|
||||
case 0:
|
||||
Determinant = ElementaryVolume(P[0],P[1],P[2]);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
for (i=0;i<=2;i++)
|
||||
{
|
||||
if (flag[i]==Standard_True)
|
||||
{
|
||||
gp_Pnt Result1 = Intersection(P[i],P[(i+1)%3],Elevation);
|
||||
gp_Pnt Result2 = Intersection(P[i],P[(i+2)%3],Elevation);
|
||||
Determinant = ElementaryVolume(Result1,P[(i+1)%3],P[(i+2)%3])
|
||||
+ ElementaryVolume(Result1,P[(i+2)%3],Result2);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
for (i=0;i<=2;i++)
|
||||
{
|
||||
if (flag[i]==Standard_False)
|
||||
{
|
||||
gp_Pnt Result1 = Intersection(P[i],P[(i+1)%3],Elevation);
|
||||
gp_Pnt Result2 = Intersection(P[i],P[(i+2)%3],Elevation);
|
||||
Determinant = ElementaryVolume(P[i],Result1,Result2);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
break;
|
||||
}
|
||||
Volume += Determinant;
|
||||
}
|
||||
if(z[i]>=Elevation)
|
||||
{
|
||||
flag[i]=Standard_True;
|
||||
compteur++;
|
||||
}
|
||||
}
|
||||
|
||||
switch(compteur)
|
||||
{
|
||||
case 0:
|
||||
Determinant = ElementaryVolume(P[0],P[1],P[2]);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
for (i=0;i<=2;i++)
|
||||
{
|
||||
if (flag[i]==Standard_True)
|
||||
{
|
||||
gp_Pnt Result1 = Intersection(P[i],P[(i+1)%3],Elevation);
|
||||
gp_Pnt Result2 = Intersection(P[i],P[(i+2)%3],Elevation);
|
||||
Determinant = ElementaryVolume(Result1,P[(i+1)%3],P[(i+2)%3])
|
||||
+ ElementaryVolume(Result1,P[(i+2)%3],Result2);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
for (i=0;i<=2;i++)
|
||||
{
|
||||
if (flag[i]==Standard_False)
|
||||
{
|
||||
gp_Pnt Result1 = Intersection(P[i],P[(i+1)%3],Elevation);
|
||||
gp_Pnt Result2 = Intersection(P[i],P[(i+2)%3],Elevation);
|
||||
Determinant = ElementaryVolume(P[i],Result1,Result2);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
break;
|
||||
}
|
||||
Volume += Determinant;
|
||||
}
|
||||
}
|
||||
|
||||
return Volume;
|
||||
@ -258,30 +258,30 @@ Standard_Real VolumeSection::Archimede(Standard_Real Constante , Standard_Real E
|
||||
else
|
||||
{
|
||||
while((Bsup-Binf)>Epsilon)
|
||||
{
|
||||
if((tempBinfVolume-Constante)*(tempCVolume-Constante)>0 && Abs(tempCVolume-Constante)>Epsilon)
|
||||
{
|
||||
Binf = c;
|
||||
tempBinfVolume=tempCVolume;
|
||||
|
||||
c = ((Binf*(tempBsupVolume-Constante))-(Bsup*(tempBinfVolume-Constante)))
|
||||
/((tempBsupVolume-Constante)-(tempBinfVolume-Constante));
|
||||
{
|
||||
if((tempBinfVolume-Constante)*(tempCVolume-Constante)>0 && Abs(tempCVolume-Constante)>Epsilon)
|
||||
{
|
||||
Binf = c;
|
||||
tempBinfVolume=tempCVolume;
|
||||
|
||||
c = ((Binf*(tempBsupVolume-Constante))-(Bsup*(tempBinfVolume-Constante)))
|
||||
/((tempBsupVolume-Constante)-(tempBinfVolume-Constante));
|
||||
tempCVolume=CalculateVolume(c);
|
||||
}
|
||||
else if((tempBinfVolume-Constante)*(tempCVolume-Constante)<0 && Abs(tempCVolume-Constante)>Epsilon)
|
||||
{
|
||||
Bsup = c;
|
||||
tempBsupVolume =tempCVolume;
|
||||
}
|
||||
else if((tempBinfVolume-Constante)*(tempCVolume-Constante)<0 && Abs(tempCVolume-Constante)>Epsilon)
|
||||
{
|
||||
Bsup = c;
|
||||
tempBsupVolume =tempCVolume;
|
||||
|
||||
c = ((Binf*(tempBsupVolume-Constante))-(Bsup*(tempBinfVolume-Constante)))
|
||||
/((tempBsupVolume-Constante)-(tempBinfVolume-Constante));
|
||||
c = ((Binf*(tempBsupVolume-Constante))-(Bsup*(tempBinfVolume-Constante)))
|
||||
/((tempBsupVolume-Constante)-(tempBinfVolume-Constante));
|
||||
tempCVolume=CalculateVolume(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
goto endMethod;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
goto endMethod;
|
||||
}
|
||||
}
|
||||
goto endMethod;
|
||||
|
||||
}
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: BREPExport.cxx
|
||||
// Created: Wed May 19 13:10:05 2004
|
||||
// Author: Pavel TELKOV
|
||||
// <ptv@mutex.nnov.opencascade.com>
|
||||
// File: BREPExport.cxx
|
||||
// Created: Wed May 19 13:10:05 2004
|
||||
// Author: Pavel TELKOV
|
||||
// <ptv@mutex.nnov.opencascade.com>
|
||||
//
|
||||
#include "utilities.h"
|
||||
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: BREPImport.cxx
|
||||
// Created: Wed May 19 14:29:52 2004
|
||||
// Author: Pavel TELKOV
|
||||
// <ptv@mutex.nnov.opencascade.com>
|
||||
// File: BREPImport.cxx
|
||||
// Created: Wed May 19 14:29:52 2004
|
||||
// Author: Pavel TELKOV
|
||||
// <ptv@mutex.nnov.opencascade.com>
|
||||
//
|
||||
#include "utilities.h"
|
||||
|
||||
@ -63,7 +63,7 @@ BREPIMPORT_EXPORT
|
||||
TopoDS_Shape Import (const TCollection_AsciiString& theFileName,
|
||||
const TCollection_AsciiString& /*theFormatName*/,
|
||||
TCollection_AsciiString& theError,
|
||||
const TDF_Label&)
|
||||
const TDF_Label&)
|
||||
{
|
||||
MESSAGE("Import BREP from file " << theFileName);
|
||||
TopoDS_Shape aShape;
|
||||
|
@ -51,7 +51,7 @@
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
BasicGUI_ArcDlg::BasicGUI_ArcDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||
{
|
||||
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
||||
@ -198,7 +198,7 @@ void BasicGUI_ArcDlg::Init()
|
||||
connect( Group3Pnts3->LineEdit3, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
initName( tr( "GEOM_ARC" ) );
|
||||
|
||||
@ -284,15 +284,15 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
|
||||
int anIndex = aMap(1);
|
||||
aName += QString(":vertex_%1").arg(anIndex);
|
||||
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
||||
|
||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
}
|
||||
else
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
}
|
||||
else
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
else // Global Selection
|
||||
{
|
||||
@ -313,53 +313,53 @@ void BasicGUI_ArcDlg::SelectionIntoArgument()
|
||||
switch ( getConstructorId() ) {
|
||||
case 0:
|
||||
if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) {
|
||||
myPoint1 = aSelectedObject;
|
||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||
Group3Pnts->PushButton2->click();
|
||||
myPoint1 = aSelectedObject;
|
||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||
Group3Pnts->PushButton2->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) {
|
||||
myPoint2 = aSelectedObject;
|
||||
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
||||
Group3Pnts->PushButton3->click();
|
||||
myPoint2 = aSelectedObject;
|
||||
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
||||
Group3Pnts->PushButton3->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) {
|
||||
myPoint3 = aSelectedObject;
|
||||
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
||||
Group3Pnts->PushButton1->click();
|
||||
myPoint3 = aSelectedObject;
|
||||
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
||||
Group3Pnts->PushButton1->click();
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if ( myEditCurrentArgument == Group3Pnts2->LineEdit1 ) {
|
||||
myPoint1 = aSelectedObject;
|
||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||
Group3Pnts2->PushButton2->click();
|
||||
myPoint1 = aSelectedObject;
|
||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||
Group3Pnts2->PushButton2->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit2 ) {
|
||||
myPoint2 = aSelectedObject;
|
||||
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
||||
Group3Pnts2->PushButton3->click();
|
||||
myPoint2 = aSelectedObject;
|
||||
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
||||
Group3Pnts2->PushButton3->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group3Pnts2->LineEdit3 ) {
|
||||
myPoint3 = aSelectedObject;
|
||||
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
||||
Group3Pnts2->PushButton1->click();
|
||||
myPoint3 = aSelectedObject;
|
||||
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
||||
Group3Pnts2->PushButton1->click();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if ( myEditCurrentArgument == Group3Pnts3->LineEdit1 ) {
|
||||
myPoint1 = aSelectedObject;
|
||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||
Group3Pnts3->PushButton2->click();
|
||||
myPoint1 = aSelectedObject;
|
||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||
Group3Pnts3->PushButton2->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group3Pnts3->LineEdit2 ) {
|
||||
myPoint2 = aSelectedObject;
|
||||
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
||||
Group3Pnts3->PushButton3->click();
|
||||
myPoint2 = aSelectedObject;
|
||||
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
||||
Group3Pnts3->PushButton3->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group3Pnts3->LineEdit3 ) {
|
||||
myPoint3 = aSelectedObject;
|
||||
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
||||
Group3Pnts3->PushButton1->click();
|
||||
myPoint3 = aSelectedObject;
|
||||
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
||||
Group3Pnts3->PushButton1->click();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -491,9 +491,9 @@ void BasicGUI_ArcDlg::ActivateThisDialog()
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
|
||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ),
|
||||
this,
|
||||
SLOT(SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ),
|
||||
this,
|
||||
SLOT(SelectionIntoArgument() ) );
|
||||
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
}
|
||||
@ -536,25 +536,25 @@ bool BasicGUI_ArcDlg::isValid( QString& msg )
|
||||
case 0:
|
||||
{
|
||||
if (Group3Pnts->LineEdit1->text().trimmed().isEmpty() ||
|
||||
Group3Pnts->LineEdit2->text().trimmed().isEmpty() ||
|
||||
Group3Pnts->LineEdit3->text().trimmed().isEmpty())
|
||||
return false;
|
||||
Group3Pnts->LineEdit2->text().trimmed().isEmpty() ||
|
||||
Group3Pnts->LineEdit3->text().trimmed().isEmpty())
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
if (Group3Pnts2->LineEdit1->text().trimmed().isEmpty() ||
|
||||
Group3Pnts2->LineEdit2->text().trimmed().isEmpty() ||
|
||||
Group3Pnts2->LineEdit3->text().trimmed().isEmpty())
|
||||
return false;
|
||||
Group3Pnts2->LineEdit2->text().trimmed().isEmpty() ||
|
||||
Group3Pnts2->LineEdit3->text().trimmed().isEmpty())
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
if (Group3Pnts3->LineEdit1->text().trimmed().isEmpty() ||
|
||||
Group3Pnts3->LineEdit2->text().trimmed().isEmpty() ||
|
||||
Group3Pnts3->LineEdit3->text().trimmed().isEmpty())
|
||||
return false;
|
||||
Group3Pnts3->LineEdit2->text().trimmed().isEmpty() ||
|
||||
Group3Pnts3->LineEdit3->text().trimmed().isEmpty())
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -577,8 +577,8 @@ bool BasicGUI_ArcDlg::execute( ObjectList& objects )
|
||||
case 0:
|
||||
{
|
||||
if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) {
|
||||
anObj = anOper->MakeArc( myPoint1, myPoint2, myPoint3 );
|
||||
res = true;
|
||||
anObj = anOper->MakeArc( myPoint1, myPoint2, myPoint3 );
|
||||
res = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -586,16 +586,16 @@ bool BasicGUI_ArcDlg::execute( ObjectList& objects )
|
||||
{
|
||||
bool Sense = Group3Pnts2->CheckButton1->isChecked();
|
||||
if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) {
|
||||
anObj = anOper->MakeArcCenter( myPoint1, myPoint2, myPoint3, Sense );
|
||||
res = true;
|
||||
anObj = anOper->MakeArcCenter( myPoint1, myPoint2, myPoint3, Sense );
|
||||
res = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) {
|
||||
anObj = anOper->MakeArcOfEllipse( myPoint1, myPoint2, myPoint3 );
|
||||
res = true;
|
||||
anObj = anOper->MakeArcOfEllipse( myPoint1, myPoint2, myPoint3 );
|
||||
res = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -689,7 +689,7 @@ void BasicGUI_ArcDlg::ConstructorsClicked( int constructorId )
|
||||
|
||||
myEditCurrentArgument->setFocus();
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
if ( CORBA::is_nil( myPoint1 ) )
|
||||
SelectionIntoArgument();
|
||||
|
@ -50,7 +50,7 @@
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
BasicGUI_CircleDlg::BasicGUI_CircleDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||
{
|
||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CIRCLE_PV" ) ) );
|
||||
@ -250,7 +250,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
|
||||
case 2:
|
||||
{
|
||||
GroupPntVecR->hide();
|
||||
Group3Pnts->hide();
|
||||
Group3Pnts->hide();
|
||||
GroupCenter2Pnts->show();
|
||||
|
||||
myEditCurrentArgument = GroupCenter2Pnts->LineEdit1;
|
||||
@ -276,7 +276,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
|
||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
||||
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
displayPreview();
|
||||
}
|
||||
@ -353,16 +353,16 @@ void BasicGUI_CircleDlg::SelectionIntoArgument()
|
||||
else
|
||||
aName += QString( ":vertex_%1" ).arg( anIndex );
|
||||
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
|
||||
|
||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
}
|
||||
else {
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
}
|
||||
else {
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
}
|
||||
else { // Global Selection
|
||||
if ( aShape.ShapeType() != aNeedType ) {
|
||||
@ -382,42 +382,42 @@ void BasicGUI_CircleDlg::SelectionIntoArgument()
|
||||
if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) {
|
||||
myPoint = aSelectedObject;
|
||||
if ( !myPoint->_is_nil() && myDir->_is_nil() )
|
||||
GroupPntVecR->PushButton2->click();
|
||||
GroupPntVecR->PushButton2->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) {
|
||||
myDir = aSelectedObject;
|
||||
if ( !myDir->_is_nil() && myPoint->_is_nil() )
|
||||
GroupPntVecR->PushButton1->click();
|
||||
GroupPntVecR->PushButton1->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) {
|
||||
myPoint1 = aSelectedObject;
|
||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||
Group3Pnts->PushButton2->click();
|
||||
Group3Pnts->PushButton2->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) {
|
||||
myPoint2 = aSelectedObject;
|
||||
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
||||
Group3Pnts->PushButton3->click();
|
||||
Group3Pnts->PushButton3->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) {
|
||||
myPoint3 = aSelectedObject;
|
||||
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
||||
Group3Pnts->PushButton1->click();
|
||||
Group3Pnts->PushButton1->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) {
|
||||
myPoint4 = aSelectedObject;
|
||||
if ( !myPoint4->_is_nil() && myPoint5->_is_nil() )
|
||||
GroupCenter2Pnts->PushButton2->click();
|
||||
GroupCenter2Pnts->PushButton2->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) {
|
||||
myPoint5 = aSelectedObject;
|
||||
if ( !myPoint5->_is_nil() && myPoint6->_is_nil() )
|
||||
GroupCenter2Pnts->PushButton3->click();
|
||||
GroupCenter2Pnts->PushButton3->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) {
|
||||
myPoint6 = aSelectedObject;
|
||||
if ( !myPoint6->_is_nil() && myPoint4->_is_nil() )
|
||||
GroupCenter2Pnts->PushButton1->click();
|
||||
GroupCenter2Pnts->PushButton1->click();
|
||||
}
|
||||
}
|
||||
|
||||
@ -543,7 +543,7 @@ void BasicGUI_CircleDlg::ActivateThisDialog()
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
}
|
||||
|
@ -52,7 +52,7 @@
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
BasicGUI_EllipseDlg::BasicGUI_EllipseDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||
{
|
||||
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->getApp()->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
initName( tr( "GEOM_ELLIPSE" ) );
|
||||
|
||||
@ -256,16 +256,16 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument()
|
||||
else
|
||||
aName += QString(":vertex_%1").arg(anIndex);
|
||||
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
||||
//Find SubShape Object in Father
|
||||
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());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
}
|
||||
else {
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
}
|
||||
else {
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
}
|
||||
else { // Global Selection
|
||||
if (aShape.ShapeType() != aNeedType) {
|
||||
@ -285,17 +285,17 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument()
|
||||
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
|
||||
myPoint = aSelectedObject;
|
||||
if ( !myPoint->_is_nil() && myDir->_is_nil() )
|
||||
GroupPoints->PushButton2->click();
|
||||
GroupPoints->PushButton2->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
|
||||
myDir = aSelectedObject;
|
||||
if ( !myDir->_is_nil() && myMajor->_is_nil() )
|
||||
GroupPoints->PushButton3->click();
|
||||
GroupPoints->PushButton3->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit3 ) {
|
||||
myMajor = aSelectedObject;
|
||||
if ( !myMajor->_is_nil() && myPoint->_is_nil() )
|
||||
GroupPoints->PushButton1->click();
|
||||
GroupPoints->PushButton1->click();
|
||||
}
|
||||
}
|
||||
|
||||
@ -372,7 +372,7 @@ void BasicGUI_EllipseDlg::ActivateThisDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
GroupPoints->LineEdit1->setFocus();
|
||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||
|
@ -50,7 +50,7 @@
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
BasicGUI_LineDlg::BasicGUI_LineDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||
{
|
||||
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_LINE_2P" ) ) );
|
||||
@ -124,7 +124,7 @@ void BasicGUI_LineDlg::Init()
|
||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
||||
GroupPoints->PushButton1->setDown(true);
|
||||
|
||||
|
||||
|
||||
/* signals and slots connections */
|
||||
connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) );
|
||||
connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
|
||||
@ -145,7 +145,7 @@ void BasicGUI_LineDlg::Init()
|
||||
connect( GroupFaces->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
initName( tr( "GEOM_LINE" ) );
|
||||
|
||||
@ -258,7 +258,7 @@ void BasicGUI_LineDlg::SelectionIntoArgument()
|
||||
QString aName = GEOMBase::GetName( aSelectedObject );
|
||||
TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX;
|
||||
if ( myEditCurrentArgument == GroupFaces->LineEdit1 ||
|
||||
myEditCurrentArgument == GroupFaces->LineEdit2 )
|
||||
myEditCurrentArgument == GroupFaces->LineEdit2 )
|
||||
aNeedType = TopAbs_FACE;
|
||||
|
||||
TopoDS_Shape aShape;
|
||||
@ -266,22 +266,22 @@ void BasicGUI_LineDlg::SelectionIntoArgument()
|
||||
TColStd_IndexedMapOfInteger aMap;
|
||||
aSelMgr->GetIndexes(aSelList.First(), aMap);
|
||||
if ( aMap.Extent() == 1 ) { // Local Selection
|
||||
int anIndex = aMap( 1 );
|
||||
int anIndex = aMap( 1 );
|
||||
if ( aNeedType == TopAbs_FACE )
|
||||
aName += QString( ":face_%1" ).arg( anIndex );
|
||||
else
|
||||
aName += QString( ":vertex_%1" ).arg( anIndex );
|
||||
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
|
||||
|
||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
}
|
||||
else {
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
}
|
||||
else {
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
}
|
||||
else { // Global Selection
|
||||
if ( aShape.ShapeType() != aNeedType ) {
|
||||
@ -301,22 +301,22 @@ void BasicGUI_LineDlg::SelectionIntoArgument()
|
||||
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
|
||||
myPoint1 = aSelectedObject;
|
||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||
GroupPoints->PushButton2->click();
|
||||
GroupPoints->PushButton2->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
|
||||
myPoint2 = aSelectedObject;
|
||||
if ( !myPoint2->_is_nil() && myPoint1->_is_nil() )
|
||||
GroupPoints->PushButton1->click();
|
||||
GroupPoints->PushButton1->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupFaces->LineEdit1 ) {
|
||||
myFace1 = aSelectedObject;
|
||||
if ( !myFace1->_is_nil() && myFace2->_is_nil() )
|
||||
GroupFaces->PushButton2->click();
|
||||
GroupFaces->PushButton2->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupFaces->LineEdit2 ) {
|
||||
myFace2 = aSelectedObject;
|
||||
if ( !myFace2->_is_nil() && myFace1->_is_nil() )
|
||||
GroupFaces->PushButton1->click();
|
||||
GroupFaces->PushButton1->click();
|
||||
}
|
||||
}
|
||||
|
||||
@ -393,7 +393,7 @@ void BasicGUI_LineDlg::ActivateThisDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
}
|
||||
|
@ -57,7 +57,7 @@
|
||||
//=================================================================================
|
||||
BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* theParent )
|
||||
: 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 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( myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) );
|
||||
|
||||
initName( tr( "LCS_NAME" ) );
|
||||
|
||||
@ -304,7 +304,7 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId )
|
||||
resize( minimumSizeHint() );
|
||||
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( onSelectionDone() ) );
|
||||
this, SLOT( onSelectionDone() ) );
|
||||
onSelectionDone();
|
||||
}
|
||||
|
||||
@ -355,37 +355,37 @@ void BasicGUI_MarkerDlg::onSelectionDone0()
|
||||
if ( aSelectedObj->GetType() == GEOM_MARKER && aShape.ShapeType() == TopAbs_FACE ) {
|
||||
TopoDS_Face aFace = TopoDS::Face( aShape );
|
||||
Handle(Geom_Plane) aPlane = Handle(Geom_Plane)::DownCast( BRep_Tool::Surface( aFace ) );
|
||||
|
||||
|
||||
if ( !aPlane.IsNull() ) {
|
||||
gp_Ax3 anAx3 = aPlane->Pln().Position();
|
||||
gp_Pnt aLoc = anAx3.Location();
|
||||
gp_Dir aXDir = anAx3.XDirection();
|
||||
gp_Dir aYDir = anAx3.YDirection();
|
||||
|
||||
|
||||
myData[ X ]->setValue( aLoc.X() );
|
||||
myData[ Y ]->setValue( aLoc.Y() );
|
||||
myData[ Z ]->setValue( aLoc.Z() );
|
||||
|
||||
|
||||
myData[ DX1 ]->setValue( aXDir.X() );
|
||||
myData[ DY1 ]->setValue( aXDir.Y() );
|
||||
myData[ DZ1 ]->setValue( aXDir.Z() );
|
||||
|
||||
|
||||
myData[ DX2 ]->setValue( aYDir.X() );
|
||||
myData[ DY2 ]->setValue( aYDir.Y() );
|
||||
myData[ DZ2 ]->setValue( aYDir.Z() );
|
||||
aSelMgr->clearSelected();
|
||||
aSelMgr->clearSelected();
|
||||
}
|
||||
}
|
||||
else {
|
||||
TColStd_IndexedMapOfInteger aMap;
|
||||
aSelMgr->GetIndexes( anIO, aMap );
|
||||
if ( aMap.Extent() == 1 ) { // Local Selection
|
||||
int anIndex = aMap( 1 );
|
||||
TopTools_IndexedMapOfShape aShapes;
|
||||
TopExp::MapShapes( aShape, aShapes );
|
||||
aShape = aShapes.FindKey( anIndex );
|
||||
aSelMgr->clearSelected(); // ???
|
||||
}
|
||||
TColStd_IndexedMapOfInteger aMap;
|
||||
aSelMgr->GetIndexes( anIO, aMap );
|
||||
if ( aMap.Extent() == 1 ) { // Local Selection
|
||||
int anIndex = aMap( 1 );
|
||||
TopTools_IndexedMapOfShape aShapes;
|
||||
TopExp::MapShapes( aShape, aShapes );
|
||||
aShape = aShapes.FindKey( anIndex );
|
||||
aSelMgr->clearSelected(); // ???
|
||||
}
|
||||
|
||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) {
|
||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||
@ -432,11 +432,11 @@ void BasicGUI_MarkerDlg::onSelectionDone()
|
||||
CORBA::Double Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz, Yx, Yy, Yz;
|
||||
Ox = Oy = Oz = Zx = Zy = Xy = Xz = Yx = Yz = 0;
|
||||
Zz = Xx = Yy = 1.;
|
||||
|
||||
|
||||
GEOM::GEOM_IMeasureOperations_ptr aMeasureOp =
|
||||
myGeomGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() );
|
||||
aMeasureOp->GetPosition( aSelectedObj, Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz );
|
||||
|
||||
|
||||
// Calculate Y direction
|
||||
if ( aMeasureOp->IsDone() ) {
|
||||
gp_Pnt aPnt ( Ox, Oy, Oz );
|
||||
@ -469,7 +469,7 @@ void BasicGUI_MarkerDlg::onSelectionDone()
|
||||
TopAbs_ShapeEnum aNeedType = TopAbs_EDGE;
|
||||
if ( myEditCurrentArgument == Group2->LineEdit1 )
|
||||
aNeedType = TopAbs_VERTEX;
|
||||
|
||||
|
||||
TColStd_IndexedMapOfInteger aMap;
|
||||
aSelMgr->GetIndexes( anIO, aMap );
|
||||
|
||||
@ -486,60 +486,60 @@ void BasicGUI_MarkerDlg::onSelectionDone()
|
||||
}
|
||||
|
||||
if ( myEditCurrentArgument == Group2->LineEdit1 ) {
|
||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) {
|
||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||
myData[ X ]->setValue( aPnt.X() );
|
||||
myData[ Y ]->setValue( aPnt.Y() );
|
||||
myData[ Z ]->setValue( aPnt.Z() );
|
||||
myEditCurrentArgument->setText( aName );
|
||||
if (Group2->LineEdit2->text() == "")
|
||||
Group2->PushButton2->click();
|
||||
}
|
||||
else {
|
||||
myData[ X ]->setValue( 0 );
|
||||
myData[ Y ]->setValue( 0 );
|
||||
myData[ Z ]->setValue( 0 );
|
||||
}
|
||||
}
|
||||
else if (myEditCurrentArgument == Group2->LineEdit2) {
|
||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) {
|
||||
gp_Pnt aP1 = BRep_Tool::Pnt( TopExp::FirstVertex( TopoDS::Edge( aShape ) ) );
|
||||
gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) );
|
||||
gp_Dir aDir( gp_Vec( aP1, aP2 ) );
|
||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) {
|
||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||
myData[ X ]->setValue( aPnt.X() );
|
||||
myData[ Y ]->setValue( aPnt.Y() );
|
||||
myData[ Z ]->setValue( aPnt.Z() );
|
||||
myEditCurrentArgument->setText( aName );
|
||||
if (Group2->LineEdit2->text() == "")
|
||||
Group2->PushButton2->click();
|
||||
}
|
||||
else {
|
||||
myData[ X ]->setValue( 0 );
|
||||
myData[ Y ]->setValue( 0 );
|
||||
myData[ Z ]->setValue( 0 );
|
||||
}
|
||||
}
|
||||
else if (myEditCurrentArgument == Group2->LineEdit2) {
|
||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) {
|
||||
gp_Pnt aP1 = BRep_Tool::Pnt( TopExp::FirstVertex( TopoDS::Edge( aShape ) ) );
|
||||
gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) );
|
||||
gp_Dir aDir( gp_Vec( aP1, aP2 ) );
|
||||
|
||||
myData[ DX1 ]->setValue( aDir.X() );
|
||||
myData[ DY1 ]->setValue( aDir.Y() );
|
||||
myData[ DZ1 ]->setValue( aDir.Z() );
|
||||
myEditCurrentArgument->setText( aName );
|
||||
if (Group2->LineEdit3->text() == "")
|
||||
Group2->PushButton3->click();
|
||||
}
|
||||
else {
|
||||
myData[ DX1 ]->setValue( 0 );
|
||||
myData[ DY1 ]->setValue( 0 );
|
||||
myData[ DZ1 ]->setValue( 0 );
|
||||
}
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
|
||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) {
|
||||
gp_Pnt aP1 = BRep_Tool::Pnt( TopExp::FirstVertex( TopoDS::Edge( aShape ) ) );
|
||||
gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) );
|
||||
gp_Dir aDir(gp_Vec( aP1, aP2 ));
|
||||
myData[ DX1 ]->setValue( aDir.X() );
|
||||
myData[ DY1 ]->setValue( aDir.Y() );
|
||||
myData[ DZ1 ]->setValue( aDir.Z() );
|
||||
myEditCurrentArgument->setText( aName );
|
||||
if (Group2->LineEdit3->text() == "")
|
||||
Group2->PushButton3->click();
|
||||
}
|
||||
else {
|
||||
myData[ DX1 ]->setValue( 0 );
|
||||
myData[ DY1 ]->setValue( 0 );
|
||||
myData[ DZ1 ]->setValue( 0 );
|
||||
}
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
|
||||
if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) {
|
||||
gp_Pnt aP1 = BRep_Tool::Pnt( TopExp::FirstVertex( TopoDS::Edge( aShape ) ) );
|
||||
gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) );
|
||||
gp_Dir aDir(gp_Vec( aP1, aP2 ));
|
||||
|
||||
myData[ DX2 ]->setValue( aDir.X() );
|
||||
myData[ DY2 ]->setValue( aDir.Y() );
|
||||
myData[ DZ2 ]->setValue( aDir.Z() );
|
||||
myEditCurrentArgument->setText( aName );
|
||||
if (Group2->LineEdit1->text() == "")
|
||||
Group2->PushButton1->click();
|
||||
}
|
||||
else {
|
||||
myData[ DX2 ]->setValue( 0 );
|
||||
myData[ DY2 ]->setValue( 0 );
|
||||
myData[ DZ2 ]->setValue( 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
myData[ DX2 ]->setValue( aDir.X() );
|
||||
myData[ DY2 ]->setValue( aDir.Y() );
|
||||
myData[ DZ2 ]->setValue( aDir.Z() );
|
||||
myEditCurrentArgument->setText( aName );
|
||||
if (Group2->LineEdit1->text() == "")
|
||||
Group2->PushButton1->click();
|
||||
}
|
||||
else {
|
||||
myData[ DX2 ]->setValue( 0 );
|
||||
myData[ DY2 ]->setValue( 0 );
|
||||
myData[ DZ2 ]->setValue( 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -559,19 +559,19 @@ void BasicGUI_MarkerDlg::onSelectionDone()
|
||||
}
|
||||
else if ( getConstructorId() == 2 ) {
|
||||
if ( myEditCurrentArgument == Group2->LineEdit1 ) {
|
||||
myData[ X ]->setValue( 0 );
|
||||
myData[ Y ]->setValue( 0 );
|
||||
myData[ Z ]->setValue( 0 );
|
||||
myData[ X ]->setValue( 0 );
|
||||
myData[ Y ]->setValue( 0 );
|
||||
myData[ Z ]->setValue( 0 );
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group2->LineEdit2 ) {
|
||||
myData[ DX1 ]->setValue( 0 );
|
||||
myData[ DY1 ]->setValue( 0 );
|
||||
myData[ DZ1 ]->setValue( 0 );
|
||||
myData[ DX1 ]->setValue( 0 );
|
||||
myData[ DY1 ]->setValue( 0 );
|
||||
myData[ DZ1 ]->setValue( 0 );
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
|
||||
myData[ DX2 ]->setValue( 0 );
|
||||
myData[ DY2 ]->setValue( 0 );
|
||||
myData[ DZ2 ]->setValue( 0 );
|
||||
myData[ DX2 ]->setValue( 0 );
|
||||
myData[ DY2 ]->setValue( 0 );
|
||||
myData[ DZ2 ]->setValue( 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -645,7 +645,7 @@ void BasicGUI_MarkerDlg::onActivate()
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( onSelectionDone() ) );
|
||||
this, SLOT( onSelectionDone() ) );
|
||||
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
}
|
||||
@ -722,14 +722,14 @@ bool BasicGUI_MarkerDlg::execute( ObjectList& objects )
|
||||
{
|
||||
GEOM::GEOM_IBasicOperations_var anOper = GEOM::GEOM_IBasicOperations::_narrow( getOperation() );
|
||||
GEOM::GEOM_Object_var anObj = anOper->MakeMarker( myData[ X ]->value(),
|
||||
myData[ Y ]->value(),
|
||||
myData[ Z ]->value(),
|
||||
myData[ DX1 ]->value(),
|
||||
myData[ DY1 ]->value(),
|
||||
myData[ DZ1 ]->value(),
|
||||
myData[ DX2 ]->value(),
|
||||
myData[ DY2 ]->value(),
|
||||
myData[ DZ2 ]->value() );
|
||||
myData[ Y ]->value(),
|
||||
myData[ Z ]->value(),
|
||||
myData[ DX1 ]->value(),
|
||||
myData[ DY1 ]->value(),
|
||||
myData[ DZ1 ]->value(),
|
||||
myData[ DX2 ]->value(),
|
||||
myData[ DY2 ]->value(),
|
||||
myData[ DZ2 ]->value() );
|
||||
QStringList aParameters;
|
||||
aParameters<<myData[X]->text();
|
||||
aParameters<<myData[Y]->text();
|
||||
|
@ -53,7 +53,7 @@
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
BasicGUI_PlaneDlg::BasicGUI_PlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||
{
|
||||
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();
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
@ -465,16 +465,16 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument()
|
||||
else
|
||||
aName += QString( ":vertex_%1" ).arg( anIndex );
|
||||
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName );
|
||||
|
||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
}
|
||||
else {
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||
aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
}
|
||||
else {
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
}
|
||||
else { // Global Selection
|
||||
if ( aShape.ShapeType() != aNeedType ) {
|
||||
@ -489,50 +489,50 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument()
|
||||
/* if (!aSelectedObject->_is_nil()) { // clear selection if something selected
|
||||
globalSelection();
|
||||
if ( myEditCurrentArgument == GroupFace->LineEdit1 ) {
|
||||
TColStd_MapOfInteger aMap;
|
||||
aMap.Add( GEOM_PLANE );
|
||||
aMap.Add( GEOM_MARKER );
|
||||
globalSelection( aMap );
|
||||
TColStd_MapOfInteger aMap;
|
||||
aMap.Add( GEOM_PLANE );
|
||||
aMap.Add( GEOM_MARKER );
|
||||
globalSelection( aMap );
|
||||
}
|
||||
else
|
||||
localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
|
||||
}*/
|
||||
localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
|
||||
}*/
|
||||
|
||||
if ( myEditCurrentArgument == GroupPntDir->LineEdit1 ) {
|
||||
myPoint = aSelectedObject;
|
||||
if ( !myPoint->_is_nil() && myDir->_is_nil() )
|
||||
GroupPntDir->PushButton2->click();
|
||||
GroupPntDir->PushButton2->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupPntDir->LineEdit2 ) {
|
||||
myDir = aSelectedObject;
|
||||
if ( !myDir->_is_nil() && myPoint->_is_nil() )
|
||||
GroupPntDir->PushButton1->click();
|
||||
GroupPntDir->PushButton1->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) {
|
||||
myPoint1 = aSelectedObject;
|
||||
if ( !myPoint1->_is_nil() && myPoint2->_is_nil() )
|
||||
Group3Pnts->PushButton2->click();
|
||||
Group3Pnts->PushButton2->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) {
|
||||
myPoint2 = aSelectedObject;
|
||||
if ( !myPoint2->_is_nil() && myPoint3->_is_nil() )
|
||||
Group3Pnts->PushButton3->click();
|
||||
Group3Pnts->PushButton3->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) {
|
||||
myPoint3 = aSelectedObject;
|
||||
if ( !myPoint3->_is_nil() && myPoint1->_is_nil() )
|
||||
Group3Pnts->PushButton1->click();
|
||||
Group3Pnts->PushButton1->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupFace->LineEdit1 )
|
||||
myFace = aSelectedObject;
|
||||
else if ( myEditCurrentArgument == Group2Vec->LineEdit1 ) {
|
||||
myVec1 = aSelectedObject;
|
||||
if ( !myVec1->_is_nil() && myVec2->_is_nil() )
|
||||
Group2Vec->PushButton2->click();
|
||||
Group2Vec->PushButton2->click();
|
||||
} else if ( myEditCurrentArgument == Group2Vec->LineEdit2 ) {
|
||||
myVec2 = aSelectedObject;
|
||||
if ( !myVec2->_is_nil() && myVec1->_is_nil() )
|
||||
Group2Vec->PushButton1->click();
|
||||
Group2Vec->PushButton1->click();
|
||||
} else if ( myEditCurrentArgument == GroupLCS->LineEdit1 )
|
||||
myLCS = aSelectedObject;
|
||||
|
||||
@ -660,7 +660,7 @@ void BasicGUI_PlaneDlg::ActivateThisDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
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 )
|
||||
{
|
||||
return thePnt1->_is_equivalent( thePnt2 );
|
||||
return thePnt1->_is_equivalent( thePnt2 );
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -70,7 +70,7 @@
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
BasicGUI_PointDlg::BasicGUI_PointDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||
{
|
||||
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->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ),
|
||||
this, SLOT(SelectionIntoArgument() ) );
|
||||
this, SLOT(SelectionIntoArgument() ) );
|
||||
|
||||
|
||||
initName( tr( "GEOM_VERTEX" ) );
|
||||
@ -496,18 +496,18 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
|
||||
else
|
||||
aName += QString( ":vertex_%1" ).arg( anIndex );
|
||||
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
||||
|
||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
||||
|
||||
if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
||||
getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
}
|
||||
else {
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE );
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
}
|
||||
else {
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE );
|
||||
}
|
||||
else { // Global Selection
|
||||
if ( aShape.ShapeType() != aNeedType ) {
|
||||
@ -519,7 +519,7 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
|
||||
}
|
||||
|
||||
if ( aShape.IsNull() || aShape.ShapeType() != aNeedType)
|
||||
return;
|
||||
return;
|
||||
|
||||
if ( id == GEOM_POINT_XYZ ) {
|
||||
gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
|
||||
@ -536,24 +536,24 @@ void BasicGUI_PointDlg::SelectionIntoArgument()
|
||||
GroupOnCurve->LineEdit1->setText( aName );
|
||||
}
|
||||
else if ( id == GEOM_POINT_INTINT ) {
|
||||
myEditCurrentArgument->setText( aName );
|
||||
globalSelection();
|
||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
|
||||
myEditCurrentArgument->setText( aName );
|
||||
globalSelection();
|
||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
|
||||
if ( myEditCurrentArgument == GroupLineIntersection->LineEdit1 ) {
|
||||
myLine1 = aSelectedObject;
|
||||
if ( !myLine1->_is_nil() && myLine2->_is_nil() )
|
||||
GroupLineIntersection->PushButton2->click();
|
||||
if ( !myLine1->_is_nil() && myLine2->_is_nil() )
|
||||
GroupLineIntersection->PushButton2->click();
|
||||
}
|
||||
else if ( myEditCurrentArgument == GroupLineIntersection->LineEdit2 ) {
|
||||
myLine2 = aSelectedObject;
|
||||
if ( !myLine2->_is_nil() && myLine1->_is_nil() )
|
||||
GroupLineIntersection->PushButton1->click();
|
||||
if ( !myLine2->_is_nil() && myLine1->_is_nil() )
|
||||
GroupLineIntersection->PushButton1->click();
|
||||
}
|
||||
}
|
||||
else if ( id == GEOM_POINT_SURF )
|
||||
{
|
||||
myFace = aSelectedObject;
|
||||
GroupOnSurface->LineEdit1->setText( aName );
|
||||
myFace = aSelectedObject;
|
||||
GroupOnSurface->LineEdit1->setText( aName );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -648,7 +648,7 @@ void BasicGUI_PointDlg::ActivateThisDialog( )
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
}
|
||||
@ -869,9 +869,9 @@ bool BasicGUI_PointDlg::execute( ObjectList& objects )
|
||||
|
||||
const int id = getConstructorId();
|
||||
if(!anObj->_is_nil() && !IsPreview() && (id == GEOM_POINT_XYZ ||
|
||||
id == GEOM_POINT_REF ||
|
||||
id == GEOM_POINT_EDGE ||
|
||||
id == GEOM_POINT_SURF) ) {
|
||||
id == GEOM_POINT_REF ||
|
||||
id == GEOM_POINT_EDGE ||
|
||||
id == GEOM_POINT_SURF) ) {
|
||||
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
BasicGUI_VectorDlg::BasicGUI_VectorDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||
{
|
||||
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( myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
initName( tr("GEOM_VECTOR") );
|
||||
|
||||
@ -208,7 +208,7 @@ void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId )
|
||||
globalSelection(); // close local contexts, if any
|
||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
@ -297,16 +297,16 @@ void BasicGUI_VectorDlg::SelectionIntoArgument()
|
||||
int anIndex = aMap(1);
|
||||
aName += QString(":vertex_%1").arg(anIndex);
|
||||
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
||||
|
||||
if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
}
|
||||
else {
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
//Find SubShape Object in Father
|
||||
GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName);
|
||||
|
||||
if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
}
|
||||
else {
|
||||
aSelectedObject = aFindedObject; // get Object from study
|
||||
}
|
||||
}
|
||||
else { // Global Selection
|
||||
if (aShape.ShapeType() != TopAbs_VERTEX) {
|
||||
@ -326,12 +326,12 @@ void BasicGUI_VectorDlg::SelectionIntoArgument()
|
||||
if (myEditCurrentArgument == GroupPoints->LineEdit1) {
|
||||
myPoint1 = aSelectedObject;
|
||||
if (!myPoint1->_is_nil() && myPoint2->_is_nil())
|
||||
GroupPoints->PushButton2->click();
|
||||
GroupPoints->PushButton2->click();
|
||||
}
|
||||
else if (myEditCurrentArgument == GroupPoints->LineEdit2) {
|
||||
myPoint2 = aSelectedObject;
|
||||
if (!myPoint2->_is_nil() && myPoint1->_is_nil())
|
||||
GroupPoints->PushButton1->click();
|
||||
GroupPoints->PushButton1->click();
|
||||
}
|
||||
}
|
||||
|
||||
@ -389,7 +389,7 @@ void BasicGUI_VectorDlg::ActivateThisDialog()
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
BasicGUI_WorkingPlaneDlg::BasicGUI_WorkingPlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||
{
|
||||
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( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
initName( tr( "GEOM_WPLANE" ) );
|
||||
|
||||
@ -322,7 +322,7 @@ void BasicGUI_WorkingPlaneDlg::SelectionIntoArgument()
|
||||
if ( myEditCurrentArgument == Group1->LineEdit1 )
|
||||
myFace = aSelectedObject;
|
||||
else if ( myEditCurrentArgument == Group2->LineEdit1 ||
|
||||
myEditCurrentArgument == Group2->LineEdit2 ) {
|
||||
myEditCurrentArgument == Group2->LineEdit2 ) {
|
||||
if ( aRes && !aSelectedObject->_is_nil() ) {
|
||||
TopoDS_Shape aShape;
|
||||
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
|
||||
@ -332,18 +332,18 @@ void BasicGUI_WorkingPlaneDlg::SelectionIntoArgument()
|
||||
int anIndex = aMap( 1 );
|
||||
aName = aName + ":edge_" + QString::number( anIndex );
|
||||
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
||||
getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||
if ( myEditCurrentArgument == Group2->LineEdit1 )
|
||||
myVectX = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
else
|
||||
myVectZ = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
||||
getGeomEngine()->GetIShapesOperations( getStudyId() );
|
||||
if ( myEditCurrentArgument == Group2->LineEdit1 )
|
||||
myVectX = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
else
|
||||
myVectZ = aShapesOp->GetSubShape( aSelectedObject, anIndex );
|
||||
}
|
||||
else {
|
||||
if ( aShape.ShapeType() != TopAbs_EDGE ) {
|
||||
aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||
aName = "";
|
||||
}
|
||||
if ( aShape.ShapeType() != TopAbs_EDGE ) {
|
||||
aSelectedObject = GEOM::GEOM_Object::_nil();
|
||||
aName = "";
|
||||
}
|
||||
}
|
||||
aSelMgr->clearSelected();
|
||||
}
|
||||
@ -437,7 +437,7 @@ void BasicGUI_WorkingPlaneDlg::ActivateThisDialog( )
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication( ) ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
ConstructorsClicked( getConstructorId() );
|
||||
}
|
||||
@ -476,7 +476,7 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
||||
if ( id == 0 ) { // by planar face selection
|
||||
if ( CORBA::is_nil( myFace ) ) {
|
||||
if ( !showPreview )
|
||||
showError( "Face has to be selected" );
|
||||
showError( "Face has to be selected" );
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -498,14 +498,14 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
||||
}
|
||||
else {
|
||||
if ( !showPreview )
|
||||
showError( "Wrong shape selected (has to be a planar face)" );
|
||||
showError( "Wrong shape selected (has to be a planar face)" );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ( id == 1 ) { // by two vectors (Ox & Oz)
|
||||
if ( CORBA::is_nil( myVectX ) || CORBA::is_nil( myVectZ ) ) {
|
||||
if ( !showPreview )
|
||||
showError( "Two vectors have to be selected" );
|
||||
showError( "Two vectors have to be selected" );
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -514,9 +514,9 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
||||
gp_Vec aVX, aVZ;
|
||||
|
||||
if ( !GEOMBase::GetShape( myVectX, aVectX, TopAbs_EDGE ) ||
|
||||
!GEOMBase::GetShape( myVectZ, aVectZ, TopAbs_EDGE ) ) {
|
||||
!GEOMBase::GetShape( myVectZ, aVectZ, TopAbs_EDGE ) ) {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -525,12 +525,12 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
||||
|
||||
if ( VX1.IsNull() || VX2.IsNull() ) {
|
||||
if ( !showPreview )
|
||||
showError( "Bad OX vector" );
|
||||
showError( "Bad OX vector" );
|
||||
return false;
|
||||
}
|
||||
if ( VZ1.IsNull() || VZ2.IsNull() ) {
|
||||
if ( !showPreview )
|
||||
showError( "Bad OZ vector" );
|
||||
showError( "Bad OZ vector" );
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -539,12 +539,12 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
||||
|
||||
if ( aVX.Magnitude() < Precision::Confusion() ) {
|
||||
if ( !showPreview )
|
||||
showError( "Bad OX vector" );
|
||||
showError( "Bad OX vector" );
|
||||
return false;
|
||||
}
|
||||
if ( aVZ.Magnitude() < Precision::Confusion() ) {
|
||||
if ( !showPreview )
|
||||
showError( "Bad OZ vector" );
|
||||
showError( "Bad OZ vector" );
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -553,7 +553,7 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview )
|
||||
|
||||
if ( aDirX.IsParallel( aDirZ, Precision::Angular() ) ) {
|
||||
if ( !showPreview )
|
||||
showError( "Parallel vectors selected" );
|
||||
showError( "Parallel vectors selected" );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ void BlocksGUI_ExplodeDlg::Init()
|
||||
connect( myGrp1->CheckBox1, SIGNAL( stateChanged( int ) ), this, SLOT( SubShapeToggled() ) );
|
||||
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
myConstructorId = -1;
|
||||
ConstructorsClicked( 0 );
|
||||
@ -179,10 +179,10 @@ bool BlocksGUI_ExplodeDlg::ClickOnApply()
|
||||
// More than 30 subshapes : ask confirmation
|
||||
if ( myNbBlocks > 30 ) {
|
||||
if ( SUIT_MessageBox::warning( this,
|
||||
tr( "GEOM_CONFIRM" ),
|
||||
tr( "GEOM_CONFIRM_INFO" ).arg( myNbBlocks ),
|
||||
tr( "GEOM_BUT_EXPLODE" ),
|
||||
tr( "GEOM_BUT_CANCEL" ) ) != 0 )
|
||||
tr( "GEOM_CONFIRM" ),
|
||||
tr( "GEOM_CONFIRM_INFO" ).arg( myNbBlocks ),
|
||||
tr( "GEOM_BUT_EXPLODE" ),
|
||||
tr( "GEOM_BUT_CANCEL" ) ) != 0 )
|
||||
return false; /* aborted */
|
||||
}
|
||||
}
|
||||
@ -249,7 +249,7 @@ void BlocksGUI_ExplodeDlg::ActivateThisDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
activateSelection();
|
||||
}
|
||||
@ -297,13 +297,13 @@ void BlocksGUI_ExplodeDlg::activateSelection()
|
||||
|
||||
if ( isAllSubShapes() ) { // Sub-shapes selection disabled
|
||||
disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
if ( myObject->_is_nil() ) {
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
}
|
||||
else {
|
||||
displayPreview( true, true, false );
|
||||
@ -334,9 +334,9 @@ void BlocksGUI_ExplodeDlg::updateButtonState()
|
||||
else {
|
||||
GEOM::GEOM_IBlocksOperations_var anOper = GEOM::GEOM_IBlocksOperations::_narrow(getOperation());
|
||||
bool isOnlyBlocks = anOper->IsCompoundOfBlocks( myObject,
|
||||
myGrp1->SpinBox1->value(),
|
||||
myGrp1->SpinBox2->value(),
|
||||
myNbBlocks );
|
||||
myGrp1->SpinBox1->value(),
|
||||
myGrp1->SpinBox2->value(),
|
||||
myNbBlocks );
|
||||
if ( isOnlyBlocks )
|
||||
myGrp1->TextBrowser1->setText( tr( "GEOM_NB_BLOCKS_NO_OTHERS" ).arg( myNbBlocks ) );
|
||||
else
|
||||
@ -406,8 +406,8 @@ bool BlocksGUI_ExplodeDlg::execute( ObjectList& objects )
|
||||
switch ( getConstructorId() ) {
|
||||
case 0:
|
||||
aList = anOper->ExplodeCompoundOfBlocks( myObject,
|
||||
myGrp1->SpinBox1->value(),
|
||||
myGrp1->SpinBox2->value() );
|
||||
myGrp1->SpinBox1->value(),
|
||||
myGrp1->SpinBox2->value() );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -452,7 +452,7 @@ bool BlocksGUI_ExplodeDlg::execute( ObjectList& objects )
|
||||
CORBA::String_var objStr = myGeomGUI->getApp()->orb()->object_to_string( *anIter );
|
||||
if ( selected.contains( QString( objStr.in() ) ) )
|
||||
{
|
||||
if ( !IsPreview() )
|
||||
if ( !IsPreview() )
|
||||
(*anIter)->SetParameters(aParameters.join(":").toLatin1().constData());
|
||||
objects.push_back( *anIter );
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ void BlocksGUI_PropagateDlg::activateSelection()
|
||||
SelectionIntoArgument();
|
||||
}
|
||||
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()) {
|
||||
case 0:
|
||||
anObj = anOper->MakeMultiTransformation1D(myShape,
|
||||
myFaces[Face1], myFaces[Face2],
|
||||
mySpinBox[SpinBox1]->value());
|
||||
myFaces[Face1], myFaces[Face2],
|
||||
mySpinBox[SpinBox1]->value());
|
||||
if (!anObj->_is_nil() && !IsPreview())
|
||||
{
|
||||
QStringList aParameters;
|
||||
@ -594,10 +594,10 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects)
|
||||
break;
|
||||
case 1:
|
||||
anObj = anOper->MakeMultiTransformation2D (myShape,
|
||||
myFaces[Face1U], myFaces[Face2U],
|
||||
mySpinBox[SpinBox2U]->value(),
|
||||
myFaces[Face1V], myFaces[Face2V],
|
||||
mySpinBox[SpinBox2V]->value());
|
||||
myFaces[Face1U], myFaces[Face2U],
|
||||
mySpinBox[SpinBox2U]->value(),
|
||||
myFaces[Face1V], myFaces[Face2V],
|
||||
mySpinBox[SpinBox2V]->value());
|
||||
if (!anObj->_is_nil() && !IsPreview())
|
||||
{
|
||||
QStringList aParameters;
|
||||
|
@ -55,7 +55,7 @@ bool BooleanGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
|
||||
{
|
||||
getGeometryGUI()->EmitSignalDeactivateDialog();
|
||||
|
||||
int anOperation = 0;
|
||||
int anOperation = 0;
|
||||
if ( theCommandID == 5011 )
|
||||
anOperation = FUSE;
|
||||
else if ( theCommandID == 5012 )
|
||||
|
@ -283,7 +283,7 @@ void BooleanGUI_Dialog::ActivateThisDialog()
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
displayPreview();
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ class BooleanGUI_Dialog : public GEOMBase_Skeleton
|
||||
|
||||
public:
|
||||
BooleanGUI_Dialog( const int, GeometryGUI*, QWidget* = 0,
|
||||
bool = false, Qt::WindowFlags = 0 );
|
||||
bool = false, Qt::WindowFlags = 0 );
|
||||
~BooleanGUI_Dialog();
|
||||
|
||||
protected:
|
||||
|
@ -107,7 +107,7 @@ void BuildGUI_CompoundDlg::Init()
|
||||
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||
connect( GroupShapes->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||
connect( ( (SalomeApp_Application*)(SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL(currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL(currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
|
||||
@ -192,7 +192,7 @@ void BuildGUI_CompoundDlg::ActivateThisDialog()
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
globalSelection( GEOM_ALLSHAPES );
|
||||
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() ) {
|
||||
// empty list of arguments means that all arguments should be restored
|
||||
getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
|
||||
/*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
|
||||
/*theInheritFirstArg=*/false );
|
||||
/*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
|
||||
/*theInheritFirstArg=*/false );
|
||||
}
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ void BuildGUI_EdgeDlg::ActivateThisDialog()
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
|
||||
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
displayPreview();
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ void BuildGUI_FaceDlg::Init()
|
||||
connect( GroupWire->LineEdit1, SIGNAL( returnPressed()), this, SLOT( LineEditReturnPressed() ) );
|
||||
connect( GroupWire->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
initName( tr( "GEOM_FACE" ) );
|
||||
}
|
||||
@ -203,7 +203,7 @@ void BuildGUI_FaceDlg::ActivateThisDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
TColStd_MapOfInteger aMap;
|
||||
aMap.Add( GEOM_EDGE );
|
||||
aMap.Add( GEOM_WIRE );
|
||||
|
@ -119,7 +119,7 @@ void BuildGUI_ShellDlg::Init()
|
||||
connect( GroupShell->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
initName( tr( "GEOM_SHELL" ) );
|
||||
}
|
||||
@ -213,7 +213,7 @@ void BuildGUI_ShellDlg::ActivateThisDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
TColStd_MapOfInteger aMap;
|
||||
aMap.Add( GEOM_SHELL );
|
||||
aMap.Add( GEOM_FACE );
|
||||
|
@ -113,7 +113,7 @@ void BuildGUI_SolidDlg::Init()
|
||||
connect( GroupSolid->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( EnableNameField( bool ) ) );
|
||||
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
initName( tr( "GEOM_SOLID" ) );
|
||||
}
|
||||
@ -208,7 +208,7 @@ void BuildGUI_SolidDlg::ActivateThisDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
globalSelection( GEOM_SHELL );
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ private:
|
||||
private:
|
||||
GEOM::ListOfGO myShells;
|
||||
bool myOkShells; /* to check when arguments is defined and
|
||||
all shells are closed */
|
||||
all shells are closed */
|
||||
|
||||
DlgRef_1Sel1Check* GroupSolid;
|
||||
|
||||
|
@ -119,7 +119,7 @@ void BuildGUI_WireDlg::Init()
|
||||
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||
connect( GroupArgs->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
initName( tr( "GEOM_WIRE" ) );
|
||||
}
|
||||
@ -209,7 +209,7 @@ void BuildGUI_WireDlg::ActivateThisDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
TColStd_MapOfInteger aMap;
|
||||
aMap.Add( GEOM_WIRE );
|
||||
aMap.Add( GEOM_EDGE );
|
||||
|
@ -212,8 +212,8 @@ void DisplayGUI::EraseAll()
|
||||
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
|
||||
SUIT_ViewManager* vman = vw->getViewManager();
|
||||
if ( vman->getType() == OCCViewer_Viewer::Type() ||
|
||||
vman->getType() == SVTK_Viewer::Type() ) {
|
||||
GEOM_Displayer( appStudy ).EraseAll();
|
||||
vman->getType() == SVTK_Viewer::Type() ) {
|
||||
GEOM_Displayer( appStudy ).EraseAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -258,25 +258,25 @@ void DisplayGUI::Display()
|
||||
if ( anIObject->hasEntry() ) {
|
||||
_PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
|
||||
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
|
||||
_PTR(SComponent) SC ( SO->GetFatherComponent() );
|
||||
// if component is selected
|
||||
listIO.Clear();
|
||||
_PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
|
||||
anIter->InitEx( true );
|
||||
while( anIter->More() ) {
|
||||
_PTR(SObject) valSO ( anIter->Value() );
|
||||
_PTR(SObject) refSO;
|
||||
if ( !valSO->ReferencedObject( refSO ) ) {
|
||||
listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
|
||||
_PTR(SComponent) SC ( SO->GetFatherComponent() );
|
||||
// if component is selected
|
||||
listIO.Clear();
|
||||
_PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
|
||||
anIter->InitEx( true );
|
||||
while( anIter->More() ) {
|
||||
_PTR(SObject) valSO ( anIter->Value() );
|
||||
_PTR(SObject) refSO;
|
||||
if ( !valSO->ReferencedObject( refSO ) ) {
|
||||
listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
|
||||
SC->ComponentDataType().c_str(),
|
||||
valSO->GetName().c_str()) );
|
||||
}
|
||||
anIter->Next();
|
||||
}
|
||||
break;
|
||||
}
|
||||
anIter->Next();
|
||||
}
|
||||
break;
|
||||
}
|
||||
else {
|
||||
listIO.Append( anIObject );
|
||||
listIO.Append( anIObject );
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -316,25 +316,25 @@ void DisplayGUI::Erase()
|
||||
if ( anIObject->hasEntry() ) {
|
||||
_PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
|
||||
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
|
||||
_PTR(SComponent) SC ( SO->GetFatherComponent() );
|
||||
// if component is selected
|
||||
listIO.Clear();
|
||||
_PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
|
||||
anIter->InitEx( true );
|
||||
while( anIter->More() ) {
|
||||
_PTR(SObject) valSO ( anIter->Value() );
|
||||
_PTR(SObject) refSO;
|
||||
if ( !valSO->ReferencedObject( refSO ) ) {
|
||||
listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
|
||||
_PTR(SComponent) SC ( SO->GetFatherComponent() );
|
||||
// if component is selected
|
||||
listIO.Clear();
|
||||
_PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
|
||||
anIter->InitEx( true );
|
||||
while( anIter->More() ) {
|
||||
_PTR(SObject) valSO ( anIter->Value() );
|
||||
_PTR(SObject) refSO;
|
||||
if ( !valSO->ReferencedObject( refSO ) ) {
|
||||
listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(),
|
||||
SC->ComponentDataType().c_str(),
|
||||
valSO->GetName().c_str()) );
|
||||
}
|
||||
anIter->Next();
|
||||
}
|
||||
break;
|
||||
}
|
||||
anIter->Next();
|
||||
}
|
||||
break;
|
||||
}
|
||||
else {
|
||||
listIO.Append( anIObject );
|
||||
listIO.Append( anIObject );
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -378,8 +378,8 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
|
||||
AIS_ListIteratorOfListOfInteractive ite( List );
|
||||
while( ite.More() ) {
|
||||
if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
|
||||
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
|
||||
ic->SetDisplayMode( aSh, Standard_Integer( newmode ),true );
|
||||
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
|
||||
ic->SetDisplayMode( aSh, Standard_Integer( newmode ),true );
|
||||
}
|
||||
ite.Next();
|
||||
}
|
||||
@ -427,12 +427,12 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
|
||||
allActors->InitTraversal();
|
||||
while (vtkActor* actor = allActors->GetNextActor()) {
|
||||
if (actor->GetVisibility()) { // only for visible actors
|
||||
GEOM_Actor* aGeomActor = 0;
|
||||
if ( actor->IsA( "GEOM_Actor" ) ) {
|
||||
aGeomActor = GEOM_Actor::SafeDownCast( actor );
|
||||
if ( aGeomActor )
|
||||
aGeomActor->SetVectorMode( mode );
|
||||
}
|
||||
GEOM_Actor* aGeomActor = 0;
|
||||
if ( actor->IsA( "GEOM_Actor" ) ) {
|
||||
aGeomActor = GEOM_Actor::SafeDownCast( actor );
|
||||
if ( aGeomActor )
|
||||
aGeomActor->SetVectorMode( mode );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -449,9 +449,9 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
|
||||
AIS_ListIteratorOfListOfInteractive ite( List );
|
||||
while( ite.More() ) {
|
||||
if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
|
||||
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
|
||||
aSh->SetDisplayVectors(mode);
|
||||
ic->RecomputePrsOnly(ite.Value());
|
||||
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
|
||||
aSh->SetDisplayVectors(mode);
|
||||
ic->RecomputePrsOnly(ite.Value());
|
||||
}
|
||||
ite.Next();
|
||||
}
|
||||
|
@ -581,7 +581,7 @@ void DlgRef_3Sel3Spin1Check::ShowRows( int fromRow, int toRow, bool toShow )
|
||||
int row, col, rowspan, colspan;
|
||||
gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
|
||||
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;
|
||||
gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
|
||||
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;
|
||||
gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan );
|
||||
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 err = qAbs( theValue - v );
|
||||
if ( err > 0 && err <= prec )
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "ui_DlgRef_1List1Spin1Btn_QTD.h"
|
||||
|
||||
class DLGREF_EXPORT DlgRef_1List1Spin1Btn : public QWidget,
|
||||
public Ui::DlgRef_1List1Spin1Btn_QTD
|
||||
public Ui::DlgRef_1List1Spin1Btn_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -58,7 +58,7 @@ public:
|
||||
#include "ui_DlgRef_1Sel1Check1List_QTD.h"
|
||||
|
||||
class DLGREF_EXPORT DlgRef_1Sel1Check1List : public QWidget,
|
||||
public Ui::DlgRef_1Sel1Check1List_QTD
|
||||
public Ui::DlgRef_1Sel1Check1List_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -74,7 +74,7 @@ public:
|
||||
#include "ui_DlgRef_1Sel1Check1Sel_QTD.h"
|
||||
|
||||
class DLGREF_EXPORT DlgRef_1Sel1Check1Sel : public QWidget,
|
||||
public Ui::DlgRef_1Sel1Check1Sel_QTD
|
||||
public Ui::DlgRef_1Sel1Check1Sel_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -90,7 +90,7 @@ public:
|
||||
#include "ui_DlgRef_1Sel1Check_QTD.h"
|
||||
|
||||
class DLGREF_EXPORT DlgRef_1Sel1Check : public QWidget,
|
||||
public Ui::DlgRef_1Sel1Check_QTD
|
||||
public Ui::DlgRef_1Sel1Check_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -106,7 +106,7 @@ public:
|
||||
#include "ui_DlgRef_1Sel1List1Check3Btn_QTD.h"
|
||||
|
||||
class DLGREF_EXPORT DlgRef_1Sel1List1Check3Btn : public QWidget,
|
||||
public Ui::DlgRef_1Sel1List1Check3Btn_QTD
|
||||
public Ui::DlgRef_1Sel1List1Check3Btn_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -122,7 +122,7 @@ public:
|
||||
#include "ui_DlgRef_1Sel1Spin1Check_QTD.h"
|
||||
|
||||
class DLGREF_EXPORT DlgRef_1Sel1Spin1Check : public QWidget,
|
||||
public Ui::DlgRef_1Sel1Spin1Check_QTD
|
||||
public Ui::DlgRef_1Sel1Spin1Check_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -138,7 +138,7 @@ public:
|
||||
#include "ui_DlgRef_1Sel1Spin_QTD.h"
|
||||
|
||||
class DLGREF_EXPORT DlgRef_1Sel1Spin : public QWidget,
|
||||
public Ui::DlgRef_1Sel1Spin_QTD
|
||||
public Ui::DlgRef_1Sel1Spin_QTD
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -195,13 +195,13 @@ bool EntityGUI::SObjectExist( const _PTR(SObject)& theFatherObject, const char*
|
||||
if ( SO->FindAttribute( anAttr, "AttributeIOR" ) ) {
|
||||
_PTR(AttributeIOR) anIOR ( anAttr );
|
||||
if ( strcmp( anIOR->Value().c_str(), IOR ) == 0 )
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
if ( SO->ReferencedObject( RefSO ) ) {
|
||||
if ( RefSO->FindAttribute( anAttr, "AttributeIOR" ) ) {
|
||||
_PTR(AttributeIOR) anIOR ( anAttr );
|
||||
if ( strcmp( anIOR->Value().c_str(), IOR ) == 0 )
|
||||
return true;
|
||||
if ( strcmp( anIOR->Value().c_str(), IOR ) == 0 )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,8 +67,8 @@ private:
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
EntityGUI_3DSketcherDlg::EntityGUI_3DSketcherDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl,
|
||||
const double lineWidth )
|
||||
bool modal, Qt::WindowFlags fl,
|
||||
const double lineWidth )
|
||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ),
|
||||
myGeometryGUI( theGeometryGUI ),
|
||||
myLineWidth( lineWidth )
|
||||
@ -306,45 +306,45 @@ void EntityGUI_3DSketcherDlg::SelectionIntoArgument()
|
||||
if (!CORBA::is_nil(aSelectedObject) && aRes) {
|
||||
TopoDS_Shape aShape;
|
||||
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE)) { // Explore the shape if its a local selection
|
||||
TColStd_IndexedMapOfInteger aMap;
|
||||
aSelMgr->GetIndexes(aSelList.First(), aMap);
|
||||
if (aMap.Extent() == 1)
|
||||
{
|
||||
int anIndex = aMap(1);
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
}
|
||||
TColStd_IndexedMapOfInteger aMap;
|
||||
aSelMgr->GetIndexes(aSelList.First(), aMap);
|
||||
if (aMap.Extent() == 1)
|
||||
{
|
||||
int anIndex = aMap(1);
|
||||
GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||
}
|
||||
}
|
||||
bool isOk = true;
|
||||
if ( aShape.ShapeType() != TopAbs_VERTEX )
|
||||
isOk = GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_VERTEX);
|
||||
isOk = GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_VERTEX);
|
||||
if (isOk) {
|
||||
gp_Pnt aPnt;
|
||||
if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) {
|
||||
// set coordinates to the Spin Boxes
|
||||
double aX, aY, aZ;
|
||||
aX = aPnt.X();
|
||||
aY = aPnt.Y();
|
||||
aZ = aPnt.Z();
|
||||
bool blocked = Group3Spin->SpinBox_DX->signalsBlocked();
|
||||
Group3Spin->SpinBox_DX->blockSignals(true);
|
||||
Group3Spin->SpinBox_DY->blockSignals(true);
|
||||
Group3Spin->SpinBox_DZ->blockSignals(true);
|
||||
if ( GroupType->RadioButton1->isChecked() ) {
|
||||
Group3Spin->SpinBox_DX->setValue( aX );
|
||||
Group3Spin->SpinBox_DY->setValue( aY );
|
||||
Group3Spin->SpinBox_DZ->setValue( aZ );
|
||||
} else if ( GroupType->RadioButton2->isChecked() ) {
|
||||
double x, y, z;
|
||||
GetLastPoints(x, y, z);
|
||||
Group3Spin->SpinBox_DX->setValue( aX - x );
|
||||
Group3Spin->SpinBox_DY->setValue( aY - y );
|
||||
Group3Spin->SpinBox_DZ->setValue( aZ - z );
|
||||
}
|
||||
Group3Spin->SpinBox_DX->blockSignals(blocked);
|
||||
Group3Spin->SpinBox_DY->blockSignals(blocked);
|
||||
Group3Spin->SpinBox_DZ->blockSignals(blocked);
|
||||
}
|
||||
gp_Pnt aPnt;
|
||||
if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) {
|
||||
// set coordinates to the Spin Boxes
|
||||
double aX, aY, aZ;
|
||||
aX = aPnt.X();
|
||||
aY = aPnt.Y();
|
||||
aZ = aPnt.Z();
|
||||
bool blocked = Group3Spin->SpinBox_DX->signalsBlocked();
|
||||
Group3Spin->SpinBox_DX->blockSignals(true);
|
||||
Group3Spin->SpinBox_DY->blockSignals(true);
|
||||
Group3Spin->SpinBox_DZ->blockSignals(true);
|
||||
if ( GroupType->RadioButton1->isChecked() ) {
|
||||
Group3Spin->SpinBox_DX->setValue( aX );
|
||||
Group3Spin->SpinBox_DY->setValue( aY );
|
||||
Group3Spin->SpinBox_DZ->setValue( aZ );
|
||||
} else if ( GroupType->RadioButton2->isChecked() ) {
|
||||
double x, y, z;
|
||||
GetLastPoints(x, y, z);
|
||||
Group3Spin->SpinBox_DX->setValue( aX - x );
|
||||
Group3Spin->SpinBox_DY->setValue( aY - y );
|
||||
Group3Spin->SpinBox_DZ->setValue( aZ - z );
|
||||
}
|
||||
Group3Spin->SpinBox_DX->blockSignals(blocked);
|
||||
Group3Spin->SpinBox_DY->blockSignals(blocked);
|
||||
Group3Spin->SpinBox_DZ->blockSignals(blocked);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -375,7 +375,7 @@ void EntityGUI_3DSketcherDlg::ActivateThisDialog()
|
||||
myGeomGUI->SetActiveDialogBox( this );
|
||||
|
||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
||||
GEOMBase_Helper::displayPreview( false, true, true, myLineWidth );
|
||||
@ -461,8 +461,8 @@ bool EntityGUI_3DSketcherDlg::execute( ObjectList& objects )
|
||||
//=================================================================================
|
||||
|
||||
void EntityGUI_3DSketcherDlg::initSpinBox( QDoubleSpinBox* spinBox,
|
||||
double min, double max,
|
||||
double step, int decimals )
|
||||
double min, double max,
|
||||
double step, int decimals )
|
||||
{
|
||||
spinBox->setDecimals( decimals );
|
||||
spinBox->setRange( min, max );
|
||||
@ -551,12 +551,12 @@ void EntityGUI_3DSketcherDlg::GetCurrentPoints(double& x, double& y, double& z)
|
||||
// Redefined from GEOMBase_Helper.
|
||||
//================================================================
|
||||
void EntityGUI_3DSketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object,
|
||||
const bool append,
|
||||
const bool activate,
|
||||
const bool update,
|
||||
const double lineWidth,
|
||||
const int displayMode,
|
||||
const int color )
|
||||
const bool append,
|
||||
const bool activate,
|
||||
const bool update,
|
||||
const double lineWidth,
|
||||
const int displayMode,
|
||||
const int color )
|
||||
{
|
||||
// Set color for preview shape
|
||||
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
|
||||
//================================================================
|
||||
bool EntityGUI_3DSketcherDlg::createShapes( GEOM::GEOM_Object_ptr theObject,
|
||||
TopoDS_Shape& theApplyedWire,
|
||||
TopoDS_Shape& theLastSegment )
|
||||
TopoDS_Shape& theApplyedWire,
|
||||
TopoDS_Shape& theLastSegment )
|
||||
{
|
||||
TopoDS_Shape aShape;
|
||||
if ( !GEOMBase::GetShape( theObject, aShape ) ||
|
||||
|
@ -53,8 +53,8 @@ public:
|
||||
|
||||
protected:
|
||||
void initSpinBox( QDoubleSpinBox*,
|
||||
double, double, double = 0.1,
|
||||
int = 3 );
|
||||
double, double, double = 0.1,
|
||||
int = 3 );
|
||||
|
||||
// redefined from GEOMBase_Helper
|
||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||
@ -66,16 +66,16 @@ private:
|
||||
void enterEvent( QEvent* );
|
||||
|
||||
virtual void displayPreview( GEOM::GEOM_Object_ptr,
|
||||
const bool = false,
|
||||
const bool = false,
|
||||
const bool = true,
|
||||
const double = -1,
|
||||
const int = -1,
|
||||
const int = -1);
|
||||
const bool = false,
|
||||
const bool = false,
|
||||
const bool = true,
|
||||
const double = -1,
|
||||
const int = -1,
|
||||
const int = -1);
|
||||
|
||||
bool createShapes( GEOM::GEOM_Object_ptr,
|
||||
TopoDS_Shape&,
|
||||
TopoDS_Shape& );
|
||||
TopoDS_Shape&,
|
||||
TopoDS_Shape& );
|
||||
|
||||
private:
|
||||
QList<double> myPointsList;
|
||||
|
@ -64,8 +64,8 @@
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
EntityGUI_SketcherDlg::EntityGUI_SketcherDlg( GeometryGUI* GUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl,
|
||||
const double lineWidth )
|
||||
bool modal, Qt::WindowFlags fl,
|
||||
const double lineWidth )
|
||||
: QDialog( parent, fl ),
|
||||
myIsAllAdded( false ),
|
||||
myIsApply( false ),
|
||||
@ -466,7 +466,7 @@ void EntityGUI_SketcherDlg::PointClicked( int constructorId )
|
||||
mySketchType = PT_SEL;
|
||||
myEditCurrentArgument = Group1Sel->LineEdit1;
|
||||
connect( myGeometryGUI->getApp()->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
Group1Sel->show();
|
||||
Group1Sel->buttonApply->setFocus();
|
||||
SelectionIntoArgument();
|
||||
@ -512,19 +512,19 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
||||
Group2Spin->show();
|
||||
|
||||
if ( constructorId == 2 ) { // Length
|
||||
mySketchType = DIR_ANGLE_LENGTH;
|
||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
||||
Group2Spin->SpinBox_DY->setValue( myLength );
|
||||
mySketchType = DIR_ANGLE_LENGTH;
|
||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
||||
Group2Spin->SpinBox_DY->setValue( myLength );
|
||||
}
|
||||
else if ( constructorId == 0 ) { // X
|
||||
mySketchType = DIR_ANGLE_X;
|
||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_X3" ) );
|
||||
Group2Spin->SpinBox_DY->setValue( myX );
|
||||
mySketchType = DIR_ANGLE_X;
|
||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_X3" ) );
|
||||
Group2Spin->SpinBox_DY->setValue( myX );
|
||||
}
|
||||
else if ( constructorId == 1 ) { // Y
|
||||
mySketchType = DIR_ANGLE_Y;
|
||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
||||
Group2Spin->SpinBox_DY->setValue( myY );
|
||||
mySketchType = DIR_ANGLE_Y;
|
||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
||||
Group2Spin->SpinBox_DY->setValue( myY );
|
||||
}
|
||||
}
|
||||
else if ( myConstructorDirId == 0 ) { // Perpendicular
|
||||
@ -532,19 +532,19 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
||||
Group1Spin->buttonApply->setFocus();
|
||||
|
||||
if ( constructorId == 2 ) { // Length
|
||||
mySketchType = DIR_PER_LENGTH;
|
||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
||||
Group1Spin->SpinBox_DX->setValue( myLength );
|
||||
mySketchType = DIR_PER_LENGTH;
|
||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
||||
Group1Spin->SpinBox_DX->setValue( myLength );
|
||||
}
|
||||
else if ( constructorId == 0 ) { // X
|
||||
mySketchType = DIR_PER_X;
|
||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X3" ) );
|
||||
Group1Spin->SpinBox_DX->setValue( myX );
|
||||
mySketchType = DIR_PER_X;
|
||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X3" ) );
|
||||
Group1Spin->SpinBox_DX->setValue( myX );
|
||||
}
|
||||
else if ( constructorId == 1 ) { // Y
|
||||
mySketchType = DIR_PER_Y;
|
||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
||||
Group1Spin->SpinBox_DX->setValue( myY );
|
||||
mySketchType = DIR_PER_Y;
|
||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
||||
Group1Spin->SpinBox_DX->setValue( myY );
|
||||
}
|
||||
}
|
||||
else if ( myConstructorDirId == 1 ) { // Tangent
|
||||
@ -552,19 +552,19 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
||||
Group1Spin->buttonApply->setFocus();
|
||||
|
||||
if ( constructorId == 2 ) { // Length
|
||||
mySketchType = DIR_TAN_LENGTH;
|
||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
||||
Group1Spin->SpinBox_DX->setValue( myLength );
|
||||
mySketchType = DIR_TAN_LENGTH;
|
||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
||||
Group1Spin->SpinBox_DX->setValue( myLength );
|
||||
}
|
||||
else if ( constructorId == 0 ) { // X
|
||||
mySketchType = DIR_TAN_X;
|
||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X3" ) );
|
||||
Group1Spin->SpinBox_DX->setValue( myX );
|
||||
mySketchType = DIR_TAN_X;
|
||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X3" ) );
|
||||
Group1Spin->SpinBox_DX->setValue( myX );
|
||||
}
|
||||
else if ( constructorId == 1 ) { // Y
|
||||
mySketchType = DIR_TAN_Y;
|
||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
||||
Group1Spin->SpinBox_DX->setValue( myY );
|
||||
mySketchType = DIR_TAN_Y;
|
||||
Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
||||
Group1Spin->SpinBox_DX->setValue( myY );
|
||||
}
|
||||
}
|
||||
else if ( myConstructorDirId == 3 ) { // DXDY
|
||||
@ -581,88 +581,88 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
|
||||
Group3Spin->buttonApply->setFocus();
|
||||
|
||||
if ( constructorId == 2 ) { // Length
|
||||
mySketchType = DIR_DXDY_LENGTH;
|
||||
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
||||
Group3Spin->SpinBox_DZ->setValue( myLength );
|
||||
mySketchType = DIR_DXDY_LENGTH;
|
||||
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_LENGTH2" ) );
|
||||
Group3Spin->SpinBox_DZ->setValue( myLength );
|
||||
}
|
||||
else if ( constructorId == 0 ) { // X
|
||||
mySketchType = DIR_DXDY_X;
|
||||
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_X3" ) );
|
||||
Group3Spin->SpinBox_DZ->setValue( myX );
|
||||
mySketchType = DIR_DXDY_X;
|
||||
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_X3" ) );
|
||||
Group3Spin->SpinBox_DZ->setValue( myX );
|
||||
}
|
||||
else if ( constructorId == 1 ) { // Y
|
||||
mySketchType = DIR_DXDY_Y;
|
||||
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
||||
Group3Spin->SpinBox_DZ->setValue( myY );
|
||||
mySketchType = DIR_DXDY_Y;
|
||||
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_Y3" ) );
|
||||
Group3Spin->SpinBox_DZ->setValue( myY );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( myConstructorId == 1 ) { // ARC
|
||||
if ( myConstructorDirId == 2 ) { // Angle
|
||||
if ( constructorId == 2 ) { // Length
|
||||
mySketchType = DIR_ANGLE_LENGTH;
|
||||
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_DZ, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||
Group3Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
||||
Group3Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
||||
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_ANGLE2" ));
|
||||
Group3Spin->SpinBox_DX->setValue( myAngle );
|
||||
myRadius = 100.0;
|
||||
Group3Spin->SpinBox_DY->setValue( myRadius );
|
||||
myLength = 30.0;
|
||||
Group3Spin->SpinBox_DZ->setValue( myLength );
|
||||
Group3Spin->show();
|
||||
Group3Spin->buttonApply->setFocus();
|
||||
mySketchType = DIR_ANGLE_LENGTH;
|
||||
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_DZ, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||
Group3Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
||||
Group3Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
||||
Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_ANGLE2" ));
|
||||
Group3Spin->SpinBox_DX->setValue( myAngle );
|
||||
myRadius = 100.0;
|
||||
Group3Spin->SpinBox_DY->setValue( myRadius );
|
||||
myLength = 30.0;
|
||||
Group3Spin->SpinBox_DZ->setValue( myLength );
|
||||
Group3Spin->show();
|
||||
Group3Spin->buttonApply->setFocus();
|
||||
}
|
||||
}
|
||||
else if ( myConstructorDirId == 0 ) { // Perpendicular
|
||||
if ( constructorId == 2 ) { // 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, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||
Group2Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
||||
myRadius = 100.0;
|
||||
Group2Spin->SpinBox_DX->setValue( myRadius );
|
||||
myLength = 30.0;
|
||||
Group2Spin->SpinBox_DY->setValue( myLength );
|
||||
Group2Spin->show();
|
||||
Group2Spin->buttonApply->setFocus();
|
||||
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, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||
Group2Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
||||
myRadius = 100.0;
|
||||
Group2Spin->SpinBox_DX->setValue( myRadius );
|
||||
myLength = 30.0;
|
||||
Group2Spin->SpinBox_DY->setValue( myLength );
|
||||
Group2Spin->show();
|
||||
Group2Spin->buttonApply->setFocus();
|
||||
}
|
||||
}
|
||||
else if ( myConstructorDirId == 1 ) { // Tangent
|
||||
if ( constructorId == 2 ) { // 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, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||
Group2Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
||||
myRadius = 100.0;
|
||||
Group2Spin->SpinBox_DX->setValue( myRadius );
|
||||
myLength = 30.0;
|
||||
Group2Spin->SpinBox_DY->setValue( myLength );
|
||||
Group2Spin->show();
|
||||
Group2Spin->buttonApply->setFocus();
|
||||
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, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
|
||||
Group2Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
||||
Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
||||
myRadius = 100.0;
|
||||
Group2Spin->SpinBox_DX->setValue( myRadius );
|
||||
myLength = 30.0;
|
||||
Group2Spin->SpinBox_DY->setValue( myLength );
|
||||
Group2Spin->show();
|
||||
Group2Spin->buttonApply->setFocus();
|
||||
}
|
||||
}
|
||||
else if ( myConstructorDirId == 3 ) { // DXDY
|
||||
if ( constructorId == 2 ) { // Length
|
||||
mySketchType = DIR_DXDY_LENGTH;
|
||||
Group4Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_VX2" ) );
|
||||
Group4Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_VY2" ) );
|
||||
Group4Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
||||
Group4Spin->TextLabel4->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
||||
myDX = 0.0;
|
||||
Group4Spin->SpinBox_DX->setValue( myDX );
|
||||
myDY = 0.0;
|
||||
Group4Spin->SpinBox_DY->setValue( myDY );
|
||||
myRadius = 100.0;
|
||||
Group4Spin->SpinBox_DZ->setValue( myRadius );
|
||||
myLength = 30.0;
|
||||
Group4Spin->SpinBox_DS->setValue( myLength );
|
||||
Group4Spin->show();
|
||||
Group4Spin->buttonApply->setFocus();
|
||||
mySketchType = DIR_DXDY_LENGTH;
|
||||
Group4Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_VX2" ) );
|
||||
Group4Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_VY2" ) );
|
||||
Group4Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
|
||||
Group4Spin->TextLabel4->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
|
||||
myDX = 0.0;
|
||||
Group4Spin->SpinBox_DX->setValue( myDX );
|
||||
myDY = 0.0;
|
||||
Group4Spin->SpinBox_DY->setValue( myDY );
|
||||
myRadius = 100.0;
|
||||
Group4Spin->SpinBox_DZ->setValue( myRadius );
|
||||
myLength = 30.0;
|
||||
Group4Spin->SpinBox_DS->setValue( myLength );
|
||||
Group4Spin->show();
|
||||
Group4Spin->buttonApply->setFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -691,7 +691,7 @@ void EntityGUI_SketcherDlg::ClickOnEnd()
|
||||
// Verify validity of commands
|
||||
if ( myCommand.count() <= 2 ) {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -711,10 +711,10 @@ void EntityGUI_SketcherDlg::ClickOnEnd()
|
||||
else {
|
||||
// PAL16008 (Sketcher Validation should be equal to Apply&Close)
|
||||
if ( Group1Spin->buttonApply->isEnabled() && Group1Spin->isVisible() ||
|
||||
Group2Spin->buttonApply->isEnabled() && Group2Spin->isVisible() ||
|
||||
Group3Spin->buttonApply->isEnabled() && Group3Spin->isVisible() ||
|
||||
Group4Spin->buttonApply->isEnabled() && Group4Spin->isVisible() ||
|
||||
Group1Sel ->buttonApply->isEnabled() && Group1Sel->isVisible() ) {
|
||||
Group2Spin->buttonApply->isEnabled() && Group2Spin->isVisible() ||
|
||||
Group3Spin->buttonApply->isEnabled() && Group3Spin->isVisible() ||
|
||||
Group4Spin->buttonApply->isEnabled() && Group4Spin->isVisible() ||
|
||||
Group1Sel ->buttonApply->isEnabled() && Group1Sel->isVisible() ) {
|
||||
ClickOnApply();
|
||||
}
|
||||
myIsAllAdded = true;
|
||||
@ -794,9 +794,9 @@ void EntityGUI_SketcherDlg::ClickOnHelp()
|
||||
#endif
|
||||
|
||||
SUIT_MessageBox::warning( 0, QObject::tr( "WRN_WARNING" ),
|
||||
QObject::tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ).
|
||||
arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( myHelpFileName ),
|
||||
QObject::tr( "BUT_OK" ) );
|
||||
QObject::tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ).
|
||||
arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( myHelpFileName ),
|
||||
QObject::tr( "BUT_OK" ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -899,19 +899,19 @@ void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
||||
if (!CORBA::is_nil(aSelectedObject) && aRes) {
|
||||
TopoDS_Shape aShape;
|
||||
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_VERTEX)) {
|
||||
gp_Trsf aTrans;
|
||||
gp_Ax3 aWPlane = GetActiveLocalCS();
|
||||
gp_Trsf aTrans;
|
||||
gp_Ax3 aWPlane = GetActiveLocalCS();
|
||||
|
||||
aTrans.SetTransformation(aWPlane);
|
||||
BRepBuilderAPI_Transform aTransformation (aShape, aTrans, Standard_False);
|
||||
aShape = aTransformation.Shape();
|
||||
aTrans.SetTransformation(aWPlane);
|
||||
BRepBuilderAPI_Transform aTransformation (aShape, aTrans, Standard_False);
|
||||
aShape = aTransformation.Shape();
|
||||
|
||||
gp_Pnt aPnt;
|
||||
gp_Pnt aPnt;
|
||||
if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) {
|
||||
myX = aPnt.X();
|
||||
myY = aPnt.Y();
|
||||
Group1Sel->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||
}
|
||||
myX = aPnt.X();
|
||||
myY = aPnt.Y();
|
||||
Group1Sel->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -985,7 +985,7 @@ void EntityGUI_SketcherDlg::ActivateThisDialog()
|
||||
myGeometryGUI->SetActiveDialogBox( this );
|
||||
|
||||
connect( myGeometryGUI->getApp()->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
//myGeometryGUI->SetState( 0 );
|
||||
globalSelection( GEOM_POINT );
|
||||
@ -1397,16 +1397,16 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects )
|
||||
TopoDS_Vertex V1, V2;
|
||||
gp_Pnt pt;
|
||||
if ( myShape1.ShapeType() == TopAbs_VERTEX ) {
|
||||
//the last shape is the first point
|
||||
pt = BRep_Tool::Pnt( TopoDS::Vertex( myShape1 ) );
|
||||
myLastX1 = pt.X();
|
||||
myLastY1 = pt.Y();
|
||||
//the last shape is the first point
|
||||
pt = BRep_Tool::Pnt( TopoDS::Vertex( myShape1 ) );
|
||||
myLastX1 = pt.X();
|
||||
myLastY1 = pt.Y();
|
||||
}
|
||||
else {
|
||||
TopExp::Vertices( TopoDS::Wire( myShape1 ), V1, V2 );
|
||||
pt = BRep_Tool::Pnt( V2 );
|
||||
myLastX1 = pt.X();
|
||||
myLastY1 = pt.Y();
|
||||
TopExp::Vertices( TopoDS::Wire( myShape1 ), V1, V2 );
|
||||
pt = BRep_Tool::Pnt( V2 );
|
||||
myLastX1 = pt.X();
|
||||
myLastY1 = pt.Y();
|
||||
}
|
||||
TopExp::Vertices( TopoDS::Wire( myShape2 ), V1, V2 );
|
||||
pt = BRep_Tool::Pnt( V2 );
|
||||
@ -1417,7 +1417,7 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects )
|
||||
|
||||
QString cmd;
|
||||
if ( ( mySketchState != FIRST_POINT &&
|
||||
myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) {
|
||||
myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) {
|
||||
cmd = myCommand.join( "" );
|
||||
|
||||
if ( Group1Sel->isVisible() ) {
|
||||
@ -1603,8 +1603,8 @@ void EntityGUI_SketcherDlg::keyPressEvent( QKeyEvent* e )
|
||||
}
|
||||
|
||||
void EntityGUI_SketcherDlg::initSpinBox( SalomeApp_DoubleSpinBox* spinBox,
|
||||
double min, double max,
|
||||
double step, int decimals )
|
||||
double min, double max,
|
||||
double step, int decimals )
|
||||
{
|
||||
spinBox->setDecimals( decimals );
|
||||
spinBox->setRange( min, max );
|
||||
@ -1682,12 +1682,12 @@ void EntityGUI_SketcherDlg::FindLocalCS()
|
||||
gp_Ax3 aLCS;
|
||||
aLCS.Transform(aShape.Location().Transformation());
|
||||
if (aShape.ShapeType() == TopAbs_FACE) {
|
||||
Handle(Geom_Surface) aGS = BRep_Tool::Surface(TopoDS::Face(aShape));
|
||||
if (!aGS.IsNull() && aGS->IsKind(STANDARD_TYPE(Geom_Plane))) {
|
||||
Handle(Geom_Plane) aGPlane = Handle(Geom_Plane)::DownCast(aGS);
|
||||
gp_Pln aPln = aGPlane->Pln();
|
||||
aLCS = aPln.Position();
|
||||
}
|
||||
Handle(Geom_Surface) aGS = BRep_Tool::Surface(TopoDS::Face(aShape));
|
||||
if (!aGS.IsNull() && aGS->IsKind(STANDARD_TYPE(Geom_Plane))) {
|
||||
Handle(Geom_Plane) aGPlane = Handle(Geom_Plane)::DownCast(aGS);
|
||||
gp_Pln aPln = aGPlane->Pln();
|
||||
aLCS = aPln.Position();
|
||||
}
|
||||
}
|
||||
myLCSList.push_back(aLCS);
|
||||
}
|
||||
|
@ -64,15 +64,15 @@ class EntityGUI_SketcherDlg : public QDialog, GEOMBase_Helper
|
||||
|
||||
public:
|
||||
EntityGUI_SketcherDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0,
|
||||
const double = 2. );
|
||||
const double = 2. );
|
||||
~EntityGUI_SketcherDlg();
|
||||
|
||||
bool eventFilter (QObject* object, QEvent* event);
|
||||
|
||||
protected:
|
||||
void initSpinBox( SalomeApp_DoubleSpinBox*,
|
||||
double, double, double = 0.1,
|
||||
int = 3 );
|
||||
double, double, double = 0.1,
|
||||
int = 3 );
|
||||
|
||||
// redefined from GEOMBase_Helper
|
||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||
@ -92,16 +92,16 @@ private:
|
||||
QString GetNewCommand( QString& );
|
||||
|
||||
virtual void displayPreview( GEOM::GEOM_Object_ptr,
|
||||
const bool = false,
|
||||
const bool = false,
|
||||
const bool = true,
|
||||
const double = -1,
|
||||
const int = -1,
|
||||
const int = -1);
|
||||
const bool = false,
|
||||
const bool = false,
|
||||
const bool = true,
|
||||
const double = -1,
|
||||
const int = -1,
|
||||
const int = -1);
|
||||
|
||||
bool createShapes( GEOM::GEOM_Object_ptr,
|
||||
TopoDS_Shape&,
|
||||
TopoDS_Shape& );
|
||||
TopoDS_Shape&,
|
||||
TopoDS_Shape& );
|
||||
|
||||
private:
|
||||
int myConstructorId;
|
||||
@ -157,10 +157,10 @@ private:
|
||||
enum SketchState { FIRST_POINT, NEXT_POINT };
|
||||
|
||||
enum SketchType { PT_ABS, PT_RELATIVE, PT_SEL,
|
||||
DIR_ANGLE_LENGTH, DIR_ANGLE_X, DIR_ANGLE_Y,
|
||||
DIR_PER_LENGTH, DIR_PER_X, DIR_PER_Y,
|
||||
DIR_TAN_LENGTH, DIR_TAN_X, DIR_TAN_Y,
|
||||
DIR_DXDY_LENGTH, DIR_DXDY_X, DIR_DXDY_Y };
|
||||
DIR_ANGLE_LENGTH, DIR_ANGLE_X, DIR_ANGLE_Y,
|
||||
DIR_PER_LENGTH, DIR_PER_X, DIR_PER_Y,
|
||||
DIR_TAN_LENGTH, DIR_TAN_X, DIR_TAN_Y,
|
||||
DIR_DXDY_LENGTH, DIR_DXDY_X, DIR_DXDY_Y };
|
||||
|
||||
private slots:
|
||||
void ClickOnEnd();
|
||||
|
@ -53,7 +53,7 @@
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
bool modal, Qt::WindowFlags fl )
|
||||
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
|
||||
{
|
||||
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( myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged( )), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged( )), this, SLOT( SelectionIntoArgument() ) );
|
||||
|
||||
updateButtonState();
|
||||
resize(100,100);
|
||||
@ -344,7 +344,7 @@ void EntityGUI_SubShapeDlg::ActivateThisDialog()
|
||||
{
|
||||
GEOMBase_Skeleton::ActivateThisDialog();
|
||||
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
SubShapeToggled();
|
||||
updateButtonState();
|
||||
}
|
||||
@ -427,7 +427,7 @@ void EntityGUI_SubShapeDlg::ComboTextChanged()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
unsigned int EntityGUI_SubShapeDlg::NumberOfSubShapes( const TopoDS_Shape& S,
|
||||
const int shapeType ) const
|
||||
const int shapeType ) const
|
||||
{
|
||||
if ( S.IsNull() )
|
||||
return 0;
|
||||
@ -437,13 +437,13 @@ unsigned int EntityGUI_SubShapeDlg::NumberOfSubShapes( const TopoDS_Shape& S,
|
||||
|
||||
if ( S.ShapeType() == TopAbs_COMPOUND &&
|
||||
( TopAbs_ShapeEnum(shapeType) == TopAbs_SHAPE ||
|
||||
TopAbs_ShapeEnum(shapeType) == TopAbs_COMPSOLID ||
|
||||
TopAbs_ShapeEnum(shapeType) == TopAbs_COMPOUND ) ) {
|
||||
TopAbs_ShapeEnum(shapeType) == TopAbs_COMPSOLID ||
|
||||
TopAbs_ShapeEnum(shapeType) == TopAbs_COMPOUND ) ) {
|
||||
TopoDS_Iterator It( S, Standard_True, Standard_True );
|
||||
for ( ; It.More(); It.Next() ) {
|
||||
if ( M.Add( It.Value() ) ) {
|
||||
if ( TopAbs_ShapeEnum( shapeType ) == TopAbs_SHAPE ||
|
||||
TopAbs_ShapeEnum( shapeType ) == It.Value().ShapeType() ) {
|
||||
TopAbs_ShapeEnum( shapeType ) == It.Value().ShapeType() ) {
|
||||
index++;
|
||||
}
|
||||
}
|
||||
@ -574,18 +574,18 @@ bool EntityGUI_SubShapeDlg::execute (ObjectList& objects)
|
||||
if (aSelList.Extent() == 1) {
|
||||
Standard_Boolean aResult = Standard_False;
|
||||
GEOM::GEOM_Object_var anObj =
|
||||
GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
|
||||
GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
|
||||
|
||||
if (aResult && !anObj->_is_nil()) {
|
||||
TColStd_IndexedMapOfInteger aMapIndex;
|
||||
aSelMgr->GetIndexes(aSelList.First(), aMapIndex);
|
||||
TColStd_IndexedMapOfInteger aMapIndex;
|
||||
aSelMgr->GetIndexes(aSelList.First(), aMapIndex);
|
||||
|
||||
GEOM::GEOM_ILocalOperations_var aLocOp =
|
||||
getGeomEngine()->GetILocalOperations(getStudyId());
|
||||
GEOM::GEOM_ILocalOperations_var aLocOp =
|
||||
getGeomEngine()->GetILocalOperations(getStudyId());
|
||||
|
||||
for (int i = 0, n = aList->length(); i < n; i++)
|
||||
if (aMapIndex.Contains(aLocOp->GetSubShapeIndex(myObject, aList[i])))
|
||||
objects.push_back(GEOM::GEOM_Object::_duplicate(aList[i]));
|
||||
for (int i = 0, n = aList->length(); i < n; i++)
|
||||
if (aMapIndex.Contains(aLocOp->GetSubShapeIndex(myObject, aList[i])))
|
||||
objects.push_back(GEOM::GEOM_Object::_duplicate(aList[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ private:
|
||||
|
||||
void ResetStateOfDialog();
|
||||
unsigned int NumberOfSubShapes( const TopoDS_Shape&,
|
||||
const int ) const;
|
||||
const int ) const;
|
||||
|
||||
void updateButtonState();
|
||||
bool isAllSubShapes() const;
|
||||
|
@ -19,9 +19,9 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: BlockFix.cxx
|
||||
// Created: Tue Dec 7 11:59:05 2004
|
||||
// Author: Pavel DURANDIN
|
||||
// File: BlockFix.cxx
|
||||
// Created: Tue Dec 7 11:59:05 2004
|
||||
// Author: Pavel DURANDIN
|
||||
//
|
||||
#include <BlockFix.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& BlockFix_BlockFixAPI_Type_();
|
||||
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:
|
||||
// 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_Type _aType = new Standard_Type("BlockFix_BlockFixAPI",
|
||||
sizeof(BlockFix_BlockFixAPI),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(BlockFix_BlockFixAPI),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ Standard_EXPORT ~BlockFix_PeriodicSurfaceModifier();
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_();
|
||||
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:
|
||||
|
||||
|
@ -42,10 +42,10 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_()
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_PeriodicSurfaceModifier",
|
||||
sizeof(BlockFix_PeriodicSurfaceModifier),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(BlockFix_PeriodicSurfaceModifier),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -19,9 +19,9 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: BlockFix.cxx
|
||||
// Created: Tue Dec 7 11:59:05 2004
|
||||
// Author: Pavel DURANDIN
|
||||
// File: BlockFix.cxx
|
||||
// Created: Tue Dec 7 11:59:05 2004
|
||||
// Author: Pavel DURANDIN
|
||||
//
|
||||
#include <BlockFix_SphereSpaceModifier.ixx>
|
||||
|
||||
|
@ -102,7 +102,7 @@ Standard_EXPORT ~BlockFix_SphereSpaceModifier();
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_();
|
||||
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:
|
||||
|
||||
|
@ -42,10 +42,10 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_()
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("BlockFix_SphereSpaceModifier",
|
||||
sizeof(BlockFix_SphereSpaceModifier),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(BlockFix_SphereSpaceModifier),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_Algo.cxx
|
||||
// Created: Sat Dec 04 12:39:47 2004
|
||||
// Author: Peter KURNEV
|
||||
// <peter@PREFEX>
|
||||
// File: GEOMAlgo_Algo.cxx
|
||||
// Created: Sat Dec 04 12:39:47 2004
|
||||
// Author: Peter KURNEV
|
||||
// <peter@PREFEX>
|
||||
//
|
||||
#include <GEOMAlgo_Algo.ixx>
|
||||
|
||||
|
@ -19,9 +19,9 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_Builder.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
// File: GEOMAlgo_Builder.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
//
|
||||
#include <GEOMAlgo_Builder.ixx>
|
||||
|
||||
@ -223,19 +223,19 @@
|
||||
aType=aS.ShapeType();
|
||||
if (aType==theType) {
|
||||
if (myImages.HasImage(aS)){
|
||||
const TopTools_ListOfShape& aLSIm=myImages.Image(aS);
|
||||
aItIm.Initialize(aLSIm);
|
||||
for (; aItIm.More(); aItIm.Next()) {
|
||||
const TopoDS_Shape& aSIm=aItIm.Value();
|
||||
if (aM.Add(aSIm)) {
|
||||
aBB.Add(myShape, aSIm);
|
||||
}
|
||||
}
|
||||
const TopTools_ListOfShape& aLSIm=myImages.Image(aS);
|
||||
aItIm.Initialize(aLSIm);
|
||||
for (; aItIm.More(); aItIm.Next()) {
|
||||
const TopoDS_Shape& aSIm=aItIm.Value();
|
||||
if (aM.Add(aSIm)) {
|
||||
aBB.Add(myShape, aSIm);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (aM.Add(aS)) {
|
||||
aBB.Add(myShape, aS);
|
||||
}
|
||||
if (aM.Add(aS)) {
|
||||
aBB.Add(myShape, aS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,9 +19,9 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_BuilderArea.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
// File: GEOMAlgo_BuilderArea.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
//
|
||||
#include <GEOMAlgo_BuilderArea.ixx>
|
||||
|
||||
|
@ -19,9 +19,9 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_BuilderFace.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
// File: GEOMAlgo_BuilderFace.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
//
|
||||
#include <GEOMAlgo_BuilderFace.ixx>
|
||||
|
||||
@ -83,15 +83,15 @@
|
||||
static
|
||||
Standard_Boolean IsGrowthWire(const TopoDS_Shape& ,
|
||||
|
||||
const TopTools_IndexedMapOfShape& );
|
||||
const TopTools_IndexedMapOfShape& );
|
||||
|
||||
static
|
||||
Standard_Boolean IsInside(const TopoDS_Shape& ,
|
||||
const TopoDS_Shape& ,
|
||||
IntTools_PContext& );
|
||||
const TopoDS_Shape& ,
|
||||
IntTools_PContext& );
|
||||
static
|
||||
void MakeInternalWires(const TopTools_MapOfShape& ,
|
||||
TopTools_ListOfShape& );
|
||||
TopTools_ListOfShape& );
|
||||
|
||||
//=======================================================================
|
||||
//function :
|
||||
@ -187,10 +187,10 @@ static
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aE=aIt.Value();
|
||||
if (!myShapesToAvoid.Contains(aE)) {
|
||||
TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
|
||||
TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
|
||||
}
|
||||
else {
|
||||
int a=0;
|
||||
int a=0;
|
||||
}
|
||||
}
|
||||
aNbV=aMVE.Extent();
|
||||
@ -202,33 +202,33 @@ static
|
||||
TopTools_ListOfShape& aLE=aMVE.ChangeFromKey(aV);
|
||||
aNbE=aLE.Extent();
|
||||
if (!aNbE) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
//
|
||||
const TopoDS_Edge& aE1=TopoDS::Edge(aLE.First());
|
||||
if (aNbE==1) {
|
||||
if (BRep_Tool::Degenerated(aE1)) {
|
||||
continue;
|
||||
}
|
||||
if (aV.Orientation()==TopAbs_INTERNAL) {
|
||||
continue;
|
||||
}
|
||||
bFound=Standard_True;
|
||||
myShapesToAvoid.Add(aE1);
|
||||
if (BRep_Tool::Degenerated(aE1)) {
|
||||
continue;
|
||||
}
|
||||
if (aV.Orientation()==TopAbs_INTERNAL) {
|
||||
continue;
|
||||
}
|
||||
bFound=Standard_True;
|
||||
myShapesToAvoid.Add(aE1);
|
||||
}
|
||||
else if (aNbE==2) {
|
||||
const TopoDS_Edge& aE2=TopoDS::Edge(aLE.Last());
|
||||
if (aE2.IsSame(aE1)) {
|
||||
TopoDS_Vertex aV1x, aV2x;
|
||||
//
|
||||
TopExp::Vertices(aE1, aV1x, aV2x);
|
||||
if (aV1x.IsSame(aV2x)) {
|
||||
continue;
|
||||
}
|
||||
bFound=Standard_True;
|
||||
myShapesToAvoid.Add(aE1);
|
||||
myShapesToAvoid.Add(aE2);
|
||||
}
|
||||
const TopoDS_Edge& aE2=TopoDS::Edge(aLE.Last());
|
||||
if (aE2.IsSame(aE1)) {
|
||||
TopoDS_Vertex aV1x, aV2x;
|
||||
//
|
||||
TopExp::Vertices(aE1, aV1x, aV2x);
|
||||
if (aV1x.IsSame(aV2x)) {
|
||||
continue;
|
||||
}
|
||||
bFound=Standard_True;
|
||||
myShapesToAvoid.Add(aE1);
|
||||
myShapesToAvoid.Add(aE2);
|
||||
}
|
||||
}
|
||||
}// for (i=1; i<=aNbE; ++i) {
|
||||
//
|
||||
@ -342,18 +342,18 @@ static
|
||||
//
|
||||
TopoDS_Iterator aItE(aE);
|
||||
for (; aItE.More()&&bFlag; aItE.Next()) {
|
||||
const TopoDS_Vertex& aV = TopoDS::Vertex(aItE.Value());
|
||||
const TopTools_ListOfShape& aLE=aVEMap.FindFromKey(aV);
|
||||
aIt.Initialize(aLE);
|
||||
for (; aIt.More()&&bFlag; aIt.Next()) {
|
||||
const TopoDS_Shape& aEx=aIt.Value();
|
||||
if (aMAdded.Add(aEx)) {
|
||||
aBB.Add(aW, aEx);
|
||||
if(aMAdded.Extent()==aNbEA) {
|
||||
bFlag=!bFlag;
|
||||
}
|
||||
}
|
||||
}//for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Vertex& aV = TopoDS::Vertex(aItE.Value());
|
||||
const TopTools_ListOfShape& aLE=aVEMap.FindFromKey(aV);
|
||||
aIt.Initialize(aLE);
|
||||
for (; aIt.More()&&bFlag; aIt.Next()) {
|
||||
const TopoDS_Shape& aEx=aIt.Value();
|
||||
if (aMAdded.Add(aEx)) {
|
||||
aBB.Add(aW, aEx);
|
||||
if(aMAdded.Extent()==aNbEA) {
|
||||
bFlag=!bFlag;
|
||||
}
|
||||
}
|
||||
}//for (; aIt.More(); aIt.Next()) {
|
||||
}//for (; aItE.More(); aItE.Next()) {
|
||||
}//for (; aItW.More(); aItW.Next()) {
|
||||
myLoopsInternal.Append(aW);
|
||||
@ -406,16 +406,16 @@ static
|
||||
bIsHole=GEOMAlgo_BuilderTools::IsHole(aWire, myFace);
|
||||
//XX
|
||||
if (bIsHole) {
|
||||
aHoleWires.Append(aWire);
|
||||
TopExp::MapShapes(aWire, TopAbs_EDGE, aMHE);
|
||||
aHoleWires.Append(aWire);
|
||||
TopExp::MapShapes(aWire, TopAbs_EDGE, aMHE);
|
||||
}
|
||||
else {
|
||||
// make a growth face from a wire
|
||||
TopoDS_Face aFace;
|
||||
aBB.MakeFace(aFace, aS, aLoc, aTol);
|
||||
aBB.Add (aFace, aWire);
|
||||
//
|
||||
aNewFaces.Append (aFace);
|
||||
// make a growth face from a wire
|
||||
TopoDS_Face aFace;
|
||||
aBB.MakeFace(aFace, aS, aLoc, aTol);
|
||||
aBB.Add (aFace, aWire);
|
||||
//
|
||||
aNewFaces.Append (aFace);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -449,13 +449,13 @@ static
|
||||
if (aInOutMap.IsBound(aHole)){
|
||||
const TopoDS_Shape& aF=aInOutMap(aHole);
|
||||
if (aMSH.IsBound(aF)) {
|
||||
TopTools_ListOfShape& aLH=aMSH.ChangeFind(aF);
|
||||
aLH.Append(aHole);
|
||||
TopTools_ListOfShape& aLH=aMSH.ChangeFind(aF);
|
||||
aLH.Append(aHole);
|
||||
}
|
||||
else {
|
||||
TopTools_ListOfShape aLH;
|
||||
aLH.Append(aHole);
|
||||
aMSH.Bind(aF, aLH);
|
||||
TopTools_ListOfShape aLH;
|
||||
aLH.Append(aHole);
|
||||
aMSH.Bind(aF, aLH);
|
||||
}
|
||||
}
|
||||
}// for (; aIt2.More(); aIt2.Next())
|
||||
@ -531,7 +531,7 @@ static
|
||||
for (; aItME.More(); aItME.Next()) {
|
||||
const TopoDS_Edge& aE=TopoDS::Edge(aItME.Key());
|
||||
if (IsInside(aE, aF, myContext)) {
|
||||
aMEP.Add(aE);
|
||||
aMEP.Add(aE);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -564,7 +564,7 @@ static
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void MakeInternalWires(const TopTools_MapOfShape& theME,
|
||||
TopTools_ListOfShape& theWires)
|
||||
TopTools_ListOfShape& theWires)
|
||||
{
|
||||
TopTools_MapIteratorOfMapOfShape aItM;
|
||||
TopTools_MapOfShape aAddedMap;
|
||||
@ -598,15 +598,15 @@ void MakeInternalWires(const TopTools_MapOfShape& theME,
|
||||
TopExp_Explorer aExp(aE, TopAbs_VERTEX);
|
||||
for (; aExp.More(); aExp.Next()) {
|
||||
const TopoDS_Shape& aV =aExp.Current();
|
||||
const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
|
||||
aItE.Initialize(aLE);
|
||||
for (; aItE.More(); aItE.Next()) {
|
||||
TopoDS_Shape aEL=aItE.Value();
|
||||
if (aAddedMap.Add(aEL)){
|
||||
aEL.Orientation(TopAbs_INTERNAL);
|
||||
aBB.Add(aW, aEL);
|
||||
}
|
||||
}
|
||||
const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
|
||||
aItE.Initialize(aLE);
|
||||
for (; aItE.More(); aItE.Next()) {
|
||||
TopoDS_Shape aEL=aItE.Value();
|
||||
if (aAddedMap.Add(aEL)){
|
||||
aEL.Orientation(TopAbs_INTERNAL);
|
||||
aBB.Add(aW, aEL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
theWires.Append(aW);
|
||||
@ -617,8 +617,8 @@ void MakeInternalWires(const TopTools_MapOfShape& theME,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean IsInside(const TopoDS_Shape& theHole,
|
||||
const TopoDS_Shape& theF2,
|
||||
IntTools_PContext& theContext)
|
||||
const TopoDS_Shape& theF2,
|
||||
IntTools_PContext& theContext)
|
||||
{
|
||||
Standard_Boolean bRet;
|
||||
Standard_Real aT, aU, aV;
|
||||
@ -658,7 +658,7 @@ Standard_Boolean IsInside(const TopoDS_Shape& theHole,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
|
||||
const TopTools_IndexedMapOfShape& theMHE)
|
||||
const TopTools_IndexedMapOfShape& theMHE)
|
||||
{
|
||||
Standard_Boolean bRet;
|
||||
TopoDS_Iterator aIt;
|
||||
@ -669,7 +669,7 @@ Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
|
||||
for(; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aE=aIt.Value();
|
||||
if (theMHE.Contains(aE)) {
|
||||
return !bRet;
|
||||
return !bRet;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -688,8 +688,8 @@ Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean IsInside(const TopoDS_Shape& theHole,
|
||||
const TopoDS_Shape& theF2,
|
||||
IntTools_PContext& theContext)
|
||||
const TopoDS_Shape& theF2,
|
||||
IntTools_PContext& theContext)
|
||||
{
|
||||
Standard_Real aT, aU, aV;
|
||||
TopExp_Explorer aExp;
|
||||
|
@ -19,9 +19,9 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_BuilderShape.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
// File: GEOMAlgo_BuilderShape.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
//
|
||||
#include <GEOMAlgo_BuilderShape.ixx>
|
||||
//=======================================================================
|
||||
|
@ -19,9 +19,9 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_BuilderSolid.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
// File: GEOMAlgo_BuilderSolid.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
//
|
||||
#include <GEOMAlgo_BuilderSolid.ixx>
|
||||
|
||||
@ -82,17 +82,17 @@
|
||||
//
|
||||
static
|
||||
Standard_Boolean IsGrowthShell(const TopoDS_Shape& ,
|
||||
const TopTools_IndexedMapOfShape& );
|
||||
const TopTools_IndexedMapOfShape& );
|
||||
static
|
||||
Standard_Boolean IsHole(const TopoDS_Shape& ,
|
||||
IntTools_PContext& );
|
||||
IntTools_PContext& );
|
||||
static
|
||||
Standard_Boolean IsInside(const TopoDS_Shape& ,
|
||||
const TopoDS_Shape& ,
|
||||
IntTools_PContext& );
|
||||
const TopoDS_Shape& ,
|
||||
IntTools_PContext& );
|
||||
static
|
||||
void MakeInternalShells(const TopTools_MapOfShape& ,
|
||||
TopTools_ListOfShape& );
|
||||
TopTools_ListOfShape& );
|
||||
|
||||
//modified by NIZNHY-PKV Tue Aug 5 15:06:50 2008f
|
||||
static
|
||||
@ -184,10 +184,10 @@ static
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aF=aIt.Value();
|
||||
if (!myShapesToAvoid.Contains(aF)) {
|
||||
TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
||||
TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
||||
}
|
||||
else {
|
||||
int a=0;
|
||||
int a=0;
|
||||
}
|
||||
}
|
||||
aNbE=aMEF.Extent();
|
||||
@ -196,51 +196,51 @@ static
|
||||
for (i=1; i<=aNbE; ++i) {
|
||||
const TopoDS_Edge& aE=TopoDS::Edge(aMEF.FindKey(i));
|
||||
if (BRep_Tool::Degenerated(aE)) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
//
|
||||
TopTools_ListOfShape& aLF=aMEF.ChangeFromKey(aE);
|
||||
//
|
||||
aNbF=aLF.Extent();
|
||||
if (!aNbF) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
//
|
||||
aOrE=aE.Orientation();
|
||||
//
|
||||
const TopoDS_Face& aF1=TopoDS::Face(aLF.First());
|
||||
if (aNbF==1) {
|
||||
if (aOrE==TopAbs_INTERNAL) {
|
||||
continue;
|
||||
}
|
||||
bFound=Standard_True;
|
||||
myShapesToAvoid.Add(aF1);
|
||||
if (aOrE==TopAbs_INTERNAL) {
|
||||
continue;
|
||||
}
|
||||
bFound=Standard_True;
|
||||
myShapesToAvoid.Add(aF1);
|
||||
}
|
||||
else if (aNbF==2) {
|
||||
const TopoDS_Face& aF2=TopoDS::Face(aLF.Last());
|
||||
if (aF2.IsSame(aF1)) {
|
||||
if (BRep_Tool::IsClosed(aE, aF1)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
if (aOrE==TopAbs_INTERNAL) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
bFound=Standard_True;
|
||||
myShapesToAvoid.Add(aF1);
|
||||
myShapesToAvoid.Add(aF2);
|
||||
}
|
||||
const TopoDS_Face& aF2=TopoDS::Face(aLF.Last());
|
||||
if (aF2.IsSame(aF1)) {
|
||||
if (BRep_Tool::IsClosed(aE, aF1)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
if (aOrE==TopAbs_INTERNAL) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
bFound=Standard_True;
|
||||
myShapesToAvoid.Add(aF1);
|
||||
myShapesToAvoid.Add(aF2);
|
||||
}
|
||||
}
|
||||
//DEB
|
||||
else {
|
||||
TopTools_ListIteratorOfListOfShape aItLF;
|
||||
//
|
||||
aItLF.Initialize (aLF);
|
||||
for (; aItLF.More(); aItLF.Next()) {
|
||||
const TopoDS_Shape& aFx=aItLF.Value();
|
||||
int a=0;
|
||||
}
|
||||
TopTools_ListIteratorOfListOfShape aItLF;
|
||||
//
|
||||
aItLF.Initialize (aLF);
|
||||
for (; aItLF.More(); aItLF.Next()) {
|
||||
const TopoDS_Shape& aFx=aItLF.Value();
|
||||
int a=0;
|
||||
}
|
||||
}
|
||||
//DEB
|
||||
}// for (i=1; i<=aNbE; ++i) {
|
||||
@ -309,78 +309,78 @@ static
|
||||
TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
|
||||
for (; aEdgeExp.More(); aEdgeExp.Next()) {
|
||||
const TopoDS_Edge& aE = TopoDS::Edge(aEdgeExp.Current());
|
||||
//
|
||||
//1
|
||||
if (aMEFP.Contains(aE)) {
|
||||
const TopTools_ListOfShape& aLFP=aMEFP.FindFromKey(aE);
|
||||
aNbFP=aLFP.Extent();
|
||||
if (aNbFP>1) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//2
|
||||
anOr=aE.Orientation();
|
||||
if (anOr==TopAbs_INTERNAL) {
|
||||
continue;
|
||||
}
|
||||
//3
|
||||
if (BRep_Tool::Degenerated(aE)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
// candidate faces list
|
||||
//
|
||||
//1
|
||||
if (aMEFP.Contains(aE)) {
|
||||
const TopTools_ListOfShape& aLFP=aMEFP.FindFromKey(aE);
|
||||
aNbFP=aLFP.Extent();
|
||||
if (aNbFP>1) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//2
|
||||
anOr=aE.Orientation();
|
||||
if (anOr==TopAbs_INTERNAL) {
|
||||
continue;
|
||||
}
|
||||
//3
|
||||
if (BRep_Tool::Degenerated(aE)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
// candidate faces list
|
||||
const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE);
|
||||
aNbLF=aLF.Extent();
|
||||
aNbLF=aLF.Extent();
|
||||
if (!aNbLF) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
// try to select one of neighbors
|
||||
// check if a face already added to Shell shares E
|
||||
Standard_Boolean bFound;
|
||||
TopTools_ListIteratorOfListOfShape aItLF;
|
||||
NMTTools_ListOfCoupleOfShape aLCSOff;
|
||||
//
|
||||
aItLF.Initialize(aLF);
|
||||
for (; aItLF.More(); aItLF.Next()) {
|
||||
const TopoDS_Face& aFL=TopoDS::Face(aItLF.Value());
|
||||
if (myShapesToAvoid.Contains(aFL)) {
|
||||
continue;
|
||||
}
|
||||
if (aF.IsSame(aFL)) {
|
||||
continue;
|
||||
}
|
||||
if (AddedFacesMap.Contains(aFL)){
|
||||
continue;
|
||||
}
|
||||
//
|
||||
bFound=GEOMAlgo_Tools3D::GetEdgeOff(aE, aFL, aEL);
|
||||
if (!bFound) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
aCSOff.SetShape1(aEL);
|
||||
aCSOff.SetShape2(aFL);
|
||||
aLCSOff.Append(aCSOff);
|
||||
}//for (; aItLF.More(); aItLF.Next()) {
|
||||
//
|
||||
aNbOff=aLCSOff.Extent();
|
||||
if (!aNbOff){
|
||||
continue;
|
||||
}
|
||||
//
|
||||
TopoDS_Face aSelF;
|
||||
if (aNbOff==1) {
|
||||
aSelF=TopoDS::Face(aLCSOff.First().Shape2());
|
||||
}
|
||||
else if (aNbOff>1){
|
||||
GEOMAlgo_Tools3D::GetFaceOff(aE, aF, aLCSOff, aSelF);
|
||||
}
|
||||
//
|
||||
}
|
||||
//
|
||||
// try to select one of neighbors
|
||||
// check if a face already added to Shell shares E
|
||||
Standard_Boolean bFound;
|
||||
TopTools_ListIteratorOfListOfShape aItLF;
|
||||
NMTTools_ListOfCoupleOfShape aLCSOff;
|
||||
//
|
||||
aItLF.Initialize(aLF);
|
||||
for (; aItLF.More(); aItLF.Next()) {
|
||||
const TopoDS_Face& aFL=TopoDS::Face(aItLF.Value());
|
||||
if (myShapesToAvoid.Contains(aFL)) {
|
||||
continue;
|
||||
}
|
||||
if (aF.IsSame(aFL)) {
|
||||
continue;
|
||||
}
|
||||
if (AddedFacesMap.Contains(aFL)){
|
||||
continue;
|
||||
}
|
||||
//
|
||||
bFound=GEOMAlgo_Tools3D::GetEdgeOff(aE, aFL, aEL);
|
||||
if (!bFound) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
aCSOff.SetShape1(aEL);
|
||||
aCSOff.SetShape2(aFL);
|
||||
aLCSOff.Append(aCSOff);
|
||||
}//for (; aItLF.More(); aItLF.Next()) {
|
||||
//
|
||||
aNbOff=aLCSOff.Extent();
|
||||
if (!aNbOff){
|
||||
continue;
|
||||
}
|
||||
//
|
||||
TopoDS_Face aSelF;
|
||||
if (aNbOff==1) {
|
||||
aSelF=TopoDS::Face(aLCSOff.First().Shape2());
|
||||
}
|
||||
else if (aNbOff>1){
|
||||
GEOMAlgo_Tools3D::GetFaceOff(aE, aF, aLCSOff, aSelF);
|
||||
}
|
||||
//
|
||||
if (!aSelF.IsNull() && AddedFacesMap.Add(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 (; aItAddedF.More(); aItAddedF.Next()) {
|
||||
//modified by NIZNHY-PKV Tue Aug 5 15:07:08 2008f
|
||||
@ -393,8 +393,8 @@ static
|
||||
TopoDS_Iterator aItS;
|
||||
aItS.Initialize(aShell);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aFs=aItS.Value();
|
||||
aMFP.Add(aFs);
|
||||
const TopoDS_Shape& aFs=aItS.Value();
|
||||
aMFP.Add(aFs);
|
||||
}
|
||||
}
|
||||
*/
|
||||
@ -468,14 +468,14 @@ static
|
||||
TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
|
||||
for (; aEdgeExp.More(); aEdgeExp.Next()) {
|
||||
const TopoDS_Edge& aE = TopoDS::Edge(aEdgeExp.Current());
|
||||
const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE);
|
||||
aItF.Initialize(aLF);
|
||||
for (; aItF.More(); aItF.Next()) {
|
||||
const TopoDS_Face& aFL=TopoDS::Face(aItF.Value());
|
||||
if (AddedFacesMap.Add(aFL)){
|
||||
aBB.Add(aShell, aFL);
|
||||
}
|
||||
}
|
||||
const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE);
|
||||
aItF.Initialize(aLF);
|
||||
for (; aItF.More(); aItF.Next()) {
|
||||
const TopoDS_Face& aFL=TopoDS::Face(aItF.Value());
|
||||
if (AddedFacesMap.Add(aFL)){
|
||||
aBB.Add(aShell, aFL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
myLoopsInternal.Append(aShell);
|
||||
@ -522,16 +522,16 @@ static
|
||||
//bIsHole=GEOMAlgo_BuilderTools::IsHole(aShell);
|
||||
//XX
|
||||
if (bIsHole) {
|
||||
aHoleShells.Append(aShell);
|
||||
TopExp::MapShapes(aShell, TopAbs_FACE, aMHF);
|
||||
aHoleShells.Append(aShell);
|
||||
TopExp::MapShapes(aShell, TopAbs_FACE, aMHF);
|
||||
}
|
||||
else {
|
||||
// make a growth solid from a shell
|
||||
TopoDS_Solid Solid;
|
||||
aBB.MakeSolid(Solid);
|
||||
aBB.Add (Solid, aShell);
|
||||
//
|
||||
aNewSolids.Append (Solid);
|
||||
// make a growth solid from a shell
|
||||
TopoDS_Solid Solid;
|
||||
aBB.MakeSolid(Solid);
|
||||
aBB.Add (Solid, aShell);
|
||||
//
|
||||
aNewSolids.Append (Solid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -565,13 +565,13 @@ static
|
||||
if (aInOutMap.IsBound(aHole)){
|
||||
const TopoDS_Shape& aSolid=aInOutMap(aHole);
|
||||
if (aMSH.IsBound(aSolid)) {
|
||||
TopTools_ListOfShape& aLH=aMSH.ChangeFind(aSolid);
|
||||
aLH.Append(aHole);
|
||||
TopTools_ListOfShape& aLH=aMSH.ChangeFind(aSolid);
|
||||
aLH.Append(aHole);
|
||||
}
|
||||
else {
|
||||
TopTools_ListOfShape aLH;
|
||||
aLH.Append(aHole);
|
||||
aMSH.Bind(aSolid, aLH);
|
||||
TopTools_ListOfShape aLH;
|
||||
aLH.Append(aHole);
|
||||
aMSH.Bind(aSolid, aLH);
|
||||
}
|
||||
//aBB.Add (aSolid, aHole);
|
||||
}
|
||||
@ -647,7 +647,7 @@ static
|
||||
for (; aItMF.More(); aItMF.Next()) {
|
||||
const TopoDS_Face& aF=TopoDS::Face(aItMF.Key());
|
||||
if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, *myContext)) {
|
||||
aMFP.Add(aF);
|
||||
aMFP.Add(aF);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -681,7 +681,7 @@ static
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void MakeInternalShells(const TopTools_MapOfShape& theMF,
|
||||
TopTools_ListOfShape& theShells)
|
||||
TopTools_ListOfShape& theShells)
|
||||
{
|
||||
TopTools_MapIteratorOfMapOfShape aItM;
|
||||
TopTools_MapOfShape aAddedFacesMap;
|
||||
@ -715,15 +715,15 @@ void MakeInternalShells(const TopTools_MapOfShape& theMF,
|
||||
TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
|
||||
for (; aEdgeExp.More(); aEdgeExp.Next()) {
|
||||
const TopoDS_Shape& aE =aEdgeExp.Current();
|
||||
const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE);
|
||||
aItF.Initialize(aLF);
|
||||
for (; aItF.More(); aItF.Next()) {
|
||||
TopoDS_Shape aFL=aItF.Value();
|
||||
if (aAddedFacesMap.Add(aFL)){
|
||||
aFL.Orientation(TopAbs_INTERNAL);
|
||||
aBB.Add(aShell, aFL);
|
||||
}
|
||||
}
|
||||
const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE);
|
||||
aItF.Initialize(aLF);
|
||||
for (; aItF.More(); aItF.Next()) {
|
||||
TopoDS_Shape aFL=aItF.Value();
|
||||
if (aAddedFacesMap.Add(aFL)){
|
||||
aFL.Orientation(TopAbs_INTERNAL);
|
||||
aBB.Add(aShell, aFL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
theShells.Append(aShell);
|
||||
@ -734,7 +734,7 @@ void MakeInternalShells(const TopTools_MapOfShape& theMF,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean IsHole(const TopoDS_Shape& theS2,
|
||||
IntTools_PContext& theContext)
|
||||
IntTools_PContext& theContext)
|
||||
{
|
||||
TopoDS_Solid *pS2=(TopoDS_Solid *)&theS2;
|
||||
BRepClass3d_SolidClassifier& aClsf=theContext->SolidClassifier(*pS2);
|
||||
@ -748,8 +748,8 @@ Standard_Boolean IsHole(const TopoDS_Shape& theS2,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean IsInside(const TopoDS_Shape& theS1,
|
||||
const TopoDS_Shape& theS2,
|
||||
IntTools_PContext& theContext)
|
||||
const TopoDS_Shape& theS2,
|
||||
IntTools_PContext& theContext)
|
||||
{
|
||||
TopExp_Explorer aExp;
|
||||
TopAbs_State aState;
|
||||
@ -774,7 +774,7 @@ Standard_Boolean IsInside(const TopoDS_Shape& theS1,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean IsGrowthShell(const TopoDS_Shape& theShell,
|
||||
const TopTools_IndexedMapOfShape& theMHF)
|
||||
const TopTools_IndexedMapOfShape& theMHF)
|
||||
{
|
||||
Standard_Boolean bRet;
|
||||
TopoDS_Iterator aIt;
|
||||
@ -785,7 +785,7 @@ Standard_Boolean IsGrowthShell(const TopoDS_Shape& theShell,
|
||||
for(; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aF=aIt.Value();
|
||||
if (theMHF.Contains(aF)) {
|
||||
return !bRet;
|
||||
return !bRet;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -812,18 +812,18 @@ Standard_Boolean IsClosedShell(const TopoDS_Shell& theShell)
|
||||
for (; aExp.More(); aExp.Next()) {
|
||||
const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
|
||||
if (BRep_Tool::Degenerated(aE)) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
if (BRep_Tool::IsClosed(aE, aF)) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
*/
|
||||
if (aE.Orientation()==TopAbs_INTERNAL) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
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
|
||||
//
|
||||
// File: GEOMAlgo_BuilderTools.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
// File: GEOMAlgo_BuilderTools.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
//
|
||||
#include <GEOMAlgo_BuilderTools.ixx>
|
||||
|
||||
@ -60,8 +60,8 @@
|
||||
|
||||
static
|
||||
Standard_Integer ComputeProps(const TopoDS_Face& aF,
|
||||
Standard_Real& aA,
|
||||
Standard_Real& aV);
|
||||
Standard_Real& aA,
|
||||
Standard_Real& aV);
|
||||
static
|
||||
void BuildTriangulation(const TopoDS_Face& aF);
|
||||
|
||||
@ -70,7 +70,7 @@ static
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aW,
|
||||
const TopoDS_Shape& aFace)
|
||||
const TopoDS_Shape& aFace)
|
||||
{
|
||||
Standard_Boolean bIsHole;
|
||||
Standard_Integer i, aNbS;
|
||||
@ -96,7 +96,7 @@ static
|
||||
const TopoDS_Edge& aE=TopoDS::Edge(aItW.Value());
|
||||
aOr=aE.Orientation();
|
||||
if (!(aOr==TopAbs_FORWARD ||
|
||||
aOr==TopAbs_REVERSED)) {
|
||||
aOr==TopAbs_REVERSED)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
@ -168,8 +168,8 @@ static
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Integer ComputeProps(const TopoDS_Face& aF,
|
||||
Standard_Real& aA,
|
||||
Standard_Real& aV)
|
||||
Standard_Real& aA,
|
||||
Standard_Real& aV)
|
||||
{
|
||||
Standard_Integer j, i, i1, i2, aNbNodes, aNbTrigs, n[3];
|
||||
Standard_Real aAi, aVi;
|
||||
@ -225,7 +225,7 @@ Standard_Integer ComputeProps(const TopoDS_Face& aF,
|
||||
Standard_Real aSx, aZx;
|
||||
gp_Dir aDN(aVN);
|
||||
if (aOr==TopAbs_REVERSED) {
|
||||
aDN.Reverse();
|
||||
aDN.Reverse();
|
||||
}
|
||||
//
|
||||
aSx=aAi*aDN.Z();
|
||||
@ -269,11 +269,11 @@ void BuildTriangulation(const TopoDS_Face& aF)
|
||||
aDiscret=aCoeff*dMax;
|
||||
//
|
||||
BRepMesh_FastDiscret aMesher(aDiscret,
|
||||
aAngle,
|
||||
aBox,
|
||||
bWithShare,
|
||||
Standard_True,
|
||||
Standard_False,
|
||||
Standard_True);
|
||||
aAngle,
|
||||
aBox,
|
||||
bWithShare,
|
||||
Standard_True,
|
||||
Standard_False,
|
||||
Standard_True);
|
||||
aMesher.Add(aF);
|
||||
}
|
||||
|
@ -19,9 +19,9 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_Builder_1.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
// File: GEOMAlgo_Builder_1.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
//
|
||||
#include <GEOMAlgo_Builder.hxx>
|
||||
//
|
||||
@ -64,12 +64,12 @@
|
||||
|
||||
static
|
||||
void FillImagesCompounds(const TopTools_MapOfShape& ,
|
||||
BRepAlgo_Image& );
|
||||
BRepAlgo_Image& );
|
||||
|
||||
static
|
||||
void FillImagesCompound(const TopoDS_Shape& ,
|
||||
BRepAlgo_Image& ,
|
||||
TopTools_MapOfShape& );
|
||||
BRepAlgo_Image& ,
|
||||
TopTools_MapOfShape& );
|
||||
|
||||
//=======================================================================
|
||||
//function : FillImagesVertices
|
||||
@ -90,12 +90,12 @@ static
|
||||
if (aV.ShapeType()==TopAbs_VERTEX) {
|
||||
iV=pPF->FindSDVertex(i);
|
||||
if (iV) {
|
||||
const TopoDS_Shape& aVSD=aDS.Shape(iV);
|
||||
if (!myImages.HasImage(aV)) {
|
||||
myImages.Bind(aV, aVSD);
|
||||
//
|
||||
mySameDomainShapes.Add(aV, aVSD);
|
||||
}
|
||||
const TopoDS_Shape& aVSD=aDS.Shape(iV);
|
||||
if (!myImages.HasImage(aV)) {
|
||||
myImages.Bind(aV, aVSD);
|
||||
//
|
||||
mySameDomainShapes.Add(aV, aVSD);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -158,22 +158,22 @@ static
|
||||
//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) && !aIsCB) {
|
||||
//modified by NIZNHY-PKV Fri Nov 30 10:41:46 2007t
|
||||
continue;
|
||||
//modified by NIZNHY-PKV Fri Nov 30 10:41:46 2007t
|
||||
continue;
|
||||
}
|
||||
//
|
||||
aESpR=TopoDS::Edge(aSpR);
|
||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx);
|
||||
if (bToReverse) {
|
||||
aESpR.Reverse();
|
||||
aESpR.Reverse();
|
||||
}
|
||||
aLSp.Append(aESpR);
|
||||
//
|
||||
aItLB.Initialize(aLB);
|
||||
for (; aItLB.More(); aItLB.Next()) {
|
||||
nSpx=aItLB.Value();
|
||||
const TopoDS_Shape& aSpx=aDS.Shape(nSpx);
|
||||
mySameDomainShapes.Add(aSpx ,aSpR);
|
||||
nSpx=aItLB.Value();
|
||||
const TopoDS_Shape& aSpx=aDS.Shape(nSpx);
|
||||
mySameDomainShapes.Add(aSpx ,aSpR);
|
||||
}
|
||||
//
|
||||
//
|
||||
@ -181,28 +181,28 @@ static
|
||||
else {
|
||||
aIt.Initialize(aLPB);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const BOPTools_PaveBlock& aPB=aIt.Value();
|
||||
//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, aIsCB);
|
||||
//modified by NIZNHY-PKV Fri Nov 30 10:42:20 2007t
|
||||
nSpR=aPBR.Edge();
|
||||
const TopoDS_Shape& aSpR=aDS.Shape(nSpR);
|
||||
//
|
||||
aESpR=TopoDS::Edge(aSpR);
|
||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx);
|
||||
if (bToReverse) {
|
||||
aESpR.Reverse();
|
||||
}
|
||||
aLSp.Append(aESpR);
|
||||
//
|
||||
aItLB.Initialize(aLB);
|
||||
for (; aItLB.More(); aItLB.Next()) {
|
||||
nSpx=aItLB.Value();
|
||||
const TopoDS_Shape& aSpx=aDS.Shape(nSpx);
|
||||
mySameDomainShapes.Add(aSpx ,aSpR);
|
||||
}
|
||||
//
|
||||
const BOPTools_PaveBlock& aPB=aIt.Value();
|
||||
//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, aIsCB);
|
||||
//modified by NIZNHY-PKV Fri Nov 30 10:42:20 2007t
|
||||
nSpR=aPBR.Edge();
|
||||
const TopoDS_Shape& aSpR=aDS.Shape(nSpR);
|
||||
//
|
||||
aESpR=TopoDS::Edge(aSpR);
|
||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx);
|
||||
if (bToReverse) {
|
||||
aESpR.Reverse();
|
||||
}
|
||||
aLSp.Append(aESpR);
|
||||
//
|
||||
aItLB.Initialize(aLB);
|
||||
for (; aItLB.More(); aItLB.Next()) {
|
||||
nSpx=aItLB.Value();
|
||||
const TopoDS_Shape& aSpx=aDS.Shape(nSpx);
|
||||
mySameDomainShapes.Add(aSpx ,aSpR);
|
||||
}
|
||||
//
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -254,8 +254,8 @@ static
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aF=aIt.Value();
|
||||
if (myImages.HasImage(aF)) {
|
||||
bInterferred=!bInterferred;
|
||||
break;
|
||||
bInterferred=!bInterferred;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!bInterferred){
|
||||
@ -269,20 +269,20 @@ static
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aF=aIt.Value();
|
||||
if (myImages.HasImage(aF)) {
|
||||
const TopTools_ListOfShape& aLFIm=myImages.Image(aF);
|
||||
aItIm.Initialize(aLFIm);
|
||||
for (; aItIm.More(); aItIm.Next()) {
|
||||
TopoDS_Shape aFIm=aItIm.Value();
|
||||
//
|
||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFIm, aF, aCtx);
|
||||
if (bToReverse) {
|
||||
aFIm.Reverse();
|
||||
}
|
||||
aBB.Add(aCIm, aFIm);
|
||||
}
|
||||
const TopTools_ListOfShape& aLFIm=myImages.Image(aF);
|
||||
aItIm.Initialize(aLFIm);
|
||||
for (; aItIm.More(); aItIm.Next()) {
|
||||
TopoDS_Shape aFIm=aItIm.Value();
|
||||
//
|
||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFIm, aF, aCtx);
|
||||
if (bToReverse) {
|
||||
aFIm.Reverse();
|
||||
}
|
||||
aBB.Add(aCIm, aFIm);
|
||||
}
|
||||
}
|
||||
else {
|
||||
aBB.Add(aCIm, aF);
|
||||
aBB.Add(aCIm, aF);
|
||||
}
|
||||
}
|
||||
myImages.Bind(aC, aCIm);
|
||||
@ -293,7 +293,7 @@ static
|
||||
// purpose:
|
||||
//=======================================================================
|
||||
void FillImagesCompounds(const TopTools_MapOfShape& theMS,
|
||||
BRepAlgo_Image& theImages)
|
||||
BRepAlgo_Image& theImages)
|
||||
{
|
||||
TopTools_MapOfShape aMFP;
|
||||
TopTools_MapIteratorOfMapOfShape aItS;
|
||||
@ -309,8 +309,8 @@ void FillImagesCompounds(const TopTools_MapOfShape& theMS,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void FillImagesCompound(const TopoDS_Shape& theS,
|
||||
BRepAlgo_Image& theImages,
|
||||
TopTools_MapOfShape& theMFP)
|
||||
BRepAlgo_Image& theImages,
|
||||
TopTools_MapOfShape& theMFP)
|
||||
{
|
||||
Standard_Boolean bInterferred;
|
||||
TopAbs_ShapeEnum aTypeX;
|
||||
@ -350,9 +350,9 @@ void FillImagesCompound(const TopoDS_Shape& theS,
|
||||
const TopTools_ListOfShape& aLFIm=theImages.Image(aSX);
|
||||
aItIm.Initialize(aLFIm);
|
||||
for (; aItIm.More(); aItIm.Next()) {
|
||||
TopoDS_Shape aSXIm=aItIm.Value();
|
||||
aSXIm.Orientation(aOrX);
|
||||
aBB.Add(aCIm, aSXIm);
|
||||
TopoDS_Shape aSXIm=aItIm.Value();
|
||||
aSXIm.Orientation(aOrX);
|
||||
aBB.Add(aCIm, aSXIm);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -19,9 +19,9 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_Builder_2.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
// File: GEOMAlgo_Builder_2.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
//
|
||||
#include <GEOMAlgo_Builder.hxx>
|
||||
|
||||
@ -87,8 +87,8 @@
|
||||
|
||||
static
|
||||
void UpdateCandidates(const Standard_Integer ,
|
||||
const Standard_Integer ,
|
||||
NMTTools_IndexedDataMapOfIndexedMapOfInteger& );
|
||||
const Standard_Integer ,
|
||||
NMTTools_IndexedDataMapOfIndexedMapOfInteger& );
|
||||
|
||||
//=======================================================================
|
||||
//function : FillImagesFaces
|
||||
@ -145,15 +145,15 @@ static
|
||||
NMTTools_ListOfCommonBlock& aLCB=aCBP(j);
|
||||
aItCB.Initialize(aLCB);
|
||||
for (; aItCB.More(); aItCB.Next()) {
|
||||
NMTTools_CommonBlock& aCB=aItCB.Value();
|
||||
if (aCB.IsPaveBlockOnFace(nF)) {
|
||||
const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1();
|
||||
nSpIn=aPB1.Edge();
|
||||
const TopoDS_Shape& aSpIn=aDS.Shape(nSpIn);
|
||||
if (aMFence.Add(aSpIn)){
|
||||
aLSpIn.Append(aSpIn);
|
||||
}
|
||||
}
|
||||
NMTTools_CommonBlock& aCB=aItCB.Value();
|
||||
if (aCB.IsPaveBlockOnFace(nF)) {
|
||||
const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1();
|
||||
nSpIn=aPB1.Edge();
|
||||
const TopoDS_Shape& aSpIn=aDS.Shape(nSpIn);
|
||||
if (aMFence.Add(aSpIn)){
|
||||
aLSpIn.Append(aSpIn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -162,24 +162,24 @@ static
|
||||
BOPTools_SSInterference& aFF=aFFs(j);
|
||||
aFF.Indices(n1, n2);
|
||||
if (!(n1==nF || n2==nF)) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
BOPTools_SequenceOfCurves& aSC=aFF.Curves();
|
||||
aNbCurves=aSC.Length();
|
||||
if (!aNbCurves) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
//
|
||||
const BOPTools_Curve& aBC=aSC(1);
|
||||
const BOPTools_ListOfPaveBlock& aLPB=aBC.NewPaveBlocks();
|
||||
aItPB.Initialize(aLPB);
|
||||
for (; aItPB.More(); aItPB.Next()) {
|
||||
const BOPTools_PaveBlock& aPBSc=aItPB.Value();
|
||||
nSpSc=aPBSc.Edge();
|
||||
const TopoDS_Shape& aSpSc=aDS.Shape(nSpSc);
|
||||
if (aMFence.Add(aSpSc)){
|
||||
aLSpIn.Append(aSpSc);
|
||||
}
|
||||
const BOPTools_PaveBlock& aPBSc=aItPB.Value();
|
||||
nSpSc=aPBSc.Edge();
|
||||
const TopoDS_Shape& aSpSc=aDS.Shape(nSpSc);
|
||||
if (aMFence.Add(aSpSc)){
|
||||
aLSpIn.Append(aSpSc);
|
||||
}
|
||||
}
|
||||
}
|
||||
aNbSpIn=aLSpIn.Extent();
|
||||
@ -232,8 +232,8 @@ static
|
||||
for (; anExp.More(); anExp.Next()) {
|
||||
const TopoDS_Shape& aE=anExp.Current();
|
||||
if (myImages.HasImage(aE)) {
|
||||
aMFP.Add(i);
|
||||
break;
|
||||
aMFP.Add(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -243,17 +243,17 @@ static
|
||||
//
|
||||
aNbFFs=aFFs.Extent();
|
||||
for (j=1; j<=aNbFFs; ++j) {
|
||||
BOPTools_SSInterference& aFFj=aFFs(j);
|
||||
aFFj.Indices(n1, n2);
|
||||
if (!(n1==i || n2==i)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
const TColStd_ListOfInteger& aLSE=aFFj.SharedEdges();
|
||||
aNbSE=aLSE.Extent();
|
||||
if (aNbSE) {
|
||||
aMFP.Add(i);
|
||||
}
|
||||
BOPTools_SSInterference& aFFj=aFFs(j);
|
||||
aFFj.Indices(n1, n2);
|
||||
if (!(n1==i || n2==i)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
const TColStd_ListOfInteger& aLSE=aFFj.SharedEdges();
|
||||
aNbSE=aLSE.Extent();
|
||||
if (aNbSE) {
|
||||
aMFP.Add(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
//===
|
||||
@ -282,17 +282,17 @@ static
|
||||
anOriE=aE.Orientation();
|
||||
//
|
||||
if (!myImages.HasImage(aE)) {
|
||||
if (anOriE==TopAbs_INTERNAL) {
|
||||
aEE=aE;
|
||||
aEE.Orientation(TopAbs_FORWARD);
|
||||
aWES.AddStartElement(aEE);
|
||||
aEE.Orientation(TopAbs_REVERSED);
|
||||
aWES.AddStartElement(aEE);
|
||||
}
|
||||
else {
|
||||
aWES.AddStartElement(aE);
|
||||
}
|
||||
continue;
|
||||
if (anOriE==TopAbs_INTERNAL) {
|
||||
aEE=aE;
|
||||
aEE.Orientation(TopAbs_FORWARD);
|
||||
aWES.AddStartElement(aEE);
|
||||
aEE.Orientation(TopAbs_REVERSED);
|
||||
aWES.AddStartElement(aEE);
|
||||
}
|
||||
else {
|
||||
aWES.AddStartElement(aE);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
//
|
||||
bIsDegenerated=BRep_Tool::Degenerated(aE);
|
||||
@ -301,43 +301,43 @@ static
|
||||
const TopTools_ListOfShape& aLIE=myImages.Image(aE);
|
||||
aIt.Initialize(aLIE);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
aSp=TopoDS::Edge(aIt.Value());
|
||||
//
|
||||
if (bIsDegenerated) {
|
||||
aSp.Orientation(anOriE);
|
||||
aWES.AddStartElement(aSp);
|
||||
continue;
|
||||
}
|
||||
//
|
||||
if (anOriE==TopAbs_INTERNAL) {
|
||||
aSp.Orientation(TopAbs_FORWARD);
|
||||
aWES.AddStartElement(aSp);
|
||||
aSp.Orientation(TopAbs_REVERSED);
|
||||
aWES.AddStartElement(aSp);
|
||||
continue;
|
||||
}
|
||||
//
|
||||
if (bIsClosed){
|
||||
if (aMFence.Add(aSp)) {
|
||||
//
|
||||
if (!BRep_Tool::IsClosed(aSp, aF)){
|
||||
BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF);
|
||||
}
|
||||
//
|
||||
aSp.Orientation(TopAbs_FORWARD);
|
||||
aWES.AddStartElement(aSp);
|
||||
aSp.Orientation(TopAbs_REVERSED);
|
||||
aWES.AddStartElement(aSp);
|
||||
}
|
||||
continue;
|
||||
}// if (aMFence.Add(aSp))
|
||||
//
|
||||
aSp.Orientation(anOriE);
|
||||
bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx);
|
||||
if (bToReverse) {
|
||||
aSp.Reverse();
|
||||
}
|
||||
aWES.AddStartElement(aSp);
|
||||
aSp=TopoDS::Edge(aIt.Value());
|
||||
//
|
||||
if (bIsDegenerated) {
|
||||
aSp.Orientation(anOriE);
|
||||
aWES.AddStartElement(aSp);
|
||||
continue;
|
||||
}
|
||||
//
|
||||
if (anOriE==TopAbs_INTERNAL) {
|
||||
aSp.Orientation(TopAbs_FORWARD);
|
||||
aWES.AddStartElement(aSp);
|
||||
aSp.Orientation(TopAbs_REVERSED);
|
||||
aWES.AddStartElement(aSp);
|
||||
continue;
|
||||
}
|
||||
//
|
||||
if (bIsClosed){
|
||||
if (aMFence.Add(aSp)) {
|
||||
//
|
||||
if (!BRep_Tool::IsClosed(aSp, aF)){
|
||||
BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF);
|
||||
}
|
||||
//
|
||||
aSp.Orientation(TopAbs_FORWARD);
|
||||
aWES.AddStartElement(aSp);
|
||||
aSp.Orientation(TopAbs_REVERSED);
|
||||
aWES.AddStartElement(aSp);
|
||||
}
|
||||
continue;
|
||||
}// if (aMFence.Add(aSp))
|
||||
//
|
||||
aSp.Orientation(anOriE);
|
||||
bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx);
|
||||
if (bToReverse) {
|
||||
aSp.Reverse();
|
||||
}
|
||||
aWES.AddStartElement(aSp);
|
||||
}// for (; aIt.More(); aIt.Next()) {
|
||||
}// for (; anExp.More(); anExp.Next()) {
|
||||
//
|
||||
@ -346,13 +346,13 @@ static
|
||||
const TopTools_ListOfShape& aLE=myInParts.FindFromKey(aF);
|
||||
aIt.Initialize(aLE);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
aSp=TopoDS::Edge(aIt.Value());
|
||||
//
|
||||
aSp.Orientation(TopAbs_FORWARD);
|
||||
aWES.AddStartElement(aSp);
|
||||
//
|
||||
aSp.Orientation(TopAbs_REVERSED);
|
||||
aWES.AddStartElement(aSp);
|
||||
aSp=TopoDS::Edge(aIt.Value());
|
||||
//
|
||||
aSp.Orientation(TopAbs_FORWARD);
|
||||
aWES.AddStartElement(aSp);
|
||||
//
|
||||
aSp.Orientation(TopAbs_REVERSED);
|
||||
aWES.AddStartElement(aSp);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -374,8 +374,8 @@ static
|
||||
aBBx.Add(aCx, aFF);
|
||||
aItx.Initialize(aSE);
|
||||
for (; aItx.More(); aItx.Next()) {
|
||||
TopoDS_Shape& aEx=aItx.Value();
|
||||
aBBx.Add(aCx, aEx);
|
||||
TopoDS_Shape& aEx=aItx.Value();
|
||||
aBBx.Add(aCx, aEx);
|
||||
}
|
||||
int a=0;
|
||||
}
|
||||
@ -394,7 +394,7 @@ static
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
TopoDS_Shape& aFR=aIt.Value();
|
||||
if (anOriF==TopAbs_REVERSED) {
|
||||
aFR.Orientation(TopAbs_REVERSED);
|
||||
aFR.Orientation(TopAbs_REVERSED);
|
||||
}
|
||||
aLFR.Append(aFR);
|
||||
}
|
||||
@ -466,35 +466,35 @@ static
|
||||
//
|
||||
aItF2.Initialize(aLF2);
|
||||
for (; aItF2.More(); aItF2.Next()) {
|
||||
const TopoDS_Face& aF2y=TopoDS::Face(aItF2.Value());
|
||||
bIsSDF=NMTTools_Tools::AreFacesSameDomain(aF1x, aF2y, aCtx);
|
||||
if (bIsSDF) {
|
||||
if (aMFence.Contains(aF1x) ||
|
||||
aMFence.Contains(aF2y)) {
|
||||
continue;
|
||||
}
|
||||
aMFence.Add(aF1x);
|
||||
aMFence.Add(aF2y);
|
||||
//
|
||||
NMTTools_CoupleOfShape aCS;
|
||||
//
|
||||
aCS.SetShape1(aF1x);
|
||||
aCS.SetShape2(aF2y);
|
||||
aLCS.Append(aCS);
|
||||
//
|
||||
if (aF1x==aF1) {
|
||||
if (!mySplitFaces.HasImage(aF1)) {
|
||||
mySplitFaces.Bind(aF1, aF1);
|
||||
}
|
||||
}
|
||||
if (aF2y==aF2) {
|
||||
if (!mySplitFaces.HasImage(aF2)) {
|
||||
mySplitFaces.Bind(aF2, aF2);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
}
|
||||
const TopoDS_Face& aF2y=TopoDS::Face(aItF2.Value());
|
||||
bIsSDF=NMTTools_Tools::AreFacesSameDomain(aF1x, aF2y, aCtx);
|
||||
if (bIsSDF) {
|
||||
if (aMFence.Contains(aF1x) ||
|
||||
aMFence.Contains(aF2y)) {
|
||||
continue;
|
||||
}
|
||||
aMFence.Add(aF1x);
|
||||
aMFence.Add(aF2y);
|
||||
//
|
||||
NMTTools_CoupleOfShape aCS;
|
||||
//
|
||||
aCS.SetShape1(aF1x);
|
||||
aCS.SetShape2(aF2y);
|
||||
aLCS.Append(aCS);
|
||||
//
|
||||
if (aF1x==aF1) {
|
||||
if (!mySplitFaces.HasImage(aF1)) {
|
||||
mySplitFaces.Bind(aF1, aF1);
|
||||
}
|
||||
}
|
||||
if (aF2y==aF2) {
|
||||
if (!mySplitFaces.HasImage(aF2)) {
|
||||
mySplitFaces.Bind(aF2, aF2);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}//for (i=1; i<=aNbFF; ++i)
|
||||
@ -555,16 +555,16 @@ static
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
aFSp=TopoDS::Face(aIt.Value());
|
||||
if (!mySameDomainShapes.Contains(aFSp)) {
|
||||
aLFx.Append(aFSp);
|
||||
aLFx.Append(aFSp);
|
||||
}
|
||||
else {
|
||||
const TopoDS_Shape& aSx=mySameDomainShapes.FindFromKey(aFSp);
|
||||
aFSD=TopoDS::Face(aSx);
|
||||
iSense=GEOMAlgo_Tools3D::Sense(aFSp, aFSD);
|
||||
if (iSense<0) {
|
||||
aFSD.Reverse();
|
||||
}
|
||||
aLFx.Append(aFSD);
|
||||
const TopoDS_Shape& aSx=mySameDomainShapes.FindFromKey(aFSp);
|
||||
aFSD=TopoDS::Face(aSx);
|
||||
iSense=GEOMAlgo_Tools3D::Sense(aFSp, aFSD);
|
||||
if (iSense<0) {
|
||||
aFSD.Reverse();
|
||||
}
|
||||
aLFx.Append(aFSD);
|
||||
}
|
||||
}
|
||||
if (!myImages.HasImage(aF)) {//XX
|
||||
@ -659,13 +659,13 @@ static
|
||||
const TColStd_IndexedMapOfInteger& aMAVF=aMAV.FindFromKey(nF);
|
||||
aNbAVF=aMAVF.Extent();
|
||||
for (j=1; j<=aNbAVF; ++j) {
|
||||
nV=aMAVF(j);
|
||||
nVSD=pPF->FindSDVertex(nV);
|
||||
if (nVSD) {
|
||||
nV=nVSD;
|
||||
}
|
||||
//
|
||||
UpdateCandidates(nF, nV, aMFMV);
|
||||
nV=aMAVF(j);
|
||||
nVSD=pPF->FindSDVertex(nV);
|
||||
if (nVSD) {
|
||||
nV=nVSD;
|
||||
}
|
||||
//
|
||||
UpdateCandidates(nF, nV, aMFMV);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -676,12 +676,12 @@ static
|
||||
nV=aExp.Current();
|
||||
const TopoDS_Shape& aV=aDS.Shape(nV);
|
||||
if (aV.Orientation()==TopAbs_INTERNAL) {
|
||||
nVSD=pPF->FindSDVertex(nV);
|
||||
if (nVSD) {
|
||||
nV=nVSD;
|
||||
}
|
||||
//
|
||||
UpdateCandidates(nF, nV, aMFMV);
|
||||
nVSD=pPF->FindSDVertex(nV);
|
||||
if (nVSD) {
|
||||
nV=nVSD;
|
||||
}
|
||||
//
|
||||
UpdateCandidates(nF, nV, aMFMV);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -705,25 +705,25 @@ static
|
||||
const TopTools_ListOfShape& aLFx=myImages.Image(aF);
|
||||
aIt.Initialize(aLFx);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aFx=aIt.Value();
|
||||
TopExp::MapShapesAndAncestors(aFx, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
|
||||
const TopoDS_Shape& aFx=aIt.Value();
|
||||
TopExp::MapShapesAndAncestors(aFx, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
else {
|
||||
Standard_Boolean bFaceToProcess;
|
||||
//
|
||||
TopExp::MapShapesAndAncestors(aF, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
|
||||
bFaceToProcess=Standard_False;
|
||||
for (j=1; j<=aNbVC; ++j) {
|
||||
nV=aMVC(j);
|
||||
const TopoDS_Shape& aV=aDS.Shape(nV);
|
||||
if (!aMVE.Contains(aV)) {
|
||||
bFaceToProcess=!bFaceToProcess;
|
||||
break;
|
||||
}
|
||||
nV=aMVC(j);
|
||||
const TopoDS_Shape& aV=aDS.Shape(nV);
|
||||
if (!aMVE.Contains(aV)) {
|
||||
bFaceToProcess=!bFaceToProcess;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!bFaceToProcess) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
}// else
|
||||
//
|
||||
@ -731,11 +731,11 @@ static
|
||||
nV=aMVC(j);
|
||||
const TopoDS_Shape& aV=aDS.Shape(nV);
|
||||
if (aMVE.Contains(aV)) {
|
||||
const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
|
||||
aNbE=aLE.Extent();
|
||||
if (aNbE) {
|
||||
continue;
|
||||
}
|
||||
const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
|
||||
aNbE=aLE.Extent();
|
||||
if (aNbE) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
aLV.Append(aV);
|
||||
}
|
||||
@ -745,41 +745,41 @@ static
|
||||
// 3. Try to put vertices into the face(s)
|
||||
aItV.Initialize(aLV);
|
||||
for (; aItV.More(); aItV.Next()) {
|
||||
TopoDS_Vertex aV=TopoDS::Vertex(aItV.Value());
|
||||
aV.Orientation(TopAbs_INTERNAL);
|
||||
//
|
||||
bHasImage=myImages.HasImage(aF);
|
||||
if (bHasImage) {
|
||||
const TopTools_ListOfShape& aLFx=myImages.Image(aF);
|
||||
aIt.Initialize(aLFx);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
TopoDS_Face aFx=TopoDS::Face(aIt.Value());
|
||||
// update classifier
|
||||
IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
|
||||
aClsf.Init(aFx, aTol);
|
||||
//
|
||||
iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
|
||||
if (!iFlag) {
|
||||
aBB.Add(aFx, aV);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
const TopoDS_Face& aFx=TopoDS::Face(aF);
|
||||
// update classifier
|
||||
IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
|
||||
aClsf.Init(aFx, aTol);
|
||||
//
|
||||
iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
|
||||
if (!iFlag) {
|
||||
TopoDS_Face aFz;
|
||||
//
|
||||
GEOMAlgo_Tools3D::CopyFace(aFx, aFz);
|
||||
aBB.Add(aFz, aV);
|
||||
myImages.Bind(aF, aFz);
|
||||
}
|
||||
}
|
||||
TopoDS_Vertex aV=TopoDS::Vertex(aItV.Value());
|
||||
aV.Orientation(TopAbs_INTERNAL);
|
||||
//
|
||||
bHasImage=myImages.HasImage(aF);
|
||||
if (bHasImage) {
|
||||
const TopTools_ListOfShape& aLFx=myImages.Image(aF);
|
||||
aIt.Initialize(aLFx);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
TopoDS_Face aFx=TopoDS::Face(aIt.Value());
|
||||
// update classifier
|
||||
IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
|
||||
aClsf.Init(aFx, aTol);
|
||||
//
|
||||
iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
|
||||
if (!iFlag) {
|
||||
aBB.Add(aFx, aV);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
const TopoDS_Face& aFx=TopoDS::Face(aF);
|
||||
// update classifier
|
||||
IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
|
||||
aClsf.Init(aFx, aTol);
|
||||
//
|
||||
iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
|
||||
if (!iFlag) {
|
||||
TopoDS_Face aFz;
|
||||
//
|
||||
GEOMAlgo_Tools3D::CopyFace(aFx, aFz);
|
||||
aBB.Add(aFz, aV);
|
||||
myImages.Bind(aF, aFz);
|
||||
}
|
||||
}
|
||||
}// for (; aItV.More(); aItV.Next()) {
|
||||
}// if (aNbV) {
|
||||
}// for (nF=1; nF<=aNb; ++nF) {
|
||||
@ -789,8 +789,8 @@ static
|
||||
// purpose:
|
||||
//=======================================================================
|
||||
void UpdateCandidates(const Standard_Integer theNF,
|
||||
const Standard_Integer theNV,
|
||||
NMTTools_IndexedDataMapOfIndexedMapOfInteger& theMFMV)
|
||||
const Standard_Integer theNV,
|
||||
NMTTools_IndexedDataMapOfIndexedMapOfInteger& theMFMV)
|
||||
{
|
||||
if (theMFMV.Contains(theNF)) {
|
||||
TColStd_IndexedMapOfInteger& aMV=theMFMV.ChangeFromKey(theNF);
|
||||
|
@ -19,9 +19,9 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_Builder_3.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
// File: GEOMAlgo_Builder_3.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
//
|
||||
#include <GEOMAlgo_Builder.hxx>
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
|
||||
static
|
||||
void OwnInternalShapes(const TopoDS_Shape& ,
|
||||
TopTools_IndexedMapOfShape& );
|
||||
TopTools_IndexedMapOfShape& );
|
||||
|
||||
//=======================================================================
|
||||
//function : FillImagesSolids
|
||||
@ -89,8 +89,8 @@ static
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_Builder::BuildDraftSolid(const TopoDS_Shape& theSolid,
|
||||
TopoDS_Shape& theDraftSolid,
|
||||
TopTools_ListOfShape& theLIF)
|
||||
TopoDS_Shape& theDraftSolid,
|
||||
TopTools_ListOfShape& theLIF)
|
||||
{
|
||||
myErrorStatus=0;
|
||||
//
|
||||
@ -102,7 +102,7 @@ static
|
||||
Standard_Integer iFlag;
|
||||
TopAbs_Orientation aOrF, aOrSh, aOrSd;
|
||||
TopoDS_Iterator aIt1, aIt2;
|
||||
TopTools_ListIteratorOfListOfShape aItS;
|
||||
TopTools_ListIteratorOfListOfShape aItS;
|
||||
BRep_Builder aBB;
|
||||
TopoDS_Shell aShD;
|
||||
TopoDS_Shape aFSDx, aFx;
|
||||
@ -128,49 +128,49 @@ static
|
||||
aOrF=aF.Orientation();
|
||||
//
|
||||
if (myImages.HasImage(aF)) {
|
||||
const TopTools_ListOfShape& aLSp=myImages.Image(aF);
|
||||
aItS.Initialize(aLSp);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
aFx=aItS.Value();
|
||||
//
|
||||
if (mySameDomainShapes.Contains(aFx)) {
|
||||
aFSDx=mySameDomainShapes.FindFromKey(aFx);
|
||||
//
|
||||
if (aOrF==TopAbs_INTERNAL) {
|
||||
aFSDx.Orientation(aOrF);
|
||||
theLIF.Append(aFSDx);
|
||||
}
|
||||
else {
|
||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFSDx, aF, aCtx);
|
||||
if (bToReverse) {
|
||||
aFSDx.Reverse();
|
||||
}
|
||||
//
|
||||
iFlag=1;
|
||||
aBB.Add(aShD, aFSDx);
|
||||
}
|
||||
}// if (mySameDomainShapes.Contains(aFx)) {
|
||||
else {
|
||||
aFx.Orientation(aOrF);
|
||||
if (aOrF==TopAbs_INTERNAL) {
|
||||
theLIF.Append(aFx);
|
||||
}
|
||||
else{
|
||||
iFlag=1;
|
||||
aBB.Add(aShD, aFx);
|
||||
}
|
||||
}
|
||||
}
|
||||
const TopTools_ListOfShape& aLSp=myImages.Image(aF);
|
||||
aItS.Initialize(aLSp);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
aFx=aItS.Value();
|
||||
//
|
||||
if (mySameDomainShapes.Contains(aFx)) {
|
||||
aFSDx=mySameDomainShapes.FindFromKey(aFx);
|
||||
//
|
||||
if (aOrF==TopAbs_INTERNAL) {
|
||||
aFSDx.Orientation(aOrF);
|
||||
theLIF.Append(aFSDx);
|
||||
}
|
||||
else {
|
||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFSDx, aF, aCtx);
|
||||
if (bToReverse) {
|
||||
aFSDx.Reverse();
|
||||
}
|
||||
//
|
||||
iFlag=1;
|
||||
aBB.Add(aShD, aFSDx);
|
||||
}
|
||||
}// if (mySameDomainShapes.Contains(aFx)) {
|
||||
else {
|
||||
aFx.Orientation(aOrF);
|
||||
if (aOrF==TopAbs_INTERNAL) {
|
||||
theLIF.Append(aFx);
|
||||
}
|
||||
else{
|
||||
iFlag=1;
|
||||
aBB.Add(aShD, aFx);
|
||||
}
|
||||
}
|
||||
}
|
||||
} //if (myImages.HasImage(aF)) {
|
||||
//
|
||||
else {
|
||||
if (aOrF==TopAbs_INTERNAL) {
|
||||
theLIF.Append(aF);
|
||||
}
|
||||
else{
|
||||
iFlag=1;
|
||||
aBB.Add(aShD, aF);
|
||||
}
|
||||
if (aOrF==TopAbs_INTERNAL) {
|
||||
theLIF.Append(aF);
|
||||
}
|
||||
else{
|
||||
iFlag=1;
|
||||
aBB.Add(aShD, aF);
|
||||
}
|
||||
}
|
||||
} //for (; aIt2.More(); aIt2.Next()) {
|
||||
//
|
||||
@ -198,7 +198,7 @@ static
|
||||
TopTools_IndexedMapOfShape aMSolids, aMS, aMFaces, aMFIN;
|
||||
TopTools_MapOfShape aMFDone;
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aMEF;
|
||||
TopTools_ListIteratorOfListOfShape aItS;
|
||||
TopTools_ListIteratorOfListOfShape aItS;
|
||||
TopoDS_Iterator aIt, aItF;
|
||||
BRep_Builder aBB;
|
||||
TopoDS_Solid aSolidSp;
|
||||
@ -218,28 +218,28 @@ static
|
||||
else if (aType==TopAbs_FACE) {
|
||||
// all faces (originals from DS or theirs images)
|
||||
if (myImages.HasImage(aS)) {
|
||||
const TopTools_ListOfShape& aLS=myImages.Image(aS);
|
||||
aItS.Initialize(aLS);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aFx=aItS.Value();
|
||||
//
|
||||
if (mySameDomainShapes.Contains(aFx)) {
|
||||
const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aFx);
|
||||
aMFaces.Add(aFSDx);
|
||||
}
|
||||
else {
|
||||
aMFaces.Add(aFx);
|
||||
}
|
||||
}
|
||||
const TopTools_ListOfShape& aLS=myImages.Image(aS);
|
||||
aItS.Initialize(aLS);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aFx=aItS.Value();
|
||||
//
|
||||
if (mySameDomainShapes.Contains(aFx)) {
|
||||
const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aFx);
|
||||
aMFaces.Add(aFSDx);
|
||||
}
|
||||
else {
|
||||
aMFaces.Add(aFx);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (mySameDomainShapes.Contains(aS)) {
|
||||
const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aS);
|
||||
aMFaces.Add(aFSDx);
|
||||
}
|
||||
else {
|
||||
aMFaces.Add(aS);
|
||||
}
|
||||
if (mySameDomainShapes.Contains(aS)) {
|
||||
const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aS);
|
||||
aMFaces.Add(aFSDx);
|
||||
}
|
||||
else {
|
||||
aMFaces.Add(aS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -268,22 +268,22 @@ static
|
||||
const TopoDS_Shape& aShell=aIt.Value();
|
||||
//
|
||||
if (myImages.HasImage(aShell)) {
|
||||
bHasImage=Standard_True;
|
||||
//
|
||||
const TopTools_ListOfShape& aLS=myImages.Image(aShell);
|
||||
aItS.Initialize(aLS);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aSx=aItS.Value();
|
||||
aMS.Add(aSx);
|
||||
TopExp::MapShapes(aSx, TopAbs_FACE, aMS);
|
||||
TopExp::MapShapes(aSx, TopAbs_EDGE, aMS);
|
||||
TopExp::MapShapesAndAncestors(aSx, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
||||
}
|
||||
bHasImage=Standard_True;
|
||||
//
|
||||
const TopTools_ListOfShape& aLS=myImages.Image(aShell);
|
||||
aItS.Initialize(aLS);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aSx=aItS.Value();
|
||||
aMS.Add(aSx);
|
||||
TopExp::MapShapes(aSx, TopAbs_FACE, aMS);
|
||||
TopExp::MapShapes(aSx, TopAbs_EDGE, aMS);
|
||||
TopExp::MapShapesAndAncestors(aSx, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
||||
}
|
||||
}
|
||||
else {
|
||||
//aMS.Add(aShell);
|
||||
TopExp::MapShapes(aShell, TopAbs_FACE, aMS);
|
||||
TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
||||
//aMS.Add(aShell);
|
||||
TopExp::MapShapes(aShell, TopAbs_FACE, aMS);
|
||||
TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -298,7 +298,7 @@ static
|
||||
for (j=1; j<=aNbFaces; ++j) {
|
||||
const TopoDS_Shape& aFace=aMFaces(j);
|
||||
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);
|
||||
//
|
||||
if (aMEF.Contains(aE)) { // !!
|
||||
const TopTools_ListOfShape& aLF=aMEFP(j);
|
||||
aItFP.Initialize(aLF);
|
||||
for (; aItFP.More(); aItFP.Next()) {
|
||||
const TopoDS_Shape& aF=aItFP.Value();
|
||||
if (aMFence.Add(aF)) {
|
||||
aLFP1.Append(aF);
|
||||
}
|
||||
}
|
||||
const TopTools_ListOfShape& aLF=aMEFP(j);
|
||||
aItFP.Initialize(aLF);
|
||||
for (; aItFP.More(); aItFP.Next()) {
|
||||
const TopoDS_Shape& aF=aItFP.Value();
|
||||
if (aMFence.Add(aF)) {
|
||||
aLFP1.Append(aF);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
aLEx.Append(aE);
|
||||
aLEx.Append(aE);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -331,10 +331,10 @@ static
|
||||
const TopTools_ListOfShape& aLF=aMEFP.FindFromKey(aE);
|
||||
aItFP.Initialize(aLF);
|
||||
for (; aItFP.More(); aItFP.Next()) {
|
||||
const TopoDS_Shape& aF=aItFP.Value();
|
||||
if (aMFence.Add(aF)) {
|
||||
aLFP2.Append(aF);
|
||||
}
|
||||
const TopoDS_Shape& aF=aItFP.Value();
|
||||
if (aMFence.Add(aF)) {
|
||||
aLFP2.Append(aF);
|
||||
}
|
||||
}
|
||||
}
|
||||
aLFP1.Append(aLFP2);
|
||||
@ -346,7 +346,7 @@ static
|
||||
for (; aItFP.More(); aItFP.Next()) {
|
||||
const TopoDS_Shape& aSP=aItFP.Value();
|
||||
if (!aMFDone.Add(aSP)) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
@ -360,10 +360,10 @@ static
|
||||
aLFP.Append(aFP);
|
||||
aItS.Initialize(aLFP1);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aSk=aItS.Value();
|
||||
if (!aMFDone.Contains(aSk)) {
|
||||
aLFP.Append(aSk);
|
||||
}
|
||||
const TopoDS_Shape& aSk=aItS.Value();
|
||||
if (!aMFDone.Contains(aSk)) {
|
||||
aLFP.Append(aSk);
|
||||
}
|
||||
}
|
||||
//
|
||||
// Connexity Block that spreads from aFP the Bound
|
||||
@ -374,16 +374,16 @@ static
|
||||
// fill states for the Connexity Block
|
||||
aItS.Initialize(aLCBF);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aSx=aItS.Value();
|
||||
aMFDone.Add(aSx);
|
||||
if (aState==TopAbs_IN) {
|
||||
aMFIN.Add(aSx);
|
||||
}
|
||||
const TopoDS_Shape& aSx=aItS.Value();
|
||||
aMFDone.Add(aSx);
|
||||
if (aState==TopAbs_IN) {
|
||||
aMFIN.Add(aSx);
|
||||
}
|
||||
}
|
||||
//
|
||||
aNbFPx=aMFDone.Extent();
|
||||
if (aNbFPx==aNbFP) {
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}//for (; aItFP.More(); aItFP.Next())
|
||||
//
|
||||
@ -392,14 +392,14 @@ static
|
||||
aNbFIN=aMFIN.Extent();
|
||||
if (aNbFIN || aNbLIF) {
|
||||
for (j=1; j<=aNbFIN; ++j) {
|
||||
const TopoDS_Shape& aFIN=aMFIN(j);
|
||||
aLFIN.Append(aFIN);
|
||||
const TopoDS_Shape& aFIN=aMFIN(j);
|
||||
aLFIN.Append(aFIN);
|
||||
}
|
||||
//
|
||||
aItS.Initialize(aLIF);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aFIN=aItS.Value();
|
||||
aLFIN.Append(aFIN);
|
||||
const TopoDS_Shape& aFIN=aItS.Value();
|
||||
aLFIN.Append(aFIN);
|
||||
}
|
||||
//
|
||||
myInParts.Add(aSolid, aLFIN);
|
||||
@ -499,18 +499,18 @@ static
|
||||
const TopoDS_Shape& aSR=aItSS.Key();
|
||||
const GEOMAlgo_ShapeSet& aSSR=aItSS.Value();
|
||||
if (aSSi.Contains(aSSR)) {
|
||||
// the aSR is SD solid for aS
|
||||
aSSi.Subtract(aSSR);
|
||||
// update images
|
||||
if(myImages.HasImage(aS)) {
|
||||
myImages.Add(aS, aSR);
|
||||
}
|
||||
else {
|
||||
myImages.Bind(aS, aSR);
|
||||
}
|
||||
//
|
||||
// update SD Shapes
|
||||
mySameDomainShapes.Add(aSR, aSR);
|
||||
// the aSR is SD solid for aS
|
||||
aSSi.Subtract(aSSR);
|
||||
// update images
|
||||
if(myImages.HasImage(aS)) {
|
||||
myImages.Add(aS, aSR);
|
||||
}
|
||||
else {
|
||||
myImages.Bind(aS, aSR);
|
||||
}
|
||||
//
|
||||
// update SD Shapes
|
||||
mySameDomainShapes.Add(aSR, aSR);
|
||||
}
|
||||
}
|
||||
const TopTools_ListOfShape& aSFS1=aSSi.GetSet();
|
||||
@ -535,8 +535,8 @@ static
|
||||
aSSi.Clear();
|
||||
aExp.Init(aSR, TopAbs_FACE);
|
||||
for (; aExp.More(); aExp.Next()) {
|
||||
const TopoDS_Shape& aF=aExp.Current();
|
||||
aSSi.Add(aF);
|
||||
const TopoDS_Shape& aF=aExp.Current();
|
||||
aSSi.Add(aF);
|
||||
}
|
||||
aMSS.Bind(aSR, aSSi);
|
||||
}
|
||||
@ -574,8 +574,8 @@ static
|
||||
const TopoDS_Shape& aSR=aItSS.Key();
|
||||
const GEOMAlgo_ShapeSet& aSSR=aItSS.Value();
|
||||
if (aSSi.Contains(aSSR)) {
|
||||
myImages.Bind(aS, aSR);
|
||||
break;
|
||||
myImages.Bind(aS, aSR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} //for (i=1; i<=aNbS; ++i)
|
||||
@ -618,7 +618,7 @@ static
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aS=aIt.Value();
|
||||
if (aMFence.Add(aS)) {
|
||||
aLSI.Append(aS);
|
||||
aLSI.Append(aS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -631,10 +631,10 @@ static
|
||||
const TopoDS_Shape& aW=aIt.Value();
|
||||
aItS.Initialize(aW);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aE=aItS.Value();
|
||||
if (aMFence.Add(aE)) {
|
||||
aLSI.Append(aE);
|
||||
}
|
||||
const TopoDS_Shape& aE=aItS.Value();
|
||||
if (aMFence.Add(aE)) {
|
||||
aLSI.Append(aE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -646,8 +646,8 @@ static
|
||||
const TopTools_ListOfShape &aLSp=myImages.Image(aS);
|
||||
aIt.Initialize(aLSp);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aSI=aIt.Value();
|
||||
aMSI.Add(aSI);
|
||||
const TopoDS_Shape& aSI=aIt.Value();
|
||||
aMSI.Add(aSI);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -672,42 +672,42 @@ static
|
||||
//
|
||||
aNbSx=aMx.Extent();
|
||||
for (j=1; j<=aNbSx; ++j) {
|
||||
const TopoDS_Shape& aSI=aMx(j);
|
||||
if (myImages.HasImage(aSI)) {
|
||||
const TopTools_ListOfShape &aLSp=myImages.Image(aSI);
|
||||
aIt.Initialize(aLSp);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aSp=aIt.Value();
|
||||
aMSI.Add(aSp);
|
||||
}
|
||||
}
|
||||
else {
|
||||
aMSI.Add(aSI);
|
||||
}
|
||||
const TopoDS_Shape& aSI=aMx(j);
|
||||
if (myImages.HasImage(aSI)) {
|
||||
const TopTools_ListOfShape &aLSp=myImages.Image(aSI);
|
||||
aIt.Initialize(aLSp);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aSp=aIt.Value();
|
||||
aMSI.Add(aSp);
|
||||
}
|
||||
}
|
||||
else {
|
||||
aMSI.Add(aSI);
|
||||
}
|
||||
}
|
||||
//
|
||||
// build aux map from splits of solids
|
||||
if (myImages.HasImage(aS)) {
|
||||
const TopTools_ListOfShape &aLSp=myImages.Image(aS);
|
||||
aIt.Initialize(aLSp);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aSp=aIt.Value();
|
||||
if (aMFence.Add(aSp)) {
|
||||
TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
|
||||
TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_FACE, aMSx);
|
||||
TopExp::MapShapesAndAncestors(aSp, TopAbs_EDGE , TopAbs_FACE, aMSx);
|
||||
aLSd.Append(aSp);
|
||||
}
|
||||
}
|
||||
const TopTools_ListOfShape &aLSp=myImages.Image(aS);
|
||||
aIt.Initialize(aLSp);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aSp=aIt.Value();
|
||||
if (aMFence.Add(aSp)) {
|
||||
TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
|
||||
TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_FACE, aMSx);
|
||||
TopExp::MapShapesAndAncestors(aSp, TopAbs_EDGE , TopAbs_FACE, aMSx);
|
||||
aLSd.Append(aSp);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (aMFence.Add(aS)) {
|
||||
TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
|
||||
TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_FACE, aMSx);
|
||||
TopExp::MapShapesAndAncestors(aS, TopAbs_EDGE , TopAbs_FACE, aMSx);
|
||||
aLSd.Append(aS);
|
||||
aMSOr.Add(aS);
|
||||
}
|
||||
if (aMFence.Add(aS)) {
|
||||
TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
|
||||
TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_FACE, aMSx);
|
||||
TopExp::MapShapesAndAncestors(aS, TopAbs_EDGE , TopAbs_FACE, aMSx);
|
||||
aLSd.Append(aS);
|
||||
aMSOr.Add(aS);
|
||||
}
|
||||
}
|
||||
}//if (aType==TopAbs_SOLID)
|
||||
}
|
||||
@ -723,7 +723,7 @@ static
|
||||
const TopTools_ListOfShape &aLSx=aMSx.FindFromKey(aSI);
|
||||
aNbSx=aLSx.Extent();
|
||||
if (aNbSx) {
|
||||
aMSI.Remove(aSI);
|
||||
aMSI.Remove(aSI);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -747,29 +747,29 @@ static
|
||||
//
|
||||
aState=GEOMAlgo_Tools3D::ComputeStateByOnePoint(aSI, aSd, 1.e-11, aCtx);
|
||||
if (aState==TopAbs_IN) {
|
||||
//
|
||||
if(aMSOr.Contains(aSd)) {
|
||||
//
|
||||
TopoDS_Solid aSdx;
|
||||
//
|
||||
aBB.MakeSolid(aSdx);
|
||||
aItS.Initialize(aSd);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aSh=aItS.Value();
|
||||
aBB.Add(aSdx, aSh);
|
||||
}
|
||||
//
|
||||
aBB.Add(aSdx, aSI);
|
||||
//
|
||||
myImages.Bind(aSd, aSdx);
|
||||
aMSOr.Remove(aSd);
|
||||
aSd=aSdx;
|
||||
}
|
||||
else {
|
||||
aBB.Add(aSd, aSI);
|
||||
}
|
||||
//
|
||||
aMSI.Remove(aSI);
|
||||
//
|
||||
if(aMSOr.Contains(aSd)) {
|
||||
//
|
||||
TopoDS_Solid aSdx;
|
||||
//
|
||||
aBB.MakeSolid(aSdx);
|
||||
aItS.Initialize(aSd);
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aSh=aItS.Value();
|
||||
aBB.Add(aSdx, aSh);
|
||||
}
|
||||
//
|
||||
aBB.Add(aSdx, aSI);
|
||||
//
|
||||
myImages.Bind(aSd, aSdx);
|
||||
aMSOr.Remove(aSd);
|
||||
aSd=aSdx;
|
||||
}
|
||||
else {
|
||||
aBB.Add(aSd, aSI);
|
||||
}
|
||||
//
|
||||
aMSI.Remove(aSI);
|
||||
} //if (aState==TopAbs_IN) {
|
||||
}// for (; aItM.More(); aItM.Next()) {
|
||||
}//for (; aIt1.More(); aIt1.Next()) {
|
||||
@ -779,7 +779,7 @@ static
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void OwnInternalShapes(const TopoDS_Shape& theS,
|
||||
TopTools_IndexedMapOfShape& theMx)
|
||||
TopTools_IndexedMapOfShape& theMx)
|
||||
{
|
||||
TopoDS_Iterator aIt;
|
||||
//
|
||||
|
@ -19,9 +19,9 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_Builder_4.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
// File: GEOMAlgo_Builder_4.cxx
|
||||
// Created:
|
||||
// Author: Peter KURNEV
|
||||
//
|
||||
#include <GEOMAlgo_Builder.hxx>
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
static
|
||||
void MapShapes(const TopoDS_Shape& aS,
|
||||
TopTools_MapOfShape& aM);
|
||||
TopTools_MapOfShape& aM);
|
||||
|
||||
//=======================================================================
|
||||
//function : Generated
|
||||
@ -78,21 +78,21 @@ static
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aSp=aIt.Value();
|
||||
if (mySameDomainShapes.Contains(aSp)) {
|
||||
if (myMapShape.Contains(aSp)) {
|
||||
TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
|
||||
//
|
||||
if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
||||
aSpR.Orientation(theS.Orientation());
|
||||
}
|
||||
else {
|
||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSpR, theS, aCtx);
|
||||
if (bToReverse) {
|
||||
aSpR.Reverse();
|
||||
}
|
||||
}
|
||||
//
|
||||
myHistShapes.Append(aSpR);
|
||||
}
|
||||
if (myMapShape.Contains(aSp)) {
|
||||
TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
|
||||
//
|
||||
if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
||||
aSpR.Orientation(theS.Orientation());
|
||||
}
|
||||
else {
|
||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSpR, theS, aCtx);
|
||||
if (bToReverse) {
|
||||
aSpR.Reverse();
|
||||
}
|
||||
}
|
||||
//
|
||||
myHistShapes.Append(aSpR);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -133,20 +133,20 @@ static
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
TopoDS_Shape aSp=aIt.Value();
|
||||
if (!mySameDomainShapes.Contains(aSp)) {
|
||||
if (myMapShape.Contains(aSp)) {
|
||||
//
|
||||
if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
||||
aSp.Orientation(theS.Orientation());
|
||||
}
|
||||
else {
|
||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSp, theS, aCtx);
|
||||
if (bToReverse) {
|
||||
aSp.Reverse();
|
||||
}
|
||||
}
|
||||
//
|
||||
myHistShapes.Append(aSp);
|
||||
}
|
||||
if (myMapShape.Contains(aSp)) {
|
||||
//
|
||||
if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
||||
aSp.Orientation(theS.Orientation());
|
||||
}
|
||||
else {
|
||||
bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSp, theS, aCtx);
|
||||
if (bToReverse) {
|
||||
aSp.Reverse();
|
||||
}
|
||||
}
|
||||
//
|
||||
myHistShapes.Append(aSp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -188,15 +188,15 @@ static
|
||||
TopoDS_Shape aSp=aIt.Value();
|
||||
//
|
||||
if (!mySameDomainShapes.Contains(aSp)) {
|
||||
if (myMapShape.Contains(aSp)) {
|
||||
return bRet; //false
|
||||
}
|
||||
if (myMapShape.Contains(aSp)) {
|
||||
return bRet; //false
|
||||
}
|
||||
}
|
||||
else {
|
||||
TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
|
||||
if (myMapShape.Contains(aSpR)) {
|
||||
return bRet; //false
|
||||
}
|
||||
TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp);
|
||||
if (myMapShape.Contains(aSpR)) {
|
||||
return bRet; //false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -244,18 +244,18 @@ static
|
||||
bHasImage=myImages.HasImage(aSx);
|
||||
if (!bHasImage) {
|
||||
if (myMapShape.Contains(aSx)) {
|
||||
aLSx.Append(aSx);
|
||||
myImagesResult.Add(aSx, aLSx);
|
||||
aLSx.Append(aSx);
|
||||
myImagesResult.Add(aSx, aLSx);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
|
||||
aIt.Initialize(aLSp);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aSp=aIt.Value();
|
||||
if (myMapShape.Contains(aSp)) {
|
||||
aLSx.Append(aSp);
|
||||
}
|
||||
const TopoDS_Shape& aSp=aIt.Value();
|
||||
if (myMapShape.Contains(aSp)) {
|
||||
aLSx.Append(aSp);
|
||||
}
|
||||
}
|
||||
myImagesResult.Add(aSx, aLSx);
|
||||
}
|
||||
@ -269,32 +269,32 @@ static
|
||||
//
|
||||
if (!myHasGenerated || !myHasModified) {
|
||||
if (aType==TopAbs_EDGE || aType==TopAbs_FACE ||
|
||||
aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
||||
//modified by NIZNHY-PKV Thu Dec 7 11:53:01 2006f
|
||||
//bHasImage=myImages.HasImage(aSx);
|
||||
//modified by NIZNHY-PKV Thu Dec 7 11:53:04 2006t
|
||||
if (bHasImage) {
|
||||
const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
|
||||
aIt.Initialize(aLSp);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aSp=aIt.Value();
|
||||
//
|
||||
if (myMapShape.Contains(aSp)) {
|
||||
bContainsSD=mySameDomainShapes.Contains(aSp);
|
||||
//
|
||||
if (!myHasGenerated) {
|
||||
if (bContainsSD) {
|
||||
myHasGenerated=Standard_True;
|
||||
}
|
||||
}
|
||||
if (!myHasModified) {
|
||||
if (!bContainsSD) {
|
||||
myHasModified=Standard_True;
|
||||
}
|
||||
}
|
||||
} // if (myMapShape.Contains(aSp))
|
||||
}
|
||||
}
|
||||
aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
|
||||
//modified by NIZNHY-PKV Thu Dec 7 11:53:01 2006f
|
||||
//bHasImage=myImages.HasImage(aSx);
|
||||
//modified by NIZNHY-PKV Thu Dec 7 11:53:04 2006t
|
||||
if (bHasImage) {
|
||||
const TopTools_ListOfShape& aLSp=myImages.Image(aSx);
|
||||
aIt.Initialize(aLSp);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aSp=aIt.Value();
|
||||
//
|
||||
if (myMapShape.Contains(aSp)) {
|
||||
bContainsSD=mySameDomainShapes.Contains(aSp);
|
||||
//
|
||||
if (!myHasGenerated) {
|
||||
if (bContainsSD) {
|
||||
myHasGenerated=Standard_True;
|
||||
}
|
||||
}
|
||||
if (!myHasModified) {
|
||||
if (!bContainsSD) {
|
||||
myHasModified=Standard_True;
|
||||
}
|
||||
}
|
||||
} // if (myMapShape.Contains(aSp))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -305,7 +305,7 @@ static
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void MapShapes(const TopoDS_Shape& theS,
|
||||
TopTools_MapOfShape& theM)
|
||||
TopTools_MapOfShape& theM)
|
||||
{
|
||||
theM.Add(theS);
|
||||
TopoDS_Iterator anIt;
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_Classifier.cxx
|
||||
// Created: Wed Nov 22 10:23:04 2006
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
// File: GEOMAlgo_Classifier.cxx
|
||||
// Created: Wed Nov 22 10:23:04 2006
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
//
|
||||
#include <GEOMAlgo_Clsf.ixx>
|
||||
|
||||
|
@ -90,7 +90,7 @@ Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aS
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -39,10 +39,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_Clsf_Type_()
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_Clsf",
|
||||
sizeof(GEOMAlgo_Clsf),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_Clsf),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_ClsfSurf.cxx
|
||||
// Created: Wed Nov 22 10:41:47 2006
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
// File: GEOMAlgo_ClsfSurf.cxx
|
||||
// Created: Wed Nov 22 10:41:47 2006
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
//
|
||||
#include <GEOMAlgo_ClsfBox.ixx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
@ -165,18 +165,18 @@
|
||||
switch (aSt) {
|
||||
case TopAbs_OUT:
|
||||
myState=aSt;
|
||||
iNext=0;
|
||||
break;
|
||||
iNext=0;
|
||||
break;
|
||||
case TopAbs_ON:
|
||||
++aNbON;
|
||||
break;
|
||||
++aNbON;
|
||||
break;
|
||||
case TopAbs_IN:
|
||||
++aNbIN;
|
||||
break;
|
||||
++aNbIN;
|
||||
break;
|
||||
default:
|
||||
myState=TopAbs_UNKNOWN;
|
||||
iNext=0;
|
||||
break;
|
||||
myState=TopAbs_UNKNOWN;
|
||||
iNext=0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//
|
||||
|
@ -88,7 +88,7 @@ Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aS
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -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_Type _aType = new Standard_Type("GEOMAlgo_ClsfBox",
|
||||
sizeof(GEOMAlgo_ClsfBox),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_ClsfBox),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_ClsfSolid.cxx
|
||||
// Created: Mon Jan 29 10:35:46 2007
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
// File: GEOMAlgo_ClsfSolid.cxx
|
||||
// Created: Mon Jan 29 10:35:46 2007
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
//
|
||||
#include <GEOMAlgo_ClsfSolid.ixx>
|
||||
|
||||
|
@ -71,7 +71,7 @@ Standard_EXPORT virtual void CheckData() ;
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -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_Type _aType = new Standard_Type("GEOMAlgo_ClsfSolid",
|
||||
sizeof(GEOMAlgo_ClsfSolid),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_ClsfSolid),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_ClsfSurf.cxx
|
||||
// Created: Wed Nov 22 10:41:47 2006
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
// File: GEOMAlgo_ClsfSurf.cxx
|
||||
// Created: Wed Nov 22 10:41:47 2006
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
//
|
||||
#include <GEOMAlgo_ClsfSurf.ixx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
@ -79,8 +79,8 @@
|
||||
myGAS.Load(myS);
|
||||
aType=myGAS.GetType();
|
||||
if (!(aType==GeomAbs_Plane ||
|
||||
aType==GeomAbs_Cylinder ||
|
||||
aType==GeomAbs_Sphere)) {
|
||||
aType==GeomAbs_Cylinder ||
|
||||
aType==GeomAbs_Sphere)) {
|
||||
myErrorStatus=11; // unallowed surface type
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aS
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -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_Type _aType = new Standard_Type("GEOMAlgo_ClsfSurf",
|
||||
sizeof(GEOMAlgo_ClsfSurf),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_ClsfSurf),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_CoupleOfShapes.cxx
|
||||
// Created: Wed Dec 15 13:03:52 2004
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
// File: GEOMAlgo_CoupleOfShapes.cxx
|
||||
// Created: Wed Dec 15 13:03:52 2004
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
//
|
||||
#include <GEOMAlgo_CoupleOfShapes.ixx>
|
||||
//=======================================================================
|
||||
@ -36,7 +36,7 @@ GEOMAlgo_CoupleOfShapes::GEOMAlgo_CoupleOfShapes()
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1,
|
||||
const TopoDS_Shape& aS2)
|
||||
const TopoDS_Shape& aS2)
|
||||
{
|
||||
myShape1=aS1;
|
||||
myShape2=aS2;
|
||||
@ -46,7 +46,7 @@ void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1,
|
||||
TopoDS_Shape& aS2)const
|
||||
TopoDS_Shape& aS2)const
|
||||
{
|
||||
aS1=myShape1;
|
||||
aS2=myShape2;
|
||||
|
@ -67,7 +67,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger(const GEOMAlgo_PassKey& K,const St
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInte
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger",
|
||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape(const GEOMAlgo_PassKeyShape& K,
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -54,10 +54,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShap
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape",
|
||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape(const Standard_Real& K,const TopT
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfRealListOfS
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape",
|
||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfShapeReal(const TopoDS_Shape& K,const Standard_Re
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_T
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeReal",
|
||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet(const TopoDS_Shape& K,const GEOMAlg
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -54,10 +54,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeS
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet",
|
||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_FinderShapeOn.cxx
|
||||
// Created: Tue Jan 11 14:44:31 2005
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
// File: GEOMAlgo_FinderShapeOn.cxx
|
||||
// Created: Tue Jan 11 14:44:31 2005
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
//
|
||||
#include <GEOMAlgo_FinderShapeOn.ixx>
|
||||
|
||||
@ -352,12 +352,12 @@ void GEOMAlgo_FinderShapeOn::Find(const TopoDS_Shape& aS)
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aSImage=aIt.Value();
|
||||
if (myImages.IsBound(aSImage)) {
|
||||
const TopoDS_Shape& aSx=myImages.Find(aSImage);
|
||||
myMSS.Add(aSx, aSts[i]);
|
||||
const TopoDS_Shape& aSx=myImages.Find(aSImage);
|
||||
myMSS.Add(aSx, aSts[i]);
|
||||
}
|
||||
else {
|
||||
myErrorStatus=33;// can not find original shape
|
||||
return;
|
||||
myErrorStatus=33;// can not find original shape
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -403,21 +403,21 @@ void GEOMAlgo_FinderShapeOn::MakeArgument1()
|
||||
switch (aType) {
|
||||
case TopAbs_VERTEX: {
|
||||
const TopoDS_Vertex& aVx=TopoDS::Vertex(aS);
|
||||
aBB.UpdateVertex(aVx, myTolerance);
|
||||
aBB.UpdateVertex(aVx, myTolerance);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case TopAbs_EDGE: {
|
||||
const TopoDS_Edge& aEx=TopoDS::Edge(aS);
|
||||
aBB.UpdateEdge(aEx, myTolerance);
|
||||
aBB.UpdateEdge(aEx, myTolerance);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case TopAbs_FACE: {
|
||||
const TopoDS_Face& aFx=TopoDS::Face(aS);
|
||||
aBB.UpdateFace(aFx, myTolerance);
|
||||
aBB.UpdateFace(aFx, myTolerance);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} //
|
||||
@ -468,9 +468,9 @@ void GEOMAlgo_FinderShapeOn::CheckData()
|
||||
}
|
||||
//
|
||||
if (!(myShapeType==TopAbs_VERTEX ||
|
||||
myShapeType==TopAbs_EDGE ||
|
||||
myShapeType==TopAbs_FACE ||
|
||||
myShapeType==TopAbs_SOLID)) {
|
||||
myShapeType==TopAbs_EDGE ||
|
||||
myShapeType==TopAbs_FACE ||
|
||||
myShapeType==TopAbs_SOLID)) {
|
||||
myErrorStatus=12; // unallowed subshape type
|
||||
return;
|
||||
}
|
||||
@ -487,9 +487,9 @@ void GEOMAlgo_FinderShapeOn::CheckData()
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_FinderShapeOn::CopySource(const TopoDS_Shape& aE,
|
||||
TopTools_DataMapOfShapeShape& aImages,
|
||||
TopTools_DataMapOfShapeShape& aOriginals,
|
||||
TopoDS_Shape& aEx)
|
||||
TopTools_DataMapOfShapeShape& aImages,
|
||||
TopTools_DataMapOfShapeShape& aOriginals,
|
||||
TopoDS_Shape& aEx)
|
||||
{
|
||||
Standard_Boolean bFree;
|
||||
TopAbs_ShapeEnum aType;
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_FinderShapeOn1.cxx
|
||||
// Created: Fri Mar 4 10:31:06 2005
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
// File: GEOMAlgo_FinderShapeOn1.cxx
|
||||
// Created: Fri Mar 4 10:31:06 2005
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
//
|
||||
#include <GEOMAlgo_FinderShapeOn1.ixx>
|
||||
#include <math.h>
|
||||
@ -280,7 +280,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessVertices()
|
||||
//
|
||||
if (myShapeType==TopAbs_VERTEX){
|
||||
if (bIsConformState) {
|
||||
myMSS.Add(aV, aSt);
|
||||
myMSS.Add(aV, aSt);
|
||||
}
|
||||
}
|
||||
else if (bIsConformState || aSt==TopAbs_ON) {
|
||||
@ -320,11 +320,11 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges()
|
||||
//
|
||||
bIsConformState=myMSS.Contains(aV);
|
||||
if (!bIsConformState) {
|
||||
break;// vertex has non-conformed state
|
||||
break;// vertex has non-conformed state
|
||||
}
|
||||
else {
|
||||
aSt=myMSS.FindFromKey(aV);
|
||||
aSC.AppendState(aSt);
|
||||
aSt=myMSS.FindFromKey(aV);
|
||||
aSC.AppendState(aSt);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -348,7 +348,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges()
|
||||
//
|
||||
aType2=aGAC.GetType();
|
||||
if (aType2==GeomAbs_Line) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -361,16 +361,16 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges()
|
||||
aIt.Initialize(aLP);
|
||||
for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
|
||||
if (myNbPntsMax) {
|
||||
if (iCnt > myNbPntsMax) {
|
||||
break;
|
||||
}
|
||||
if (iCnt > myNbPntsMax) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
//
|
||||
const gp_Pnt& aP=aIt.Value();
|
||||
aSt = GetPointState( aP );
|
||||
bIsToBreak=aSC.AppendState(aSt);
|
||||
if (bIsToBreak) {
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -379,7 +379,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges()
|
||||
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
|
||||
if (myShapeType==TopAbs_EDGE) {
|
||||
if (bIsConformState) {
|
||||
myMSS.Add(aE, aSt);
|
||||
myMSS.Add(aE, aSt);
|
||||
}
|
||||
}
|
||||
else if (bIsConformState || aSt==TopAbs_ON) {
|
||||
@ -421,7 +421,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces()
|
||||
aGAS.Load(aS);
|
||||
aType2=aGAS.GetType();
|
||||
if (aType2!=aType1) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -430,11 +430,11 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces()
|
||||
const TopoDS_Shape& aE=aExp.Current();
|
||||
bIsConformState=myMSS.Contains(aE);
|
||||
if (!bIsConformState) {
|
||||
break;// edge has non-conformed state
|
||||
break;// edge has non-conformed state
|
||||
}
|
||||
else {
|
||||
aSt=myMSS.FindFromKey(aE);
|
||||
aSC.AppendState(aSt);
|
||||
aSt=myMSS.FindFromKey(aE);
|
||||
aSC.AppendState(aSt);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -451,16 +451,16 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces()
|
||||
aIt.Initialize(aLP);
|
||||
for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
|
||||
if (myNbPntsMax) {
|
||||
if (iCnt > myNbPntsMax) {
|
||||
break;
|
||||
}
|
||||
if (iCnt > myNbPntsMax) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
//
|
||||
const gp_Pnt& aP=aIt.Value();
|
||||
aSt = GetPointState( aP );
|
||||
bIsToBreak=aSC.AppendState(aSt);
|
||||
if (bIsToBreak) {
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -469,7 +469,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces()
|
||||
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
|
||||
if (myShapeType==TopAbs_FACE) {
|
||||
if (bIsConformState) {
|
||||
myMSS.Add(aF, aSt);
|
||||
myMSS.Add(aF, aSt);
|
||||
}
|
||||
}
|
||||
else if (bIsConformState || aSt==TopAbs_ON) {
|
||||
@ -503,11 +503,11 @@ void GEOMAlgo_FinderShapeOn1::ProcessSolids()
|
||||
const TopoDS_Shape& aF=aMF(j);
|
||||
bIsConformState=myMSS.Contains(aF);
|
||||
if (!bIsConformState) {
|
||||
break;// face has non-conformed state
|
||||
break;// face has non-conformed state
|
||||
}
|
||||
else {
|
||||
aSt=myMSS.FindFromKey(aF);
|
||||
aSC.AppendState(aSt);
|
||||
aSt=myMSS.FindFromKey(aF);
|
||||
aSC.AppendState(aSt);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -529,7 +529,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessSolids()
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
|
||||
GEOMAlgo_ListOfPnt& aLP)
|
||||
GEOMAlgo_ListOfPnt& aLP)
|
||||
{
|
||||
myErrorStatus=0;
|
||||
//
|
||||
@ -568,11 +568,11 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
|
||||
//
|
||||
aPK.SetIds(n[k], n[k+1]);
|
||||
if (aMPKI.IsBound(aPK)) {
|
||||
Standard_Integer& iCntX=aMPKI.ChangeFind(aPK);
|
||||
++iCntX;
|
||||
Standard_Integer& iCntX=aMPKI.ChangeFind(aPK);
|
||||
++iCntX;
|
||||
}
|
||||
else {
|
||||
aMPKI.Bind(aPK, 1);
|
||||
aMPKI.Bind(aPK, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -589,8 +589,8 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
|
||||
aNbMax=aPK.NbMax();
|
||||
pIds=(Standard_Integer*)aPK.Key();
|
||||
for (k=1; k<3; ++k) {
|
||||
aNx=*(pIds+aNbMax-k);
|
||||
aMBN.Add(aNx);
|
||||
aNx=*(pIds+aNbMax-k);
|
||||
aMBN.Add(aNx);
|
||||
}
|
||||
*/
|
||||
aNx=(Standard_Integer)aPK.Id(1);
|
||||
@ -629,49 +629,49 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
|
||||
aNbLinks=aMPKI.Extent();
|
||||
aIt.Initialize(aMPKI);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
iCnt=aIt.Value();
|
||||
if (iCnt>1) {
|
||||
// take the first having occured inner link
|
||||
// and discretize it
|
||||
const GEOMAlgo_PassKey& aPK=aIt.Key();
|
||||
//qf
|
||||
/*
|
||||
aNbMax=aPK.NbMax();
|
||||
pIds=(Standard_Integer*)aPK.Key();
|
||||
aN1=*(pIds+aNbMax-1);
|
||||
aN2=*(pIds+aNbMax-2);
|
||||
*/
|
||||
//
|
||||
aN1=(Standard_Integer)aPK.Id(1);
|
||||
aN2=(Standard_Integer)aPK.Id(2);
|
||||
//qt
|
||||
aP1=aNodes(aN1).Transformed(aTrsf);
|
||||
aP2=aNodes(aN2).Transformed(aTrsf);
|
||||
//
|
||||
if (aType==GeomAbs_Cylinder) {
|
||||
Standard_Real aTolSM;
|
||||
gp_Cylinder aCyl;
|
||||
//
|
||||
aTolSM=1.523e-6;//~1.-cos(0.1 deg)
|
||||
aCyl=aGAS.Cylinder();
|
||||
if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//
|
||||
BRepLib_MakeEdge aBME(aP1, aP2);
|
||||
bIsDone=aBME.IsDone();
|
||||
if (!bIsDone) {
|
||||
myErrorStatus=30; //can not obtain the line fron the link
|
||||
return;
|
||||
}
|
||||
//
|
||||
const TopoDS_Shape& aSx=aBME.Shape();
|
||||
const TopoDS_Edge& aE=TopoDS::Edge(aSx);
|
||||
//
|
||||
InnerPoints(aE, myNbPntsMin, aLP);
|
||||
break;
|
||||
}// if (iCnt>1)
|
||||
iCnt=aIt.Value();
|
||||
if (iCnt>1) {
|
||||
// take the first having occured inner link
|
||||
// and discretize it
|
||||
const GEOMAlgo_PassKey& aPK=aIt.Key();
|
||||
//qf
|
||||
/*
|
||||
aNbMax=aPK.NbMax();
|
||||
pIds=(Standard_Integer*)aPK.Key();
|
||||
aN1=*(pIds+aNbMax-1);
|
||||
aN2=*(pIds+aNbMax-2);
|
||||
*/
|
||||
//
|
||||
aN1=(Standard_Integer)aPK.Id(1);
|
||||
aN2=(Standard_Integer)aPK.Id(2);
|
||||
//qt
|
||||
aP1=aNodes(aN1).Transformed(aTrsf);
|
||||
aP2=aNodes(aN2).Transformed(aTrsf);
|
||||
//
|
||||
if (aType==GeomAbs_Cylinder) {
|
||||
Standard_Real aTolSM;
|
||||
gp_Cylinder aCyl;
|
||||
//
|
||||
aTolSM=1.523e-6;//~1.-cos(0.1 deg)
|
||||
aCyl=aGAS.Cylinder();
|
||||
if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//
|
||||
BRepLib_MakeEdge aBME(aP1, aP2);
|
||||
bIsDone=aBME.IsDone();
|
||||
if (!bIsDone) {
|
||||
myErrorStatus=30; //can not obtain the line fron the link
|
||||
return;
|
||||
}
|
||||
//
|
||||
const TopoDS_Shape& aSx=aBME.Shape();
|
||||
const TopoDS_Edge& aE=TopoDS::Edge(aSx);
|
||||
//
|
||||
InnerPoints(aE, myNbPntsMin, aLP);
|
||||
break;
|
||||
}// if (iCnt>1)
|
||||
}// for (; aIt.More(); aIt.Next())
|
||||
}// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder)
|
||||
}// if (!aNb && myNbPntsMin) {
|
||||
@ -681,7 +681,7 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
|
||||
GEOMAlgo_ListOfPnt& aLP)
|
||||
GEOMAlgo_ListOfPnt& aLP)
|
||||
{
|
||||
myErrorStatus=0;
|
||||
//
|
||||
@ -737,8 +737,8 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE,
|
||||
const Standard_Integer aNbPntsMin,
|
||||
GEOMAlgo_ListOfPnt& aLP)
|
||||
const Standard_Integer aNbPntsMin,
|
||||
GEOMAlgo_ListOfPnt& aLP)
|
||||
{
|
||||
// try to fill it yourself
|
||||
Standard_Boolean bInf1, bInf2;
|
||||
@ -786,9 +786,9 @@ void GEOMAlgo_FinderShapeOn1::CheckData()
|
||||
}
|
||||
//
|
||||
if (!(myShapeType==TopAbs_VERTEX ||
|
||||
myShapeType==TopAbs_EDGE ||
|
||||
myShapeType==TopAbs_FACE ||
|
||||
myShapeType==TopAbs_SOLID)) {
|
||||
myShapeType==TopAbs_EDGE ||
|
||||
myShapeType==TopAbs_FACE ||
|
||||
myShapeType==TopAbs_SOLID)) {
|
||||
myErrorStatus=12; // unallowed subshape type
|
||||
return;
|
||||
}
|
||||
@ -804,8 +804,8 @@ void GEOMAlgo_FinderShapeOn1::CheckData()
|
||||
myGAS.Load(mySurface);
|
||||
aType=myGAS.GetType();
|
||||
if (!(aType==GeomAbs_Plane ||
|
||||
aType==GeomAbs_Cylinder ||
|
||||
aType==GeomAbs_Sphere)) {
|
||||
aType==GeomAbs_Cylinder ||
|
||||
aType==GeomAbs_Sphere)) {
|
||||
myErrorStatus=14; // unallowed surface type
|
||||
}
|
||||
}
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_FinderShapeOn1.cxx
|
||||
// Created: Fri Mar 4 10:31:06 2005
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
// File: GEOMAlgo_FinderShapeOn1.cxx
|
||||
// Created: Fri Mar 4 10:31:06 2005
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
//
|
||||
#include <GEOMAlgo_FinderShapeOn2.ixx>
|
||||
#include <math.h>
|
||||
@ -285,9 +285,9 @@
|
||||
}
|
||||
//
|
||||
if (!(myShapeType==TopAbs_VERTEX ||
|
||||
myShapeType==TopAbs_EDGE ||
|
||||
myShapeType==TopAbs_FACE ||
|
||||
myShapeType==TopAbs_SOLID)) {
|
||||
myShapeType==TopAbs_EDGE ||
|
||||
myShapeType==TopAbs_FACE ||
|
||||
myShapeType==TopAbs_SOLID)) {
|
||||
myErrorStatus=12; // unallowed subshape type
|
||||
return;
|
||||
}
|
||||
@ -331,7 +331,7 @@
|
||||
//
|
||||
if (myShapeType==TopAbs_VERTEX){
|
||||
if (bIsConformState) {
|
||||
myMSS.Add(aV, aSt);
|
||||
myMSS.Add(aV, aSt);
|
||||
}
|
||||
}
|
||||
else if (bIsConformState || aSt==TopAbs_ON) {
|
||||
@ -368,11 +368,11 @@
|
||||
//
|
||||
bIsConformState=myMSS.Contains(aV);
|
||||
if (!bIsConformState) {
|
||||
break;// vertex has non-conformed state
|
||||
break;// vertex has non-conformed state
|
||||
}
|
||||
else {
|
||||
aSt=myMSS.FindFromKey(aV);
|
||||
aSC.AppendState(aSt);
|
||||
aSt=myMSS.FindFromKey(aV);
|
||||
aSC.AppendState(aSt);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -393,7 +393,7 @@
|
||||
aC=BRep_Tool::Curve(aE, aT1, aT2);
|
||||
bCanBeON=myClsf->CanBeON(aC);
|
||||
if(!bCanBeON) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -406,9 +406,9 @@
|
||||
aIt.Initialize(aLP);
|
||||
for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
|
||||
if (myNbPntsMax) {
|
||||
if (iCnt > myNbPntsMax) {
|
||||
break;
|
||||
}
|
||||
if (iCnt > myNbPntsMax) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
//
|
||||
const gp_Pnt& aP=aIt.Value();
|
||||
@ -417,15 +417,15 @@
|
||||
myClsf->Perform();
|
||||
iErr=myClsf->ErrorStatus();
|
||||
if (iErr) {
|
||||
myErrorStatus=40; // point can not be classified
|
||||
return;
|
||||
myErrorStatus=40; // point can not be classified
|
||||
return;
|
||||
}
|
||||
//
|
||||
aSt=myClsf->State();
|
||||
//
|
||||
bIsToBreak=aSC.AppendState(aSt);
|
||||
if (bIsToBreak) {
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -434,7 +434,7 @@
|
||||
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
|
||||
if (myShapeType==TopAbs_EDGE) {
|
||||
if (bIsConformState) {
|
||||
myMSS.Add(aE, aSt);
|
||||
myMSS.Add(aE, aSt);
|
||||
}
|
||||
}
|
||||
else if (bIsConformState || aSt==TopAbs_ON) {
|
||||
@ -471,7 +471,7 @@
|
||||
aS=BRep_Tool::Surface(aF);
|
||||
bCanBeON=myClsf->CanBeON(aS);
|
||||
if(!bCanBeON) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -480,11 +480,11 @@
|
||||
const TopoDS_Shape& aE=aExp.Current();
|
||||
bIsConformState=myMSS.Contains(aE);
|
||||
if (!bIsConformState) {
|
||||
break;// edge has non-conformed state
|
||||
break;// edge has non-conformed state
|
||||
}
|
||||
else {
|
||||
aSt=myMSS.FindFromKey(aE);
|
||||
aSC.AppendState(aSt);
|
||||
aSt=myMSS.FindFromKey(aE);
|
||||
aSC.AppendState(aSt);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -501,9 +501,9 @@
|
||||
aIt.Initialize(aLP);
|
||||
for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) {
|
||||
if (myNbPntsMax) {
|
||||
if (iCnt > myNbPntsMax) {
|
||||
break;
|
||||
}
|
||||
if (iCnt > myNbPntsMax) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
//
|
||||
const gp_Pnt& aP=aIt.Value();
|
||||
@ -512,15 +512,15 @@
|
||||
myClsf->Perform();
|
||||
iErr=myClsf->ErrorStatus();
|
||||
if (iErr) {
|
||||
myErrorStatus=40; // point can not be classified
|
||||
return;
|
||||
myErrorStatus=40; // point can not be classified
|
||||
return;
|
||||
}
|
||||
//
|
||||
aSt=myClsf->State();
|
||||
//
|
||||
bIsToBreak=aSC.AppendState(aSt);
|
||||
if (bIsToBreak) {
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -529,7 +529,7 @@
|
||||
bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState);
|
||||
if (myShapeType==TopAbs_FACE) {
|
||||
if (bIsConformState) {
|
||||
myMSS.Add(aF, aSt);
|
||||
myMSS.Add(aF, aSt);
|
||||
}
|
||||
}
|
||||
else if (bIsConformState || aSt==TopAbs_ON) {
|
||||
@ -563,11 +563,11 @@
|
||||
const TopoDS_Shape& aF=aMF(j);
|
||||
bIsConformState=myMSS.Contains(aF);
|
||||
if (!bIsConformState) {
|
||||
break;// face has non-conformed state
|
||||
break;// face has non-conformed state
|
||||
}
|
||||
else {
|
||||
aSt=myMSS.FindFromKey(aF);
|
||||
aSC.AppendState(aSt);
|
||||
aSt=myMSS.FindFromKey(aF);
|
||||
aSC.AppendState(aSt);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -589,7 +589,7 @@
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
|
||||
GEOMAlgo_ListOfPnt& aLP)
|
||||
GEOMAlgo_ListOfPnt& aLP)
|
||||
{
|
||||
myErrorStatus=0;
|
||||
//
|
||||
@ -628,11 +628,11 @@
|
||||
//
|
||||
aPK.SetIds(n[k], n[k+1]);
|
||||
if (aMPKI.IsBound(aPK)) {
|
||||
Standard_Integer& iCntX=aMPKI.ChangeFind(aPK);
|
||||
++iCntX;
|
||||
Standard_Integer& iCntX=aMPKI.ChangeFind(aPK);
|
||||
++iCntX;
|
||||
}
|
||||
else {
|
||||
aMPKI.Bind(aPK, 1);
|
||||
aMPKI.Bind(aPK, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -649,8 +649,8 @@
|
||||
aNbMax=aPK.NbMax();
|
||||
pIds=(Standard_Integer*)aPK.Key();
|
||||
for (k=1; k<3; ++k) {
|
||||
aNx=*(pIds+aNbMax-k);
|
||||
aMBN.Add(aNx);
|
||||
aNx=*(pIds+aNbMax-k);
|
||||
aMBN.Add(aNx);
|
||||
}
|
||||
*/
|
||||
aNx=(Standard_Integer)aPK.Id(1);
|
||||
@ -689,49 +689,49 @@
|
||||
aNbLinks=aMPKI.Extent();
|
||||
aIt.Initialize(aMPKI);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
iCnt=aIt.Value();
|
||||
if (iCnt>1) {
|
||||
// take the first having occured inner link
|
||||
// and discretize it
|
||||
const GEOMAlgo_PassKey& aPK=aIt.Key();
|
||||
//qf
|
||||
/*
|
||||
aNbMax=aPK.NbMax();
|
||||
pIds=(Standard_Integer*)aPK.Key();
|
||||
aN1=*(pIds+aNbMax-1);
|
||||
aN2=*(pIds+aNbMax-2);
|
||||
*/
|
||||
//
|
||||
aN1=(Standard_Integer)aPK.Id(1);
|
||||
aN2=(Standard_Integer)aPK.Id(2);
|
||||
//qt
|
||||
aP1=aNodes(aN1).Transformed(aTrsf);
|
||||
aP2=aNodes(aN2).Transformed(aTrsf);
|
||||
//
|
||||
if (aType==GeomAbs_Cylinder) {
|
||||
Standard_Real aTolSM;
|
||||
gp_Cylinder aCyl;
|
||||
//
|
||||
aTolSM=1.523e-6;//~1.-cos(0.1 deg)
|
||||
aCyl=aGAS.Cylinder();
|
||||
if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//
|
||||
BRepLib_MakeEdge aBME(aP1, aP2);
|
||||
bIsDone=aBME.IsDone();
|
||||
if (!bIsDone) {
|
||||
myErrorStatus=30; //can not obtain the line fron the link
|
||||
return;
|
||||
}
|
||||
//
|
||||
const TopoDS_Shape& aSx=aBME.Shape();
|
||||
const TopoDS_Edge& aE=TopoDS::Edge(aSx);
|
||||
//
|
||||
InnerPoints(aE, myNbPntsMin, aLP);
|
||||
break;
|
||||
}// if (iCnt>1)
|
||||
iCnt=aIt.Value();
|
||||
if (iCnt>1) {
|
||||
// take the first having occured inner link
|
||||
// and discretize it
|
||||
const GEOMAlgo_PassKey& aPK=aIt.Key();
|
||||
//qf
|
||||
/*
|
||||
aNbMax=aPK.NbMax();
|
||||
pIds=(Standard_Integer*)aPK.Key();
|
||||
aN1=*(pIds+aNbMax-1);
|
||||
aN2=*(pIds+aNbMax-2);
|
||||
*/
|
||||
//
|
||||
aN1=(Standard_Integer)aPK.Id(1);
|
||||
aN2=(Standard_Integer)aPK.Id(2);
|
||||
//qt
|
||||
aP1=aNodes(aN1).Transformed(aTrsf);
|
||||
aP2=aNodes(aN2).Transformed(aTrsf);
|
||||
//
|
||||
if (aType==GeomAbs_Cylinder) {
|
||||
Standard_Real aTolSM;
|
||||
gp_Cylinder aCyl;
|
||||
//
|
||||
aTolSM=1.523e-6;//~1.-cos(0.1 deg)
|
||||
aCyl=aGAS.Cylinder();
|
||||
if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//
|
||||
BRepLib_MakeEdge aBME(aP1, aP2);
|
||||
bIsDone=aBME.IsDone();
|
||||
if (!bIsDone) {
|
||||
myErrorStatus=30; //can not obtain the line fron the link
|
||||
return;
|
||||
}
|
||||
//
|
||||
const TopoDS_Shape& aSx=aBME.Shape();
|
||||
const TopoDS_Edge& aE=TopoDS::Edge(aSx);
|
||||
//
|
||||
InnerPoints(aE, myNbPntsMin, aLP);
|
||||
break;
|
||||
}// if (iCnt>1)
|
||||
}// for (; aIt.More(); aIt.Next())
|
||||
}// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder)
|
||||
}// if (!aNb && myNbPntsMin) {
|
||||
@ -741,7 +741,7 @@
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE,
|
||||
GEOMAlgo_ListOfPnt& aLP)
|
||||
GEOMAlgo_ListOfPnt& aLP)
|
||||
{
|
||||
myErrorStatus=0;
|
||||
//
|
||||
@ -797,8 +797,8 @@
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE,
|
||||
const Standard_Integer aNbPntsMin,
|
||||
GEOMAlgo_ListOfPnt& aLP)
|
||||
const Standard_Integer aNbPntsMin,
|
||||
GEOMAlgo_ListOfPnt& aLP)
|
||||
{
|
||||
// try to fill it yourself
|
||||
Standard_Boolean bInf1, bInf2;
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_GlueDetector.cxx
|
||||
// Created: Wed Dec 15 11:08:09 2004
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
// File: GEOMAlgo_GlueDetector.cxx
|
||||
// Created: Wed Dec 15 11:08:09 2004
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
//
|
||||
#include <GEOMAlgo_GlueAnalyser.ixx>
|
||||
|
||||
@ -212,7 +212,7 @@
|
||||
aIndex=aIt.Value();
|
||||
const TopoDS_Shape& aVx=aMIS.FindFromKey(aIndex);
|
||||
if(!j) {
|
||||
aVF=aVx;
|
||||
aVF=aVx;
|
||||
}
|
||||
aLVSD.Append(aVx);
|
||||
aMVProcessed.Add(aVx);
|
||||
@ -229,7 +229,7 @@
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aVSD=aItS.Value();
|
||||
if (!myOrigins.IsBound(aVSD)) {
|
||||
myOrigins.Bind(aVSD, aV);
|
||||
myOrigins.Bind(aVSD, aV);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -323,7 +323,7 @@
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aFSD=aItS.Value();
|
||||
if (!myOrigins.IsBound(aFSD)) {
|
||||
myOrigins.Bind(aFSD, aNewShape);
|
||||
myOrigins.Bind(aFSD, aNewShape);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -370,13 +370,13 @@
|
||||
aFx[1]=aLF.Last();
|
||||
for (i=0; i<2; ++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]);
|
||||
aNbS=aLS.Extent();
|
||||
if (aNbS!=1) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
aSx[i]=aLS.First();
|
||||
}
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_Gluer.cxx
|
||||
// Created: Sat Dec 04 12:45:53 2004
|
||||
// Author: Peter KURNEV
|
||||
// <peter@PREFEX>
|
||||
// File: GEOMAlgo_Gluer.cxx
|
||||
// Created: Sat Dec 04 12:45:53 2004
|
||||
// Author: Peter KURNEV
|
||||
// <peter@PREFEX>
|
||||
//
|
||||
#include <GEOMAlgo_Gluer.ixx>
|
||||
|
||||
@ -90,7 +90,7 @@
|
||||
|
||||
static
|
||||
void GetSubShapes(const TopoDS_Shape& aS,
|
||||
TopTools_IndexedMapOfShape& aMSS);
|
||||
TopTools_IndexedMapOfShape& aMSS);
|
||||
|
||||
//=======================================================================
|
||||
//function : GEOMAlgo_Gluer
|
||||
@ -251,49 +251,49 @@ void GEOMAlgo_Gluer::MakeVertices()
|
||||
aNbIP=aMIP.Extent();
|
||||
aIt1.Initialize(aMIP);
|
||||
for(; aIt1.More(); aIt1.Next()) {
|
||||
aIP=aIt1.Key();
|
||||
if (aMIPC.Contains(aIP)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
|
||||
const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP);
|
||||
//
|
||||
aSelector.Clear();
|
||||
aSelector.SetBox(aBoxVP);
|
||||
//
|
||||
aNbVSD=aBBTree.Select(aSelector);
|
||||
if (!aNbVSD) {
|
||||
continue; // it must not be
|
||||
}
|
||||
//
|
||||
const TColStd_ListOfInteger& aLI=aSelector.Indices();
|
||||
aIt.Initialize(aLI);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
aIP1=aIt.Value();
|
||||
if (aMIP.Contains(aIP1)) {
|
||||
continue;
|
||||
}
|
||||
aMIP1.Add(aIP1);
|
||||
} //for (; aIt.More(); aIt.Next()) {
|
||||
aIP=aIt1.Key();
|
||||
if (aMIPC.Contains(aIP)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
|
||||
const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP);
|
||||
//
|
||||
aSelector.Clear();
|
||||
aSelector.SetBox(aBoxVP);
|
||||
//
|
||||
aNbVSD=aBBTree.Select(aSelector);
|
||||
if (!aNbVSD) {
|
||||
continue; // it must not be
|
||||
}
|
||||
//
|
||||
const TColStd_ListOfInteger& aLI=aSelector.Indices();
|
||||
aIt.Initialize(aLI);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
aIP1=aIt.Value();
|
||||
if (aMIP.Contains(aIP1)) {
|
||||
continue;
|
||||
}
|
||||
aMIP1.Add(aIP1);
|
||||
} //for (; aIt.More(); aIt.Next()) {
|
||||
}//for(; aIt1.More(); aIt1.Next()) {
|
||||
//
|
||||
aNbIP1=aMIP1.Extent();
|
||||
if (!aNbIP1) {
|
||||
break;
|
||||
break;
|
||||
}
|
||||
//
|
||||
aIt1.Initialize(aMIP);
|
||||
for(; aIt1.More(); aIt1.Next()) {
|
||||
aIP=aIt1.Key();
|
||||
aMIPC.Add(aIP);
|
||||
aIP=aIt1.Key();
|
||||
aMIPC.Add(aIP);
|
||||
}
|
||||
//
|
||||
aMIP.Clear();
|
||||
aIt1.Initialize(aMIP1);
|
||||
for(; aIt1.More(); aIt1.Next()) {
|
||||
aIP=aIt1.Key();
|
||||
aMIP.Add(aIP);
|
||||
aIP=aIt1.Key();
|
||||
aMIP.Add(aIP);
|
||||
}
|
||||
aMIP1.Clear();
|
||||
}// while(1)
|
||||
@ -309,13 +309,13 @@ void GEOMAlgo_Gluer::MakeVertices()
|
||||
else { // SD vertices founded [ aMIPC ]
|
||||
aIt1.Initialize(aMIPC);
|
||||
for(j=0; aIt1.More(); aIt1.Next(), ++j) {
|
||||
aIP=aIt1.Key();
|
||||
const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
|
||||
if (!j) {
|
||||
aVF=aVP;
|
||||
}
|
||||
aLVSD.Append(aVP);
|
||||
aMVProcessed.Add(aVP);
|
||||
aIP=aIt1.Key();
|
||||
const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
|
||||
if (!j) {
|
||||
aVF=aVP;
|
||||
}
|
||||
aLVSD.Append(aVP);
|
||||
aMVProcessed.Add(aVP);
|
||||
}
|
||||
}
|
||||
myImages.Bind(aVF, aLVSD);
|
||||
@ -360,7 +360,7 @@ void GEOMAlgo_Gluer::MakeVertices()
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aVSD=aItS.Value();
|
||||
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());
|
||||
aFR=TopoDS::Face(myOrigins.Find(aF));
|
||||
if (aFR.IsSame(aF)) {
|
||||
aBB.Add(aNewShell, aF);
|
||||
continue;
|
||||
aBB.Add(aNewShell, aF);
|
||||
continue;
|
||||
}
|
||||
bIsToReverse=IsToReverse(aFR, aF);
|
||||
if (bIsToReverse) {
|
||||
aFR.Reverse();
|
||||
aFR.Reverse();
|
||||
}
|
||||
aBB.Add(aNewShell, aFR);
|
||||
}
|
||||
@ -638,25 +638,25 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType)
|
||||
if (aNbSDF==1) {
|
||||
bHasNewSubShape=HasNewSubShape(aS1);
|
||||
if (!bHasNewSubShape) {
|
||||
aNewShape=aS1;
|
||||
aNewShape.Orientation(TopAbs_FORWARD);
|
||||
aNewShape=aS1;
|
||||
aNewShape.Orientation(TopAbs_FORWARD);
|
||||
}
|
||||
}
|
||||
//
|
||||
if (bHasNewSubShape) {
|
||||
if (aType==TopAbs_FACE) {
|
||||
TopoDS_Face aNewFace;
|
||||
//
|
||||
const TopoDS_Face& aF1=TopoDS::Face(aS1);
|
||||
MakeFace(aF1, aNewFace);
|
||||
aNewShape=aNewFace;
|
||||
TopoDS_Face aNewFace;
|
||||
//
|
||||
const TopoDS_Face& aF1=TopoDS::Face(aS1);
|
||||
MakeFace(aF1, aNewFace);
|
||||
aNewShape=aNewFace;
|
||||
}
|
||||
else if (aType==TopAbs_EDGE) {
|
||||
TopoDS_Edge aNewEdge;
|
||||
//
|
||||
const TopoDS_Edge& aE1=TopoDS::Edge(aS1);
|
||||
MakeEdge(aE1, aNewEdge);
|
||||
aNewShape=aNewEdge;
|
||||
TopoDS_Edge aNewEdge;
|
||||
//
|
||||
const TopoDS_Edge& aE1=TopoDS::Edge(aS1);
|
||||
MakeEdge(aE1, aNewEdge);
|
||||
aNewShape=aNewEdge;
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -666,7 +666,7 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType)
|
||||
for (; aItS.More(); aItS.Next()) {
|
||||
const TopoDS_Shape& aFSD=aItS.Value();
|
||||
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) {
|
||||
const TopoDS_Shape& aFS=aMFS(j);
|
||||
if (aMFR.Contains(aFS)) {
|
||||
const TopTools_ListOfShape& aLSx=aMFR.FindFromKey(aFS);
|
||||
aNbSx=aLSx.Extent();
|
||||
if (aNbSx==2) {
|
||||
bFound=!bFound;
|
||||
break;
|
||||
}
|
||||
const TopTools_ListOfShape& aLSx=aMFR.FindFromKey(aFS);
|
||||
aNbSx=aLSx.Extent();
|
||||
if (aNbSx==2) {
|
||||
bFound=!bFound;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -773,7 +773,7 @@ void GEOMAlgo_Gluer::InnerTolerance()
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF,
|
||||
GEOMAlgo_PassKeyShape& aPK)
|
||||
GEOMAlgo_PassKeyShape& aPK)
|
||||
{
|
||||
Standard_Integer i, aNbE;
|
||||
TopTools_ListOfShape aLE;
|
||||
@ -798,7 +798,7 @@ void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE,
|
||||
GEOMAlgo_PassKeyShape& aPK)
|
||||
GEOMAlgo_PassKeyShape& aPK)
|
||||
{
|
||||
TopoDS_Vertex aV1, aV2;
|
||||
//
|
||||
@ -817,7 +817,7 @@ void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV,
|
||||
TopoDS_Vertex& aNewVertex)
|
||||
TopoDS_Vertex& aNewVertex)
|
||||
{
|
||||
Standard_Integer aNbV;
|
||||
Standard_Real aTolV, aD, aDmax;
|
||||
@ -863,7 +863,7 @@ void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
|
||||
TopoDS_Edge& aNewEdge)
|
||||
TopoDS_Edge& aNewEdge)
|
||||
{
|
||||
myErrorStatus=0;
|
||||
//
|
||||
@ -917,7 +917,7 @@ void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
|
||||
TopoDS_Face& aNewFace)
|
||||
TopoDS_Face& aNewFace)
|
||||
{
|
||||
myErrorStatus=0;
|
||||
//
|
||||
@ -953,20 +953,20 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
|
||||
//
|
||||
aER.Orientation(TopAbs_FORWARD);
|
||||
if (!BRep_Tool::Degenerated(aER)) {
|
||||
// build p-curve
|
||||
if (bIsUPeriodic) {
|
||||
GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax);
|
||||
}
|
||||
BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD);
|
||||
|
||||
// orient image
|
||||
bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext);
|
||||
if (bIsToReverse) {
|
||||
aER.Reverse();
|
||||
}
|
||||
// build p-curve
|
||||
if (bIsUPeriodic) {
|
||||
GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax);
|
||||
}
|
||||
BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD);
|
||||
|
||||
// orient image
|
||||
bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext);
|
||||
if (bIsToReverse) {
|
||||
aER.Reverse();
|
||||
}
|
||||
}
|
||||
else {
|
||||
aER.Orientation(aE.Orientation());
|
||||
aER.Orientation(aE.Orientation());
|
||||
}
|
||||
//
|
||||
aBB.Add(newWire, aER);
|
||||
@ -987,7 +987,7 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR,
|
||||
const TopoDS_Face& aF)
|
||||
const TopoDS_Face& aF)
|
||||
{
|
||||
Standard_Boolean bRet;
|
||||
Standard_Real aT, aT1, aT2, aTR, aScPr;
|
||||
@ -1066,7 +1066,7 @@ Standard_Boolean GEOMAlgo_Gluer::HasNewSubShape(const TopoDS_Shape& aS)const
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GetSubShapes(const TopoDS_Shape& aS,
|
||||
TopTools_IndexedMapOfShape& aMSS)
|
||||
TopTools_IndexedMapOfShape& aMSS)
|
||||
{
|
||||
Standard_Integer aR;
|
||||
TopAbs_ShapeEnum aType;
|
||||
@ -1105,7 +1105,7 @@ const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS)
|
||||
if(myOrigins.IsBound(aS)) {
|
||||
const TopoDS_Shape& aSnew=myOrigins.Find(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
|
||||
//
|
||||
// File: GEOMAlgo_Gluer1.cxx
|
||||
// Created: Wed Jan 24 11:52:27 2007
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
// File: GEOMAlgo_Gluer1.cxx
|
||||
// Created: Wed Jan 24 11:52:27 2007
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
//
|
||||
#include <GEOMAlgo_Gluer1.ixx>
|
||||
|
||||
@ -72,7 +72,7 @@ class GEOMAlgo_CoupleOfInteger {
|
||||
}
|
||||
//
|
||||
void SetValues(const Standard_Integer aI1,
|
||||
const Standard_Integer aI2) {
|
||||
const Standard_Integer aI2) {
|
||||
myInt1=aI1;
|
||||
myInt2=aI2;
|
||||
}
|
||||
@ -86,7 +86,7 @@ class GEOMAlgo_CoupleOfInteger {
|
||||
}
|
||||
//
|
||||
void Values(Standard_Integer& aI1,
|
||||
Standard_Integer& aI2) const {
|
||||
Standard_Integer& aI2) const {
|
||||
aI1=myInt1;
|
||||
aI2=myInt2;
|
||||
}
|
||||
@ -108,14 +108,14 @@ class GEOMAlgo_CoupleOfInteger {
|
||||
//
|
||||
static
|
||||
void SortShell(const Standard_Integer ,
|
||||
GEOMAlgo_CoupleOfInteger* );
|
||||
GEOMAlgo_CoupleOfInteger* );
|
||||
static
|
||||
void RefineSolid(const TopoDS_Shape& ,
|
||||
const TopTools_DataMapOfShapeShape& ,
|
||||
TopTools_DataMapOfShapeShape& );
|
||||
const TopTools_DataMapOfShapeShape& ,
|
||||
TopTools_DataMapOfShapeShape& );
|
||||
static
|
||||
void MakeFaceToReplace(const TopoDS_Face& ,
|
||||
TopoDS_Face& );
|
||||
TopoDS_Face& );
|
||||
//
|
||||
//=======================================================================
|
||||
//function : GEOMAlgo_Gluer1
|
||||
@ -276,10 +276,10 @@ static
|
||||
aPKS.Clear();
|
||||
aPKS.SetShapes(aS1, aS2);
|
||||
if (!myMapGN.IsBound(aPKS)) {
|
||||
//some faces, wanted to unglue, are not glued at all;
|
||||
myWarningStatus=2;
|
||||
myRejectedFaces.Append(aCS);
|
||||
continue;
|
||||
//some faces, wanted to unglue, are not glued at all;
|
||||
myWarningStatus=2;
|
||||
myRejectedFaces.Append(aCS);
|
||||
continue;
|
||||
}
|
||||
//
|
||||
const TopoDS_Shape& aFN=myMapGN.Find(aPKS);
|
||||
@ -316,13 +316,13 @@ static
|
||||
for (; aItLS.More(); aItLS.Next()) {
|
||||
const TopoDS_Shape& aS=aItLS.Value();
|
||||
if (aMSF.Contains(aS)) {
|
||||
TopTools_ListOfShape& aLF=aMSF.ChangeFromKey(aS);
|
||||
aLF.Append(aFN);
|
||||
TopTools_ListOfShape& aLF=aMSF.ChangeFromKey(aS);
|
||||
aLF.Append(aFN);
|
||||
}
|
||||
else {
|
||||
TopTools_ListOfShape aLF;
|
||||
aLF.Append(aFN);
|
||||
aMSF.Add(aS, aLF);
|
||||
TopTools_ListOfShape aLF;
|
||||
aLF.Append(aFN);
|
||||
aMSF.Add(aS, aLF);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -373,7 +373,7 @@ static
|
||||
for (; aItLS.More(); aItLS.Next()) {
|
||||
const TopoDS_Shape& aFN=aItLS.Value();
|
||||
if (!aMFNP.Add(aFN)) {
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
//
|
||||
// original face from original solid -> FD
|
||||
@ -383,12 +383,12 @@ static
|
||||
const TopTools_ListOfShape& aLFD=myImages.Find(aFN);
|
||||
aItLS1.Initialize(aLFD);
|
||||
for (; aItLS1.More(); aItLS1.Next()) {
|
||||
const TopoDS_Shape& aFDx=aItLS1.Value();
|
||||
if (aMFD.Contains(aFDx)) {
|
||||
aFD=aFDx;
|
||||
bFound=Standard_True;
|
||||
break;
|
||||
}
|
||||
const TopoDS_Shape& aFDx=aItLS1.Value();
|
||||
if (aMFD.Contains(aFDx)) {
|
||||
aFD=aFDx;
|
||||
bFound=Standard_True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//if (!bFound) {...}
|
||||
aMFNFD.Bind(aFN, aFD);
|
||||
@ -418,10 +418,10 @@ static
|
||||
TopTools_ListOfShape& aLFD=myImages.ChangeFind(aFN);
|
||||
aItLS.Initialize(aLFD);
|
||||
for (; aItLS.More(); aItLS.Next()) {
|
||||
const TopoDS_Shape& aFDx=aItLS.Value();
|
||||
if (!aFDx.IsSame(aFD)) {
|
||||
aLFDx.Append(aFDx);
|
||||
}
|
||||
const TopoDS_Shape& aFDx=aItLS.Value();
|
||||
if (!aFDx.IsSame(aFD)) {
|
||||
aLFDx.Append(aFDx);
|
||||
}
|
||||
}
|
||||
aLFD=aLFDx;
|
||||
//
|
||||
@ -438,8 +438,8 @@ static
|
||||
// purpose : replace faces (aMFN) of solid aSd by new ones
|
||||
//=======================================================================
|
||||
void RefineSolid(const TopoDS_Shape& aSd,
|
||||
const TopTools_DataMapOfShapeShape& aMFNFD,
|
||||
TopTools_DataMapOfShapeShape& aMFNFN2)
|
||||
const TopTools_DataMapOfShapeShape& aMFNFD,
|
||||
TopTools_DataMapOfShapeShape& aMFNFN2)
|
||||
{
|
||||
TopoDS_Shape *pSh;
|
||||
TopoDS_Face aF2;
|
||||
@ -458,7 +458,7 @@ void RefineSolid(const TopoDS_Shape& aSd,
|
||||
for (; aItSh.More(); aItSh.Next()) {
|
||||
const TopoDS_Shape& aF=aItSh.Value();
|
||||
if (aMFNFD.IsBound(aF)) {
|
||||
aLF.Append(aF);
|
||||
aLF.Append(aF);
|
||||
}
|
||||
}
|
||||
//
|
||||
@ -480,7 +480,7 @@ void RefineSolid(const TopoDS_Shape& aSd,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void MakeFaceToReplace(const TopoDS_Face& aF,
|
||||
TopoDS_Face& aFR)
|
||||
TopoDS_Face& aFR)
|
||||
{
|
||||
Standard_Real aTol;
|
||||
Handle(Geom_Surface) aS;
|
||||
@ -508,7 +508,7 @@ void MakeFaceToReplace(const TopoDS_Face& aF,
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void SortShell(const Standard_Integer n,
|
||||
GEOMAlgo_CoupleOfInteger* a)
|
||||
GEOMAlgo_CoupleOfInteger* a)
|
||||
{
|
||||
Standard_Integer nd, i, j, l, d=1;
|
||||
GEOMAlgo_CoupleOfInteger x;
|
||||
@ -526,13 +526,13 @@ void SortShell(const Standard_Integer n,
|
||||
m30:;
|
||||
l=j+d;
|
||||
if (a[l].Value1() < a[j].Value1()) {
|
||||
x=a[j];
|
||||
a[j]=a[l];
|
||||
a[l]=x;
|
||||
j-=d;
|
||||
if (j > -1) {
|
||||
goto m30;
|
||||
}
|
||||
x=a[j];
|
||||
a[j]=a[l];
|
||||
a[l]=x;
|
||||
j-=d;
|
||||
if (j > -1) {
|
||||
goto m30;
|
||||
}
|
||||
}//if (a[l] < a[j]){
|
||||
}//for (i=0; i<nd; ++i)
|
||||
}//while (1)
|
||||
|
@ -19,10 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File: GEOMAlgo_Algo.cxx
|
||||
// Created: Sat Dec 04 12:39:47 2004
|
||||
// Author: Peter KURNEV
|
||||
// <peter@PREFEX>
|
||||
// File: GEOMAlgo_Algo.cxx
|
||||
// Created: Sat Dec 04 12:39:47 2004
|
||||
// Author: Peter KURNEV
|
||||
// <peter@PREFEX>
|
||||
//
|
||||
#include <GEOMAlgo_HAlgo.ixx>
|
||||
|
||||
|
@ -66,7 +66,7 @@ Standard_EXPORT Standard_Integer WarningStatus() const;
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -38,10 +38,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_HAlgo_Type_()
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_HAlgo",
|
||||
sizeof(GEOMAlgo_HAlgo),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_HAlgo),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape(const Standard_Integer
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape",
|
||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape
|
||||
//
|
||||
Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_();
|
||||
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:
|
||||
|
||||
|
@ -54,10 +54,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape",
|
||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape(const GEOMA
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape",
|
||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox(const TopoDS_Shape& K1,con
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox",
|
||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo(const TopoDS_Shape&
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo",
|
||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState(const TopoDS_Shape& K1,c
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState",
|
||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ GEOMAlgo_ListNodeOfListOfCoupleOfShapes(const GEOMAlgo_CoupleOfShapes& I,const T
|
||||
// Type management
|
||||
//
|
||||
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:
|
||||
|
||||
|
@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Ty
|
||||
|
||||
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
|
||||
static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ListNodeOfListOfCoupleOfShapes",
|
||||
sizeof(GEOMAlgo_ListNodeOfListOfCoupleOfShapes),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
sizeof(GEOMAlgo_ListNodeOfListOfCoupleOfShapes),
|
||||
1,
|
||||
(Standard_Address)_Ancestors,
|
||||
(Standard_Address)NULL);
|
||||
|
||||
return _aType;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user