This commit is contained in:
eap 2013-06-17 12:15:50 +00:00
parent adec87681f
commit 407cadd372
176 changed files with 1941 additions and 1936 deletions

View File

@ -238,7 +238,7 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument()
}
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPoints->LineEdit2 ||
myEditCurrentArgument == GroupPoints->LineEdit3 ) ?
myEditCurrentArgument == GroupPoints->LineEdit3 ) ?
TopAbs_EDGE : TopAbs_VERTEX;
GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType );
TopoDS_Shape aShape;
@ -300,7 +300,7 @@ void BasicGUI_EllipseDlg::SetEditCurrentArgument()
}
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPoints->LineEdit2 ||
myEditCurrentArgument == GroupPoints->LineEdit3 ) ?
myEditCurrentArgument == GroupPoints->LineEdit3 ) ?
TopAbs_EDGE : TopAbs_VERTEX;
globalSelection(); // close local contexts, if any
localSelection( GEOM::GEOM_Object::_nil(), aNeedType );

View File

@ -217,7 +217,7 @@ void BasicGUI_LineDlg::ConstructorsClicked( int constructorId )
}
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupFaces->LineEdit1 ||
myEditCurrentArgument == GroupFaces->LineEdit2 ) ?
myEditCurrentArgument == GroupFaces->LineEdit2 ) ?
TopAbs_FACE : TopAbs_VERTEX;
globalSelection(); // close local selection to clear it
localSelection( GEOM::GEOM_Object::_nil(), aNeedType );
@ -250,7 +250,7 @@ void BasicGUI_LineDlg::SelectionIntoArgument()
}
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupFaces->LineEdit1 ||
myEditCurrentArgument == GroupFaces->LineEdit2 ) ?
myEditCurrentArgument == GroupFaces->LineEdit2 ) ?
TopAbs_FACE : TopAbs_VERTEX;
GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType );
TopoDS_Shape aShape;
@ -315,7 +315,7 @@ void BasicGUI_LineDlg::SetEditCurrentArgument()
}
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupFaces->LineEdit1 ||
myEditCurrentArgument == GroupFaces->LineEdit2 ) ?
myEditCurrentArgument == GroupFaces->LineEdit2 ) ?
TopAbs_FACE : TopAbs_VERTEX;
globalSelection(); // close local selection to clear it
localSelection( GEOM::GEOM_Object::_nil(), aNeedType );

View File

@ -394,19 +394,19 @@ void BasicGUI_MarkerDlg::onSelectionDone()
}
else if ( getConstructorId() == 2 ) { // by point and two vectors
if ( myEditCurrentArgument == Group2->LineEdit1 ) {
myPoint = aSelectedObject;
if (myPoint && !myVectorX)
Group2->PushButton2->click();
myPoint = aSelectedObject;
if (myPoint && !myVectorX)
Group2->PushButton2->click();
}
else if (myEditCurrentArgument == Group2->LineEdit2) {
myVectorX = aSelectedObject;
if (myVectorX && !myVectorY)
Group2->PushButton3->click();
myVectorX = aSelectedObject;
if (myVectorX && !myVectorY)
Group2->PushButton3->click();
}
else if ( myEditCurrentArgument == Group2->LineEdit3 ) {
myVectorY = aSelectedObject;
if (myVectorY && !myPoint)
Group2->PushButton1->click();
myVectorY = aSelectedObject;
if (myVectorY && !myPoint)
Group2->PushButton1->click();
}
}
}
@ -531,7 +531,7 @@ bool BasicGUI_MarkerDlg::isValid( QString& msg )
if ( v1.Magnitude() > gp::Resolution() && v2.Magnitude() > gp::Resolution() ) {
ok = !v1.IsParallel( v2, Precision::Angular() );
if ( !ok )
msg += tr( "VEC_PARALLEL" );
msg += tr( "VEC_PARALLEL" );
}
for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end() && ok; ++anIter )
ok = anIter.value()->isValid( msg, !IsPreview()) && ok;

View File

@ -695,15 +695,15 @@ bool BasicGUI_PlaneDlg::isValid( QString& msg )
break;
case 1:
ok = Group3Pnts->SpinBox_DX->isValid( msg, !IsPreview() ) &&
myPoint1 && myPoint2 && myPoint3 &&
myPoint1 != myPoint2 && myPoint1 != myPoint3 && myPoint2 != myPoint3;
myPoint1 && myPoint2 && myPoint3 &&
myPoint1 != myPoint2 && myPoint1 != myPoint3 && myPoint2 != myPoint3;
break;
case 2:
ok = GroupFace->SpinBox_DX->isValid( msg, !IsPreview() ) && myFace;
break;
case 3:
ok = Group2Vec->SpinBox_DX->isValid( msg, !IsPreview() ) &&
myVec1 && myVec2 && myVec1 != myVec2;
myVec1 && myVec2 && myVec1 != myVec2;
break;
case 4:
ok = GroupLCS->SpinBox_DX->isValid( msg, !IsPreview() );

View File

@ -114,7 +114,7 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
Standard_Real anArea = Properties.Mass();
Standard_Real AreaTol = Radius*Radius*1.e-6;
if (anArea > HalfArea - AreaTol) //no chance to avoid singularity
return Standard_False;
return Standard_False;
///////////////////////////////////////////////
gp_Ax3 ax3 = sp.Position();
if(Abs(Vmax-Vmin) < PI2) {

View File

@ -911,7 +911,7 @@ QString DlgRef::PrintDoubleValue( double theValue, int thePrecision )
// remove trailing zeroes
QRegExp expre( QString( "(%1|%2)[+-]?[0-9]+$" ).arg( QLocale().exponential().toLower(),
QLocale().exponential().toUpper() ) );
QLocale().exponential().toUpper() ) );
int idx = aRes.indexOf( expre );
QString aResExp = "";

View File

@ -1073,10 +1073,10 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId )
Group4Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_VY2" ) );
Group4Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_RADIUS2" ) );
Group4Spin->TextLabel4->setText( tr( "GEOM_SKETCHER_ANGLE2" ) );
initSpinBox( Group4Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
initSpinBox( Group4Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 0.1, "length_precision" );
initSpinBox( Group4Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 0.1, "length_precision" );
initSpinBox( Group4Spin->SpinBox_DS, COORD_MIN, COORD_MAX, 5., "length_precision" );
initSpinBox( Group4Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, step, "length_precision" );
initSpinBox( Group4Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 0.1, "length_precision" );
initSpinBox( Group4Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 0.1, "length_precision" );
initSpinBox( Group4Spin->SpinBox_DS, COORD_MIN, COORD_MAX, 5., "length_precision" );
Group4Spin->SpinBox_DX->setValue( myDX );
Group4Spin->SpinBox_DY->setValue( myDY );
// myRadius = 100.0;
@ -1147,7 +1147,7 @@ void EntityGUI_SketcherDlg::ClickOnEnd()
TopoDS_Shape myShape = aProfile.GetShape( &isDone );
if ( isDone ) {
if ( myShape.ShapeType() != TopAbs_VERTEX )
myCommand.append( ":WW" );
myCommand.append( ":WW" );
}
}
else {

View File

@ -739,7 +739,7 @@ void EntityGUI_SubShapeDlg::activateSelection()
{
TopoDS_Shape aSubShape = anExp.Current();
int index = aSubShapesMap.FindIndex(aSubShape);
QString anEntry = QString( "TEMP_" ) + anEntryBase + QString("_%1").arg(index);
QString anEntry = QString( "TEMP_" ) + anEntryBase + QString("_%1").arg(index);
SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, aView);
if (aPrs) {

View File

@ -773,7 +773,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
{
TObjectData* data = aStEntry2ObjDataPtrIt->second;
if ( data->_unpublished && !data->_pyName.IsEmpty() ) {
aScript += unpublishCmd + data->_pyName + ")";
aScript += unpublishCmd + data->_pyName + ")";
}
}
@ -1397,8 +1397,8 @@ void ReplaceVariables(TCollection_AsciiString& theCommand,
if(MYDEBUG)
cout<<"aParamIndex: "<<aParamIndex<<" aStartParamPos: " <<aStartParamPos<<" aEndParamPos: "<<aEndParamPos<<endl;
if ( aStartParamPos == aEndParamPos)
continue;
if ( aStartParamPos == aEndParamPos)
continue;
aParameter = aSection.SubString(aStartParamPos, aEndParamPos-1);
if(MYDEBUG)

View File

@ -204,8 +204,8 @@ protected:
//! theSolid are in the list: theInternalFaces <br>
Standard_EXPORT
void BuildDraftSolid(const TopoDS_Shape& theSolid,
TopoDS_Shape& theDraftSolid,
TopTools_ListOfShape& theInternalFaces) ;
TopoDS_Shape& theDraftSolid,
TopTools_ListOfShape& theInternalFaces) ;
NMTTools_PPaveFiller myPaveFiller;

View File

@ -100,7 +100,7 @@ static
static
Standard_Boolean RefineShell(const TopoDS_Shell& ,
TopoDS_Shell& );
TopoDS_Shell& );
//=======================================================================
//function :
@ -189,7 +189,7 @@ void GEOMAlgo_BuilderSolid::PerformShapesToAvoid()
}
/*
else {
int a=0;
int a=0;
}
*/
}
@ -396,7 +396,7 @@ void GEOMAlgo_BuilderSolid::PerformLoops()
//
bRefine=RefineShell(aShell, aShx);
if (bRefine) {
myLoops.Append(aShx);
myLoops.Append(aShx);
}
}
} // for (; aItF.More(); aItF.Next()) {
@ -640,8 +640,8 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes()
{
TopExp_Explorer aExp(aSolid, TopAbs_FACE);
while (aExp.More()) {
aMFS.Add(aExp.Current());
aExp.Next();
aMFS.Add(aExp.Current());
aExp.Next();
}
}
//modified by NIZNHY-PKV Wed Mar 07 08:52:20 2012t
@ -655,10 +655,10 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes()
const TopoDS_Face& aF=*((TopoDS_Face*)(&aItMF.Key()));
//modified by NIZNHY-PKV Wed Mar 07 08:54:56 2012f
if (!aMFS.Contains(aF)) {
bFlag=GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext);
if (bFlag) {
aMFP.Add(aF);
}
bFlag=GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext);
if (bFlag) {
aMFP.Add(aF);
}
}
//if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext)) {
// aMFP.Add(aF);
@ -850,7 +850,7 @@ Standard_Boolean IsClosedShell(const TopoDS_Shell& theShell)
//purpose :
//=======================================================================
Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
TopoDS_Shell& aShx)
TopoDS_Shell& aShx)
{
Standard_Boolean bRet;
@ -881,7 +881,7 @@ Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
const TopoDS_Face& aF1=*((TopoDS_Face*)(&aLF.First()));
if (aNbF==1) {
if (aOrE==TopAbs_INTERNAL) {
continue;
continue;
}
aMFx.Add(aF1);
}
@ -889,14 +889,14 @@ Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
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;
}
aMFx.Add(aF1);
aMFx.Add(aF2);
if (BRep_Tool::IsClosed(aE, aF1)) {
continue;
}
if (aOrE==TopAbs_INTERNAL) {
continue;
}
aMFx.Add(aF1);
aMFx.Add(aF2);
}
}
}

View File

@ -40,7 +40,7 @@ class GEOMAlgo_BuilderTools
public:
Standard_EXPORT
static Standard_Boolean IsHole(const TopoDS_Shape& aW,
const TopoDS_Shape& aF) ;
const TopoDS_Shape& aF) ;
Standard_EXPORT
static Standard_Boolean IsHole(const TopoDS_Shape& aShell) ;

View File

@ -153,7 +153,7 @@ static
//modified by NIZNHY-PKV Wed Oct 27 11:19:30 2010f
aNbLB=aLB.Extent();
if (aIsCB && aNbLB<2) {
aIsCB=0;
aIsCB=0;
}
//modified by NIZNHY-PKV Wed Oct 27 11:19:34 2010t
//

View File

@ -103,8 +103,8 @@ static
static
Standard_Boolean IsClosed(const TopoDS_Edge& ,
const TopoDS_Face&,
Standard_Boolean& );
const TopoDS_Face&,
Standard_Boolean& );
//=======================================================================
//function : FillImagesFaces
@ -347,15 +347,15 @@ void GEOMAlgo_Builder::BuildSplitFaces()
}
continue;
}// if (bIsClosed){
//
//modified by NIZNHY-PKV Wed Nov 28 13:50:34 2012f
if (!bIsClosed && bFlagClosed) {
if (!BRep_Tool::IsClosed(aSp, aF)){
BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF);
}
}
//modified by NIZNHY-PKV Wed Nov 28 13:50:36 2012t
//
//
//modified by NIZNHY-PKV Wed Nov 28 13:50:34 2012f
if (!bIsClosed && bFlagClosed) {
if (!BRep_Tool::IsClosed(aSp, aF)){
BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF);
}
}
//modified by NIZNHY-PKV Wed Nov 28 13:50:36 2012t
//
//
aSp.Orientation(anOriE);
bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx);
@ -612,7 +612,7 @@ void GEOMAlgo_Builder::FillSameDomainFaces()
for (k=1; k<=aNbMFj; ++k) {
const TopoDS_Shape& aFk=aMFj(k);
if (!aDMSI.IsBound(aFk)) {
aDMSI.Bind(aFk, j);
aDMSI.Bind(aFk, j);
}
}
}
@ -629,20 +629,20 @@ void GEOMAlgo_Builder::FillSameDomainFaces()
bIsImage=mySplitFaces.IsImage(aFSD);
aFOld=aFSD;
if (bIsImage) {
aFOld=mySplitFaces.ImageFrom(aFSD);
aFOld=mySplitFaces.ImageFrom(aFSD);
}
//
aIx=aDMSI.Find(aFOld);
if (j==1) {
aIxMin=aIx;
aFSDmin=aFSD;
continue;
aIxMin=aIx;
aFSDmin=aFSD;
continue;
}
else {
if (aIx<aIxMin) {
aIxMin=aIx;
aFSDmin=aFSD;
}
if (aIx<aIxMin) {
aIxMin=aIx;
aFSDmin=aFSD;
}
}
}
//
@ -948,8 +948,8 @@ void UpdateCandidates(const Standard_Integer theNF,
//purpose :
//=======================================================================
Standard_Boolean IsClosed(const TopoDS_Edge& aE,
const TopoDS_Face& aF,
Standard_Boolean& bFlag)
const TopoDS_Face& aF,
Standard_Boolean& bFlag)
{
Standard_Boolean bRet;
//
@ -966,15 +966,15 @@ Standard_Boolean IsClosed(const TopoDS_Edge& aE,
const TopoDS_Shape& aEx=aExp.Current();
//
if (aEx.IsSame(aE)) {
++iCnt;
if (iCnt==1) {
aE1=aEx;
}
else if (iCnt==2){
aE1.Reverse();
bRet=(aE1==aEx);
break;
}
++iCnt;
if (iCnt==1) {
aE1=aEx;
}
else if (iCnt==2){
aE1.Reverse();
bRet=(aE1==aEx);
break;
}
}
}
}

View File

@ -691,12 +691,12 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
const TopTools_ListOfShape &aLSx=aMSx.FindFromKey(aSI);
aNbSx=aLSx.Extent();
if (aNbSx) {
//modified by NIZNHY-PKV Wed Mar 27 11:39:15 2013f
//aMSI.Remove(aSI);
//modified by NIZNHY-PKV Wed Mar 27 11:39:15 2013f
//aMSI.Remove(aSI);
if (aMSI.Remove(aSI)) {
aItM.Initialize(aMSI);
}
//modified by NIZNHY-PKV Wed Mar 27 11:39:18 2013t
aItM.Initialize(aMSI);
}
//modified by NIZNHY-PKV Wed Mar 27 11:39:18 2013t
}
}
}

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
// Created: Wed Feb 22 11:05:01 2012
// File: GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx
// Created: Wed Feb 22 11:05:01 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx
// Created: Wed Feb 22 10:58:14 2012
// File: GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx
// Created: Wed Feb 22 10:58:14 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx
// Created: Wed Feb 22 11:01:34 2012
// File: GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx
// Created: Wed Feb 22 11:01:34 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx
// Created: Wed Feb 22 10:53:47 2012
// File: GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx
// Created: Wed Feb 22 10:53:47 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx
// Created: Wed Feb 22 11:08:26 2012
// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx
// Created: Wed Feb 22 11:08:26 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx
// Created: Wed Feb 22 11:11:09 2012
// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx
// Created: Wed Feb 22 11:11:09 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx
// Created: Wed Feb 22 10:49:11 2012
// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx
// Created: Wed Feb 22 10:49:11 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx
// Created: Wed Feb 22 08:39:02 2012
// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx
// Created: Wed Feb 22 08:39:02 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapOfOrientedShapeShape.hxx
// Created: Wed Feb 22 11:03:36 2012
// File: GEOMAlgo_DataMapOfOrientedShapeShape.hxx
// Created: Wed Feb 22 11:03:36 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapOfPassKeyInteger.hxx
// Created: Wed Feb 22 10:55:55 2012
// File: GEOMAlgo_DataMapOfPassKeyInteger.hxx
// Created: Wed Feb 22 10:55:55 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapOfPassKeyShapeShape.hxx
// Created: Wed Feb 22 11:00:16 2012
// File: GEOMAlgo_DataMapOfPassKeyShapeShape.hxx
// Created: Wed Feb 22 11:00:16 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapOfRealListOfShape.hxx
// Created: Wed Feb 22 10:51:48 2012
// File: GEOMAlgo_DataMapOfRealListOfShape.hxx
// Created: Wed Feb 22 10:51:48 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfRealListOfShape_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapOfShapeMapOfShape.hxx
// Created: Wed Feb 22 11:07:16 2012
// File: GEOMAlgo_DataMapOfShapeMapOfShape.hxx
// Created: Wed Feb 22 11:07:16 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapOfShapePnt.hxx
// Created: Wed Feb 22 11:10:15 2012
// File: GEOMAlgo_DataMapOfShapePnt.hxx
// Created: Wed Feb 22 11:10:15 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfShapePnt_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapOfShapeReal.hxx
// Created: Wed Feb 22 10:47:23 2012
// File: GEOMAlgo_DataMapOfShapeReal.hxx
// Created: Wed Feb 22 10:47:23 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfShapeReal_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_DataMapOfShapeShapeSet.hxx
// Created: Wed Feb 22 08:36:15 2012
// File: GEOMAlgo_DataMapOfShapeShapeSet.hxx
// Created: Wed Feb 22 08:36:15 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile

