}
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPoints->LineEdit2 ||
- myEditCurrentArgument == GroupPoints->LineEdit3 ) ?
+ myEditCurrentArgument == GroupPoints->LineEdit3 ) ?
TopAbs_EDGE : TopAbs_VERTEX;
GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType );
TopoDS_Shape aShape;
}
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 );
}
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 );
}
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupFaces->LineEdit1 ||
- myEditCurrentArgument == GroupFaces->LineEdit2 ) ?
+ myEditCurrentArgument == GroupFaces->LineEdit2 ) ?
TopAbs_FACE : TopAbs_VERTEX;
GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType );
TopoDS_Shape aShape;
}
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 );
}
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();
}
}
}
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;
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() );
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) {
// 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 = "";
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;
TopoDS_Shape myShape = aProfile.GetShape( &isDone );
if ( isDone ) {
if ( myShape.ShapeType() != TopAbs_VERTEX )
- myCommand.append( ":WW" );
+ myCommand.append( ":WW" );
}
}
else {
{
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) {
{
TObjectData* data = aStEntry2ObjDataPtrIt->second;
if ( data->_unpublished && !data->_pyName.IsEmpty() ) {
- aScript += unpublishCmd + data->_pyName + ")";
+ aScript += unpublishCmd + data->_pyName + ")";
}
}
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)
//! 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;
static
Standard_Boolean RefineShell(const TopoDS_Shell& ,
- TopoDS_Shell& );
+ TopoDS_Shell& );
//=======================================================================
//function :
}
/*
else {
- int a=0;
+ int a=0;
}
*/
}
//
bRefine=RefineShell(aShell, aShx);
if (bRefine) {
- myLoops.Append(aShx);
+ myLoops.Append(aShx);
}
}
} // for (; aItF.More(); aItF.Next()) {
{
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
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);
//purpose :
//=======================================================================
Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
- TopoDS_Shell& aShx)
+ TopoDS_Shell& aShx)
{
Standard_Boolean bRet;
const TopoDS_Face& aF1=*((TopoDS_Face*)(&aLF.First()));
if (aNbF==1) {
if (aOrE==TopAbs_INTERNAL) {
- continue;
+ continue;
}
aMFx.Add(aF1);
}
else if (aNbF==2) {
const TopoDS_Face& aF2=*((TopoDS_Face*)(&aLF.Last()));
if (aF2.IsSame(aF1)) {
- if (BRep_Tool::IsClosed(aE, aF1)) {
- continue;
- }
- if (aOrE==TopAbs_INTERNAL) {
- continue;
- }
- aMFx.Add(aF1);
- aMFx.Add(aF2);
+ if (BRep_Tool::IsClosed(aE, aF1)) {
+ continue;
+ }
+ if (aOrE==TopAbs_INTERNAL) {
+ continue;
+ }
+ aMFx.Add(aF1);
+ aMFx.Add(aF2);
}
}
}
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) ;
//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
//
static
Standard_Boolean IsClosed(const TopoDS_Edge& ,
- const TopoDS_Face&,
- Standard_Boolean& );
+ const TopoDS_Face&,
+ Standard_Boolean& );
//=======================================================================
//function : FillImagesFaces
}
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);
for (k=1; k<=aNbMFj; ++k) {
const TopoDS_Shape& aFk=aMFj(k);
if (!aDMSI.IsBound(aFk)) {
- aDMSI.Bind(aFk, j);
+ aDMSI.Bind(aFk, j);
}
}
}
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;
+ }
}
}
//
//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;
//
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;
+ }
}
}
}
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
}
}
}
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
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) ;
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) {
//
aN1=(Standard_Integer)aPK.Id(1);
aN2=(Standard_Integer)aPK.Id(2);
- //
+ //
aP1=aNodes(aN1).Transformed(aTrsf);
aP2=aNodes(aN2).Transformed(aTrsf);
//
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;
*/
//Standard_EXPORT
void Initialize(const TopAbs_ShapeEnum theT1,
- const TopAbs_ShapeEnum theT2) ;
+ const TopAbs_ShapeEnum theT2) ;
/**
* Check the existence of pairs to iterare.
* @return
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;
// 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>
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);
//=======================================================================
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1,
- const TopoDS_Shape& aS2)
+ const TopoDS_Shape& aS2)
{
Standard_Boolean bOk;
Standard_Integer iErr;
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 {
//purpose :
//=======================================================================
Standard_Integer PntInEdge(const TopoDS_Edge& aE,
- gp_Pnt& aP)
+ gp_Pnt& aP)
{
Standard_Integer iErr;
//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;
//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;
//purpose :
//=======================================================================
Standard_Integer PntInFace(const TopoDS_Face& aF,
- gp_Pnt& aP)
+ gp_Pnt& aP)
{
Standard_Integer iErr;
//
//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;
//
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;
//
// 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>
Standard_Integer Dimension(const TopAbs_ShapeEnum aType);
static
void PointProperties(const TopoDS_Shape& aS,
- GProp_GProps& aGProps);
+ GProp_GProps& aGProps);
//=======================================================================
//function : CheckGProps
const TopoDS_Shape& aS1x=aIt.Value();
CheckGProps(aS1x);
if (!myFound) {
- return;
+ return;
}
}
}
//
// 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>
static
Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2);
+ const TopAbs_ShapeEnum aType2);
//=======================================================================
//function :
//purpose :
//=======================================================================
void GEOMAlgo_GetInPlaceIterator::Initialize(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2)
+ const TopAbs_ShapeEnum aType2)
{
Standard_Integer iX;
//
//purpose :
//=======================================================================
Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2)
+ const TopAbs_ShapeEnum aType2)
{
Standard_Integer iRet;
//
// 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>
//
static
void GetSubShapes(const TopoDS_Shape& aS,
- TopTools_IndexedMapOfShape& aMSS);
+ TopTools_IndexedMapOfShape& aMSS);
//=======================================================================
//function : GEOMAlgo_Gluer
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)
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);
for (; aItS.More(); aItS.Next()) {
const TopoDS_Shape& aVSD=aItS.Value();
if (!myOrigins.IsBound(aVSD)) {
- myOrigins.Bind(aVSD, aV);
+ myOrigins.Bind(aVSD, aV);
}
}
}
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);
}
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;
}
}
//
for (; aItS.More(); aItS.Next()) {
const TopoDS_Shape& aFSD=aItS.Value();
if (!myOrigins.IsBound(aFSD)) {
- myOrigins.Bind(aFSD, aNewShape);
+ myOrigins.Bind(aFSD, aNewShape);
}
}
}
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;
+ }
}
}
//
//purpose :
//=======================================================================
void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF,
- GEOMAlgo_PassKeyShape& aPK)
+ GEOMAlgo_PassKeyShape& aPK)
{
Standard_Integer i, aNbE;
TopTools_ListOfShape aLE;
//purpose :
//=======================================================================
void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE,
- GEOMAlgo_PassKeyShape& aPK)
+ GEOMAlgo_PassKeyShape& aPK)
{
TopoDS_Vertex aV1, aV2;
//
//purpose :
//=======================================================================
void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV,
- TopoDS_Vertex& aNewVertex)
+ TopoDS_Vertex& aNewVertex)
{
Standard_Integer aNbV;
Standard_Real aTolV, aD, aDmax;
//purpose :
//=======================================================================
void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
- TopoDS_Edge& aNewEdge)
+ TopoDS_Edge& aNewEdge)
{
myErrorStatus=0;
//
//purpose :
//=======================================================================
void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
- TopoDS_Face& aNewFace)
+ TopoDS_Face& aNewFace)
{
myErrorStatus=0;
//
//
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);
//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;
//purpose :
//=======================================================================
void GetSubShapes(const TopoDS_Shape& aS,
- TopTools_IndexedMapOfShape& aMSS)
+ TopTools_IndexedMapOfShape& aMSS)
{
Standard_Integer aR;
TopAbs_ShapeEnum aType;
if(myOrigins.IsBound(aS)) {
const TopoDS_Shape& aSnew=myOrigins.Find(aS);
if (!aSnew.IsSame(aS)) {
- myGenerated.Append(aSnew);
+ myGenerated.Append(aSnew);
}
}
}
// 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
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;
//
// 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>
//
aType=theS.ShapeType();
if (!(aType==TopAbs_VERTEX || aType==TopAbs_EDGE ||
- aType==TopAbs_FACE || aType==TopAbs_SOLID)) {
+ aType==TopAbs_FACE || aType==TopAbs_SOLID)) {
return myHistShapes;
}
//
//purpose :
//=======================================================================
void GEOMAlgo_Gluer2::MapShapes(const TopoDS_Shape& theS,
- TopTools_MapOfShape& theM)
+ TopTools_MapOfShape& theM)
{
TopoDS_Iterator aIt;
//
//
// 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>
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
//
// 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
// 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
//
// 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
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) ;
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
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) ;
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
const TopTools_ListOfShape& aLSx=aMFS(i);
aNbSx=aLSx.Extent();
if (aNbSx==1) {
- aSFS.Append(aFx);
+ aSFS.Append(aFx);
}
else if (aNbSx==2) {
- ++aNbF2;
+ ++aNbF2;
}
}
}
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);
+ }
}
}
}
//purpose :
//=======================================================================
void GEOMAlgo_RemoverWebs::AddInternalShapes(const TopTools_ListOfShape& aLSR,
- const TopTools_IndexedMapOfShape& aMSI)
+ const TopTools_IndexedMapOfShape& aMSI)
{
Standard_Integer i, aNbSI;
TopAbs_State aState;
//
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);
}
}
}
Standard_EXPORT
static void AddInternalShapes(const TopTools_ListOfShape& ,
- const TopTools_IndexedMapOfShape& );
+ const TopTools_IndexedMapOfShape& );
//
};
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) ;
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) ;
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
//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;
//
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;
//! 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>
//! 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>
//! 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>
//! 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>
//! 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>
//! 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>
//! 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>
//! 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>
//! 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>
//! 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>
//! 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>
//! 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>
//! 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>
//! 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>
//! 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>
//! 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>
//! 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
//
// 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>
//
// 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
//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
//
if (anIsOut && anIsNotPassed) {
if (aE.IsSame(aEOuta)) {
- continue;
+ continue;
}
//
if (iCnt==1) {
// purpose:
//=======================================================================
Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta,
- const BOP_ListOfEdgeInfo& aLEInfo)
+ const BOP_ListOfEdgeInfo& aLEInfo)
{
Standard_Boolean bIsOut, bIsNotPassed;
Standard_Integer iCnt=0;
bIsNotPassed=!aEI.Passed();
if (bIsOut && bIsNotPassed) {
if (!aE.IsSame(aEOuta)) {
- iCnt++;
+ iCnt++;
}
}
}
_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() );
}
}
}
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();
+ }
}
}
}
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:
{
}
default:
{
- break;
+ break;
}
}
}
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();
-
- 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;
+ 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_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;
}
}
}
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;
}
}
}
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 : */
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() );
}
}
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--;
+ }
}
}
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" ) );
}
_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] );
+ }
+ }
}
}
}
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() );
}
}
}
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 );
/* 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 );
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 );
+ }
}
}
}
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
}
}
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();
+ }
+ }
}
}
}
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();
+ }
+ }
}
}
}
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() )
}
}
}
// - 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
// 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() );
// 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() );
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 ) {
#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 );
}
}
}
// 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() );
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() );
}
{
// 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 );
occPrs->SetToActivate( ToActivate() );
if ( AISShape->isTopLevel() && GEOM_AISShape::topLevelDisplayMode() == GEOM_AISShape::TopShowAdditionalWActor ) {
- // 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 );
- }
-
- // add shape to the presentation
- occPrs->AddObject( aWirePrs );
+ // 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 );
+ }
+
+ // add shape to the presentation
+ occPrs->AddObject( aWirePrs );
}
}
// if presentation is found -> set again shape for it
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();
}
}
}
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 );
}
}
}
// 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();
+ }
+ }
}
}
}
}
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();
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 ) );
+ }
+ }
+ }
+ }
}
}
}
// - 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;
// - 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 );
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;
-
- SALOMEDS::Color aReservedColor = aChildObject->GetColor();
- if ( aReservedColor.R >= 0 && aReservedColor.G >= 0 && aReservedColor.B >= 0 )
- aReservedColors.append( aReservedColor );
- }
- }
- aSColor = getUniqueColor( aReservedColors );
- hasColor = true;
+ 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;
#endif // SIMPLE_AUTOCOLOR
- }
- }
+ }
+ }
}
}
}
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 */
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
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();
}
myShowSelWidget = showSelWidget;
// Set title
setWindowTitle( tr( "MATERIAL_PROPERTIES_TLT" ) );
-
+
// main layout
QVBoxLayout* main = new QVBoxLayout( mainFrame() );
main->setMargin( 0 );
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>();
// 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();
}
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;
}
// enable line edit
myLineEditCurArg->setEnabled(true);
myLineEditCurArg->setFocus();
- SelectionIntoArgument();
+ SelectionIntoArgument();
// after setFocus(), because it will be setDown(false) when loses focus
send->setDown(true);
}
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 );
}
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();
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();
}
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);
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());
+ }
}
}
}
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();
// update Object browser
if ( dynamic_cast<SalomeApp_Application*>( app ) )
- dynamic_cast<SalomeApp_Application*>( app )->updateObjectBrowser( true );
+ dynamic_cast<SalomeApp_Application*>( app )->updateObjectBrowser( true );
}
};
{
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();
}
}
};
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 ];
}
}
}
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 ),
void GEOM_Swig::setDisplayMode( const char* theEntry, int theMode, bool theUpdateViewer )
{
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::DisplayMode ),
- theMode, theUpdateViewer ) );
+ theMode, theUpdateViewer ) );
}
/*!
void GEOM_Swig::setVectorsMode( const char* theEntry, bool theOn, bool theUpdateViewer )
{
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::EdgesDirection ),
- theOn, theUpdateViewer ) );
+ theOn, theUpdateViewer ) );
}
/*!
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 ) );
}
/*!
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 ) );
}
/*!
void GEOM_Swig::setTransparency( const char* theEntry, float theTransparency, bool theUpdateViewer )
{
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Transparency ),
- theTransparency, theUpdateViewer ) );
+ theTransparency, theUpdateViewer ) );
}
/*!
void GEOM_Swig::setDeflection( const char* theEntry, float theDeflection, bool theUpdateViewer )
{
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Deflection ),
- theDeflection, theUpdateViewer ) );
+ theDeflection, theUpdateViewer ) );
}
/*!
Material_Model material;
material.fromResources( theMaterial );
ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Material ),
- material.toProperties(), theUpdateViewer ) );
+ material.toProperties(), theUpdateViewer ) );
}
/*!
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
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() ) {
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) {
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();
}
}
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) {
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() ) {
QString aName = GEOMBase::GetName( myAxis.get() );
myEditCurrentArgument->setText( aName );
if ( myBaseObjects.isEmpty() )
- GroupPoints->PushButton1->click();
+ GroupPoints->PushButton1->click();
}
}
processPreview();
{
double value = 0.0;
if ( type >= 0 && type < 4 )
+ {
if ( theIsFront )
value = myReflection[ type ].front_coef;
else
value = myReflection[ type ].back_coef;
+ }
return value;
}
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;
+ }
}
/*!
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() ) );
}
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));
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();
{
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:
// 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>
// 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
// 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 :
// 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>
//=======================================================================
// 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
// 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>
// 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
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) ;
//
// 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
//
// 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
//
// 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
// 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
// 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
//purpose :
//=======================================================================
Standard_Boolean NMTDS_InterfPool::Add (const NMTDS_PairBoolean& aPKB,
- const NMTDS_InterfType aType)
+ const NMTDS_InterfType aType)
{
Standard_Boolean bRet;
Standard_Integer iType;
//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;
//
//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;
//
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;
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() ;
// 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
// purpose:
//=======================================================================
void NMTDS_Iterator::Initialize(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2)
+ const TopAbs_ShapeEnum aType2)
{
Standard_Integer iX;
//
// 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);
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) {
//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;
Standard_EXPORT
void Initialize(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2) ;
+ const TopAbs_ShapeEnum aType2) ;
Standard_EXPORT
Standard_Boolean More() const;
Standard_EXPORT
void Current(Standard_Integer& aIndex1,
- Standard_Integer& aIndex2,
- Standard_Boolean& aWithSubShape) const;
+ Standard_Integer& aIndex2,
+ Standard_Boolean& aWithSubShape) const;
Standard_EXPORT
virtual void Prepare() ;
Standard_EXPORT
static void FillMVSD(const TColStd_DataMapOfIntegerListOfInteger& aMVSD1,
- TColStd_DataMapOfIntegerListOfInteger& aMVSD2) ;
+ TColStd_DataMapOfIntegerListOfInteger& aMVSD2) ;
protected:
Standard_EXPORT
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_ListIteratorOfListOfPair.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_ListIteratorOfListOfPair.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_ListIteratorOfListOfPair_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_ListIteratorOfListOfPairBoolean.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_ListIteratorOfListOfPairBoolean.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_ListIteratorOfListOfPassKey.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_ListIteratorOfListOfPassKey.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_ListIteratorOfListOfPassKey_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_ListOfPair.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_ListOfPair.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_ListOfPair_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_ListOfPairBoolean.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_ListOfPairBoolean.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_ListOfPairBoolean_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_ListOfPassKey.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_ListOfPassKey.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_ListOfPassKey_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_ListOfPassKeyBoolean.hxx
-// Created: Mon Feb 20 07:27:34 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_ListOfPassKeyBoolean.hxx
+// Created: Mon Feb 20 07:27:34 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_ListOfPassKeyBoolean_HeaderFile
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_MapIteratorOfMapOfPairBoolean.hxx
-// Created: Mon Feb 20 08:22:39 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_MapIteratorOfMapOfPairBoolean.hxx
+// Created: Mon Feb 20 08:22:39 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMRCol_MapIteratorOfMapOfPassKey.hxx
-// Created: Mon Feb 20 08:22:39 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMRCol_MapIteratorOfMapOfPassKey.hxx
+// Created: Mon Feb 20 08:22:39 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMRCol_MapIteratorOfMapOfPassKey_HeaderFile
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMRCol_MapIteratorOfMapOfPassKeyBoolean.hxx
-// Created: Mon Feb 20 08:22:39 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMRCol_MapIteratorOfMapOfPassKeyBoolean.hxx
+// Created: Mon Feb 20 08:22:39 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMRCol_MapIteratorOfMapOfPassKeyBoolean_HeaderFile
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_MapOfPairBoolean.hxx
-// Created: Mon Feb 20 08:19:07 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_MapOfPairBoolean.hxx
+// Created: Mon Feb 20 08:19:07 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_MapOfPairBoolean_HeaderFile
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_MapOfPassKey.hxx
-// Created: Mon Feb 20 08:19:07 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_MapOfPassKey.hxx
+// Created: Mon Feb 20 08:19:07 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_MapOfPassKey_HeaderFile
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_MapOfPassKeyBoolean.hxx
-// Created: Mon Feb 20 08:19:07 2012
-// Author:
-// <pkv@BDEURI37616>
+// File: NMTDS_MapOfPassKeyBoolean.hxx
+// Created: Mon Feb 20 08:19:07 2012
+// Author:
+// <pkv@BDEURI37616>
#ifndef NMTDS_MapOfPassKeyBoolean_HeaderFile
//purpose :
//=======================================================================
void NMTDS_Pair::SetIds(const Standard_Integer aId1,
- const Standard_Integer aId2)
+ const Standard_Integer aId2)
{
Clear();
myId1=aId1;
//purpose :
//=======================================================================
void NMTDS_Pair::Ids(Standard_Integer& aId1,
- Standard_Integer& aId2) const
+ Standard_Integer& aId2) const
{
aId1=myId1;
aId2=myId2;
Standard_EXPORT
void SetIds(const Standard_Integer aI1,
- const Standard_Integer aI2) ;
+ const Standard_Integer aI2) ;
Standard_EXPORT
void Ids(Standard_Integer& aI1,
- Standard_Integer& aI2) const;
+ Standard_Integer& aI2) const;
Standard_EXPORT
Standard_Boolean IsEqual(const NMTDS_Pair& aOther) const;
//purpose :
//=======================================================================
Standard_Integer NMTDS_PairMapHasher::HashCode(const NMTDS_Pair& aPK,
- const Standard_Integer Upper)
+ const Standard_Integer Upper)
{
return aPK.HashCode(Upper);
}
//purpose :
//=======================================================================
Standard_Boolean NMTDS_PairMapHasher::IsEqual(const NMTDS_Pair& aPK1,
- const NMTDS_Pair& aPK2)
+ const NMTDS_Pair& aPK2)
{
return aPK1.IsEqual(aPK2);
}
public:
Standard_EXPORT
static Standard_Integer HashCode(const NMTDS_Pair& aPKey,
- const Standard_Integer Upper) ;
+ const Standard_Integer Upper) ;
Standard_EXPORT
static Standard_Boolean IsEqual(const NMTDS_Pair& aPKey1,
- const NMTDS_Pair& aPKey2) ;
+ const NMTDS_Pair& aPKey2) ;
};
#endif
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) ;
public:
Standard_EXPORT
static Standard_Integer HashCode(const NMTDS_PassKey& aPKey,
- const Standard_Integer Upper) ;
+ const Standard_Integer Upper) ;
Standard_EXPORT
static Standard_Boolean IsEqual(const NMTDS_PassKey& aPKey1,
- const NMTDS_PassKey& aPKey2) ;
+ const NMTDS_PassKey& aPKey2) ;
};
#endif
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) ;
public:
Standard_EXPORT
static Standard_Integer HashCode(const NMTDS_PassKeyShape& aPKey,
- const Standard_Integer Upper) ;
+ const Standard_Integer Upper) ;
Standard_EXPORT
static Standard_Boolean IsEqual(const NMTDS_PassKeyShape& aPKey1,
- const NMTDS_PassKeyShape& aPKey2) ;
+ const NMTDS_PassKeyShape& aPKey2) ;
};
#endif
// purpose:
//=======================================================================
void ComputeBoxExS(const Standard_Integer aIx,
- const NMTDS_ShapesDataStructure* pDS,
- Bnd_Box& aBoxEx)
+ const NMTDS_ShapesDataStructure* pDS,
+ Bnd_Box& aBoxEx)
{
Standard_Integer i, aNbS, iS;
//
Standard_EXPORT
virtual Standard_Integer ShapeIndex(const TopoDS_Shape& aS,
- const Standard_Integer iRank) const;
+ const Standard_Integer iRank) const;
Standard_EXPORT
void FillMap(const TopoDS_Shape& aS,
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;
Standard_EXPORT
void FillSubshapes(const TopoDS_Shape& aS,
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
- BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
+ BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;
Standard_EXPORT
void GetAllSuccessors(const Standard_Integer anIndex,
- TColStd_IndexedMapOfInteger& aScrs) const;
+ TColStd_IndexedMapOfInteger& aScrs) const;
Standard_EXPORT
void ComputeBoxEx(const Standard_Integer anIndex,
- Bnd_Box& aBox) const;
+ Bnd_Box& aBox) const;
protected:
public:
Standard_EXPORT
static Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aT1,
- const TopAbs_ShapeEnum aT2) ;
+ const TopAbs_ShapeEnum aT2) ;
Standard_EXPORT
static Standard_Boolean HasBRep(const TopAbs_ShapeEnum aT) ;
Standard_EXPORT
static Standard_Integer ComputeVV(const TopoDS_Vertex& aV1,
- const TopoDS_Vertex& aV2) ;
+ const TopoDS_Vertex& aV2) ;
Standard_EXPORT
static void CopyShape(const TopoDS_Shape& aS,
- TopoDS_Shape& aSC) ;
+ TopoDS_Shape& aSC) ;
Standard_EXPORT
static void CopyShape(const TopoDS_Shape& aS,
- TopoDS_Shape& aSC,
- TopTools_IndexedDataMapOfShapeShape& aMSS) ;
+ TopoDS_Shape& aSC,
+ TopTools_IndexedDataMapOfShapeShape& aMSS) ;
};
#endif
Standard_EXPORT
virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2) ;
+ const TopAbs_ShapeEnum aType2) ;
Standard_Integer myStopStatus;
aC2D=BRep_Tool::CurveOnSurface(aDE, aDF, aT1, aT2);
dT1=aT1-t1;
if (dT1<0.) {
- dT1=-dT1;
+ dT1=-dT1;
}
//
dT2=aT2-t2;
if (dT2<0.) {
- dT2=-dT2;
+ dT2=-dT2;
}
aDT=Precision::PConfusion();
if(dT1<aDT && dT2<aDT) {
- BOPTools_ListOfPaveBlock* pLPB=(BOPTools_ListOfPaveBlock*)&aSplitEdges;
- pLPB->Clear();
- return;
+ BOPTools_ListOfPaveBlock* pLPB=(BOPTools_ListOfPaveBlock*)&aSplitEdges;
+ pLPB->Clear();
+ return;
}
}
}
Standard_EXPORT
void FindPaveBlocks(const Standard_Integer nED,
- const Standard_Integer nVD,
- const Standard_Integer nFD,
- BOPTools_ListOfPaveBlock& aLPB) ;
+ const Standard_Integer nVD,
+ const Standard_Integer nFD,
+ BOPTools_ListOfPaveBlock& aLPB) ;
Standard_EXPORT
void FillPaveSet(const Standard_Integer nED,
- const Standard_Integer nVD,
- const Standard_Integer nFD,
- const BOPTools_ListOfPaveBlock& aLPB) ;
+ const Standard_Integer nVD,
+ const Standard_Integer nFD,
+ const BOPTools_ListOfPaveBlock& aLPB) ;
Standard_EXPORT
void FillSplitEdgesPool(const Standard_Integer nED) ;
Standard_EXPORT
void MakeSplitEdges(const Standard_Integer nED,
- const Standard_Integer nFD) ;
+ const Standard_Integer nFD) ;
Standard_EXPORT
void MakeSplitEdge(const TopoDS_Edge& aS1,
- const TopoDS_Face& aF,
- const TopoDS_Vertex& aV1,
- const Standard_Real aP1,
- const TopoDS_Vertex& aV2,
- const Standard_Real aP2,
- TopoDS_Edge& aNewEdge) ;
+ const TopoDS_Face& aF,
+ const TopoDS_Vertex& aV1,
+ const Standard_Real aP1,
+ const TopoDS_Vertex& aV2,
+ const Standard_Real aP2,
+ TopoDS_Edge& aNewEdge) ;
NMTTools_PPaveFiller myFiller;
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx
-// Created: Mon Feb 20 12:24:47 2012
+// File: NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx
+// Created: Mon Feb 20 12:24:47 2012
// Author:
-// <pkv@BDEURI37616>
+// <pkv@BDEURI37616>
#ifndef NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx
-// Created: Mon Feb 20 12:04:52 2012
+// File: NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx
+// Created: Mon Feb 20 12:04:52 2012
// Author:
-// <pkv@BDEURI37616>
+// <pkv@BDEURI37616>
#ifndef NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTTools_DataMapOfIntegerFaceInfo.hxx
-// Created: Mon Feb 20 12:21:55 2012
+// File: NMTTools_DataMapOfIntegerFaceInfo.hxx
+// Created: Mon Feb 20 12:21:55 2012
// Author:
-// <pkv@BDEURI37616>
+// <pkv@BDEURI37616>
#ifndef NMTTools_DataMapOfIntegerFaceInfo_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTTools_DataMapOfIntegerListOfPaveBlock.hxx
-// Created: Mon Feb 20 09:27:40 2012
+// File: NMTTools_DataMapOfIntegerListOfPaveBlock.hxx
+// Created: Mon Feb 20 09:27:40 2012
// Author:
-// <pkv@BDEURI37616>
+// <pkv@BDEURI37616>
#ifndef NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx
-// Created: Mon Feb 20 09:20:07 2012
+// File: NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx
+// Created: Mon Feb 20 09:20:07 2012
// Author:
-// <pkv@BDEURI37616>
+// <pkv@BDEURI37616>
#ifndef NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx
-// Created: Mon Feb 20 09:20:07 2012
+// File: NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx
+// Created: Mon Feb 20 09:20:07 2012
// Author:
-// <pkv@BDEURI37616>
-// File: NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx
-// Created: Mon Feb 20 11:59:23 2012
+// <pkv@BDEURI37616>
+// File: NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx
+// Created: Mon Feb 20 11:59:23 2012
// Author:
-// <pkv@BDEURI37616>
+// <pkv@BDEURI37616>
#ifndef NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTTools_IndexedDataMapOfShapePaveBlock.hxx
-// Created: Mon Feb 20 11:55:34 2012
+// File: NMTTools_IndexedDataMapOfShapePaveBlock.hxx
+// Created: Mon Feb 20 11:55:34 2012
// Author:
-// <pkv@BDEURI37616>
+// <pkv@BDEURI37616>
#ifndef NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_ListIteratorOfListOfCommonBlock.hxx
-// Created: Mon Feb 20 11:25:23 2012
+// File: NMTDS_ListIteratorOfListOfCommonBlock.hxx
+// Created: Mon Feb 20 11:25:23 2012
// Author:
-// <pkv@BDEURI37616>
+// <pkv@BDEURI37616>
#ifndef NMTDS_ListIteratorOfListOfCommonBlock_HeaderFile
#define NMTDS_ListIteratorOfListOfCommonBlock_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTDS_ListIteratorOfListOfCoupleOfShape.hxx
-// Created: Mon Feb 20 11:25:23 2012
+// File: NMTDS_ListIteratorOfListOfCoupleOfShape.hxx
+// Created: Mon Feb 20 11:25:23 2012
// Author:
-// <pkv@BDEURI37616>
+// <pkv@BDEURI37616>
#ifndef NMTDS_ListIteratorOfListOfCoupleOfShape_HeaderFile
#define NMTDS_ListIteratorOfListOfCoupleOfShape_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTTools_ListOfCommonBlock.hxx
-// Created: Mon Feb 20 07:27:34 2012
+// File: NMTTools_ListOfCommonBlock.hxx
+// Created: Mon Feb 20 07:27:34 2012
// Author:
-// <pkv@BDEURI37616>
+// <pkv@BDEURI37616>
#ifndef NMTTools_ListOfCommonBlock_HeaderFile
#define NMTTools_ListOfCommonBlock_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTTools_ListOfCoupleOfShape.hxx
-// Created: Mon Feb 20 07:27:34 2012
+// File: NMTTools_ListOfCoupleOfShape.hxx
+// Created: Mon Feb 20 07:27:34 2012
// Author:
-// <pkv@BDEURI37616>
+// <pkv@BDEURI37616>
#ifndef NMTTools_ListOfCoupleOfShape_HeaderFile
#define NMTTools_ListOfCoupleOfShape_HeaderFile
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTTools_MapIteratorOfMapOfPaveBlock.hxx
-// Created: Mon Feb 20 11:47:30 2012
+// File: NMTTools_MapIteratorOfMapOfPaveBlock.hxx
+// Created: Mon Feb 20 11:47:30 2012
// Author:
-// <pkv@BDEURI37616>
+// <pkv@BDEURI37616>
#ifndef NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: NMTTools_MapOfPaveBlock.hxx
-// Created: Mon Feb 20 08:19:07 2012
+// File: NMTTools_MapOfPaveBlock.hxx
+// Created: Mon Feb 20 08:19:07 2012
// Author:
-// <pkv@BDEURI37616>
+// <pkv@BDEURI37616>
#ifndef NMTTools_MapOfPaveBlock_HeaderFile
Standard_EXPORT
Standard_Integer SplitsInFace(const Standard_Integer aBid,
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aLs) ;
+ const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ TColStd_ListOfInteger& aLs) ;
Standard_EXPORT
Standard_Integer SplitsInFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aLs) ;
+ const Standard_Integer nF2,
+ TColStd_ListOfInteger& aLs) ;
Standard_EXPORT
Standard_Integer SplitsOnEdge(const Standard_Integer nE1,
- const Standard_Integer nE2,
- TColStd_ListOfInteger& aLs) ;
+ const Standard_Integer nE2,
+ TColStd_ListOfInteger& aLs) ;
Standard_EXPORT
Standard_Integer SplitsOnFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aLs) ;
+ const Standard_Integer nF2,
+ TColStd_ListOfInteger& aLs) ;
Standard_EXPORT
Standard_Integer SplitsOnFace(const Standard_Integer aBid,
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aLs) ;
+ const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ TColStd_ListOfInteger& aLs) ;
Standard_EXPORT
Standard_Integer SplitsInFace(const Standard_Integer aBid,
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
+ const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
Standard_EXPORT
Standard_Integer SplitsInFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
Standard_EXPORT
Standard_Integer SplitsOnEdge(const Standard_Integer nE1,
- const Standard_Integer nE2,
- BOPTools_ListOfPaveBlock& aLs) ;
+ const Standard_Integer nE2,
+ BOPTools_ListOfPaveBlock& aLs) ;
Standard_EXPORT
Standard_Integer SplitsOnFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
Standard_EXPORT
Standard_Integer SplitsOnFace(const Standard_Integer aBid,
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
+ const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
Standard_EXPORT
Standard_Integer SplitsFace(const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
+ BOPTools_ListOfPaveBlock& aLs) ;
Standard_EXPORT
Standard_Integer SplitsFace(const Standard_Integer nF2,
- TColStd_ListOfInteger& aLs) ;
+ TColStd_ListOfInteger& aLs) ;
Standard_EXPORT
Standard_Integer CommonBlocksFace(const Standard_Integer nF,
- NMTTools_ListOfCommonBlock& aLCB) ;
+ NMTTools_ListOfCommonBlock& aLCB) ;
Standard_EXPORT
void PrepareFace(const Standard_Integer nF,
- TopoDS_Face& aF) ;
+ TopoDS_Face& aF) ;
Standard_EXPORT
const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB) ;
Standard_EXPORT
const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB,
- TColStd_ListOfInteger& aLB,
- Standard_Integer& aIsCommonBlock) ;
+ TColStd_ListOfInteger& aLB,
+ Standard_Integer& aIsCommonBlock) ;
Standard_EXPORT
void RealSplitsFace(const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
+ BOPTools_ListOfPaveBlock& aLs) ;
Standard_EXPORT
Standard_Boolean HasRealSplitsInOnFace(const Standard_Integer nF1,
- const Standard_Integer nF2) ;
+ const Standard_Integer nF2) ;
Standard_EXPORT
void RealSplitsInFace(const Standard_Integer aBid,
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
+ const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
Standard_EXPORT
void RealSplitsInFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
Standard_EXPORT
void RealSplitsInFace(const Standard_Integer nF1,
- BOPTools_ListOfPaveBlock& aLPB) ;
+ BOPTools_ListOfPaveBlock& aLPB) ;
Standard_EXPORT
void RealSplitsOnEdge(const Standard_Integer nE1,
- const Standard_Integer nE2,
- BOPTools_ListOfPaveBlock& aLs) ;
+ const Standard_Integer nE2,
+ BOPTools_ListOfPaveBlock& aLs) ;
Standard_EXPORT
void RealSplitsOnFace(const Standard_Integer nE1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
Standard_EXPORT
void RealSplitsOnFace(const Standard_Integer aBid,
- const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_ListOfPaveBlock& aLs) ;
+ const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ BOPTools_ListOfPaveBlock& aLs) ;
Standard_EXPORT
void PrepareSetForFace(const Standard_Integer nF1,
- const Standard_Integer nF2,
- const BOPTools_ListOfPaveBlock& aLPB,
- BOPTools_PaveSet& aPSF) ;
+ const Standard_Integer nF2,
+ const BOPTools_ListOfPaveBlock& aLPB,
+ BOPTools_PaveSet& aPSF) ;
Standard_EXPORT
void PutPaveOnCurve(const BOPTools_PaveSet& aPSF,
- const Standard_Real aTol,
- BOPTools_Curve& aBC) ;
+ const Standard_Real aTol,
+ BOPTools_Curve& aBC) ;
Standard_EXPORT
void PutBoundPaveOnCurve(BOPTools_Curve& aBC,
- BOPTools_SSInterference& aFF) ;
+ BOPTools_SSInterference& aFF) ;
Standard_EXPORT
void PutBoundPaveOnCurve(const gp_Pnt& aP,
- const Standard_Real aT,
- BOPTools_Curve& aBC,
- BOPTools_SSInterference& aFF) ;
+ const Standard_Real aT,
+ BOPTools_Curve& aBC,
+ BOPTools_SSInterference& aFF) ;
Standard_EXPORT
Standard_Boolean FindPave(const gp_Pnt& aP,
- const Standard_Real aTpV,
- const BOPTools_PaveSet& aPS,
- BOPTools_Pave& aPV) ;
+ const Standard_Real aTpV,
+ const BOPTools_PaveSet& aPS,
+ BOPTools_Pave& aPV) ;
Standard_EXPORT
Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,
- const BOPTools_PaveBlock& aPBR,
- const Standard_Real aTol) ;
+ const BOPTools_PaveBlock& aPBR,
+ const Standard_Real aTol) ;
Standard_EXPORT
Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,
- const BOPTools_ListOfPaveBlock& aLPB,
- const Standard_Real aTol) ;
+ const BOPTools_ListOfPaveBlock& aLPB,
+ const Standard_Real aTol) ;
Standard_EXPORT
void MakePCurves() ;
Standard_EXPORT
Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,
- const TopTools_ListOfShape& aLPB,
- const Standard_Real aTol) ;
+ const TopTools_ListOfShape& aLPB,
+ const Standard_Real aTol) ;
Standard_EXPORT
Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB,
- const BOPTools_ListOfPaveBlock& aLPB) ;
+ const BOPTools_ListOfPaveBlock& aLPB) ;
Standard_EXPORT
Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,
- const TopoDS_Edge& aE,
- const Standard_Real aTol) ;
+ const TopoDS_Edge& aE,
+ const Standard_Real aTol) ;
Standard_EXPORT
void SharedEdges(const Standard_Integer nF1,
- const Standard_Integer nF2,
- TColStd_ListOfInteger& aLNE,
- TopTools_ListOfShape& aLSE) ;
+ const Standard_Integer nF2,
+ TColStd_ListOfInteger& aLNE,
+ TopTools_ListOfShape& aLSE) ;
Standard_EXPORT
void FuseVertices(const TopoDS_Shape& aC,
- TopTools_DataMapOfShapeShape& aDMVV) const;
+ TopTools_DataMapOfShapeShape& aDMVV) const;
Standard_EXPORT
void TreatPaveBlocks(NMTTools_ListOfCommonBlock& theLCB) ;
Standard_EXPORT
Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB1,
- const BOPTools_PaveBlock& aPB2) ;
+ const BOPTools_PaveBlock& aPB2) ;
Standard_EXPORT
void PutClosingPaveOnCurve(BOPTools_Curve& aBC,
- BOPTools_SSInterference& aFF) ;
+ BOPTools_SSInterference& aFF) ;
protected:
Standard_EXPORT
Standard_EXPORT
virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2) ;
+ const TopAbs_ShapeEnum aType2) ;
Standard_EXPORT
void CorrectShrunkRanges(const Standard_Integer aSide,
- const BOPTools_Pave& aPave,
- IntTools_ShrunkRange& aSR) ;
+ const BOPTools_Pave& aPave,
+ IntTools_ShrunkRange& aSR) ;
Standard_EXPORT
virtual void PreparePaveBlocks(const Standard_Integer anE) ;
Standard_EXPORT
Standard_Boolean IsSuccessorsComputed(const Standard_Integer iF1,
- const Standard_Integer iF2) const;
+ const Standard_Integer iF2) const;
Standard_EXPORT
Standard_Boolean IsBlocksCoinside(const BOPTools_PaveBlock& aPB1,
- const BOPTools_PaveBlock& aPB2) const;
+ const BOPTools_PaveBlock& aPB2) const;
Standard_EXPORT
void RefinePavePool() ;
Standard_EXPORT
Standard_Integer CheckFacePaves(const TopoDS_Vertex& aV,
- const Standard_Integer nF) ;
+ const Standard_Integer nF) ;
Standard_EXPORT
void ReplaceCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ;
Standard_EXPORT
void EENewVertices(const TopoDS_Vertex& aV,
- const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
+ const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
Standard_EXPORT
void EFNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
Standard_EXPORT
void EFNewVertices(const TopoDS_Vertex& aV,
- const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
+ const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ;
Standard_EXPORT
void UpdateCommonBlocks() ;
Standard_EXPORT
void CorrectTolR3D(const BOPTools_SSInterference& aFF,
- const TColStd_MapOfInteger& aMVStick,
- Standard_Real& aTolR3D) ;
+ const TColStd_MapOfInteger& aMVStick,
+ Standard_Real& aTolR3D) ;
NMTDS_PShapesDataStructure myDS;
n21=aPB2.Pave1().Index();
n22=aPB2.Pave2().Index();
if ((n21==n11 && n22==n12) || (n21==n12 && n22==n11)) {
- //modified by NIZNHY-PKV Thu Nov 11 08:13:24 2010f
- bIsCoincided=CheckCoincidence(aPB2, aPB1);
- if (bIsCoincided) {
- aCBx.AddPaveBlock(aPB2);
- break;
- }
- //aCBx.AddPaveBlock(aPB2);
- //break;
- //modified by NIZNHY-PKV Thu Nov 11 08:13:31 2010t
+ //modified by NIZNHY-PKV Thu Nov 11 08:13:24 2010f
+ bIsCoincided=CheckCoincidence(aPB2, aPB1);
+ if (bIsCoincided) {
+ aCBx.AddPaveBlock(aPB2);
+ break;
+ }
+ //aCBx.AddPaveBlock(aPB2);
+ //break;
+ //modified by NIZNHY-PKV Thu Nov 11 08:13:31 2010t
}
}
}
// purpose:
//=======================================================================
Standard_Boolean NMTTools_PaveFiller::CheckCoincidence(const BOPTools_PaveBlock& aPB1,
- const BOPTools_PaveBlock& aPB2)
+ const BOPTools_PaveBlock& aPB2)
{
Standard_Boolean bRet;
Standard_Integer nE1, nE2, aNbPoints;
if (aD<aTol) {
aT2x=aPPC.LowerDistanceParameter();
if (aT2x>aT21 && aT2x<aT22) {
- return !bRet;
+ return !bRet;
}
}
}
const TColStd_MapOfInteger& aMV1=(!j) ? aMVOn1 :aMVIn1;
aItMI.Initialize(aMV1);
for (; aItMI.More(); aItMI.Next()) {
- nV1=aItMI.Key();
- if (aMVOn2.Contains(nV1) || aMVIn2.Contains(nV1)) {
- aMVStick.Add(nV1);
- }
+ nV1=aItMI.Key();
+ if (aMVOn2.Contains(nV1) || aMVIn2.Contains(nV1)) {
+ aMVStick.Add(nV1);
+ }
}
}
//
NMTTools_MapOfPaveBlock *pMPB;
//
if (!j) {
- pMPB=((NMTTools_MapOfPaveBlock*)&aMPBIn1);
+ pMPB=((NMTTools_MapOfPaveBlock*)&aMPBIn1);
}
else if (j==1) {
- pMPB=((NMTTools_MapOfPaveBlock*)&aMPBOn1);
+ pMPB=((NMTTools_MapOfPaveBlock*)&aMPBOn1);
}
else if (j==2) {
- pMPB=((NMTTools_MapOfPaveBlock*)&aMPBIn2);
+ pMPB=((NMTTools_MapOfPaveBlock*)&aMPBIn2);
}
else if (j==3) {
- pMPB=((NMTTools_MapOfPaveBlock*)&aMPBOn2);
+ pMPB=((NMTTools_MapOfPaveBlock*)&aMPBOn2);
}
//
const NMTTools_MapOfPaveBlock& aMPB=*pMPB;
aItMPB.Initialize(aMPB);
for (; aItMPB.More(); aItMPB.Next()) {
- const BOPTools_PaveBlock& aPB=aItMPB.Key();
- if (aMPBX.Add(aPB)) {
- aLPB.Append(aPB);
- }
- //
- else {
- if (j>1) {
- aFFi.AppendBlock(aPB);
- }
- }
- //
+ const BOPTools_PaveBlock& aPB=aItMPB.Key();
+ if (aMPBX.Add(aPB)) {
+ aLPB.Append(aPB);
+ }
+ //
+ else {
+ if (j>1) {
+ aFFi.AppendBlock(aPB);
+ }
+ }
+ //
}
}
//
if (bIsExistingPaveBlock) {
continue;
}
- //
+ //
// Checking of validity in 2D
//
bIsValidIn2D=myContext->IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTol2D);
const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(i));
aItCB.Initialize(aLCB);
for (; aItCB.More(); aItCB.Next()) {
- const NMTTools_CommonBlock& aCB=aItCB.Value();
- const BOPTools_PaveBlock &aPB1=aCB.PaveBlock1();
- const TColStd_ListOfInteger& aLF=aCB.Faces();
- aNbF=aLF.Extent();
- if (!aNbF) {
- continue;
- }
- //
- aItF.Initialize(aLF);
- for (; aItF.More(); aItF.Next()) {
- nF=aItF.Value();
- if (!myFaceInfo.IsBound(nF)) {
- continue;
- }
- //
- NMTTools_FaceInfo& aFI=myFaceInfo.ChangeFind(nF);
- aFI.ChangePaveBlocksIn().Add(aPB1);
- //
- n1=aPB1.Pave1().Index();
- n2=aPB1.Pave2().Index();
- aFI.ChangeVerticesIn().Add(n1);
- aFI.ChangeVerticesIn().Add(n2);
- }
+ const NMTTools_CommonBlock& aCB=aItCB.Value();
+ const BOPTools_PaveBlock &aPB1=aCB.PaveBlock1();
+ const TColStd_ListOfInteger& aLF=aCB.Faces();
+ aNbF=aLF.Extent();
+ if (!aNbF) {
+ continue;
+ }
+ //
+ aItF.Initialize(aLF);
+ for (; aItF.More(); aItF.Next()) {
+ nF=aItF.Value();
+ if (!myFaceInfo.IsBound(nF)) {
+ continue;
+ }
+ //
+ NMTTools_FaceInfo& aFI=myFaceInfo.ChangeFind(nF);
+ aFI.ChangePaveBlocksIn().Add(aPB1);
+ //
+ n1=aPB1.Pave1().Index();
+ n2=aPB1.Pave2().Index();
+ aFI.ChangeVerticesIn().Add(n1);
+ aFI.ChangeVerticesIn().Add(n2);
+ }
}
}// if (aType==TopAbs_EDGE) {
else if (aType==TopAbs_FACE) {
if (!myFaceInfo.IsBound(i)) {
- continue;
+ continue;
}
//
BOPTools_ListOfPaveBlock aLPBOn;
//
anItPB.Initialize(aLPBOn);
for (; anItPB.More(); anItPB.Next()) {
- const BOPTools_PaveBlock &aPB=anItPB.Value();
- aFI.ChangePaveBlocksOn().Add(aPB);
- //
- n1=aPB.Pave1().Index();
- n2=aPB.Pave2().Index();
- aFI.ChangeVerticesOn().Add(n1);
- aFI.ChangeVerticesOn().Add(n2);
+ const BOPTools_PaveBlock &aPB=anItPB.Value();
+ aFI.ChangePaveBlocksOn().Add(aPB);
+ //
+ n1=aPB.Pave1().Index();
+ n2=aPB.Pave2().Index();
+ aFI.ChangeVerticesOn().Add(n1);
+ aFI.ChangeVerticesOn().Add(n2);
}
//
}// else if (aType==TopAbs_FACE) {
BOPTools_VSInterference& aVFj=aVFs(j);
aVFj.Indices(n1, n2);
if (nF==n1) {
- aFI.ChangeVerticesIn().Add(n2);
+ aFI.ChangeVerticesIn().Add(n2);
}
else if (nF==n2){
- aFI.ChangeVerticesIn().Add(n1);
+ aFI.ChangeVerticesIn().Add(n1);
}
}// for (j=1; j<=aNbVFs; ++j) {
//
BOPTools_ESInterference& aEFj=aEFs(j);
aEFj.Indices(n1, n2);
if (!(nF==n1 || nF==n2)) {
- continue;
+ continue;
}
//
nX=aEFj.NewShape();
if (nX<1) {
- continue;
+ continue;
}
//
aS=myDS->Shape(nX);
aType=aS.ShapeType();
if (aType!=TopAbs_VERTEX) {
- continue;
+ continue;
}
//
aFI.ChangeVerticesIn().Add(nX);
//
//=======================================================================
void NMTTools_PaveFiller::CorrectTolR3D(const BOPTools_SSInterference& aFF,
- const TColStd_MapOfInteger& aMVStick,
- Standard_Real& aTolR3D)
+ const TColStd_MapOfInteger& aMVStick,
+ Standard_Real& aTolR3D)
{
Standard_Boolean bHasBounds;
// purpose:
//=======================================================================
void NMTTools_PaveFiller::PutClosingPaveOnCurve(BOPTools_Curve& aBC,
- BOPTools_SSInterference& aFFi)
+ BOPTools_SSInterference& aFFi)
{
Standard_Boolean bIsClosed, bHasBounds, bAdded;
Standard_Integer nVC, j;
//
for (j=0; j<2; ++j) {
if (fabs(aTC-aT[j]) < dT) {
- aTx=(!j) ? aT[1] : aT[0];
- aPVx.SetIndex(nVC);
- aPVx.SetParam(aTx);
- //
- aCPS.Append(aPVx);
- aFFiPS.Append(aPVx);
- //
- bAdded=Standard_True;
- break;
+ aTx=(!j) ? aT[1] : aT[0];
+ aPVx.SetIndex(nVC);
+ aPVx.SetParam(aTx);
+ //
+ aCPS.Append(aPVx);
+ aFFiPS.Append(aPVx);
+ //
+ bAdded=Standard_True;
+ break;
}
}
}
void SortPaveBlocks(BOPTools_ListOfPaveBlock &);
static
void SortShell(const Standard_Integer,
- BOPTools_PaveBlock *);
+ BOPTools_PaveBlock *);
static
Standard_Boolean Less(const BOPTools_PaveBlock &,
- const BOPTools_PaveBlock &);
+ const BOPTools_PaveBlock &);
//=======================================================================
// function: RealSplitsInFace
for (; aItCB.More(); aItCB.Next()) {
NMTTools_CommonBlock& aCB=aItCB.ChangeValue();
if (aCB.IsPaveBlockOnFace(nF)) {
- const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1();
- nSpIn=aPB1.Edge();
- if (aMFence.Add(nSpIn)){
- aLPB.Append(aPB1);
- }
+ const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1();
+ nSpIn=aPB1.Edge();
+ if (aMFence.Add(nSpIn)){
+ aLPB.Append(aPB1);
+ }
}
}
}
//purpose :
//=======================================================================
void SortShell(const Standard_Integer n,
- BOPTools_PaveBlock *a)
+ BOPTools_PaveBlock *a)
{
Standard_Integer nd, i, j, l, d=1;
BOPTools_PaveBlock x;
l=j+d;
if (Less(a[l], a[j])) {
//if (a[l] < a[j]){
- x=a[j];
- a[j]=a[l];
- a[l]=x;
- j-=d;
- if (j > -1) goto m30;
+ x=a[j];
+ a[j]=a[l];
+ a[l]=x;
+ j-=d;
+ if (j > -1) goto m30;
}//if (a[l] < a[j]){
}//for (i=0; i<nd; ++i)
}//while (1)
//purpose :
//=======================================================================
Standard_Boolean Less(const BOPTools_PaveBlock &aPB1,
- const BOPTools_PaveBlock &aPB2)
+ const BOPTools_PaveBlock &aPB2)
{
Standard_Boolean bRet;
Standard_Integer iE1, iE2;
public:
Standard_EXPORT
static void MakeNewVertex(const TopTools_ListOfShape& aLV,
- TopoDS_Vertex& aNewVertex) ;
+ TopoDS_Vertex& aNewVertex) ;
Standard_EXPORT
static void FindChains(const BOPTools_CArray1OfVVInterference& aVVs,
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
+ BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
Standard_EXPORT
static void FindChains(const BOPTools_CArray1OfSSInterference& aVVs,
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
+ BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
Standard_EXPORT
static void FindChains(const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV,
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
+ BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ;
Standard_EXPORT
static Standard_Boolean IsSplitInOnFace(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- const Handle(IntTools_Context)& aCtx) ;
+ const TopoDS_Face& aF,
+ const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT
static Standard_Boolean AreFacesSameDomain(const TopoDS_Face& aF1,
- const TopoDS_Face& aF2,
- const Handle(IntTools_Context)& aCtx) ;
+ const TopoDS_Face& aF2,
+ const Handle(IntTools_Context)& aCtx) ;
Standard_EXPORT
static void FindChains(const NMTTools_ListOfCoupleOfShape& aLCS,
- NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM) ;
+ NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM) ;
Standard_EXPORT
static void FindChains(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM1,
- NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM2) ;
+ NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM2) ;
Standard_EXPORT
static void MakePCurve(const TopoDS_Edge& aE,
- const TopoDS_Face& aF,
- const Handle(Geom2d_Curve)& aC2D) ;
+ const TopoDS_Face& aF,
+ const Handle(Geom2d_Curve)& aC2D) ;
Standard_EXPORT
static void UpdateEdge(const TopoDS_Edge& aE,
- const Standard_Real aTol) ;
+ const Standard_Real aTol) ;
Standard_EXPORT
static Standard_Boolean IsDegenerated(const TopoDS_Edge &theEdge);
myTopLevel = Standard_False;
Graphic3d_MaterialAspect aMatAspect;
if ( !HasMaterial() ) {
- aMatAspect.SetAmbient( 0.5 );
- aMatAspect.SetDiffuse( 0.5 );
- aMatAspect.SetEmissive( 0.5 );
- aMatAspect.SetShininess(0.5 );
- aMatAspect.SetSpecular( 0.5 );
-
- myDrawer->ShadingAspect()->Aspect()->SetFrontMaterial(aMatAspect);
- myDrawer->ShadingAspect()->Aspect()->SetBackMaterial(aMatAspect);
+ aMatAspect.SetAmbient( 0.5 );
+ aMatAspect.SetDiffuse( 0.5 );
+ aMatAspect.SetEmissive( 0.5 );
+ aMatAspect.SetShininess(0.5 );
+ aMatAspect.SetSpecular( 0.5 );
+
+ myDrawer->ShadingAspect()->Aspect()->SetFrontMaterial(aMatAspect);
+ myDrawer->ShadingAspect()->Aspect()->SetBackMaterial(aMatAspect);
}
}
// Restore wireframe edges colors
restoreBoundaryColors();
if(isTopLev) {
- SetColor(topLevelColor());
- Handle(Prs3d_LineAspect) anAspect = Attributes()->WireAspect();
- anAspect->SetColor( topLevelColor() );
- Attributes()->SetWireAspect( anAspect );
+ SetColor(topLevelColor());
+ Handle(Prs3d_LineAspect) anAspect = Attributes()->WireAspect();
+ anAspect->SetColor( topLevelColor() );
+ Attributes()->SetWireAspect( anAspect );
}
StdPrs_WFDeflectionShape::Add(aPrs,myshape,myDrawer);
break;
case 3: //StdSelect_DM_HLR:
{
if(!isTopLev)
- AIS_TexturedShape::Compute(aPresentationManager, aPrs, aMode);
+ AIS_TexturedShape::Compute(aPresentationManager, aPrs, aMode);
else
- shadingMode(aPresentationManager, aPrs, AIS_Shaded);
+ shadingMode(aPresentationManager, aPrs, AIS_Shaded);
break;
}
}
}
void GEOM_AISShape::shadingMode(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
- const Handle(Prs3d_Presentation)& aPrs,
- const Standard_Integer aMode)
+ const Handle(Prs3d_Presentation)& aPrs,
+ const Standard_Integer aMode)
{
myDrawer->ShadingAspect()->Aspect()->SetDistinguishOn();
}
Standard_Boolean GEOM_AISShape::switchTopLevel() {
- return myTopLevelDm != TopShowAdditionalWActor;
+ return myTopLevelDm != TopShowAdditionalWActor;
}
Standard_Boolean GEOM_AISShape::toActivate() {
- return Standard_True;
+ return Standard_True;
}
const Standard_Integer aMode = 0) ;
virtual bool isShowVectors () { return myDisplayVectors; }
- virtual Standard_Boolean switchTopLevel();
- virtual Standard_Boolean toActivate();
+ virtual Standard_Boolean switchTopLevel();
+ virtual Standard_Boolean toActivate();
// Type management
//
void storeBoundaryColors();
- static Quantity_Color topLevelColor();
+ static Quantity_Color topLevelColor();
static void setTopLevelColor(const Quantity_Color c);
static TopLevelDispMode topLevelDisplayMode();
protected:
void shadingMode(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
- const Handle(Prs3d_Presentation)& aPrs,
- const Standard_Integer aMode);
+ const Handle(Prs3d_Presentation)& aPrs,
+ const Standard_Integer aMode);
void restoreBoundaryColors();
if ( theMode == (int)eShadingWithEdges ) {
// Coloring edges
myIsolatedEdgeActor->GetProperty()->SetColor(myEdgesInShadingColor[0],
- myEdgesInShadingColor[1],
- myEdgesInShadingColor[2]);
+ myEdgesInShadingColor[1],
+ myEdgesInShadingColor[2]);
myOneFaceEdgeActor->GetProperty()->SetColor(myEdgesInShadingColor[0],
- myEdgesInShadingColor[1],
- myEdgesInShadingColor[2]);
+ myEdgesInShadingColor[1],
+ myEdgesInShadingColor[2]);
mySharedEdgeActor->GetProperty()->SetColor(myEdgesInShadingColor[0],
- myEdgesInShadingColor[1],
- myEdgesInShadingColor[2]);
+ myEdgesInShadingColor[1],
+ myEdgesInShadingColor[2]);
}
else {
// Restore number of iso-lines
// Coloring edges
myIsolatedEdgeActor->GetProperty()->SetColor(myIsolatedEdgeColor[0],
- myIsolatedEdgeColor[1],
- myIsolatedEdgeColor[2]);
+ myIsolatedEdgeColor[1],
+ myIsolatedEdgeColor[2]);
mySharedEdgeActor->GetProperty()->SetColor(myIsolatedEdgeColor[0],
- myIsolatedEdgeColor[1],
- myIsolatedEdgeColor[2]);
+ myIsolatedEdgeColor[1],
+ myIsolatedEdgeColor[2]);
myOneFaceEdgeActor->GetProperty()->SetColor(myOneFaceEdgeColor[0],
- myOneFaceEdgeColor[1],
- myOneFaceEdgeColor[2]);
+ myOneFaceEdgeColor[1],
+ myOneFaceEdgeColor[2]);
}
VTKViewer_Actor::setDisplayMode(theMode);
void GEOM_Actor::SetShape (const TopoDS_Shape& theShape,
float theDeflection,
- bool theIsVector)
+ bool theIsVector)
{
myShape = theShape;
static GEOM_Actor* New();
void SetShape(const TopoDS_Shape& theShape,
- float theDeflection,
- bool theIsVector = false);
+ float theDeflection,
+ bool theIsVector = false);
void SetDeflection(float theDeflection);
float GetDeflection() const{ return myDeflection;}
GEOM_TopWireframeShape::GEOM_TopWireframeShape(const TopoDS_Shape& shape)
: SALOME_AISShape(shape)
{
- SetDisplayMode(AIS_WireFrame);
- Handle(Prs3d_IsoAspect) anAspect = Attributes()->UIsoAspect();
- anAspect->SetNumber( 0 );
- Attributes()->SetUIsoAspect( anAspect );
- anAspect = Attributes()->VIsoAspect();
- anAspect->SetNumber( 0 );
- Attributes()->SetVIsoAspect( anAspect );
+ SetDisplayMode(AIS_WireFrame);
+ Handle(Prs3d_IsoAspect) anAspect = Attributes()->UIsoAspect();
+ anAspect->SetNumber( 0 );
+ Attributes()->SetUIsoAspect( anAspect );
+ anAspect = Attributes()->VIsoAspect();
+ anAspect->SetNumber( 0 );
+ Attributes()->SetVIsoAspect( anAspect );
SetColor(GEOM_AISShape::topLevelColor());
}
}
Standard_Boolean GEOM_TopWireframeShape::toActivate() {
- return Standard_False;
+ return Standard_False;
}
Standard_Boolean GEOM_TopWireframeShape::switchTopLevel() {
- return Standard_True;
+ return Standard_True;
}
void GEOM_TopWireframeShape::setIO(const Handle(SALOME_InteractiveObject)& io){
Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
- void setIO(const Handle(SALOME_InteractiveObject)& io);
+ void setIO(const Handle(SALOME_InteractiveObject)& io);
protected:
static GEOM_VTKPropertyMaterial* New();
protected:
- bool Physical;
+ bool Physical;
};
#endif
const TopoDS_Face& aFace = TopoDS::Face(ex.Current());
Handle(Poly_Triangulation) aPoly = BRep_Tool::Triangulation(aFace,aLoc);
if(aPoly.IsNull()) {
- alreadymeshed = Standard_False;
- break;
+ alreadymeshed = Standard_False;
+ break;
}
}
Bnd_Box B;
BRepBndLib::Add(theShape, B);
if ( B.IsVoid() )
- return; // NPAL15983 (Bug when displaying empty groups)
+ return; // NPAL15983 (Bug when displaying empty groups)
Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
B.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
// moved from GEOM_AssemblyBuilder
OCC2VTK_EXPORT void MeshShape(const TopoDS_Shape theShape,
float& theDeflection,
- bool theForced = true);
+ bool theForced = true);
// moved from GEOM_Actor
OCC2VTK_EXPORT void SetShape(const TopoDS_Shape& theShape,
if (aSelList.Extent() == 0 && !myShape->_is_nil()) {
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
ObjectList list;
- list.push_back(myShape);
+ list.push_back(myShape);
selectObjects(list);
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
this, SLOT(SelectionIntoArgument()));
if (aSelList.Extent() == 0 && !myShape->_is_nil()) {
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
ObjectList list;
- list.push_back(myShape);
+ list.push_back(myShape);
selectObjects(list);
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
this, SLOT(SelectionIntoArgument()));
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
myGeomGUI->getApp()->selectionMgr()->clearSelected();
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
- this, SLOT(SelectionIntoArgument()));
+ this, SLOT(SelectionIntoArgument()));
}
}
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
myGeomGUI->getApp()->selectionMgr()->clearSelected();
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
- this, SLOT(SelectionIntoArgument()));
+ this, SLOT(SelectionIntoArgument()));
}
}
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
myGeomGUI->getApp()->selectionMgr()->clearSelected();
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
- this, SLOT(SelectionIntoArgument()));
+ this, SLOT(SelectionIntoArgument()));
if (myEditCurrentArgument == GroupPntVecR->LineEdit1) {
myPoint = aSelectedObject;
if (myPoint && !myDir)
- GroupPntVecR->PushButton2->click();
+ GroupPntVecR->PushButton2->click();
}
else if (myEditCurrentArgument == GroupPntVecR->LineEdit2) {
myDir = aSelectedObject;
if (myDir && !myPoint)
- GroupPntVecR->PushButton1->click();
+ GroupPntVecR->PushButton1->click();
}
else if (myEditCurrentArgument == Group3Pnts->LineEdit1) {
myPoint1 = aSelectedObject;
if (myPoint1 && !myPoint2)
- Group3Pnts->PushButton2->click();
+ Group3Pnts->PushButton2->click();
}
else if (myEditCurrentArgument == Group3Pnts->LineEdit2) {
myPoint2 = aSelectedObject;
if (myPoint2 && !myPoint3)
- Group3Pnts->PushButton3->click();
+ Group3Pnts->PushButton3->click();
}
else if (myEditCurrentArgument == Group3Pnts->LineEdit3) {
myPoint3 = aSelectedObject;
if (myPoint3 && !myPoint1)
- Group3Pnts->PushButton1->click();
+ Group3Pnts->PushButton1->click();
}
}
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
myGeomGUI->getApp()->selectionMgr()->clearSelected();
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
- this, SLOT(SelectionIntoArgument()));
+ this, SLOT(SelectionIntoArgument()));
if (myEditCurrentArgument == GroupPoints->LineEdit1) {
myPoint = aSelectedObject;
if (myPoint && !myDir)
- GroupPoints->PushButton2->click();
+ GroupPoints->PushButton2->click();
}
else if (myEditCurrentArgument == GroupPoints->LineEdit2) {
myDir = aSelectedObject;
if (myDir && !myPoint)
- GroupPoints->PushButton1->click();
+ GroupPoints->PushButton1->click();
}
}
}
// Retrieve default parameters for ALL operators
- for ( int i = 0; i < myOpList->count(); i++ ) {
- CORBA::String_var anOperator = CORBA::string_dup( myOpList->item( i )->text().toLatin1().constData() );
- anOp->GetOperatorParameters( anOperator.in(), aParams, aValues );
+ for ( int i = 0; i < myOpList->count(); i++ )
+ {
+ QString anOperator = myOpList->item( i )->text();
+ anOp->GetOperatorParameters( anOperator.toLatin1().constData(), aParams, aValues );
// set default values of parameters
if ( aParams->length() != aValues->length() )
anOperators->length( aCheckedList.count() );
for ( int i = 0; i < aCheckedList.count(); i++ )
- anOperators[i] = CORBA::string_dup( aCheckedList[i].toLatin1().constData() );
-
+ anOperators[i] = aCheckedList[i].toLatin1().constData();
+
return anOperators._retn();
}
virtual void initCommand() = 0;
virtual void addPoint( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y ) = 0;
+ const TCollection_AsciiString& y ) = 0;
virtual void addAngle( const TCollection_AsciiString& angle ) = 0;
virtual void addSegmentParalX( const TCollection_AsciiString& x ) = 0;
virtual void addSegmentParalXToZero() = 0;
virtual void addSegmentParalY( const TCollection_AsciiString& y ) = 0;
virtual void addSegmentParalYToZero() = 0;
virtual void addSegmentAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y ) = 0;
+ const TCollection_AsciiString& y ) = 0;
virtual void addSegmentRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy ) = 0;
+ const TCollection_AsciiString& dy ) = 0;
virtual void addSegmentLength( const TCollection_AsciiString& length ) = 0;
virtual void addSegmentX( const TCollection_AsciiString& x,
- int CurrentIndex ) = 0;
+ int CurrentIndex ) = 0;
virtual void addSegmentY( const TCollection_AsciiString& y,
- int CurrentIndex ) = 0;
+ int CurrentIndex ) = 0;
virtual void addSegmentAngleLength( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& length,
- int& CurrentIndex ) = 0;
+ const TCollection_AsciiString& length,
+ int& CurrentIndex ) = 0;
virtual void addSegmentAngleX( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& x,
- int& CurrentIndex ) = 0;
+ const TCollection_AsciiString& x,
+ int& CurrentIndex ) = 0;
virtual void addSegmentAngleY( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& y,
- int& CurrentIndex ) = 0;
+ const TCollection_AsciiString& y,
+ int& CurrentIndex ) = 0;
virtual void addSegmentDirectionLength( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& length,
- int& CurrentIndex ) = 0;
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& length,
+ int& CurrentIndex ) = 0;
virtual void addSegmentDirectionX( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& x,
- int& CurrentIndex ) = 0;
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& x,
+ int& CurrentIndex ) = 0;
virtual void addSegmentDirectionY( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& y,
- int& CurrentIndex ) = 0;
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& y,
+ int& CurrentIndex ) = 0;
virtual void addArcAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y ) = 0;
+ const TCollection_AsciiString& y ) = 0;
virtual void addArcRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy ) = 0;
+ const TCollection_AsciiString& dy ) = 0;
virtual void addArcRadiusAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& flag ) = 0;
+ const TCollection_AsciiString& y,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& flag ) = 0;
virtual void addArcRadiusRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& flag ) = 0;
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& flag ) = 0;
virtual void addArcCenterAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y,
- const TCollection_AsciiString& xc,
- const TCollection_AsciiString& yc,
- const TCollection_AsciiString& flag1,
- const TCollection_AsciiString& flag2 ) = 0;
+ const TCollection_AsciiString& y,
+ const TCollection_AsciiString& xc,
+ const TCollection_AsciiString& yc,
+ const TCollection_AsciiString& flag1,
+ const TCollection_AsciiString& flag2 ) = 0;
virtual void addArcCenterRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& xc,
- const TCollection_AsciiString& yc,
- const TCollection_AsciiString& flag1,
- const TCollection_AsciiString& flag2 ) = 0;
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& xc,
+ const TCollection_AsciiString& yc,
+ const TCollection_AsciiString& flag1,
+ const TCollection_AsciiString& flag2 ) = 0;
virtual void addArcRadiusLength( const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length ) = 0;
+ const TCollection_AsciiString& length ) = 0;
virtual void addArcAngleRadiusLength( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length ,
- int& CurrentIndex ) = 0;
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& length ,
+ int& CurrentIndex ) = 0;
virtual void addArcDirectionRadiusLength( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length ,
- int& CurrentIndex ) = 0;
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& length ,
+ int& CurrentIndex ) = 0;
virtual void closeWire() = 0;
virtual void closeWireAndBuildFace() = 0;
virtual void initCommand();
virtual void addPoint( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y );
+ const TCollection_AsciiString& y );
virtual void addAngle( const TCollection_AsciiString& angle );
virtual void addSegmentParalX( const TCollection_AsciiString& x );
virtual void addSegmentParalXToZero();
virtual void addSegmentParalYToZero();
virtual void setAngle( const TCollection_AsciiString& angle );
virtual void setDirection( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy );
+ const TCollection_AsciiString& dy );
virtual void addSegmentAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y );
+ const TCollection_AsciiString& y );
virtual void addSegmentRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy );
+ const TCollection_AsciiString& dy );
virtual void addSegmentLength( const TCollection_AsciiString& length );
virtual void addSegmentX( const TCollection_AsciiString& x,
- int CurrentIndex );
+ int CurrentIndex );
virtual void addSegmentY( const TCollection_AsciiString& y,
- int CurrentIndex );
+ int CurrentIndex );
virtual void addSegmentAngleLength( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& length,
- int& CurrentIndex );
+ const TCollection_AsciiString& length,
+ int& CurrentIndex );
virtual void addSegmentAngleX( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& x,
- int& CurrentIndex );
+ const TCollection_AsciiString& x,
+ int& CurrentIndex );
virtual void addSegmentAngleY( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& y,
- int& CurrentIndex );
+ const TCollection_AsciiString& y,
+ int& CurrentIndex );
virtual void addSegmentDirectionLength( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& length,
- int& CurrentIndex );
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& length,
+ int& CurrentIndex );
virtual void addSegmentDirectionX( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& x,
- int& CurrentIndex );
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& x,
+ int& CurrentIndex );
virtual void addSegmentDirectionY( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& y,
- int& CurrentIndex );
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& y,
+ int& CurrentIndex );
virtual void addArcAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y );
+ const TCollection_AsciiString& y );
virtual void addArcRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy );
+ const TCollection_AsciiString& dy );
virtual void addArcRadiusAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& flag );
+ const TCollection_AsciiString& y,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& flag );
virtual void addArcRadiusRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& flag );
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& flag );
virtual void addArcCenterAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y,
- const TCollection_AsciiString& xc,
- const TCollection_AsciiString& yc,
- const TCollection_AsciiString& flag1,
- const TCollection_AsciiString& flag2 );
+ const TCollection_AsciiString& y,
+ const TCollection_AsciiString& xc,
+ const TCollection_AsciiString& yc,
+ const TCollection_AsciiString& flag1,
+ const TCollection_AsciiString& flag2 );
virtual void addArcCenterRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& xc,
- const TCollection_AsciiString& yc,
- const TCollection_AsciiString& flag1,
- const TCollection_AsciiString& flag2 );
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& xc,
+ const TCollection_AsciiString& yc,
+ const TCollection_AsciiString& flag1,
+ const TCollection_AsciiString& flag2 );
virtual void addArcRadiusLength( const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length );
+ const TCollection_AsciiString& length );
virtual void addArcAngleRadiusLength( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length ,
- int& CurrentIndex );
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& length ,
+ int& CurrentIndex );
virtual void addArcDirectionRadiusLength( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length ,
- int& CurrentIndex );
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& length ,
+ int& CurrentIndex );
virtual void closeWire();
virtual void closeWireAndBuildFace();
virtual void initCommand();
virtual void addPoint( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y );
+ const TCollection_AsciiString& y );
virtual void addAngle( const TCollection_AsciiString& angle );
virtual void addSegmentParalX( const TCollection_AsciiString& x );
virtual void addSegmentParalXToZero();
virtual void addSegmentParalY( const TCollection_AsciiString& y );
virtual void addSegmentParalYToZero();
virtual void addSegmentAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y );
+ const TCollection_AsciiString& y );
virtual void addSegmentRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy );
+ const TCollection_AsciiString& dy );
virtual void addSegmentLength( const TCollection_AsciiString& length );
virtual void addSegmentX( const TCollection_AsciiString& x,
- int CurrentIndex );
+ int CurrentIndex );
virtual void addSegmentY( const TCollection_AsciiString& y,
- int CurrentIndex );
+ int CurrentIndex );
virtual void addSegmentAngleLength( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& length,
- int& CurrentIndex );
+ const TCollection_AsciiString& length,
+ int& CurrentIndex );
virtual void addSegmentAngleX( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& x,
- int& CurrentIndex );
+ const TCollection_AsciiString& x,
+ int& CurrentIndex );
virtual void addSegmentAngleY( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& y,
- int& CurrentIndex );
+ const TCollection_AsciiString& y,
+ int& CurrentIndex );
virtual void addSegmentDirectionLength( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& length,
- int& CurrentIndex );
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& length,
+ int& CurrentIndex );
virtual void addSegmentDirectionX( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& x,
- int& CurrentIndex );
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& x,
+ int& CurrentIndex );
virtual void addSegmentDirectionY( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& y,
- int& CurrentIndex );
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& y,
+ int& CurrentIndex );
virtual void addArcAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y );
+ const TCollection_AsciiString& y );
virtual void addArcRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy );
+ const TCollection_AsciiString& dy );
virtual void addArcRadiusAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& flag );
+ const TCollection_AsciiString& y,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& flag );
virtual void addArcRadiusRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& flag );
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& flag );
virtual void addArcCenterAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y,
- const TCollection_AsciiString& xc,
- const TCollection_AsciiString& yc,
- const TCollection_AsciiString& flag1,
- const TCollection_AsciiString& flag2 );
+ const TCollection_AsciiString& y,
+ const TCollection_AsciiString& xc,
+ const TCollection_AsciiString& yc,
+ const TCollection_AsciiString& flag1,
+ const TCollection_AsciiString& flag2 );
virtual void addArcCenterRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& xc,
- const TCollection_AsciiString& yc,
- const TCollection_AsciiString& flag1,
- const TCollection_AsciiString& flag2 );
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& xc,
+ const TCollection_AsciiString& yc,
+ const TCollection_AsciiString& flag1,
+ const TCollection_AsciiString& flag2 );
virtual void addArcRadiusLength( const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length );
+ const TCollection_AsciiString& length );
virtual void addArcAngleRadiusLength( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length ,
- int& CurrentIndex );
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& length ,
+ int& CurrentIndex );
virtual void addArcDirectionRadiusLength( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length ,
- int& CurrentIndex );
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& length ,
+ int& CurrentIndex );
virtual void closeWire();
virtual void closeWireAndBuildFace();
\internal
*/
void Sketcher_Profile::ShapeFunctor::addPoint( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y )
+ const TCollection_AsciiString& y )
{
if ( !myFirst ) {
MESSAGE("profile : The addPoint instruction must precede all moves");
\internal
*/
void Sketcher_Profile::ShapeFunctor::setDirection( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy )
+ const TCollection_AsciiString& dy )
{
Standard_Real vx = dx.RealValue();
Standard_Real vy = dy.RealValue();
\internal
*/
void Sketcher_Profile::ShapeFunctor::addSegmentAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y )
+ const TCollection_AsciiString& y )
{
Standard_Real vx = x.RealValue() - myX;
Standard_Real vy = y.RealValue() - myY;
\internal
*/
void Sketcher_Profile::ShapeFunctor::addSegmentRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy )
+ const TCollection_AsciiString& dy )
{
Standard_Real vx = dx.RealValue();
Standard_Real vy = dy.RealValue();
\internal
*/
void Sketcher_Profile::ShapeFunctor::addSegmentX( const TCollection_AsciiString& x,
- int CurrentIndex )
+ int CurrentIndex )
{
myLength = x.RealValue();
if ( Abs( myDx ) < Precision::Confusion() ) {
\internal
*/
void Sketcher_Profile::ShapeFunctor::addSegmentY( const TCollection_AsciiString& y,
- int CurrentIndex )
+ int CurrentIndex )
{
myLength = y.RealValue();
if ( Abs( myDy ) < Precision::Confusion() ) {
\internal
*/
void Sketcher_Profile::ShapeFunctor::addSegmentAngleLength( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& length,
- int& CurrentIndex )
+ const TCollection_AsciiString& length,
+ int& CurrentIndex )
{
setAngle( angle );
setMove( CurrentIndex );
\internal
*/
void Sketcher_Profile::ShapeFunctor::addSegmentAngleX( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& x,
- int& CurrentIndex )
+ const TCollection_AsciiString& x,
+ int& CurrentIndex )
{
setAngle( angle );
setMove( CurrentIndex );
\internal
*/
void Sketcher_Profile::ShapeFunctor::addSegmentAngleY( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& y,
- int& CurrentIndex )
+ const TCollection_AsciiString& y,
+ int& CurrentIndex )
{
setAngle( angle );
setMove( CurrentIndex );
\internal
*/
void Sketcher_Profile::ShapeFunctor::addSegmentDirectionLength( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& length,
- int& CurrentIndex )
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& length,
+ int& CurrentIndex )
{
setDirection( dx, dy );
setMove( CurrentIndex );
\internal
*/
void Sketcher_Profile::ShapeFunctor::addSegmentDirectionX( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& x,
- int& CurrentIndex )
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& x,
+ int& CurrentIndex )
{
setDirection( dx, dy );
setMove( CurrentIndex );
\internal
*/
void Sketcher_Profile::ShapeFunctor::addSegmentDirectionY( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& y,
- int& CurrentIndex )
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& y,
+ int& CurrentIndex )
{
setDirection( dx, dy );
setMove( CurrentIndex );
\internal
*/
void Sketcher_Profile::ShapeFunctor::addArcAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y )
+ const TCollection_AsciiString& y )
{
Standard_Real vx = x.RealValue() - myX;
Standard_Real vy = y.RealValue() - myY;
\internal
*/
void Sketcher_Profile::ShapeFunctor::addArcRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy )
+ const TCollection_AsciiString& dy )
{
Standard_Real vx = dx.RealValue();
Standard_Real vy = dy.RealValue();
\internal
*/
void Sketcher_Profile::ShapeFunctor::addArcRadiusAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& flag )
+ const TCollection_AsciiString& y,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& flag )
{
Standard_Real vx = x.RealValue() - myX;
Standard_Real vy = y.RealValue() - myY;
if ( reversed == 2 )
myAngle = myAngle - 2 * M_PI;
myDx = 0.5 * ( vy * 1.0 / myRadius
- + vx * Sqrt( 4.0 / ( vx * vx + vy * vy ) - 1.0 / ( myRadius * myRadius ) ) );
+ + vx * Sqrt( 4.0 / ( vx * vx + vy * vy ) - 1.0 / ( myRadius * myRadius ) ) );
myDy = -0.5 * ( vx * 1.0 / myRadius
- - vy * Sqrt( 4.0 / ( vx * vx + vy * vy ) - 1.0 / ( myRadius * myRadius ) ) );
+ - vy * Sqrt( 4.0 / ( vx * vx + vy * vy ) - 1.0 / ( myRadius * myRadius ) ) );
myMove = circle;
}
else {
\internal
*/
void Sketcher_Profile::ShapeFunctor::addArcRadiusRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& flag )
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& flag )
{
Standard_Real vx = dx.RealValue();
Standard_Real vy = dy.RealValue();
if ( reversed == 2 )
myAngle = myAngle - 2 * M_PI;
myDx = 0.5 * ( vy * 1.0 / myRadius
- + vx * Sqrt( 4.0 / ( vx * vx + vy * vy ) - 1.0 / ( myRadius * myRadius ) ) );
+ + vx * Sqrt( 4.0 / ( vx * vx + vy * vy ) - 1.0 / ( myRadius * myRadius ) ) );
myDy = -0.5 * ( vx * 1.0 / myRadius
- - vy * Sqrt( 4.0 / ( vx * vx + vy * vy ) - 1.0 / ( myRadius * myRadius ) ) );
+ - vy * Sqrt( 4.0 / ( vx * vx + vy * vy ) - 1.0 / ( myRadius * myRadius ) ) );
myMove = circle;
}
else {
\internal
*/
void Sketcher_Profile::ShapeFunctor::addArcCenterAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y,
- const TCollection_AsciiString& xc,
- const TCollection_AsciiString& yc,
- const TCollection_AsciiString& flag1,
- const TCollection_AsciiString& flag2 )
+ const TCollection_AsciiString& y,
+ const TCollection_AsciiString& xc,
+ const TCollection_AsciiString& yc,
+ const TCollection_AsciiString& flag1,
+ const TCollection_AsciiString& flag2 )
{
Standard_Real vx = x.RealValue() - myX;
Standard_Real vy = y.RealValue() - myY;
if ( error > Precision::Confusion() && control_Tolerance == 1 ) // Don't create the arc if the end point
myMove = none; // is too far from it
else if ( ( length > Precision::Confusion() ) &&
- ( length2 > Precision::Confusion() ) &&
- ( length3 > Precision::Confusion() ) ) {
+ ( length2 > Precision::Confusion() ) &&
+ ( length3 > Precision::Confusion() ) ) {
Standard_Real c = ( myRadius * myRadius - ( vx * vxc + vy * vyc ) )
/ ( myRadius * Sqrt( ( vx - vxc ) * ( vx - vxc ) + ( vy - vyc ) * ( vy - vyc ) ) ) ; // Cosine of arc angle
myAngle = acos(c); // angle in [0,Pi]
\internal
*/
void Sketcher_Profile::ShapeFunctor::addArcCenterRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& xc,
- const TCollection_AsciiString& yc,
- const TCollection_AsciiString& flag1,
- const TCollection_AsciiString& flag2 )
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& xc,
+ const TCollection_AsciiString& yc,
+ const TCollection_AsciiString& flag1,
+ const TCollection_AsciiString& flag2 )
{
Standard_Real vx = dx.RealValue();
Standard_Real vy = dy.RealValue();
if ( error > Precision::Confusion() && control_Tolerance == 1 ) // Don't create the arc if the end point
myMove = none; // is too far from it
else if ( ( length > Precision::Confusion() ) &&
- ( length2 > Precision::Confusion() ) &&
- ( length3 > Precision::Confusion() ) ) {
+ ( length2 > Precision::Confusion() ) &&
+ ( length3 > Precision::Confusion() ) ) {
Standard_Real c = ( myRadius * myRadius - ( vx * vxc + vy * vyc ) )
/ ( myRadius * Sqrt( ( vx - vxc ) * ( vx - vxc ) + ( vy - vyc ) * ( vy - vyc ) ) ) ; // Cosine of arc angle
myAngle = acos( c ); // angle in [0,Pi]
\internal
*/
void Sketcher_Profile::ShapeFunctor::addArcRadiusLength( const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length )
+ const TCollection_AsciiString& length )
{
myRadius = radius.RealValue();
if ( Abs( myRadius ) > Precision::Confusion() ) {
\internal
*/
void Sketcher_Profile::ShapeFunctor::addArcAngleRadiusLength( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length ,
- int& CurrentIndex )
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& length ,
+ int& CurrentIndex )
{
setAngle( angle );
setMove( CurrentIndex );
\internal
*/
void Sketcher_Profile::ShapeFunctor::addArcDirectionRadiusLength( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length ,
- int& CurrentIndex )
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& length ,
+ int& CurrentIndex )
{
setDirection( dx, dy );
setMove( CurrentIndex );
case line :
{
if ( myLength < 0 ) {
- myLength = -myLength;
- myDx = -myDx;
- myDy = -myDy;
+ myLength = -myLength;
+ myDx = -myDx;
+ myDy = -myDy;
}
Handle(Geom2d_Line) l = new Geom2d_Line( gp_Pnt2d( myX, myY ),gp_Dir2d( myDx, myDy ) );
BRepBuilderAPI_MakeEdge ME( GeomAPI::To3d( l, myPlane ), 0, myLength );
if ( !ME.IsDone() )
- return;
+ return;
myMakeWire.Add( ME );
myX += myLength * myDx;
myY += myLength * myDy;
{
Standard_Boolean sense = Standard_True;
if ( myRadius < 0 ) {
- myRadius = -myRadius;
- sense = !sense;
- myDx = -myDx;
- myDy = -myDy;
+ myRadius = -myRadius;
+ sense = !sense;
+ myDx = -myDx;
+ myDy = -myDy;
}
gp_Ax2d ax( gp_Pnt2d( myX - myRadius * myDy, myY + myRadius * myDx ), gp_Dir2d( myDy, -myDx ) );
if ( myAngle < 0 ) {
- myAngle = -myAngle;
- sense = !sense;
+ myAngle = -myAngle;
+ sense = !sense;
}
Handle(Geom2d_Circle) c = new Geom2d_Circle( ax, myRadius, sense );
BRepBuilderAPI_MakeEdge ME( GeomAPI::To3d( c, myPlane ), 0, myAngle );
if ( !ME.IsDone() )
- return;
+ return;
myMakeWire.Add( ME );
gp_Pnt2d p;
gp_Vec2d v;
\internal
*/
void Sketcher_Profile::DumpFunctor::addPoint( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y )
+ const TCollection_AsciiString& y )
{
myDescr += "sk.addPoint(";
myDescr += x + ", " + y + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addSegmentAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y )
+ const TCollection_AsciiString& y )
{
myDescr += "sk.addSegmentAbsolute(";
myDescr += x + ", " + y + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addSegmentRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy )
+ const TCollection_AsciiString& dy )
{
myDescr += "sk.addSegmentRelative(";
myDescr += dx + ", " + dy + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addSegmentX( const TCollection_AsciiString& x,
- int CurrentIndex )
+ int CurrentIndex )
{
myDescr += "sk.addSegmentX(";
myDescr += x + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addSegmentY( const TCollection_AsciiString& y,
- int CurrentIndex )
+ int CurrentIndex )
{
myDescr += "sk.addSegmentY(";
myDescr += y + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addSegmentAngleLength( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& length,
- int& CurrentIndex )
+ const TCollection_AsciiString& length,
+ int& CurrentIndex )
{
double aAngle = angle.RealValue();
if ( aAngle == 90 ) {
\internal
*/
void Sketcher_Profile::DumpFunctor::addSegmentAngleX( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& x,
- int& CurrentIndex )
+ const TCollection_AsciiString& x,
+ int& CurrentIndex )
{
double aAngle = angle.RealValue();
if ( aAngle == 90 ) {
\internal
*/
void Sketcher_Profile::DumpFunctor::addSegmentAngleY( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& y,
- int& CurrentIndex )
+ const TCollection_AsciiString& y,
+ int& CurrentIndex )
{
double aAngle = angle.RealValue();
if ( aAngle == 90 ) {
\internal
*/
void Sketcher_Profile::DumpFunctor::addSegmentDirectionLength( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& length,
- int& CurrentIndex )
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& length,
+ int& CurrentIndex )
{
myDescr += "sk.addSegmentDirectionLength(";
myDescr += dx + ", " + dy + ", " + length + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addSegmentDirectionX( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& x,
- int& CurrentIndex )
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& x,
+ int& CurrentIndex )
{
myDescr += "sk.addSegmentDirectionX(";
myDescr += dx + ", " + dy + ", " + x + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addSegmentDirectionY( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& y,
- int& CurrentIndex )
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& y,
+ int& CurrentIndex )
{
myDescr += "sk.addSegmentDirectionY(";
myDescr += dx + ", " + dy + ", " + y + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addArcAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y )
+ const TCollection_AsciiString& y )
{
myDescr += "sk.addArcAbsolute(";
myDescr += x + ", " + y + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addArcRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy )
+ const TCollection_AsciiString& dy )
{
myDescr += "sk.addArcRelative(";
myDescr += dx + ", " + dy + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addArcRadiusAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& flag )
+ const TCollection_AsciiString& y,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& flag )
{
myDescr += "sk.addArcRadiusAbsolute(";
myDescr += x + ", " + y + ", " + radius + ", " + flag + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addArcRadiusRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& flag )
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& flag )
{
myDescr += "sk.addArcRadiusRelative(";
myDescr += dx + ", " + dy + ", " + radius + ", " + flag + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addArcCenterAbsolute( const TCollection_AsciiString& x,
- const TCollection_AsciiString& y,
- const TCollection_AsciiString& xc,
- const TCollection_AsciiString& yc,
- const TCollection_AsciiString& flag1,
- const TCollection_AsciiString& flag2 )
+ const TCollection_AsciiString& y,
+ const TCollection_AsciiString& xc,
+ const TCollection_AsciiString& yc,
+ const TCollection_AsciiString& flag1,
+ const TCollection_AsciiString& flag2 )
{
myDescr += "sk.addArcCenterAbsolute(";
myDescr += xc + ", " + yc + ", " + x + ", " + y + ", " + flag1 + ", " + flag2 + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addArcCenterRelative( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& xc,
- const TCollection_AsciiString& yc,
- const TCollection_AsciiString& flag1,
- const TCollection_AsciiString& flag2 )
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& xc,
+ const TCollection_AsciiString& yc,
+ const TCollection_AsciiString& flag1,
+ const TCollection_AsciiString& flag2 )
{
myDescr += "sk.addArcCenterRelative(";
myDescr += xc + ", " + yc + ", " + dx + ", " + dy + ", " + flag1 + ", " + flag2 + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addArcRadiusLength( const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length )
+ const TCollection_AsciiString& length )
{
myDescr += "sk.addArcRadiusLength(";
myDescr += radius + ", " + length + ")";
\internal
*/
void Sketcher_Profile::DumpFunctor::addArcAngleRadiusLength( const TCollection_AsciiString& angle,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length ,
- int& CurrentIndex )
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& length ,
+ int& CurrentIndex )
{
double aAngle = angle.RealValue();
if ( aAngle == 90 ) {
\internal
*/
void Sketcher_Profile::DumpFunctor::addArcDirectionRadiusLength( const TCollection_AsciiString& dx,
- const TCollection_AsciiString& dy,
- const TCollection_AsciiString& radius,
- const TCollection_AsciiString& length ,
- int& CurrentIndex )
+ const TCollection_AsciiString& dy,
+ const TCollection_AsciiString& radius,
+ const TCollection_AsciiString& length ,
+ int& CurrentIndex )
{
myDescr += "sk.addArcDirectionRadiusLength(";
myDescr += dx + ", " + dy + ", " + radius + ", " + length + ")";
while ( aToken.Length() != 0 ) {
TCollection_AsciiString aNewToken = command.Token( ":", NumberOfCommand + 1 );
if ( aNewToken.Length() > 0 )
- aTab( NumberOfCommand ) = aNewToken;
+ aTab( NumberOfCommand ) = aNewToken;
aToken = command.Token( ":", ++NumberOfCommand );
}
--NumberOfCommand;
TColStd_Array1OfAsciiString a( 0, aTab( 0 ).Length() );
findNextCommand( aTab, a, CurrentIndex, NumberOfArg );
if ( a( 0 ) == "F" ) {
- if ( NumberOfArg != 3 ) badArgs();
- functor->addPoint( a.Value( 1 ), a.Value( 2 ) );
+ if ( NumberOfArg != 3 ) badArgs();
+ functor->addPoint( a.Value( 1 ), a.Value( 2 ) );
}
else if ( a( 0 ) == "X" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addSegmentParalX( a.Value( 1 ) );
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addSegmentParalX( a.Value( 1 ) );
}
else if ( a( 0 ) == "XX" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addSegmentParalXToZero();
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addSegmentParalXToZero();
}
else if ( a( 0 ) == "Y" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addSegmentParalY( a.Value( 1 ) );
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addSegmentParalY( a.Value( 1 ) );
}
else if ( a( 0 ) == "YY" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addSegmentParalYToZero();
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addSegmentParalYToZero();
}
else if ( a( 0 ) == "RR" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addAngle( a.Value( 1 ) );
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addAngle( a.Value( 1 ) );
}
else if ( a( 0 ) == "TT" ) {
- if ( NumberOfArg != 3 ) badArgs();
- functor->addSegmentAbsolute( a.Value( 1 ), a.Value( 2 ) );
+ if ( NumberOfArg != 3 ) badArgs();
+ functor->addSegmentAbsolute( a.Value( 1 ), a.Value( 2 ) );
}
else if ( a( 0 ) == "T" ) {
- if ( NumberOfArg != 3 ) badArgs();
- functor->addSegmentRelative( a.Value( 1 ), a.Value( 2 ) );
+ if ( NumberOfArg != 3 ) badArgs();
+ functor->addSegmentRelative( a.Value( 1 ), a.Value( 2 ) );
}
else if ( a( 0 ) == "L" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addSegmentLength( a.Value( 1 ) );
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addSegmentLength( a.Value( 1 ) );
}
else if ( a( 0 ) == "IX" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addSegmentX( a.Value( 1 ), CurrentIndex );
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addSegmentX( a.Value( 1 ), CurrentIndex );
}
else if ( a( 0 ) == "IY" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addSegmentY( a.Value( 1 ), CurrentIndex );
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addSegmentY( a.Value( 1 ), CurrentIndex );
}
- else if ( a( 0 ) == "R" ) {
- if ( NumberOfArg != 2) badArgs();
- CurrentIndex++;
- TColStd_Array1OfAsciiString aNew( 0, aTab( 0 ).Length() );
- findNextCommand( aTab, aNew, CurrentIndex, NumberOfArg );
- if ( aNew( 0 ) == "L" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addSegmentAngleLength( a.Value( 1 ), aNew.Value( 1 ), CurrentIndex );
- }
- else if ( aNew( 0 ) == "IX" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addSegmentAngleX( a.Value( 1 ), aNew.Value( 1 ), CurrentIndex );
- }
- else if ( aNew( 0 ) == "IY" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addSegmentAngleY( a.Value( 1 ), aNew.Value( 1 ), CurrentIndex );
- }
- else if ( aNew( 0 ) == "C" ) {
- if ( NumberOfArg != 3 ) badArgs();
- functor->addArcAngleRadiusLength( a.Value( 1 ), aNew.Value( 1 ), aNew.Value( 2 ), CurrentIndex );
- }
+ else if ( a( 0 ) == "R" ) {
+ if ( NumberOfArg != 2) badArgs();
+ CurrentIndex++;
+ TColStd_Array1OfAsciiString aNew( 0, aTab( 0 ).Length() );
+ findNextCommand( aTab, aNew, CurrentIndex, NumberOfArg );
+ if ( aNew( 0 ) == "L" ) {
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addSegmentAngleLength( a.Value( 1 ), aNew.Value( 1 ), CurrentIndex );
+ }
+ else if ( aNew( 0 ) == "IX" ) {
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addSegmentAngleX( a.Value( 1 ), aNew.Value( 1 ), CurrentIndex );
+ }
+ else if ( aNew( 0 ) == "IY" ) {
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addSegmentAngleY( a.Value( 1 ), aNew.Value( 1 ), CurrentIndex );
+ }
+ else if ( aNew( 0 ) == "C" ) {
+ if ( NumberOfArg != 3 ) badArgs();
+ functor->addArcAngleRadiusLength( a.Value( 1 ), aNew.Value( 1 ), aNew.Value( 2 ), CurrentIndex );
+ }
}
- else if ( a( 0 ) == "D" ) {
- if ( NumberOfArg != 3 ) badArgs();
- CurrentIndex++;
- TColStd_Array1OfAsciiString aNew ( 0, aTab( 0 ).Length() );
- findNextCommand( aTab, aNew, CurrentIndex, NumberOfArg );
- if ( aNew( 0 ) == "L" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addSegmentDirectionLength( a.Value( 1 ), a.Value( 2 ), aNew.Value( 1 ), CurrentIndex );
- }
- else if ( aNew( 0 ) == "IX" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addSegmentDirectionX( a.Value( 1 ), a.Value( 2 ), aNew.Value( 1 ), CurrentIndex );
- }
- else if ( aNew( 0 ) == "IY" ) {
- if ( NumberOfArg != 2 ) badArgs();
- functor->addSegmentDirectionY( a.Value( 1 ), a.Value( 2 ), aNew.Value( 1 ), CurrentIndex );
- }
- else if ( aNew( 0 ) == "C" ) {
- if ( NumberOfArg != 3 ) badArgs();
- functor->addArcDirectionRadiusLength( a.Value( 1 ), a.Value( 2 ), aNew.Value( 1 ), aNew.Value( 2 ), CurrentIndex );
- }
+ else if ( a( 0 ) == "D" ) {
+ if ( NumberOfArg != 3 ) badArgs();
+ CurrentIndex++;
+ TColStd_Array1OfAsciiString aNew ( 0, aTab( 0 ).Length() );
+ findNextCommand( aTab, aNew, CurrentIndex, NumberOfArg );
+ if ( aNew( 0 ) == "L" ) {
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addSegmentDirectionLength( a.Value( 1 ), a.Value( 2 ), aNew.Value( 1 ), CurrentIndex );
+ }
+ else if ( aNew( 0 ) == "IX" ) {
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addSegmentDirectionX( a.Value( 1 ), a.Value( 2 ), aNew.Value( 1 ), CurrentIndex );
+ }
+ else if ( aNew( 0 ) == "IY" ) {
+ if ( NumberOfArg != 2 ) badArgs();
+ functor->addSegmentDirectionY( a.Value( 1 ), a.Value( 2 ), aNew.Value( 1 ), CurrentIndex );
+ }
+ else if ( aNew( 0 ) == "C" ) {
+ if ( NumberOfArg != 3 ) badArgs();
+ functor->addArcDirectionRadiusLength( a.Value( 1 ), a.Value( 2 ), aNew.Value( 1 ), aNew.Value( 2 ), CurrentIndex );
+ }
}
else if ( a( 0 ) == "AA" ) {
- if ( NumberOfArg != 3 ) badArgs();
- functor->addArcAbsolute( a.Value( 1 ), a.Value( 2 ) );
+ if ( NumberOfArg != 3 ) badArgs();
+ functor->addArcAbsolute( a.Value( 1 ), a.Value( 2 ) );
}
else if ( a( 0 ) == "A" ) {
- if ( NumberOfArg != 3 ) badArgs();
- functor->addArcRelative( a.Value( 1 ), a.Value( 2 ) );
+ if ( NumberOfArg != 3 ) badArgs();
+ functor->addArcRelative( a.Value( 1 ), a.Value( 2 ) );
}
else if ( a( 0 ) == "UU" ) {
- if ( NumberOfArg != 5 ) badArgs();
- functor->addArcRadiusAbsolute( a.Value( 1 ), a.Value( 2 ), a.Value( 3 ), a.Value( 4 ) );
+ if ( NumberOfArg != 5 ) badArgs();
+ functor->addArcRadiusAbsolute( a.Value( 1 ), a.Value( 2 ), a.Value( 3 ), a.Value( 4 ) );
}
else if ( a( 0 ) == "U" ) {
- if ( NumberOfArg != 5 ) badArgs();
- functor->addArcRadiusRelative( a.Value( 1 ), a.Value( 2 ), a.Value( 3 ), a.Value( 4 ) );
+ if ( NumberOfArg != 5 ) badArgs();
+ functor->addArcRadiusRelative( a.Value( 1 ), a.Value( 2 ), a.Value( 3 ), a.Value( 4 ) );
}
else if ( a( 0 ) == "EE" ) {
- if ( NumberOfArg != 7 ) badArgs();
- functor->addArcCenterAbsolute( a.Value( 1 ), a.Value( 2 ), a.Value( 3 ), a.Value( 4 ), a.Value( 5 ), a.Value( 6 ) );
+ if ( NumberOfArg != 7 ) badArgs();
+ functor->addArcCenterAbsolute( a.Value( 1 ), a.Value( 2 ), a.Value( 3 ), a.Value( 4 ), a.Value( 5 ), a.Value( 6 ) );
}
else if ( a( 0 ) == "E" ) {
- if ( NumberOfArg != 7 ) badArgs();
- functor->addArcCenterRelative( a.Value( 1 ), a.Value( 2 ), a.Value( 3 ), a.Value( 4 ), a.Value( 5 ), a.Value( 6 ) );
+ if ( NumberOfArg != 7 ) badArgs();
+ functor->addArcCenterRelative( a.Value( 1 ), a.Value( 2 ), a.Value( 3 ), a.Value( 4 ), a.Value( 5 ), a.Value( 6 ) );
}
else if ( a( 0 ) == "C" ) {
- if ( NumberOfArg != 3 ) badArgs();
- functor->addArcRadiusLength( a.Value( 1 ), a.Value( 2 ) );
+ if ( NumberOfArg != 3 ) badArgs();
+ functor->addArcRadiusLength( a.Value( 1 ), a.Value( 2 ) );
}
else if ( a( 0 ) == "WW" ) {
- functor->closeWire();
- CurrentIndex = NumberOfCommand - 1;
+ functor->closeWire();
+ CurrentIndex = NumberOfCommand - 1;
}
else if ( a( 0 ) == "WF" ) {
- functor->closeWireAndBuildFace();
- CurrentIndex = NumberOfCommand - 1;
+ functor->closeWireAndBuildFace();
+ CurrentIndex = NumberOfCommand - 1;
}
else {
- MESSAGE("profile : unknown code " << a(CurrentIndex));
- return;
+ MESSAGE("profile : unknown code " << a(CurrentIndex));
+ return;
}
functor->nextCommand( CurrentIndex );
}
\internal
*/
void Sketcher_Profile::findNextCommand( const TColStd_Array1OfAsciiString& aTab,
- TColStd_Array1OfAsciiString& a, int CurrentIndex,
- int& NumberOfArg)
+ TColStd_Array1OfAsciiString& a, int CurrentIndex,
+ int& NumberOfArg)
{
int n1 = 0;
TCollection_AsciiString aToken = aTab(CurrentIndex).Token(" ", 1);
TColStd_SequenceOfAsciiString anUnitSolidAngleNames;
aReader.FileUnits(anUnitLengthNames, anUnitAngleNames, anUnitSolidAngleNames);
if (anUnitLengthNames.Length() > 0) {
- aValue = new TCollection_HAsciiString( anUnitLengthNames.First() );
- /*
+ aValue = new TCollection_HAsciiString( anUnitLengthNames.First() );
+ /*
TCollection_AsciiString aLenUnits = anUnitLengthNames.First();
if (aLenUnits == "millimetre")
aValue = new TCollection_HAsciiString ("MM");
// std::cout << ", " << anUnitLengthNames.Value(ii);
//std::cout << std::endl;
// tmp end
- */
+ */
}
}
else {
if (SALOME_View* view = dynamic_cast<SALOME_View*>(vmodel)) {
if (view->isVisible(io)) {
aDisp.Erase(io, true, false, view);
- getGeometryGUI()->GetShapeReader().RemoveShapeFromBuffer( getGeometryGUI()->getApp()->orb()->object_to_string( aGeomObj.in() ) );
+ getGeometryGUI()->GetShapeReader().RemoveShapeFromBuffer( getGeometryGUI()->getApp()->orb()->object_to_string( aGeomObj.in() ) );
aDisp.Display(io, true, view);
}
// ? Redisplay subshapes ?
myEditCurrentArgument->setText( aName );
myArgument = aSelectedObject;
if ( myObjects.isEmpty() )
- GroupPoints->PushButton1->click();
+ GroupPoints->PushButton1->click();
}
else {
if ( myEditCurrentArgument == GroupPoints->LineEdit2 )
- myArgument.nullify();
+ myArgument.nullify();
myEditCurrentArgument->setText("");
}
}
}
if ( !myVector )
- GroupArgs->PushButton2->click();
+ GroupArgs->PushButton2->click();
}
else if ( myEditCurrentArgument == GroupArgs->LineEdit2 ) {
myVector = aSelectedObject;
if ( !myBase )
- GroupArgs->PushButton1->click();
+ GroupArgs->PushButton1->click();
}
// clear selection
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
myGeomGUI->getApp()->selectionMgr()->clearSelected();
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
- this, SLOT(SelectionIntoArgument()));
+ this, SLOT(SelectionIntoArgument()));
}
else {
if ( myEditCurrentArgument == GroupArgs->LineEdit1 )
erasePreview();
TopAbs_ShapeEnum aNeedType = ( myEditCurrentArgument == GroupPoints->LineEdit2 ||
- myEditCurrentArgument == GroupDimensions->LineEdit2 ||
- myEditCurrentArgument == GroupDimensions->LineEdit3 ) ?
+ myEditCurrentArgument == GroupDimensions->LineEdit2 ||
+ myEditCurrentArgument == GroupDimensions->LineEdit3 ) ?
TopAbs_EDGE : TopAbs_SHAPE;
GEOM::GeomObjPtr aSelectedObject = getSelected( aNeedType );
TopoDS_Shape aShape;
}
if (!myVectorU)
- GroupPoints->PushButton2->click();
+ GroupPoints->PushButton2->click();
}
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
myVectorU = aSelectedObject;
if ( !myBase )
- GroupPoints->PushButton1->click();
+ GroupPoints->PushButton1->click();
}
else if ( myEditCurrentArgument == GroupDimensions->LineEdit1 ) {
myBase = aSelectedObject;
}
if ( !myVectorU )
- GroupDimensions->PushButton2->click();
+ GroupDimensions->PushButton2->click();
else if ( !myVectorV )
- GroupDimensions->PushButton3->click();
+ GroupDimensions->PushButton3->click();
}
else if ( myEditCurrentArgument == GroupDimensions->LineEdit2 ) {
myVectorU = aSelectedObject;
if ( !myVectorV )
- GroupDimensions->PushButton3->click();
+ GroupDimensions->PushButton3->click();
else if ( !myBase )
- GroupDimensions->PushButton1->click();
+ GroupDimensions->PushButton1->click();
}
else if ( myEditCurrentArgument == GroupDimensions->LineEdit3 ) {
myVectorV = aSelectedObject;
if ( !myBase )
- GroupDimensions->PushButton1->click();
+ GroupDimensions->PushButton1->click();
else if ( !myVectorU )
- GroupDimensions->PushButton2->click();
+ GroupDimensions->PushButton2->click();
}
// clear selection
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
myGeomGUI->getApp()->selectionMgr()->clearSelected();
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
- this, SLOT(SelectionIntoArgument()));
+ this, SLOT(SelectionIntoArgument()));
}
else {
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ||
- myEditCurrentArgument == GroupDimensions->LineEdit1 )
+ myEditCurrentArgument == GroupDimensions->LineEdit1 )
myBase.nullify();
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ||
- myEditCurrentArgument == GroupDimensions->LineEdit2 )
+ myEditCurrentArgument == GroupDimensions->LineEdit2 )
myVectorU.nullify();
else if ( myEditCurrentArgument == GroupDimensions->LineEdit3 )
myVectorV.nullify();
myEditCurrentArgument->setText( aName );
myPath = aSelectedObject;
if ( myObjects.isEmpty() )
- Group1->PushButton1->click();
+ Group1->PushButton1->click();
}
else {
myPath.nullify();
QString aName = GEOMBase::GetName( aSelectedObject.get() );
myEditCurrentArgument->setText( aName );
if ( myEditCurrentArgument == Group1->LineEdit2 ) {
- myStartLCS = aSelectedObject;
- if ( !myEndLCS )
- Group1->PushButton4->click();
- else if ( myObjects.isEmpty() )
- Group1->PushButton1->click();
+ myStartLCS = aSelectedObject;
+ if ( !myEndLCS )
+ Group1->PushButton4->click();
+ else if ( myObjects.isEmpty() )
+ Group1->PushButton1->click();
}
else if ( myEditCurrentArgument == Group1->LineEdit4 ) {
- myEndLCS = aSelectedObject;
- if ( myObjects.isEmpty() )
- Group1->PushButton1->click();
- else if ( getConstructorId() == 1 && !myStartLCS )
- Group1->PushButton2->click();
+ myEndLCS = aSelectedObject;
+ if ( myObjects.isEmpty() )
+ Group1->PushButton1->click();
+ else if ( getConstructorId() == 1 && !myStartLCS )
+ Group1->PushButton2->click();
}
}
else {
if ( myEditCurrentArgument == Group1->LineEdit2 )
- myStartLCS.nullify();
+ myStartLCS.nullify();
else if ( myEditCurrentArgument == Group1->LineEdit4 )
- myEndLCS.nullify();
+ myEndLCS.nullify();
}
}
QString aName = GEOMBase::GetName( aSelectedObject.get() );
myEditCurrentArgument->setText( aName );
if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
- if ( getConstructorId() == 0 ) {
- myAxis = aSelectedObject;
- if ( myObjects.isEmpty() )
- GroupPoints->PushButton1->click();
- }
- else if ( getConstructorId() == 1 ) {
- myCentPoint = aSelectedObject;
- if ( !myPoint1 )
- GroupPoints->PushButton4->click();
- else if ( !myPoint2 )
- GroupPoints->PushButton5->click();
- else if ( myObjects.isEmpty() )
- GroupPoints->PushButton1->click();
- }
+ if ( getConstructorId() == 0 ) {
+ myAxis = aSelectedObject;
+ if ( myObjects.isEmpty() )
+ GroupPoints->PushButton1->click();
+ }
+ else if ( getConstructorId() == 1 ) {
+ myCentPoint = aSelectedObject;
+ if ( !myPoint1 )
+ GroupPoints->PushButton4->click();
+ else if ( !myPoint2 )
+ GroupPoints->PushButton5->click();
+ else if ( myObjects.isEmpty() )
+ GroupPoints->PushButton1->click();
+ }
}
else if ( myEditCurrentArgument == GroupPoints->LineEdit4 ) {
- myPoint1 = aSelectedObject;
- if ( !myPoint2 )
- GroupPoints->PushButton5->click();
- else if ( myObjects.isEmpty() )
- GroupPoints->PushButton1->click();
- else if ( !myCentPoint )
- GroupPoints->PushButton2->click();
+ myPoint1 = aSelectedObject;
+ if ( !myPoint2 )
+ GroupPoints->PushButton5->click();
+ else if ( myObjects.isEmpty() )
+ GroupPoints->PushButton1->click();
+ else if ( !myCentPoint )
+ GroupPoints->PushButton2->click();
}
else if ( myEditCurrentArgument == GroupPoints->LineEdit5 ) {
- myPoint2 = aSelectedObject;
- if ( myObjects.isEmpty() )
- GroupPoints->PushButton1->click();
- else if ( !myCentPoint )
- GroupPoints->PushButton2->click();
- else if ( !myPoint1 )
- GroupPoints->PushButton4->click();
+ myPoint2 = aSelectedObject;
+ if ( myObjects.isEmpty() )
+ GroupPoints->PushButton1->click();
+ else if ( !myCentPoint )
+ GroupPoints->PushButton2->click();
+ else if ( !myPoint1 )
+ GroupPoints->PushButton4->click();
}
}
else {
if (myEditCurrentArgument == GroupPoints->LineEdit2 ) {
- if ( getConstructorId() == 0 )
- myAxis.nullify();
- else if ( getConstructorId() == 1 )
- myCentPoint.nullify();
+ if ( getConstructorId() == 0 )
+ myAxis.nullify();
+ else if ( getConstructorId() == 1 )
+ myCentPoint.nullify();
}
else if ( myEditCurrentArgument == GroupPoints->LineEdit4 ) {
- myPoint1.nullify();
+ myPoint1.nullify();
}
else if ( myEditCurrentArgument == GroupPoints->LineEdit5 ) {
- myPoint2.nullify();
+ myPoint2.nullify();
}
myEditCurrentArgument->setText("");
}
myEditCurrentArgument->setText( aName );
myPoint = aSelectedObject;
if ( myObjects.isEmpty() )
- PushButton1->click();
+ PushButton1->click();
}
else {
myPoint.nullify();
QString aName = GEOMBase::GetName( aSelectedObject.get() );
myEditCurrentArgument->setText( aName );
if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
- if ( getConstructorId() == 1 ) {
- myPoint1 = aSelectedObject;
- if ( !myPoint2 )
- GroupPoints->PushButton3->click();
- else if ( myObjects.isEmpty() )
- GroupPoints->PushButton1->click();
- }
- else if ( getConstructorId() == 2 ) {
- myVector = aSelectedObject;
- if ( myObjects.isEmpty() )
- GroupPoints->PushButton1->click();
- }
+ if ( getConstructorId() == 1 ) {
+ myPoint1 = aSelectedObject;
+ if ( !myPoint2 )
+ GroupPoints->PushButton3->click();
+ else if ( myObjects.isEmpty() )
+ GroupPoints->PushButton1->click();
+ }
+ else if ( getConstructorId() == 2 ) {
+ myVector = aSelectedObject;
+ if ( myObjects.isEmpty() )
+ GroupPoints->PushButton1->click();
+ }
}
else if ( myEditCurrentArgument == GroupPoints->LineEdit3 ) {
- myPoint2 = aSelectedObject;
- if ( myObjects.isEmpty() )
- GroupPoints->PushButton1->click();
- else if ( !myPoint1 )
- GroupPoints->PushButton2->click();
+ myPoint2 = aSelectedObject;
+ if ( myObjects.isEmpty() )
+ GroupPoints->PushButton1->click();
+ else if ( !myPoint1 )
+ GroupPoints->PushButton2->click();
}
}
else {
if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
- if ( getConstructorId() == 1 ) myPoint1.nullify();
- else myVector.nullify();
+ if ( getConstructorId() == 1 ) myPoint1.nullify();
+ else myVector.nullify();
}
else if ( myEditCurrentArgument == GroupPoints->LineEdit3 ) {
- myPoint2.nullify();
+ myPoint2.nullify();
}
myEditCurrentArgument->setText("");
}
break;
case 2:
ok = GroupPoints->SpinBox3->isValid( msg, !IsPreview() ) &&
- myVector && !myObjects.isEmpty();
+ myVector && !myObjects.isEmpty();
break;
default:
break;
TopExp_Explorer ex;
TopLoc_Location aLoc;
for (ex.Init(theShape, TopAbs_FACE); ex.More(); ex.Next()) {
- const TopoDS_Face& aFace = TopoDS::Face(ex.Current());
- Handle(Poly_Triangulation) aPoly = BRep_Tool::Triangulation(aFace,aLoc);
- if(aPoly.IsNull()) {
- wasMeshed = false;
- break;
- }
+ const TopoDS_Face& aFace = TopoDS::Face(ex.Current());
+ Handle(Poly_Triangulation) aPoly = BRep_Tool::Triangulation(aFace,aLoc);
+ if(aPoly.IsNull()) {
+ wasMeshed = false;
+ break;
+ }
}
GEOM::MeshShape( theShape, aDeflection );
myAppendFilter->Delete();
if(!wasMeshed)
- BRepTools::Clean(theShape);
+ BRepTools::Clean(theShape);
return 1;
}