mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead of "unsigned int"
Code has been updated to remove no-op casts and implicit casts to Standard_Boolean. Places of inproper use of Standard_Boolean instead of Standard_Integer have been corrected: - Bnd_Box, Bnd_Box2d Bit flags are now defined as private enum - HLRAlgo_BiPoint, HLRAlgo_EdgesBlock, HLRBRep_EdgeData, HLRBRep_FaceData Bit flags are now defined as enum - HLRAlgo_EdgeStatus, HLRBRep_BiPnt2D, HLRBRep_BiPoint Bit flags are now defined as bool fields - HLRAlgo_PolyData Bit flags are now defined as Standard_Integer - OSD_DirectoryIterator, OSD_FileIterator Boolean flag is now defined as Standard_Boolean - ShapeAnalysis_Surface::SurfaceNewton() now returns Standard_Integer (values 0, 1 or 3) - ChFi2d_FilletAlgo now uses TColStd_SequenceOfBoolean instead of TColStd_SequenceOfInteger for storing boolean flags Method IFSelect_Dispatch::PacketsCount() has been dropped from interface. ShapeFix_Solid::Status() has been fixed to decode requested status instead of returning integer value. TopOpeBRepBuild_Builder1 now defines map storing Standard_Boolean values instead of Standard_Integer. Persistence for Standard_Boolean type has been corrected to keep backward compatibility: - BinMDataStd, BinTools, FSD_BinaryFile Broken Draw Harness commands vdisplaymode and verasemode have been removed. BRepMesh_FastDiscretFace::initDataStructure() - workaround old gcc limitations BRepMesh_IncrementalMesh::clear() - avoid ambiguity
This commit is contained in:
@@ -592,7 +592,7 @@ TopAbs_State BOPTools_AlgoTools::ComputeState
|
||||
//function : IsInternalFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Integer BOPTools_AlgoTools::IsInternalFace
|
||||
Standard_Boolean BOPTools_AlgoTools::IsInternalFace
|
||||
(const TopoDS_Face& theFace,
|
||||
const TopoDS_Solid& theSolid,
|
||||
BOPCol_IndexedDataMapOfShapeListOfShape& theMEF,
|
||||
@@ -640,7 +640,7 @@ Standard_Integer BOPTools_AlgoTools::IsInternalFace
|
||||
BOPCol_ListOfShape& aLF=theMEF.ChangeFromKey(aE);
|
||||
aNbF=aLF.Extent();
|
||||
if (!aNbF) {
|
||||
return iRet; // it can not be so
|
||||
return iRet != 0; // it can not be so
|
||||
}
|
||||
//
|
||||
else if (aNbF==1) {
|
||||
@@ -670,8 +670,7 @@ Standard_Integer BOPTools_AlgoTools::IsInternalFace
|
||||
}
|
||||
//
|
||||
if (aNbF%2) {
|
||||
iRet=0;
|
||||
return iRet; // it can not be so
|
||||
return Standard_False; // it can not be so
|
||||
}
|
||||
else { // aNbF=2,4,6,8,...
|
||||
iRet=BOPTools_AlgoTools::IsInternalFace(theFace, aE, aLF,
|
||||
@@ -686,7 +685,7 @@ Standard_Integer BOPTools_AlgoTools::IsInternalFace
|
||||
}
|
||||
//
|
||||
if (iRet!=2) {
|
||||
return iRet;
|
||||
return iRet == 1;
|
||||
}
|
||||
//
|
||||
//========================================
|
||||
@@ -699,10 +698,7 @@ Standard_Integer BOPTools_AlgoTools::IsInternalFace
|
||||
//
|
||||
aState=BOPTools_AlgoTools::ComputeState(theFace, theSolid,
|
||||
theTol, aBounds, theContext);
|
||||
//
|
||||
iRet=(aState==TopAbs_IN)? 1 : 0;
|
||||
//
|
||||
return iRet;
|
||||
return aState == TopAbs_IN;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : IsInternalFace
|
||||
|
@@ -101,12 +101,19 @@ public:
|
||||
//! couple of faces theFace1, theFace2.
|
||||
//! The faces theFace, theFace1, theFace2 must
|
||||
//! share the edge theEdge
|
||||
//! Return values:
|
||||
//! * 0 state is not IN
|
||||
//! * 1 state is IN
|
||||
//! * 2 state can not be found by the method of angles
|
||||
Standard_EXPORT static Standard_Integer IsInternalFace (const TopoDS_Face& theFace, const TopoDS_Edge& theEdge, const TopoDS_Face& theFace1, const TopoDS_Face& theFace2, Handle(IntTools_Context)& theContext);
|
||||
|
||||
//! Returns True if the face theFace is inside of the
|
||||
//! appropriate couple of faces (from the set theLF) .
|
||||
//! The faces of the set theLF and theFace must
|
||||
//! share the edge theEdge
|
||||
//! * 0 state is not IN
|
||||
//! * 1 state is IN
|
||||
//! * 2 state can not be found by the method of angles
|
||||
Standard_EXPORT static Standard_Integer IsInternalFace (const TopoDS_Face& theFace, const TopoDS_Edge& theEdge, BOPCol_ListOfShape& theLF, Handle(IntTools_Context)& theContext);
|
||||
|
||||
//! Returns True if the face theFace is inside the
|
||||
@@ -114,7 +121,7 @@ public:
|
||||
//! theMEF - Map Edge/Faces for theSolid
|
||||
//! theTol - value of precision of computation
|
||||
//! theContext- cahed geometrical tools
|
||||
Standard_EXPORT static Standard_Integer IsInternalFace (const TopoDS_Face& theFace, const TopoDS_Solid& theSolid, BOPCol_IndexedDataMapOfShapeListOfShape& theMEF, const Standard_Real theTol, Handle(IntTools_Context)& theContext);
|
||||
Standard_EXPORT static Standard_Boolean IsInternalFace (const TopoDS_Face& theFace, const TopoDS_Solid& theSolid, BOPCol_IndexedDataMapOfShapeListOfShape& theMEF, const Standard_Real theTol, Handle(IntTools_Context)& theContext);
|
||||
|
||||
//! For the face theFace gets the edge theEdgeOnF
|
||||
//! that is the same as theEdge
|
||||
|
Reference in New Issue
Block a user