View File

@ -81,9 +81,9 @@ class GEOMAlgo_FinderShapeOn : public GEOMAlgo_ShapeAlgo
Standard_EXPORT
static void CopySource(const TopoDS_Shape& aS,
TopTools_DataMapOfShapeShape& aImages,
TopTools_DataMapOfShapeShape& aOriginals,
TopoDS_Shape& aSC) ;
TopTools_DataMapOfShapeShape& aImages,
TopTools_DataMapOfShapeShape& aOriginals,
TopoDS_Shape& aSC) ;
Standard_EXPORT
static Standard_Boolean BuildTriangulation(const TopoDS_Shape& aS) ;

View File

@ -715,33 +715,33 @@ void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF,
aHatcher.Trim(aIx);
bIsDone=aHatcher.TrimDone(aIx);
if (!bIsDone) {
myErrorStatus=42;
return;
myErrorStatus=42;
return;
}
//
aHatcher.ComputeDomains(aIx);
bIsDone=aHatcher.IsDone(aIx);
if (!bIsDone) {
continue;
continue;
}
//
aNbDomains=aHatcher.NbDomains(aIx);
for (j=1; j<=aNbDomains; ++j) {
const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, j) ;
// 1
bHasFirstPoint=aDomain.HasFirstPoint();
bHasSecondPoint=aDomain.HasSecondPoint();
if (!bHasFirstPoint || !bHasSecondPoint) {
continue;
}
// 2
aV1=aDomain.FirstPoint().Parameter();
aV2=aDomain.SecondPoint().Parameter();
aVx=IntTools_Tools::IntermediatePoint(aV1, aV2);
// 3
aS->D0(aUx, aVx, aPx);
aLP.Append(aPx);
break;
const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, j) ;
// 1
bHasFirstPoint=aDomain.HasFirstPoint();
bHasSecondPoint=aDomain.HasSecondPoint();
if (!bHasFirstPoint || !bHasSecondPoint) {
continue;
}
// 2
aV1=aDomain.FirstPoint().Parameter();
aV2=aDomain.SecondPoint().Parameter();
aVx=IntTools_Tools::IntermediatePoint(aV1, aV2);
// 3
aS->D0(aUx, aVx, aPx);
aLP.Append(aPx);
break;
}
}// for (i=1; i<aNb; ++i) {
}// if (!aNb && myNbPntsMin) {
@ -877,7 +877,7 @@ if (!aNb && myNbPntsMin) {
//
aN1=(Standard_Integer)aPK.Id(1);
aN2=(Standard_Integer)aPK.Id(2);
//
//
aP1=aNodes(aN1).Transformed(aTrsf);
aP2=aNodes(aN2).Transformed(aTrsf);
//

View File

@ -112,16 +112,16 @@ protected:
Standard_EXPORT
void InnerPoints(const TopoDS_Face& aF,
GEOMAlgo_ListOfPnt& aLP) ;
GEOMAlgo_ListOfPnt& aLP) ;
Standard_EXPORT
void InnerPoints(const TopoDS_Edge& aE,
GEOMAlgo_ListOfPnt& aLP) ;
GEOMAlgo_ListOfPnt& aLP) ;
Standard_EXPORT
void InnerPoints(const TopoDS_Edge& aE,
const Standard_Integer aNbPnts,
GEOMAlgo_ListOfPnt& aLP) ;
const Standard_Integer aNbPnts,
GEOMAlgo_ListOfPnt& aLP) ;
TopAbs_ShapeEnum myShapeType;

View File

@ -92,7 +92,7 @@ class GEOMAlgo_GetInPlaceIterator {
*/
//Standard_EXPORT
void Initialize(const TopAbs_ShapeEnum theT1,
const TopAbs_ShapeEnum theT2) ;
const TopAbs_ShapeEnum theT2) ;
/**
* Check the existence of pairs to iterare.
* @return
@ -296,15 +296,15 @@ protected:
Standard_EXPORT
void FillShapesIn(const TopoDS_Shape& theS1,
const TopoDS_Shape& theS2) ;
const TopoDS_Shape& theS2) ;
Standard_EXPORT
void FillShapesOn(const TopoDS_Shape& theS1,
const TopoDS_Shape& theS2) ;
const TopoDS_Shape& theS2) ;
Standard_EXPORT
Standard_Boolean CheckCoincidence(const TopoDS_Shape& theS1,
const TopoDS_Shape& theS2);
const TopoDS_Shape& theS2);
TopoDS_Shape myShapeWhere;

View File

@ -20,8 +20,8 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_GetInPlace_1.cxx
// Author: Peter KURNEV
// File: GEOMAlgo_GetInPlace_1.cxx
// Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx>
@ -66,22 +66,22 @@
static
Standard_Integer PntInEdge(const TopoDS_Edge& aF,
gp_Pnt& aP);
gp_Pnt& aP);
static
Standard_Integer PntInEdge(const TopoDS_Edge& aF,
gp_Pnt& aP,
Standard_Real& aT);
gp_Pnt& aP,
Standard_Real& aT);
static
Standard_Integer PntInFace(const TopoDS_Face& aF,
gp_Pnt& aP);
gp_Pnt& aP);
static
Standard_Integer PntInFace(const TopoDS_Face& aF,
gp_Pnt& aP,
gp_Pnt2d& theP2D);
gp_Pnt& aP,
gp_Pnt2d& theP2D);
static
Standard_Integer PntInSolid(const TopoDS_Solid& aZ,
const Standard_Real aTol,
gp_Pnt& aP);
const Standard_Real aTol,
gp_Pnt& aP);
//=======================================================================
@ -89,7 +89,7 @@ static
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2)
const TopoDS_Shape& aS2)
{
Standard_Boolean bOk;
Standard_Integer iErr;
@ -157,11 +157,11 @@ Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
aDmin=aPPC.LowerDistance();
aT=aPPC.LowerDistanceParameter();
if (aDmin < myTolerance) {
dT=1.e-12;
BRep_Tool::Curve(aE1, aT1, aT2);
dT=1.e-12;
BRep_Tool::Curve(aE1, aT1, aT2);
if(aT > (aT1-dT) && aT < (aT2+dT)) {
bOk=Standard_True;
}
bOk=Standard_True;
}
}
}
//else {
@ -197,7 +197,7 @@ Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
//purpose :
//=======================================================================
Standard_Integer PntInEdge(const TopoDS_Edge& aE,
gp_Pnt& aP)
gp_Pnt& aP)
{
Standard_Integer iErr;
@ -212,8 +212,8 @@ Standard_Integer PntInEdge(const TopoDS_Edge& aE,
//purpose :
//=======================================================================
Standard_Integer PntInEdge(const TopoDS_Edge& aE,
gp_Pnt& aP,
Standard_Real& aT)
gp_Pnt& aP,
Standard_Real& aT)
{
Standard_Integer iErr;
Standard_Real aT1, aT2;
@ -232,8 +232,8 @@ Standard_Integer PntInEdge(const TopoDS_Edge& aE,
//purpose :
//=======================================================================
Standard_Integer PntInSolid(const TopoDS_Solid& aZ,
const Standard_Real aTol,
gp_Pnt& aP)
const Standard_Real aTol,
gp_Pnt& aP)
{
Standard_Integer iErr;
Standard_Real aUx, aVx, aCoef;
@ -271,7 +271,7 @@ Standard_Integer PntInSolid(const TopoDS_Solid& aZ,
//purpose :
//=======================================================================
Standard_Integer PntInFace(const TopoDS_Face& aF,
gp_Pnt& aP)
gp_Pnt& aP)
{
Standard_Integer iErr;
//
@ -286,8 +286,8 @@ Standard_Integer PntInFace(const TopoDS_Face& aF,
//purpose :
//=======================================================================
Standard_Integer PntInFace(const TopoDS_Face& aF,
gp_Pnt& theP,
gp_Pnt2d& theP2D)
gp_Pnt& theP,
gp_Pnt2d& theP2D)
{
Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint;
Standard_Integer iErr, aIx, aNbDomains, i;
@ -312,8 +312,8 @@ Standard_Integer PntInFace(const TopoDS_Face& aF,
//
Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr);
Geom2dHatch_Hatcher aHatcher(aIntr,
aTolHatch2D, aTolHatch3D,
Standard_True, Standard_False);
aTolHatch2D, aTolHatch3D,
Standard_True, Standard_False);
//
iErr=0;
aEpsT=1.e-12;

View File

@ -19,9 +19,9 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_GetInPlace_2.cxx
// File: GEOMAlgo_GetInPlace_2.cxx
// Created:
// Author: Peter KURNEV
// Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx>
@ -51,7 +51,7 @@ static
Standard_Integer Dimension(const TopAbs_ShapeEnum aType);
static
void PointProperties(const TopoDS_Shape& aS,
GProp_GProps& aGProps);
GProp_GProps& aGProps);
//=======================================================================
//function : CheckGProps
@ -87,7 +87,7 @@ void GEOMAlgo_GetInPlace::CheckGProps(const TopoDS_Shape& aS1)
const TopoDS_Shape& aS1x=aIt.Value();
CheckGProps(aS1x);
if (!myFound) {
return;
return;
}
}
}

View File

@ -19,9 +19,9 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_GetInPlaceIterator.cxx
// File: GEOMAlgo_GetInPlaceIterator.cxx
// Created:
// Author: Peter KURNEV
// Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx>
@ -29,7 +29,7 @@
static
Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1,
const TopAbs_ShapeEnum aType2);
const TopAbs_ShapeEnum aType2);
//=======================================================================
//function :
@ -82,7 +82,7 @@ void GEOMAlgo_GetInPlaceIterator::AppendPair(const NMTTools_CoupleOfShape& theCS
//purpose :
//=======================================================================
void GEOMAlgo_GetInPlaceIterator::Initialize(const TopAbs_ShapeEnum aType1,
const TopAbs_ShapeEnum aType2)
const TopAbs_ShapeEnum aType2)
{
Standard_Integer iX;
//
@ -123,7 +123,7 @@ const NMTTools_CoupleOfShape& GEOMAlgo_GetInPlaceIterator::Value()const
//purpose :
//=======================================================================
Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1,
const TopAbs_ShapeEnum aType2)
const TopAbs_ShapeEnum aType2)
{
Standard_Integer iRet;
//

View File

@ -20,10 +20,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.hxx>
@ -96,7 +96,7 @@
//
static
void GetSubShapes(const TopoDS_Shape& aS,
TopTools_IndexedMapOfShape& aMSS);
TopTools_IndexedMapOfShape& aMSS);
//=======================================================================
//function : GEOMAlgo_Gluer
@ -278,53 +278,53 @@ 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);
//modified by NIZNHY-PKV Thu Jan 21 10:04:09 2010f
const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP);
//const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP);
//modified by NIZNHY-PKV Thu Jan 21 10:04:11 2010t
//
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);
//modified by NIZNHY-PKV Thu Jan 21 10:04:09 2010f
const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP);
//const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP);
//modified by NIZNHY-PKV Thu Jan 21 10:04:11 2010t
//
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)
@ -340,13 +340,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);
@ -391,7 +391,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);
}
}
}
@ -556,12 +556,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);
}
@ -662,25 +662,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;
}
}
//
@ -690,7 +690,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);
}
}
}
@ -730,12 +730,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;
}
}
}
//
@ -797,7 +797,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;
@ -822,7 +822,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;
//
@ -841,7 +841,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;
@ -887,7 +887,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;
//
@ -941,7 +941,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;
//
@ -977,20 +977,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);
// 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();
}
// 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);
@ -1011,7 +1011,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;
@ -1090,7 +1090,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;
@ -1129,7 +1129,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);
}
}
}

View File

@ -21,10 +21,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_Gluer.hxx
// Created: Sat Dec 04 12:45:53 2004
// Author: Peter KURNEV
// <peter@PREFEX>
// File: GEOMAlgo_Gluer.hxx
// Created: Sat Dec 04 12:45:53 2004
// Author: Peter KURNEV
// <peter@PREFEX>
//
#ifndef _GEOMAlgo_Gluer_HeaderFile
#define _GEOMAlgo_Gluer_HeaderFile
@ -122,35 +122,35 @@ public:
Standard_EXPORT
void EdgePassKey(const TopoDS_Edge& aE,
GEOMAlgo_PassKeyShape& aPK) ;
GEOMAlgo_PassKeyShape& aPK) ;
Standard_EXPORT
void FacePassKey(const TopoDS_Face& aF,
GEOMAlgo_PassKeyShape& aPK) ;
GEOMAlgo_PassKeyShape& aPK) ;
Standard_EXPORT
void MakeVertex(const TopTools_ListOfShape& aLV,
TopoDS_Vertex& aNewV) ;
TopoDS_Vertex& aNewV) ;
Standard_EXPORT
void MakeEdge(const TopoDS_Edge& aEdge,
TopoDS_Edge& aNewEdge) ;
TopoDS_Edge& aNewEdge) ;
Standard_EXPORT
void MakeFace(const TopoDS_Face& aFace,
TopoDS_Face& aNewEdge) ;
TopoDS_Face& aNewEdge) ;
Standard_EXPORT
Standard_Boolean IsToReverse(const TopoDS_Face& aFR,
const TopoDS_Face& aF) ;
const TopoDS_Face& aF) ;
Standard_EXPORT
Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const;
Standard_EXPORT
void MakeSubShapes(const TopoDS_Shape& aS,
TopTools_MapOfShape& aM,
TopoDS_Compound& aC) ;
TopTools_MapOfShape& aM,
TopoDS_Compound& aC) ;
Standard_Boolean myCheckGeometry;

View File

@ -19,10 +19,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_Gluer2_2.cxx
// File: GEOMAlgo_Gluer2_2.cxx
// Created:
// Author: Peter KURNEV
// <peter@PREFEX>
// Author: Peter KURNEV
// <peter@PREFEX>
//
#include <GEOMAlgo_Gluer2.hxx>
@ -75,7 +75,7 @@ const TopTools_ListOfShape& GEOMAlgo_Gluer2::Modified(const TopoDS_Shape& theS)
//
aType=theS.ShapeType();
if (!(aType==TopAbs_VERTEX || aType==TopAbs_EDGE ||
aType==TopAbs_FACE || aType==TopAbs_SOLID)) {
aType==TopAbs_FACE || aType==TopAbs_SOLID)) {
return myHistShapes;
}
//
@ -143,7 +143,7 @@ Standard_Boolean GEOMAlgo_Gluer2::IsDeleted(const TopoDS_Shape& theS)
//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::MapShapes(const TopoDS_Shape& theS,
TopTools_MapOfShape& theM)
TopTools_MapOfShape& theM)
{
TopoDS_Iterator aIt;
//

View File

@ -19,10 +19,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_GluerAlgo.cxx
// File: GEOMAlgo_GluerAlgo.cxx
// Created:
// Author: Peter KURNEV
// <peter@PREFEX>
// Author: Peter KURNEV
// <peter@PREFEX>
//
#include <GEOMAlgo_GluerAlgo.hxx>
#include <IntTools_Context.hxx>

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_IndexedDataMapOfIntegerShape.hxx
// Created: Wed Feb 22 11:22:18 2012
// File: GEOMAlgo_IndexedDataMapOfIntegerShape.hxx
// Created: Wed Feb 22 11:22:18 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx
// Created: Wed Feb 22 11:24:27 2012
// File: GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx
// Created: Wed Feb 22 11:24:27 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_IndexedDataMapOfShapeBox.hxx
// Created: Wed Feb 22 11:14:14 2012
// File: GEOMAlgo_IndexedDataMapOfShapeBox.hxx
// Created: Wed Feb 22 11:14:14 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx
// Created: Wed Feb 22 11:16:54 2012
// File: GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx
// Created: Wed Feb 22 11:16:54 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile

View File

@ -33,10 +33,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_IndexedDataMapOfShapeState.hxx
// Created: Wed Feb 22 11:19:56 2012
// File: GEOMAlgo_IndexedDataMapOfShapeState.hxx
// Created: Wed Feb 22 11:19:56 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx
// Created: Wed Feb 22 08:26:34 2012
// File: GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx
// Created: Wed Feb 22 08:26:34 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile
#define GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_ListIteratorOfListOfPnt.hxx
// Created: Wed Feb 22 08:33:12 2012
// File: GEOMAlgo_ListIteratorOfListOfPnt.hxx
// Created: Wed Feb 22 08:33:12 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_ListOfCoupleOfShapes.hxx
// Created: Wed Feb 22 08:23:27 2012
// File: GEOMAlgo_ListOfCoupleOfShapes.hxx
// Created: Wed Feb 22 08:23:27 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_ListOfCoupleOfShapes_HeaderFile
#define GEOMAlgo_ListOfCoupleOfShapes_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_ListOfPnt.hxx
// Created: Wed Feb 22 08:31:47 2012
// File: GEOMAlgo_ListOfPnt.hxx
// Created: Wed Feb 22 08:31:47 2012
// Author:
// <pkv@BDEURI37616>
// <pkv@BDEURI37616>
#ifndef GEOMAlgo_ListOfPnt_HeaderFile

View File

@ -65,18 +65,18 @@ class GEOMAlgo_PassKey {
Standard_EXPORT
void SetIds(const Standard_Integer aI1,
const Standard_Integer aI2) ;
const Standard_Integer aI2) ;
Standard_EXPORT
void SetIds(const Standard_Integer aI1,
const Standard_Integer aI2,
const Standard_Integer aI3) ;
const Standard_Integer aI2,
const Standard_Integer aI3) ;
Standard_EXPORT
void SetIds(const Standard_Integer aI1,
const Standard_Integer aI2,
const Standard_Integer aI3,
const Standard_Integer aI4) ;
const Standard_Integer aI2,
const Standard_Integer aI3,
const Standard_Integer aI4) ;
Standard_EXPORT
void SetIds(const TColStd_ListOfInteger& aLS) ;

View File

@ -42,10 +42,10 @@ class GEOMAlgo_PassKeyMapHasher {
public:
Standard_EXPORT
static Standard_Integer HashCode(const GEOMAlgo_PassKey& aPKey,
const Standard_Integer Upper) ;
const Standard_Integer Upper) ;
Standard_EXPORT
static Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aPKey1,
const GEOMAlgo_PassKey& aPKey2) ;
const GEOMAlgo_PassKey& aPKey2) ;
};
#endif

View File

@ -65,18 +65,18 @@ class GEOMAlgo_PassKeyShape {
Standard_EXPORT
void SetShapes(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2) ;
const TopoDS_Shape& aS2) ;
Standard_EXPORT
void SetShapes(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2,
const TopoDS_Shape& aS3) ;
const TopoDS_Shape& aS2,
const TopoDS_Shape& aS3) ;
Standard_EXPORT
void SetShapes(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2,
const TopoDS_Shape& aS3,
const TopoDS_Shape& aS4) ;
const TopoDS_Shape& aS2,
const TopoDS_Shape& aS3,
const TopoDS_Shape& aS4) ;
Standard_EXPORT
void SetShapes(const TopTools_ListOfShape& aLS) ;

View File

@ -43,10 +43,10 @@ class GEOMAlgo_PassKeyShapeMapHasher
public:
Standard_EXPORT
static Standard_Integer HashCode(const GEOMAlgo_PassKeyShape& aPKey,
const Standard_Integer Upper) ;
const Standard_Integer Upper) ;
Standard_EXPORT
static Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aPKey1,
const GEOMAlgo_PassKeyShape& aPKey2) ;
const GEOMAlgo_PassKeyShape& aPKey2) ;
};
#endif

View File

@ -150,10 +150,10 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
const TopTools_ListOfShape& aLSx=aMFS(i);
aNbSx=aLSx.Extent();
if (aNbSx==1) {
aSFS.Append(aFx);
aSFS.Append(aFx);
}
else if (aNbSx==2) {
++aNbF2;
++aNbF2;
}
}
}
@ -172,10 +172,10 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
for (; aIt2.More(); aIt2.Next()) {
const TopoDS_Shape& aSi=aIt2.Value();
if (aSi.ShapeType()!=TopAbs_SHELL) {
aOr=aSi.Orientation();
if (aOr==TopAbs_INTERNAL) {
aMSI.Add(aSi);
}
aOr=aSi.Orientation();
if (aOr==TopAbs_INTERNAL) {
aMSI.Add(aSi);
}
}
}
}
@ -212,7 +212,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
//purpose :
//=======================================================================
void GEOMAlgo_RemoverWebs::AddInternalShapes(const TopTools_ListOfShape& aLSR,
const TopTools_IndexedMapOfShape& aMSI)
const TopTools_IndexedMapOfShape& aMSI)
{
Standard_Integer i, aNbSI;
TopAbs_State aState;
@ -233,10 +233,10 @@ void GEOMAlgo_RemoverWebs::AddInternalShapes(const TopTools_ListOfShape& aLSR,
//
aState=GEOMAlgo_Tools3D::ComputeStateByOnePoint(aSI, aSd, 1.e-11, aCtx);
if (aState==TopAbs_IN) {
aBB.Add(aSd, aSI);
//
BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSd);
aSC.Load(aSd);
aBB.Add(aSd, aSI);
//
BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSd);
aSC.Load(aSd);
}
}
}

View File

@ -68,7 +68,7 @@ protected:
Standard_EXPORT
static void AddInternalShapes(const TopTools_ListOfShape& ,
const TopTools_IndexedMapOfShape& );
const TopTools_IndexedMapOfShape& );
//
};

View File

@ -56,36 +56,36 @@ class GEOMAlgo_SurfaceTools
Standard_EXPORT
static Standard_Boolean IsCoaxial(const gp_Pnt& aP1,
const gp_Pnt& aP2,
const gp_Cylinder& aCyl,
const Standard_Real aTol) ;
const gp_Pnt& aP2,
const gp_Cylinder& aCyl,
const Standard_Real aTol) ;
Standard_EXPORT
static Standard_Boolean IsConformState(const TopAbs_State aST1,
const GEOMAlgo_State aST2) ;
const GEOMAlgo_State aST2) ;
Standard_EXPORT
static Standard_Integer GetState(const gp_Pnt& aP,
const GeomAdaptor_Surface& aS,
const Standard_Real aTol,TopAbs_State& aSt) ;
const GeomAdaptor_Surface& aS,
const Standard_Real aTol,TopAbs_State& aSt) ;
Standard_EXPORT
static Standard_Integer GetState(const gp_Pnt& aP,
const Handle(Geom_Surface)& aS,
const Standard_Real aTol,
TopAbs_State& aSt) ;
const Handle(Geom_Surface)& aS,
const Standard_Real aTol,
TopAbs_State& aSt) ;
Standard_EXPORT
static Standard_Real Distance(const gp_Pnt& aP,
const gp_Pln& aPln) ;
const gp_Pln& aPln) ;
Standard_EXPORT
static Standard_Real Distance(const gp_Pnt& aP,
const gp_Cylinder& aCyl) ;
const gp_Cylinder& aCyl) ;
Standard_EXPORT
static Standard_Real Distance(const gp_Pnt& aP,
const gp_Sphere& aSph) ;
const gp_Sphere& aSph) ;
Standard_EXPORT
static TopAbs_State ReverseState(const TopAbs_State aSt) ;

View File

@ -56,54 +56,54 @@ public:
Standard_EXPORT
static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,
const Standard_Real aTol,
const Handle(IntTools_Context)& aCtx) ;
const Standard_Real aTol,
const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT
static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,
const Standard_Real aTol,
TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
const Handle(IntTools_Context)& aCtx) ;
const Standard_Real aTol,
TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT
static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,
const TopTools_ListOfShape& aLE,
const Standard_Real aTol,
TopTools_ListOfShape& aLESD,
const Handle(IntTools_Context)& aCtx) ;
const TopTools_ListOfShape& aLE,
const Standard_Real aTol,
TopTools_ListOfShape& aLESD,
const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT
static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,
const TopoDS_Shape& aS,gp_Pnt& aP2,
const Handle(IntTools_Context)& aCtx) ;
const TopoDS_Shape& aS,gp_Pnt& aP2,
const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT
static void PointOnShape(const TopoDS_Shape& aS,
gp_Pnt& aP3D) ;
gp_Pnt& aP3D) ;
Standard_EXPORT
static void PointOnEdge(const TopoDS_Edge& aE,
gp_Pnt& aP3D) ;
gp_Pnt& aP3D) ;
Standard_EXPORT
static void PointOnEdge(const TopoDS_Edge& aE,
const Standard_Real aT,gp_Pnt& aP3D) ;
const Standard_Real aT,gp_Pnt& aP3D) ;
Standard_EXPORT
static void PointOnFace(const TopoDS_Face& aF,
gp_Pnt& aP3D) ;
gp_Pnt& aP3D) ;
Standard_EXPORT
static void PointOnFace(const TopoDS_Face& aF,
const Standard_Real aU,
const Standard_Real aV,
gp_Pnt& aP3D) ;
const Standard_Real aU,
const Standard_Real aV,
gp_Pnt& aP3D) ;
Standard_EXPORT
static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
const TopoDS_Face& aF,
const Standard_Real aU1,
const Standard_Real aU2) ;
const TopoDS_Face& aF,
const Standard_Real aU1,
const Standard_Real aU2) ;
Standard_EXPORT
static Standard_Boolean IsUPeriodic(const Handle(Geom_Surface)& aS) ;
@ -113,9 +113,9 @@ public:
Standard_EXPORT
static Standard_Integer BuildPCurveForEdgeOnFace(const TopoDS_Edge& aE,
const TopoDS_Edge& aEold,
const TopoDS_Face& aF,
const Handle(IntTools_Context)& aCtx) ;
const TopoDS_Edge& aEold,
const TopoDS_Face& aF,
const Handle(IntTools_Context)& aCtx) ;
};
#endif

View File

@ -1185,8 +1185,8 @@ void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx,
//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_Tools3D::PntInFace(const TopoDS_Face& aF,
gp_Pnt& theP,
gp_Pnt2d& theP2D)
gp_Pnt& theP,
gp_Pnt2d& theP2D)
{
Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint;
Standard_Integer iErr, aIx, aNbDomains, i;
@ -1211,8 +1211,8 @@ Standard_Integer GEOMAlgo_Tools3D::PntInFace(const TopoDS_Face& aF,
//
Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr);
Geom2dHatch_Hatcher aHatcher(aIntr,
aTolHatch2D, aTolHatch3D,
Standard_True, Standard_False);
aTolHatch2D, aTolHatch3D,
Standard_True, Standard_False);
//
iErr=0;
aEpsT=1.e-12;

View File

@ -60,8 +60,8 @@ class GEOMAlgo_Tools3D {
//! theContext - cashed geometrical tools <br>
Standard_EXPORT
static Standard_Boolean IsSplitToReverse(const TopoDS_Shape& theSplit,
const TopoDS_Shape& theShape,
const Handle(IntTools_Context)& theContext) ;
const TopoDS_Shape& theShape,
const Handle(IntTools_Context)& theContext) ;
//! Returns True if normal direction of the face <br>
//! theShape is not the same as for the face <br>
@ -69,8 +69,8 @@ class GEOMAlgo_Tools3D {
//! theContext - cashed geometrical tools <br>
Standard_EXPORT
static Standard_Boolean IsSplitToReverse(const TopoDS_Face& theSplit,
const TopoDS_Face& theShape,
const Handle(IntTools_Context)& theContext) ;
const TopoDS_Face& theShape,
const Handle(IntTools_Context)& theContext) ;
//! Returns True if tangent direction of the edge <br>
//! theEdge is not the same as for the edge <br>
@ -78,8 +78,8 @@ class GEOMAlgo_Tools3D {
//! theContext - cashed geometrical tools <br>
Standard_EXPORT
static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theEdge,
const TopoDS_Edge& theSplit,
const Handle(IntTools_Context)& theContext) ;
const TopoDS_Edge& theSplit,
const Handle(IntTools_Context)& theContext) ;
//! For the couple of faces theF1, theF2 <br>
//! computes sense value <br>
@ -88,18 +88,18 @@ class GEOMAlgo_Tools3D {
//! Returns 2 if the faces have opposite sense <br>
Standard_EXPORT
static Standard_Integer Sense(const TopoDS_Face& theF1,
const TopoDS_Face& theF2) ;
const TopoDS_Face& theF2) ;
//! Makes new face theF2 from surface and wires <br>
//! of the face theF1 <br>
Standard_EXPORT
static void CopyFace(const TopoDS_Face& theF1,
TopoDS_Face& theF2) ;
TopoDS_Face& theF2) ;
//! Makes empty shape theShape of the type theType <br>
Standard_EXPORT
static void MakeContainer(const TopAbs_ShapeEnum theType,
TopoDS_Shape& theShape) ;
TopoDS_Shape& theShape) ;
//! For the list of faces theLS build block <br>
//! theLSCB in terms of connexity by edges <br>
@ -107,8 +107,8 @@ class GEOMAlgo_Tools3D {
//! the treatment <br>
Standard_EXPORT
static void MakeConnexityBlock(const TopTools_ListOfShape& theLS,
const TopTools_IndexedMapOfShape& theMapAvoid,
TopTools_ListOfShape& theLSCB) ;
const TopTools_IndexedMapOfShape& theMapAvoid,
TopTools_ListOfShape& theLSCB) ;
//! Computes the 3-D state of the shape theShape <br>
//! toward solid theSolid. <br>
@ -117,9 +117,9 @@ class GEOMAlgo_Tools3D {
//! Returns 3-D state. <br>
Standard_EXPORT
static TopAbs_State ComputeStateByOnePoint(const TopoDS_Shape& theShape,
const TopoDS_Solid& theSolid,
const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ;
const TopoDS_Solid& theSolid,
const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ;
//! Computes the 3-D state of the point thePoint <br>
//! toward solid theSolid. <br>
@ -128,9 +128,9 @@ class GEOMAlgo_Tools3D {
//! Returns 3-D state. <br>
Standard_EXPORT
static TopAbs_State ComputeState(const gp_Pnt& thePoint,
const TopoDS_Solid& theSolid,
const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ;
const TopoDS_Solid& theSolid,
const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ;
//! Computes the 3-D state of the vertex theVertex <br>
//! toward solid theSolid. <br>
@ -139,9 +139,9 @@ class GEOMAlgo_Tools3D {
//! Returns 3-D state. <br>
Standard_EXPORT
static TopAbs_State ComputeState(const TopoDS_Vertex& theVertex,
const TopoDS_Solid& theSolid,
const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ;
const TopoDS_Solid& theSolid,
const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ;
//! Computes the 3-D state of the edge theEdge <br>
//! toward solid theSolid. <br>
@ -150,9 +150,9 @@ class GEOMAlgo_Tools3D {
//! Returns 3-D state. <br>
Standard_EXPORT
static TopAbs_State ComputeState(const TopoDS_Edge& theEdge,
const TopoDS_Solid& theSolid,
const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ;
const TopoDS_Solid& theSolid,
const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ;
//! Computes the 3-D state of the face theFace <br>
//! toward solid theSolid. <br>
@ -162,10 +162,10 @@ class GEOMAlgo_Tools3D {
//! Returns 3-D state. <br>
Standard_EXPORT
static TopAbs_State ComputeState(const TopoDS_Face& theFace,
const TopoDS_Solid& theSolid,
const Standard_Real theTol,
const TopTools_IndexedMapOfShape& theBounds,
const Handle(IntTools_Context)& theContext) ;
const TopoDS_Solid& theSolid,
const Standard_Real theTol,
const TopTools_IndexedMapOfShape& theBounds,
const Handle(IntTools_Context)& theContext) ;
//! Returns True if the face theFace is inside of the <br>
//! couple of faces theFace1, theFace2. <br>
@ -173,10 +173,10 @@ class GEOMAlgo_Tools3D {
//! share the edge theEdge <br>
Standard_EXPORT
static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace1,
const TopoDS_Face& theFace2,
const Handle(IntTools_Context)& theContext) ;
const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace1,
const TopoDS_Face& theFace2,
const Handle(IntTools_Context)& theContext) ;
//! Returns True if the face theFace is inside of the <br>
//! appropriate couple of faces (from the set theLF) . <br>
@ -184,9 +184,9 @@ class GEOMAlgo_Tools3D {
//! share the edge theEdge <br>
Standard_EXPORT
static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
const TopoDS_Edge& theEdge,
const TopTools_ListOfShape& theLF,
const Handle(IntTools_Context)& theContext) ;
const TopoDS_Edge& theEdge,
const TopTools_ListOfShape& theLF,
const Handle(IntTools_Context)& theContext) ;
//! Returns True if the face theFace is inside the <br>
//! solid theSolid. <br>
@ -195,10 +195,10 @@ class GEOMAlgo_Tools3D {
//! theContext- cahed geometrical tools <br>
Standard_EXPORT
static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
const TopoDS_Solid& theSolid,
const TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ;
const TopoDS_Solid& theSolid,
const TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
const Standard_Real theTol,
const Handle(IntTools_Context)& theContext) ;
//! For the face theFace and its edge theEdge <br>
//! finds the face suitable to produce shell. <br>
@ -206,9 +206,9 @@ class GEOMAlgo_Tools3D {
//! from theLCEF must share edge theEdge <br>
Standard_EXPORT
static void GetFaceOff(const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace,
const NMTTools_ListOfCoupleOfShape& theLCEF,
TopoDS_Face& theFaceOff) ;
const TopoDS_Face& theFace,
const NMTTools_ListOfCoupleOfShape& theLCEF,
TopoDS_Face& theFaceOff) ;
//! For the face theFace gets the edge theEdgeOnF <br>
//! that is the same as theEdge <br>
@ -216,8 +216,8 @@ class GEOMAlgo_Tools3D {
//! Returns False if there is no such edge <br>
Standard_EXPORT
static Standard_Boolean GetEdgeOnFace(const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace,
TopoDS_Edge& theEdgeOnF) ;
const TopoDS_Face& theFace,
TopoDS_Edge& theEdgeOnF) ;
//! Returns True if the face theFace contains <br>
//! the edge theEdge but with opposite orientation. <br>
@ -225,8 +225,8 @@ class GEOMAlgo_Tools3D {
//! edge founded <br>
Standard_EXPORT
static Standard_Boolean GetEdgeOff(const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace,
TopoDS_Edge& theEdgeOff) ;
const TopoDS_Face& theFace,
TopoDS_Edge& theEdgeOff) ;
//! Computes a point <theP> inside the face <theF>. <br>
//! <theP2D> - 2D representation of <theP> <br>
@ -234,7 +234,7 @@ class GEOMAlgo_Tools3D {
//! Returns 0 in case of success. <br>
Standard_EXPORT
static Standard_Integer PntInFace(const TopoDS_Face& theF,
gp_Pnt& theP,
gp_Pnt2d& theP2D) ;
gp_Pnt& theP,
gp_Pnt2d& theP2D) ;
};
#endif

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_WESScaler.cxx
// File: GEOMAlgo_WESScaler.cxx
// Created:
// Author:
// <pkv@VORTEX>
// <pkv@VORTEX>
#include <GEOMAlgo_WESScaler.hxx>

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: GEOMAlgo_WESScaler.hxx
// File: GEOMAlgo_WESScaler.hxx
// Created:
// Author:
// <pkv@VORTEX>
// <pkv@VORTEX>
#ifndef _GEOMAlgo_WESScaler_HeaderFile
#define _GEOMAlgo_WESScaler_HeaderFile

View File

@ -117,7 +117,7 @@ static
//modified by NIZNHY-PKV Thu Apr 19 09:04:59 2012f
static
Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta,
const BOP_ListOfEdgeInfo& aLEInfo);
const BOP_ListOfEdgeInfo& aLEInfo);
//static
// Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& );
//modified by NIZNHY-PKV Thu Apr 19 09:04:53 2012t
@ -578,7 +578,7 @@ static
//
if (anIsOut && anIsNotPassed) {
if (aE.IsSame(aEOuta)) {
continue;
continue;
}
//
if (iCnt==1) {
@ -852,7 +852,7 @@ Standard_Real Angle (const gp_Dir2d& aDir2D)
// purpose:
//=======================================================================
Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta,
const BOP_ListOfEdgeInfo& aLEInfo)
const BOP_ListOfEdgeInfo& aLEInfo)
{
Standard_Boolean bIsOut, bIsNotPassed;
Standard_Integer iCnt=0;
@ -866,7 +866,7 @@ Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta,
bIsNotPassed=!aEI.Passed();
if (bIsOut && bIsNotPassed) {
if (!aE.IsSame(aEOuta)) {
iCnt++;
iCnt++;
}
}
}

View File

@ -115,8 +115,8 @@ TopoDS_Shape GEOMBase::GetTopoFromSelection( const SALOME_ListIO& IObjects )
_PTR(SObject) obj( studyDS->FindObjectID( IO->getEntry() ) );
_PTR(GenericAttribute) anAttr;
if ( obj && obj->FindAttribute( anAttr, "AttributeIOR" ) ) {
_PTR(AttributeIOR) anIOR( anAttr );
shape = GetShapeFromIOR( anIOR->Value().c_str() );
_PTR(AttributeIOR) anIOR( anAttr );
shape = GetShapeFromIOR( anIOR->Value().c_str() );
}
}
}
@ -140,13 +140,13 @@ int GEOMBase::GetNameOfSelectedIObjects( const SALOME_ListIO& IObjects,
Handle(SALOME_InteractiveObject) anIObj = IObjects.First();
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
if ( anIObj->hasEntry() && study ) {
_PTR(Study) studyDS = study->studyDS();
_PTR(SObject) obj( studyDS->FindObjectID( anIObj->getEntry() ) );
_PTR(GenericAttribute) anAttr;
if ( obj && obj->FindAttribute( anAttr, "AttributeName" ) ) {
_PTR(AttributeName) aNameAttr ( anAttr );
name = aNameAttr->Value().c_str();
}
_PTR(Study) studyDS = study->studyDS();
_PTR(SObject) obj( studyDS->FindObjectID( anIObj->getEntry() ) );
_PTR(GenericAttribute) anAttr;
if ( obj && obj->FindAttribute( anAttr, "AttributeName" ) ) {
_PTR(AttributeName) aNameAttr ( anAttr );
name = aNameAttr->Value().c_str();
}
}
}
}
@ -176,88 +176,88 @@ QString GEOMBase::GetShapeTypeString(const TopoDS_Shape& shape)
switch ( shape.ShapeType() ) {
case TopAbs_COMPOUND:
{
aTypeString = QObject::tr( "GEOM_COMPOUND" );
break;
aTypeString = QObject::tr( "GEOM_COMPOUND" );
break;
}
case TopAbs_COMPSOLID:
{
aTypeString = QObject::tr( "GEOM_COMPOUNDSOLID" );
break;
aTypeString = QObject::tr( "GEOM_COMPOUNDSOLID" );
break;
}
case TopAbs_SOLID:
{
aTypeString = QObject::tr( "GEOM_SOLID" );
break;
aTypeString = QObject::tr( "GEOM_SOLID" );
break;
}
case TopAbs_SHELL:
{
aTypeString = QObject::tr( "GEOM_SHELL" );
break;
aTypeString = QObject::tr( "GEOM_SHELL" );
break;
}
case TopAbs_FACE:
{
BRepAdaptor_Surface surf( TopoDS::Face( shape ) );
switch ( surf.GetType() ) {
case GeomAbs_Plane:
{
aTypeString = QObject::tr( "GEOM_PLANE" );
break;
}
case GeomAbs_Cylinder:
{
aTypeString = QObject::tr( "GEOM_SURFCYLINDER" );
break;
}
case GeomAbs_Sphere:
{
aTypeString = QObject::tr( "GEOM_SURFSPHERE" );
break;
}
case GeomAbs_Torus:
{
aTypeString = QObject::tr( "GEOM_SURFTORUS" );
break;
}
case GeomAbs_Cone:
{
aTypeString = QObject::tr( "GEOM_SURFCONE" );
break;
}
default:
{
aTypeString = QObject::tr( "GEOM_FACE" );
break;
}
}
break;
switch ( surf.GetType() ) {
case GeomAbs_Plane:
{
aTypeString = QObject::tr( "GEOM_PLANE" );
break;
}
case GeomAbs_Cylinder:
{
aTypeString = QObject::tr( "GEOM_SURFCYLINDER" );
break;
}
case GeomAbs_Sphere:
{
aTypeString = QObject::tr( "GEOM_SURFSPHERE" );
break;
}
case GeomAbs_Torus:
{
aTypeString = QObject::tr( "GEOM_SURFTORUS" );
break;
}
case GeomAbs_Cone:
{
aTypeString = QObject::tr( "GEOM_SURFCONE" );
break;
}
default:
{
aTypeString = QObject::tr( "GEOM_FACE" );
break;
}
}
break;
}
case TopAbs_WIRE:
{
aTypeString = QObject::tr( "GEOM_WIRE" );
break;
break;
}
case TopAbs_EDGE:
{
BRepAdaptor_Curve curv( TopoDS::Edge( shape ) );
switch ( curv.GetType() ) {
case GeomAbs_Line:
{
aTypeString = ( qAbs( curv.FirstParameter() ) >= 1E6 || qAbs( curv.LastParameter() ) >= 1E6 ) ?
QObject::tr( "GEOM_LINE" ) : QObject::tr( "GEOM_EDGE" );
break;
}
case GeomAbs_Circle:
{
aTypeString = curv.IsClosed() ? QObject::tr( "GEOM_CIRCLE" ) : QObject::tr( "GEOM_ARC" );
break;
}
default:
{
aTypeString = QObject::tr( "GEOM_EDGE" );
break;
}
}
break;
switch ( curv.GetType() ) {
case GeomAbs_Line:
{
aTypeString = ( qAbs( curv.FirstParameter() ) >= 1E6 || qAbs( curv.LastParameter() ) >= 1E6 ) ?
QObject::tr( "GEOM_LINE" ) : QObject::tr( "GEOM_EDGE" );
break;
}
case GeomAbs_Circle:
{
aTypeString = curv.IsClosed() ? QObject::tr( "GEOM_CIRCLE" ) : QObject::tr( "GEOM_ARC" );
break;
}
default:
{
aTypeString = QObject::tr( "GEOM_EDGE" );
break;
}
}
break;
}
case TopAbs_VERTEX:
{
@ -271,7 +271,7 @@ QString GEOMBase::GetShapeTypeString(const TopoDS_Shape& shape)
}
default:
{
break;
break;
}
}
}
@ -294,31 +294,31 @@ Handle(GEOM_AISShape) GEOMBase::ConvertIORinGEOMAISShape(const QString& IOR, boo
if ( obj ) {
QList<SUIT_ViewWindow*> views;
if ( onlyInActiveView )
views.append( SUIT_Session::session()->activeApplication()->desktop()->activeWindow() );
views.append( SUIT_Session::session()->activeApplication()->desktop()->activeWindow() );
else
views = SUIT_Session::session()->activeApplication()->desktop()->windows();
views = SUIT_Session::session()->activeApplication()->desktop()->windows();
foreach ( SUIT_ViewWindow* view, views ) {
if ( view && view->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
Handle(AIS_InteractiveContext) ic = ((OCCViewer_Viewer*)view->getViewManager()->getViewModel())->getAISContext();
if ( view && view->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
Handle(AIS_InteractiveContext) ic = ((OCCViewer_Viewer*)view->getViewManager()->getViewModel())->getAISContext();
AIS_ListOfInteractive displayed;
ic->DisplayedObjects( displayed );
ic->ObjectsInCollector( displayed );
AIS_ListOfInteractive displayed;
ic->DisplayedObjects( displayed );
ic->ObjectsInCollector( displayed );
AIS_ListIteratorOfListOfInteractive it( displayed );
while ( it.More() && shape.IsNull() ) {
if ( it.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
Handle(GEOM_AISShape) sh = Handle(GEOM_AISShape)::DownCast( it.Value() );
if ( !sh.IsNull() && sh->hasIO() ) {
Handle(SALOME_InteractiveObject) IO = Handle(SALOME_InteractiveObject)::DownCast( sh->getIO() );
if ( !IO.IsNull() && IO->hasEntry() && obj->GetID() == IO->getEntry() )
shape = sh;
}
}
it.Next();
}
}
if ( !shape.IsNull() ) break;
AIS_ListIteratorOfListOfInteractive it( displayed );
while ( it.More() && shape.IsNull() ) {
if ( it.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
Handle(GEOM_AISShape) sh = Handle(GEOM_AISShape)::DownCast( it.Value() );
if ( !sh.IsNull() && sh->hasIO() ) {
Handle(SALOME_InteractiveObject) IO = Handle(SALOME_InteractiveObject)::DownCast( sh->getIO() );
if ( !IO.IsNull() && IO->hasEntry() && obj->GetID() == IO->getEntry() )
shape = sh;
}
}
it.Next();
}
}
if ( !shape.IsNull() ) break;
}
}
}
@ -341,31 +341,31 @@ GEOM_Actor* GEOMBase::ConvertIORinGEOMActor(const QString& IOR, bool onlyInActiv
if ( obj ) {
QList<SUIT_ViewWindow*> views;
if ( onlyInActiveView )
views.append( SUIT_Session::session()->activeApplication()->desktop()->activeWindow() );
views.append( SUIT_Session::session()->activeApplication()->desktop()->activeWindow() );
else
views = SUIT_Session::session()->activeApplication()->desktop()->windows();
views = SUIT_Session::session()->activeApplication()->desktop()->windows();
foreach ( SUIT_ViewWindow* view, views ) {
if ( view && view->getViewManager()->getType() == SVTK_Viewer::Type() ) {
SVTK_ViewWindow* aVTKViewWindow = dynamic_cast<SVTK_ViewWindow*>( view );
if( !aVTKViewWindow )
continue;
vtkRenderer* Renderer = aVTKViewWindow->getRenderer();
vtkActorCollection* theActors = Renderer->GetActors();
theActors->InitTraversal();
vtkActor* a = theActors->GetNextActor();
while( a && !actor ) {
if ( a->IsA( "GEOM_Actor" ) ) {
GEOM_Actor* ga = GEOM_Actor::SafeDownCast( a );
if ( ga && ga->hasIO() ) {
Handle(SALOME_InteractiveObject) IO = Handle(SALOME_InteractiveObject)::DownCast( ga->getIO() );
if ( !IO.IsNull() && IO->hasEntry() && obj->GetID() == IO->getEntry() )
actor = ga;
}
}
a = theActors->GetNextActor();
}
}
if ( actor ) break;
if ( view && view->getViewManager()->getType() == SVTK_Viewer::Type() ) {
SVTK_ViewWindow* aVTKViewWindow = dynamic_cast<SVTK_ViewWindow*>( view );
if( !aVTKViewWindow )
continue;
vtkRenderer* Renderer = aVTKViewWindow->getRenderer();
vtkActorCollection* theActors = Renderer->GetActors();
theActors->InitTraversal();
vtkActor* a = theActors->GetNextActor();
while( a && !actor ) {
if ( a->IsA( "GEOM_Actor" ) ) {
GEOM_Actor* ga = GEOM_Actor::SafeDownCast( a );
if ( ga && ga->hasIO() ) {
Handle(SALOME_InteractiveObject) IO = Handle(SALOME_InteractiveObject)::DownCast( ga->getIO() );
if ( !IO.IsNull() && IO->hasEntry() && obj->GetID() == IO->getEntry() )
actor = ga;
}
}
a = theActors->GetNextActor();
}
}
if ( actor ) break;
}
}
}
@ -611,25 +611,25 @@ bool GEOMBase::SelectionByNameInDialogs( QWidget* widget, const QString& objectU
if ( listSO.size() < 1 ) {
SUIT_MessageBox::critical( widget,
QObject::tr( "GEOM_WRN_WARNING" ),
QObject::tr( "GEOM_NAME_INCORRECT" ),
QObject::tr( "GEOM_BUT_OK" ) );
QObject::tr( "GEOM_WRN_WARNING" ),
QObject::tr( "GEOM_NAME_INCORRECT" ),
QObject::tr( "GEOM_BUT_OK" ) );
return false;
}
/* More than one object with same name */
if ( listSO.size() > 1 ) {
SUIT_MessageBox::critical( widget,
QObject::tr("GEOM_WRN_WARNING"),
QObject::tr("GEOM_IDENTICAL_NAMES_SELECT_BY_MOUSE"),
QObject::tr("GEOM_BUT_OK") );
QObject::tr("GEOM_WRN_WARNING"),
QObject::tr("GEOM_IDENTICAL_NAMES_SELECT_BY_MOUSE"),
QObject::tr("GEOM_BUT_OK") );
return false;
}
/* Create a SALOME_InteractiveObject with a SALOME::SObject */
Handle(SALOME_InteractiveObject) IO = new SALOME_InteractiveObject( listSO[0]->GetID().c_str(),
"GEOM",
objectUserName.toLatin1().constData() );
"GEOM",
objectUserName.toLatin1().constData() );
/* Add as a selected object */
/* Clear any previous selection : */
@ -671,7 +671,7 @@ QString GEOMBase::GetDefaultName( const QString& operation, bool extractPrefix )
if ( component ) {
_PTR(ChildIterator) it( studyDS->NewChildIterator( component ) );
for ( it->InitEx( true ); it->More(); it->Next() ) {
names.insert( it->Value()->GetName() );
names.insert( it->Value()->GetName() );
}
}
@ -683,13 +683,13 @@ QString GEOMBase::GetDefaultName( const QString& operation, bool extractPrefix )
if ( extractPrefix ) {
QStringList parts = prefix.split( "_", QString::KeepEmptyParts );
if ( parts.count() > 1 ) {
bool ok;
aNumber = parts.last().toLong( &ok );
if ( ok ) {
parts.removeLast();
prefix = parts.join( "_" );
aNumber--;
}
bool ok;
aNumber = parts.last().toLong( &ok );
if ( ok ) {
parts.removeLast();
prefix = parts.join( "_" );
aNumber--;
}
}
}
@ -716,9 +716,9 @@ void GEOMBase::ShowErrorMessage( const QString& errorCode, const QString& commen
text << QObject::tr( comment.toLatin1().constData() );
SUIT_MessageBox::critical( SUIT_Session::session()->activeApplication()->desktop(),
QObject::tr( "GEOM_ERROR" ),
QObject::tr( "GEOM_ERROR" ),
text.join( "\n" ),
QObject::tr( "GEOM_BUT_OK" ) );
QObject::tr( "GEOM_BUT_OK" ) );
}
@ -771,26 +771,26 @@ QString GEOMBase::GetName( GEOM::GEOM_Object_ptr object )
_PTR(SObject) aSObj( study->studyDS()->FindObjectIOR( std::string( IOR.in() ) ) );
_PTR(GenericAttribute) anAttr;
if ( aSObj && aSObj->FindAttribute( anAttr, "AttributeName") ) {
_PTR(AttributeName) aNameAttr( anAttr );
name = aNameAttr->Value().c_str();
_PTR(AttributeName) aNameAttr( anAttr );
name = aNameAttr->Value().c_str();
}
}
// 2. if object is not found in the study, try default name
if ( name.isEmpty() ) {
if ( object->IsMainShape() ) {
name = GetDefaultName( "geomObj" );
name = GetDefaultName( "geomObj" );
}
else {
GEOM::GEOM_Object_var mainShape = object->GetMainShape();
if ( !CORBA::is_nil( mainShape ) ) {
GEOM::ListOfLong_var indices = object->GetSubShapeIndices();
if ( indices->length() > 0 ) {
TopAbs_ShapeEnum type = (TopAbs_ShapeEnum)( object->GetShapeType() );
name = QString( "%1:%2_%3" ).arg( GetName( mainShape.in() ) )
.arg( TypeName( type ) ).arg( indices[0] );
}
}
GEOM::GEOM_Object_var mainShape = object->GetMainShape();
if ( !CORBA::is_nil( mainShape ) ) {
GEOM::ListOfLong_var indices = object->GetSubShapeIndices();
if ( indices->length() > 0 ) {
TopAbs_ShapeEnum type = (TopAbs_ShapeEnum)( object->GetShapeType() );
name = QString( "%1:%2_%3" ).arg( GetName( mainShape.in() ) )
.arg( TypeName( type ) ).arg( indices[0] );
}
}
}
}
}
@ -871,7 +871,7 @@ void GEOMBase::PublishSubObject( GEOM::GEOM_Object_ptr object )
if ( entry.isEmpty() && !CORBA::is_nil( father ) && !fatherEntry.isEmpty() ) {
QString name = GetName( object );
GeometryGUI::GetGeomGen()->AddInStudy( GeometryGUI::ClientStudyToStudy( studyDS ),
object, name.toLatin1().data(), father.in() );
object, name.toLatin1().data(), father.in() );
}
}
}

View File

@ -57,37 +57,37 @@ public :
static int GetIndex( const TopoDS_Shape& subshape, const TopoDS_Shape& shape );
static TopoDS_Shape GetShapeFromIOR( const QString& IOR );
static bool GetShape( GEOM::GEOM_Object_ptr object,
TopoDS_Shape& shape,
const TopAbs_ShapeEnum type = TopAbs_SHAPE );
TopoDS_Shape& shape,
const TopAbs_ShapeEnum type = TopAbs_SHAPE );
static TopoDS_Shape GetTopoFromSelection( const SALOME_ListIO& IObjects );
static int GetNameOfSelectedIObjects( const SALOME_ListIO& IObjects,
QString& name,
const bool shapesOnly = false );
QString& name,
const bool shapesOnly = false );
static QString GetShapeTypeString( const TopoDS_Shape& shape );
/* Convertions */
static Handle(GEOM_AISShape)
ConvertIOinGEOMAISShape( const Handle(SALOME_InteractiveObject)& IO,
bool onlyInActiveView = false );
bool onlyInActiveView = false );
static Handle(AIS_InteractiveObject)
GetAIS( const Handle(SALOME_InteractiveObject)& IO,
bool onlyInActiveView = false,
bool onlyGeom = false );
bool onlyInActiveView = false,
bool onlyGeom = false );
static QStringList ConvertListOfIOInListOfIOR( const SALOME_ListIO& IObjects );
static Handle(GEOM_AISShape)
ConvertIORinGEOMAISShape( const QString& IOR,
bool onlyInActiveView = false );
bool onlyInActiveView = false );
static GEOM_Actor* ConvertIORinGEOMActor( const QString& IOR,
bool onlyInActiveView = false );
bool onlyInActiveView = false );
static GEOM::GEOM_Object_ptr
ConvertIOinGEOMObject( const Handle(SALOME_InteractiveObject)& IO );
static void ConvertListOfIOInListOfGO( const SALOME_ListIO& IObjects,
GEOM::ListOfGO& geomObjects,
bool shapesOnly = false );
GEOM::ListOfGO& geomObjects,
bool shapesOnly = false );
static GEOM::GEOM_Object_ptr
GetObjectFromIOR( const QString& IOR );
@ -99,17 +99,17 @@ public :
/* Used just by Plane and Prism */
static bool LinearEdgeExtremities( const TopoDS_Shape& shape,
gp_Pnt& point1, gp_Pnt& point2 );
gp_Pnt& point1, gp_Pnt& point2 );
static void GetBipointDxDyDz( const gp_Pnt& point1, const gp_Pnt& point2,
double& dx, double& dy, double& dz );
double& dx, double& dy, double& dz );
/* Simulation management */
static TopoDS_Shape CreateArrowForLinearEdge( const TopoDS_Shape& tds );
/* Generates default names */
static bool SelectionByNameInDialogs( QWidget* widget,
const QString& userObjectName,
const SALOME_ListIO& IObjects );
const QString& userObjectName,
const SALOME_ListIO& IObjects );
/* Shows message box with error code */
static void DefineDlgPosition( QWidget* dlg, int& x, int& y );

View File

@ -116,11 +116,11 @@ void GEOMGUI_Selection::init( const QString& context, LightApp_SelectionMgr* sel
for ( int idx = 0; idx < count(); idx++ ) {
QString anEntry = entry( idx );
if ( study && !anEntry.isEmpty() ) {
_PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) );
if ( aSO ) {
CORBA::Object_var varObj = GeometryGUI::ClientSObjectToObject( aSO );
myObjects[idx] = GEOM::GEOM_Object::_narrow( varObj );
}
_PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) );
if ( aSO ) {
CORBA::Object_var varObj = GeometryGUI::ClientSObjectToObject( aSO );
myObjects[idx] = GEOM::GEOM_Object::_narrow( varObj );
}
}
}
}
@ -301,44 +301,44 @@ QString GEOMGUI_Selection::displayMode( const int index ) const
SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs;
AIS_ListOfInteractive lst;
occPrs->GetObjects( lst );
if ( lst.Extent() ) {
Handle(AIS_InteractiveObject) io = lst.First();
if ( !io.IsNull() ) {
int dm;
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
if(!aSh.IsNull()) {
dm = aSh->isTopLevel() ? aSh->prevDisplayMode() : aSh->DisplayMode();
} else {
dm = io->DisplayMode();
}
OCC_DISPLAY_MODE_TO_STRING( res, dm );
if ( res.isEmpty() ) { // return default display mode of AIS_InteractiveContext
OCCViewer_Viewer* occViewer = (OCCViewer_Viewer*)SUIT_Session::session()->activeApplication()->
desktop()->activeWindow()->getViewManager()->getViewModel();
Handle(AIS_InteractiveContext) ic = occViewer->getAISContext();
dm = ic->DisplayMode();
OCC_DISPLAY_MODE_TO_STRING( res, dm );
}
}
}
SOCC_Prs* occPrs = (SOCC_Prs*) prs;
AIS_ListOfInteractive lst;
occPrs->GetObjects( lst );
if ( lst.Extent() ) {
Handle(AIS_InteractiveObject) io = lst.First();
if ( !io.IsNull() ) {
int dm;
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
if(!aSh.IsNull()) {
dm = aSh->isTopLevel() ? aSh->prevDisplayMode() : aSh->DisplayMode();
} else {
dm = io->DisplayMode();
}
OCC_DISPLAY_MODE_TO_STRING( res, dm );
if ( res.isEmpty() ) { // return default display mode of AIS_InteractiveContext
OCCViewer_Viewer* occViewer = (OCCViewer_Viewer*)SUIT_Session::session()->activeApplication()->
desktop()->activeWindow()->getViewManager()->getViewModel();
Handle(AIS_InteractiveContext) ic = occViewer->getAISContext();
dm = ic->DisplayMode();
OCC_DISPLAY_MODE_TO_STRING( res, dm );
}
}
}
}
else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK
SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
if ( lst ) {
lst->InitTraversal();
vtkActor* actor = lst->GetNextActor();
if ( actor ) {
SALOME_Actor* salActor = dynamic_cast<SALOME_Actor*>( actor );
if ( salActor ) {
int dm = salActor->getDisplayMode();
VTK_DISPLAY_MODE_TO_STRING( res, dm );
} // if ( salome actor )
} // if ( actor )
} // if ( lst == vtkPrs->GetObjects() )
SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
if ( lst ) {
lst->InitTraversal();
vtkActor* actor = lst->GetNextActor();
if ( actor ) {
SALOME_Actor* salActor = dynamic_cast<SALOME_Actor*>( actor );
if ( salActor ) {
int dm = salActor->getDisplayMode();
VTK_DISPLAY_MODE_TO_STRING( res, dm );
} // if ( salome actor )
} // if ( actor )
} // if ( lst == vtkPrs->GetObjects() )
} // if VTK
}
}
@ -362,30 +362,30 @@ bool GEOMGUI_Selection::isVectorsMode( const int index ) const
SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs;
AIS_ListOfInteractive lst;
occPrs->GetObjects( lst );
if ( lst.Extent() ) {
Handle(AIS_InteractiveObject) io = lst.First();
if ( !io.IsNull() ) {
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
if ( !aSh.IsNull() )
res = aSh->isShowVectors();
}
}
SOCC_Prs* occPrs = (SOCC_Prs*) prs;
AIS_ListOfInteractive lst;
occPrs->GetObjects( lst );
if ( lst.Extent() ) {
Handle(AIS_InteractiveObject) io = lst.First();
if ( !io.IsNull() ) {
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
if ( !aSh.IsNull() )
res = aSh->isShowVectors();
}
}
}
else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK
SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
if ( lst ) {
lst->InitTraversal();
vtkActor* actor = lst->GetNextActor();
if ( actor ) {
GEOM_Actor* aGeomActor = GEOM_Actor::SafeDownCast(actor);
if ( aGeomActor )
res = aGeomActor->GetVectorMode();
}
}
SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
if ( lst ) {
lst->InitTraversal();
vtkActor* actor = lst->GetNextActor();
if ( actor ) {
GEOM_Actor* aGeomActor = GEOM_Actor::SafeDownCast(actor);
if ( aGeomActor )
res = aGeomActor->GetVectorMode();
}
}
}
}
}
@ -549,17 +549,17 @@ bool GEOMGUI_Selection::topLevel( const int index ) const
SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs;
AIS_ListOfInteractive lst;
occPrs->GetObjects( lst );
if ( lst.Extent() ) {
Handle(AIS_InteractiveObject) io = lst.First();
if ( !io.IsNull() ) {
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
if ( !aSh.IsNull() )
res = (bool)aSh->isTopLevel();
}
}
SOCC_Prs* occPrs = (SOCC_Prs*) prs;
AIS_ListOfInteractive lst;
occPrs->GetObjects( lst );
if ( lst.Extent() ) {
Handle(AIS_InteractiveObject) io = lst.First();
if ( !io.IsNull() ) {
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
if ( !aSh.IsNull() )
res = (bool)aSh->isTopLevel();
}
}
}
}
}
@ -585,33 +585,33 @@ bool GEOMGUI_Selection::isPhysicalMaterial( const int idx ) const
SALOME_Prs* prs = view->CreatePrs( entry( idx ).toLatin1().constData() );
if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs;
AIS_ListOfInteractive lst;
occPrs->GetObjects( lst );
if ( lst.Extent() ) {
Handle(AIS_InteractiveObject) io = lst.First();
if ( !io.IsNull() ) {
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
if ( !aSh.IsNull() )
res = (bool) aSh->Attributes()->ShadingAspect()->
Material(Aspect_TOFM_BOTH_SIDE).MaterialType( Graphic3d_MATERIAL_PHYSIC );
}
}
SOCC_Prs* occPrs = (SOCC_Prs*) prs;
AIS_ListOfInteractive lst;
occPrs->GetObjects( lst );
if ( lst.Extent() ) {
Handle(AIS_InteractiveObject) io = lst.First();
if ( !io.IsNull() ) {
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(io);
if ( !aSh.IsNull() )
res = (bool) aSh->Attributes()->ShadingAspect()->
Material(Aspect_TOFM_BOTH_SIDE).MaterialType( Graphic3d_MATERIAL_PHYSIC );
}
}
}
else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK
SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
if ( lst ) {
lst->InitTraversal();
vtkActor* actor = lst->GetNextActor();
if ( actor ) {
GEOM_Actor* aGeomGActor = GEOM_Actor::SafeDownCast( actor );
if ( aGeomGActor ) {
GEOM_VTKPropertyMaterial* mat = GEOM_VTKPropertyMaterial::SafeDownCast(aGeomGActor->GetProperty());
res = mat->GetPhysical();
} // if ( salome actor )
} // if ( actor )
} // if ( lst == vtkPrs->GetObjects() )
SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( prs );
vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0;
if ( lst ) {
lst->InitTraversal();
vtkActor* actor = lst->GetNextActor();
if ( actor ) {
GEOM_Actor* aGeomGActor = GEOM_Actor::SafeDownCast( actor );
if ( aGeomGActor ) {
GEOM_VTKPropertyMaterial* mat = GEOM_VTKPropertyMaterial::SafeDownCast(aGeomGActor->GetProperty());
res = mat->GetPhysical();
} // if ( salome actor )
} // if ( actor )
} // if ( lst == vtkPrs->GetObjects() )
}
}
}

View File

@ -625,25 +625,25 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
// - wireframe color
Handle(Prs3d_LineAspect) anAspect = AISShape->Attributes()->LineAspect();
anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() :
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::WireframeColor ) ).value<QColor>() ) );
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::WireframeColor ) ).value<QColor>() ) );
AISShape->Attributes()->SetLineAspect( anAspect );
// - unfree boundaries color
anAspect = AISShape->Attributes()->UnFreeBoundaryAspect();
anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() :
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::WireframeColor ) ).value<QColor>() ) );
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::WireframeColor ) ).value<QColor>() ) );
AISShape->Attributes()->SetUnFreeBoundaryAspect( anAspect );
// - free boundaries color
anAspect = AISShape->Attributes()->FreeBoundaryAspect();
anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() :
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::FreeBndColor ) ).value<QColor>() ) );
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::FreeBndColor ) ).value<QColor>() ) );
AISShape->Attributes()->SetFreeBoundaryAspect( anAspect );
// - standalone edges color
anAspect = AISShape->Attributes()->WireAspect();
anAspect->SetColor( HasColor() ? (Quantity_NameOfColor)GetColor() :
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::LineColor ) ).value<QColor>() ) );
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::LineColor ) ).value<QColor>() ) );
AISShape->Attributes()->SetWireAspect( anAspect );
// - color for edges in shading+edges mode
@ -654,10 +654,10 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
// set display mode
AISShape->SetDisplayMode( HasDisplayMode() ?
// predefined display mode, manually set to displayer via GEOM_Displayer::SetDisplayMode() function
GetDisplayMode() :
// display mode from properties
propMap.value( GEOM::propertyName( GEOM::DisplayMode ) ).toInt() );
// predefined display mode, manually set to displayer via GEOM_Displayer::SetDisplayMode() function
GetDisplayMode() :
// display mode from properties
propMap.value( GEOM::propertyName( GEOM::DisplayMode ) ).toInt() );
// set display vectors flag
AISShape->SetDisplayVectors( propMap.value( GEOM::propertyName( GEOM::EdgesDirection ) ).toBool() );
@ -697,10 +697,10 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
// set line width
AISShape->SetWidth( HasWidth() ?
// predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function
GetWidth() :
// libe width from properties
propMap.value( GEOM::propertyName( GEOM::LineWidth ) ).toInt() );
// predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function
GetWidth() :
// libe width from properties
propMap.value( GEOM::propertyName( GEOM::LineWidth ) ).toInt() );
// set top-level flag
AISShape->setTopLevel( propMap.value( GEOM::propertyName( GEOM::TopLevel ) ).toBool() );
@ -716,10 +716,10 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
anAspect->SetScale( aScaleOfMarker );
anAspect->SetTypeOfMarker( (Aspect_TypeOfMarker)( aTypeOfMarker-1 ) );
anAspect->SetColor( HasColor() ?
// predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
(Quantity_NameOfColor)GetColor() :
// color from properties
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::PointColor ) ).value<QColor>() ) );
// predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
(Quantity_NameOfColor)GetColor() :
// color from properties
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::PointColor ) ).value<QColor>() ) );
AISShape->Attributes()->SetPointAspect( anAspect );
}
else if ( aList.size() == 1 ) {
@ -729,21 +729,21 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
Handle(TColStd_HArray1OfByte) aTexture =
#else
Handle(Graphic3d_HArray1OfBytes) aTexture =
Handle(Graphic3d_HArray1OfBytes) aTexture =
#endif
GeometryGUI::getTexture( study, textureId, aWidth, aHeight );
GeometryGUI::getTexture( study, textureId, aWidth, aHeight );
if ( !aTexture.IsNull() ) {
static int TextureId = 0;
Handle(Prs3d_PointAspect) aTextureAspect =
new Prs3d_PointAspect( HasColor() ?
// predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
(Quantity_NameOfColor)GetColor() :
// color from properties
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::PointColor ) ).value<QColor>() ),
++TextureId,
aWidth, aHeight,
aTexture );
AISShape->Attributes()->SetPointAspect( aTextureAspect );
static int TextureId = 0;
Handle(Prs3d_PointAspect) aTextureAspect =
new Prs3d_PointAspect( HasColor() ?
// predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
(Quantity_NameOfColor)GetColor() :
// color from properties
SalomeApp_Tools::color( propMap.value( GEOM::propertyName( GEOM::PointColor ) ).value<QColor>() ),
++TextureId,
aWidth, aHeight,
aTexture );
AISShape->Attributes()->SetPointAspect( aTextureAspect );
}
}
}
@ -864,10 +864,10 @@ void GEOM_Displayer::updateActorProperties( GEOM_Actor* actor, bool create )
// set line width
actor->SetWidth( HasWidth() ?
// predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function
GetWidth() :
// libe width from properties
propMap.value( GEOM::propertyName( GEOM::LineWidth ) ).toInt() );
// predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function
GetWidth() :
// libe width from properties
propMap.value( GEOM::propertyName( GEOM::LineWidth ) ).toInt() );
// set display vectors flag
actor->SetVectorMode( propMap.value( GEOM::propertyName( GEOM::EdgesDirection ) ).toBool() );
@ -967,36 +967,36 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
if ( occPrs->IsNull() )
{
// new presentation is being created
// new presentation is being created
aTrh = new GEOM_AISTrihedron( aPlc );
occPrs->AddObject( aTrh );
}
else
{
// presentation is being updated
// presentation is being updated
AIS_ListOfInteractive aList;
occPrs->GetObjects( aList );
AIS_ListIteratorOfListOfInteractive anIter( aList );
for ( ; anIter.More() && aTrh.IsNull(); anIter.Next() ) {
aTrh = Handle(GEOM_AISTrihedron)::DownCast( anIter.Value() );
}
}
}
if ( !aTrh.IsNull() ) {
// predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
// predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
if ( HasColor() )
aTrh->SetColor( (Quantity_NameOfColor)GetColor() );
// predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function
// predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function
if ( HasWidth() )
aTrh->SetWidth( GetWidth() );
if ( !myIO.IsNull() )
{
aTrh->setIO( myIO );
aTrh->SetOwner( myIO );
}
aTrh->SetComponent( aPlc );
aTrh->SetToUpdate();
aTrh->SetComponent( aPlc );
aTrh->SetToUpdate();
}
occPrs->SetToActivate( ToActivate() );
}
@ -1012,7 +1012,7 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
{
// create presentation (specific for vectors)
Handle(GEOM_AISShape) AISShape = ( myType == GEOM_VECTOR ) ? new GEOM_AISVector( myShape, "" )
: new GEOM_AISShape ( myShape, "" );
: new GEOM_AISShape ( myShape, "" );
// update shape properties
updateShapeProperties( AISShape, true );
@ -1024,18 +1024,18 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
occPrs->SetToActivate( ToActivate() );
if ( AISShape->isTopLevel() && GEOM_AISShape::topLevelDisplayMode() == GEOM_AISShape::TopShowAdditionalWActor ) {
// 21671: EDF 1829 GEOM : Bring to front selected objects (continuation):
// 21671: EDF 1829 GEOM : Bring to front selected objects (continuation):
// create additional wireframe shape
Handle(GEOM_TopWireframeShape) aWirePrs = new GEOM_TopWireframeShape(myShape);
aWirePrs->SetWidth(AISShape->Width());
if ( !myIO.IsNull() ) {
aWirePrs->setIO( myIO );
aWirePrs->SetOwner( myIO );
}
// create additional wireframe shape
Handle(GEOM_TopWireframeShape) aWirePrs = new GEOM_TopWireframeShape(myShape);
aWirePrs->SetWidth(AISShape->Width());
if ( !myIO.IsNull() ) {
aWirePrs->setIO( myIO );
aWirePrs->SetOwner( myIO );
}
// add shape to the presentation
occPrs->AddObject( aWirePrs );
// add shape to the presentation
occPrs->AddObject( aWirePrs );
}
}
// if presentation is found -> set again shape for it
@ -1046,20 +1046,20 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
AIS_ListIteratorOfListOfInteractive Iter( IOList );
for ( ; Iter.More(); Iter.Next() )
{
Handle(GEOM_AISShape) AISShape = Handle(GEOM_AISShape)::DownCast( Iter.Value() );
if ( AISShape.IsNull() )
continue;
Handle(GEOM_AISShape) AISShape = Handle(GEOM_AISShape)::DownCast( Iter.Value() );
if ( AISShape.IsNull() )
continue;
// re-set shape (it might be changed)
if ( AISShape->Shape() != myShape )
AISShape->Set( myShape );
// re-set shape (it might be changed)
if ( AISShape->Shape() != myShape )
AISShape->Set( myShape );
// update shape properties
updateShapeProperties( AISShape, false );
// update shape properties
updateShapeProperties( AISShape, false );
// force updating
AISShape->UpdateSelection();
AISShape->SetToUpdate();
// force updating
AISShape->UpdateSelection();
AISShape->SetToUpdate();
}
}
}
@ -1095,42 +1095,42 @@ void GEOM_Displayer::Update( SALOME_VTKPrs* prs )
GEOM_VTKTrihedron* aTrh = 0;
if ( vtkPrs->IsNull() ) {
// new presentation is being created
aTrh = GEOM_VTKTrihedron::New();
vtkPrs->AddObject( aTrh );
// new presentation is being created
aTrh = GEOM_VTKTrihedron::New();
vtkPrs->AddObject( aTrh );
}
else {
// presentation is being updated
vtkActorCollection* actors = vtkPrs->GetObjects();
if ( actors ) {
actors->InitTraversal();
vtkActor* a = actors->GetNextActor();
while ( a && !aTrh ) {
aTrh = GEOM_VTKTrihedron::SafeDownCast( a );
a = actors->GetNextActor();
}
}
// presentation is being updated
vtkActorCollection* actors = vtkPrs->GetObjects();
if ( actors ) {
actors->InitTraversal();
vtkActor* a = actors->GetNextActor();
while ( a && !aTrh ) {
aTrh = GEOM_VTKTrihedron::SafeDownCast( a );
a = actors->GetNextActor();
}
}
}
if ( aTrh ) {
// predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
if ( HasColor() ) {
Quantity_Color aColor( (Quantity_NameOfColor)GetColor() );
aTrh->SetColor( aColor.Red(), aColor.Green(), aColor.Blue() );
}
// predefined color, manually set to displayer via GEOM_Displayer::SetColor() function
if ( HasColor() ) {
Quantity_Color aColor( (Quantity_NameOfColor)GetColor() );
aTrh->SetColor( aColor.Red(), aColor.Green(), aColor.Blue() );
}
#ifdef VTK_TRIHEDRON_WIDTH
//
// VSR: currently isn't supported
//
// predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function
//
// VSR: currently isn't supported
//
// predefined line width, manually set to displayer via GEOM_Displayer::SetLineWidth() function
if ( HasWidth() )
aTrh->SetWidth( GetWidth() );
#endif
if ( !myIO.IsNull() )
aTrh->setIO( myIO );
aTrh->setIO( myIO );
aTrh->SetPlacement( aPlc );
aTrh->SetPlacement( aPlc );
}
}
}
@ -1154,16 +1154,16 @@ void GEOM_Displayer::Update( SALOME_VTKPrs* prs )
// presentation is being updated
vtkActorCollection* actors = vtkPrs->GetObjects();
if ( actors ) {
actors->InitTraversal();
vtkActor* a = actors->GetNextActor();
while ( a ) {
GEOM_Actor* actor = GEOM_Actor::SafeDownCast( a );
if ( actor ) {
// update actor properties
updateActorProperties( actor, false );
a = actors->GetNextActor();
}
}
actors->InitTraversal();
vtkActor* a = actors->GetNextActor();
while ( a ) {
GEOM_Actor* actor = GEOM_Actor::SafeDownCast( a );
if ( actor ) {
// update actor properties
updateActorProperties( actor, false );
a = actors->GetNextActor();
}
}
}
}
}
@ -1824,8 +1824,8 @@ SALOMEDS::Color GEOM_Displayer::getUniqueColor( const QList<SALOMEDS::Color>& th
}
PropMap GEOM_Displayer::getObjectProperties( SalomeApp_Study* study,
const QString& entry,
SALOME_View* view )
const QString& entry,
SALOME_View* view )
{
// get default properties for the explicitly specified default view type
PropMap propMap = GEOM_Displayer::getDefaultPropertyMap();
@ -1840,62 +1840,62 @@ PropMap GEOM_Displayer::getObjectProperties( SalomeApp_Study* study,
PropMap storedMap = study->getObjectPropMap( viewId, entry );
// overwrite default properties from stored ones (that are specified)
for ( int prop = GEOM::Visibility; prop <= GEOM::LastProperty; prop++ ) {
if ( storedMap.contains( GEOM::propertyName( (GEOM::Property)prop ) ) )
propMap.insert( GEOM::propertyName( (GEOM::Property)prop ),
storedMap.value( GEOM::propertyName( (GEOM::Property)prop ) ) );
if ( storedMap.contains( GEOM::propertyName( (GEOM::Property)prop ) ) )
propMap.insert( GEOM::propertyName( (GEOM::Property)prop ),
storedMap.value( GEOM::propertyName( (GEOM::Property)prop ) ) );
}
// ... specific processing for color
// ... current implementation is to use same stored color for all aspects
// ... (TODO) possible future improvements about free boundaries, standalone edges etc colors can be here
if ( storedMap.contains( GEOM::propertyName( GEOM::Color ) ) ) {
propMap.insert( GEOM::propertyName( GEOM::ShadingColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
propMap.insert( GEOM::propertyName( GEOM::WireframeColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
propMap.insert( GEOM::propertyName( GEOM::LineColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
propMap.insert( GEOM::propertyName( GEOM::FreeBndColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
propMap.insert( GEOM::propertyName( GEOM::PointColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
propMap.insert( GEOM::propertyName( GEOM::ShadingColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
propMap.insert( GEOM::propertyName( GEOM::WireframeColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
propMap.insert( GEOM::propertyName( GEOM::LineColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
propMap.insert( GEOM::propertyName( GEOM::FreeBndColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
propMap.insert( GEOM::propertyName( GEOM::PointColor ), storedMap.value( GEOM::propertyName( GEOM::Color ) ) );
}
if ( !entry.isEmpty() ) {
// get CORBA reference to geom object
_PTR(SObject) SO( study->studyDS()->FindObjectID( entry.toStdString() ) );
if ( SO ) {
CORBA::Object_var object = GeometryGUI::ClientSObjectToObject( SO );
if ( !CORBA::is_nil( object ) ) {
GEOM::GEOM_Object_var geomObject = GEOM::GEOM_Object::_narrow( object );
// check that geom object has color properly set
bool hasColor = false;
SALOMEDS::Color aSColor = getColor( geomObject, hasColor );
// set color from geometry object (only once, if it is not yet set in GUI)
// current implementation is to use same color for all aspects
// (TODO) possible future improvements about free boundaries, standalone edges etc colors can be here
if ( hasColor && !storedMap.contains( GEOM::propertyName( GEOM::Color ) ) ) {
QColor objColor = QColor::fromRgbF( aSColor.R, aSColor.G, aSColor.B );
propMap.insert( GEOM::propertyName( GEOM::ShadingColor ), objColor );
propMap.insert( GEOM::propertyName( GEOM::WireframeColor ), objColor );
propMap.insert( GEOM::propertyName( GEOM::LineColor ), objColor );
propMap.insert( GEOM::propertyName( GEOM::FreeBndColor ), objColor );
propMap.insert( GEOM::propertyName( GEOM::PointColor ), objColor );
}
// check that object has point marker properly set
GEOM::marker_type mType = geomObject->GetMarkerType();
GEOM::marker_size mSize = geomObject->GetMarkerSize();
int mTextureId = geomObject->GetMarkerTexture();
bool hasMarker = ( mType > GEOM::MT_NONE && mType < GEOM::MT_USER && mSize > GEOM::MS_NONE && mSize <= GEOM::MS_70 ) ||
( mType == GEOM::MT_USER && mTextureId > 0 );
// set point marker from geometry object (only once, if it is not yet set in GUI)
if ( hasMarker && !storedMap.contains( GEOM::propertyName( GEOM::PointMarker ) ) ) {
if ( mType > GEOM::MT_NONE && mType < GEOM::MT_USER ) {
// standard type
propMap.insert( GEOM::propertyName( GEOM::PointMarker ),
QString( "%1%2%3" ).arg( (int)mType ).arg( GEOM::subSectionSeparator() ).arg( (int)mSize ) );
}
else if ( mType == GEOM::MT_USER ) {
// custom texture
propMap.insert( GEOM::propertyName( GEOM::PointMarker ), QString::number( mTextureId ) );
}
}
}
}
// get CORBA reference to geom object
_PTR(SObject) SO( study->studyDS()->FindObjectID( entry.toStdString() ) );
if ( SO ) {
CORBA::Object_var object = GeometryGUI::ClientSObjectToObject( SO );
if ( !CORBA::is_nil( object ) ) {
GEOM::GEOM_Object_var geomObject = GEOM::GEOM_Object::_narrow( object );
// check that geom object has color properly set
bool hasColor = false;
SALOMEDS::Color aSColor = getColor( geomObject, hasColor );
// set color from geometry object (only once, if it is not yet set in GUI)
// current implementation is to use same color for all aspects
// (TODO) possible future improvements about free boundaries, standalone edges etc colors can be here
if ( hasColor && !storedMap.contains( GEOM::propertyName( GEOM::Color ) ) ) {
QColor objColor = QColor::fromRgbF( aSColor.R, aSColor.G, aSColor.B );
propMap.insert( GEOM::propertyName( GEOM::ShadingColor ), objColor );
propMap.insert( GEOM::propertyName( GEOM::WireframeColor ), objColor );
propMap.insert( GEOM::propertyName( GEOM::LineColor ), objColor );
propMap.insert( GEOM::propertyName( GEOM::FreeBndColor ), objColor );
propMap.insert( GEOM::propertyName( GEOM::PointColor ), objColor );
}
// check that object has point marker properly set
GEOM::marker_type mType = geomObject->GetMarkerType();
GEOM::marker_size mSize = geomObject->GetMarkerSize();
int mTextureId = geomObject->GetMarkerTexture();
bool hasMarker = ( mType > GEOM::MT_NONE && mType < GEOM::MT_USER && mSize > GEOM::MS_NONE && mSize <= GEOM::MS_70 ) ||
( mType == GEOM::MT_USER && mTextureId > 0 );
// set point marker from geometry object (only once, if it is not yet set in GUI)
if ( hasMarker && !storedMap.contains( GEOM::propertyName( GEOM::PointMarker ) ) ) {
if ( mType > GEOM::MT_NONE && mType < GEOM::MT_USER ) {
// standard type
propMap.insert( GEOM::propertyName( GEOM::PointMarker ),
QString( "%1%2%3" ).arg( (int)mType ).arg( GEOM::subSectionSeparator() ).arg( (int)mSize ) );
}
else if ( mType == GEOM::MT_USER ) {
// custom texture
propMap.insert( GEOM::propertyName( GEOM::PointMarker ), QString::number( mTextureId ) );
}
}
}
}
}
}
}
@ -1916,52 +1916,52 @@ PropMap GEOM_Displayer::getDefaultPropertyMap()
// - nb isos (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::NbIsos ),
QString( "%1%2%3" ).
arg( resMgr->integerValue( "Geometry", "iso_number_u", 1 ) ).
arg( GEOM::subSectionSeparator() ).
arg( resMgr->integerValue( "Geometry", "iso_number_v", 1 ) ) );
QString( "%1%2%3" ).
arg( resMgr->integerValue( "Geometry", "iso_number_u", 1 ) ).
arg( GEOM::subSectionSeparator() ).
arg( resMgr->integerValue( "Geometry", "iso_number_v", 1 ) ) );
// - transparency (opacity = 1-transparency)
propMap.insert( GEOM::propertyName( GEOM::Transparency ), 0.0 );
// - display mode (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::DisplayMode ),
resMgr->integerValue( "Geometry", "display_mode", 0 ) );
resMgr->integerValue( "Geometry", "display_mode", 0 ) );
// - show edges direction flag (false by default)
propMap.insert( GEOM::propertyName( GEOM::EdgesDirection ), false );
// - shading color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::ShadingColor ),
colorFromResources( "shading_color", QColor( 255, 255, 0 ) ) );
colorFromResources( "shading_color", QColor( 255, 255, 0 ) ) );
// - wireframe color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::WireframeColor ),
colorFromResources( "wireframe_color", QColor( 255, 255, 0 ) ) );
colorFromResources( "wireframe_color", QColor( 255, 255, 0 ) ) );
// - standalone edges color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::LineColor ),
colorFromResources( "line_color", QColor( 255, 0, 0 ) ) );
colorFromResources( "line_color", QColor( 255, 0, 0 ) ) );
// - free boundaries color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::FreeBndColor ),
colorFromResources( "free_bound_color", QColor( 0, 255, 0 ) ) );
colorFromResources( "free_bound_color", QColor( 0, 255, 0 ) ) );
// - points color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::PointColor ),
colorFromResources( "point_color", QColor( 255, 255, 0 ) ) );
colorFromResources( "point_color", QColor( 255, 255, 0 ) ) );
// - isos color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::IsosColor ),
colorFromResources( "isos_color", QColor( 200, 200, 200 ) ) );
colorFromResources( "isos_color", QColor( 200, 200, 200 ) ) );
// - outlines color (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::OutlineColor ),
colorFromResources( "edges_in_shading_color", QColor( 180, 180, 180 ) ) );
colorFromResources( "edges_in_shading_color", QColor( 180, 180, 180 ) ) );
// - deflection coefficient (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::Deflection ),
resMgr->doubleValue( "Geometry", "deflection_coeff", 0.001 ) );
resMgr->doubleValue( "Geometry", "deflection_coeff", 0.001 ) );
// - material (take default value from preferences)
Material_Model material;
@ -1970,18 +1970,18 @@ PropMap GEOM_Displayer::getDefaultPropertyMap()
// - edge width (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::LineWidth ),
resMgr->integerValue( "Geometry", "edge_width", 1 ) );
resMgr->integerValue( "Geometry", "edge_width", 1 ) );
// - isos width (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::IsosWidth ),
resMgr->integerValue( "Geometry", "isolines_width", 1 ) );
resMgr->integerValue( "Geometry", "isolines_width", 1 ) );
// - point marker (take default value from preferences)
propMap.insert( GEOM::propertyName( GEOM::PointMarker ),
QString( "%1%2%3" ).
arg( resMgr->integerValue( "Geometry", "type_of_marker", 1 ) + 1 ).
arg( GEOM::subSectionSeparator() ).
arg( resMgr->integerValue( "Geometry", "marker_scale", 1 ) ) );
QString( "%1%2%3" ).
arg( resMgr->integerValue( "Geometry", "type_of_marker", 1 ) + 1 ).
arg( GEOM::subSectionSeparator() ).
arg( resMgr->integerValue( "Geometry", "marker_scale", 1 ) ) );
// - top-level flag (false by default)
propMap.insert( GEOM::propertyName( GEOM::TopLevel ), false );
@ -2005,39 +2005,39 @@ SALOMEDS::Color GEOM_Displayer::getColor(GEOM::GEOM_Object_var theGeomObject, bo
hasColor = aSColor.R >= 0 && aSColor.G >= 0 && aSColor.B >= 0;
if ( !hasColor ) {
#ifdef GENERAL_AUTOCOLOR // auto-color for all sub-shapes
bool general_autocolor = true;
bool general_autocolor = true;
#else // auto-color for groups only
bool general_autocolor = false;
bool general_autocolor = false;
#endif // GENERAL_AUTOCOLOR
if ( general_autocolor || theGeomObject->GetType() == GEOM_GROUP ) {
GEOM::GEOM_Object_var aMainObject = theGeomObject->GetMainShape();
if ( !CORBA::is_nil( aMainObject ) && aMainObject->GetAutoColor() ) {
if ( general_autocolor || theGeomObject->GetType() == GEOM_GROUP ) {
GEOM::GEOM_Object_var aMainObject = theGeomObject->GetMainShape();
if ( !CORBA::is_nil( aMainObject ) && aMainObject->GetAutoColor() ) {
#ifdef SIMPLE_AUTOCOLOR // simplified algorithm for auto-colors
aSColor = getPredefinedUniqueColor();
hasColor = true;
aSColor = getPredefinedUniqueColor();
hasColor = true;
#else // old algorithm for auto-colors
QList<SALOMEDS::Color> aReservedColors;
CORBA::String_var IOR = app->orb()->object_to_string( aMainObject );
_PTR(SObject) aMainSObject( aStudy->FindObjectIOR( IOR.in() ) );
if ( aMainSObject ) {
_PTR(ChildIterator) it( aStudy->NewChildIterator( aMainSObject ) );
for ( ; it->More(); it->Next() ) {
_PTR(SObject) aChildSObject( it->Value() );
GEOM::GEOM_Object_var aChildObject =
GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aChildSObject));
if ( CORBA::is_nil( aChildObject ) )
continue;
QList<SALOMEDS::Color> aReservedColors;
CORBA::String_var IOR = app->orb()->object_to_string( aMainObject );
_PTR(SObject) aMainSObject( aStudy->FindObjectIOR( IOR.in() ) );
if ( aMainSObject ) {
_PTR(ChildIterator) it( aStudy->NewChildIterator( aMainSObject ) );
for ( ; it->More(); it->Next() ) {
_PTR(SObject) aChildSObject( it->Value() );
GEOM::GEOM_Object_var aChildObject =
GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aChildSObject));
if ( CORBA::is_nil( aChildObject ) )
continue;
SALOMEDS::Color aReservedColor = aChildObject->GetColor();
if ( aReservedColor.R >= 0 && aReservedColor.G >= 0 && aReservedColor.B >= 0 )
aReservedColors.append( aReservedColor );
}
}
aSColor = getUniqueColor( aReservedColors );
hasColor = true;
SALOMEDS::Color aReservedColor = aChildObject->GetColor();
if ( aReservedColor.R >= 0 && aReservedColor.G >= 0 && aReservedColor.B >= 0 )
aReservedColors.append( aReservedColor );
}
}
aSColor = getUniqueColor( aReservedColors );
hasColor = true;
#endif // SIMPLE_AUTOCOLOR
}
}
}
}
}
}
}

View File

@ -101,7 +101,7 @@ public:
const bool updateViewer = true );
void EraseWithChildren(const Handle(SALOME_InteractiveObject)& theIO,
const bool eraseOnlyChildren = false);
const bool eraseOnlyChildren = false);
/* Display/Erase list of objects methods */

View File

@ -544,11 +544,11 @@ void GEOMToolsGUI::OnEditDelete()
else {
// GEOM component is not selected: check if selected objects are in use
if ( inUse( aStudy, geomComp, allDeleted ) &&
SUIT_MessageBox::question( app->desktop(),
QObject::tr("WRN_WARNING"),
QObject::tr("DEP_OBJECT"),
SUIT_MessageBox::Yes | SUIT_MessageBox::No,
SUIT_MessageBox::No ) != SUIT_MessageBox::Yes ) {
SUIT_MessageBox::question( app->desktop(),
QObject::tr("WRN_WARNING"),
QObject::tr("DEP_OBJECT"),
SUIT_MessageBox::Yes | SUIT_MessageBox::No,
SUIT_MessageBox::No ) != SUIT_MessageBox::Yes ) {
return; // object(s) in use
}
// ... and then delete all objects

View File

@ -543,8 +543,8 @@ void GEOMToolsGUI::OnMaterialProperties()
void GEOMToolsGUI::OnMaterialsLibrary()
{
GEOMToolsGUI_MaterialPropertiesDlg dlg( SUIT_Session::session()->activeApplication()->desktop(), false, true, QtxDialog::Standard );
dlg.setWindowTitle( tr( "MATERIAL_LIBRARY_TLT" ) );
GEOMToolsGUI_MaterialPropertiesDlg dlg( SUIT_Session::session()->activeApplication()->desktop(), false, true, QtxDialog::Standard );
dlg.setWindowTitle( tr( "MATERIAL_LIBRARY_TLT" ) );
dlg.exec();
}

View File

@ -101,7 +101,7 @@ GEOMToolsGUI_MaterialPropertiesDlg::GEOMToolsGUI_MaterialPropertiesDlg( QWidget*
myShowSelWidget = showSelWidget;
// Set title
setWindowTitle( tr( "MATERIAL_PROPERTIES_TLT" ) );
// main layout
QVBoxLayout* main = new QVBoxLayout( mainFrame() );
main->setMargin( 0 );
@ -329,7 +329,7 @@ GEOMToolsGUI_MaterialPropertiesDlg::GEOMToolsGUI_MaterialPropertiesDlg( QWidget*
if ( window ) {
int mgrId = window->getViewManager()->getGlobalId();
PropMap propMap = study->getObjectPropMap( mgrId, io->getEntry() );
QString matProp = propMap.value(GEOM::propertyName( GEOM::Material )).toString();
QString matProp = propMap.value(GEOM::propertyName( GEOM::Material )).toString();
if ( !matProp.isEmpty() )
myCurrentModel.fromProperties( matProp );
QColor c = propMap.value(GEOM::propertyName( GEOM::Color )).value<QColor>();
@ -625,10 +625,10 @@ void GEOMToolsGUI_MaterialPropertiesDlg::onChanged()
// it is no allowed to change global material
// user is asked about creating of a new user material model based on the currently selected one
if ( SUIT_MessageBox::question( this,
tr( "GEOM_WRN_WARNING" ),
tr( "QUE_CREATE_NEW_MATERIAL" ),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::Yes ) == QMessageBox::Yes ) {
tr( "GEOM_WRN_WARNING" ),
tr( "QUE_CREATE_NEW_MATERIAL" ),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::Yes ) == QMessageBox::Yes ) {
// user has chosen creation of new user model
onAddMaterial();
}
@ -708,10 +708,10 @@ void GEOMToolsGUI_MaterialPropertiesDlg::onDeleteMaterial()
QListWidgetItem* item = myMaterials->currentItem();
if ( item && item->data( TypeRole ).toInt() == User ) {
if ( SUIT_MessageBox::question( this,
tr( "GEOM_WRN_WARNING" ),
tr( "QUE_REMOVE_MATERIAL" ).arg( item->text() ),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::Yes ) == QMessageBox::Yes ) {
tr( "GEOM_WRN_WARNING" ),
tr( "QUE_REMOVE_MATERIAL" ).arg( item->text() ),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::Yes ) == QMessageBox::Yes ) {
myResourceMgr.remove( item->data( NameRole ).toString() );
delete item;
}
@ -758,7 +758,7 @@ void GEOMToolsGUI_MaterialPropertiesDlg::SetEditCurrentArgument()
// enable line edit
myLineEditCurArg->setEnabled(true);
myLineEditCurArg->setFocus();
SelectionIntoArgument();
SelectionIntoArgument();
// after setFocus(), because it will be setDown(false) when loses focus
send->setDown(true);
}
@ -778,7 +778,7 @@ void GEOMToolsGUI_MaterialPropertiesDlg::SelectionIntoArgument()
if ( study ) {
SALOME_ListIO aSelList;
aSelMgr->selectedObjects(aSelList);
int nbSel = GEOMBase::GetNameOfSelectedIObjects(aSelList, aString, true);
}
int nbSel = GEOMBase::GetNameOfSelectedIObjects(aSelList, aString, true);
}
myLineEditCurArg->setText( aString );
}

View File

@ -57,8 +57,8 @@ private:
void toModel( Material_Model& ) const;
void fromModel( const Material_Model& );
QString findUniqueName( const QString&,
QListWidgetItem* = 0,
bool = false );
QListWidgetItem* = 0,
bool = false );
signals:
void changed();

View File

@ -193,26 +193,26 @@ QTreeWidgetItem* GEOMToolsGUI_PublishDlg::findParentItem(_PTR(Study) theStudy, S
QString targetEntry = aParrent->entry();
if( !(aResult = myEntryToItem.value(targetEntry)) ) {
if( aParrent != myGeomRoot ) {
QString aName;
_PTR(SObject) aSO ( theStudy->FindObjectID(qPrintable(aParrent->entry())));
_PTR(GenericAttribute) anAttr;
if ( aSO->FindAttribute(anAttr, "AttributeName") ) {
_PTR(AttributeName) anAttrName (anAttr);
aName = anAttrName->Value().c_str();
}
theList.push_front(qMakePair(targetEntry, aName));
aResult = findParentItem(theStudy,aParrent,theList);
QString aName;
_PTR(SObject) aSO ( theStudy->FindObjectID(qPrintable(aParrent->entry())));
_PTR(GenericAttribute) anAttr;
if ( aSO->FindAttribute(anAttr, "AttributeName") ) {
_PTR(AttributeName) anAttrName (anAttr);
aName = anAttrName->Value().c_str();
}
theList.push_front(qMakePair(targetEntry, aName));
aResult = findParentItem(theStudy,aParrent,theList);
} else {
//Publish List
for(int i = 0; i < theList.size(); i++ ) {
aResult = createItem(aResult, theList[i], false);
}
theList.clear();
//Publish List
for(int i = 0; i < theList.size(); i++ ) {
aResult = createItem(aResult, theList[i], false);
}
theList.clear();
}
} else {
//Publish List
for(int i = 0; i < theList.size(); i++ ) {
aResult = createItem(aResult, theList[i], false);
aResult = createItem(aResult, theList[i], false);
}
theList.clear();
}
@ -242,8 +242,8 @@ void GEOMToolsGUI_PublishDlg::buildTree(_PTR(Study) theStudy, SalomeApp_DataObje
if(!isDrawable) {
QString aName;
if ( SO->FindAttribute(anAttr, "AttributeName") ) {
_PTR(AttributeName) aAttrName (anAttr);
aName = aAttrName->Value().c_str();
_PTR(AttributeName) aAttrName (anAttr);
aName = aAttrName->Value().c_str();
}
BufferedList aList;
QTreeWidgetItem* parentItem = findParentItem(theStudy, theItem, aList);
@ -291,12 +291,12 @@ void GEOMToolsGUI_PublishDlg::clickOnApply() {
aDrw->SetDrawable( true );
//Remove or change item
if( item != myTreeWidget->invisibleRootItem() ){
if( item->data(0,Qt::UserRole).toBool() ) {
delete item;
} else {
item->setFlags(item->flags() & ~Qt::ItemIsUserCheckable);
item->setData(0,Qt::CheckStateRole,QVariant());
}
if( item->data(0,Qt::UserRole).toBool() ) {
delete item;
} else {
item->setFlags(item->flags() & ~Qt::ItemIsUserCheckable);
item->setData(0,Qt::CheckStateRole,QVariant());
}
}
}
}

View File

@ -317,7 +317,7 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency()
if ( !aisShape.IsNull() ) {
ic->SetTransparency( aisShape, newValue, false );
ic->Redisplay( aisShape, Standard_False, Standard_True );
aStudy->setObjectProperty( aMgrId , It.Value()->getEntry(), GEOM::propertyName( GEOM::Transparency ) , newValue );
aStudy->setObjectProperty( aMgrId , It.Value()->getEntry(), GEOM::propertyName( GEOM::Transparency ) , newValue );
}
} // for...
ic->UpdateCurrentViewer();

View File

@ -100,7 +100,7 @@ void GEOM_Swig::init()
// update Object browser
if ( dynamic_cast<SalomeApp_Application*>( app ) )
dynamic_cast<SalomeApp_Application*>( app )->updateObjectBrowser( true );
dynamic_cast<SalomeApp_Application*>( app )->updateObjectBrowser( true );
}
};
@ -157,11 +157,11 @@ void GEOM_Swig::createAndDisplayFitAllGO( const char* theEntry )
{
SUIT_Application* app = SUIT_Session::session()->activeApplication();
if ( app ) {
SUIT_ViewWindow* window = app->desktop()->activeWindow();
if ( dynamic_cast<SVTK_ViewWindow*>( window ) )
dynamic_cast<SVTK_ViewWindow*>( window )->onFitAll();
SUIT_ViewWindow* window = app->desktop()->activeWindow();
if ( dynamic_cast<SVTK_ViewWindow*>( window ) )
dynamic_cast<SVTK_ViewWindow*>( window )->onFitAll();
else if ( dynamic_cast<OCCViewer_ViewFrame*>( window ) )
dynamic_cast<OCCViewer_ViewFrame*>( window )->onViewFitAll();
dynamic_cast<OCCViewer_ViewFrame*>( window )->onViewFitAll();
}
}
};
@ -308,9 +308,9 @@ const char* GEOM_Swig::getShapeTypeIcon( const char* theIOR )
if ( !CORBA::is_nil( anObject ) ) {
GEOM::GEOM_Object_var aShape = GEOM::GEOM_Object::_narrow( anObject.in() );
if ( !CORBA::is_nil( aShape ) ) {
GEOM::shape_type aType = aShape->GetShapeType();
if ( aType >= GEOM::COMPOUND && aType < GEOM::SHAPE )
anIcon = icons[ (int)aType ];
GEOM::shape_type aType = aShape->GetShapeType();
if ( aType >= GEOM::COMPOUND && aType < GEOM::SHAPE )
anIcon = icons[ (int)aType ];
}
}
}
@ -329,16 +329,16 @@ class TSetPropertyEvent: public SALOME_Event
public:
TSetPropertyEvent( const QString& _entry,
const QString& _property,
const QVariant& _value,
bool _update = true );
const QString& _property,
const QVariant& _value,
bool _update = true );
virtual void Execute();
};
TSetPropertyEvent::TSetPropertyEvent( const QString& _entry,
const QString& _property,
const QVariant& _value,
bool _update ):
const QString& _property,
const QVariant& _value,
bool _update ):
myEntry( _entry ),
myProperty( _property ),
myValue( _value ),
@ -376,7 +376,7 @@ void TSetPropertyEvent::Execute()
void GEOM_Swig::setDisplayMode( const char* theEntry, int theMode, bool theUpdateViewer )
{
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::DisplayMode ),
theMode, theUpdateViewer ) );
theMode, theUpdateViewer ) );
}
/*!
@ -388,7 +388,7 @@ void GEOM_Swig::setDisplayMode( const char* theEntry, int theMode, bool theUpdat
void GEOM_Swig::setVectorsMode( const char* theEntry, bool theOn, bool theUpdateViewer )
{
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::EdgesDirection ),
theOn, theUpdateViewer ) );
theOn, theUpdateViewer ) );
}
/*!
@ -402,7 +402,7 @@ void GEOM_Swig::setVectorsMode( const char* theEntry, bool theOn, bool theUpdate
void GEOM_Swig::setColor( const char* theEntry, int theRed, int theGreen, int theBlue, bool theUpdateViewer )
{
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Color ),
QColor( theRed, theGreen, theBlue ), theUpdateViewer ) );
QColor( theRed, theGreen, theBlue ), theUpdateViewer ) );
}
/*!
@ -415,8 +415,8 @@ void GEOM_Swig::setColor( const char* theEntry, int theRed, int theGreen, int th
void GEOM_Swig::setIsos( const char* theEntry, int theNbU, int theNbV, bool theUpdateViewer )
{
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::NbIsos ),
QString( "%1%2%3" ).arg( theNbU ).arg( GEOM::subSectionSeparator() ).arg( theNbV ),
theUpdateViewer ) );
QString( "%1%2%3" ).arg( theNbU ).arg( GEOM::subSectionSeparator() ).arg( theNbV ),
theUpdateViewer ) );
}
/*!
@ -428,7 +428,7 @@ void GEOM_Swig::setIsos( const char* theEntry, int theNbU, int theNbV, bool theU
void GEOM_Swig::setTransparency( const char* theEntry, float theTransparency, bool theUpdateViewer )
{
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Transparency ),
theTransparency, theUpdateViewer ) );
theTransparency, theUpdateViewer ) );
}
/*!
@ -440,7 +440,7 @@ void GEOM_Swig::setTransparency( const char* theEntry, float theTransparency, bo
void GEOM_Swig::setDeflection( const char* theEntry, float theDeflection, bool theUpdateViewer )
{
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Deflection ),
theDeflection, theUpdateViewer ) );
theDeflection, theUpdateViewer ) );
}
/*!
@ -454,7 +454,7 @@ void GEOM_Swig::setMaterial( const char* theEntry, const char* theMaterial, bool
Material_Model material;
material.fromResources( theMaterial );
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Material ),
material.toProperties(), theUpdateViewer ) );
material.toProperties(), theUpdateViewer ) );
}
/*!
@ -466,7 +466,7 @@ void GEOM_Swig::setMaterial( const char* theEntry, const char* theMaterial, bool
void GEOM_Swig::setMaterialProperty( const char* theEntry, const char* theMaterial, bool theUpdateViewer )
{
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Material ),
theMaterial, theUpdateViewer ) );
theMaterial, theUpdateViewer ) );
}
class TInitGeomGenEvent: public SALOME_Event

View File

@ -245,7 +245,7 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
GEOM::shape_type maxallowed = getConstructorId() == 1 ? GEOM::FACE : GEOM::SHELL;
GEOM::shape_type minallowed = getConstructorId() == 1 ? GEOM::EDGE : GEOM::VERTEX;
if ( stype < maxallowed || stype > minallowed )
continue;
continue;
myBaseObjects << objects[i];
}
if ( !myBaseObjects.isEmpty() ) {
@ -261,9 +261,9 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
QString aName = GEOMBase::GetName( myPath.get() );
myEditCurrentArgument->setText( aName );
if ( getConstructorId() == 1 && !myVec )
GroupPoints->PushButton3->click();
GroupPoints->PushButton3->click();
else if ( myBaseObjects.isEmpty() )
GroupPoints->PushButton1->click();
GroupPoints->PushButton1->click();
}
}
else if (myEditCurrentArgument == GroupPoints->LineEdit3) {
@ -272,9 +272,9 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
QString aName = GEOMBase::GetName( myVec.get() );
myEditCurrentArgument->setText( aName );
if ( myBaseObjects.isEmpty() )
GroupPoints->PushButton1->click();
GroupPoints->PushButton1->click();
else if ( !myPath )
GroupPoints->PushButton2->click();
GroupPoints->PushButton2->click();
}
}

View File

@ -203,9 +203,9 @@ void GenerationGUI_PipePathDlg::SelectionIntoArgument()
QString aName = GEOMBase::GetName(myShape.get());
myEditCurrentArgument->setText(aName);
if (myBase1Objects.isEmpty())
GroupPoints->PushButton2->click();
GroupPoints->PushButton2->click();
else if (myBase2Objects.isEmpty())
GroupPoints->PushButton3->click();
GroupPoints->PushButton3->click();
}
}
else if (myEditCurrentArgument == GroupPoints->LineEdit2) {

View File

@ -195,7 +195,7 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument()
for ( int i = 0; i < objects.count(); i++ ) {
GEOM::shape_type stype = objects[i]->GetMaxShapeType();
if ( stype < GEOM::SHELL || stype > GEOM::VERTEX )
continue;
continue;
myBaseObjects << objects[i];
}
if ( !myBaseObjects.isEmpty() ) {
@ -209,7 +209,7 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument()
QString aName = GEOMBase::GetName( myAxis.get() );
myEditCurrentArgument->setText( aName );
if ( myBaseObjects.isEmpty() )
GroupPoints->PushButton1->click();
GroupPoints->PushButton1->click();
}
}
processPreview();

View File

@ -425,10 +425,12 @@ double Material_Model::reflection( ReflectionType type, bool theIsFront ) const
{
double value = 0.0;
if ( type >= 0 && type < 4 )
{
if ( theIsFront )
value = myReflection[ type ].front_coef;
else
value = myReflection[ type ].back_coef;
}
return value;
}
@ -442,10 +444,12 @@ double Material_Model::reflection( ReflectionType type, bool theIsFront ) const
void Material_Model::setReflection( ReflectionType type, double value, bool theIsFront )
{
if ( type >= 0 && type < 4 )
{
if ( theIsFront )
myReflection[ type ].front_coef = value;
else
myReflection[ type ].back_coef = value;
}
}
/*!

View File

@ -178,7 +178,7 @@ void Material_ResourceMgr::watchUserFile( bool on )
myWatcher = new QFileSystemWatcher( this );
QFileInfo ufile = userFileName( appName() );
if ( ufile.exists() ) {
myWatcher->addPath( ufile.filePath() );
myWatcher->addPath( ufile.filePath() );
}
connect( myWatcher, SIGNAL( fileChanged( QString ) ), this, SLOT( update() ) );
}

View File

@ -381,11 +381,11 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
anIO->SetArrowSize(arrowSize);
}
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
int w = resMgr->integerValue("Geometry", "measures_line_width", 1);
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
int w = resMgr->integerValue("Geometry", "measures_line_width", 1);
Handle(Prs3d_AngleAspect) asp = new Prs3d_AngleAspect();
asp->LineAspect()->SetWidth(w);
anIO->Attributes()->SetAngleAspect(asp);
anIO->Attributes()->SetAngleAspect(asp);
SOCC_Prs* aPrs =
dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));

View File

@ -371,7 +371,7 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::onErrorsListSelectionChanged()
TopoDS_Shape aSubShape = anIndices.FindKey( aObjLst[i] );
QString aType = GEOMBase::GetShapeTypeString( aSubShape );
if ( !aType.isEmpty() )
aSubShapeList.append( QString( "%1_%2" ).arg( aType ).arg( aObjLst[i] ) );
aSubShapeList.append( QString( "%1_%2" ).arg( aType ).arg( aObjLst[i] ) );
}
}
myGrp->ListBox2->clear();

View File

@ -595,8 +595,8 @@ QString MeasureGUI_WhatisDlg::getKindOfShape( QString& theParameters )
{
QString strid = QString( "GEOM_ADVANCED_%1" ).arg( myObj->GetType() );
aKindStr = tr( strid.toLatin1().constData() ) == strid ?
tr( "GEOM_ADVANCED" ).arg( myObj->GetType() ) :
tr( strid.toLatin1().constData() );
tr( "GEOM_ADVANCED" ).arg( myObj->GetType() ) :
tr( strid.toLatin1().constData() );
break;
}
default:

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTDS_BndSphere.cxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
// File: NMTDS_BndSphere.cxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
//
#include <NMTDS_BndSphere.hxx>

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTDS_BndSphere.hxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
// File: NMTDS_BndSphere.hxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
#ifndef _NMTDS_BndSphere_HeaderFile
#define _NMTDS_BndSphere_HeaderFile

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTDS_BndSphere.lxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
// File: NMTDS_BndSphere.lxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
//=======================================================================
//function : SetCenter
//purpose :

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTDS_BndSphereTree.cxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
// File: NMTDS_BndSphereTree.cxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
//
#include <NMTDS_BndSphereTree.hxx>
//=======================================================================

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTDS_BndSphereTree.hxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
// File: NMTDS_BndSphereTree.hxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
//
#ifndef NMTDS_BndSphereTree_HeaderFile
#define NMTDS_BndSphereTree_HeaderFile

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTDS_CArray1OfIndexRange.hxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
// File: NMTDS_CArray1OfIndexRange.hxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
#include <NMTDS_CArray1OfIndexRange.hxx>

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTDS_BndSphere.hxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
// File: NMTDS_BndSphere.hxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
#ifndef _NMTDS_CArray1OfIndexRange_HeaderFile
#define _NMTDS_CArray1OfIndexRange_HeaderFile
@ -46,7 +46,7 @@ class NMTDS_CArray1OfIndexRange {
Standard_EXPORT
NMTDS_CArray1OfIndexRange(const Standard_Integer Length = 0,
const Standard_Integer BlockLength = 5);
const Standard_Integer BlockLength = 5);
Standard_EXPORT
void Resize(const Standard_Integer theNewLength) ;

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx
// Created: Mon Feb 20 09:31:43 2012
// Author:
// <pkv@BDEURI37616>
// File: NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx
// Created: Mon Feb 20 09:31:43 2012
// Author:
// <pkv@BDEURI37616>
#ifndef NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTDS_DataMapOfIntegerMapOfInteger.hxx
// Created: Mon Feb 20 09:27:40 2012
// Author:
// <pkv@BDEURI37616>
// File: NMTDS_DataMapOfIntegerMapOfInteger.hxx
// Created: Mon Feb 20 09:27:40 2012
// Author:
// <pkv@BDEURI37616>
#ifndef NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile

View File

@ -16,10 +16,10 @@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTDS_IndexedDataMapOfIntegerShape.hxx
// Created: Mon Feb 20 09:20:07 2012
// Author:
// <pkv@BDEURI37616>
// File: NMTDS_IndexedDataMapOfIntegerShape.hxx
// Created: Mon Feb 20 09:20:07 2012
// Author:
// <pkv@BDEURI37616>
#ifndef NMTDS_IndexedDataMapOfIntegerShape_HeaderFile

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTDS_IndexedDataMapOfShapeBndSphere.hxx
// Created: Mon Feb 20 09:17:01 2012
// Author:
// <pkv@BDEURI37616>
// File: NMTDS_IndexedDataMapOfShapeBndSphere.hxx
// Created: Mon Feb 20 09:17:01 2012
// Author:
// <pkv@BDEURI37616>
#ifndef NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTDS_IndexedDataMapOfShapeBox.hxx
// Created: Mon Feb 20 09:17:01 2012
// Author:
// <pkv@BDEURI37616>
// File: NMTDS_IndexedDataMapOfShapeBox.hxx
// Created: Mon Feb 20 09:17:01 2012
// Author:
// <pkv@BDEURI37616>
#ifndef NMTDS_IndexedDataMapOfShapeBox_HeaderFile

View File

@ -52,7 +52,7 @@ NMTDS_InterfPool::NMTDS_InterfPool()
//purpose :
//=======================================================================
Standard_Boolean NMTDS_InterfPool::Add (const NMTDS_PairBoolean& aPKB,
const NMTDS_InterfType aType)
const NMTDS_InterfType aType)
{
Standard_Boolean bRet;
Standard_Integer iType;
@ -70,8 +70,8 @@ Standard_Boolean NMTDS_InterfPool::Add (const NMTDS_PairBoolean& aPKB,
//purpose :
//=======================================================================
Standard_Boolean NMTDS_InterfPool::Add (const Standard_Integer aInd1,
const Standard_Integer aInd2,
const NMTDS_InterfType aType)
const Standard_Integer aInd2,
const NMTDS_InterfType aType)
{
NMTDS_PairBoolean aPKB;
//
@ -83,9 +83,9 @@ Standard_Boolean NMTDS_InterfPool::Add (const Standard_Integer aInd1,
//purpose :
//=======================================================================
Standard_Boolean NMTDS_InterfPool::Add (const Standard_Integer aInd1,
const Standard_Integer aInd2,
const Standard_Boolean bFlag,
const NMTDS_InterfType aType)
const Standard_Integer aInd2,
const Standard_Boolean bFlag,
const NMTDS_InterfType aType)
{
NMTDS_PairBoolean aPKB;
//

View File

@ -53,25 +53,25 @@ class NMTDS_InterfPool {
Standard_EXPORT
Standard_Boolean Add(const NMTDS_PairBoolean& aPKB,
const NMTDS_InterfType aType) ;
const NMTDS_InterfType aType) ;
Standard_EXPORT
Standard_Boolean Add(const Standard_Integer aInd1,
const Standard_Integer aInd2,
const NMTDS_InterfType aType) ;
const Standard_Integer aInd2,
const NMTDS_InterfType aType) ;
Standard_EXPORT
Standard_Boolean Add(const Standard_Integer aInd1,
const Standard_Integer aInd2,
const Standard_Boolean bFlag,
const NMTDS_InterfType aType) ;
const Standard_Integer aInd2,
const Standard_Boolean bFlag,
const NMTDS_InterfType aType) ;
Standard_EXPORT
Standard_Boolean Contains(const NMTDS_PairBoolean& aPKB) const;
Standard_EXPORT
Standard_Boolean Contains(const Standard_Integer aInd1,
const Standard_Integer aInd2) const;
const Standard_Integer aInd2) const;
Standard_EXPORT
const NMTDS_ListOfPairBoolean& Get() const;
@ -84,7 +84,7 @@ class NMTDS_InterfPool {
Standard_EXPORT
const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd,
const NMTDS_InterfType aType) const;
const NMTDS_InterfType aType) const;
//! Returns the reference to array Of F/F interferences <br>
Standard_EXPORT BOPTools_CArray1OfSSInterference& SSInterferences() ;

View File

@ -17,10 +17,10 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File: NMTDS_InterfType.hxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
// File: NMTDS_InterfType.hxx
// Created:
// Author: Peter KURNEV
// <pkv@irinox>
#ifndef _NMTDS_InterfType_HeaderFile

View File

@ -125,7 +125,7 @@ Standard_Integer NMTDS_Iterator::BlockLength() const
// purpose:
//=======================================================================
void NMTDS_Iterator::Initialize(const TopAbs_ShapeEnum aType1,
const TopAbs_ShapeEnum aType2)
const TopAbs_ShapeEnum aType2)
{
Standard_Integer iX;
//
@ -160,8 +160,8 @@ void NMTDS_Iterator::Next()
// purpose:
//=======================================================================
void NMTDS_Iterator::Current(Standard_Integer& aIndex1,
Standard_Integer& aIndex2,
Standard_Boolean& aWithSubShape) const
Standard_Integer& aIndex2,
Standard_Boolean& aWithSubShape) const
{
const NMTDS_PairBoolean& aPKB=myIterator.Value();
aPKB.Ids(aIndex1, aIndex2);
@ -323,11 +323,11 @@ void NMTDS_Iterator::Intersect()
aMPKXB.Remove(aPKXB);
}
}
//
aNbLV1=aLV1.Extent();
if (aNbLV1) {
aMVSD.Bind(i, aLV1);
}
//
aNbLV1=aLV1.Extent();
if (aNbLV1) {
aMVSD.Bind(i, aLV1);
}
}
}//for (i=i1; i<=i2; ++i) {
}//for (iR=1; iR<aNbR; ++iR) {
@ -348,7 +348,7 @@ void NMTDS_Iterator::Intersect()
//purpose :
//=======================================================================
void NMTDS_Iterator::FillMVSD(const TColStd_DataMapOfIntegerListOfInteger& aMVSD,
TColStd_DataMapOfIntegerListOfInteger& bMVSD)
TColStd_DataMapOfIntegerListOfInteger& bMVSD)
{
Standard_Boolean bFound;
Standard_Integer aNbVSD, iCnt, i, j, k;

Some files were not shown because too many files have changed in this diff Show More