]> OCCT Git - occt-copy.git/commitdiff
0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead...
authorkgv <kgv@opencascade.com>
Thu, 25 Aug 2016 11:58:51 +0000 (14:58 +0300)
committerabv <abv@opencascade.com>
Fri, 26 Aug 2016 07:16:17 +0000 (10:16 +0300)
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

211 files changed:
dox/dev_guides/upgrade/upgrade.md
samples/mfc/standard/08_HLR/src/SelectionDialog.cpp
samples/mfc/standard/Common/ColoredMeshDlg.cpp
samples/mfc/standard/Common/DimensionDlg.cpp
samples/mfc/standard/Common/User_Cylinder.cxx
src/Adaptor3d/Adaptor3d_IsoCurve.cxx
src/BOPDS/BOPDS_IndexRange.lxx
src/BOPDS/BOPDS_Interf.hxx
src/BOPTest/BOPTest_OptionCommands.cxx
src/BOPTools/BOPTools_AlgoTools.cxx
src/BOPTools/BOPTools_AlgoTools.hxx
src/BRep/BRep_TEdge.cxx
src/BRepAlgo/BRepAlgo_Tool.cxx
src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx
src/BRepBuilderAPI/BRepBuilderAPI_Sewing.hxx
src/BRepFill/BRepFill_Sweep.cxx
src/BRepFill/BRepFill_TrimShellCorner.cxx
src/BRepMesh/BRepMesh_Delaun.cxx
src/BRepMesh/BRepMesh_FastDiscretFace.cxx
src/BRepMesh/BRepMesh_IncrementalMesh.cxx
src/BRepPrim/BRepPrim_GWedge.cxx
src/BRepPrim/BRepPrim_OneAxis.cxx
src/BRepTest/BRepTest_CheckCommands.cxx
src/BRepTest/BRepTest_CurveCommands.cxx
src/BRepTest/BRepTest_DraftAngleCommands.cxx
src/BRepTest/BRepTest_FeatureCommands.cxx
src/BRepTest/BRepTest_FillingCommands.cxx
src/BRepTest/BRepTest_SweepCommands.cxx
src/BRepToIGES/BRepToIGES_BREntity.cxx
src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx
src/BRepTools/BRepTools_Quilt.cxx
src/BinLDrivers/BinLDrivers_DocumentSection.cxx
src/BinMDataStd/BinMDataStd_ByteArrayDriver.cxx
src/BinMDataStd/BinMDataStd_ExtStringArrayDriver.cxx
src/BinMDataStd/BinMDataStd_IntPackedMapDriver.cxx
src/BinMDataStd/BinMDataStd_IntegerArrayDriver.cxx
src/BinMDataStd/BinMDataStd_RealArrayDriver.cxx
src/BinMDataXtd/BinMDataXtd_ConstraintDriver.cxx
src/BinMDataXtd/BinMDataXtd_PatternStdDriver.cxx
src/BinMDataXtd/BinMDataXtd_PresentationDriver.cxx
src/BinObjMgt/BinObjMgt_Persistent.lxx
src/BinTools/BinTools.cxx
src/Bnd/Bnd_Box.cxx
src/Bnd/Bnd_Box.hxx
src/Bnd/Bnd_Box.lxx [deleted file]
src/Bnd/Bnd_Box2d.hxx
src/Bnd/Bnd_Box2d.lxx [deleted file]
src/Bnd/FILES
src/ChFi2d/ChFi2d_FilletAlgo.cxx
src/ChFi2d/ChFi2d_FilletAlgo.hxx
src/ChFi3d/ChFi3d_Builder.hxx
src/ChFi3d/ChFi3d_Builder_2.cxx
src/ChFi3d/ChFi3d_Builder_6.cxx
src/ChFi3d/ChFi3d_Builder_C1.cxx
src/ChFi3d/ChFi3d_Builder_C2.cxx
src/ChFi3d/ChFi3d_ChBuilder.cxx
src/ChFi3d/ChFi3d_ChBuilder.hxx
src/ChFi3d/ChFi3d_ChBuilder_C3.cxx
src/ChFi3d/ChFi3d_FilBuilder.cxx
src/ChFi3d/ChFi3d_FilBuilder.hxx
src/ChFi3d/ChFi3d_FilBuilder_C3.cxx
src/ChFiDS/ChFiDS_SurfData.lxx
src/DDataStd/DDataStd_BasicCommands.cxx
src/DDataStd/DDataStd_TreeCommands.cxx
src/DNaming/DNaming.cxx
src/DNaming/DNaming_BasicCommands.cxx
src/DNaming/DNaming_Line3DDriver.cxx
src/DNaming/DNaming_ModelingCommands.cxx
src/DNaming/DNaming_SelectionCommands.cxx
src/Draw/Draw.cxx
src/Draw/Draw_Interpretor.cxx
src/Extrema/Extrema_Curve2dTool.lxx
src/FSD/FSD_BinaryFile.cxx
src/FilletSurf/FilletSurf_InternalBuilder.cxx
src/FilletSurf/FilletSurf_InternalBuilder.hxx
src/GeometryTest/GeometryTest_CurveCommands.cxx
src/Graphic3d/Graphic3d_MarkerImage.cxx
src/HLRAlgo/FILES
src/HLRAlgo/HLRAlgo_BiPoint.cxx
src/HLRAlgo/HLRAlgo_BiPoint.hxx
src/HLRAlgo/HLRAlgo_BiPoint.lxx [deleted file]
src/HLRAlgo/HLRAlgo_EdgeStatus.cxx
src/HLRAlgo/HLRAlgo_EdgeStatus.hxx
src/HLRAlgo/HLRAlgo_EdgeStatus.lxx [deleted file]
src/HLRAlgo/HLRAlgo_EdgesBlock.hxx
src/HLRAlgo/HLRAlgo_EdgesBlock.lxx [deleted file]
src/HLRAlgo/HLRAlgo_PolyAlgo.cxx
src/HLRAlgo/HLRAlgo_PolyData.cxx
src/HLRAlgo/HLRAlgo_PolyData.hxx
src/HLRBRep/FILES
src/HLRBRep/HLRBRep_BiPnt2D.cxx [deleted file]
src/HLRBRep/HLRBRep_BiPnt2D.hxx
src/HLRBRep/HLRBRep_BiPnt2D.lxx [deleted file]
src/HLRBRep/HLRBRep_BiPoint.cxx [deleted file]
src/HLRBRep/HLRBRep_BiPoint.hxx
src/HLRBRep/HLRBRep_BiPoint.lxx [deleted file]
src/HLRBRep/HLRBRep_EdgeData.hxx
src/HLRBRep/HLRBRep_EdgeData.lxx
src/HLRBRep/HLRBRep_FaceData.hxx
src/HLRBRep/HLRBRep_FaceData.lxx
src/HLRBRep/HLRBRep_PolyAlgo.cxx
src/HLRBRep/HLRBRep_PolyAlgo.hxx
src/IFSelect/IFSelect_DispGlobal.cxx
src/IFSelect/IFSelect_DispGlobal.hxx
src/IFSelect/IFSelect_DispPerCount.cxx
src/IFSelect/IFSelect_DispPerCount.hxx
src/IFSelect/IFSelect_DispPerFiles.cxx
src/IFSelect/IFSelect_DispPerFiles.hxx
src/IFSelect/IFSelect_DispPerOne.cxx
src/IFSelect/IFSelect_DispPerOne.hxx
src/IFSelect/IFSelect_Dispatch.cxx
src/IFSelect/IFSelect_Dispatch.hxx
src/IFSelect/IFSelect_Functions.cxx
src/IFSelect/IFSelect_SelectRootComps.cxx
src/IFSelect/IFSelect_SelectRoots.cxx
src/IFSelect/IFSelect_SessionPilot.cxx
src/IGESData/IGESData_IGESEntity.cxx
src/IGESDraw/IGESDraw_CircArraySubfigure.cxx
src/IGESDraw/IGESDraw_CircArraySubfigure.hxx
src/IGESDraw/IGESDraw_ConnectPoint.cxx
src/IGESDraw/IGESDraw_ConnectPoint.hxx
src/IGESDraw/IGESDraw_RectArraySubfigure.cxx
src/IGESDraw/IGESDraw_RectArraySubfigure.hxx
src/IGESSolid/IGESSolid_TopoBuilder.cxx
src/IGESSolid/IGESSolid_TopoBuilder.hxx
src/IGESToBRep/IGESToBRep_Actor.cxx
src/IVtkDraw/IVtkDraw.cxx
src/IVtkDraw/IVtkDraw_Interactor.cxx
src/IVtkOCC/IVtkOCC_ShapeMesher.cxx
src/IntPatch/IntPatch_RstInt.cxx
src/IntTools/IntTools_EdgeEdge.cxx
src/LocOpe/LocOpe_SplitShape.cxx
src/LocOpe/LocOpe_WiresOnShape.cxx
src/OSD/OSD_DirectoryIterator.cxx
src/OSD/OSD_DirectoryIterator.hxx
src/OSD/OSD_FileIterator.cxx
src/OSD/OSD_FileIterator.hxx
src/OpenGl/OpenGl_Clipping.hxx
src/Poly/Poly_MakeLoops.hxx
src/QABugs/QABugs_11.cxx
src/QABugs/QABugs_19.cxx
src/QADNaming/QADNaming_BasicCommands.cxx
src/QANewBRepNaming/QANewBRepNaming_Loader.cxx
src/QANewBRepNaming/QANewBRepNaming_LoaderParent.cxx
src/QANewDBRepNaming/QANewDBRepNaming_PrimitiveCommands.cxx
src/QANewModTopOpe/QANewModTopOpe_Tools.cxx
src/RWStl/RWStl.cxx
src/STEPCAFControl/STEPCAFControl_Writer.cxx
src/STEPControl/STEPControl_ActorRead.cxx
src/STEPControl/STEPControl_ActorWrite.cxx
src/STEPControl/STEPControl_Reader.cxx
src/SWDRAW/SWDRAW_ShapeAnalysis.cxx
src/SWDRAW/SWDRAW_ShapeCustom.cxx
src/SWDRAW/SWDRAW_ShapeExtend.cxx
src/SelectMgr/SelectMgr_BaseFrustum.cxx
src/SelectMgr/SelectMgr_BaseFrustum.hxx
src/ShapeAnalysis/ShapeAnalysis_Surface.cxx
src/ShapeAnalysis/ShapeAnalysis_Surface.hxx
src/ShapeCustom/ShapeCustom_DirectModification.cxx
src/ShapeFix/ShapeFix_ComposeShell.cxx
src/ShapeFix/ShapeFix_Face.cxx
src/ShapeFix/ShapeFix_Shape.cxx
src/ShapeFix/ShapeFix_Shell.cxx
src/ShapeFix/ShapeFix_Solid.cxx
src/ShapeFix/ShapeFix_Wire.cxx
src/ShapePersistent/ShapePersistent_BRep.cxx
src/ShapePersistent/ShapePersistent_TopoDS.cxx
src/ShapeProcess/ShapeProcess_Context.cxx
src/ShapeProcess/ShapeProcess_OperLibrary.cxx
src/Standard/Standard_Character.hxx
src/Standard/Standard_Transient.cxx
src/Standard/Standard_TypeDef.hxx
src/StdLPersistent/StdLPersistent_Collection.cxx
src/StdLPersistent/StdLPersistent_Collection.hxx
src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx
src/TColStd/TColStd_PackedMapOfInteger.hxx
src/TDataStd/TDataStd_BooleanList.cxx
src/TFunction/FILES
src/TFunction/TFunction_Function.hxx
src/TFunction/TFunction_Function.lxx [deleted file]
src/TObj/TObj_Object.cxx
src/TestTopOpe/TestTopOpe_BOOPCommands.cxx
src/TopOpeBRep/TopOpeBRep_FFTransitionTool.cxx
src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx
src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx
src/TopOpeBRep/TopOpeBRep_traceBOOPNINT.cxx
src/TopOpeBRep/TopOpeBRep_vpr.cxx
src/TopOpeBRep/TopOpeBRep_vprclo.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx
src/TopOpeBRepBuild/TopOpeBRepBuild_GTool.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.hxx
src/TopOpeBRepBuild/TopOpeBRepBuild_KPart.cxx
src/TopOpeBRepDS/TopOpeBRepDS_redu.cxx
src/TopOpeBRepDS/TopOpeBRepDS_repvg.cxx
src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx
src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx
src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest_CmdParser.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
src/XCAFDoc/XCAFDoc_Dimension.cxx
src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx
src/XmlMDataStd/XmlMDataStd_ByteArrayDriver.cxx
src/XmlMDataStd/XmlMDataStd_ExtStringArrayDriver.cxx
src/XmlMDataStd/XmlMDataStd_IntPackedMapDriver.cxx
src/XmlMDataStd/XmlMDataStd_IntegerArrayDriver.cxx
src/XmlMDataStd/XmlMDataStd_RealArrayDriver.cxx

index b433110f35d0b3479ff7074b4e90c908ca391b95..33694be6206027d7062e94b6b73db5d5b6e42931 100644 (file)
@@ -1014,6 +1014,7 @@ Now such code would produce unexpected result and therefore should be updated to
 @subsection upgrade_710_types Typedefs
 
 The following type definitions in OCCT has been modified to use C++11 types:
+- *Standard_Boolean* is now *bool* (previously *unsigned int*).
 - *Standard_ExtCharacter* is now *char16_t* (previously *short*).
 - *Standard_ExtString;* is now *const char16_t* (previously *const short*).
 - *Standard_Utf16Char* is now *char16_t* (previously *uint16_t* for compatibility with old compilers).
index f4ff794744f9c6bfebc37f2b7b3663a023656aaa..bbcb5fd10810f06bf771b7b23f5f2af10cb4b4ae 100644 (file)
@@ -136,7 +136,7 @@ void CSelectionDialog::OnDisplay (bool isFit)
 
     Handle(WNT_Window) aWNTWindow = new WNT_Window (GetDlgItem (IDC_HlrDlgView)->GetSafeHwnd(),
                                                     Quantity_NOC_GRAY);
-    myActiveView->SetComputedMode (m_HlrModeIsOn);
+    myActiveView->SetComputedMode (m_HlrModeIsOn != 0);
     myActiveView->SetWindow(aWNTWindow);
 
     myInteractiveContext = new AIS_InteractiveContext (myActiveViewer);
@@ -434,12 +434,12 @@ void CSelectionDialog::OnHlrMode()
 
   if (!m_HlrModeIsOn)
   {
-    myActiveView->SetComputedMode (m_HlrModeIsOn);
+    myActiveView->SetComputedMode (m_HlrModeIsOn != 0);
   }
   else
   {
     SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
-    myActiveView->SetComputedMode (m_HlrModeIsOn);
+    myActiveView->SetComputedMode (m_HlrModeIsOn != 0);
     SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
   }
   OnDisplay(false);
@@ -500,7 +500,7 @@ void CSelectionDialog::OnRButtonUp(UINT nFlags, CPoint point)
   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
   // reset the good HLR mode according to the stored one
   //   --> dynamic rotation may have change it
-  myActiveView->SetComputedMode (m_HlrModeIsOn);
+  myActiveView->SetComputedMode (m_HlrModeIsOn != 0);
   OnDisplay(false);
   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
 }
index 0ca583bfac591153980779d0ef430d0c9333bc3b..225b1789239c4c672282905b14417895bb194835 100755 (executable)
@@ -124,7 +124,7 @@ void CColoredMeshDlg::OnRadio3()
 
 void CColoredMeshDlg::OnCheckX1()
 {
-       X1OnOff = m_CheckX1OnOff;
+       X1OnOff = m_CheckX1OnOff != 0;
 }
 
 void CColoredMeshDlg::OnCHECKXBlue() 
@@ -156,7 +156,7 @@ void CColoredMeshDlg::OnCHECKXRed()
 
 void CColoredMeshDlg::OnCheckY1() 
 {
-       Y1OnOff = m_CheckY1OnOff;       
+       Y1OnOff = m_CheckY1OnOff != 0;
 }
 
 void CColoredMeshDlg::OnCHECKYBlue() 
@@ -188,7 +188,7 @@ void CColoredMeshDlg::OnCHECKYRed()
 
 void CColoredMeshDlg::OnCheckZ1() 
 {
-       Z1OnOff = m_CheckZ1OnOff;
+       Z1OnOff = m_CheckZ1OnOff != 0;
 }
 
 void CColoredMeshDlg::OnCHECKZBlue() 
index 1fe27f43661319bcc9b5114de517ad3e8c765a92..aa7e9c82629ba4c992441cdd1b36010d458eb8b9 100644 (file)
@@ -602,7 +602,7 @@ void CDimensionDlg::OnDestroy()
 const Standard_Boolean CDimensionDlg::GetTextType() const
 {
   CButton* a3DButton = (CButton*)GetDlgItem (IDC_3DText);
-  return a3DButton->GetCheck();
+  return a3DButton->GetCheck() != 0;
 }
 
 //=======================================================================
index 95f591ccb553fb5ecdc9395c129f4b63bce0a37e..17124c14ebe5cd9f36c695837aad8663de3c7299 100755 (executable)
@@ -124,21 +124,21 @@ case 6: //color
 
     myX1OnOff = Dlg.X1OnOff;
 
-    myXBlueOnOff = Dlg.m_CheckXBlueOnOff;
-    myXGreenOnOff = Dlg.m_CheckXGreenOnOff;
-    myXRedOnOff = Dlg.m_CheckXRedOnOff;
+    myXBlueOnOff  = Dlg.m_CheckXBlueOnOff  != 0;
+    myXGreenOnOff = Dlg.m_CheckXGreenOnOff != 0;
+    myXRedOnOff   = Dlg.m_CheckXRedOnOff   != 0;
 
     myY1OnOff = Dlg.Y1OnOff;
 
-    myYBlueOnOff = Dlg.m_CheckYBlueOnOff;
-    myYGreenOnOff = Dlg.m_CheckYGreenOnOff;
-    myYRedOnOff = Dlg.m_CheckYRedOnOff;
+    myYBlueOnOff  = Dlg.m_CheckYBlueOnOff  != 0;
+    myYGreenOnOff = Dlg.m_CheckYGreenOnOff != 0;
+    myYRedOnOff   = Dlg.m_CheckYRedOnOff   != 0;
 
     myZ1OnOff = Dlg.Z1OnOff;
 
-    myZBlueOnOff = Dlg.m_CheckZBlueOnOff;
-    myZGreenOnOff = Dlg.m_CheckZGreenOnOff;
-    myZRedOnOff = Dlg.m_CheckZRedOnOff;
+    myZBlueOnOff  = Dlg.m_CheckZBlueOnOff  != 0;
+    myZGreenOnOff = Dlg.m_CheckZGreenOnOff != 0;
+    myZRedOnOff   = Dlg.m_CheckZRedOnOff   != 0;
 
     // Adds a triangulation of the shape myShape to its topological data structure.
     // This triangulation is computed with the deflection myDeflection.
index 5fc38f066428c2e4c060a2fd9411799f447d49a9..75eed9443f39cdcb6153e1182ad20e5f54a9f3a0 100644 (file)
@@ -917,7 +917,7 @@ Standard_Integer Adaptor3d_IsoCurve::Degree() const
 
 Standard_Boolean Adaptor3d_IsoCurve::IsRational() const 
 {
-  Standard_Integer is_rational = Standard_False ;
+  Standard_Boolean is_rational = Standard_False;
   GeomAbs_SurfaceType type = mySurface->GetType() ;
   switch(type) {
   case GeomAbs_BezierSurface:
index e7906366cc55519449ab37908fbba3b9ce693341..3a8347172d68d884bf8a52bbf2ef7bb47088b1ee 100644 (file)
@@ -86,7 +86,8 @@
 //function : Contains
 //purpose  : 
 //=======================================================================
-  inline Standard_Boolean BOPDS_IndexRange::Contains(const Standard_Integer aIndex)const
+inline Standard_Boolean BOPDS_IndexRange::Contains(const Standard_Integer aIndex)const
 {
-  return (Standard_Boolean)(aIndex>=myFirst && aIndex<=myLast);
+  return aIndex >= myFirst
+      && aIndex <= myLast;
 }
index 5a42949e9125a2e0c36c5972b4a4064e05da8e5b..2bd7b385375d974e63455eb0bb0e1d2a7e6db24a 100644 (file)
@@ -163,7 +163,7 @@ class BOPDS_Interf  {
    * @return true if the interference has index of new shape
    */
   Standard_Boolean HasIndexNew() const {
-    return (myIndexNew+1);
+    return (myIndexNew+1) != 0;
   }
   //
  protected:     
index cd603d3712f7cf5bb700808f5dcb0e2120e9b94d..1c395f6da03c1d39387d634523693668d5e61465 100644 (file)
@@ -119,7 +119,7 @@ Standard_Integer brunparallel(Draw_Interpretor& di,
     return 0;  
   }
   //
-  bRunParallel=(Standard_Boolean)(iX);
+  bRunParallel = (iX != 0);
   BOPTest_Objects::SetRunParallel(bRunParallel);
   //
   return 0;
@@ -146,7 +146,7 @@ Standard_Integer bnondestructive(Draw_Interpretor& di,
     return 0;
   }
   //
-  bNonDestructive = (Standard_Boolean)(iX);
+  bNonDestructive = (iX != 0);
   BOPTest_Objects::SetNonDestructive(bNonDestructive);
   //
   return 0;
index 6bddcec11430bce346ef7b18a5ff4e56b72d7ec3..2a4f64ac902763651142f73e8445e393551214eb 100644 (file)
@@ -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
index 2864ae0256749389ba00b423b91a9d147d5da493..0fcc84f4eb56b4199a9dae84f12c1f732cfc4a91 100644 (file)
@@ -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
index 1a90362909370ba74e84d946c9217604ed9739d4..ef5a2ba60dffa33646ee95b8c3b5e8ba6238df7b 100644 (file)
@@ -50,9 +50,9 @@ BRep_TEdge::BRep_TEdge() :
 //purpose  : 
 //=======================================================================
 
- Standard_Boolean  BRep_TEdge::SameParameter()const 
+Standard_Boolean BRep_TEdge::SameParameter() const
 {
-  return myFlags & ParameterMask;
+  return (myFlags & ParameterMask) != 0;
 }
 
 
@@ -73,12 +73,11 @@ BRep_TEdge::BRep_TEdge() :
 //purpose  : 
 //=======================================================================
 
- Standard_Boolean  BRep_TEdge::SameRange()const 
+Standard_Boolean BRep_TEdge::SameRange() const
 {
-  return myFlags & RangeMask;
+  return (myFlags & RangeMask) != 0;
 }
 
-
 //=======================================================================
 //function : SameRange
 //purpose  : 
@@ -96,12 +95,11 @@ BRep_TEdge::BRep_TEdge() :
 //purpose  : 
 //=======================================================================
 
- Standard_Boolean  BRep_TEdge::Degenerated()const 
+Standard_Boolean BRep_TEdge::Degenerated() const
 {
-  return myFlags & DegeneratedMask;
+  return (myFlags & DegeneratedMask) != 0;
 }
 
-
 //=======================================================================
 //function : Degenerated
 //purpose  : 
index 1cedf308fc3b5479b582467d22ac0c85bffc3b54..f838eacb6f1c9b4c42ed896b5a664d6c9f24468a 100644 (file)
@@ -72,7 +72,7 @@ TopoDS_Shape BRepAlgo_Tool::Deboucle3D(const TopoDS_Shape& S,
       // iterate on sub-shapes and add non-empty.
       TopoDS_Iterator it(S);
       TopoDS_Shape SubShape;
-      Standard_Boolean NbSub = 0;
+      Standard_Integer NbSub = 0;
       BRep_Builder B;
       if (S.ShapeType() == TopAbs_COMPOUND) {
        B.MakeCompound(TopoDS::Compound(SS));
index 3be3e1d1d4e7a3c64e52d2496cfe67a0af67f493..58dd718660a94aa515ff993ee7aa10820ab0df32 100644 (file)
@@ -342,7 +342,7 @@ void BRepBuilderAPI_Sewing::SameParameter(const TopoDS_Edge& edge) const
 
 TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Shape& edge,
                                               const TopTools_SequenceOfShape& seqEdges,
-                                              const TColStd_SequenceOfInteger& seqForward,
+                                              const TColStd_SequenceOfBoolean& seqForward,
                                               TopTools_MapOfShape& mapMerged,
                                               const Handle(BRepTools_ReShape)& locReShape)
 {
@@ -405,8 +405,8 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Shape& edge,
       if (locReShape != myReShape) Edge2 = TopoDS::Edge(aTmpShape);
 
       // Calculate relative orientation
-      Standard_Integer Orientation = seqForward(i);
-      if (!isForward) Orientation = (Orientation? 0 : 1);
+      Standard_Boolean Orientation = seqForward(i);
+      if (!isForward) Orientation = !Orientation;
 
       // Retrieve faces information for the second edge
       TopoDS_Shape bnd2 = oedge2;
@@ -1335,7 +1335,7 @@ Standard_Boolean BRepBuilderAPI_Sewing::IsMergedClosed(const TopoDS_Edge& Edge1,
 
 void BRepBuilderAPI_Sewing::AnalysisNearestEdges(const TopTools_SequenceOfShape& sequenceSec,
                                                  TColStd_SequenceOfInteger& seqIndCandidate,
-                                                 TColStd_SequenceOfInteger& seqOrientations,
+                                                 TColStd_SequenceOfBoolean& seqOrientations,
                                                  const Standard_Boolean evalDist)
 {
 
@@ -1465,7 +1465,7 @@ void BRepBuilderAPI_Sewing::AnalysisNearestEdges(const TopTools_SequenceOfShape&
 Standard_Boolean BRepBuilderAPI_Sewing::FindCandidates(TopTools_SequenceOfShape& seqSections,
                                                        TColStd_IndexedMapOfInteger& mapReference,
                                                        TColStd_SequenceOfInteger& seqCandidates,
-                                                       TColStd_SequenceOfInteger& seqOrientations)
+                                                       TColStd_SequenceOfBoolean& seqOrientations)
 {
   Standard_Integer i, nbSections = seqSections.Length();
   if(nbSections <= 1)
@@ -1521,8 +1521,8 @@ Standard_Boolean BRepBuilderAPI_Sewing::FindCandidates(TopTools_SequenceOfShape&
         
         // Reference section is connected to section #i
         Standard_Boolean isInserted = Standard_False;
-        Standard_Integer j, ori = (arrForward(i)? 1 : 0);
-        for (j = 1; (j <= seqCandidates.Length()) && !isInserted; j++) {
+        Standard_Boolean ori = arrForward(i);
+        for (Standard_Integer j = 1; (j <= seqCandidates.Length()) && !isInserted; j++) {
           Standard_Real aDelta = arrDistance(i) - arrDistance(seqCandidates.Value(j));
           
           if( aDelta < Precision::Confusion()) {
@@ -1558,9 +1558,9 @@ Standard_Boolean BRepBuilderAPI_Sewing::FindCandidates(TopTools_SequenceOfShape&
 
   if (myNonmanifold && nbCandidates >1) {
     TColStd_SequenceOfInteger seqNewCandidates;
-    TColStd_SequenceOfInteger seqOrientationsNew;
+    TColStd_SequenceOfBoolean seqOrientationsNew;
     seqCandidates.Prepend(1);
-    seqOrientations.Prepend(1);
+    seqOrientations.Prepend(Standard_True);
     for(Standard_Integer k = 1; k <= seqSections.Length() && seqCandidates.Length() > 1 ; k++) {
       AnalysisNearestEdges(seqSections,seqCandidates,seqOrientations,(k==1));
       if(k == 1 && !seqCandidates.Length()) return Standard_False;
@@ -1660,7 +1660,8 @@ Standard_Boolean BRepBuilderAPI_Sewing::FindCandidates(TopTools_SequenceOfShape&
       if (mapReference.Contains(indCandidate)) break;
       // Find candidates for candidate #indCandidate
       mapReference.Add(indCandidate); // Push candidate in the map
-      TColStd_SequenceOfInteger seqCandidates1, seqOrientations1;
+      TColStd_SequenceOfInteger seqCandidates1;
+      TColStd_SequenceOfBoolean seqOrientations1;
       Standard_Boolean isFound =
         FindCandidates(seqSections,mapReference,seqCandidates1,seqOrientations1);
       mapReference.RemoveLast(); // Pop candidate from the map
@@ -3185,7 +3186,7 @@ void BRepBuilderAPI_Sewing::Merging(const Standard_Boolean /* firstTime */,
     if (!isPrevSplit) {
       // Obtain sequence of edges merged with bound
       TopTools_SequenceOfShape seqMergedWithBound;
-      TColStd_SequenceOfInteger seqMergedWithBoundOri;
+      TColStd_SequenceOfBoolean seqMergedWithBoundOri;
       if (MergedNearestEdges(bound,seqMergedWithBound,seqMergedWithBoundOri)) {
         // Store bound in the map
         MergedWithBound.Bind(bound,bound);
@@ -3262,7 +3263,7 @@ void BRepBuilderAPI_Sewing::Merging(const Standard_Boolean /* firstTime */,
         if (!nbMerged) MergedWithBound.UnBind(bound);
       }
     }
-    Standard_Boolean isMerged = MergedWithBound.Extent();
+    const Standard_Boolean isMerged = !MergedWithBound.IsEmpty();
 
     // Merge with cutting sections
     Handle(BRepTools_ReShape) SectionsReShape = new BRepTools_ReShape;
@@ -3277,7 +3278,7 @@ void BRepBuilderAPI_Sewing::Merging(const Standard_Boolean /* firstTime */,
         if (myMergedEdges.Contains(section)) continue;
         // Merge cutting section
         TopTools_SequenceOfShape seqMergedWithSection;
-        TColStd_SequenceOfInteger seqMergedWithSectionOri;
+        TColStd_SequenceOfBoolean seqMergedWithSectionOri;
         if (MergedNearestEdges(section,seqMergedWithSection,seqMergedWithSectionOri)) {
           // Store section in the map
           MergedWithSections.Bind(section,section);
@@ -3363,7 +3364,7 @@ void BRepBuilderAPI_Sewing::Merging(const Standard_Boolean /* firstTime */,
         }
       }
     }
-    Standard_Boolean isMergedSplit = MergedWithSections.Extent();
+    const Standard_Boolean isMergedSplit = !MergedWithSections.IsEmpty();
 
     if (!isMerged && !isMergedSplit) {
       // Nothing was merged in this iteration
@@ -3464,7 +3465,7 @@ void BRepBuilderAPI_Sewing::Merging(const Standard_Boolean /* firstTime */,
 
 Standard_Boolean BRepBuilderAPI_Sewing::MergedNearestEdges(const TopoDS_Shape& edge,
                                                            TopTools_SequenceOfShape& SeqMergedEdge,
-                                                           TColStd_SequenceOfInteger& SeqMergedOri)
+                                                           TColStd_SequenceOfBoolean& SeqMergedOri)
 {
   // Retrieve edge nodes
   TopoDS_Vertex no1, no2;
@@ -3580,7 +3581,7 @@ Standard_Boolean BRepBuilderAPI_Sewing::MergedNearestEdges(const TopoDS_Shape& e
     }
 
     // Find merging candidates
-    TColStd_SequenceOfInteger seqForward;
+    TColStd_SequenceOfBoolean seqForward;
     TColStd_SequenceOfInteger seqCandidates;
     TColStd_IndexedMapOfInteger mapReference;
     mapReference.Add(indRef); // Add index of reference section
@@ -3590,12 +3591,12 @@ Standard_Boolean BRepBuilderAPI_Sewing::MergedNearestEdges(const TopoDS_Shape& e
       for (i = 1; i <= nbCandidates; i++) {
         // Retrieve merged edge
         TopoDS_Shape iedge = seqEdges(seqCandidates(i));
-        Standard_Integer ori = (seqForward(i))? 1 : 0;
+        Standard_Boolean ori = seqForward(i) != 0;
         SeqMergedEdge.Append(iedge);
         SeqMergedOri.Append(ori);
         if (!myNonmanifold) break;
       }
-      success = nbCandidates;
+      success = (nbCandidates != 0);
     }
   }
 
index 23f7f8437a33e1f3918b44afe9dccbc2108e0ac3..aec9ecdb8932aa2e2aa594cb115eb1445f5a6b2a 100644 (file)
@@ -34,6 +34,7 @@
 #include <TopTools_ListOfShape.hxx>
 #include <TopTools_SequenceOfShape.hxx>
 #include <TColStd_IndexedMapOfInteger.hxx>
+#include <TColStd_SequenceOfBoolean.hxx>
 #include <TColStd_SequenceOfInteger.hxx>
 #include <TColStd_Array1OfBoolean.hxx>
 #include <TColStd_Array1OfReal.hxx>
@@ -254,12 +255,12 @@ protected:
   
   Standard_EXPORT Standard_Boolean IsMergedClosed (const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const TopoDS_Face& fase) const;
   
-  Standard_EXPORT Standard_Boolean FindCandidates (TopTools_SequenceOfShape& seqSections, TColStd_IndexedMapOfInteger& mapReference, TColStd_SequenceOfInteger& seqCandidates, TColStd_SequenceOfInteger& seqOrientations);
+  Standard_EXPORT Standard_Boolean FindCandidates (TopTools_SequenceOfShape& seqSections, TColStd_IndexedMapOfInteger& mapReference, TColStd_SequenceOfInteger& seqCandidates, TColStd_SequenceOfBoolean& seqOrientations);
   
-  Standard_EXPORT void AnalysisNearestEdges (const TopTools_SequenceOfShape& sequenceSec, TColStd_SequenceOfInteger& seqIndCandidate, TColStd_SequenceOfInteger& seqOrientations, const Standard_Boolean evalDist = Standard_True);
+  Standard_EXPORT void AnalysisNearestEdges (const TopTools_SequenceOfShape& sequenceSec, TColStd_SequenceOfInteger& seqIndCandidate, TColStd_SequenceOfBoolean& seqOrientations, const Standard_Boolean evalDist = Standard_True);
   
   //! Merged nearest edges.
-  Standard_EXPORT Standard_Boolean MergedNearestEdges (const TopoDS_Shape& edge, TopTools_SequenceOfShape& SeqMergedEdge, TColStd_SequenceOfInteger& SeqMergedOri);
+  Standard_EXPORT Standard_Boolean MergedNearestEdges (const TopoDS_Shape& edge, TopTools_SequenceOfShape& SeqMergedEdge, TColStd_SequenceOfBoolean& SeqMergedOri);
   
   Standard_EXPORT void EdgeProcessing (const Handle(Message_ProgressIndicator)& thePI = 0);
   
@@ -311,7 +312,7 @@ protected:
   
 
   //! This method is called from Merging only
-  Standard_EXPORT virtual TopoDS_Edge SameParameterEdge (const TopoDS_Shape& edge, const TopTools_SequenceOfShape& seqEdges, const TColStd_SequenceOfInteger& seqForward, TopTools_MapOfShape& mapMerged, const Handle(BRepTools_ReShape)& locReShape);
+  Standard_EXPORT virtual TopoDS_Edge SameParameterEdge (const TopoDS_Shape& edge, const TopTools_SequenceOfShape& seqEdges, const TColStd_SequenceOfBoolean& seqForward, TopTools_MapOfShape& mapMerged, const Handle(BRepTools_ReShape)& locReShape);
   
 
   //! This method is called from Merging only
index 6f486fcca08f182a8505ff427f0ed799c898501c..e9bf5b698a1db70e6594942632c719bca0cfaa85 100644 (file)
@@ -73,6 +73,7 @@
 #include <TColgp_Array1OfPnt.hxx>
 #include <TColStd_Array1OfBoolean.hxx>
 #include <TColStd_Array1OfReal.hxx>
+#include <TColStd_Array2OfBoolean.hxx>
 #include <TColStd_Array2OfInteger.hxx>
 #include <TColStd_Array2OfReal.hxx>
 #include <TColStd_HArray1OfInteger.hxx>
@@ -1957,10 +1958,10 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
 
   // (1.1) Construction of Tables
 
-  TColStd_Array2OfInteger ExchUV(1, NbLaw, 1, NbPath);
-  TColStd_Array2OfInteger UReverse(1, NbLaw, 1, NbPath);
-  TColStd_Array2OfInteger Degenerated(1, NbLaw, 1, NbPath);
-  Degenerated.Init(0);
+  TColStd_Array2OfBoolean ExchUV     (1, NbLaw, 1, NbPath);
+  TColStd_Array2OfBoolean UReverse   (1, NbLaw, 1, NbPath);
+  TColStd_Array2OfBoolean Degenerated(1, NbLaw, 1, NbPath);
+  Degenerated.Init (false);
   // No VReverse for the moment...
   TColStd_Array2OfReal TabErr(1, NbLaw   , 1, NbPath);
   TColGeom_Array2OfSurface TabS(1, NbLaw , 1, NbPath);
index 6f6d84bb8602294d1e341d17cb2a1ac4fe6da785..65d6a2cea57b2677bc787772959b0d0c2f5b9db4 100644 (file)
@@ -435,7 +435,7 @@ Standard_Boolean MakeFacesNonSec(const Standard_Integer                     theI
 
   // search common vertices between uedges. begin
   TopTools_ListOfShape aCommonVertices;
-  Standard_Boolean acommonflag = 0; // 0 - no, 1 - first pair, 2 - second pair, 3 - both
+  Standard_Integer acommonflag = 0; // 0 - no, 1 - first pair, 2 - second pair, 3 - both
   Standard_Integer ueit = 0, eindex = 0;
 
   for(ueit = 1, eindex = theIndex; ueit <= 2; ueit++, eindex++) {
@@ -705,7 +705,7 @@ Standard_Boolean MakeFacesSec(const Standard_Integer                     theInde
   }
 
   TopTools_ListOfShape aCommonVertices;
-//  Standard_Boolean acommonflag = 0; // 0 - no, 1 - first pair, 2 - second pair, 3 - both
+//  Standard_Integer acommonflag = 0; // 0 - no, 1 - first pair, 2 - second pair, 3 - both
   Standard_Integer fit = 0; //, ueit = 0, eindex = 0, i = 0;
   Handle(BRepTools_ReShape) aSubstitutor = new BRepTools_ReShape();
 
index 6c82eb11aa5b44790b038ecc457c7406af916421..edd8a5c53914c68718297a5c8211b63cb502c821 100644 (file)
@@ -314,7 +314,7 @@ void BRepMesh_Delaun::createTriangles(const Standard_Integer         theVertexIn
     Standard_Integer     anEdgeId = anEdges.Key();
     const BRepMesh_Edge& anEdge   = GetEdge( anEdgeId );
 
-    Standard_Boolean isPositive = (Standard_Boolean)thePoly( anEdgeId );
+    const Standard_Boolean isPositive = thePoly (anEdgeId) != 0;
 
     Standard_Integer aNodes[3];
     if ( isPositive )
@@ -2007,7 +2007,7 @@ void BRepMesh_Delaun::RemoveVertex( const BRepMesh_Vertex& theVertex )
     Standard_Integer aPivotNode = anEdge.LastNode();
     Standard_Integer anEdgeId   = aLoopEdgesIt.Key();
     
-    Standard_Boolean isPositive = (Standard_Boolean)aLoopEdges( anEdgeId );
+    Standard_Boolean isPositive = (aLoopEdges (anEdgeId) != 0);
     if ( !isPositive )
     {
       Standard_Integer aTmp;
index 2abfe722c780763fce467aea35ab266b225852f3..80df07b20f356ba2e013c8524af2ace34ab25d1d 100644 (file)
@@ -222,8 +222,9 @@ void BRepMesh_FastDiscretFace::initDataStructure()
                                       thetype == GeomAbs_BSplineSurface);
   const Standard_Boolean useUVParam = (thetype == GeomAbs_Torus || IsCompexSurface (thetype));
 
-  myUParam.Clear(aAllocator); 
-  myVParam.Clear(aAllocator);
+  Handle(NCollection_BaseAllocator) aBaseAlloc = aAllocator;
+  myUParam.Clear (aBaseAlloc);
+  myVParam.Clear (aBaseAlloc);
 
   // essai de determination de la longueur vraie:
   // akm (bug OCC16) : We must calculate these measures in non-singular
index 8e7bace9e079503927a612d360e2c31f9694f7e7..70278be25991cf217e1b4228a58e00ca659e00c2 100644 (file)
@@ -127,7 +127,7 @@ BRepMesh_IncrementalMesh::~BRepMesh_IncrementalMesh()
 void BRepMesh_IncrementalMesh::clear()
 {
   // the allocator will be alive while the structures are alive
-  Handle(NCollection_IncAllocator) anAlloc =
+  Handle(NCollection_BaseAllocator) anAlloc =
     new NCollection_IncAllocator(BRepMesh::MEMORY_BLOCK_SIZE_HUGE);
   myEdges.Clear(anAlloc);
   myEdgeDeflection.Clear(anAlloc);
index 3351994e60def857d5bc091e8ad2cd9725549fd8..89692f9cecde958e06093cddf23a82fad2201490 100644 (file)
 #include <TopoDS_Vertex.hxx>
 #include <TopoDS_Wire.hxx>
 
-#undef Standard_True
-#undef Standard_False
-
-#define Standard_True ((Standard_Boolean) 1)
-#define Standard_False ((Standard_Boolean) 0)
-
 #define NBFACES 6
 #define NBWIRES 6
 #define NBEDGES 12
index 985344fe61043645ede64205c762d64579591a7f..f20ebc6208b8336054c327595c8ad3d9c53236a5 100644 (file)
 #include <TopoDS_Vertex.hxx>
 #include <TopoDS_Wire.hxx>
 
-#undef Standard_True
-#undef Standard_False
-
-#define Standard_True ((Standard_Boolean) 1)
-#define Standard_False ((Standard_Boolean) 0)
-
-
 #define NBVERTICES 6
 #define VAXISTOP    0
 #define VAXISBOT    1
index 100cfd46f4ce094712f41e7c50adc942c567fa52..ff9e5fbedd2d26ec6c013b09aef01f496eaa3205 100644 (file)
@@ -355,7 +355,7 @@ static Standard_Integer checkdiff(Draw_Interpretor& di,
       di << syntaxe << "\n";
       return 1;
     }
-    closedSolid=Draw::Atoi(a[narg-1]);
+    closedSolid = Draw::Atoi(a[narg-1]) != 0;
     resu = DBRep::Get(a[narg-2]);
     lastArg=narg-3;
     if (resu.IsNull()) {
@@ -365,7 +365,7 @@ static Standard_Integer checkdiff(Draw_Interpretor& di,
        return 1;
       }
       geomCtrl=closedSolid;
-      closedSolid=Draw::Atoi(a[narg-2]);
+      closedSolid = Draw::Atoi(a[narg-2]) != 0;
       resu = DBRep::Get(a[narg-3]);
       lastArg=narg-4;
       if (resu.IsNull()) {
index c562797450ce1314cef00bf6ff24cabfde77204a..6bd5a548ec15722947fa307acafcec4b35fe172f 100644 (file)
@@ -999,8 +999,8 @@ static Standard_Integer bsplineprof(Draw_Interpretor& di,
     0.0e0) ;
   gp_Pnt2d first_point(0.0e0,
     0.0e0) ;
-  Standard_Integer i = 2,
-    wait = 1 ;
+  Standard_Integer i = 2;
+  Standard_Boolean wait = Standard_True;
 //  Standard_Real x0 = 0, y0 = 0, x = 0, y = 0, dx = 1, dy = 0;
   Standard_Real x = 0, y = 0, dx = 1, dy = 0;
   BRepBuilderAPI_MakeWire MW;
index a5f7c5e197dc8098dbffbaf5a2ca0ab4581bb499..bfea5f8d0e6592a77917fde5185dd08b7b6b6b17 100644 (file)
@@ -127,11 +127,7 @@ static Standard_Integer NDEP(Draw_Interpretor& theCommands,
       return 1;
     }
 
-//#ifdef OCCT_DEBUG
-//    Flag = Draw::Atof(a[9*ii+7]); // BUG?? Real -> Boolean ???
-//#else
-    Flag = (Standard_Boolean ) Draw::Atof(a[9*ii+7]);
-//#endif
+    Flag  = Draw::Atoi(a[9*ii+7]) != 0;
     Angle = Draw::Atof(a[9*ii+8])*M_PI/180.;
     Pax.SetCoord(Draw::Atof(a[9*ii+9]),Draw::Atof(a[9*ii+10]),Draw::Atof(a[9*ii+11]));
     Dax.SetCoord(Draw::Atof(a[9*ii+12]),Draw::Atof(a[9*ii+13]),Draw::Atof(a[9*ii+14]));
index a7431744c2ad8d72365fbf8de10029242ebf7d2e..28e8094bd7e9a949eb9b64866293b0a857290af8 100644 (file)
@@ -330,7 +330,7 @@ static Standard_Integer CONTROL(Draw_Interpretor& theCommands,
                                Standard_Integer narg, const char** a)
 {
   if (narg >= 2) {
-    WithControl = strcmp("0",a[1]);
+    WithControl = strcmp("0", a[1]) != 0;
   }
   if (WithControl) {
     theCommands << "Mode avec controle";
@@ -787,7 +787,7 @@ static Standard_Integer SPLS(Draw_Interpretor& ,
         for (; aExpE.More(); aExpE.Next())
           aSplitEdges.Append(aExpE.Current());
 
-        isSplittingEdges = (aSplitEdges.Length());
+        isSplittingEdges = !aSplitEdges.IsEmpty();
       }
     }
 
@@ -1050,7 +1050,7 @@ Standard_Integer offsetparameter(Draw_Interpretor& di,
   if ( n < 4 ) return 1;
   //
   TheTolerance = Draw::Atof(a[1]);
-  TheInter     = strcmp(a[2],"p");
+  TheInter     = strcmp(a[2],"p") != 0;
   //
   if      ( !strcmp(a[3],"a")) TheJoin = GeomAbs_Arc;
   else if ( !strcmp(a[3],"i")) TheJoin = GeomAbs_Intersection;
index 36aea66b072064d742a01f74b095d85158c219ef..f6d01c8cdd3c2a1bf81507f99a51aea7738f385c 100644 (file)
@@ -669,7 +669,7 @@ static Standard_Integer fillingparam( Draw_Interpretor & di, Standard_Integer n,
          Degree      = Draw::Atoi( a[2] );
          NbPtsOnCur  = Draw::Atoi( a[3] );
          NbIter      = Draw::Atoi( a[4] );
-         Anisotropie = Draw::Atoi( a[5] );
+         Anisotropie = Draw::Atoi( a[5] ) != 0;
        }
       else if (strcmp( flag, "-c" ) == 0 && n == 6)
        {
index a50255bc6bb67dfe11d67bf4f56358eb4742937e..0a307e8fedc1333cc5260cda2f47e63bdc3867c4 100644 (file)
@@ -529,7 +529,7 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
      else
        {  
          TopoDS_Shape Guide = DBRep::Get(a[2],TopAbs_WIRE);
-          Standard_Integer CurvilinearEquivalence = Draw::Atoi(a[3]);
+          Standard_Boolean CurvilinearEquivalence = Draw::Atoi(a[3]) != 0;
           Standard_Integer KeepContact = Draw::Atoi(a[4]);
           Sweep->SetMode(TopoDS::Wire(Guide),
                          CurvilinearEquivalence,
index 2cbf5e28eb3532932a197304d17f815dfd5c2cec..bc53a4690d036c0d3aded72a4073056bce52fce1 100644 (file)
@@ -56,8 +56,8 @@ char Name[100];
 
 BRepToIGES_BREntity::BRepToIGES_BREntity()
 : TheUnitFactor(1.0),
-  myConvSurface(Interface_Static::IVal("write.convertsurface.mode")),
-  myPCurveMode (Interface_Static::IVal("write.surfacecurve.mode")),
+  myConvSurface(Interface_Static::IVal("write.convertsurface.mode") != 0),
+  myPCurveMode (Interface_Static::IVal("write.surfacecurve.mode")   != 0),
   TheMap       (new Transfer_FinderProcess())
 {
 }
@@ -71,8 +71,8 @@ void BRepToIGES_BREntity::Init()
 {  
   TheMap = new Transfer_FinderProcess();
   TheUnitFactor = 1.;
-  myConvSurface = Interface_Static::IVal("write.convertsurface.mode");
-  myPCurveMode = Interface_Static::IVal("write.surfacecurve.mode");
+  myConvSurface = Interface_Static::IVal("write.convertsurface.mode") != 0;
+  myPCurveMode  = Interface_Static::IVal("write.surfacecurve.mode")   != 0;
 }
 
 //=======================================================================
index 11fe292b80472690eba8a4d5da8d3314eb4f4038..c95525f2e5bb339e3f9f15738ee3683e92e84aa3 100644 (file)
@@ -724,10 +724,10 @@ Handle(IGESSolid_ManifoldSolid) BRepToIGESBRep_Entity ::TransferSolid (const Top
     FirstShell = GetCasted(IGESSolid_Shell, Seq->Value(1));
     ShellFlag = SeqFlag.Value(1);
     Tab.Nullify();  TabFlag.Nullify();
-    mysol->Init(FirstShell, ShellFlag, Tab, TabFlag);
+    mysol->Init(FirstShell, ShellFlag != 0, Tab, TabFlag);
   }
   else if (nbshells >=2 ) {
-    mysol->Init(FirstShell, ShellFlag, Tab, TabFlag);
+    mysol->Init(FirstShell, ShellFlag != 0, Tab, TabFlag);
   }
   else
     AddWarning (start, " no Result ");
index 522236e6a6549b7251de5ab161047276ee051591..4f3385f5c1faba153619f28db57fd2a099cf6675 100644 (file)
@@ -504,7 +504,7 @@ TopoDS_Shape BRepTools_Quilt::Shells() const
   // Unclose all shells having free edges
   for (TopTools_DataMapIteratorOfDataMapOfShapeShape it(M); it.More(); it.Next()) {
     TopoDS_Shape S = it.Value();
-    S.Closed(Standard_Boolean(Standard_False));
+    S.Closed (Standard_False);
   }
   
   TopTools_MapIteratorOfMapOfShape itother(MapOtherShape); //gka version for free edges
index 85b5c02341c8c1972b904dd27f582f958eafb12b..1fab06a2a9df9ebb58561e3edc2d12ad977f129c 100644 (file)
@@ -165,7 +165,7 @@ void BinLDrivers_DocumentSection::Write (Standard_OStream&   theStream,
   Standard_Integer aVal[3] = {
     Standard_Integer(myValue[0]),
     Standard_Integer(myValue[1]),
-    Standard_Integer(myIsPostRead)
+    Standard_Integer(myIsPostRead ? 1 : 0)
   };
 #if DO_INVERSE
   aVal[0] = InverseSize(aVal[0]);
@@ -204,6 +204,6 @@ void BinLDrivers_DocumentSection::ReadTOC
 #endif
     theSection.myValue[0] = (Standard_Size)aValue[0];
     theSection.myValue[1] = (Standard_Size)aValue[1];
-    theSection.myIsPostRead = (Standard_Boolean)aValue[2];
+    theSection.myIsPostRead = aValue[2] != 0;
   }
 }
index cecf7933ad16d9b07a604c448aae903bfcc287bd..832d60f682550eb101b3fc577b0c351e5b38394e 100644 (file)
@@ -76,7 +76,7 @@ Standard_Boolean BinMDataStd_ByteArrayDriver::Paste(const BinObjMgt_Persistent&
     if (! (theSource >> aDeltaValue))
       return Standard_False;
     else
-      aDelta = (Standard_Boolean)aDeltaValue;
+      aDelta = (aDeltaValue != 0);
   }
   anAtt->SetDelta(aDelta);
   return Standard_True;
@@ -106,5 +106,5 @@ void BinMDataStd_ByteArrayDriver::Paste(const Handle(TDF_Attribute)& theSource,
   }
   Standard_Byte *aPtr = (Standard_Byte *) &aSourceArray(lower);
   theTarget.PutByteArray(aPtr, bytes->Length());
-  theTarget << (Standard_Byte)anAtt->GetDelta();
+  theTarget << (Standard_Byte)(anAtt->GetDelta() ? 1 : 0);
 }
index 3d26246e6ed973eec32aae4f634c6ab07002364f..77ebe603bfbd57aaad5113e44b313117af2d9513 100644 (file)
@@ -87,7 +87,7 @@ Standard_Boolean BinMDataStd_ExtStringArrayDriver::Paste
            return Standard_False;
          }
       else
-       aDelta = (Standard_Boolean)aDeltaValue;
+       aDelta = (aDeltaValue != 0);
        }
     anAtt->SetDelta(aDelta);
   }
@@ -113,5 +113,5 @@ void BinMDataStd_ExtStringArrayDriver::Paste
   for (Standard_Integer i = aFirstInd; i <= aLastInd; i ++)
     theTarget << anAtt->Value( i );
 
-  theTarget << (Standard_Byte)anAtt->GetDelta();
+  theTarget << (Standard_Byte)(anAtt->GetDelta() ? 1 : 0);
 }
index be90e5c102bcc1b3cbde4a6a70e0d9cdae29ed01..ccc5e91e64e511c4f0d3675564b977d85c2bc790 100644 (file)
@@ -92,7 +92,7 @@ Standard_Boolean BinMDataStd_IntPackedMapDriver::Paste
     if (! (Source >> aDeltaValue))
       return Standard_False;
     else
-      aDelta = (Standard_Boolean)aDeltaValue;
+      aDelta = (aDeltaValue != 0);
   }
   aTagAtt->SetDelta(aDelta);
   return Standard_True;
@@ -120,5 +120,5 @@ void BinMDataStd_IntPackedMapDriver::Paste
     for(;anIt.More();anIt.Next())
       Target << anIt.Key();
   }
-  Target << (Standard_Byte)anAtt->GetDelta(); 
+  Target << (Standard_Byte)(anAtt->GetDelta() ? 1 : 0);
 }
index 1762a6f27cfb6aced77c27d1d01f58c96e5e84ef..93ac3e50fce903b7d156f068ab3762d036db734c 100644 (file)
@@ -74,7 +74,7 @@ Standard_Boolean BinMDataStd_IntegerArrayDriver::Paste
     if (! (theSource >> aDeltaValue))
       return Standard_False;
     else
-      aDelta = (Standard_Boolean)aDeltaValue;
+      aDelta = (aDeltaValue != 0);
   }
 #ifdef OCCT_DEBUG
   else if(BinMDataStd::DocumentVersion() == -1)
@@ -103,5 +103,5 @@ void BinMDataStd_IntegerArrayDriver::Paste
   theTarget << aFirstInd << aLastInd;
   Standard_Integer *aPtr = (Standard_Integer *) &aSourceArray(aFirstInd);
   theTarget.PutIntArray (aPtr, aLength);
-  theTarget << (Standard_Byte)anAtt->GetDelta(); 
+  theTarget << (Standard_Byte)(anAtt->GetDelta() ? 1 : 0);
 }
index 8c165d20ebf9446acbe10560483435fc80c6359c..9346b5e1b99ea4c07cc1a2457087937686808e2b 100644 (file)
@@ -75,7 +75,7 @@ Standard_Boolean BinMDataStd_RealArrayDriver::Paste
     if (! (theSource >> aDeltaValue))
       return Standard_False;
     else
-      aDelta = (Standard_Boolean)aDeltaValue;
+      aDelta = (aDeltaValue != 0);
   }
   anAtt->SetDelta(aDelta);
   return Standard_True; 
@@ -100,5 +100,5 @@ void BinMDataStd_RealArrayDriver::Paste
   theTarget << aFirstInd << aLastInd;
   Standard_Real *aPtr = (Standard_Real *) &aSourceArray(aFirstInd);
   theTarget.PutRealArray (aPtr, aLength);
-  theTarget << (Standard_Byte)anAtt->GetDelta(); 
+  theTarget << (Standard_Byte)(anAtt->GetDelta() ? 1 : 0);
 }
index 7ed731a9cad07e7a221503f2baa8c9250b1b308d..47ce2b4340c018f644415c75f483b64021ca4b2d 100644 (file)
@@ -124,9 +124,9 @@ Standard_Boolean BinMDataXtd_ConstraintDriver::Paste
   Standard_Integer flags;
   if (! (theSource >> flags))
     return Standard_False;
-  aC->Verified( flags & 1);
-  aC->Inverted( flags & 2);
-  aC->Reversed( flags & 4);
+  aC->Verified ((flags & 1) != 0);
+  aC->Inverted ((flags & 2) != 0);
+  aC->Reversed ((flags & 4) != 0);
 
   return Standard_True;
 }
index cc1423cffa1a789c8e77073834eaa9b5fe455db3..db7522608863a1a62b8d5455e5844fc3997f1c1e 100644 (file)
@@ -69,8 +69,8 @@ Standard_Boolean BinMDataXtd_PatternStdDriver::Paste
   Standard_Integer revFlags;
   if (! (theSource >> revFlags))
     return Standard_False;
-  aP->Axis1Reversed( revFlags & 1 );
-  aP->Axis2Reversed( revFlags & 2 );
+  aP->Axis1Reversed ((revFlags & 1) != 0);
+  aP->Axis2Reversed ((revFlags & 2) != 0);
 
   Handle(TNaming_NamedShape) TNS;
   Standard_Integer aNb;
index feab732ef8918e9e86c6fccaae0dd3147cb3f8ff..0dc0dc3140a06737d992e4dddd5ea2e8be0b7357 100644 (file)
@@ -58,7 +58,7 @@ Standard_Boolean BinMDataXtd_PresentationDriver::Paste
   Standard_Integer aValue;
   ok = theSource >> aValue;
   if (!ok) return ok;
-  anAttribute->SetDisplayed(static_cast<Standard_Boolean>(aValue));
+  anAttribute->SetDisplayed (aValue != 0);
 
   // GUID
   Standard_GUID aGUID;
index de9eb245e7c0945bbc6c010edad605b636818d54..c7c22afc07a7d5d92f300130d9d34be5521bf01f 100644 (file)
@@ -227,6 +227,6 @@ inline const BinObjMgt_Persistent& BinObjMgt_Persistent::GetBoolean
 //  Standard_Integer anIntVal = (Standard_Integer) theValue;
   Standard_Integer anIntVal;
   GetInteger (anIntVal);
-  theValue = (Standard_Boolean) anIntVal;
+  theValue = anIntVal != 0;
   return *this;
 }
index 5bcc1efc7f71f7fe15adda39e0bdeec735b3b7f8..8a6ed5a83af48110b571359f65012033ccad3f06 100644 (file)
@@ -26,7 +26,7 @@
 //=======================================================================
 Standard_OStream& BinTools::PutBool(Standard_OStream& OS, const Standard_Boolean aValue)
 {
-  OS.put((Standard_Byte)aValue);
+  OS.put((Standard_Byte)(aValue ? 1 : 0));
   return OS;
 }
 
@@ -128,7 +128,7 @@ Standard_IStream& BinTools::GetExtChar(Standard_IStream& IS, Standard_ExtCharact
 
 Standard_IStream& BinTools::GetBool(Standard_IStream& IS, Standard_Boolean& aValue)
 {
-  aValue = (Standard_Boolean)IS.get();
+  aValue = (IS.get() != 0);
   return IS;
 }
 
index 27f9f489850b1e329b74faa3d31316d601c007e4..360e6e9cdb32b5a4c5a5ffe02c25f96a46a4fbe5 100644 (file)
@@ -14,7 +14,6 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-
 #include <Bnd_Box.hxx>
 #include <gp_Dir.hxx>
 #include <gp_Lin.hxx>
 #include <gp_Trsf.hxx>
 #include <Standard_ConstructionError.hxx>
 
-#define VoidMask  0x01
-#define XminMask  0x02
-#define XmaxMask  0x04
-#define YminMask  0x08
-#define YmaxMask  0x10
-#define ZminMask  0x20
-#define ZmaxMask  0x40
-#define WholeMask 0x7e
-
-// Standard_True if the flag is one
-#define VoidFlag()  ( Flags & VoidMask )
-#define XminFlag()  ( Flags & XminMask )
-#define XmaxFlag()  ( Flags & XmaxMask )
-#define YminFlag()  ( Flags & YminMask )
-#define YmaxFlag()  ( Flags & YmaxMask )
-#define ZminFlag()  ( Flags & ZminMask )
-#define ZmaxFlag()  ( Flags & ZmaxMask )
-#define WholeFlag() ( (Flags & WholeMask) == WholeMask )
-
 // set the flag to one
-#define SetVoidFlag()  ( Flags = VoidMask )
-#define SetXminFlag()  ( Flags |= XminMask )
-#define SetXmaxFlag()  ( Flags |= XmaxMask )
-#define SetYminFlag()  ( Flags |= YminMask )
-#define SetYmaxFlag()  ( Flags |= YmaxMask )
-#define SetZminFlag()  ( Flags |= ZminMask )
-#define SetZmaxFlag()  ( Flags |= ZmaxMask )
-#define SetWholeFlag() ( Flags = WholeMask )
-
 #define ClearVoidFlag() ( Flags &= ~VoidMask )
 
 #include <Standard_Stream.hxx>
@@ -70,27 +41,6 @@ Bnd_Box::Bnd_Box()
   SetVoid();
 }
 
-//=======================================================================
-//function : SetWhole
-//purpose  : 
-//=======================================================================
-
-void Bnd_Box::SetWhole ()
-{
-  SetWholeFlag();
-}
-
-//=======================================================================
-//function : SetVoid
-//purpose  : 
-//=======================================================================
-
-void Bnd_Box::SetVoid ()
-{
-  SetVoidFlag();
-  Gap=0.;
-}
-
 //=======================================================================
 //function : Set
 //purpose  : 
@@ -126,7 +76,8 @@ void Bnd_Box::Update (const Standard_Real x,
                      const Standard_Real Y, 
                      const Standard_Real Z)
 {
-  if (VoidFlag()) {
+  if (IsVoid())
+  {
     Xmin = x;
     Ymin = y;
     Zmin = z;
@@ -136,12 +87,12 @@ void Bnd_Box::Update (const Standard_Real x,
     ClearVoidFlag();
   }
   else {
-    if (!XminFlag() && (x < Xmin)) Xmin = x;
-    if (!XmaxFlag() && (X > Xmax)) Xmax = X;
-    if (!YminFlag() && (y < Ymin)) Ymin = y;
-    if (!YmaxFlag() && (Y > Ymax)) Ymax = Y;
-    if (!ZminFlag() && (z < Zmin)) Zmin = z;
-    if (!ZmaxFlag() && (Z > Zmax)) Zmax = Z;
+    if (!IsOpenXmin() && (x < Xmin)) Xmin = x;
+    if (!IsOpenXmax() && (X > Xmax)) Xmax = X;
+    if (!IsOpenYmin() && (y < Ymin)) Ymin = y;
+    if (!IsOpenYmax() && (Y > Ymax)) Ymax = Y;
+    if (!IsOpenZmin() && (z < Zmin)) Zmin = z;
+    if (!IsOpenZmax() && (Z > Zmax)) Zmax = Z;
   }
 }
 
@@ -154,7 +105,8 @@ void Bnd_Box::Update (const Standard_Real X,
                      const Standard_Real Y,
                      const Standard_Real Z)
 {
-  if (VoidFlag()) {
+  if (IsVoid())
+  {
     Xmin = X;
     Ymin = Y;
     Zmin = Z;
@@ -164,12 +116,12 @@ void Bnd_Box::Update (const Standard_Real X,
     ClearVoidFlag();
   }
   else {
-    if      (!XminFlag() && (X < Xmin)) Xmin = X;
-    else if (!XmaxFlag() && (X > Xmax)) Xmax = X;
-    if      (!YminFlag() && (Y < Ymin)) Ymin = Y;
-    else if (!YmaxFlag() && (Y > Ymax)) Ymax = Y;
-    if      (!ZminFlag() && (Z < Zmin)) Zmin = Z;
-    else if (!ZmaxFlag() && (Z > Zmax)) Zmax = Z;
+    if      (!IsOpenXmin() && (X < Xmin)) Xmin = X;
+    else if (!IsOpenXmax() && (X > Xmax)) Xmax = X;
+    if      (!IsOpenYmin() && (Y < Ymin)) Ymin = Y;
+    else if (!IsOpenYmax() && (Y > Ymax)) Ymax = Y;
+    if      (!IsOpenZmin() && (Z < Zmin)) Zmin = Z;
+    else if (!IsOpenZmax() && (Z > Zmax)) Zmax = Z;
   }
 }
 
@@ -215,23 +167,23 @@ void Bnd_Box::Get (Standard_Real& theXmin,
                    Standard_Real& theYmax,
                    Standard_Real& theZmax) const
 {
-  if (VoidFlag())
+  if (IsVoid())
   {
     Standard_ConstructionError::Raise ("Bnd_Box is void");
   }
 
-  if (XminFlag())  theXmin = -Bnd_Precision_Infinite;
-  else             theXmin = Xmin - Gap;
-  if (XmaxFlag())  theXmax = Bnd_Precision_Infinite;
-  else             theXmax = Xmax + Gap;
-  if (YminFlag())  theYmin = -Bnd_Precision_Infinite;
-  else             theYmin = Ymin - Gap;
-  if (YmaxFlag())  theYmax = Bnd_Precision_Infinite;
-  else             theYmax = Ymax + Gap;
-  if (ZminFlag())  theZmin = -Bnd_Precision_Infinite;
-  else             theZmin = Zmin - Gap;
-  if (ZmaxFlag())  theZmax = Bnd_Precision_Infinite;
-  else             theZmax = Zmax + Gap;
+  if (IsOpenXmin()) theXmin = -Bnd_Precision_Infinite;
+  else              theXmin = Xmin - Gap;
+  if (IsOpenXmax()) theXmax = Bnd_Precision_Infinite;
+  else              theXmax = Xmax + Gap;
+  if (IsOpenYmin()) theYmin = -Bnd_Precision_Infinite;
+  else              theYmin = Ymin - Gap;
+  if (IsOpenYmax()) theYmax = Bnd_Precision_Infinite;
+  else              theYmax = Ymax + Gap;
+  if (IsOpenZmin()) theZmin = -Bnd_Precision_Infinite;
+  else              theZmin = Zmin - Gap;
+  if (IsOpenZmax()) theZmax = Bnd_Precision_Infinite;
+  else              theZmax = Zmax + Gap;
 }
 
 //=======================================================================
@@ -242,17 +194,17 @@ void Bnd_Box::Get (Standard_Real& theXmin,
 gp_Pnt Bnd_Box::CornerMin() const
 {
   gp_Pnt aCornerMin;
-  if (VoidFlag())
+  if (IsVoid())
   {
     Standard_ConstructionError::Raise ("Bnd_Box is void");
     return aCornerMin;
   }
-  if (XminFlag())  aCornerMin.SetX (-Bnd_Precision_Infinite);
-  else             aCornerMin.SetX (Xmin - Gap);
-  if (YminFlag())  aCornerMin.SetY (-Bnd_Precision_Infinite);
-  else             aCornerMin.SetY (Ymin - Gap);
-  if (ZminFlag())  aCornerMin.SetZ (-Bnd_Precision_Infinite);
-  else             aCornerMin.SetZ (Zmin - Gap);
+  if (IsOpenXmin()) aCornerMin.SetX (-Bnd_Precision_Infinite);
+  else              aCornerMin.SetX (Xmin - Gap);
+  if (IsOpenYmin()) aCornerMin.SetY (-Bnd_Precision_Infinite);
+  else              aCornerMin.SetY (Ymin - Gap);
+  if (IsOpenZmin()) aCornerMin.SetZ (-Bnd_Precision_Infinite);
+  else              aCornerMin.SetZ (Zmin - Gap);
   return aCornerMin;
 }
 
@@ -264,160 +216,20 @@ gp_Pnt Bnd_Box::CornerMin() const
 gp_Pnt Bnd_Box::CornerMax() const
 {
   gp_Pnt aCornerMax;
-  if(VoidFlag())
+  if (IsVoid())
   {
     Standard_ConstructionError::Raise ("Bnd_Box is void");
     return aCornerMax;
   }
-  if (XmaxFlag())  aCornerMax.SetX (Bnd_Precision_Infinite);
-  else             aCornerMax.SetX (Xmax + Gap);
-  if (YminFlag())  aCornerMax.SetY (Bnd_Precision_Infinite);
-  else             aCornerMax.SetY (Ymax + Gap);
-  if (ZminFlag())  aCornerMax.SetZ (Bnd_Precision_Infinite);
-  else             aCornerMax.SetZ (Zmax + Gap);
+  if (IsOpenXmax()) aCornerMax.SetX (Bnd_Precision_Infinite);
+  else              aCornerMax.SetX (Xmax + Gap);
+  if (IsOpenYmin()) aCornerMax.SetY (Bnd_Precision_Infinite);
+  else              aCornerMax.SetY (Ymax + Gap);
+  if (IsOpenZmin()) aCornerMax.SetZ (Bnd_Precision_Infinite);
+  else              aCornerMax.SetZ (Zmax + Gap);
   return aCornerMax;
 }
 
-//=======================================================================
-//function : OpenXmin
-//purpose  : 
-//=======================================================================
-
-void Bnd_Box::OpenXmin ()
-{
-  SetXminFlag();
-}
-
-//=======================================================================
-//function : OpenXmax
-//purpose  : 
-//=======================================================================
-
-void Bnd_Box::OpenXmax ()
-{
-  SetXmaxFlag();
-}
-
-//=======================================================================
-//function : OpenYmin
-//purpose  : 
-//=======================================================================
-
-void Bnd_Box::OpenYmin ()
-{
-  SetYminFlag();
-}
-
-//=======================================================================
-//function : OpenYmax
-//purpose  : 
-//=======================================================================
-
-void Bnd_Box::OpenYmax ()
-{
-  SetYmaxFlag();
-}
-
-//=======================================================================
-//function : OpenZmin
-//purpose  : 
-//=======================================================================
-
-void Bnd_Box::OpenZmin ()
-{
-  SetZminFlag();
-}
-
-//=======================================================================
-//function : OpenZmax
-//purpose  : 
-//=======================================================================
-
-void Bnd_Box::OpenZmax ()
-{
-  SetZmaxFlag();
-}
-
-//=======================================================================
-//function : IsOpenXmin
-//purpose  : 
-//=======================================================================
-
-Standard_Boolean Bnd_Box::IsOpenXmin () const
-{
-  return XminFlag();
-}
-
-//=======================================================================
-//function : IsOpenXmax
-//purpose  : 
-//=======================================================================
-
-Standard_Boolean Bnd_Box::IsOpenXmax () const
-{
-  return XmaxFlag();
-}
-
-//=======================================================================
-//function : IsOpenYmin
-//purpose  : 
-//=======================================================================
-
-Standard_Boolean Bnd_Box::IsOpenYmin () const
-{
-  return YminFlag();
-}
-
-//=======================================================================
-//function : IsOpenYmax
-//purpose  : 
-//=======================================================================
-
-Standard_Boolean Bnd_Box::IsOpenYmax () const
-{
-  return YmaxFlag();
-}
-
-//=======================================================================
-//function : IsOpenZmin
-//purpose  : 
-//=======================================================================
-
-Standard_Boolean Bnd_Box::IsOpenZmin () const
-{
-  return ZminFlag();
-}
-
-//=======================================================================
-//function : IsOpenZmax
-//purpose  : 
-//=======================================================================
-
-Standard_Boolean Bnd_Box::IsOpenZmax () const
-{
-  return ZmaxFlag();
-}
-
-//=======================================================================
-//function : IsWhole
-//purpose  : 
-//=======================================================================
-
-Standard_Boolean Bnd_Box::IsWhole () const
-{
-  return WholeFlag();
-}
-
-//=======================================================================
-//function : IsVoid
-//purpose  : 
-//=======================================================================
-
-Standard_Boolean Bnd_Box::IsVoid () const
-{
-  return VoidFlag();
-}
-
 //=======================================================================
 //function : IsXThin
 //purpose  : 
@@ -427,8 +239,8 @@ Standard_Boolean Bnd_Box::IsXThin (const Standard_Real tol) const
 {
   if (IsWhole())       return Standard_False;
   if (IsVoid())        return Standard_True;
-  if (XminFlag())      return Standard_False;
-  if (XmaxFlag())      return Standard_False;
+  if (IsOpenXmin())    return Standard_False;
+  if (IsOpenXmax())    return Standard_False;
   if (Xmax-Xmin < tol) return Standard_True;
   return Standard_False;
 }
@@ -442,8 +254,8 @@ Standard_Boolean Bnd_Box::IsYThin (const Standard_Real tol) const
 {
   if (IsWhole())       return Standard_False;
   if (IsVoid())        return Standard_True;
-  if (YminFlag())      return Standard_False;
-  if (YmaxFlag())      return Standard_False;
+  if (IsOpenYmin())    return Standard_False;
+  if (IsOpenYmax())    return Standard_False;
   if (Ymax-Ymin < tol) return Standard_True;
   return Standard_False;
 }
@@ -457,8 +269,8 @@ Standard_Boolean Bnd_Box::IsZThin (const Standard_Real tol) const
 {
   if (IsWhole())       return Standard_False;
   if (IsVoid())        return Standard_True;
-  if (ZminFlag())      return Standard_False;
-  if (ZmaxFlag())      return Standard_False;
+  if (IsOpenZmin())    return Standard_False;
+  if (IsOpenZmax())    return Standard_False;
   if (Zmax-Zmin < tol) return Standard_True;
   return Standard_False;
 }
@@ -491,12 +303,12 @@ Bnd_Box Bnd_Box::Transformed (const gp_Trsf& T) const
   else if (F == gp_Translation) {
     Standard_Real DX,DY,DZ;
     (T.TranslationPart()).Coord(DX,DY,DZ);
-    if (!XminFlag())  newb.Xmin += DX;
-    if (!XmaxFlag())  newb.Xmax += DX;
-    if (!YminFlag())  newb.Ymin += DY;
-    if (!YmaxFlag())  newb.Ymax += DY;
-    if (!ZminFlag())  newb.Zmin += DZ;
-    if (!ZmaxFlag())  newb.Zmax += DZ;
+    if (!IsOpenXmin()) newb.Xmin += DX;
+    if (!IsOpenXmax()) newb.Xmax += DX;
+    if (!IsOpenYmin()) newb.Ymin += DY;
+    if (!IsOpenYmax()) newb.Ymax += DY;
+    if (!IsOpenZmin()) newb.Zmin += DZ;
+    if (!IsOpenZmax()) newb.Zmax += DZ;
   }
   else {
     gp_Pnt P[8];
@@ -507,32 +319,38 @@ Bnd_Box Bnd_Box::Transformed (const gp_Trsf& T) const
 //    Standard_Integer vertices = 0;
     Standard_Integer directions = 0;
 
-    if (XminFlag()) {
+    if (IsOpenXmin())
+    {
       directions++;
       D[directions-1].SetCoord(-1., 0., 0.);
       Vertex[0] = Vertex[2] = Vertex[4] = Vertex[6] = Standard_False;
     }
-    if (XmaxFlag()) {
+    if (IsOpenXmax())
+    {
       directions++;
       D[directions-1].SetCoord( 1., 0., 0.);
       Vertex[1] = Vertex[3] = Vertex[5] = Vertex[7] = Standard_False;
     }
-    if (YminFlag()) {
+    if (IsOpenYmin())
+    {
       directions++;
       D[directions-1].SetCoord( 0.,-1., 0.);
       Vertex[0] = Vertex[1] = Vertex[4] = Vertex[5] = Standard_False;
     }
-    if (YmaxFlag()) {
+    if (IsOpenYmax())
+    {
       directions++;
       D[directions-1].SetCoord( 0., 1., 0.);
       Vertex[2] = Vertex[3] = Vertex[6] = Vertex[7] = Standard_False;
     }
-    if (ZminFlag()) {
+    if (IsOpenZmin())
+    {
       directions++;
       D[directions-1].SetCoord( 0., 0.,-1.);
       Vertex[0] = Vertex[1] = Vertex[2] = Vertex[3] = Standard_False;
     }
-    if (ZmaxFlag()) {
+    if (IsOpenZmax())
+    {
       directions++;
       D[directions-1].SetCoord( 0., 0., 1.);
       Vertex[4] = Vertex[5] = Vertex[6] = Vertex[7] = Standard_False;
@@ -671,12 +489,12 @@ Standard_Boolean Bnd_Box::IsOut (const gp_Pnt& P) const
   else {
     Standard_Real X,Y,Z;
     P.Coord(X,Y,Z);
-    if      (!XminFlag() && (X < (Xmin-Gap))) return Standard_True;
-    else if (!XmaxFlag() && (X > (Xmax+Gap))) return Standard_True;
-    else if (!YminFlag() && (Y < (Ymin-Gap))) return Standard_True;
-    else if (!YmaxFlag() && (Y > (Ymax+Gap))) return Standard_True;
-    else if (!ZminFlag() && (Z < (Zmin-Gap))) return Standard_True;
-    else if (!ZmaxFlag() && (Z > (Zmax+Gap))) return Standard_True;
+    if      (!IsOpenXmin() && (X < (Xmin-Gap))) return Standard_True;
+    else if (!IsOpenXmax() && (X > (Xmax+Gap))) return Standard_True;
+    else if (!IsOpenYmin() && (Y < (Ymin-Gap))) return Standard_True;
+    else if (!IsOpenYmax() && (Y > (Ymax+Gap))) return Standard_True;
+    else if (!IsOpenZmin() && (Z < (Zmin-Gap))) return Standard_True;
+    else if (!IsOpenZmax() && (Z > (Zmax+Gap))) return Standard_True;
     else return Standard_False;
   }
 }
@@ -839,19 +657,19 @@ Standard_Boolean Bnd_Box::IsOut (const Bnd_Box& Other) const
 
   Standard_Real delta = Other.Gap + Gap;
 
-  if (!XminFlag() && !Other.IsOpenXmax())
+  if (!IsOpenXmin() && !Other.IsOpenXmax())
     if (Xmin - Other.Xmax > delta) return Standard_True;
-  if (!XmaxFlag() && !Other.IsOpenXmin())
+  if (!IsOpenXmax() && !Other.IsOpenXmin())
     if (Other.Xmin - Xmax > delta) return Standard_True;
   
-  if (!YminFlag() && !Other.IsOpenYmax())
+  if (!IsOpenYmin() && !Other.IsOpenYmax())
     if (Ymin - Other.Ymax > delta) return Standard_True;
-  if (!YmaxFlag() && !Other.IsOpenYmin())
+  if (!IsOpenYmax() && !Other.IsOpenYmin())
     if (Other.Ymin - Ymax > delta) return Standard_True;
   
-  if (!ZminFlag() && !Other.IsOpenZmax())
+  if (!IsOpenZmin() && !Other.IsOpenZmax())
     if (Zmin - Other.Zmax > delta) return Standard_True;
-  if (!ZmaxFlag() && !Other.IsOpenZmin())
+  if (!IsOpenZmax() && !Other.IsOpenZmin())
     if (Other.Zmin - Zmax > delta) return Standard_True;
 
   return Standard_False;
index 8d8a86c32d11328ffb6dc31a9b6152cb49e2e414..06e198c057b018abd6c22659617ffa302d664fab 100644 (file)
@@ -68,14 +68,18 @@ public:
   //! Creates an empty Box.
   //! The constructed box is qualified Void. Its gap is null.
   Standard_EXPORT Bnd_Box();
-  
+
   //! Sets this bounding box so that it  covers the whole of 3D space.
   //! It is infinitely  long in all directions.
-  Standard_EXPORT void SetWhole();
-  
+  void SetWhole() { Flags = WholeMask; }
+
   //! Sets this bounding box so that it is empty. All points are outside a void box.
-  Standard_EXPORT void SetVoid();
-  
+  void SetVoid()
+  {
+    Flags = VoidMask;
+    Gap   = 0.0;
+  }
+
   //! Sets this bounding box so that it bounds
   //! -   the point P. This involves first setting this bounding box
   //! to be void and then adding the point P.
@@ -132,55 +136,55 @@ public:
   //! Standard_ConstructionError exception will be thrown if the box is void.
   //! if IsVoid()
   Standard_EXPORT gp_Pnt CornerMax() const;
-  
+
   //! The   Box will be   infinitely   long  in the Xmin
   //! direction.
-  Standard_EXPORT void OpenXmin();
-  
+  void OpenXmin() { Flags |= XminMask; }
+
   //! The   Box will be   infinitely   long  in the Xmax
   //! direction.
-  Standard_EXPORT void OpenXmax();
-  
+  void OpenXmax() { Flags |= XmaxMask; }
+
   //! The   Box will be   infinitely   long  in the Ymin
   //! direction.
-  Standard_EXPORT void OpenYmin();
-  
+  void OpenYmin() { Flags |= YminMask; }
+
   //! The   Box will be   infinitely   long  in the Ymax
   //! direction.
-  Standard_EXPORT void OpenYmax();
-  
+  void OpenYmax() { Flags |= YmaxMask; }
+
   //! The   Box will be   infinitely   long  in the Zmin
   //! direction.
-  Standard_EXPORT void OpenZmin();
-  
+  void OpenZmin() { Flags |= ZminMask; }
+
   //! The   Box will be   infinitely   long  in the Zmax
   //! direction.
-  Standard_EXPORT void OpenZmax();
-  
+  void OpenZmax() { Flags |= ZmaxMask; }
+
   //! Returns true if this bounding box is open in the  Xmin direction.
-  Standard_EXPORT Standard_Boolean IsOpenXmin() const;
-  
+  Standard_Boolean IsOpenXmin() const { return (Flags & XminMask) != 0; }
+
   //! Returns true if this bounding box is open in the  Xmax direction.
-  Standard_EXPORT Standard_Boolean IsOpenXmax() const;
-  
+  Standard_Boolean IsOpenXmax() const { return (Flags & XmaxMask) != 0; }
+
   //! Returns true if this bounding box is open in the  Ymix direction.
-  Standard_EXPORT Standard_Boolean IsOpenYmin() const;
-  
+  Standard_Boolean IsOpenYmin() const { return (Flags & YminMask) != 0; }
+
   //! Returns true if this bounding box is open in the  Ymax direction.
-  Standard_EXPORT Standard_Boolean IsOpenYmax() const;
-  
+  Standard_Boolean IsOpenYmax() const { return (Flags & YmaxMask) != 0; }
+
   //! Returns true if this bounding box is open in the  Zmin direction.
-  Standard_EXPORT Standard_Boolean IsOpenZmin() const;
-  
+  Standard_Boolean IsOpenZmin() const { return (Flags & ZminMask) != 0; }
+
   //! Returns true if this bounding box is open in the  Zmax  direction.
-  Standard_EXPORT Standard_Boolean IsOpenZmax() const;
-  
+  Standard_Boolean IsOpenZmax() const { return (Flags & ZmaxMask) != 0; }
+
   //! Returns true if this bounding box is infinite in all 6 directions (WholeSpace flag).
-  Standard_EXPORT Standard_Boolean IsWhole() const;
-  
+  Standard_Boolean IsWhole()    const { return (Flags & WholeMask) == WholeMask; }
+
   //! Returns true if this bounding box is empty (Void flag).
-  Standard_EXPORT Standard_Boolean IsVoid() const;
-  
+  Standard_Boolean IsVoid()     const { return (Flags & VoidMask) != 0; }
+
   //! true if xmax-xmin < tol.
   Standard_EXPORT Standard_Boolean IsXThin (const Standard_Real tol) const;
   
@@ -245,23 +249,38 @@ public:
   Standard_EXPORT Standard_Real Distance (const Bnd_Box& Other) const;
   
   Standard_EXPORT void Dump() const;
-  
-  //! Computes the squared diagonal of me.
-    Standard_Real SquareExtent() const;
-
 
+  //! Computes the squared diagonal of me.
+  Standard_Real SquareExtent() const
+  {
+    if (IsVoid())
+    {
+      return 0.0;
+    }
 
+    const Standard_Real aDx = Xmax - Xmin + Gap + Gap;
+    const Standard_Real aDy = Ymax - Ymin + Gap + Gap;
+    const Standard_Real aDz = Zmax - Zmin + Gap + Gap;
+    return aDx * aDx + aDy * aDy + aDz * aDz;
+  }
 
 protected:
 
-
-
-
+  //! Bit flags.
+  enum MaskFlags
+  {
+    VoidMask  = 0x01,
+    XminMask  = 0x02,
+    XmaxMask  = 0x04,
+    YminMask  = 0x08,
+    YmaxMask  = 0x10,
+    ZminMask  = 0x20,
+    ZmaxMask  = 0x40,
+    WholeMask = 0x7e
+  };
 
 private:
 
-
-
   Standard_Real Xmin;
   Standard_Real Xmax;
   Standard_Real Ymin;
@@ -271,14 +290,6 @@ private:
   Standard_Real Gap;
   Standard_Integer Flags;
 
-
 };
 
-
-#include <Bnd_Box.lxx>
-
-
-
-
-
 #endif // _Bnd_Box_HeaderFile
diff --git a/src/Bnd/Bnd_Box.lxx b/src/Bnd/Bnd_Box.lxx
deleted file mode 100644 (file)
index edf29b7..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Created on: 2005-02-14
-// Created by: Alexey MORENOV
-// Copyright (c) 2005-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-//=======================================================================
-//function : SquareExtent
-//purpose  : Computes the squared diagonal
-//=======================================================================
-
-inline Standard_Real Bnd_Box::SquareExtent() const 
-{
-  if ( IsVoid() ) return 0.;
-  const Standard_Real aDx = Xmax - Xmin + Gap + Gap;
-  const Standard_Real aDy = Ymax - Ymin + Gap + Gap;
-  const Standard_Real aDz = Zmax - Zmin + Gap + Gap;
-  return aDx*aDx + aDy*aDy + aDz*aDz;
-}
index b035be6608149e52573d169e2cb2ef5e22653101..ac8af037c3abb7edc59837d3128865bee8323156 100644 (file)
@@ -17,6 +17,7 @@
 #ifndef _Bnd_Box2d_HeaderFile
 #define _Bnd_Box2d_HeaderFile
 
+#include <gp_Pnt2d.hxx>
 #include <Standard.hxx>
 #include <Standard_DefineAlloc.hxx>
 #include <Standard_Handle.hxx>
@@ -25,7 +26,6 @@
 #include <Standard_Integer.hxx>
 #include <Standard_Boolean.hxx>
 class Standard_ConstructionError;
-class gp_Pnt2d;
 class gp_Dir2d;
 class gp_Trsf2d;
 
@@ -54,30 +54,43 @@ public:
 
   DEFINE_STANDARD_ALLOC
 
-  
   //! Creates an empty 2D bounding box.
   //! The constructed box is qualified Void. Its gap is null.
-    Bnd_Box2d();
-  
+  Bnd_Box2d() : Xmin(0.), Xmax(0.), Ymin(0.), Ymax(0.), Gap(0.), Flags (VoidMask) {}
+
   //! Sets this bounding box so that it covers the whole 2D
   //! space, i.e. it is infinite in all directions.
-    void SetWhole();
-  
+  void SetWhole() { Flags = WholeMask; }
+
   //! Sets this 2D bounding box so that it is empty. All points are outside a void box.
-    void SetVoid();
-  
+  void SetVoid()
+  {
+    Flags = VoidMask;
+    Gap   = 0.0;
+  }
+
   //! Sets this 2D bounding box so that it bounds
   //! the point P. This involves first setting this bounding box
   //! to be void and then adding the point PThe rectangle bounds   the  point <P>.
-    void Set (const gp_Pnt2d& P);
-  
+  void Set (const gp_Pnt2d& thePnt)
+  {
+    Flags = VoidMask;
+    Gap   = 0.0;
+    Add (thePnt);
+  }
+
   //! Sets this 2D bounding box so that it bounds
   //! the half-line defined by point P and direction D, i.e. all
   //! points M defined by M=P+u*D, where u is greater than
   //! or equal to 0, are inside the bounding area. This involves
   //! first setting this 2D box to be void and then adding the   half-line.
-    void Set (const gp_Pnt2d& P, const gp_Dir2d& D);
-  
+  void Set (const gp_Pnt2d& thePnt, const gp_Dir2d& theDir)
+  {
+    Flags = VoidMask;
+    Gap   = 0.0;
+    Add (thePnt, theDir);
+  }
+
   //! Enlarges this 2D bounding box, if required, so that it
   //! contains at least:
   //! -   interval [ aXmin,aXmax ] in the "X Direction",
@@ -88,57 +101,59 @@ public:
   Standard_EXPORT void Update (const Standard_Real X, const Standard_Real Y);
   
   //! Returns the gap of this 2D bounding box.
-    Standard_Real GetGap() const;
-  
+  Standard_Real GetGap() const { return Gap; }
+
   //! Set the gap of this 2D bounding box to abs(Tol).
-    void SetGap (const Standard_Real Tol);
-  
+  void SetGap (const Standard_Real Tol) { Gap = Tol; }
+
   //! Enlarges     the  box  with    a  tolerance  value.
   //! This means that the minimum values of its X and Y
   //! intervals of definition, when they are finite, are reduced by
   //! the absolute value of Tol, while the maximum values are
   //! increased by the same amount.
-    void Enlarge (const Standard_Real Tol);
-  
+  void Enlarge (const Standard_Real theTol)
+  {
+    Standard_Real aTol = theTol < 0.0 ? -theTol : theTol;
+    if (Gap < aTol) Gap = aTol;
+  }
+
   //! Returns the bounds of this 2D bounding box.
   //! The gap is included. If this bounding box is infinite (i.e. "open"), returned values
   //! may be equal to +/- Precision::Infinite().
   //! if IsVoid()
   Standard_EXPORT void Get (Standard_Real& aXmin, Standard_Real& aYmin, Standard_Real& aXmax, Standard_Real& aYmax) const;
-  
+
   //! The Box will be infinitely long in the Xmin direction.
-    void OpenXmin();
-  
+  void OpenXmin() { Flags |= XminMask; }
+
   //! The Box will be infinitely long in the Xmax direction.
-    void OpenXmax();
-  
+  void OpenXmax() { Flags |= XmaxMask; }
+
   //! The Box will be infinitely long in the Ymin direction.
-    void OpenYmin();
-  
+  void OpenYmin() { Flags |= YminMask; }
+
   //! The Box will be infinitely long in the Ymax direction.
-    void OpenYmax();
-  
+  void OpenYmax() { Flags |= YmaxMask; }
+
   //! Returns true if this bounding box is open in the Xmin direction.
-    Standard_Boolean IsOpenXmin() const;
-  
+  Standard_Boolean IsOpenXmin() const { return (Flags & XminMask) != 0; }
+
   //! Returns true if this bounding box is open in the Xmax direction.
-    Standard_Boolean IsOpenXmax() const;
-  
+  Standard_Boolean IsOpenXmax() const { return (Flags & XmaxMask) != 0; }
+
   //! Returns true if this bounding box is open in the Ymin direction.
-    Standard_Boolean IsOpenYmin() const;
-  
+  Standard_Boolean IsOpenYmin() const { return (Flags & YminMask) != 0; }
+
   //! Returns true if this bounding box is open in the Ymax direction.
-    Standard_Boolean IsOpenYmax() const;
-  
+  Standard_Boolean IsOpenYmax() const { return (Flags & YmaxMask) != 0; }
 
   //! Returns true if this bounding box is infinite in all 4
   //! directions (Whole Space flag).
-    Standard_Boolean IsWhole() const;
-  
+  Standard_Boolean IsWhole() const { return (Flags & WholeMask) == WholeMask; }
 
   //! Returns true if this 2D bounding box is empty (Void flag).
-    Standard_Boolean IsVoid() const;
-  
+  Standard_Boolean IsVoid() const { return (Flags & VoidMask) != 0; }
+
   //! Returns a bounding box which is the result of applying the
   //! transformation T to this bounding box.
   //! Warning
@@ -150,11 +165,15 @@ public:
   //! Adds the 2d box <Other> to <me>.
   Standard_EXPORT void Add (const Bnd_Box2d& Other);
   
-  //! Adds  the 2d pnt <P> to <me>.
-    void Add (const gp_Pnt2d& P);
-  
-  //! Extends <me> from the Pnt <P> in the direction <D>.
-    void Add (const gp_Pnt2d& P, const gp_Dir2d& D);
+  //! Adds the 2d point.
+  void Add (const gp_Pnt2d& thePnt) { Update (thePnt.X(), thePnt.Y()); }
+
+  //! Extends bounding box from thePnt in the direction theDir.
+  void Add (const gp_Pnt2d& thePnt, const gp_Dir2d& theDir)
+  {
+    Add (thePnt);
+    Add (theDir);
+  }
   
   //! Extends the Box  in the given Direction, i.e. adds
   //! a half-line. The box may become infinite in 1 or 2
@@ -168,31 +187,45 @@ public:
   Standard_EXPORT Standard_Boolean IsOut (const Bnd_Box2d& Other) const;
   
   //! Returns True if transformed <Box2d> is out <me>.
-    Standard_Boolean IsOut (const Bnd_Box2d& Other, const gp_Trsf2d& T) const;
-  
+  Standard_Boolean IsOut (const Bnd_Box2d& theOther, const gp_Trsf2d& theTrsf) const
+  {
+    return IsOut (theOther.Transformed (theTrsf));
+  }
+
   //! Compares  a transformed  bounding with  a    transformed
   //! bounding. The default implementation is  to make a copy
   //! of <me> and <Other>, to transform them and to test.
-    Standard_Boolean IsOut (const gp_Trsf2d& T1, const Bnd_Box2d& Other, const gp_Trsf2d& T2) const;
-  
+  Standard_Boolean IsOut (const gp_Trsf2d& T1, const Bnd_Box2d& Other, const gp_Trsf2d& T2) const
+  {
+    return Transformed(T1).IsOut (Other.Transformed(T2));
+  }
+
   Standard_EXPORT void Dump() const;
   
   //! Computes the squared diagonal of me.
-    Standard_Real SquareExtent() const;
-
-
-
+  Standard_Real SquareExtent() const
+  {
+    if (IsVoid()) return 0.0;
+    const Standard_Real aDx = Xmax - Xmin + Gap + Gap;
+    const Standard_Real aDy = Ymax - Ymin + Gap + Gap;
+    return aDx*aDx + aDy*aDy;
+  }
 
 protected:
 
-
-
-
+  //! Bit flags.
+  enum MaskFlags
+  {
+    VoidMask  = 0x01,
+    XminMask  = 0x02,
+    XmaxMask  = 0x04,
+    YminMask  = 0x08,
+    YmaxMask  = 0x10,
+    WholeMask = 0x1e
+  };
 
 private:
 
-
-
   Standard_Real Xmin;
   Standard_Real Xmax;
   Standard_Real Ymin;
@@ -200,14 +233,6 @@ private:
   Standard_Real Gap;
   Standard_Integer Flags;
 
-
 };
 
-
-#include <Bnd_Box2d.lxx>
-
-
-
-
-
 #endif // _Bnd_Box2d_HeaderFile
diff --git a/src/Bnd/Bnd_Box2d.lxx b/src/Bnd/Bnd_Box2d.lxx
deleted file mode 100644 (file)
index 57697d6..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-// Created on: 1997-11-27
-// Created by: Christophe MARION
-// Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#define VoidMask  0x01
-#define XminMask  0x02
-#define XmaxMask  0x04
-#define YminMask  0x08
-#define YmaxMask  0x10
-#define WholeMask 0x1e
-
-#include <gp_Pnt2d.hxx>
-
-//=======================================================================
-//function : Bnd_Box2d
-//purpose  : 
-//=======================================================================
-
-inline Bnd_Box2d::Bnd_Box2d()
-     : Xmin(0.), Xmax(0.), Ymin(0.), Ymax(0.), Gap(0.), Flags (VoidMask)
-{
-}
-
-//=======================================================================
-//function : SetWhole
-//purpose  : 
-//=======================================================================
-
-inline void Bnd_Box2d::SetWhole ()
-{ Flags = WholeMask; }
-
-//=======================================================================
-//function : SetVoid
-//purpose  : 
-//=======================================================================
-
-inline void Bnd_Box2d::SetVoid ()
-{
-  Flags = VoidMask;
-  Gap=0.;
-}
-
-//=======================================================================
-//function : Set
-//purpose  : 
-//=======================================================================
-
-inline void Bnd_Box2d::Set(const gp_Pnt2d& P)
-{
-  Flags = VoidMask;
-  Gap=0.;
-  Add(P);
-}
-
-//=======================================================================
-//function : Set
-//purpose  : 
-//=======================================================================
-
-inline void Bnd_Box2d::Set(const gp_Pnt2d& P, const gp_Dir2d& D)
-{
-  Flags = VoidMask;
-  Gap=0.;
-  Add(P,D);
-}
-
-//=======================================================================
-//function : GetGap
-//purpose  : 
-//=======================================================================
-
-inline Standard_Real Bnd_Box2d::GetGap () const
-{
-  return Gap;
-}
-
-//=======================================================================
-//function : SetGap
-//purpose  : 
-//=======================================================================
-
-inline void Bnd_Box2d::SetGap (const Standard_Real Tol)
-{
-  Gap = Tol;
-}
-
-//=======================================================================
-//function : Enlarge
-//purpose  : 
-//=======================================================================
-
-inline void Bnd_Box2d::Enlarge (const Standard_Real Tol)
-{
-  Standard_Real t = Tol;
-  if (t < 0) t = - t;
-  if (Gap < t) Gap = t;
-}
-
-//=======================================================================
-//function : OpenXmin
-//purpose  : 
-//=======================================================================
-
-inline void Bnd_Box2d::OpenXmin ()
-{ Flags |= XminMask; }
-
-//=======================================================================
-//function : OpenXmax
-//purpose  : 
-//=======================================================================
-
-inline void Bnd_Box2d::OpenXmax ()
-{ Flags |= XmaxMask; }
-
-//=======================================================================
-//function : OpenYmin
-//purpose  : 
-//=======================================================================
-
-inline void Bnd_Box2d::OpenYmin ()
-{ Flags |= YminMask; }
-
-//=======================================================================
-//function : OpenYmax
-//purpose  : 
-//=======================================================================
-
-inline void Bnd_Box2d::OpenYmax ()
-{ Flags |= YmaxMask; }
-
-//=======================================================================
-//function : IsOpenXmin
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean Bnd_Box2d::IsOpenXmin () const
-{ return Flags & XminMask; }
-
-//=======================================================================
-//function : IsOpenXmax
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean Bnd_Box2d::IsOpenXmax () const
-{ return Flags & XmaxMask; }
-
-//=======================================================================
-//function : IsOpenYmin
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean Bnd_Box2d::IsOpenYmin () const
-{ return Flags & YminMask; }
-
-//=======================================================================
-//function : IsOpenYmax
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean Bnd_Box2d::IsOpenYmax () const
-{ return Flags & YmaxMask; }
-
-//=======================================================================
-//function : IsWhole
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean Bnd_Box2d::IsWhole () const
-{ return (Flags & WholeMask) == WholeMask; }
-
-//=======================================================================
-//function : IsVoid
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean Bnd_Box2d::IsVoid () const
-{ return Flags & VoidMask; }
-
-//=======================================================================
-//function : Add
-//purpose  : 
-//=======================================================================
-
-inline void Bnd_Box2d::Add (const gp_Pnt2d& P)
-{
-  Update(P.X(),P.Y());
-}
-
-//=======================================================================
-//function : Add
-//purpose  : 
-//=======================================================================
-
-inline void Bnd_Box2d::Add (const gp_Pnt2d& P, const gp_Dir2d& D)
-{
-  Add(P);
-  Add(D);
-}
-
-//=======================================================================
-//function : IsOut
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean Bnd_Box2d::IsOut (const Bnd_Box2d& Other, 
-                                  const gp_Trsf2d& T) const
-{
-  return IsOut(Other.Transformed(T));
-}
-
-//=======================================================================
-//function : IsOut
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean Bnd_Box2d::IsOut (const gp_Trsf2d& T1,
-                                         const Bnd_Box2d& Other, 
-                                         const gp_Trsf2d& T2) const
-{ 
-  return Transformed(T1).IsOut (Other.Transformed(T2));
-}
-//=======================================================================
-//function : SquareExtent
-//purpose  : Computes the squared diagonal
-//=======================================================================
-inline Standard_Real Bnd_Box2d::SquareExtent() const 
-{
-  if ( IsVoid() ) return 0.;
-  const Standard_Real aDx = Xmax - Xmin + Gap + Gap;
-  const Standard_Real aDy = Ymax - Ymin + Gap + Gap;
-  return aDx*aDx + aDy*aDy;
-}
-
index 298c1d4ff8590bccc20654188ac5518ac77c705e..6c20debbee27b76f41c9541b3dd4d258e3fe3e07 100644 (file)
@@ -19,10 +19,8 @@ Bnd_BoundSortBox2d.cxx
 Bnd_BoundSortBox2d.hxx
 Bnd_Box.cxx
 Bnd_Box.hxx
-Bnd_Box.lxx
 Bnd_Box2d.cxx
 Bnd_Box2d.hxx
-Bnd_Box2d.lxx
 Bnd_HArray1OfBox.hxx
 Bnd_HArray1OfBox2d.hxx
 Bnd_HArray1OfSphere.hxx
index 53c4ef1669c645dafc2213a155301c54f9c7af70..8726577fffcb6d8f905cbf632705cb290d30cbaa 100644 (file)
@@ -654,12 +654,12 @@ void FilletPoint::appendValue(Standard_Real theValue, Standard_Boolean theValid)
     if (theValue < myV.Value(a)) 
     {
       myV.InsertBefore(a, theValue);
-      myValid.InsertBefore(a, (int)theValid);
+      myValid.InsertBefore(a, theValid);
       return;
     }
   }
   myV.Append(theValue);
-  myValid.Append((int)theValid);
+  myValid.Append(theValid);
 }
 
 Standard_Boolean FilletPoint::calculateDiff(FilletPoint* thePoint) 
index ec3bfcd41b55b57f9beb402f8171e974c676520f..520b925934dfe3fab6af0057b65414c077b50ffa 100644 (file)
@@ -23,6 +23,7 @@
 #include <Geom_Plane.hxx>
 #include <TColStd_ListOfReal.hxx>
 #include <TColStd_SequenceOfReal.hxx>
+#include <TColStd_SequenceOfBoolean.hxx>
 #include <TColStd_SequenceOfInteger.hxx>
 
 class FilletPoint;
@@ -163,7 +164,7 @@ public:
   Standard_Real getDiff(int theIndex) {return myD.Value(theIndex);}
 
   //! Returns true if function is valid (rediuses vectors of fillet do not intersect any curve).
-  Standard_Boolean isValid(int theIndex) {return (Standard_Boolean)myValid.Value(theIndex);}
+  Standard_Boolean isValid(int theIndex) {return myValid.Value(theIndex);}
 
   //! Returns the index of the nearest value
   int getNear(int theIndex) {return myNear.Value(theIndex);}
@@ -225,7 +226,8 @@ private:
   gp_Pnt2d myCenter;
   //! Flags for storage the validity of solutions. Indexes corresponds to indexes
   //! in sequences myV, myD.
-  TColStd_SequenceOfInteger myValid, myNear;
+  TColStd_SequenceOfBoolean myValid;
+  TColStd_SequenceOfInteger myNear;
 };
 
 #endif // _FILLETALGO_H_
index 6af9c736207f50435d14463875b2b8e700fa05a5..238c0b850d6a40584ecb0950599791188b3c47cb 100644 (file)
@@ -191,7 +191,7 @@ public:
   //! chamfer).
   Standard_EXPORT Standard_Boolean SplitKPart (const Handle(ChFiDS_SurfData)& Data, ChFiDS_SequenceOfSurfData& SetData, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Iedge, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, Standard_Boolean& Intf, Standard_Boolean& Intl);
   
-  Standard_EXPORT Standard_Integer PerformTwoCornerbyInter (const Standard_Integer Index);
+  Standard_EXPORT Standard_Boolean PerformTwoCornerbyInter (const Standard_Integer Index);
 
 
 
@@ -203,7 +203,7 @@ protected:
   
   Standard_EXPORT virtual void SimulKPart (const Handle(ChFiDS_SurfData)& SD) const = 0;
   
-  Standard_EXPORT virtual Standard_Boolean SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Boolean& Intf, Standard_Boolean& Intl) = 0;
+  Standard_EXPORT virtual Standard_Boolean SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) = 0;
   
   Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep);
   
@@ -231,12 +231,12 @@ protected:
   
   Standard_EXPORT void Trunc (const Handle(ChFiDS_SurfData)& SD, const Handle(ChFiDS_Spine)& Spine, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Integer iedge, const Standard_Boolean isfirst, const Standard_Integer cntlFiOnS);
   
-  Standard_EXPORT void CallPerformSurf (Handle(ChFiDS_Stripe)& Stripe, const Standard_Boolean Simul, ChFiDS_SequenceOfSurfData& SeqSD, Handle(ChFiDS_SurfData)& SD, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Handle(BRepAdaptor_HSurface)& HS1, const Handle(BRepAdaptor_HSurface)& HS3, const gp_Pnt2d& P1, const gp_Pnt2d& P3, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& HS2, const Handle(BRepAdaptor_HSurface)& HS4, const gp_Pnt2d& P2, const gp_Pnt2d& P4, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, math_Vector& Soldep, Standard_Boolean& Intf, Standard_Boolean& Intl, Handle(BRepAdaptor_HSurface)& Surf1, Handle(BRepAdaptor_HSurface)& Surf2);
+  Standard_EXPORT void CallPerformSurf (Handle(ChFiDS_Stripe)& Stripe, const Standard_Boolean Simul, ChFiDS_SequenceOfSurfData& SeqSD, Handle(ChFiDS_SurfData)& SD, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Handle(BRepAdaptor_HSurface)& HS1, const Handle(BRepAdaptor_HSurface)& HS3, const gp_Pnt2d& P1, const gp_Pnt2d& P3, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& HS2, const Handle(BRepAdaptor_HSurface)& HS4, const gp_Pnt2d& P2, const gp_Pnt2d& P4, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl, Handle(BRepAdaptor_HSurface)& Surf1, Handle(BRepAdaptor_HSurface)& Surf2);
   
   //! Method, implemented in the inheritants, calculating
   //! elements of construction of the surface (fillet or
   //! chamfer).
-  Standard_EXPORT virtual Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Boolean& Intf, Standard_Boolean& Intl) = 0;
+  Standard_EXPORT virtual Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) = 0;
   
   //! Method, implemented  in inheritants, calculates
   //! the elements of construction of  the surface (fillet
@@ -272,7 +272,7 @@ protected:
   Standard_EXPORT Standard_Boolean StripeOrientations (const Handle(ChFiDS_Spine)& Sp, TopAbs_Orientation& Or1, TopAbs_Orientation& Or2, Standard_Integer& ChoixConge) const;
   
   //! Calculates  a Line of contact face/face.
-  Standard_EXPORT Standard_Boolean ComputeData (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, Handle(BRepBlend_Line)& Lin, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, Blend_Function& Func, Blend_FuncInv& FInv, const Standard_Real PFirst, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const math_Vector& Soldep, Standard_Boolean& Intf, Standard_Boolean& Intl, Standard_Boolean& Gd1, Standard_Boolean& Gd2, Standard_Boolean& Gf1, Standard_Boolean& Gf2, const Standard_Boolean RecOnS1 = Standard_False, const Standard_Boolean RecOnS2 = Standard_False);
+  Standard_EXPORT Standard_Boolean ComputeData (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, Handle(BRepBlend_Line)& Lin, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, Blend_Function& Func, Blend_FuncInv& FInv, const Standard_Real PFirst, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl, Standard_Boolean& Gd1, Standard_Boolean& Gd2, Standard_Boolean& Gf1, Standard_Boolean& Gf2, const Standard_Boolean RecOnS1 = Standard_False, const Standard_Boolean RecOnS2 = Standard_False);
   
   //! Calculates a Line of contact edge/face.
   Standard_EXPORT Standard_Boolean ComputeData (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& HGuide, Handle(BRepBlend_Line)& Lin, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor2d_HCurve2d)& PC2, const Handle(Adaptor3d_TopolTool)& I2, Standard_Boolean& Decroch, Blend_SurfRstFunction& Func, Blend_FuncInv& FInv, Blend_SurfPointFuncInv& FInvP, Blend_SurfCurvFuncInv& FInvC, const Standard_Real PFirst, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const math_Vector& Soldep, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst);
index ff19e6a163639cde76bd777d9903b2206b6545ce..3fb0194a618aa18fb68797e98902e2c75e6b371e 100644 (file)
@@ -609,8 +609,8 @@ CallPerformSurf(Handle(ChFiDS_Stripe)&              Stripe,
                const Standard_Boolean              RecOnS1,
                const Standard_Boolean              RecOnS2,
                math_Vector&                        Soldep,
-               Standard_Boolean&                   intf,
-               Standard_Boolean&                   intl,
+               Standard_Integer&                   intf,
+               Standard_Integer&                   intl,
                 Handle(BRepAdaptor_HSurface)&       Surf1,
                Handle(BRepAdaptor_HSurface)&       Surf2) 
 {
@@ -1747,8 +1747,8 @@ static void ChFi3d_Purge (Handle(ChFiDS_Stripe)&    Stripe,
                          const ChFiDS_CommonPoint& VRef,
                          const Standard_Boolean    isfirst,
                          const Standard_Integer    ons,
-                         Standard_Boolean&         intf,
-                         Standard_Boolean&         intl)
+                         Standard_Integer&         intf,
+                         Standard_Integer&         intl)
 {
   if (isfirst) intf = 1; else intl = 1; // End.
   Standard_Integer opp = 3-ons;
@@ -2000,7 +2000,7 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine
   }
   Standard_Real         MaxStep  = (bidl-bidf)*0.05/nbed;
   Standard_Real         Firstsov = 0.;
-  Standard_Boolean      intf = 0, intl = 0;
+  Standard_Integer      intf = 0, intl = 0;
   while(!fini){
     // are these the ends (no extension on periodic).
     Ok1 = 1,Ok2 = 1;
@@ -2322,7 +2322,7 @@ void ChFi3d_Builder::PerformSetOfKPart(Handle(ChFiDS_Stripe)& Stripe,
   Standard_Real WFirst,WLast = 0.;
   gp_Vec TFirst,TLast,TEndPeriodic;
   gp_Pnt PFirst,PLast,PEndPeriodic;
-  Standard_Boolean intf = 0, intl = 0;
+  Standard_Boolean intf = Standard_False, intl = Standard_False;
   
   Handle(ChFiDS_HElSpine) CurrentHE = new ChFiDS_HElSpine();
   Spine->D1(Spine->FirstParameter(),PFirst,TFirst);
index c08336f944f23c56ba9b81d02ccc492a0e20e0ab..54cdd6f8f3dceae57d421fdee03fcc01bb391c87 100644 (file)
@@ -1479,8 +1479,8 @@ Standard_Boolean ChFi3d_Builder::ComputeData
  const Standard_Boolean Appro,
  const Standard_Boolean Forward,
  const math_Vector& Soldep,
- Standard_Boolean& intf,
- Standard_Boolean& intl,
+ Standard_Integer& intf,
+ Standard_Integer& intl,
  Standard_Boolean& Gd1,
  Standard_Boolean& Gd2,
  Standard_Boolean& Gf1,
index f7c03ea94006ea2b2c0260035e36467cdf88043a..3579aa83c25c853c8b8668d60799a566911beb4c 100644 (file)
@@ -2648,7 +2648,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
               Pl=C1->Value(C1->LastParameter());
               //Standard_Boolean sens;
               sens=Pl.Distance(pext)<tolpt;
-              GeomLib::ExtendCurveToPoint(C1,CV1.Point(),1,sens);
+              GeomLib::ExtendCurveToPoint (C1, CV1.Point(), 1, sens != 0);
               csau=C1;
             }
           }
@@ -2658,7 +2658,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
               Pl=C1->Value(C1->LastParameter());
               //Standard_Boolean sens;
               sens=Pl.Distance(pext)<tolpt;
-              GeomLib::ExtendCurveToPoint(C1,CV2.Point(),1,sens);
+              GeomLib::ExtendCurveToPoint (C1, CV2.Point(), 1, sens != 0);
               csau=C1;
             }
           }
index 59af0f13c9695b1bf6410844ee0fa818e59a807d..381eb21448408d78a4caf0a2cc6a12508f3565a5 100644 (file)
@@ -140,7 +140,7 @@ static void Reduce(const Standard_Real& p1,
 //           path is used; 3D curve and 2 pcurves are approximated.
 //=======================================================================
 
-Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer Index)
+Standard_Boolean ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer Index)
 
 {
   done = 0;
index e50176204f954817c027d003bd1d548d0dbf5985..2ca83fa0c347bcca2fdd88ba2e611f61b38b5261 100644 (file)
@@ -800,8 +800,8 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
                            const Standard_Boolean              RecOnS1,
                            const Standard_Boolean              RecOnS2,
                            const math_Vector&                  Soldep,
-                           Standard_Boolean&                   intf,
-                           Standard_Boolean&                   intl)
+                           Standard_Integer&                   intf,
+                           Standard_Integer&                   intl)
      
 {
   Handle(ChFiDS_ChamfSpine) 
@@ -887,12 +887,13 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
     
     Standard_Boolean reverse = (!Forward || Inside);
     if(intf && reverse){
-      Standard_Boolean ok = 0;
+      Standard_Boolean ok = Standard_False;
       const ChFiDS_CommonPoint& cp1 = Data->VertexFirstOnS1();
       if(cp1.IsOnArc()){
        TopoDS_Face F1 = S1->ChangeSurface().Face();
        TopoDS_Face bid;
-       ok = intf = !SearchFace(Spine,cp1,F1,bid);
+       intf = !SearchFace(Spine,cp1,F1,bid);
+       ok = intf != 0;
       }
       const ChFiDS_CommonPoint& cp2 = Data->VertexFirstOnS2();
       if(cp2.IsOnArc() && !ok){
@@ -902,12 +903,13 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
       }
     }
     if(intl){
-      Standard_Boolean ok = 0;
+      Standard_Boolean ok = Standard_False;
       const ChFiDS_CommonPoint& cp1 = Data->VertexLastOnS1();
       if(cp1.IsOnArc()){
        TopoDS_Face F1 = S1->ChangeSurface().Face();
        TopoDS_Face bid;
-       ok = intl = !SearchFace(Spine,cp1,F1,bid);
+       intl = !SearchFace(Spine,cp1,F1,bid);
+       ok = intl != 0;
       }
       const ChFiDS_CommonPoint& cp2 = Data->VertexLastOnS2();
       if(cp2.IsOnArc() && !ok){
@@ -967,12 +969,13 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
     
     Standard_Boolean reverse = (!Forward || Inside);
     if(intf && reverse){
-      Standard_Boolean ok = 0;
+      Standard_Boolean ok = Standard_False;
       const ChFiDS_CommonPoint& cp1 = Data->VertexFirstOnS1();
       if(cp1.IsOnArc()){
        TopoDS_Face F1 = S1->ChangeSurface().Face();
        TopoDS_Face bid;
-       ok = intf = !SearchFace(Spine,cp1,F1,bid);
+       intf = !SearchFace(Spine,cp1,F1,bid);
+       ok = intf != 0;
       }
       const ChFiDS_CommonPoint& cp2 = Data->VertexFirstOnS2();
       if(cp2.IsOnArc() && !ok){
@@ -982,12 +985,13 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
       }
     }
     if(intl){
-      Standard_Boolean ok = 0;
+      Standard_Boolean ok = Standard_False;
       const ChFiDS_CommonPoint& cp1 = Data->VertexLastOnS1();
       if(cp1.IsOnArc()){
        TopoDS_Face F1 = S1->ChangeSurface().Face();
        TopoDS_Face bid;
-       ok = intl = !SearchFace(Spine,cp1,F1,bid);
+       intl = !SearchFace(Spine,cp1,F1,bid);
+       ok = intl != 0;
       }
       const ChFiDS_CommonPoint& cp2 = Data->VertexLastOnS2();
       if(cp2.IsOnArc() && !ok){
@@ -1052,12 +1056,13 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
 
       Standard_Boolean reverse = (!Forward || Inside);
       if(intf && reverse){
-       Standard_Boolean ok = 0;
+       Standard_Boolean ok = Standard_False;
        const ChFiDS_CommonPoint& cp1 = Data->VertexFirstOnS1();
        if(cp1.IsOnArc()){
          TopoDS_Face F1 = S1->ChangeSurface().Face();
          TopoDS_Face bid;
-         ok = intf = !SearchFace(Spine,cp1,F1,bid);
+         intf = !SearchFace(Spine,cp1,F1,bid);
+         ok = intf != 0;
        }
        const ChFiDS_CommonPoint& cp2 = Data->VertexFirstOnS2();
        if(cp2.IsOnArc() && !ok){
@@ -1068,12 +1073,13 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
       }
       
       if(intl){
-       Standard_Boolean ok = 0;
+       Standard_Boolean ok = Standard_False;
        const ChFiDS_CommonPoint& cp1 = Data->VertexLastOnS1();
        if(cp1.IsOnArc()){
          TopoDS_Face F1 = S1->ChangeSurface().Face();
          TopoDS_Face bid;
-         ok = intl = !SearchFace(Spine,cp1,F1,bid);
+         intl = !SearchFace(Spine,cp1,F1,bid);
+         ok = intl != 0;
        }
        const ChFiDS_CommonPoint& cp2 = Data->VertexLastOnS2();
        if(cp2.IsOnArc() && !ok){
@@ -1136,12 +1142,13 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
 
       Standard_Boolean reverse = (!Forward || Inside);
       if(intf && reverse){
-       Standard_Boolean ok = 0;
+       Standard_Boolean ok = Standard_False;
        const ChFiDS_CommonPoint& cp1 = Data->VertexFirstOnS1();
        if(cp1.IsOnArc()){
          TopoDS_Face F1 = S1->ChangeSurface().Face();
          TopoDS_Face bid;
-         ok = intf = !SearchFace(Spine,cp1,F1,bid);
+         intf = !SearchFace(Spine,cp1,F1,bid);
+         ok = intf != 0;
        }
        const ChFiDS_CommonPoint& cp2 = Data->VertexFirstOnS2();
        if(cp2.IsOnArc() && !ok){
@@ -1152,12 +1159,13 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
       }
       
       if(intl){
-       Standard_Boolean ok = 0;
+       Standard_Boolean ok = Standard_False;
        const ChFiDS_CommonPoint& cp1 = Data->VertexLastOnS1();
        if(cp1.IsOnArc()){
          TopoDS_Face F1 = S1->ChangeSurface().Face();
          TopoDS_Face bid;
-         ok = intl = !SearchFace(Spine,cp1,F1,bid);
+         intl = !SearchFace(Spine,cp1,F1,bid);
+         ok = intl != 0;
        }
        const ChFiDS_CommonPoint& cp2 = Data->VertexLastOnS2();
        if(cp2.IsOnArc() && !ok){
@@ -1585,8 +1593,8 @@ ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData,
                              const Standard_Boolean              RecOnS1,
                              const Standard_Boolean              RecOnS2,
                              const math_Vector&                  Soldep,
-                             Standard_Boolean&                   intf,
-                             Standard_Boolean&                   intl)
+                             Standard_Integer&                   intf,
+                             Standard_Integer&                   intl)
      
 {
   Handle(ChFiDS_SurfData) Data = SeqData(1);
index 1197ece7cefdb7ecd0695f22783b7e3025a3bbea..c9662ac753d477c05df8d1a285cca7f232379587 100644 (file)
@@ -135,7 +135,7 @@ public:
   //! Methode, implemented in inheritants, calculates
   //! the elements of construction of  the surface (fillet
   //! or chamfer).
-  Standard_EXPORT virtual Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Boolean& Intf, Standard_Boolean& Intl) Standard_OVERRIDE;
+  Standard_EXPORT virtual Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE;
   
   //! Method, implemented in  the inheritants, calculates
   //! the elements of construction of  the surface (fillet
@@ -162,7 +162,7 @@ protected:
   
   Standard_EXPORT void SimulKPart (const Handle(ChFiDS_SurfData)& SD) const Standard_OVERRIDE;
   
-  Standard_EXPORT Standard_Boolean SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Boolean& Intf, Standard_Boolean& Intl) Standard_OVERRIDE;
+  Standard_EXPORT Standard_Boolean SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE;
   
   Standard_EXPORT Standard_Boolean PerformFirstSection (const Handle(ChFiDS_Spine)& S, const Handle(ChFiDS_HElSpine)& HGuide, const Standard_Integer Choix, Handle(BRepAdaptor_HSurface)& S1, Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I1, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real Par, math_Vector& SolDep, TopAbs_State& Pos1, TopAbs_State& Pos2) const Standard_OVERRIDE;
   
index de32ae1ec8e114b7ad5e3e856b683e8eb553b299..0b496f6e03ca164f53b4ac1b1934a7ee84f6b42b 100644 (file)
 //           la distance de PntD par rapport au plan passant par les trois 
 //           points PntA, PntB, PntC
 //=======================================================================
-static int CoPlanar(const gp_Pnt  PntA,
+static Standard_Boolean CoPlanar(const gp_Pnt  PntA,
                    const gp_Pnt  PntB,
                    const gp_Pnt  PntC,
                    const gp_Pnt  PntD)
 {
-  Standard_Boolean IsCoplanar;
-
   gp_Vec vecAB(PntA, PntB);
   gp_Vec vecAC(PntA, PntC);
   gp_Vec vecAD(PntA, PntD);
@@ -101,20 +99,16 @@ static int CoPlanar(const gp_Pnt  PntA,
   Standard_Real Alpha  = nor2AB * nor2AC - ProABAC * ProABAC;
 
   if (Alpha < Precision::Confusion()) {
-    IsCoplanar = Standard_True;
+    return Standard_True;
   }
-  else {
-    Standard_Real ProABAD = vecAB.Dot(vecAD);
-    Standard_Real ProACAD = vecAC.Dot(vecAD);
-    Standard_Real Alpha1 = ProABAD * nor2AC - ProABAC * ProACAD;
-    Standard_Real Alpha2 = ProACAD * nor2AB - ProABAC * ProABAD;
-    gp_Vec vecDABC = Alpha1 * vecAB + Alpha2 * vecAC - Alpha * vecAD;
 
-    IsCoplanar = (vecDABC.Magnitude() / Alpha < Precision::Confusion() );
-
-  }
+  Standard_Real ProABAD = vecAB.Dot(vecAD);
+  Standard_Real ProACAD = vecAC.Dot(vecAD);
+  Standard_Real Alpha1 = ProABAD * nor2AC - ProABAC * ProACAD;
+  Standard_Real Alpha2 = ProACAD * nor2AB - ProABAC * ProABAD;
+  gp_Vec vecDABC = Alpha1 * vecAB + Alpha2 * vecAC - Alpha * vecAD;
 
-  return IsCoplanar;
+  return (vecDABC.Magnitude() / Alpha) < Precision::Confusion();
 }
 
 
index 9539559380e310e4b4524ed01b965aaf402e73ee..67241716d7055f0f665928c7d31072a56766c7d3 100644 (file)
@@ -616,8 +616,8 @@ ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
                             const Standard_Boolean              RecOnS1,
                             const Standard_Boolean              RecOnS2,
                             const math_Vector&                  Soldep,
-                            Standard_Boolean&                   intf,
-                            Standard_Boolean&                   intl)
+                            Standard_Integer&                   intf,
+                            Standard_Integer&                   intl)
 {
   Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
   if(fsp.IsNull()) Standard_ConstructionError::Raise
@@ -701,12 +701,13 @@ ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
                        Standard_False, Data->ChangeVertexLastOnS2(),tolesp);
   Standard_Boolean reverse = (!Forward || Inside);
   if(intf && reverse){
-    Standard_Boolean ok = 0;
+    Standard_Boolean ok = Standard_False;
     const ChFiDS_CommonPoint& cp1 = Data->VertexFirstOnS1();
     if(cp1.IsOnArc()){
       TopoDS_Face F1 = S1->ChangeSurface().Face();
       TopoDS_Face bid;
-      ok = intf = !SearchFace(Spine,cp1,F1,bid);
+      intf = !SearchFace(Spine,cp1,F1,bid);
+      ok = intf != 0;
     }
     const ChFiDS_CommonPoint& cp2 = Data->VertexFirstOnS2();
     if(cp2.IsOnArc() && !ok){
@@ -721,7 +722,8 @@ ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
     if(cp1.IsOnArc()){
       TopoDS_Face F1 = S1->ChangeSurface().Face();
       TopoDS_Face bid;
-      ok = intl = !SearchFace(Spine,cp1,F1,bid);
+      intl = !SearchFace(Spine,cp1,F1,bid);
+      ok = intl != 0;
     }
     const ChFiDS_CommonPoint& cp2 = Data->VertexLastOnS2();
     if(cp2.IsOnArc() && !ok){
@@ -1237,8 +1239,8 @@ ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData,
                               const Standard_Boolean              RecOnS1,
                               const Standard_Boolean              RecOnS2,
                               const math_Vector&                  Soldep,
-                              Standard_Boolean&                   intf,
-                              Standard_Boolean&                   intl)
+                              Standard_Integer&                   intf,
+                              Standard_Integer&                   intl)
 {
 #ifdef OCCT_DEBUG
   OSD_Chronometer ch;
index 9ffbbb7209491f8c67bc26c6e660250ce584f904..58fed1fb137e128b9f187cc844fbbbb67b54c280 100644 (file)
@@ -136,7 +136,7 @@ protected:
   
   Standard_EXPORT void SimulKPart (const Handle(ChFiDS_SurfData)& SD) const Standard_OVERRIDE;
   
-  Standard_EXPORT Standard_Boolean SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Boolean& Intf, Standard_Boolean& Intl) Standard_OVERRIDE;
+  Standard_EXPORT Standard_Boolean SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE;
   
   Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE;
   
@@ -148,7 +148,7 @@ protected:
   
   //! Method calculates the elements of construction of  the
   //! fillet (constant or evolutive).
-  Standard_EXPORT Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Boolean& Intf, Standard_Boolean& Intl) Standard_OVERRIDE;
+  Standard_EXPORT Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE;
   
   Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE;
   
index 9316461230ed32dc2238d4e8babbdded9c444607..732c6cf019851ab6ba88f21de4c8256535041fb8 100644 (file)
@@ -583,7 +583,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
        finv.Set(Rdeb,choix);
        Standard_Real TolGuide = cornerspine->Resolution(tolesp); 
        
-       Standard_Boolean intf = 3, intl = 3;
+       Standard_Integer intf = 3, intl = 3;
        done = ComputeData(coin,cornerspine,NullSpine,lin,Fac,IFac,Surf,ISurf,
                           func,finv,ffi,pasmax,locfleche,TolGuide,ffi,lla,
                           0,0,1,Soldep,intf,intl,Gd1,Gd2,Gf1,Gf2,0,1);
@@ -605,7 +605,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
        func.Set(myShape);
        finv.Set(choix);
        Standard_Real TolGuide = cornerspine->Resolution(tolesp);
-       Standard_Boolean intf = 3, intl = 3;
+       Standard_Integer intf = 3, intl = 3;
        done = ComputeData(coin,cornerspine,NullSpine,lin,Fac,IFac,Surf,ISurf,
                           func,finv,ffi,pasmax,locfleche,TolGuide,ffi,lla,
                           0,0,1,Soldep,intf,intl,Gd1,Gd2,Gf1,Gf2,0,1);
index 0236616ed859715282b6891909c4a39e1dae517f..6e99b14b9273d874198c7323d341a8ae28ef738b 100644 (file)
@@ -50,9 +50,10 @@ inline Standard_Integer  ChFiDS_SurfData::IndexOfC1() const
 //purpose  : 
 //=======================================================================
 
-inline void ChFiDS_SurfData::SetIndexOfC1(const Standard_Integer Index)
+inline void ChFiDS_SurfData::SetIndexOfC1 (const Standard_Integer theIndex)
 {
-  indexOfC1 = isoncurv1 = Index;
+  indexOfC1 = theIndex;
+  isoncurv1 = (theIndex != 0);
 }
 
 //=======================================================================
@@ -91,9 +92,10 @@ inline Standard_Integer  ChFiDS_SurfData::IndexOfC2() const
 //purpose  : 
 //=======================================================================
 
-inline void ChFiDS_SurfData::SetIndexOfC2(const Standard_Integer Index)
+inline void ChFiDS_SurfData::SetIndexOfC2 (const Standard_Integer theIndex)
 {
-  indexOfC2 = isoncurv2 = Index;
+  indexOfC2 = theIndex;
+  isoncurv2 = (theIndex != 0);
 }
 
 //=======================================================================
index 8580899f447609876d1d9cee15ac05804402b158..88226d176d8a53dc1afc70991a57654fc3f42e95 100644 (file)
@@ -437,7 +437,7 @@ static Standard_Integer DDataStd_SetIntArray (Draw_Interpretor& di,
   if (!DDF::GetDF(arg[1],DF))  return 1; 
   TDF_Label label;
   DDF::AddLabel(DF, arg[2], label);
-  Standard_Integer isDelta = Draw::Atoi(arg[3]);
+  Standard_Boolean isDelta = Draw::Atoi(arg[3]) != 0;
   Standard_Integer From = Draw::Atoi(arg[4]), To = Draw::Atoi( arg[5] ), j;
   di << "Array of Standard_Integer with bounds from = " << From  << " to = " << To  << "\n";
   Handle(TDataStd_IntegerArray) A = TDataStd_IntegerArray::Set(label, From, To, isDelta);
@@ -623,7 +623,7 @@ static Standard_Integer DDataStd_SetIntArrayTest (Draw_Interpretor& di,
   if (!DDF::GetDF(arg[1],DF))  return 1; 
   TDF_Label label;
   DDF::AddLabel(DF, arg[2], label);
-  Standard_Integer isDelta = Draw::Atoi(arg[3]);
+  Standard_Boolean isDelta = Draw::Atoi(arg[3]) != 0;
   Standard_Integer From = Draw::Atoi(arg[4]), To = Draw::Atoi( arg[5] ), j;
   di << "Array of Standard_Integer with bounds from = " << From  << " to = " << To  << "\n";
   Handle(TDataStd_IntegerArray) A = TDataStd_IntegerArray::Set(label, From, To, isDelta);
@@ -651,7 +651,7 @@ static Standard_Integer DDataStd_SetRealArray (Draw_Interpretor& di,
   if (!DDF::GetDF(arg[1],DF))  return 1;  
   TDF_Label label; 
   DDF::AddLabel(DF, arg[2], label);
-  Standard_Integer isDelta = Draw::Atoi(arg[3]);
+  Standard_Boolean isDelta = Draw::Atoi(arg[3]) != 0;
  
   Standard_Integer From = Draw::Atoi(arg[4]), To = Draw::Atoi( arg[5] ), j;
   di << " Array of Standard_Real with bounds from = " << From  << " to = " << To  << "\n";
@@ -843,7 +843,7 @@ static Standard_Integer DDataStd_SetVariable (Draw_Interpretor& di,
     const char* aUnits = arg[4];
     aV->Unit(Standard_CString(aUnits));
 
-    aV->Constant(Standard_Boolean(Draw::Atoi(arg[3])));
+    aV->Constant (Draw::Atoi(arg[3]) != 0);
     return 0; 
   }
 
@@ -1043,7 +1043,7 @@ static Standard_Integer DDataStd_SetExtStringArray (Draw_Interpretor& di,
   if (!DDF::GetDF(arg[1],DF))  return 1; 
   TDF_Label label;
   DDF::AddLabel(DF, arg[2], label);
-  Standard_Integer isDelta = Draw::Atoi(arg[3]);
+  Standard_Boolean isDelta = Draw::Atoi(arg[3]) != 0;
 
   Standard_Integer From = Draw::Atoi(arg[4]), To = Draw::Atoi( arg[5] ), j;
   di << "Array of ExtString with bounds from = " << From  << " to = " << To  << "\n";
@@ -1340,7 +1340,7 @@ static Standard_Integer DDataStd_SetByteArray (Draw_Interpretor& di,
     if (!DDF::GetDF(arg[1],DF))  return 1; 
     TDF_Label label;
     DDF::AddLabel(DF, arg[2], label);
-    Standard_Integer isDelta = Draw::Atoi(arg[3]);
+    Standard_Boolean isDelta = Draw::Atoi(arg[3]) != 0;
     Standard_Integer From = Draw::Atoi(arg[4]), To = Draw::Atoi( arg[5] ), j;
     di << "Array of Standard_Byte with bounds from = " << From  << " to = " << To  << "\n";
     Handle(TDataStd_ByteArray) A = TDataStd_ByteArray::Set(label, From, To, isDelta);
@@ -1430,7 +1430,7 @@ static Standard_Integer DDataStd_SetBooleanArray (Draw_Interpretor& di,
           cout << "Bad value = " << ival<< ". 0 or 1 is expected." << endl;
           return 1;
         }
-        A->SetValue(i, (Standard_Boolean)ival); 
+        A->SetValue(i, ival != 0); 
         j++;
       }
     }
@@ -1471,7 +1471,7 @@ static Standard_Integer DDataStd_SetBooleanArrayValue (Draw_Interpretor& di,
   Handle(TDataStd_BooleanArray) arr;
   if (label.FindAttribute(TDataStd_BooleanArray::GetID(), arr))
   {
-    arr->SetValue(index, (Standard_Boolean) value); 
+    arr->SetValue(index, value != 0);
     return 0;
   }
 
@@ -1561,7 +1561,7 @@ static Standard_Integer DDataStd_SetBooleanList (Draw_Interpretor& di,
         cout << "Bad value = " << ival<< ". 0 or 1 is expected." << endl;
         return 1;
       }
-      A->Append((Standard_Boolean)ival); 
+      A->Append (ival != 0);
     }
     return 0; 
   }
@@ -1739,7 +1739,7 @@ static Standard_Integer DDataStd_InsertBeforeBooleanList (Draw_Interpretor& di,
         return 1;
 
     Standard_Integer index = Draw::Atoi(arg[3]);
-    Standard_Boolean value = (Standard_Boolean) Draw::Atoi(arg[4]);
+    Standard_Boolean value = Draw::Atoi(arg[4]) != 0;
 
     if (A->InsertBefore(index, value))    
       return 0; 
@@ -1771,7 +1771,7 @@ static Standard_Integer DDataStd_InsertAfterBooleanList (Draw_Interpretor& di,
         return 1;
 
     Standard_Integer index = Draw::Atoi(arg[3]);
-    Standard_Boolean value = (Standard_Boolean) Draw::Atoi(arg[4]);
+    Standard_Boolean value = Draw::Atoi(arg[4]) != 0;
 
     if (A->InsertAfter(index, value))    
       return 0; 
@@ -2541,7 +2541,7 @@ static Standard_Integer DDataStd_SetIntPackedMap (Draw_Interpretor& di,
     if (!DDF::GetDF(arg[1],DF))  return 1; 
     TDF_Label aLabel;
     DDF::AddLabel(DF, arg[2], aLabel);
-    Standard_Integer isDelta = Draw::Atoi(arg[3]);
+    Standard_Boolean isDelta = Draw::Atoi(arg[3]) != 0;
     Standard_Integer aNum = nb - 4;
     Handle(TDataStd_IntPackedMap) anAtt;
     if(!aLabel.FindAttribute(TDataStd_IntPackedMap::GetID(), anAtt))
@@ -2741,7 +2741,7 @@ static Standard_Integer DDataStd_SetIntPHugeMap (Draw_Interpretor& di,
     if (!DDF::GetDF(arg[1],DF))  return 1; 
     TDF_Label aLabel;
     DDF::AddLabel(DF, arg[2], aLabel);
-    Standard_Integer isDelta = Draw::Atoi(arg[3]);
+    Standard_Boolean isDelta = Draw::Atoi(arg[3]) != 0;
     Standard_Integer aNum = Draw::Atoi(arg[4]);
     Handle(TDataStd_IntPackedMap) anAtt;
     if(!aLabel.FindAttribute(TDataStd_IntPackedMap::GetID(), anAtt))
index b7ac5c8d807bf2bfb974e0300d04e88001d98195..7a0a4be4b1aede7df00c06c96b3150320fb00611 100644 (file)
@@ -376,7 +376,7 @@ static Standard_Integer DDataStd_ChildNodeIterate (Draw_Interpretor& di,
   if (n >= 4) {
     Handle(TDF_Data) DF;
     if (!DDF::GetDF(a[1],DF)) return 1;
-    const Standard_Boolean AllLevels(Draw::Atoi(a[3]));
+    const Standard_Boolean AllLevels = (Draw::Atoi(a[3]) != 0);
     Handle(TDataStd_TreeNode) TN, Value;
 
     Standard_GUID ID;
@@ -439,7 +439,7 @@ static Standard_Integer DDataStd_InitChildNodeIterator (Draw_Interpretor& di,
     }
 
     if (!DDF::Find(DF, a[2], ID, TN)) return 1; 
-    const Standard_Boolean AllLevels(Draw::Atoi(a[3]));
+    const Standard_Boolean AllLevels = (Draw::Atoi(a[3]) != 0);
     cni.Initialize(TN, AllLevels);
     return 0;
   }
index 6484d1fefec6f9817d724307fc17fe1bf44ab095..615763de13a90608dd6ed26f488e2ccd8bc618e9 100644 (file)
@@ -336,7 +336,7 @@ static Standard_Boolean GetDangleShapes(const TopoDS_Shape& ShapeIn,
     const TopTools_ListOfShape& ancestors = subShapeAndAncestors.FindFromIndex(i);
     if (ancestors.Extent() == 1) Dangles.Bind(ancestors.First(), mayBeDangle);
   }
-  return Dangles.Extent();
+  return !Dangles.IsEmpty();
 }
 
 //=======================================================================
index 3251de02a6e05db585b5318c39728919c98db90b..a1c90b2eedd23240eb8ead95d68398f6d47d3488 100644 (file)
@@ -383,7 +383,7 @@ static Standard_Integer Collect (Draw_Interpretor& di,
     if (!DDF::GetDF(arg[1],DF)) return 1;
     if (!DDF::Find(DF,arg[2],TNaming_NamedShape::GetID(),A)) return 1;
     if (nb >= 4) {
-      OnlyModif = Draw::Atoi(arg[3]);
+      OnlyModif = (Draw::Atoi(arg[3]) != 0);
     }
     TNaming_Tool::Collect(A,MNS,OnlyModif);
     for (TNaming_MapIteratorOfMapOfNamedShape it(MNS); it.More(); it.Next()) {
@@ -484,7 +484,7 @@ static Standard_Integer CheckIter (Draw_Interpretor& di,
        const TopoDS_Shape& aShape = DBRep::Get(arg[3]);
        aNB.Generated(aShape);
        TNaming_Iterator aNameIter(aLabel);
-       if(nb == 5) aNew = (Standard_Boolean) atoi(arg[4]);
+       if(nb == 5) aNew = (Draw::Atoi (arg[4]) != 0);
        if(aNew) {
          TNaming_NewShapeIterator aNewShapeIter(aNameIter); 
          di << "DNaming_CheckIterator : New It is OK\n";
index e065895d9a1389aefec76efdff8cd16fb5e9024f..438ab05d968a7736c419ad4854bc77f5a1e1247a 100644 (file)
@@ -97,7 +97,7 @@ Standard_Integer DNaming_Line3DDriver::Execute(Handle(TFunction_Logbook)& theLog
   }
 
   const Standard_Integer aType = DNaming::GetInteger(aFunction, LINE3D_TYPE)->Get();
-  Standard_Boolean isClosed(aType);
+  Standard_Boolean isClosed = (aType != 0);
   Standard_Integer aCounter(0), aLength  = DNaming::GetInteger(aFunction, LINE3D_PNTNB)->Get();
   if(aLength < 2) {
     aFunction->SetFailure(WRONG_ARGUMENT);
index 61766eb149a78f8c3195eedb4b5b2c3cbf3df280..cc4645b8761ea9727260c3059c81e6a23b7c3c89 100644 (file)
@@ -682,10 +682,10 @@ static Standard_Integer DNaming_AttachShape (Draw_Interpretor& di,
          aResultLabel.ForgetAllAttributes(Standard_True);
          Standard_Boolean aKeepOrientation(Standard_False);
          if (nb >= 6) 
-           aKeepOrientation = (Standard_Boolean) Draw::Atoi(a[5]);
+           aKeepOrientation = Draw::Atoi(a[5]) != 0;
          Standard_Boolean aGeometry(Standard_False);
          if (nb == 7) 
-           aGeometry = (Standard_Boolean) Draw::Atoi(a[6]);
+           aGeometry = Draw::Atoi(a[6]) != 0;
          Handle(TNaming_NamedShape) aCont =  DNaming::GetObjectValue(aContext);
 #ifdef OCCT_DEBUG
          if(aCont.IsNull() || aCont->IsEmpty())
@@ -759,10 +759,10 @@ static Standard_Integer DNaming_XAttachShape (Draw_Interpretor& di,
          aResultLabel.ForgetAllAttributes(Standard_True);
          Standard_Boolean aKeepOrientation(Standard_False);
          if (nb >= 5) 
-           aKeepOrientation = (Standard_Boolean) Draw::Atoi(a[4]);
+           aKeepOrientation = Draw::Atoi(a[4]) != 0;
          Standard_Boolean aGeometry(Standard_False);
          if (nb == 6) 
-           aGeometry = (Standard_Boolean) Draw::Atoi(a[5]);
+           aGeometry = Draw::Atoi(a[5]) != 0;
          Handle(TNaming_NamedShape) aCont =  DNaming::GetObjectValue(aContext);
 
          if(aCont.IsNull() || aCont->IsEmpty())
@@ -1536,17 +1536,17 @@ static Standard_Integer DNaming_PntOffset (Draw_Interpretor& theDI,
     Handle(TFunction_Function) aFun = GetFunction(objLabel,funGUID);
     if(!aFun.IsNull()) {
       Standard_Real value(0.0);
-      Standard_Boolean isDX = (strcmp(theArg[3],"skip"));
+      Standard_Boolean isDX = strcmp(theArg[3],"skip") != 0;
       if(isDX) {
        value = Draw::Atof(theArg[3]);
        DNaming::GetReal(aFun,PNT_DX)->Set(value);
       }
-      Standard_Boolean isDY = (strcmp(theArg[4],"skip"));
+      Standard_Boolean isDY = strcmp(theArg[4],"skip") != 0;
       if(isDY) {
        value = Draw::Atof(theArg[4]);
        DNaming::GetReal(aFun,PNT_DY)->Set(value);
       }
-      Standard_Boolean isDZ = (strcmp(theArg[5],"skip"));
+      Standard_Boolean isDZ = strcmp(theArg[5],"skip") != 0;
       if(isDZ) {
        value = Draw::Atof(theArg[5]);
        DNaming::GetReal(aFun,PNT_DZ)->Set(value);
@@ -1903,11 +1903,11 @@ static Standard_Integer DNaming_TestSingle (Draw_Interpretor& theDI,
     Standard_Boolean XSelection(Standard_False);
     Standard_Boolean Geometry(Standard_False);
     if(theNb == 4)
-      Orientation = (Standard_Boolean)Draw::Atoi(theArg[3]);
+      Orientation = Draw::Atoi(theArg[3]) != 0;
     if(theNb == 5)
-      XSelection = (Standard_Boolean)Draw::Atoi(theArg[4]);
+      XSelection = Draw::Atoi(theArg[4]) != 0;
     if (theNb == 6) 
-      Geometry = (Standard_Boolean) Draw::Atoi(theArg[5]);
+      Geometry = Draw::Atoi(theArg[5]) != 0;
     Handle(TNaming_NamedShape) aNS = DNaming::GetObjectValue( aCntObj);
 
     if(!aNS.IsNull() && !aNS->IsEmpty()) {
@@ -2042,11 +2042,11 @@ static Standard_Integer DNaming_Multiple (Draw_Interpretor& theDI,
     Standard_Boolean XSelection(Standard_False);
     Standard_Boolean Geometry(Standard_False);
     if(theNb == 4)
-      Orientation = (Standard_Boolean)Draw::Atoi(theArg[3]);
+      Orientation = Draw::Atoi(theArg[3]) != 0;
     if(theNb == 5)
-      XSelection = (Standard_Boolean)Draw::Atoi(theArg[4]);
+      XSelection = Draw::Atoi(theArg[4]) != 0;
     if (theNb == 6) 
-      Geometry = (Standard_Boolean) Draw::Atoi(theArg[5]);
+      Geometry = Draw::Atoi(theArg[5]) != 0;
     Handle(TNaming_NamedShape) aNS = DNaming::GetObjectValue( aCntObj);
 
     if(!aNS.IsNull() && !aNS->IsEmpty()) {
index 45fb0dcd1154148ba7b3d863dff31ca9a3026ba5..2937f7934e419235827ca0b99665588d97736646 100644 (file)
@@ -123,7 +123,7 @@ static Standard_Integer DNaming_Select (Draw_Interpretor& di, Standard_Integer n
     }
     if (n > 4) {  
       Standard_Boolean Orient(Standard_False);
-      if(n == 6) Orient = (Standard_Boolean)Draw::Atoi(a[5]);
+      if(n == 6) Orient = (Draw::Atoi(a[5]) != 0);
       TopoDS_Shape S = DBRep::Get(a[3], TopAbs_SHAPE);
       TopoDS_Shape C = DBRep::Get(a[4], TopAbs_SHAPE);
       SL.Select (S, C, geometry, Orient);       
index 7394dc8f43dc1be6c2ad8471bf118b20fed1a242..216ade1ec0cc0abedacd459d24503ad8b3466c58 100644 (file)
@@ -363,14 +363,16 @@ void Draw_Appli(Standard_Integer argc, char** argv,const FDraw_InitAppli Draw_In
   else
   {
     char cmd[255];
-    do {
+    for (;;)
+    {
       cout << "Viewer>";
       i = -1;
       do {
         cin.get(cmd[++i]);
       } while ((cmd[i] != '\n') && (!cin.fail()));
       cmd[i] = '\0';
-    } while (Draw_Interprete(cmd) != (unsigned int ) -2);
+      Draw_Interprete(cmd);
+    }
   }
 #ifdef _WIN32
   // Destruction de l'application
index b350be731ee0184df18ad2eadd06c8ecedb478b8..68fb8f9e792e5d972722e19acef974d671e806f7 100644 (file)
@@ -530,7 +530,7 @@ Standard_Boolean Draw_Interpretor::Complete(const Standard_CString line)
   Standard_PCharacter pLine;
   //
   pLine=(Standard_PCharacter)line;
-  return Tcl_CommandComplete(pLine);
+  return Tcl_CommandComplete (pLine) != 0;
 }
 
 //=======================================================================
index 5b75350abbc106818690e553616677351eb43627..ade79f652a97155f71e0e28db550bb85dfc860f3 100644 (file)
@@ -279,9 +279,9 @@ inline void Extrema_Curve2dTool::D2(const Adaptor2d_Curve2d& C,
 //purpose  : 
 //=======================================================================
 
- inline Standard_Boolean Extrema_Curve2dTool::IsRational(const Adaptor2d_Curve2d& C)
+inline Standard_Boolean Extrema_Curve2dTool::IsRational(const Adaptor2d_Curve2d& C)
 {
-  return C.Degree();
+  return C.Degree() != 0;
 }
 
 
index 3f344161e245f210ddf9cad39c218102087a3341..ea6a124f58468b6e386b5f6d652c12bd1dcf913b 100644 (file)
@@ -286,11 +286,10 @@ Storage_BaseDriver& FSD_BinaryFile::PutBoolean(const Standard_Boolean aValue)
 {
 #if OCCT_BINARY_FILE_DO_INVERSE
   Standard_Integer t = InverseInt ((Standard_Integer) aValue);
-  
-  if (!fwrite(&t,sizeof(Standard_Integer),1,myStream)) Storage_StreamWriteError::Raise();
 #else
-  if (!fwrite(&aValue,sizeof(Standard_Boolean),1,myStream)) Storage_StreamWriteError::Raise();
+  Standard_Integer t = aValue ? 1 : 0;
 #endif
+  if (!fwrite(&t,sizeof(Standard_Integer),1,myStream)) Storage_StreamWriteError::Raise();
   return *this;
 }
 
@@ -429,11 +428,13 @@ void FSD_BinaryFile::GetInteger (Standard_IStream& theIStream, Standard_Integer&
 
 Storage_BaseDriver& FSD_BinaryFile::GetBoolean(Standard_Boolean& aValue)
 {
-  if (!fread(&aValue,sizeof(Standard_Boolean),1,myStream))
+  Standard_Integer anInt = 0;
+  if (!fread(&anInt,sizeof(Standard_Integer),1,myStream))
     Storage_StreamTypeMismatchError::Raise();
 #if OCCT_BINARY_FILE_DO_INVERSE
-  aValue = InverseInt ((Standard_Integer) aValue);
+  anInt = InverseInt (anInt);
 #endif
+  aValue = (anInt != 0);
   return *this;
 }
 
index c07838e613ef5ccab83f01eb8734fb116a3b06dc..94ec7bffb06fc9403106793fbfe923cbf23f37c4 100644 (file)
@@ -320,8 +320,8 @@ Standard_Boolean
                                         const Standard_Boolean RecOnS1, 
                                         const Standard_Boolean RecOnS2, 
                                         const math_Vector& Soldep, 
-                                        Standard_Boolean& Intf, 
-                                        Standard_Boolean& Intl)
+                                        Standard_Integer& Intf, 
+                                        Standard_Integer& Intl)
 {
   Handle(ChFiDS_SurfData) Data = SeqData(1);
   Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
@@ -372,14 +372,15 @@ Standard_Boolean
   done = CompleteData(Data,Func,lin,S1,S2,Or,0,0,0,0);
   if(!done)  Standard_Failure::Raise("PerformSurf : Failed approximation!");
 //  maybesingular = (Func.GetMinimalDistance()<=100*tolapp3d);
-  Standard_Boolean ok = 0;
+  Standard_Boolean ok = Standard_False;
   if(!Forward){
     Intf = 0;
     const ChFiDS_CommonPoint& cpf1 = Data->VertexFirstOnS1();
     if(cpf1.IsOnArc()){
       TopoDS_Face F1 = S1->ChangeSurface().Face();
       TopoDS_Face bid;
-      ok = Intf = !SearchFace(Spine,cpf1,F1,bid);
+      Intf = !SearchFace(Spine,cpf1,F1,bid);
+      ok = Intf != 0;
     }
     const ChFiDS_CommonPoint& cpf2 = Data->VertexFirstOnS2();
     if(cpf2.IsOnArc() && !ok){
@@ -389,12 +390,13 @@ Standard_Boolean
     }
   }
   Intl = 0;
-  ok = 0;
+  ok = Standard_False;
   const ChFiDS_CommonPoint& cpl1 = Data->VertexLastOnS1();
   if(cpl1.IsOnArc()){
     TopoDS_Face F1 = S1->ChangeSurface().Face();
     TopoDS_Face bid;
-    ok = Intl = !SearchFace(Spine,cpl1,F1,bid);
+    Intl = !SearchFace(Spine,cpl1,F1,bid);
+    ok = Intl != 0;
   }
   const ChFiDS_CommonPoint& cpl2 = Data->VertexLastOnS2();
   if(cpl2.IsOnArc() && !ok){
@@ -410,17 +412,17 @@ Standard_Boolean
   return Standard_True;
 }
 
-void FilletSurf_InternalBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&, const Handle(ChFiDS_HElSpine)&, const Handle(ChFiDS_Spine)&, const int, const Handle(BRepAdaptor_HSurface)&, const Handle(Adaptor3d_TopolTool)&, const Handle(BRepAdaptor_HCurve2d)&, const Handle(BRepAdaptor_HSurface)&, const Handle(BRepAdaptor_HCurve2d)&, unsigned int&, const Handle(BRepAdaptor_HSurface)&, const Handle(Adaptor3d_TopolTool)&, const TopAbs_Orientation, const double, const double, const double, double&, double&, const unsigned int, const unsigned int, const unsigned int, const unsigned int, const unsigned int, const unsigned int, const math_Vector&)
+void FilletSurf_InternalBuilder::PerformSurf (ChFiDS_SequenceOfSurfData& , const Handle(ChFiDS_HElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , const Handle(BRepAdaptor_HSurface)& , const Handle(Adaptor3d_TopolTool)& , const Handle(BRepAdaptor_HCurve2d)& , const Handle(BRepAdaptor_HSurface)& , const Handle(BRepAdaptor_HCurve2d)& , Standard_Boolean& , const Handle(BRepAdaptor_HSurface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , const Standard_Real , const Standard_Real , const Standard_Real , Standard_Real& , Standard_Real& , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const math_Vector& )
 {
  Standard_DomainError::Raise("BlendFunc_CSConstRad::Section : Not implemented");
 }
 
-void FilletSurf_InternalBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&, const Handle(ChFiDS_HElSpine)&, const Handle(ChFiDS_Spine)&, const int, const Handle(BRepAdaptor_HSurface)&, const Handle(Adaptor3d_TopolTool)&, const Handle(BRepAdaptor_HCurve2d)&, const Handle(BRepAdaptor_HSurface)&, const Handle(BRepAdaptor_HCurve2d)&, unsigned int&, const TopAbs_Orientation, const Handle(BRepAdaptor_HSurface)&, const Handle(Adaptor3d_TopolTool)&, const Handle(BRepAdaptor_HCurve2d)&, const Handle(BRepAdaptor_HSurface)&, const Handle(BRepAdaptor_HCurve2d)&, unsigned int&, const TopAbs_Orientation, const double, const double, const double, double&, double&, const unsigned int, const unsigned int, const unsigned int, const unsigned int, const unsigned int, const unsigned int, const unsigned int, const math_Vector&)
+void FilletSurf_InternalBuilder::PerformSurf (ChFiDS_SequenceOfSurfData& , const Handle(ChFiDS_HElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , const Handle(BRepAdaptor_HSurface)& , const Handle(Adaptor3d_TopolTool)& , const TopAbs_Orientation , const Handle(BRepAdaptor_HSurface)& , const Handle(Adaptor3d_TopolTool)& , const Handle(BRepAdaptor_HCurve2d)& , const Handle(BRepAdaptor_HSurface)& , const Handle(BRepAdaptor_HCurve2d)& , Standard_Boolean& , const Standard_Real , const Standard_Real , const Standard_Real , Standard_Real& , Standard_Real& , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const math_Vector& )
 {
  Standard_DomainError::Raise("BlendFunc_CSConstRad::Section : Not implemented");
 }
 
-void FilletSurf_InternalBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&, const Handle(ChFiDS_HElSpine)&, const Handle(ChFiDS_Spine)&, const int, const Handle(BRepAdaptor_HSurface)&, const Handle(Adaptor3d_TopolTool)&, const TopAbs_Orientation, const Handle(BRepAdaptor_HSurface)&, const Handle(Adaptor3d_TopolTool)&, const Handle(BRepAdaptor_HCurve2d)&, const Handle(BRepAdaptor_HSurface)&, const Handle(BRepAdaptor_HCurve2d)&, unsigned int&, const double, const double, const double, double&, double&, const unsigned int, const unsigned int, const unsigned int, const unsigned int, const unsigned int, const unsigned int, const math_Vector&)
+void FilletSurf_InternalBuilder::PerformSurf (ChFiDS_SequenceOfSurfData& , const Handle(ChFiDS_HElSpine)& , const Handle(ChFiDS_Spine)& , const Standard_Integer , const Handle(BRepAdaptor_HSurface)& , const Handle(Adaptor3d_TopolTool)& , const Handle(BRepAdaptor_HCurve2d)& , const Handle(BRepAdaptor_HSurface)& , const Handle(BRepAdaptor_HCurve2d)& , Standard_Boolean& , const TopAbs_Orientation , const Handle(BRepAdaptor_HSurface)& , const Handle(Adaptor3d_TopolTool)& , const Handle(BRepAdaptor_HCurve2d)& , const Handle(BRepAdaptor_HSurface)& , const Handle(BRepAdaptor_HCurve2d)& , Standard_Boolean& , const TopAbs_Orientation , const Standard_Real , const Standard_Real , const Standard_Real , Standard_Real& , Standard_Real& , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const Standard_Boolean , const math_Vector& )
 {
  Standard_DomainError::Raise("BlendFunc_CSConstRad::Section : Not implemented");
 }
index 63024b24f10774635bba1c7b06e68cbd8f5b062a..9a122f434e1edd6ed2b491e35036097b0e421667 100644 (file)
@@ -126,7 +126,7 @@ protected:
   
   //! This  method calculates the elements of construction of the
   //! fillet (constant or evolutive).
-  Standard_EXPORT virtual Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Boolean& Intf, Standard_Boolean& Intl) Standard_OVERRIDE;
+  Standard_EXPORT virtual Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE;
   
   Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_HElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_HCurve2d)& PC1, const Handle(BRepAdaptor_HSurface)& Sref1, const Handle(BRepAdaptor_HCurve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE;
   
index eedb6c76b399416e097f3bba8b4d7455d8cb6d73..cf8b541c37386be5b230e1ee69136560bdbac092 100644 (file)
@@ -296,7 +296,7 @@ static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const
 
   Standard_Integer k;
   Standard_Real Udeb, Ufin, UIso, VIso;
-  Standard_Integer Only2d, Only3d;
+  Standard_Boolean Only2d, Only3d;
   gp_Pnt2d P2d, Pdeb, Pfin;
   gp_Pnt P;
   Handle(Adaptor2d_HCurve2d) HPCur;
index 44137b03ed2c0f4b0b0dc4c9cb3dd5632becced9..9a72f39e4a745ed5a55887c2a1ac64dbf0482d6b 100755 (executable)
@@ -148,7 +148,7 @@ const Handle(Image_PixMap)& Graphic3d_MarkerImage::GetImage()
     Standard_Byte* anImageRow = myImage->ChangeRow (aRowIter + aRowOffset);
     for (Standard_Integer aColumnIter = 0; aColumnIter < myWidth; aColumnIter++)
     {
-      Standard_Boolean aBitOn = myBitMap->Value (aLowerIndex + aNumOfBytesInRow * aRowIter + aColumnIter / 8) & (0x80 >> (aColumnIter % 8));
+      Standard_Boolean aBitOn = (myBitMap->Value (aLowerIndex + aNumOfBytesInRow * aRowIter + aColumnIter / 8) & (0x80 >> (aColumnIter % 8))) != 0;
       anImageRow[aColumnIter + aColumnOffset] = aBitOn ? 255 : 0;
     }
   }
index c3badb17283f4da970a86ad6904a223dfc7005a0..9d48682f1b9ef6a1e1682e8703120c82aa71f0d2 100644 (file)
@@ -6,7 +6,6 @@ HLRAlgo_Array1OfPISeg.hxx
 HLRAlgo_Array1OfTData.hxx
 HLRAlgo_BiPoint.cxx
 HLRAlgo_BiPoint.hxx
-HLRAlgo_BiPoint.lxx
 HLRAlgo_Coincidence.cxx
 HLRAlgo_Coincidence.hxx
 HLRAlgo_Coincidence.lxx
@@ -15,10 +14,8 @@ HLRAlgo_EdgeIterator.hxx
 HLRAlgo_EdgeIterator.lxx
 HLRAlgo_EdgesBlock.cxx
 HLRAlgo_EdgesBlock.hxx
-HLRAlgo_EdgesBlock.lxx
 HLRAlgo_EdgeStatus.cxx
 HLRAlgo_EdgeStatus.hxx
-HLRAlgo_EdgeStatus.lxx
 HLRAlgo_HArray1OfPHDat.hxx
 HLRAlgo_HArray1OfPINod.hxx
 HLRAlgo_HArray1OfPISeg.hxx
index d48514c208b960f8b23891ea09b004fc43d052a2..409e6043102b777895175ca89c97af49be335f48 100644 (file)
@@ -109,7 +109,7 @@ HLRAlgo_BiPoint::HLRAlgo_BiPoint (const Standard_Real X1,
                                  const Standard_Real YT2,
                                  const Standard_Real ZT2,
                                  const Standard_Integer Index,
-                                 const Standard_Boolean flag)
+                                 const Standard_Integer flag)
 {
   PntX1 = X1;
   PntY1 = Y1;
@@ -202,7 +202,7 @@ HLRAlgo_BiPoint::HLRAlgo_BiPoint (const Standard_Real X1,
                                  const Standard_Integer i1,
                                  const Standard_Integer i1p1,
                                  const Standard_Integer i1p2,
-                                 const Standard_Boolean flag)
+                                 const Standard_Integer flag)
 {
   PntX1 = X1;
   PntY1 = Y1;
@@ -305,7 +305,7 @@ HLRAlgo_BiPoint::HLRAlgo_BiPoint (const Standard_Real X1,
                                  const Standard_Integer i2,
                                  const Standard_Integer i2p1,
                                  const Standard_Integer i2p2,
-                                 const Standard_Boolean flag)
+                                 const Standard_Integer flag)
 {
   PntX1 = X1;
   PntY1 = Y1;
index 82a760a06d0493fa6528f3cd38dcb6d50a0ad20a..3eba51ee7ec7c13b3c715e9f00ae3732f2899262 100644 (file)
@@ -34,69 +34,80 @@ public:
 
   DEFINE_STANDARD_ALLOC
 
-  
-    HLRAlgo_BiPoint();
-  
+  HLRAlgo_BiPoint() {}
+
   Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
   
-  Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Boolean flag);
+  Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer flag);
   
   Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
   
-  Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Boolean flag);
+  Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer flag);
   
   Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i2, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
   
-  Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i2, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Boolean flag);
-  
-    Standard_Boolean Rg1Line() const;
-  
-    void Rg1Line (const Standard_Boolean B);
-  
-    Standard_Boolean RgNLine() const;
-  
-    void RgNLine (const Standard_Boolean B);
-  
-    Standard_Boolean OutLine() const;
-  
-    void OutLine (const Standard_Boolean B);
-  
-    Standard_Boolean IntLine() const;
-  
-    void IntLine (const Standard_Boolean B);
-  
-    Standard_Boolean Hidden() const;
-  
-    void Hidden (const Standard_Boolean B);
-  
-    Standard_Address Indices() const;
-  
-    Standard_Address Coordinates() const;
-
+  Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i2, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer flag);
 
+  Standard_Boolean Rg1Line() const { return (myIndices[9] & EMskRg1Line) != 0; }
 
+  void Rg1Line (const Standard_Boolean B)
+  {
+    if (B) myIndices[9] |=  EMskRg1Line;
+    else   myIndices[9] &= ~EMskRg1Line;
+  }
 
-protected:
+  Standard_Boolean RgNLine() const { return (myIndices[9] & EMskRgNLine) != 0; }
 
+  void RgNLine (const Standard_Boolean B)
+  {
+    if (B) myIndices[9] |=  EMskRgNLine;
+    else   myIndices[9] &= ~EMskRgNLine;
+  }
 
+  Standard_Boolean OutLine() const { return (myIndices[9] & EMskOutLine) != 0; }
 
+  void OutLine (const Standard_Boolean B)
+  {
+    if (B) myIndices[9] |=  EMskOutLine;
+    else   myIndices[9] &= ~EMskOutLine;
+  }
 
+  Standard_Boolean IntLine() const { return (myIndices[9] & EMskIntLine) != 0; }
 
-private:
+  void IntLine (const Standard_Boolean B)
+  {
+    if (B) myIndices[9] |=  EMskIntLine;
+    else   myIndices[9] &= ~EMskIntLine;
+  }
 
+  Standard_Boolean Hidden() const { return (myIndices[9] & EMskHidden) != 0; }
 
+  void Hidden (const Standard_Boolean B)
+  {
+    if (B) myIndices[9] |=  EMskHidden;
+    else   myIndices[9] &= ~EMskHidden;
+  }
 
-  Standard_Integer myIndices[10];
-  Standard_Real myCoordinates[12];
-
-
-};
+  Standard_Address Indices()     const { return const_cast<Standard_Integer* >(myIndices); }
 
+  Standard_Address Coordinates() const { return const_cast<Standard_Real* >(myCoordinates); }
 
-#include <HLRAlgo_BiPoint.lxx>
+protected:
 
+  enum EMskFlags
+  {
+    EMskRg1Line = 1,
+    EMskRgNLine = 2,
+    EMskOutLine = 4,
+    EMskIntLine = 8,
+    EMskHidden  = 16
+  };
 
+private:
 
+  Standard_Integer myIndices[10];
+  Standard_Real myCoordinates[12];
 
+};
 
 #endif // _HLRAlgo_BiPoint_HeaderFile
diff --git a/src/HLRAlgo/HLRAlgo_BiPoint.lxx b/src/HLRAlgo/HLRAlgo_BiPoint.lxx
deleted file mode 100644 (file)
index bb173a7..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-// Created on: 1995-06-22
-// Created by: Christophe MARION
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#define EMskRg1Line  ((Standard_Boolean)1)
-#define EMskRgNLine  ((Standard_Boolean)2)
-#define EMskOutLine  ((Standard_Boolean)4)
-#define EMskIntLine  ((Standard_Boolean)8)
-#define EMskHidden   ((Standard_Boolean)16)
-
-//=======================================================================
-//function : HLRAlgo_BiPoint
-//purpose  : 
-//=======================================================================
-
-inline HLRAlgo_BiPoint::HLRAlgo_BiPoint ()
-{
-}
-
-//=======================================================================
-//function : Rg1Line
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRAlgo_BiPoint::Rg1Line () const
-{ return (myIndices[9] & EMskRg1Line) != 0; }
-
-//=======================================================================
-//function : Rg1Line
-//purpose  : 
-//=======================================================================
-
-inline void HLRAlgo_BiPoint::Rg1Line (const Standard_Boolean B)
-{
-  if (B) myIndices[9] |=  EMskRg1Line;
-  else   myIndices[9] &= ~EMskRg1Line;
-}
-
-//=======================================================================
-//function : RgNLine
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRAlgo_BiPoint::RgNLine () const
-{ return (myIndices[9] & EMskRgNLine) != 0; }
-
-//=======================================================================
-//function : RgNLine
-//purpose  : 
-//=======================================================================
-
-inline void HLRAlgo_BiPoint::RgNLine (const Standard_Boolean B)
-{
-  if (B) myIndices[9] |=  EMskRgNLine;
-  else   myIndices[9] &= ~EMskRgNLine;
-}
-
-//=======================================================================
-//function : OutLine
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRAlgo_BiPoint::OutLine () const
-{ return (myIndices[9] & EMskOutLine) != 0; }
-
-//=======================================================================
-//function : OutLine
-//purpose  : 
-//=======================================================================
-
-inline void HLRAlgo_BiPoint::OutLine (const Standard_Boolean B)
-{
-  if (B) myIndices[9] |=  EMskOutLine;
-  else   myIndices[9] &= ~EMskOutLine;
-}
-
-//=======================================================================
-//function : IntLine
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRAlgo_BiPoint::IntLine () const
-{ return (myIndices[9] & EMskIntLine) != 0; }
-
-//=======================================================================
-//function : IntLine
-//purpose  : 
-//=======================================================================
-
-inline void HLRAlgo_BiPoint::IntLine (const Standard_Boolean B)
-{
-  if (B) myIndices[9] |=  EMskIntLine;
-  else   myIndices[9] &= ~EMskIntLine;
-}
-
-//=======================================================================
-//function : Hidden
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRAlgo_BiPoint::Hidden () const
-{ return (myIndices[9] & EMskHidden) != 0; }
-
-//=======================================================================
-//function : Hidden
-//purpose  : 
-//=======================================================================
-
-inline void HLRAlgo_BiPoint::Hidden (const Standard_Boolean B)
-{
-  if (B) myIndices[9] |=  EMskHidden;
-  else   myIndices[9] &= ~EMskHidden;
-}
-
-//=======================================================================
-//function : Indices
-//purpose  : 
-//=======================================================================
-
-inline Standard_Address HLRAlgo_BiPoint::Indices () const
-{ return (Standard_Address)myIndices; }
-
-//=======================================================================
-//function : Coordinates
-//purpose  : 
-//=======================================================================
-
-inline Standard_Address HLRAlgo_BiPoint::Coordinates () const
-{ return (Standard_Address)myCoordinates; }
index 9e3bf262b0a02d1fdd8073752105bb463c0d00cf..d6feb9319fa84f2185b6f898caf3772ecbd1f287 100644 (file)
 //function : HLRAlgo_EdgeStatus
 //purpose  : 
 //=======================================================================
-HLRAlgo_EdgeStatus::HLRAlgo_EdgeStatus ()
+HLRAlgo_EdgeStatus::HLRAlgo_EdgeStatus()
+: myStart     (0.0),
+  myEnd       (0.0),
+  myTolStart  (0.0f),
+  myTolEnd    (0.0f),
+  myAllHidden (false),
+  myAllVisible(false)
 {
 }
 
@@ -43,7 +49,8 @@ HLRAlgo_EdgeStatus::HLRAlgo_EdgeStatus (const Standard_Real Start,
   myEnd       (End),
   myTolStart  (TolStart),
   myTolEnd    (TolEnd),
-  myFlags     (0)
+  myAllHidden (false),
+  myAllVisible(false)
 {
   ShowAll();
 }
index ba2fb3c04f83963b2f1759e4b7133939c3ae6240..d4cf56ab12ded02f2168dfa68f74b0707a28a5d0 100644 (file)
@@ -56,9 +56,15 @@ public:
   //! Edge is   bounded by the  interval  <Start>, <End>
   //! with the tolerances <TolStart>, <TolEnd>.
   Standard_EXPORT void Initialize (const Standard_Real Start, const Standard_ShortReal TolStart, const Standard_Real End, const Standard_ShortReal TolEnd);
-  
-    void Bounds (Standard_Real& Start, Standard_ShortReal& TolStart, Standard_Real& End, Standard_ShortReal& TolEnd) const;
-  
+
+  void Bounds (Standard_Real& theStart, Standard_ShortReal& theTolStart, Standard_Real& theEnd, Standard_ShortReal& theTolEnd) const
+  {
+    theStart    = myStart;
+    theTolStart = myTolStart;
+    theEnd      = myEnd;
+    theTolEnd   = myTolEnd;
+  }
+
   Standard_EXPORT Standard_Integer NbVisiblePart() const;
   
   Standard_EXPORT void VisiblePart (const Standard_Integer Index, Standard_Real& Start, Standard_ShortReal& TolStart, Standard_Real& End, Standard_ShortReal& TolEnd) const;
@@ -71,49 +77,39 @@ public:
   //! or  inside  ) the boundary  of  the  face the flag
   //! <OnBoundary> is True ( or False ).
   Standard_EXPORT void Hide (const Standard_Real Start, const Standard_ShortReal TolStart, const Standard_Real End, const Standard_ShortReal TolEnd, const Standard_Boolean OnFace, const Standard_Boolean OnBoundary);
-  
-  //! Hide the whole Edge.
-    void HideAll();
-  
-  //! Show the whole Edge.
-    void ShowAll();
-  
-    Standard_Boolean AllHidden() const;
-  
-    void AllHidden (const Standard_Boolean B);
-  
-    Standard_Boolean AllVisible() const;
-  
-    void AllVisible (const Standard_Boolean B);
-
-
 
+  //! Hide the whole Edge.
+  void HideAll()
+  {
+    AllVisible(Standard_False);
+    AllHidden (Standard_True);
+  }
 
-protected:
+  //! Show the whole Edge.
+  void ShowAll()
+  {
+    AllVisible(Standard_True);
+    AllHidden (Standard_False);
+  }
 
+  Standard_Boolean AllHidden() const { return myAllHidden; }
 
+  void AllHidden (const Standard_Boolean B) { myAllHidden = B; }
 
+  Standard_Boolean AllVisible() const { return myAllVisible; }
 
+  void AllVisible (const Standard_Boolean B) { myAllVisible = B; }
 
 private:
 
-
-
   Standard_Real myStart;
   Standard_Real myEnd;
   Standard_ShortReal myTolStart;
   Standard_ShortReal myTolEnd;
-  Standard_Boolean myFlags;
+  Standard_Boolean myAllHidden;
+  Standard_Boolean myAllVisible;
   Intrv_Intervals myVisibles;
 
-
 };
 
-
-#include <HLRAlgo_EdgeStatus.lxx>
-
-
-
-
-
 #endif // _HLRAlgo_EdgeStatus_HeaderFile
diff --git a/src/HLRAlgo/HLRAlgo_EdgeStatus.lxx b/src/HLRAlgo/HLRAlgo_EdgeStatus.lxx
deleted file mode 100644 (file)
index e8b46db..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-// Created on: 1992-02-18
-// Created by: Christophe MARION
-// Copyright (c) 1992-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#define EMaskAllHidden  ((Standard_Boolean)1)
-#define EMaskAllVisible ((Standard_Boolean)2)
-
-//=======================================================================
-//function : Bounds
-//purpose  : 
-//=======================================================================
-
-inline void HLRAlgo_EdgeStatus::Bounds 
-( Standard_Real& Start, Standard_ShortReal& TolStart,
-  Standard_Real& End  , Standard_ShortReal& TolEnd  ) const
-{
-  Start    = myStart;
-  TolStart = myTolStart;
-  End      = myEnd;
-  TolEnd   = myTolEnd;
-}
-
-//=======================================================================
-//function : HideAll
-//purpose  : 
-//=======================================================================
-
-inline void HLRAlgo_EdgeStatus::HideAll()
-{
-  AllVisible(Standard_False);
-  AllHidden (Standard_True);
-}
-
-//=======================================================================
-//function : ShowAll
-//purpose  : 
-//=======================================================================
-
-inline void HLRAlgo_EdgeStatus::ShowAll()
-{
-  AllVisible(Standard_True);
-  AllHidden (Standard_False);
-}
-
-//=======================================================================
-//function : AllHidden
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRAlgo_EdgeStatus::AllHidden () const
-{ return (myFlags & EMaskAllHidden) != 0; }
-
-//=======================================================================
-//function : AllHidden
-//purpose  : 
-//=======================================================================
-
-inline void HLRAlgo_EdgeStatus::AllHidden (const Standard_Boolean B)
-{
-  if (B) myFlags |=  EMaskAllHidden;
-  else   myFlags &= ~EMaskAllHidden;
-}
-
-//=======================================================================
-//function : AllVisible
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRAlgo_EdgeStatus::AllVisible () const
-{ return (myFlags & EMaskAllVisible) != 0; }
-
-//=======================================================================
-//function : AllVisible
-//purpose  : 
-//=======================================================================
-
-inline void HLRAlgo_EdgeStatus::AllVisible (const Standard_Boolean B)
-{
-  if (B) myFlags |=  EMaskAllVisible;
-  else   myFlags &= ~EMaskAllVisible;
-}
index 3aa1286f451b69d553514c8b8f9cbb6b30a01d5d..2b86d8f5a1ae2b324cbe2625051b03dbf29dbf8d 100644 (file)
@@ -49,65 +49,81 @@ class HLRAlgo_EdgesBlock : public MMgt_TShared
 
 public:
 
-  
   //! Create a Block of Edges for a wire.
   Standard_EXPORT HLRAlgo_EdgesBlock(const Standard_Integer NbEdges);
-  
-    Standard_Integer NbEdges() const;
-  
-    void Edge (const Standard_Integer I, const Standard_Integer EI);
-  
-    Standard_Integer Edge (const Standard_Integer I) const;
-  
-    void Orientation (const Standard_Integer I, const TopAbs_Orientation Or);
-  
-    TopAbs_Orientation Orientation (const Standard_Integer I) const;
-  
-    Standard_Boolean OutLine (const Standard_Integer I) const;
-  
-    void OutLine (const Standard_Integer I, const Standard_Boolean B);
-  
-    Standard_Boolean Internal (const Standard_Integer I) const;
-  
-    void Internal (const Standard_Integer I, const Standard_Boolean B);
-  
-    Standard_Boolean Double (const Standard_Integer I) const;
-  
-    void Double (const Standard_Integer I, const Standard_Boolean B);
-  
-    Standard_Boolean IsoLine (const Standard_Integer I) const;
-  
-    void IsoLine (const Standard_Integer I, const Standard_Boolean B);
-  
-  Standard_EXPORT void UpdateMinMax (const Standard_Address TotMinMax);
-  
-    Standard_Address MinMax() const;
 
+  Standard_Integer NbEdges() const { return myEdges.Upper(); }
 
+  void Edge (const Standard_Integer I, const Standard_Integer EI) { myEdges(I) = EI; }
 
+  Standard_Integer Edge (const Standard_Integer I) const { return myEdges(I); }
 
-  DEFINE_STANDARD_RTTIEXT(HLRAlgo_EdgesBlock,MMgt_TShared)
+  void Orientation (const Standard_Integer I, const TopAbs_Orientation Or)
+  {
+    myFlags(I) &= ~EMaskOrient;
+    myFlags(I) |= (Or & EMaskOrient);
+  }
 
-protected:
+  TopAbs_Orientation Orientation (const Standard_Integer I) const
+  {
+    return ((TopAbs_Orientation)(myFlags(I) & EMaskOrient));
+  }
 
+  Standard_Boolean OutLine (const Standard_Integer I) const { return (myFlags(I) & EMaskOutLine) != 0; }
 
+  void OutLine (const Standard_Integer I, const Standard_Boolean B)
+  {
+    if (B) myFlags(I) |=  EMaskOutLine;
+    else   myFlags(I) &= ~EMaskOutLine;
+  }
 
+  Standard_Boolean Internal (const Standard_Integer I) const { return (myFlags(I) & EMaskInternal) != 0; }
 
-private:
+  void Internal (const Standard_Integer I, const Standard_Boolean B)
+  {
+    if (B) myFlags(I) |=  EMaskInternal;
+    else   myFlags(I) &= ~EMaskInternal;
+  }
 
+  Standard_Boolean Double (const Standard_Integer I) const { return (myFlags(I) & EMaskDouble) != 0; }
 
-  TColStd_Array1OfInteger myEdges;
-  TColStd_Array1OfBoolean myFlags;
-  Standard_Integer myMinMax[16];
+  void Double (const Standard_Integer I, const Standard_Boolean B)
+  {
+    if (B) myFlags(I) |=  EMaskDouble;
+    else   myFlags(I) &= ~EMaskDouble;
+  }
 
+  Standard_Boolean IsoLine (const Standard_Integer I) const { return (myFlags(I) & EMaskIsoLine) != 0; }
 
-};
+  void IsoLine (const Standard_Integer I, const Standard_Boolean B)
+  {
+    if (B) myFlags(I) |=  EMaskIsoLine;
+    else   myFlags(I) &= ~EMaskIsoLine;
+  }
+
+  Standard_EXPORT void UpdateMinMax (const Standard_Address TotMinMax);
+
+  Standard_Address MinMax() const { return (Standard_Address )&myMinMax; }
 
+  DEFINE_STANDARD_RTTIEXT(HLRAlgo_EdgesBlock,MMgt_TShared)
 
-#include <HLRAlgo_EdgesBlock.lxx>
+protected:
 
+  enum EMskFlags
+  {
+    EMaskOrient   = 15,
+    EMaskOutLine  = 16,
+    EMaskInternal = 32,
+    EMaskDouble   = 64,
+    EMaskIsoLine  = 128
+  };
 
+private:
 
+  TColStd_Array1OfInteger myEdges;
+  TColStd_Array1OfInteger myFlags;
+  Standard_Integer myMinMax[16];
 
+};
 
 #endif // _HLRAlgo_EdgesBlock_HeaderFile
diff --git a/src/HLRAlgo/HLRAlgo_EdgesBlock.lxx b/src/HLRAlgo/HLRAlgo_EdgesBlock.lxx
deleted file mode 100644 (file)
index de7b765..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-// Created on: 1995-04-20
-// Created by: Christophe MARION
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#define EMaskOrient   ((Standard_Boolean)15)
-#define EMaskOutLine  ((Standard_Boolean)16)
-#define EMaskInternal ((Standard_Boolean)32)
-#define EMaskDouble   ((Standard_Boolean)64)
-#define EMaskIsoLine  ((Standard_Boolean)128)
-
-//=======================================================================
-//function : NbEdges
-//purpose  : 
-//=======================================================================
-
-inline Standard_Integer HLRAlgo_EdgesBlock::NbEdges() const
-{
-  return myEdges.Upper();
-}
-
-//=======================================================================
-//function : Edge
-//purpose  : 
-//=======================================================================
-
-inline void HLRAlgo_EdgesBlock::Edge (const Standard_Integer I,
-                                     const Standard_Integer EI)
-{
-  myEdges(I) = EI;
-}
-
-//=======================================================================
-//function : Edge
-//purpose  : 
-//=======================================================================
-
-inline Standard_Integer
-HLRAlgo_EdgesBlock::Edge (const Standard_Integer I) const
-{
-  return myEdges(I);
-}
-
-//=======================================================================
-//function : Orientation
-//purpose  : 
-//=======================================================================
-
-inline TopAbs_Orientation 
-HLRAlgo_EdgesBlock::Orientation (const Standard_Integer I) const
-{
-  return ((TopAbs_Orientation)(myFlags(I) & EMaskOrient));
-}
-
-//=======================================================================
-//function : Orientation
-//purpose  : 
-//=======================================================================
-
-inline void 
-HLRAlgo_EdgesBlock::Orientation (const Standard_Integer I,
-                                const TopAbs_Orientation Or)
-{
-  myFlags(I) &= ~EMaskOrient;
-  myFlags(I) |= (((Standard_Boolean)Or) & EMaskOrient);
-}
-
-//=======================================================================
-//function : OutLine
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean
-HLRAlgo_EdgesBlock::OutLine (const Standard_Integer I) const
-{
-  return (myFlags(I) & EMaskOutLine) != 0;
-}
-
-//=======================================================================
-//function : OutLine
-//purpose  : 
-//=======================================================================
-
-inline void 
-HLRAlgo_EdgesBlock::OutLine (const Standard_Integer I,
-                            const Standard_Boolean B)
-{
-  if (B) myFlags(I) |=  EMaskOutLine;
-  else   myFlags(I) &= ~EMaskOutLine;
-}
-
-//=======================================================================
-//function : Internal
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean
-HLRAlgo_EdgesBlock::Internal (const Standard_Integer I) const
-{
-  return (myFlags(I) & EMaskInternal) != 0;
-}
-
-//=======================================================================
-//function : Internal
-//purpose  : 
-//=======================================================================
-
-inline void
-HLRAlgo_EdgesBlock::Internal (const Standard_Integer I,
-                             const Standard_Boolean B)
-{
-  if (B) myFlags(I) |=  EMaskInternal;
-  else   myFlags(I) &= ~EMaskInternal;
-}
-
-//=======================================================================
-//function : Double
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean
-HLRAlgo_EdgesBlock::Double (const Standard_Integer I) const
-{
-  return (myFlags(I) & EMaskDouble) != 0;
-}
-
-//=======================================================================
-//function : Double
-//purpose  : 
-//=======================================================================
-
-inline void HLRAlgo_EdgesBlock::Double (const Standard_Integer I,
-                                       const Standard_Boolean B)
-{
-  if (B) myFlags(I) |=  EMaskDouble;
-  else   myFlags(I) &= ~EMaskDouble;
-}
-
-//=======================================================================
-//function : IsoLine
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean
-HLRAlgo_EdgesBlock::IsoLine (const Standard_Integer I) const
-{
-  return (myFlags(I) & EMaskIsoLine) != 0;
-}
-
-//=======================================================================
-//function : IsoLine
-//purpose  : 
-//=======================================================================
-
-inline void HLRAlgo_EdgesBlock::IsoLine (const Standard_Integer I,
-                                        const Standard_Boolean B)
-{
-  if (B) myFlags(I) |=  EMaskIsoLine;
-  else   myFlags(I) &= ~EMaskIsoLine;
-}
-
-//=======================================================================
-//function : MinMax
-//purpose  : 
-//=======================================================================
-
-inline Standard_Address HLRAlgo_EdgesBlock::MinMax () const
-{ return (Standard_Address)&myMinMax; }
index c50d45f64711db964d443806bfb39e5f782d9e4d..c9903a0774a5a03218bfb05ae33493ccca3bde9b 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_PolyAlgo,MMgt_TShared)
 
-#define EMskGrALin1  ((Standard_Boolean)   8)
-#define EMskGrALin2  ((Standard_Boolean)  16)
-#define EMskGrALin3  ((Standard_Boolean)  32)
-#define FMskHiding   ((Standard_Boolean) 256)
+#define EMskGrALin1  ((Standard_Integer)   8)
+#define EMskGrALin2  ((Standard_Integer)  16)
+#define EMskGrALin3  ((Standard_Integer)  32)
+#define FMskHiding   ((Standard_Integer) 256)
 
 #define TriNode1 ((Standard_Integer*)TriIndices)[0]
 #define TriNode2 ((Standard_Integer*)TriIndices)[1]
 #define TriNode3 ((Standard_Integer*)TriIndices)[2]
-#define TriFlags ((Standard_Boolean*)TriIndices)[3]
+#define TriFlags ((Standard_Integer*)TriIndices)[3]
 
 #define XV1          myRealPtr[0]
 #define XV2          myRealPtr[1]
index 043f5ec83993377fad99bc26cdf025d981182a59..108c1094124ff4445f4a29393c8fa5d852f54e59 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#ifndef No_Exception
-//#define No_Exception
-#endif
-
+#include <HLRAlgo_PolyData.hxx>
 
 #include <HLRAlgo_EdgeStatus.hxx>
-#include <HLRAlgo_PolyData.hxx>
+
 #include <Standard_Type.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_PolyData,MMgt_TShared)
 
-#define EMskGrALin1  ((Standard_Boolean)   8)
-#define EMskGrALin2  ((Standard_Boolean)  16)
-#define EMskGrALin3  ((Standard_Boolean)  32)
-#define FMskHiding   ((Standard_Boolean) 256)
+#define EMskGrALin1  ((Standard_Integer)   8)
+#define EMskGrALin2  ((Standard_Integer)  16)
+#define EMskGrALin3  ((Standard_Integer)  32)
+#define FMskHiding   ((Standard_Integer) 256)
 
 #define FIndex  myIndices[0]
 #define MinFac  myIndices[1]
@@ -37,15 +34,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_PolyData,MMgt_TShared)
 #define TriNode1   ((Standard_Integer*)TriIndices)[0]
 #define TriNode2   ((Standard_Integer*)TriIndices)[1]
 #define TriNode3   ((Standard_Integer*)TriIndices)[2]
-#define TriFlags   ((Standard_Boolean*)TriIndices)[3]
-
-#define Crossing   ((Standard_Boolean*)BooleanPtr)[0]
-#define HideBefore ((Standard_Boolean*)BooleanPtr)[1]
-#define TrFlags    ((Standard_Boolean*)BooleanPtr)[2]
-
-#define Crosi      BooleanPtr[0]
-#define HdBef      BooleanPtr[1]
-#define TFlag      BooleanPtr[2]
+#define TriFlags   ((Standard_Integer*)TriIndices)[3]
 
 #define PntX1  ((Standard_Real*)Coordinates)[ 0]
 #define PntY1  ((Standard_Real*)Coordinates)[ 1]
@@ -201,7 +190,10 @@ void HLRAlgo_PolyData::HideByPolyData (const Standard_Address Coordinates,
     HLRAlgo_Array1OfPHDat& PHDat = myHPHDat->ChangeArray1();
     const HLRAlgo_Array1OfTData& TData = myHTData->Array1();
     Standard_Real d1,d2;
-    Standard_Boolean NotConnex,BooleanPtr[3];
+    Standard_Boolean NotConnex    = Standard_False;
+    Standard_Boolean isCrossing   = Standard_False;
+    Standard_Boolean toHideBefore = Standard_False;
+    Standard_Integer TFlag = 0;
     Standard_Address PlanPtr,MinMaxPtr,TriIndices;
     Standard_Integer h,h2 = PHDat.Upper();
     HLRAlgo_PolyHidingData* PH = &(PHDat(1));
@@ -237,8 +229,8 @@ void HLRAlgo_PolyData::HideByPolyData (const Standard_Address Coordinates,
          if      (d1 >  Tolerance) {
            if    (d2 < -Tolerance) {
              Param = d1 / ( d1 - d2 );
-             HdBef = Standard_False;
-             Crosi = Standard_True;
+             toHideBefore = Standard_False;
+             isCrossing   = Standard_True;
              TFlag = TriFlags;
              const TColgp_Array1OfXYZ& Nodes = myHNodes->Array1();
              const gp_XYZ            & P1    = Nodes(TriNode1);
@@ -250,18 +242,14 @@ void HLRAlgo_PolyData::HideByPolyData (const Standard_Address Coordinates,
              YV2 = P2.Y();
              XV3 = P3.X();
              YV3 = P3.Y();
-             HideByOneTriangle(Coordinates,
-                               RealPtr,
-                               &BooleanPtr,
-                               PlanPtr,
-                               status);
+             hideByOneTriangle (Coordinates, RealPtr, isCrossing, toHideBefore, TFlag, status);
            }
          }
          else if (d1 < -Tolerance) {
            if    (d2 >  Tolerance) {
              Param = d1 / ( d1 - d2 );
-             HdBef = Standard_True;
-             Crosi = Standard_True;
+             toHideBefore = Standard_True;
+             isCrossing   = Standard_True;
              TFlag = TriFlags;
              const TColgp_Array1OfXYZ& Nodes = myHNodes->Array1();
              const gp_XYZ            & P1    = Nodes(TriNode1);
@@ -273,14 +261,10 @@ void HLRAlgo_PolyData::HideByPolyData (const Standard_Address Coordinates,
              YV2 = P2.Y();
              XV3 = P3.X();
              YV3 = P3.Y();
-             HideByOneTriangle(Coordinates,
-                               RealPtr,
-                               &BooleanPtr,
-                               PlanPtr,
-                               status);
+             hideByOneTriangle (Coordinates, RealPtr, isCrossing, toHideBefore, TFlag, status);
            }
            else {
-             Crosi = Standard_False;
+             isCrossing = Standard_False;
              TFlag = TriFlags;
              const TColgp_Array1OfXYZ& Nodes = myHNodes->Array1();
              const gp_XYZ            & P1    = Nodes(TriNode1);
@@ -292,15 +276,11 @@ void HLRAlgo_PolyData::HideByPolyData (const Standard_Address Coordinates,
              YV2 = P2.Y();
              XV3 = P3.X();
              YV3 = P3.Y();
-             HideByOneTriangle(Coordinates,
-                               RealPtr,
-                               &BooleanPtr,
-                               PlanPtr,
-                               status);
+             hideByOneTriangle (Coordinates, RealPtr, isCrossing, toHideBefore, TFlag, status);
            }
          }
          else if (d2 < -Tolerance) {
-           Crosi = Standard_False;
+           isCrossing = Standard_False;
            TFlag = TriFlags;
            const TColgp_Array1OfXYZ& Nodes = myHNodes->Array1();
            const gp_XYZ            & P1    = Nodes(TriNode1);
@@ -312,11 +292,7 @@ void HLRAlgo_PolyData::HideByPolyData (const Standard_Address Coordinates,
            YV2 = P2.Y();
            XV3 = P3.X();
            YV3 = P3.Y();
-           HideByOneTriangle(Coordinates,
-                             RealPtr,
-                             &BooleanPtr,
-                             PlanPtr,
-                             status);
+           hideByOneTriangle(Coordinates, RealPtr, isCrossing, toHideBefore, TFlag, status);
          }
        }
       }
@@ -326,16 +302,16 @@ void HLRAlgo_PolyData::HideByPolyData (const Standard_Address Coordinates,
 }
 
 //=======================================================================
-//function : HideByOneTriangle
-//purpose  : 
+//function : hideByOneTriangle
+//purpose  :
 //=======================================================================
 
-void HLRAlgo_PolyData::
-HideByOneTriangle (const Standard_Address Coordinates,
-                  const Standard_Address RealPtr,
-                  const Standard_Address BooleanPtr,
-                  const Standard_Address ,
-                  HLRAlgo_EdgeStatus& status)
+void HLRAlgo_PolyData::hideByOneTriangle (const Standard_Address Coordinates,
+                                          const Standard_Address RealPtr,
+                                          const Standard_Boolean Crossing,
+                                          const Standard_Boolean HideBefore,
+                                          const Standard_Integer TrFlags,
+                                          HLRAlgo_EdgeStatus& status)
 {
   Standard_Boolean o[2],m[2];
   Standard_Integer l,n1=0,nn1,nn2,npi=-1,npiRej=0;
index ae67fcc321ae100cffe1e953e33331d44b093e29..5924fa5039ef4baf07436df11aa566d7a96b9de1 100644 (file)
@@ -70,35 +70,25 @@ public:
   
     Standard_Address Indices();
 
-
-
-
   DEFINE_STANDARD_RTTIEXT(HLRAlgo_PolyData,MMgt_TShared)
 
-protected:
-
-
-
-
 private:
 
-  
   //! evident.
-  Standard_EXPORT void HideByOneTriangle (const Standard_Address Coordinates, const Standard_Address RealPtr, const Standard_Address BooleanPtr, const Standard_Address PlanPtr, HLRAlgo_EdgeStatus& status);
+  void hideByOneTriangle (const Standard_Address Coordinates,
+                          const Standard_Address RealPtr,
+                          const Standard_Boolean Crossing,
+                          const Standard_Boolean HideBefore,
+                          const Standard_Integer TrFlags,
+                          HLRAlgo_EdgeStatus& status);
 
   Standard_Integer myIndices[3];
   Handle(TColgp_HArray1OfXYZ) myHNodes;
   Handle(HLRAlgo_HArray1OfTData) myHTData;
   Handle(HLRAlgo_HArray1OfPHDat) myHPHDat;
 
-
 };
 
-
 #include <HLRAlgo_PolyData.lxx>
 
-
-
-
-
 #endif // _HLRAlgo_PolyData_HeaderFile
index 017217cad566a76754f069b268f28e41018ecf2a..397f10196b93ea95a11cd21cabbefe2fbcbc38ac 100644 (file)
@@ -9,12 +9,8 @@ HLRBRep_Array1OfFData.hxx
 HLRBRep_BCurveTool.cxx
 HLRBRep_BCurveTool.hxx
 HLRBRep_BCurveTool.lxx
-HLRBRep_BiPnt2D.cxx
 HLRBRep_BiPnt2D.hxx
-HLRBRep_BiPnt2D.lxx
-HLRBRep_BiPoint.cxx
 HLRBRep_BiPoint.hxx
-HLRBRep_BiPoint.lxx
 HLRBRep_BSurfaceTool.cxx
 HLRBRep_BSurfaceTool.hxx
 HLRBRep_BSurfaceTool.lxx
diff --git a/src/HLRBRep/HLRBRep_BiPnt2D.cxx b/src/HLRBRep/HLRBRep_BiPnt2D.cxx
deleted file mode 100644 (file)
index 846e953..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// Created on: 1992-08-25
-// Created by: Christophe MARION
-// Copyright (c) 1992-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <gp_Pnt2d.hxx>
-#include <HLRBRep_BiPnt2D.hxx>
-#include <TopoDS_Shape.hxx>
-
-//=======================================================================
-//function : HLRBRep_BiPnt2D
-//purpose  : 
-//=======================================================================
-HLRBRep_BiPnt2D::HLRBRep_BiPnt2D ()
-{
-}
-
-//=======================================================================
-//function : HLRBRep_BiPnt2D
-//purpose  : 
-//=======================================================================
-
-HLRBRep_BiPnt2D::HLRBRep_BiPnt2D (const Standard_Real x1,
-                                 const Standard_Real y1,
-                                 const Standard_Real x2,
-                                 const Standard_Real y2,
-                                 const TopoDS_Shape& S,
-                                 const Standard_Boolean reg1,
-                                 const Standard_Boolean regn,
-                                 const Standard_Boolean outl,
-                                 const Standard_Boolean intl) :
-                                 myP1(x1,y1),
-                                 myP2(x2,y2),
-                                 myShape(S),
-                                 myFlags(0)
-{
-  Rg1Line(reg1);
-  RgNLine(regn);
-  OutLine(outl);
-  IntLine(intl);
-}
index a493995a6ee6db24a1cb79214b006ec1187f1da4..b85d1283fa55232f4e3c458037928ad5d504b572 100644 (file)
@@ -25,9 +25,6 @@
 #include <TopoDS_Shape.hxx>
 #include <Standard_Boolean.hxx>
 #include <Standard_Real.hxx>
-class TopoDS_Shape;
-class gp_Pnt2d;
-
 
 //! Contains the colors of a shape.
 class HLRBRep_BiPnt2D 
@@ -36,61 +33,55 @@ public:
 
   DEFINE_STANDARD_ALLOC
 
-  
-  Standard_EXPORT HLRBRep_BiPnt2D();
-  
-  Standard_EXPORT HLRBRep_BiPnt2D(const Standard_Real x1, const Standard_Real y1, const Standard_Real x2, const Standard_Real y2, const TopoDS_Shape& S, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
-  
-    const gp_Pnt2d& P1() const;
-  
-    const gp_Pnt2d& P2() const;
-  
-    const TopoDS_Shape& Shape() const;
-  
-    void Shape (const TopoDS_Shape& S);
-  
-    Standard_Boolean Rg1Line() const;
-  
-    void Rg1Line (const Standard_Boolean B);
-  
-    Standard_Boolean RgNLine() const;
-  
-    void RgNLine (const Standard_Boolean B);
-  
-    Standard_Boolean OutLine() const;
-  
-    void OutLine (const Standard_Boolean B);
-  
-    Standard_Boolean IntLine() const;
-  
-    void IntLine (const Standard_Boolean B);
+  HLRBRep_BiPnt2D()
+  : myRg1Line (false),
+    myRgNLine (false),
+    myOutLine (false),
+    myIntLine (false) {}
 
+  HLRBRep_BiPnt2D(const Standard_Real x1, const Standard_Real y1, const Standard_Real x2, const Standard_Real y2, const TopoDS_Shape& S, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl)
+  : myP1(x1,y1),
+         myP2(x2,y2),
+         myShape(S),
+    myRg1Line (reg1),
+    myRgNLine (regn),
+    myOutLine (outl),
+    myIntLine (intl) {}
 
+  const gp_Pnt2d& P1() const { return myP1; }
 
+  const gp_Pnt2d& P2() const { return myP2; }
 
-protected:
+  const TopoDS_Shape& Shape() const { return myShape; }
 
+  void Shape (const TopoDS_Shape& S) { myShape = S; }
 
+  Standard_Boolean Rg1Line() const { return myRg1Line; }
 
+  void Rg1Line (const Standard_Boolean B) { myRg1Line = B; }
 
+  Standard_Boolean RgNLine() const { return myRgNLine; }
 
-private:
+  void RgNLine (const Standard_Boolean B) { myRgNLine = B; }
+
+  Standard_Boolean OutLine() const { return myOutLine; }
+
+  void OutLine (const Standard_Boolean B) { myOutLine = B; }
 
+  Standard_Boolean IntLine() const { return myIntLine; }
 
+  void IntLine (const Standard_Boolean B) { myIntLine = B; }
+
+private:
 
   gp_Pnt2d myP1;
   gp_Pnt2d myP2;
   TopoDS_Shape myShape;
-  Standard_Boolean myFlags;
-
+  bool myRg1Line;
+  bool myRgNLine;
+  bool myOutLine;
+  bool myIntLine;
 
 };
 
-
-#include <HLRBRep_BiPnt2D.lxx>
-
-
-
-
-
 #endif // _HLRBRep_BiPnt2D_HeaderFile
diff --git a/src/HLRBRep/HLRBRep_BiPnt2D.lxx b/src/HLRBRep/HLRBRep_BiPnt2D.lxx
deleted file mode 100644 (file)
index a4f5d92..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-// Created on: 1992-08-25
-// Created by: Christophe MARION
-// Copyright (c) 1992-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#define EMskRg1Line  ((Standard_Boolean)1)
-#define EMskRgNLine  ((Standard_Boolean)2)
-#define EMskOutLine  ((Standard_Boolean)4)
-#define EMskIntLine  ((Standard_Boolean)8)
-
-//=======================================================================
-//function : P1
-//purpose  : 
-//=======================================================================
-
-inline const gp_Pnt2d & HLRBRep_BiPnt2D::P1 () const
-{ return myP1; }
-
-//=======================================================================
-//function : P2
-//purpose  : 
-//=======================================================================
-
-inline const gp_Pnt2d & HLRBRep_BiPnt2D::P2 () const
-{ return myP2; }
-
-//=======================================================================
-//function : Shape
-//purpose  : 
-//=======================================================================
-
-inline const TopoDS_Shape & HLRBRep_BiPnt2D::Shape () const
-{ return myShape; }
-
-//=======================================================================
-//function : Shape
-//purpose  : 
-//=======================================================================
-
-inline void HLRBRep_BiPnt2D::Shape (const TopoDS_Shape& S)
-{ myShape = S; }
-
-//=======================================================================
-//function : Rg1Line
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRBRep_BiPnt2D::Rg1Line () const
-{ return (myFlags & EMskRg1Line) != 0; }
-
-//=======================================================================
-//function : Rg1Line
-//purpose  : 
-//=======================================================================
-
-inline void HLRBRep_BiPnt2D::Rg1Line (const Standard_Boolean B)
-{
-  if (B) myFlags |=  EMskRg1Line;
-  else   myFlags &= ~EMskRg1Line;
-}
-
-//=======================================================================
-//function : RgNLine
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRBRep_BiPnt2D::RgNLine () const
-{ return (myFlags & EMskRgNLine) != 0; }
-
-//=======================================================================
-//function : RgNLine
-//purpose  : 
-//=======================================================================
-
-inline void HLRBRep_BiPnt2D::RgNLine (const Standard_Boolean B)
-{
-  if (B) myFlags |=  EMskRgNLine;
-  else   myFlags &= ~EMskRgNLine;
-}
-
-//=======================================================================
-//function : OutLine
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRBRep_BiPnt2D::OutLine () const
-{ return (myFlags & EMskOutLine) != 0; }
-
-//=======================================================================
-//function : OutLine
-//purpose  : 
-//=======================================================================
-
-inline void HLRBRep_BiPnt2D::OutLine (const Standard_Boolean B)
-{
-  if (B) myFlags |=  EMskOutLine;
-  else   myFlags &= ~EMskOutLine;
-}
-
-//=======================================================================
-//function : IntLine
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRBRep_BiPnt2D::IntLine () const
-{ return (myFlags & EMskIntLine) != 0; }
-
-//=======================================================================
-//function : IntLine
-//purpose  : 
-//=======================================================================
-
-inline void HLRBRep_BiPnt2D::IntLine (const Standard_Boolean B)
-{
-  if (B) myFlags |=  EMskIntLine;
-  else   myFlags &= ~EMskIntLine;
-}
diff --git a/src/HLRBRep/HLRBRep_BiPoint.cxx b/src/HLRBRep/HLRBRep_BiPoint.cxx
deleted file mode 100644 (file)
index c261c00..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-// Created on: 1992-08-25
-// Created by: Christophe MARION
-// Copyright (c) 1992-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <gp_Pnt.hxx>
-#include <HLRBRep_BiPoint.hxx>
-#include <TopoDS_Shape.hxx>
-
-//=======================================================================
-//function : HLRBRep_BiPoint
-//purpose  : 
-//=======================================================================
-HLRBRep_BiPoint::HLRBRep_BiPoint ()
-{
-}
-
-//=======================================================================
-//function : HLRBRep_BiPoint
-//purpose  : 
-//=======================================================================
-
-HLRBRep_BiPoint::HLRBRep_BiPoint (const Standard_Real x1,
-                                 const Standard_Real y1,
-                                 const Standard_Real z1,
-                                 const Standard_Real x2,
-                                 const Standard_Real y2,
-                                 const Standard_Real z2,
-                                 const TopoDS_Shape& S,
-                                 const Standard_Boolean reg1,
-                                 const Standard_Boolean regn,
-                                 const Standard_Boolean outl,
-                                 const Standard_Boolean intl) :
-                                 myP1(x1,y1,z1),
-                                 myP2(x2,y2,z2),
-                                 myShape(S),
-                                 myFlags(0)
-{
-  Rg1Line(reg1);
-  RgNLine(regn);
-  OutLine(outl);
-  IntLine(intl);
-}
index 7c66764afd3643ba6003e75c4022f81ce5a68bcc..909994f1f0ddb6810a207c9029f61b3acabecb80 100644 (file)
@@ -28,7 +28,6 @@
 class TopoDS_Shape;
 class gp_Pnt;
 
-
 //! Contains the colors of a shape.
 class HLRBRep_BiPoint 
 {
@@ -36,61 +35,61 @@ public:
 
   DEFINE_STANDARD_ALLOC
 
-  
-  Standard_EXPORT HLRBRep_BiPoint();
-  
-  Standard_EXPORT HLRBRep_BiPoint(const Standard_Real x1, const Standard_Real y1, const Standard_Real z1, const Standard_Real x2, const Standard_Real y2, const Standard_Real z2, const TopoDS_Shape& S, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
-  
-    const gp_Pnt& P1() const;
-  
-    const gp_Pnt& P2() const;
-  
-    const TopoDS_Shape& Shape() const;
-  
-    void Shape (const TopoDS_Shape& S);
-  
-    Standard_Boolean Rg1Line() const;
-  
-    void Rg1Line (const Standard_Boolean B);
-  
-    Standard_Boolean RgNLine() const;
-  
-    void RgNLine (const Standard_Boolean B);
-  
-    Standard_Boolean OutLine() const;
-  
-    void OutLine (const Standard_Boolean B);
-  
-    Standard_Boolean IntLine() const;
-  
-    void IntLine (const Standard_Boolean B);
+  HLRBRep_BiPoint()
+  : myRg1Line (false),
+    myRgNLine (false),
+    myOutLine (false),
+    myIntLine (false) {}
 
+  HLRBRep_BiPoint (const Standard_Real x1, const Standard_Real y1, const Standard_Real z1,
+                   const Standard_Real x2, const Standard_Real y2, const Standard_Real z2,
+                   const TopoDS_Shape& S,
+                   const Standard_Boolean reg1,
+                   const Standard_Boolean regn,
+                   const Standard_Boolean outl,
+                   const Standard_Boolean intl)
+  : myP1 (x1, y1, z1),
+    myP2 (x2, y2, z2),
+    myShape (S),
+    myRg1Line (reg1),
+    myRgNLine (regn),
+    myOutLine (outl),
+    myIntLine (intl) {}
 
+  const gp_Pnt& P1() const { return myP1; }
 
+  const gp_Pnt& P2() const { return myP2; }
 
-protected:
+  const TopoDS_Shape& Shape() const { return myShape; }
 
+  void Shape (const TopoDS_Shape& S) { myShape = S; }
 
+  Standard_Boolean Rg1Line() const { return myRg1Line; }
 
+  void Rg1Line (const Standard_Boolean B) { myRg1Line = B; }
 
+  Standard_Boolean RgNLine() const { return myRgNLine; }
 
-private:
+  void RgNLine (const Standard_Boolean B) { myRgNLine = B; }
+
+  Standard_Boolean OutLine() const { return myOutLine; }
+
+  void OutLine (const Standard_Boolean B) { myOutLine = B; }
 
+  Standard_Boolean IntLine() const { return myIntLine; }
 
+  void IntLine (const Standard_Boolean B) { myIntLine = B; }
+
+private:
 
   gp_Pnt myP1;
   gp_Pnt myP2;
   TopoDS_Shape myShape;
-  Standard_Boolean myFlags;
-
+  Standard_Boolean myRg1Line;
+  Standard_Boolean myRgNLine;
+  Standard_Boolean myOutLine;
+  Standard_Boolean myIntLine;
 
 };
 
-
-#include <HLRBRep_BiPoint.lxx>
-
-
-
-
-
 #endif // _HLRBRep_BiPoint_HeaderFile
diff --git a/src/HLRBRep/HLRBRep_BiPoint.lxx b/src/HLRBRep/HLRBRep_BiPoint.lxx
deleted file mode 100644 (file)
index 0f1649c..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-// Created on: 1992-08-25
-// Created by: Christophe MARION
-// Copyright (c) 1992-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#define EMskRg1Line  ((Standard_Boolean)1)
-#define EMskRgNLine  ((Standard_Boolean)2)
-#define EMskOutLine  ((Standard_Boolean)4)
-#define EMskIntLine  ((Standard_Boolean)8)
-
-//=======================================================================
-//function : P1
-//purpose  : 
-//=======================================================================
-
-inline const gp_Pnt & HLRBRep_BiPoint::P1 () const
-{ return myP1; }
-
-//=======================================================================
-//function : P2
-//purpose  : 
-//=======================================================================
-
-inline const gp_Pnt & HLRBRep_BiPoint::P2 () const
-{ return myP2; }
-
-//=======================================================================
-//function : Shape
-//purpose  : 
-//=======================================================================
-
-inline const TopoDS_Shape & HLRBRep_BiPoint::Shape () const
-{ return myShape; }
-
-//=======================================================================
-//function : Shape
-//purpose  : 
-//=======================================================================
-
-inline void HLRBRep_BiPoint::Shape (const TopoDS_Shape& S)
-{ myShape = S; }
-
-//=======================================================================
-//function : Rg1Line
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRBRep_BiPoint::Rg1Line () const
-{ return (myFlags & EMskRg1Line) != 0; }
-
-//=======================================================================
-//function : Rg1Line
-//purpose  : 
-//=======================================================================
-
-inline void HLRBRep_BiPoint::Rg1Line (const Standard_Boolean B)
-{
-  if (B) myFlags |=  EMskRg1Line;
-  else   myFlags &= ~EMskRg1Line;
-}
-
-//=======================================================================
-//function : RgNLine
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRBRep_BiPoint::RgNLine () const
-{ return (myFlags & EMskRgNLine) != 0; }
-
-//=======================================================================
-//function : RgNLine
-//purpose  : 
-//=======================================================================
-
-inline void HLRBRep_BiPoint::RgNLine (const Standard_Boolean B)
-{
-  if (B) myFlags |=  EMskRgNLine;
-  else   myFlags &= ~EMskRgNLine;
-}
-
-//=======================================================================
-//function : OutLine
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRBRep_BiPoint::OutLine () const
-{ return (myFlags & EMskOutLine) != 0; }
-
-//=======================================================================
-//function : OutLine
-//purpose  : 
-//=======================================================================
-
-inline void HLRBRep_BiPoint::OutLine (const Standard_Boolean B)
-{
-  if (B) myFlags |=  EMskOutLine;
-  else   myFlags &= ~EMskOutLine;
-}
-
-//=======================================================================
-//function : IntLine
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean HLRBRep_BiPoint::IntLine () const
-{ return (myFlags & EMskIntLine) != 0; }
-
-//=======================================================================
-//function : IntLine
-//purpose  : 
-//=======================================================================
-
-inline void HLRBRep_BiPoint::IntLine (const Standard_Boolean B)
-{
-  if (B) myFlags |=  EMskIntLine;
-  else   myFlags &= ~EMskIntLine;
-}
index e5436d81b6077ac35d329764bef1b4e15148d2fa..12bf4061f74a8de8652fe0d72bc7cafe5dac261c 100644 (file)
@@ -123,20 +123,28 @@ public:
   
     Standard_ShortReal Tolerance() const;
 
-
-
-
 protected:
 
-
-
-
+  enum EMaskFlags
+  {
+    EMaskSelected = 1,
+    EMaskUsed     = 2,
+    EMaskRg1Line  = 4,
+    EMaskVertical = 8,
+    EMaskSimple   = 16,
+    EMaskOutLVSta = 32,
+    EMaskOutLVEnd = 64,
+    EMaskIntDone  = 128,
+    EMaskCutAtSta = 256,
+    EMaskCutAtEnd = 512,
+    EMaskVerAtSta = 1024,
+    EMaskVerAtEnd = 2048,
+    EMaskRgNLine  = 4096
+  };
 
 private:
 
-
-
-  Standard_Boolean myFlags;
+  Standard_Integer myFlags;
   Standard_Integer myHideCount;
   Standard_Integer myVSta;
   Standard_Integer myVEnd;
@@ -145,14 +153,8 @@ private:
   HLRBRep_Curve myGeometry;
   Standard_ShortReal myTolerance;
 
-
 };
 
-
 #include <HLRBRep_EdgeData.lxx>
 
-
-
-
-
 #endif // _HLRBRep_EdgeData_HeaderFile
index d245be18b54982516ffed86037c4083d34dd44f8..b70986b342834d313cd64584b0af4c4d05cf8468 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#define EMaskSelected ((Standard_Boolean)1)
-#define EMaskUsed     ((Standard_Boolean)2)
-#define EMaskRg1Line  ((Standard_Boolean)4)
-#define EMaskVertical ((Standard_Boolean)8)
-#define EMaskSimple   ((Standard_Boolean)16)
-#define EMaskOutLVSta ((Standard_Boolean)32)
-#define EMaskOutLVEnd ((Standard_Boolean)64)
-#define EMaskIntDone  ((Standard_Boolean)128)
-#define EMaskCutAtSta ((Standard_Boolean)256)
-#define EMaskCutAtEnd ((Standard_Boolean)512)
-#define EMaskVerAtSta ((Standard_Boolean)1024)
-#define EMaskVerAtEnd ((Standard_Boolean)2048)
-#define EMaskRgNLine  ((Standard_Boolean)4096)
-
 //=======================================================================
 //function : Selected
 //purpose  : 
index c718eeea0db7a5c81d90f7498753e6d4bc954e5b..89acfd2c30e68b067dad0165a92ed0768e80c5d9 100644 (file)
@@ -121,33 +121,36 @@ public:
   
     Standard_ShortReal Tolerance() const;
 
-
-
-
 protected:
 
-
-
-
+  enum EMaskFlags
+  {
+    EMaskOrient   = 15,
+    FMaskSelected = 16,
+    FMaskBack     = 32,
+    FMaskSide     = 64,
+    FMaskClosed   = 128,
+    FMaskHiding   = 256,
+    FMaskSimple   = 512,
+    FMaskCut      = 1024,
+    FMaskWithOutL = 2048,
+    FMaskPlane    = 4096,
+    FMaskCylinder = 8192,
+    FMaskCone     = 16384,
+    FMaskSphere   = 32768,
+    FMaskTorus    = 65536
+  };
 
 private:
 
-
-
-  Standard_Boolean myFlags;
+  Standard_Integer myFlags;
   Handle(HLRAlgo_WiresBlock) myWires;
   HLRBRep_Surface myGeometry;
   Standard_Real mySize;
   Standard_ShortReal myTolerance;
 
-
 };
 
-
 #include <HLRBRep_FaceData.lxx>
 
-
-
-
-
 #endif // _HLRBRep_FaceData_HeaderFile
index 06c8727e4c11b7e3812c7115667d9d3d27dc5a8a..d36d5172ecc5f96423ca9ad6b3379e931c3544d0 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#define EMaskOrient   ((Standard_Boolean)15)
-#define FMaskSelected ((Standard_Boolean)16)
-#define FMaskBack     ((Standard_Boolean)32)
-#define FMaskSide     ((Standard_Boolean)64)
-#define FMaskClosed   ((Standard_Boolean)128)
-#define FMaskHiding   ((Standard_Boolean)256)
-#define FMaskSimple   ((Standard_Boolean)512)
-#define FMaskCut      ((Standard_Boolean)1024)
-#define FMaskWithOutL ((Standard_Boolean)2048)
-#define FMaskPlane    ((Standard_Boolean)4096)
-#define FMaskCylinder ((Standard_Boolean)8192)
-#define FMaskCone     ((Standard_Boolean)16384)
-#define FMaskSphere   ((Standard_Boolean)32768)
-#define FMaskTorus    ((Standard_Boolean)65536)
-
 //=======================================================================
 //function : Selected
 //purpose  : 
@@ -308,7 +293,7 @@ inline TopAbs_Orientation HLRBRep_FaceData::Orientation() const
 inline void HLRBRep_FaceData::Orientation(const TopAbs_Orientation O)
 {
   myFlags &= ~EMaskOrient;
-  myFlags |= (((Standard_Boolean)O) & EMaskOrient);
+  myFlags |= (O & EMaskOrient);
 }
 
 //=======================================================================
index 0ea6fea7ca13b9161b8b63e394253291a382ba62..134b6c7451a58bb479ef3c15b6c9ff103d1fe8bc 100644 (file)
 
 IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 
-#define EMskOutLin1  ((Standard_Boolean)   1)
-#define EMskOutLin2  ((Standard_Boolean)   2)
-#define EMskOutLin3  ((Standard_Boolean)   4)
-#define EMskGrALin1  ((Standard_Boolean)   8)
-#define EMskGrALin2  ((Standard_Boolean)  16)
-#define EMskGrALin3  ((Standard_Boolean)  32)
-#define FMskBack     ((Standard_Boolean)  64)
-#define FMskSide     ((Standard_Boolean) 128)
-#define FMskHiding   ((Standard_Boolean) 256)
-#define FMskFlat     ((Standard_Boolean) 512)
-#define FMskOnOutL   ((Standard_Boolean)1024)
-#define FMskOrBack   ((Standard_Boolean)2048)
-#define FMskFrBack   ((Standard_Boolean)4096)
-
-#define NMskVert ((Standard_Boolean) 1)
-#define NMskOutL ((Standard_Boolean) 2)
-#define NMskNorm ((Standard_Boolean) 4)
-#define NMskFuck ((Standard_Boolean) 8)
-#define NMskEdge ((Standard_Boolean)16)
-#define NMskMove ((Standard_Boolean)32)
+#define EMskOutLin1  ((Standard_Integer)   1)
+#define EMskOutLin2  ((Standard_Integer)   2)
+#define EMskOutLin3  ((Standard_Integer)   4)
+#define EMskGrALin1  ((Standard_Integer)   8)
+#define EMskGrALin2  ((Standard_Integer)  16)
+#define EMskGrALin3  ((Standard_Integer)  32)
+#define FMskBack     ((Standard_Integer)  64)
+#define FMskSide     ((Standard_Integer) 128)
+#define FMskHiding   ((Standard_Integer) 256)
+#define FMskFlat     ((Standard_Integer) 512)
+#define FMskOnOutL   ((Standard_Integer)1024)
+#define FMskOrBack   ((Standard_Integer)2048)
+#define FMskFrBack   ((Standard_Integer)4096)
+
+#define NMskVert ((Standard_Integer) 1)
+#define NMskOutL ((Standard_Integer) 2)
+#define NMskNorm ((Standard_Integer) 4)
+#define NMskFuck ((Standard_Integer) 8)
+#define NMskEdge ((Standard_Integer)16)
+#define NMskMove ((Standard_Integer)32)
 
 #define PntXTI1 ((Standard_Real*)Coordinates)[ 0]
 #define PntYTI1 ((Standard_Real*)Coordinates)[ 1]
@@ -106,17 +106,17 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Tri1Node1 ((Standard_Integer*)Tri1Indices)[0]
 #define Tri1Node2 ((Standard_Integer*)Tri1Indices)[1]
 #define Tri1Node3 ((Standard_Integer*)Tri1Indices)[2]
-#define Tri1Flags ((Standard_Boolean*)Tri1Indices)[3]
+#define Tri1Flags ((Standard_Integer*)Tri1Indices)[3]
 
 #define Tri2Node1 ((Standard_Integer*)Tri2Indices)[0]
 #define Tri2Node2 ((Standard_Integer*)Tri2Indices)[1]
 #define Tri2Node3 ((Standard_Integer*)Tri2Indices)[2]
-#define Tri2Flags ((Standard_Boolean*)Tri2Indices)[3]
+#define Tri2Flags ((Standard_Integer*)Tri2Indices)[3]
 
 #define Tri3Node1 ((Standard_Integer*)Tri3Indices)[0]
 #define Tri3Node2 ((Standard_Integer*)Tri3Indices)[1]
 #define Tri3Node3 ((Standard_Integer*)Tri3Indices)[2]
-#define Tri3Flags ((Standard_Boolean*)Tri3Indices)[3]
+#define Tri3Flags ((Standard_Integer*)Tri3Indices)[3]
 
 #define Seg1LstSg1 ((Standard_Integer*)Seg1Indices)[0]
 #define Seg1LstSg2 ((Standard_Integer*)Seg1Indices)[1]
@@ -133,9 +133,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Seg2Conex2 ((Standard_Integer*)Seg2Indices)[5]
 
 #define Nod1NdSg ((Standard_Integer*)Nod1Indices)[0]
-#define Nod1Flag ((Standard_Boolean*)Nod1Indices)[1]
-#define Nod1Edg1 ((Standard_Boolean*)Nod1Indices)[2]
-#define Nod1Edg2 ((Standard_Boolean*)Nod1Indices)[3]
+#define Nod1Flag ((Standard_Integer*)Nod1Indices)[1]
+#define Nod1Edg1 ((Standard_Integer*)Nod1Indices)[2]
+#define Nod1Edg2 ((Standard_Integer*)Nod1Indices)[3]
 
 #define Nod1PntX ((Standard_Real*)Nod1RValues)[ 0]
 #define Nod1PntY ((Standard_Real*)Nod1RValues)[ 1]
@@ -150,9 +150,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod1Scal ((Standard_Real*)Nod1RValues)[10]
 
 #define NodANdSg ((Standard_Integer*)NodAIndices)[0]
-#define NodAFlag ((Standard_Boolean*)NodAIndices)[1]
-#define NodAEdg1 ((Standard_Boolean*)NodAIndices)[2]
-#define NodAEdg2 ((Standard_Boolean*)NodAIndices)[3]
+#define NodAFlag ((Standard_Integer*)NodAIndices)[1]
+#define NodAEdg1 ((Standard_Integer*)NodAIndices)[2]
+#define NodAEdg2 ((Standard_Integer*)NodAIndices)[3]
 
 #define NodAPntX ((Standard_Real*)NodARValues)[ 0]
 #define NodAPntY ((Standard_Real*)NodARValues)[ 1]
@@ -167,9 +167,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define NodAScal ((Standard_Real*)NodARValues)[10]
 
 #define NodBNdSg ((Standard_Integer*)NodBIndices)[0]
-#define NodBFlag ((Standard_Boolean*)NodBIndices)[1]
-#define NodBEdg1 ((Standard_Boolean*)NodBIndices)[2]
-#define NodBEdg2 ((Standard_Boolean*)NodBIndices)[3]
+#define NodBFlag ((Standard_Integer*)NodBIndices)[1]
+#define NodBEdg1 ((Standard_Integer*)NodBIndices)[2]
+#define NodBEdg2 ((Standard_Integer*)NodBIndices)[3]
 
 #define NodBPntX ((Standard_Real*)NodBRValues)[ 0]
 #define NodBPntY ((Standard_Real*)NodBRValues)[ 1]
@@ -184,9 +184,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define NodBScal ((Standard_Real*)NodBRValues)[10]
 
 #define Nod2NdSg ((Standard_Integer*)Nod2Indices)[0]
-#define Nod2Flag ((Standard_Boolean*)Nod2Indices)[1]
-#define Nod2Edg1 ((Standard_Boolean*)Nod2Indices)[2]
-#define Nod2Edg2 ((Standard_Boolean*)Nod2Indices)[3]
+#define Nod2Flag ((Standard_Integer*)Nod2Indices)[1]
+#define Nod2Edg1 ((Standard_Integer*)Nod2Indices)[2]
+#define Nod2Edg2 ((Standard_Integer*)Nod2Indices)[3]
 
 #define Nod2PntX ((Standard_Real*)Nod2RValues)[ 0]
 #define Nod2PntY ((Standard_Real*)Nod2RValues)[ 1]
@@ -201,9 +201,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod2Scal ((Standard_Real*)Nod2RValues)[10]
 
 #define Nod3NdSg ((Standard_Integer*)Nod3Indices)[0]
-#define Nod3Flag ((Standard_Boolean*)Nod3Indices)[1]
-#define Nod3Edg1 ((Standard_Boolean*)Nod3Indices)[2]
-#define Nod3Edg2 ((Standard_Boolean*)Nod3Indices)[3]
+#define Nod3Flag ((Standard_Integer*)Nod3Indices)[1]
+#define Nod3Edg1 ((Standard_Integer*)Nod3Indices)[2]
+#define Nod3Edg2 ((Standard_Integer*)Nod3Indices)[3]
 
 #define Nod3PntX ((Standard_Real*)Nod3RValues)[ 0]
 #define Nod3PntY ((Standard_Real*)Nod3RValues)[ 1]
@@ -218,9 +218,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod3Scal ((Standard_Real*)Nod3RValues)[10]
 
 #define Nod4NdSg ((Standard_Integer*)Nod4Indices)[0]
-#define Nod4Flag ((Standard_Boolean*)Nod4Indices)[1]
-#define Nod4Edg1 ((Standard_Boolean*)Nod4Indices)[2]
-#define Nod4Edg2 ((Standard_Boolean*)Nod4Indices)[3]
+#define Nod4Flag ((Standard_Integer*)Nod4Indices)[1]
+#define Nod4Edg1 ((Standard_Integer*)Nod4Indices)[2]
+#define Nod4Edg2 ((Standard_Integer*)Nod4Indices)[3]
 
 #define Nod4PntX ((Standard_Real*)Nod4RValues)[ 0]
 #define Nod4PntY ((Standard_Real*)Nod4RValues)[ 1]
@@ -235,9 +235,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod4Scal ((Standard_Real*)Nod4RValues)[10]
 
 #define Nod11NdSg ((Standard_Integer*)Nod11Indices)[0]
-#define Nod11Flag ((Standard_Boolean*)Nod11Indices)[1]
-#define Nod11Edg1 ((Standard_Boolean*)Nod11Indices)[2]
-#define Nod11Edg2 ((Standard_Boolean*)Nod11Indices)[3]
+#define Nod11Flag ((Standard_Integer*)Nod11Indices)[1]
+#define Nod11Edg1 ((Standard_Integer*)Nod11Indices)[2]
+#define Nod11Edg2 ((Standard_Integer*)Nod11Indices)[3]
 
 #define Nod11PntX ((Standard_Real*)Nod11RValues)[ 0]
 #define Nod11PntY ((Standard_Real*)Nod11RValues)[ 1]
@@ -252,9 +252,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod11Scal ((Standard_Real*)Nod11RValues)[10]
 
 #define Nod1ANdSg ((Standard_Integer*)Nod1AIndices)[0]
-#define Nod1AFlag ((Standard_Boolean*)Nod1AIndices)[1]
-#define Nod1AEdg1 ((Standard_Boolean*)Nod1AIndices)[2]
-#define Nod1AEdg2 ((Standard_Boolean*)Nod1AIndices)[3]
+#define Nod1AFlag ((Standard_Integer*)Nod1AIndices)[1]
+#define Nod1AEdg1 ((Standard_Integer*)Nod1AIndices)[2]
+#define Nod1AEdg2 ((Standard_Integer*)Nod1AIndices)[3]
 
 #define Nod1APntX ((Standard_Real*)Nod1ARValues)[ 0]
 #define Nod1APntY ((Standard_Real*)Nod1ARValues)[ 1]
@@ -269,9 +269,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod1AScal ((Standard_Real*)Nod1ARValues)[10]
 
 #define Nod1BNdSg ((Standard_Integer*)Nod1BIndices)[0]
-#define Nod1BFlag ((Standard_Boolean*)Nod1BIndices)[1]
-#define Nod1BEdg1 ((Standard_Boolean*)Nod1BIndices)[2]
-#define Nod1BEdg2 ((Standard_Boolean*)Nod1BIndices)[3]
+#define Nod1BFlag ((Standard_Integer*)Nod1BIndices)[1]
+#define Nod1BEdg1 ((Standard_Integer*)Nod1BIndices)[2]
+#define Nod1BEdg2 ((Standard_Integer*)Nod1BIndices)[3]
 
 #define Nod1BPntX ((Standard_Real*)Nod1BRValues)[ 0]
 #define Nod1BPntY ((Standard_Real*)Nod1BRValues)[ 1]
@@ -286,9 +286,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod1BScal ((Standard_Real*)Nod1BRValues)[10]
 
 #define Nod12NdSg ((Standard_Integer*)Nod12Indices)[0]
-#define Nod12Flag ((Standard_Boolean*)Nod12Indices)[1]
-#define Nod12Edg1 ((Standard_Boolean*)Nod12Indices)[2]
-#define Nod12Edg2 ((Standard_Boolean*)Nod12Indices)[3]
+#define Nod12Flag ((Standard_Integer*)Nod12Indices)[1]
+#define Nod12Edg1 ((Standard_Integer*)Nod12Indices)[2]
+#define Nod12Edg2 ((Standard_Integer*)Nod12Indices)[3]
 
 #define Nod12PntX ((Standard_Real*)Nod12RValues)[ 0]
 #define Nod12PntY ((Standard_Real*)Nod12RValues)[ 1]
@@ -303,9 +303,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod12Scal ((Standard_Real*)Nod12RValues)[10]
 
 #define Nod13NdSg ((Standard_Integer*)Nod13Indices)[0]
-#define Nod13Flag ((Standard_Boolean*)Nod13Indices)[1]
-#define Nod13Edg1 ((Standard_Boolean*)Nod13Indices)[2]
-#define Nod13Edg2 ((Standard_Boolean*)Nod13Indices)[3]
+#define Nod13Flag ((Standard_Integer*)Nod13Indices)[1]
+#define Nod13Edg1 ((Standard_Integer*)Nod13Indices)[2]
+#define Nod13Edg2 ((Standard_Integer*)Nod13Indices)[3]
 
 #define Nod13PntX ((Standard_Real*)Nod13RValues)[ 0]
 #define Nod13PntY ((Standard_Real*)Nod13RValues)[ 1]
@@ -320,9 +320,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod13Scal ((Standard_Real*)Nod13RValues)[10]
 
 #define Nod14NdSg ((Standard_Integer*)Nod14Indices)[0]
-#define Nod14Flag ((Standard_Boolean*)Nod14Indices)[1]
-#define Nod14Edg1 ((Standard_Boolean*)Nod14Indices)[2]
-#define Nod14Edg2 ((Standard_Boolean*)Nod14Indices)[3]
+#define Nod14Flag ((Standard_Integer*)Nod14Indices)[1]
+#define Nod14Edg1 ((Standard_Integer*)Nod14Indices)[2]
+#define Nod14Edg2 ((Standard_Integer*)Nod14Indices)[3]
 
 #define Nod14PntX ((Standard_Real*)Nod14RValues)[ 0]
 #define Nod14PntY ((Standard_Real*)Nod14RValues)[ 1]
@@ -337,9 +337,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod14Scal ((Standard_Real*)Nod14RValues)[10]
 
 #define Nod21NdSg ((Standard_Integer*)Nod21Indices)[0]
-#define Nod21Flag ((Standard_Boolean*)Nod21Indices)[1]
-#define Nod21Edg1 ((Standard_Boolean*)Nod21Indices)[2]
-#define Nod21Edg2 ((Standard_Boolean*)Nod21Indices)[3]
+#define Nod21Flag ((Standard_Integer*)Nod21Indices)[1]
+#define Nod21Edg1 ((Standard_Integer*)Nod21Indices)[2]
+#define Nod21Edg2 ((Standard_Integer*)Nod21Indices)[3]
 
 #define Nod21PntX ((Standard_Real*)Nod21RValues)[ 0]
 #define Nod21PntY ((Standard_Real*)Nod21RValues)[ 1]
@@ -354,9 +354,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod21Scal ((Standard_Real*)Nod21RValues)[10]
 
 #define Nod2ANdSg ((Standard_Integer*)Nod2AIndices)[0]
-#define Nod2AFlag ((Standard_Boolean*)Nod2AIndices)[1]
-#define Nod2AEdg1 ((Standard_Boolean*)Nod2AIndices)[2]
-#define Nod2AEdg2 ((Standard_Boolean*)Nod2AIndices)[3]
+#define Nod2AFlag ((Standard_Integer*)Nod2AIndices)[1]
+#define Nod2AEdg1 ((Standard_Integer*)Nod2AIndices)[2]
+#define Nod2AEdg2 ((Standard_Integer*)Nod2AIndices)[3]
 
 #define Nod2APntX ((Standard_Real*)Nod2ARValues)[ 0]
 #define Nod2APntY ((Standard_Real*)Nod2ARValues)[ 1]
@@ -371,9 +371,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod2AScal ((Standard_Real*)Nod2ARValues)[10]
 
 #define Nod2BNdSg ((Standard_Integer*)Nod2BIndices)[0]
-#define Nod2BFlag ((Standard_Boolean*)Nod2BIndices)[1]
-#define Nod2BEdg1 ((Standard_Boolean*)Nod2BIndices)[2]
-#define Nod2BEdg2 ((Standard_Boolean*)Nod2BIndices)[3]
+#define Nod2BFlag ((Standard_Integer*)Nod2BIndices)[1]
+#define Nod2BEdg1 ((Standard_Integer*)Nod2BIndices)[2]
+#define Nod2BEdg2 ((Standard_Integer*)Nod2BIndices)[3]
 
 #define Nod2BPntX ((Standard_Real*)Nod2BRValues)[ 0]
 #define Nod2BPntY ((Standard_Real*)Nod2BRValues)[ 1]
@@ -388,9 +388,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod2BScal ((Standard_Real*)Nod2BRValues)[10]
 
 #define Nod22NdSg ((Standard_Integer*)Nod22Indices)[0]
-#define Nod22Flag ((Standard_Boolean*)Nod22Indices)[1]
-#define Nod22Edg1 ((Standard_Boolean*)Nod22Indices)[2]
-#define Nod22Edg2 ((Standard_Boolean*)Nod22Indices)[3]
+#define Nod22Flag ((Standard_Integer*)Nod22Indices)[1]
+#define Nod22Edg1 ((Standard_Integer*)Nod22Indices)[2]
+#define Nod22Edg2 ((Standard_Integer*)Nod22Indices)[3]
 
 #define Nod22PntX ((Standard_Real*)Nod22RValues)[ 0]
 #define Nod22PntY ((Standard_Real*)Nod22RValues)[ 1]
@@ -405,9 +405,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod22Scal ((Standard_Real*)Nod22RValues)[10]
 
 #define Nod23NdSg ((Standard_Integer*)Nod23Indices)[0]
-#define Nod23Flag ((Standard_Boolean*)Nod23Indices)[1]
-#define Nod23Edg1 ((Standard_Boolean*)Nod23Indices)[2]
-#define Nod23Edg2 ((Standard_Boolean*)Nod23Indices)[3]
+#define Nod23Flag ((Standard_Integer*)Nod23Indices)[1]
+#define Nod23Edg1 ((Standard_Integer*)Nod23Indices)[2]
+#define Nod23Edg2 ((Standard_Integer*)Nod23Indices)[3]
 
 #define Nod23PntX ((Standard_Real*)Nod23RValues)[ 0]
 #define Nod23PntY ((Standard_Real*)Nod23RValues)[ 1]
@@ -422,9 +422,9 @@ IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,MMgt_TShared)
 #define Nod23Scal ((Standard_Real*)Nod23RValues)[10]
 
 #define Nod24NdSg ((Standard_Integer*)Nod24Indices)[0]
-#define Nod24Flag ((Standard_Boolean*)Nod24Indices)[1]
-#define Nod24Edg1 ((Standard_Boolean*)Nod24Indices)[2]
-#define Nod24Edg2 ((Standard_Boolean*)Nod24Indices)[3]
+#define Nod24Flag ((Standard_Integer*)Nod24Indices)[1]
+#define Nod24Edg1 ((Standard_Integer*)Nod24Indices)[2]
+#define Nod24Edg2 ((Standard_Integer*)Nod24Indices)[3]
 
 #define Nod24PntX ((Standard_Real*)Nod24RValues)[ 0]
 #define Nod24PntY ((Standard_Real*)Nod24RValues)[ 1]
@@ -1272,7 +1272,7 @@ InitBiPointsWithConnexity (const Standard_Integer e,
            &(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(iPol)));
          Standard_Address Nod1AIndices = (*pi1pA)->Indices();
          Standard_Address Nod1ARValues = (*pi1pA)->RValues();
-         if (Nod1AEdg1 == 0 || Nod1AEdg1 == (Standard_Boolean) e) {
+         if (Nod1AEdg1 == 0 || Nod1AEdg1 == e) {
            Nod1AEdg1 = e;
            Nod1APCu1 = par->Value(iPol);
          }
@@ -1288,8 +1288,8 @@ InitBiPointsWithConnexity (const Standard_Integer e,
        XTI2 = X2 = Nod12PntX;
        YTI2 = Y2 = Nod12PntY;
        ZTI2 = Z2 = Nod12PntZ;
-       if      (Nod12Edg1 ==  (Standard_Boolean) e) U2 = Nod12PCu1;
-       else if (Nod12Edg2 ==  (Standard_Boolean) e) U2 = Nod12PCu2;
+       if      (Nod12Edg1 == e) U2 = Nod12PCu1;
+       else if (Nod12Edg2 == e) U2 = Nod12PCu2;
 #ifdef OCCT_DEBUG
        else {
          cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
@@ -1340,8 +1340,8 @@ InitBiPointsWithConnexity (const Standard_Integer e,
            XTI2 = X2 = Nod12PntX;
            YTI2 = Y2 = Nod12PntY;
            ZTI2 = Z2 = Nod12PntZ;
-           if      (Nod12Edg1 ==  (Standard_Boolean) e) U2 = Nod12PCu1;
-           else if (Nod12Edg2 ==  (Standard_Boolean) e) U2 = Nod12PCu2;
+           if      (Nod12Edg1 == e) U2 = Nod12PCu1;
+           else if (Nod12Edg2 == e) U2 = Nod12PCu2;
 #ifdef OCCT_DEBUG
            else {
              cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
@@ -1431,7 +1431,7 @@ InitBiPointsWithConnexity (const Standard_Integer e,
          Standard_Address Nod2AIndices = (*pi2pA)->Indices();
          Standard_Address Nod2ARValues = (*pi2pA)->RValues();
          Standard_Real PCu = par->Value(iPol);
-         if (Nod1AEdg1 == 0 || Nod1AEdg1 ==  (Standard_Boolean) e) {
+         if (Nod1AEdg1 == 0 || Nod1AEdg1 == e) {
            Nod1AEdg1 = e;
            Nod1APCu1 = PCu;
          }
@@ -1439,7 +1439,7 @@ InitBiPointsWithConnexity (const Standard_Integer e,
            Nod1AEdg2 = e;
            Nod1APCu2 = PCu;
          }
-         if (Nod2AEdg1 == 0 || Nod2AEdg1 == (Standard_Boolean) e) {
+         if (Nod2AEdg1 == 0 || Nod2AEdg1 == e) {
            Nod2AEdg1 = e;
            Nod2APCu1 = PCu;
          }
@@ -1458,8 +1458,8 @@ InitBiPointsWithConnexity (const Standard_Integer e,
        XTI2 = X2 = Nod12PntX;
        YTI2 = Y2 = Nod12PntY;
        ZTI2 = Z2 = Nod12PntZ;
-       if      (Nod12Edg1 == (Standard_Boolean) e) U2 = Nod12PCu1;
-       else if (Nod12Edg2 == (Standard_Boolean) e) U2 = Nod12PCu2;
+       if      (Nod12Edg1 == e) U2 = Nod12PCu1;
+       else if (Nod12Edg2 == e) U2 = Nod12PCu2;
 #ifdef OCCT_DEBUG
        else {
          cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
@@ -1531,8 +1531,8 @@ InitBiPointsWithConnexity (const Standard_Integer e,
            XTI2 = X2 = Nod12PntX;
            YTI2 = Y2 = Nod12PntY;
            ZTI2 = Z2 = Nod12PntZ;
-           if      (Nod12Edg1 == (Standard_Boolean) e) U2 = Nod12PCu1;
-           else if (Nod12Edg2 == (Standard_Boolean) e) U2 = Nod12PCu2;
+           if      (Nod12Edg1 == e) U2 = Nod12PCu1;
+           else if (Nod12Edg2 == e) U2 = Nod12PCu2;
 #ifdef OCCT_DEBUG
            else {
              cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
@@ -1727,7 +1727,7 @@ Interpolation (HLRAlgo_ListOfBPoint& List,
   Standard_Real X3,Y3,Z3,XTI3,YTI3,ZTI3,coef3,U3;
   Standard_Real X4,Y4,Z4,XTI4,YTI4,ZTI4,coef4,U4;
 //  gp_Pnt P3,PT3,P4,PT4;
-  Standard_Boolean flag = 0;
+  Standard_Integer flag = 0;
   if (rg >= GeomAbs_G1) flag += 1;
   if (rg >= GeomAbs_G2) flag += 2;
   insP3 = Interpolation(U1,U2,Nod11RValues,Nod12RValues,
@@ -1884,7 +1884,7 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
                   const Standard_Real U3,
                   const Standard_Boolean insP3,
                   const Standard_Boolean mP3P1,
-                  const Standard_Boolean flag) const
+                  const Standard_Integer flag) const
 {
   Standard_Address TData2 = 0;
   Standard_Address PISeg2 = 0;
@@ -1908,8 +1908,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
       Nod11PntX = X3;
       Nod11PntY = Y3;
       Nod11PntZ = Z3;
-      if      (Nod11Edg1 == (Standard_Boolean) e) Nod11PCu1 = U3;
-      else if (Nod11Edg2 == (Standard_Boolean) e) Nod11PCu2 = U3;
+      if      (Nod11Edg1 == e) Nod11PCu1 = U3;
+      else if (Nod11Edg2 == e) Nod11PCu2 = U3;
 #ifdef OCCT_DEBUG
       else {
        cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
@@ -1946,8 +1946,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
       Nod12PntX = X3;
       Nod12PntY = Y3;
       Nod12PntZ = Z3;
-      if      (Nod12Edg1 == (Standard_Boolean) e) Nod12PCu1 = U3;
-      else if (Nod12Edg2 == (Standard_Boolean) e) Nod12PCu2 = U3;
+      if      (Nod12Edg1 == e) Nod12PCu1 = U3;
+      else if (Nod12Edg2 == e) Nod12PCu2 = U3;
 #ifdef OCCT_DEBUG
       else {
        cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
@@ -2045,7 +2045,7 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
                   const Standard_Real U3,
                   const Standard_Boolean insP3,
                   const Standard_Boolean mP3P1,
-                  const Standard_Boolean flag) const
+                  const Standard_Integer flag) const
 {
   Standard_Boolean ins3 = insP3;
   if (ins3 && mP3P1) {                             // P1 ---> P3
@@ -2071,8 +2071,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
       Nod11PntX = X3;
       Nod11PntY = Y3;
       Nod11PntZ = Z3;
-      if      (Nod11Edg1 == (Standard_Boolean) e) Nod11PCu1 = U3;
-      else if (Nod11Edg2 == (Standard_Boolean) e) Nod11PCu2 = U3;
+      if      (Nod11Edg1 == e) Nod11PCu1 = U3;
+      else if (Nod11Edg2 == e) Nod11PCu2 = U3;
 #ifdef OCCT_DEBUG
       else {
        cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
@@ -2085,8 +2085,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
       Nod21PntX  = X3;
       Nod21PntY  = Y3;
       Nod21PntZ  = Z3;
-      if      (Nod21Edg1 == (Standard_Boolean) e) Nod21PCu1 = U3;
-      else if (Nod21Edg2 == (Standard_Boolean) e) Nod21PCu2 = U3;
+      if      (Nod21Edg1 == e) Nod21PCu1 = U3;
+      else if (Nod21Edg2 == e) Nod21PCu2 = U3;
 #ifdef OCCT_DEBUG
       else {
        cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
@@ -2128,8 +2128,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
       Nod12PntX = X3;
       Nod12PntY = Y3;
       Nod12PntZ = Z3;
-      if      (Nod12Edg1 == (Standard_Boolean) e) Nod12PCu1 = U3;
-      else if (Nod12Edg2 == (Standard_Boolean) e) Nod12PCu2 = U3;
+      if      (Nod12Edg1 == e) Nod12PCu1 = U3;
+      else if (Nod12Edg2 == e) Nod12PCu2 = U3;
 #ifdef OCCT_DEBUG
       else {
        cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
@@ -2142,8 +2142,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
       Nod22PntX  = X3;
       Nod22PntY  = Y3;
       Nod22PntZ  = Z3;
-      if      (Nod22Edg1 == (Standard_Boolean) e) Nod22PCu1 = U3;
-      else if (Nod22Edg2 == (Standard_Boolean) e) Nod22PCu2 = U3;
+      if      (Nod22Edg1 == e) Nod22PCu1 = U3;
+      else if (Nod22Edg2 == e) Nod22PCu2 = U3;
 #ifdef OCCT_DEBUG
       else {
        cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
@@ -2265,7 +2265,7 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
                   const Standard_Real U4,
                   const Standard_Boolean insP4,
                   const Standard_Boolean mP4P1,
-                  const Standard_Boolean flag) const
+                  const Standard_Integer flag) const
 {
   Standard_Boolean ins3 = insP3;
   Standard_Boolean ins4 = insP4;
@@ -2292,8 +2292,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
       Nod11PntX = X3;
       Nod11PntY = Y3;
       Nod11PntZ = Z3;
-      if      (Nod11Edg1 == (Standard_Boolean) e) Nod11PCu1 = U3;
-      else if (Nod11Edg2 == (Standard_Boolean) e) Nod11PCu2 = U3;
+      if      (Nod11Edg1 == e) Nod11PCu1 = U3;
+      else if (Nod11Edg2 == e) Nod11PCu2 = U3;
 #ifdef OCCT_DEBUG
       else {
        cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
@@ -2306,8 +2306,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
       Nod21PntX  = X3;
       Nod21PntY  = Y3;
       Nod21PntZ  = Z3;
-      if      (Nod21Edg1 == (Standard_Boolean) e) Nod21PCu1 = U3;
-      else if (Nod21Edg2 == (Standard_Boolean) e) Nod21PCu2 = U3;
+      if      (Nod21Edg1 == e) Nod21PCu1 = U3;
+      else if (Nod21Edg2 == e) Nod21PCu2 = U3;
 #ifdef OCCT_DEBUG
       else {
        cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
@@ -2349,8 +2349,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
       Nod12PntX = X4;
       Nod12PntY = Y4;
       Nod12PntZ = Z4;
-      if      (Nod12Edg1 == (Standard_Boolean) e) Nod12PCu1 = U4;
-      else if (Nod12Edg2 == (Standard_Boolean) e) Nod12PCu2 = U4;
+      if      (Nod12Edg1 == e) Nod12PCu1 = U4;
+      else if (Nod12Edg2 == e) Nod12PCu2 = U4;
 #ifdef OCCT_DEBUG
       else {
        cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
@@ -2363,8 +2363,8 @@ MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List,
       Nod22PntX  = X4;
       Nod22PntY  = Y4;
       Nod22PntZ  = Z4;
-      if      (Nod22Edg1 == (Standard_Boolean) e) Nod22PCu1 = U4;
-      else if (Nod22Edg2 == (Standard_Boolean) e) Nod22PCu2 = U4;
+      if      (Nod22Edg1 == e) Nod22PCu1 = U4;
+      else if (Nod22Edg2 == e) Nod22PCu2 = U4;
 #ifdef OCCT_DEBUG
       else {
        cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
@@ -3163,9 +3163,9 @@ HLRBRep_PolyAlgo::OrientTriangle(const Standard_Integer,
                                 const Standard_Address Nod3Indices,
                                 const Standard_Address Nod3RValues) const
 {
-  Standard_Boolean o1 = Nod1Flag & NMskOutL;
-  Standard_Boolean o2 = Nod2Flag & NMskOutL;
-  Standard_Boolean o3 = Nod3Flag & NMskOutL;
+  Standard_Boolean o1 = (Nod1Flag & NMskOutL) != 0;
+  Standard_Boolean o2 = (Nod2Flag & NMskOutL) != 0;
+  Standard_Boolean o3 = (Nod3Flag & NMskOutL) != 0;
   Tri1Flags &= ~FMskFlat;
   Tri1Flags &= ~FMskOnOutL;
   if (o1 && o2 && o3) {
index f5ce88a0fab9a9e8601ee6ff8f275f4c639c6b7a..b44507a5567037a3a545b9a94646f33e920caff9 100644 (file)
@@ -214,11 +214,11 @@ private:
   
   Standard_EXPORT Standard_Boolean Interpolation (const Standard_Real U1, const Standard_Real U2, const Standard_Address Nod1RValues, const Standard_Address Nod2RValues, Standard_Real& X3, Standard_Real& Y3, Standard_Real& Z3, Standard_Real& XT3, Standard_Real& YT3, Standard_Real& ZT3, Standard_Real& coef3, Standard_Real& U3, Standard_Boolean& mP3P1) const;
   
-  Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, Standard_Address& Nod11Indices, Standard_Address& Nod11RValues, Standard_Address& Nod12Indices, Standard_Address& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, Standard_Address& TData1, Standard_Address& PISeg1, Standard_Address& PINod1, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Boolean flag) const;
+  Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, Standard_Address& Nod11Indices, Standard_Address& Nod11RValues, Standard_Address& Nod12Indices, Standard_Address& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, Standard_Address& TData1, Standard_Address& PISeg1, Standard_Address& PINod1, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Integer flag) const;
   
-  Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, Standard_Address& Nod11Indices, Standard_Address& Nod11RValues, Standard_Address& Nod12Indices, Standard_Address& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, Standard_Address& TData1, Standard_Address& PISeg1, Standard_Address& PINod1, Standard_Address& Nod21Indices, Standard_Address& Nod21RValues, Standard_Address& Nod22Indices, Standard_Address& Nod22RValues, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer i2, const Handle(HLRAlgo_PolyInternalData)& pid2, Standard_Address& TData2, Standard_Address& PISeg2, Standard_Address& PINod2, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Boolean flag) const;
+  Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, Standard_Address& Nod11Indices, Standard_Address& Nod11RValues, Standard_Address& Nod12Indices, Standard_Address& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, Standard_Address& TData1, Standard_Address& PISeg1, Standard_Address& PINod1, Standard_Address& Nod21Indices, Standard_Address& Nod21RValues, Standard_Address& Nod22Indices, Standard_Address& Nod22RValues, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer i2, const Handle(HLRAlgo_PolyInternalData)& pid2, Standard_Address& TData2, Standard_Address& PISeg2, Standard_Address& PINod2, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Integer flag) const;
   
-  Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, Standard_Address& Nod11Indices, Standard_Address& Nod11RValues, Standard_Address& Nod12Indices, Standard_Address& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, Standard_Address& TData1, Standard_Address& PISeg1, Standard_Address& PINod1, Standard_Address& Nod21Indices, Standard_Address& Nod21RValues, Standard_Address& Nod22Indices, Standard_Address& Nod22RValues, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer i2, const Handle(HLRAlgo_PolyInternalData)& pid2, Standard_Address& TData2, Standard_Address& PISeg2, Standard_Address& PINod2, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Real X4, const Standard_Real Y4, const Standard_Real Z4, const Standard_Real XT4, const Standard_Real YT4, const Standard_Real ZT4, const Standard_Real coef4, const Standard_Real U4, const Standard_Boolean insP4, const Standard_Boolean mP4P1, const Standard_Boolean flag) const;
+  Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, Standard_Address& Nod11Indices, Standard_Address& Nod11RValues, Standard_Address& Nod12Indices, Standard_Address& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, Standard_Address& TData1, Standard_Address& PISeg1, Standard_Address& PINod1, Standard_Address& Nod21Indices, Standard_Address& Nod21RValues, Standard_Address& Nod22Indices, Standard_Address& Nod22RValues, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer i2, const Handle(HLRAlgo_PolyInternalData)& pid2, Standard_Address& TData2, Standard_Address& PISeg2, Standard_Address& PINod2, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Real X4, const Standard_Real Y4, const Standard_Real Z4, const Standard_Real XT4, const Standard_Real YT4, const Standard_Real ZT4, const Standard_Real coef4, const Standard_Real U4, const Standard_Boolean insP4, const Standard_Boolean mP4P1, const Standard_Integer flag) const;
   
   Standard_EXPORT void InsertOnOutLine (TColStd_Array1OfTransient& PID);
   
index a5fbbf25add1724f4b82fee73d0d030fcb229d6c..76cec696b241494b3be61fdfcea05002d1252219 100644 (file)
@@ -32,10 +32,6 @@ IFSelect_DispGlobal::IFSelect_DispGlobal ()    {  }
   (const Standard_Integer /* nbent */, Standard_Integer& pcount) const 
       {  pcount = 1;  return Standard_True;  }
 
-    Standard_Boolean  IFSelect_DispGlobal::PacketsCount
-  (const Interface_Graph& /* G */, Standard_Integer& pcount) const 
-      {  pcount = 1;  return Standard_True;  }
-
 // 1 packet ( a partir de UniqueResult)
       void IFSelect_DispGlobal::Packets
   (const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const 
index 16a91137db4430d8996252da1ab7c8120e1caf5a..2ca327d20de6ab7ee3e51a6666abcaf8a9612eda 100644 (file)
@@ -47,10 +47,7 @@ public:
   
   //! Returns True : maximum equates 1
   Standard_EXPORT virtual Standard_Boolean LimitedMax (const Standard_Integer nbent, Standard_Integer& max) const Standard_OVERRIDE;
-  
-  //! Returns True (count of packets is well known) and count is 1
-  Standard_EXPORT virtual Standard_Boolean PacketsCount (const Interface_Graph& G, Standard_Integer& count) const Standard_OVERRIDE;
-  
+
   //! Computes the list of produced Packets. It is made of only ONE
   //! Packet, which gets the RootResult from the Final Selection.
   //! Remark : the inherited exception raising is never activated.
index aa553ac8cf52b89e9217550da7c5de6cb91dc20c..d013045df285e0cc05d4d3ffb47b48140f32173c 100644 (file)
@@ -59,10 +59,6 @@ IFSelect_DispPerCount::IFSelect_DispPerCount ()    {  }
   return Standard_True;
 }
 
-    Standard_Boolean  IFSelect_DispPerCount::PacketsCount
-  (const Interface_Graph& G, Standard_Integer& /*count*/) const 
-      {  return 1 + G.Size() / CountValue();  }
-
     void  IFSelect_DispPerCount::Packets
   (const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const 
 {
index 1ab70f97b28a70e990631c00c912060a9d7d7671..9b9d7a6c5c0d251b36676608bfcfae53b9a06670 100644 (file)
@@ -61,11 +61,7 @@ public:
   
   //! Returns True, maximum count is given as <nbent>
   Standard_EXPORT virtual Standard_Boolean LimitedMax (const Standard_Integer nbent, Standard_Integer& max) const Standard_OVERRIDE;
-  
-  //! Returns True (count is easy to know) and count is computed
-  //! from length of input list (RootResult from Final Selection)
-  Standard_EXPORT virtual Standard_Boolean PacketsCount (const Interface_Graph& G, Standard_Integer& count) const Standard_OVERRIDE;
-  
+
   //! Computes the list of produced Packets. It defines Packets in
   //! order to have at most <Count> Entities per Packet, Entities
   //! are given by RootResult from the Final Selection.
index f0c37fe3f3d50a761e1e1eb4c296fd9ff9d22eb4..81077297865ed26804837ee4bd32a54cd9f0a8f5 100644 (file)
@@ -59,10 +59,6 @@ IFSelect_DispPerFiles::IFSelect_DispPerFiles ()    {  }
   return Standard_True;
 }
 
-    Standard_Boolean  IFSelect_DispPerFiles::PacketsCount
-  (const Interface_Graph& G, Standard_Integer& /*count*/) const 
-      {  return (G.Size() < CountValue() ? G.Size() : CountValue());  }
-
     void  IFSelect_DispPerFiles::Packets
   (const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const 
 {
index 062e7489d0d4f0fa2240307dc902c45ac5a89659..ad815130de81ee15c1b845a1ba47d67977a0e841 100644 (file)
@@ -64,11 +64,7 @@ public:
   
   //! Returns True, maximum count is given as CountValue
   Standard_EXPORT virtual Standard_Boolean LimitedMax (const Standard_Integer nbent, Standard_Integer& max) const Standard_OVERRIDE;
-  
-  //! Returns True (count is easy to know) and count is the minimum
-  //! value between  length of input list and CountValue
-  Standard_EXPORT virtual Standard_Boolean PacketsCount (const Interface_Graph& G, Standard_Integer& count) const Standard_OVERRIDE;
-  
+
   //! Computes the list of produced Packets. It defines Packets in
   //! order to have <Count> Packets, except if the input count of
   //! Entities is lower. Entities are given by RootResult from the
index 3e0aaece3229761b6c8145719d112d08810d700b..4778c80792fc51e16c0567d9d5b6a2e76c554f1e 100644 (file)
@@ -35,10 +35,6 @@ IFSelect_DispPerOne::IFSelect_DispPerOne ()    {  }
   (const Standard_Integer nbent, Standard_Integer& pcount) const 
 {  pcount = nbent;  return Standard_True;  }
 
-    Standard_Boolean  IFSelect_DispPerOne::PacketsCount
-  (const Interface_Graph& G, Standard_Integer& pcount) const 
-{  pcount = G.Size();  return Standard_True;  }
-
     void  IFSelect_DispPerOne::Packets
   (const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const 
 {
index 8b805d5d7d72d5a99b8d694b7440056cca15b91b..1dffd834a4cf9234c94692117e658850ddaa2ecc 100644 (file)
@@ -48,11 +48,7 @@ public:
   
   //! Returns True, maximum limit is given as <nbent>
   Standard_EXPORT virtual Standard_Boolean LimitedMax (const Standard_Integer nbent, Standard_Integer& max) const Standard_OVERRIDE;
-  
-  //! Returns True (count is easy to know) and count is the length
-  //! of the input list (RootResult from FinalSelection)
-  Standard_EXPORT virtual Standard_Boolean PacketsCount (const Interface_Graph& G, Standard_Integer& count) const Standard_OVERRIDE;
-  
+
   //! Returns the list of produced Packets. It defines one Packet
   //! per Entity given by RootResult from the Final Selection.
   Standard_EXPORT void Packets (const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const Standard_OVERRIDE;
index 7e39615ffefd6b49c9990f0722d4ba82d270d619..87355102db7f561071e6fe58673853c19d398196 100644 (file)
@@ -67,10 +67,6 @@ void  IFSelect_Dispatch::SetRootName
   (const Interface_Graph& G) const
       {  return thefinal->UniqueResult(G);  }
 
-    Standard_Boolean  IFSelect_Dispatch::PacketsCount
-  (const Interface_Graph& , Standard_Integer& pcount) const 
-      {  pcount = 0;  return Standard_False;  }    // par defaut 0
-
     Interface_EntityIterator  IFSelect_Dispatch::Packeted
   (const Interface_Graph& G) const
 {
index c360bac3a1be7e2d6b9e83a833fe145b96f094ed..f9126277b5865a4f04793c1873a6d90eb1309a57 100644 (file)
@@ -105,17 +105,7 @@ public:
   //! input Graph
   //! This the starting step for an Evaluation (Packets - Remainder)
   Standard_EXPORT Interface_EntityIterator GetEntities (const Interface_Graph& G) const;
-  
-  //! Returns True if Count of Packets is actually known, and the
-  //! value of the count in argument "count". Returns False if
-  //! this count is unknown. Input is given as a Graph.
-  //! This method is intended to be quick (used for file names)
-  //! hence if this count is long to compute (that is, as a result
-  //! of complete evaluation made by method Packets), it is
-  //! preferable to answer "unknown" by returning False
-  //! Default answer if False. Can be redefined.
-  Standard_EXPORT virtual Standard_Boolean PacketsCount (const Interface_Graph& G, Standard_Integer& count) const;
-  
+
   //! Returns the list of produced Packets into argument <pack>.
   //! Each Packet corresponds to a Part, the Entities listed are the
   //! Roots given by the Selection. Input is given as a Graph.
index f469f7cce4d1531f1b1cb9685325c7ef35ff961c..73591b819a8cbbfe1a2a2d7e02963def47fd1fe2 100644 (file)
@@ -124,7 +124,7 @@ static IFSelect_ReturnStatus fun1
 {
   Handle(IFSelect_WorkSession) WS = pilot->Session();
 //        ****    ToggleHandler     ****
-  int hand = !WS->ErrorHandle();
+  Standard_Boolean hand = !WS->ErrorHandle();
   Handle(Message_Messenger) sout = Message::DefaultMessenger();
   if (hand) sout << " --  Mode Catch Error now Active"   <<endl;
   else      sout << " --  Mode Catch Error now Inactive" <<endl;
index cd2e8fe663547a26e864af214be279fe52822b95..6c91bf3177dc07541f30e9fb4e5a7916214150fc 100644 (file)
@@ -56,7 +56,7 @@ IFSelect_SelectRootComps::IFSelect_SelectRootComps ()    {  }
 //  (N.B.: on prend inp1, qui donne UNE entite par composant, simple ou cycle)
   for (inp1.Start(); inp1.More(); inp1.Next()) {
     Handle(Standard_Transient) ent = inp1.Value();
-    if ((Standard_Boolean)(GC.NbTimes(ent) <= 1) == IsDirect()) iter.GetOneItem(ent);
+    if ((GC.NbTimes(ent) <= 1) == IsDirect()) iter.GetOneItem(ent);
   }
   return iter;
 }
index 0784aec2c2c2f4a4a0100db4d03cfaf000d524e8..a60c4e66538fe48c309553499af09c87b26ce462 100644 (file)
@@ -44,7 +44,7 @@ IFSelect_SelectRoots::IFSelect_SelectRoots ()    {  }
 //  A present, on retient, parmi les inputs, celles comptees une seule fois
   for (input.Start(); input.More(); input.Next()) {
     Handle(Standard_Transient) ent = input.Value();
-    if ((Standard_Boolean)(GC.NbTimes(ent) <= 1) == IsDirect()) iter.GetOneItem(ent);
+    if ((GC.NbTimes(ent) <= 1) == IsDirect()) iter.GetOneItem(ent);
   }
   return iter;
 }
index 1ce7004c05bd051c082306305704ba8ddd631756..f0bbb20fbef344fab3bf06e06f2c913d1a564edd 100644 (file)
@@ -288,8 +288,8 @@ static TCollection_AsciiString nulword;
 //  Ici, resultat non nomme;  Resultat nomme par commande x (plus loin)
     if (!theobjrec.IsNull()) {
       thesession->RemoveItem(theobjrec);  //// depannage ?
-      Standard_Boolean addws = thesession->AddItem(theobjrec);
-      if (!addws) { cout<<"Could not add item to session, sorry"<<endl; return IFSelect_RetFail; }
+      Standard_Integer addws = thesession->AddItem(theobjrec);
+      if (addws == 0) { cout<<"Could not add item to session, sorry"<<endl; return IFSelect_RetFail; }
     }
 
     if (stat == IFSelect_RetVoid || stat == IFSelect_RetDone) {
@@ -500,10 +500,10 @@ static TCollection_AsciiString nulword;
 //  Prise en compte des commandes a resultat
          if (!theobjrec.IsNull()) {
            thesession->RemoveItem(theobjrec);  //// depannage ?
-           Standard_Boolean addws =
+           Standard_Integer addws =
              thesession->AddNamedItem(name.ToCString(),theobjrec);
            theobjrec.Nullify();
-           if (!addws) { cout<<"Could not add named item:"<<name<<", sorry"<<endl; return IFSelect_RetFail; }
+           if (addws == 0) { cout<<"Could not add named item:"<<name<<", sorry"<<endl; return IFSelect_RetFail; }
          }
          else cout<<"Remark : xsnew with name:"<<name<<" and no result"<<endl;
 
index e8bd5af5f7af7360a714b05189356a59d42648ab..c60e0f5e23879b289ff31f77874405e0348dfa69 100644 (file)
@@ -409,7 +409,7 @@ Handle(TCollection_HAsciiString) IGESData_IGESEntity::NameValue () const
     Standard_Boolean IGESData_IGESEntity::ArePresentAssociativities () const
 {
   if (!theAssocs.IsEmpty()) return Standard_True;
-  return (theStatusNum & IGESFlagAssocs);
+  return (theStatusNum & IGESFlagAssocs) != 0;
 }
 
     Standard_Integer IGESData_IGESEntity::NbAssociativities () const
@@ -460,7 +460,7 @@ Handle(TCollection_HAsciiString) IGESData_IGESEntity::NameValue () const
     Standard_Boolean IGESData_IGESEntity::ArePresentProperties () const
 {
   if (!theProps.IsEmpty()) return Standard_True;
-  return (theStatusNum & IGESFlagProps);
+  return (theStatusNum & IGESFlagProps) != 0;
 }
 
     Standard_Integer IGESData_IGESEntity::NbProperties () const
index 2b7e0d2398f411eeffc27f85cf363cecc2b71bbd..e57bcbc06046dc01fedcb4676bebcb6bf4ea8ac3 100644 (file)
@@ -49,7 +49,7 @@ IGESDraw_CircArraySubfigure::IGESDraw_CircArraySubfigure ()    {  }
   theRadius      = aRadius;
   theStartAngle  = aStAngle;
   theDeltaAngle  = aDelAngle;
-  theDoDontFlag  = aFlag;
+  theDoDontFlag  = aFlag != 0;
   thePositions   = allNumPos;
   InitTypeAndForm(414,0);
 }
@@ -109,7 +109,7 @@ IGESDraw_CircArraySubfigure::IGESDraw_CircArraySubfigure ()    {  }
 
     Standard_Boolean IGESDraw_CircArraySubfigure::DoDontFlag () const
 {
-  return (theDoDontFlag == 1);
+  return theDoDontFlag;
 }
 
     Standard_Boolean IGESDraw_CircArraySubfigure::PositionNum
index cad2df30fcf503164f7c811a16be4b436dc593c8..80cf0a2d582232ee7495479f9ea105422f0b65f5 100644 (file)
@@ -122,7 +122,7 @@ private:
   Standard_Real theRadius;
   Standard_Real theStartAngle;
   Standard_Real theDeltaAngle;
-  Standard_Integer theDoDontFlag;
+  Standard_Boolean theDoDontFlag;
   Handle(TColStd_HArray1OfInteger) thePositions;
 
 
index b9008d7d6b541a6290018edf3d7a0c7bd5588558..138a5922b8ee7a40a6fea7da3e2750b5a1e53eca 100644 (file)
@@ -54,7 +54,7 @@ IGESDraw_ConnectPoint::IGESDraw_ConnectPoint ()    {  }
   theFunctionTemplate   = aFunctionTemplate;
   thePointIdentifier    = aPointIdentifier;
   theFunctionCode       = aFunctionCode;
-  theSwapFlag           = aSwapFlag;
+  theSwapFlag           = aSwapFlag != 0;
   theOwnerSubfigure     = anOwnerSubfigure;
   InitTypeAndForm(132,0);
 }
index b04d0da06bd53988d7f4532f7d1cd3774cdcc550..f28547f4f3e56548442a20c75397dc2e6ca5d259 100644 (file)
@@ -166,7 +166,7 @@ private:
   Handle(IGESGraph_TextDisplayTemplate) theFunctionTemplate;
   Standard_Integer thePointIdentifier;
   Standard_Integer theFunctionCode;
-  Standard_Integer theSwapFlag;
+  Standard_Boolean theSwapFlag;
   Handle(IGESData_IGESEntity) theOwnerSubfigure;
 
 
index 244f907d01d22321563246ad6f854c3fef4c6888..46b61aafbe8701650c01620072c4f643204a9130 100644 (file)
@@ -53,7 +53,7 @@ IGESDraw_RectArraySubfigure::IGESDraw_RectArraySubfigure ()    {  }
   theColumnSeparation = hDisp;
   theRowSeparation    = vtDisp;
   theRotationAngle    = rotationAngle;
-  theDoDontFlag       = doDont;
+  theDoDontFlag       = doDont != 0;
   thePositions        = allNumPos;
   InitTypeAndForm(412,0);
 }
index 0cd4bba2571996509b1770f69ecb324d280ab679..ca3e087888113e4286d2ad02feb5f0a436f55c7a 100644 (file)
@@ -130,7 +130,7 @@ private:
   Standard_Real theColumnSeparation;
   Standard_Real theRowSeparation;
   Standard_Real theRotationAngle;
-  Standard_Integer theDoDontFlag;
+  Standard_Boolean theDoDontFlag;
   Handle(TColStd_HArray1OfInteger) thePositions;
 
 
index 8e4f4078113d939eee016b59d20fc5388281e084..2ba008d22aa2c0f2f47f1971024d2a1acdbfe234 100644 (file)
@@ -225,7 +225,7 @@ IGESSolid_TopoBuilder::IGESSolid_TopoBuilder ()    {  Clear();  }
   if (surface.IsNull())
     Standard_DomainError::Raise ("IGESSolid_TopoBuilder : MakeFace");
   thesurf  = surface;
-  theouter = 0;
+  theouter = Standard_False;
   theinner->Clear();
   theface  = new IGESSolid_Face;
 }
@@ -233,7 +233,7 @@ IGESSolid_TopoBuilder::IGESSolid_TopoBuilder ()    {  Clear();  }
     void  IGESSolid_TopoBuilder::SetOuter ()
 {
   EndLoop();
-  theouter = 1;
+  theouter = Standard_True;
   theinner->Append (theloop);
   theloop.Nullify();
 }
@@ -291,7 +291,7 @@ IGESSolid_TopoBuilder::IGESSolid_TopoBuilder ()    {  Clear();  }
 {
   EndShell();
   themains = theshell;
-  themflag = orientation;
+  themflag = orientation != 0;
   theshell.Nullify();
 }
 
index 0fdfb0c97d65a3a95897b6d90705dde0fa8ce815..698428fa639e0b143419d5e024dc792e4e107413 100644 (file)
@@ -183,7 +183,7 @@ private:
 
   Handle(IGESSolid_ManifoldSolid) thesolid;
   Handle(IGESSolid_Shell) themains;
-  Standard_Integer themflag;
+  Standard_Boolean themflag;
   Handle(TColStd_HSequenceOfTransient) thevoids;
   Handle(TColStd_HSequenceOfInteger) thevflag;
   Handle(IGESSolid_Shell) theshell;
@@ -191,7 +191,7 @@ private:
   Handle(TColStd_HSequenceOfInteger) thefflag;
   Handle(IGESSolid_Face) theface;
   Handle(IGESData_IGESEntity) thesurf;
-  Standard_Integer theouter;
+  Standard_Boolean theouter;
   Handle(TColStd_HSequenceOfTransient) theinner;
   Handle(IGESSolid_Loop) theloop;
   Handle(TColStd_HSequenceOfInteger) theetype;
index ac79cedfc4a50a8dfab64d8433eed343d8b2d763..8e791ca8408916c8406223c4bd6531d58bc90261 100644 (file)
@@ -148,7 +148,7 @@ Handle(Transfer_Binder) IGESToBRep_Actor::Transfer
   if (mymodel.IsNull() || ent.IsNull()) return NullResult();
   Standard_Integer anum = mymodel->Number(start);
   
-  if(!Interface_Static::IVal("read.iges.faulty.entities") && mymodel->IsErrorEntity(anum)) 
+  if (Interface_Static::IVal("read.iges.faulty.entities") == 0 && mymodel->IsErrorEntity(anum)) 
     return NullResult();
   TopoDS_Shape shape;
 
index d6fadddb8e5afda6dcb992a125ea5c8e8d520d1b..42ea5007ff4c1d21c24aa8d4171cc77bf7b15d3c 100644 (file)
@@ -665,7 +665,7 @@ static Standard_Integer VtkSetSelectionMode (Draw_Interpretor& theDI,
   if (theArgNum == 3)
   {
     aMode = atoi (theArgs[1]);
-    isTurnOn = atoi (theArgs[2]);
+    isTurnOn = (atoi (theArgs[2]) != 0);
     if (aMode < 0 || aMode > 8)
     {
       theDI << theArgs[0] << " error: only 0-8 selection modes are supported\n";
@@ -726,7 +726,7 @@ static Standard_Integer VtkSetSelectionMode (Draw_Interpretor& theDI,
   if (theArgNum == 4)
   {
     aMode = atoi (theArgs[2]);
-    isTurnOn = atoi (theArgs[3]);
+    isTurnOn = (atoi (theArgs[3]) != 0);
 
     if (aMode < 0 || aMode > 8)
     {
index 7fef1f9427ab21b5bef6f9e93140f08657496450..7c2c84b0e7eff87b1a9f66d9abcc133b93b3e6de 100644 (file)
@@ -142,7 +142,7 @@ const Handle(Aspect_Window)& IVtkDraw_Interactor::GetOCCWindow() const
 //===========================================================
 Standard_Boolean IVtkDraw_Interactor::IsEnabled() const
 {
-  return Enabled;
+  return (Enabled != 0);
 }
 
 //===========================================================
index edd8b348231516097bb8a41e2b07ce63e7f9db76..2adc977964e7ec365ae17ba763f69aadfc648897 100644 (file)
@@ -843,7 +843,7 @@ void IVtkOCC_ShapeMesher::addWFFace (const TopoDS_Face& theFace,
   // Introducing a local scope here to simplify variable naming
   {
     buildIsoLines (aSurfAdaptor,
-                   myNbIsos[0],
+                   myNbIsos[0] != 0,
                    Standard_False,
                    myNbIsos[0],
                    0,
@@ -881,7 +881,7 @@ void IVtkOCC_ShapeMesher::addWFFace (const TopoDS_Face& theFace,
     aPolylines.Clear();
     buildIsoLines (aSurfAdaptor,
                    Standard_False,
-                   myNbIsos[1],
+                   myNbIsos[1] != 0,
                    0,
                    myNbIsos[1],
                    aPolylines);
index 9b66768053abbd5c2a779a4e9c6752f815d2e814..87e7417153fc7bd21995b4ae657181ca3b21cb0b 100644 (file)
@@ -773,7 +773,7 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L,
            }
          }
 
-         Standard_Boolean nbTreated = 0;
+         Standard_Integer nbTreated = 0;
          for (Standard_Integer ip=0; ip < nbpt; ip++) {
            GetLinePoint2d (L, W1[ip]+1, !OnFirst, U,V);
 
index 83ec31e9c4750247e3d219c1c077edb19c49216a..a3bb33b8dab1398945ab4fa5ac2a055801380a54 100644 (file)
@@ -93,7 +93,7 @@ static
   Standard_Real CurveDeflection(const BRepAdaptor_Curve& theBAC,
                                 const IntTools_Range& theRange);
 static 
-  Standard_Integer IsClosed(const Handle(Geom_Curve)& theCurve,
+  Standard_Boolean IsClosed(const Handle(Geom_Curve)& theCurve,
                             const Standard_Real aT1,
                             const Standard_Real aT2,
                             const Standard_Real theTol,
@@ -1506,26 +1506,21 @@ Standard_Real CurveDeflection(const BRepAdaptor_Curve& theBAC,
 //function : IsClosed
 //purpose  : 
 //=======================================================================
-Standard_Integer IsClosed(const Handle(Geom_Curve)& theCurve,
+Standard_Boolean IsClosed(const Handle(Geom_Curve)& theCurve,
                           const Standard_Real aT1,
                           const Standard_Real aT2,
                           const Standard_Real theTol,
                           const Standard_Real theRes)
 {
-  Standard_Boolean bClosed;
-  Standard_Real aD;
-  gp_Pnt aP1, aP2;
-  //
-  bClosed = Standard_False;
-  if (Abs(aT1 - aT2) < theRes) {
-    return bClosed;
+  if (Abs(aT1 - aT2) < theRes)
+  {
+    return Standard_False;
   }
-  //
+
+  gp_Pnt aP1, aP2;
   theCurve->D0(aT1, aP1);
   theCurve->D0(aT2, aP2);
   //
-  aD = aP1.Distance(aP2);
-  bClosed = aD < theTol;
-  //
-  return bClosed;
+  Standard_Real aD = aP1.Distance(aP2);
+  return aD < theTol;
 }
index 99c3e22290e28828d3b015ea24383ed1b87ea5e4..14a6c4f75cf16ceab3ecfe856f62fd94c3a420fa 100644 (file)
@@ -1546,7 +1546,7 @@ Standard_Boolean ChoixUV(const TopoDS_Edge& Last,
     GetDirection(theResEdge, F, plst, dlst, Standard_False);
   }
 
-  return (imin);
+  return imin != 0;
 }
 
 //=======================================================================
index 0a234df4e77968ae0433901aefde8eec12ee3374..84f322259d4ba1e83bcb96d99057b78495a3f542 100644 (file)
@@ -1467,5 +1467,5 @@ Standard_Boolean LocOpe_WiresOnShape::Add(const TopTools_SequenceOfShape& theEdg
     }
 
   }
-  return (anUsedEdges.Extent());
+  return !anUsedEdges.IsEmpty();
 }
index 2c89a9553e2040ae81a2bc0e72fff8d86a67821e..fdc740573d09b025d1a05d3699b86186014552f0 100644 (file)
@@ -27,7 +27,7 @@
 #include <sys/stat.h>
 
 OSD_DirectoryIterator::OSD_DirectoryIterator() 
-: myFlag(0),
+: myFlag(false),
   myDescr(0),
   myEntry(0),
   myInit(0)
@@ -36,7 +36,7 @@ OSD_DirectoryIterator::OSD_DirectoryIterator()
 
 OSD_DirectoryIterator::OSD_DirectoryIterator(const OSD_Path& where,
                                              const TCollection_AsciiString& Mask)
-: myFlag(0),
+: myFlag(false),
   myDescr(0),
   myEntry(0),
   myInit(0)
@@ -74,7 +74,7 @@ Standard_Boolean OSD_DirectoryIterator::More(){
      Next();          // Now find first entry
    }
  }
- return (myFlag);
+ return myFlag;
 }
 
 // Private :  See if directory name matches with a mask (like "*.c")
@@ -102,7 +102,7 @@ int again = 1;
 struct stat stat_buf;
 char full_name[255];
 
- myFlag = 0;   // Initialize to nothing found
+ myFlag = false;   // Initialize to nothing found
 
  do{
     myEntry = readdir((DIR *)myDescr);
index e04bb7e41365adfef043f614ffe0379d52d8d4a6..722645f7a26412b301bc79508bb3728face20202 100644 (file)
@@ -86,7 +86,7 @@ public:
 
 private:
   OSD_Directory TheIterator;
-  Standard_Integer myFlag;
+  Standard_Boolean myFlag;
   TCollection_AsciiString myMask;
   TCollection_AsciiString myPlace;
   OSD_Error myError;
index 399467ce977c99c6d898432c521414a513e2ad35..4699a3c82e6f07efb2530590a6e96353d1b2da89 100644 (file)
@@ -51,7 +51,7 @@ extern char *vmsify PARAMS ((char *name, int type));
 
 
 OSD_FileIterator::OSD_FileIterator()
-: myFlag(0),
+: myFlag(false),
   myDescr(0),
   myEntry(0),
   myInit(0)
@@ -60,7 +60,7 @@ OSD_FileIterator::OSD_FileIterator()
 
 OSD_FileIterator::OSD_FileIterator(const OSD_Path& where,
                                    const TCollection_AsciiString& Mask)
-: myFlag(0),
+: myFlag(false),
   myDescr(0),
   myEntry(0),
   myInit(0)
@@ -96,7 +96,7 @@ Standard_Boolean OSD_FileIterator::More(){
      Next();          // Now find first entry
    }
  }
- return (myFlag);
+ return myFlag;
 }
 
 // Private :  See if file name matches with a mask (like "*.c")
@@ -178,7 +178,7 @@ int again = 1;
 struct stat stat_buf;
 char full_name[255];
 
- myFlag = 0;   // Initialize to nothing found
+ myFlag = false;   // Initialize to nothing found
 
  do {
     myEntry = readdir((DIR *)myDescr);
index 0c583f882818d754e02997369ac1b3623c8577e9..ae98b10f1762251ac2dc039909fdc40031a24544 100644 (file)
@@ -78,7 +78,7 @@ public:
 private:
 
   OSD_File TheIterator;
-  Standard_Integer myFlag;
+  Standard_Boolean myFlag;
   TCollection_AsciiString myMask;
   TCollection_AsciiString myPlace;
   OSD_Error myError;
index 59da17efff4ae07d8052ea7f69c80071f4c4a978..4a13ac29cc671b7ac2b1c736e146bdfe1d458ac2 100755 (executable)
@@ -179,8 +179,8 @@ private:
   Graphic3d_SequenceOfHClipPlane myPlanes;        //!< defined clipping planes
   OpenGl_MapOfPlaneStates        myPlaneStates;   //!< map of clip planes bound for the props
   OpenGl_EmptyPlaneIds           myEmptyPlaneIds; //!< generator of empty ids
-  Standard_Boolean               myNbClipping;    //!< number of enabled clipping-only planes (NOT capping)
-  Standard_Boolean               myNbCapping;     //!< number of enabled capping  planes
+  Standard_Integer               myNbClipping;    //!< number of enabled clipping-only planes (NOT capping)
+  Standard_Integer               myNbCapping;     //!< number of enabled capping  planes
 
 private:
 
index 095431960747377c74258cc14fa3995651feeec9..2058412889027685ee86a0d1f28c1b94d23a53cf 100644 (file)
@@ -59,7 +59,7 @@ public:
 
     Standard_Boolean IsReversed() const
     {
-      return flags & Poly_MakeLoops::LF_Reversed;
+      return (flags & Poly_MakeLoops::LF_Reversed) != 0;
     }
 
     void Nullify()
index 84784786f6215389f8581d2828529ccebad52d5e..a746d1ea5ede1b8d650c487d647357794342dc49 100644 (file)
@@ -3429,11 +3429,10 @@ int TestSetGet(const Handle(TDocStd_Document)& doc)
   if (getboollist->Last() != Standard_True)
     return 3;
   const TDataStd_ListOfByte& boollist = getboollist->List();
-  TDataStd_ListIteratorOfListOfByte itr_boollist(boollist);
-  for (; itr_boollist.More(); itr_boollist.Next())
+  for (TDataStd_ListIteratorOfListOfByte itr_boollist(boollist); itr_boollist.More(); itr_boollist.Next())
   {
-    if (itr_boollist.Value() != Standard_True &&
-       itr_boollist.Value() != Standard_False)
+    if (itr_boollist.Value() != 1
+     && itr_boollist.Value() != 0)
     {
       return 4;
     }
index 782984129061aa729b6e7243be8b54f42bd8a338..13bbade0789402335e340ceee88fbe4935f7622a 100644 (file)
@@ -4068,7 +4068,7 @@ static Standard_Integer OCC26195 (Draw_Interpretor& theDI, Standard_Integer theA
   Standard_Boolean toPrint = Standard_False;
   if (theArgNb % 2 == 0)
   {
-    toPrint = Draw::Atoi (theArgVec[theArgNb - 1]);
+    toPrint = Draw::Atoi (theArgVec[theArgNb - 1]) != 0;
   }
 
   SelectMgr_SelectingVolumeManager* aMgr = new SelectMgr_SelectingVolumeManager();
index 2124fe2b13066646df15d953ada627911346a348..589d66df04f691d52b2f54c6328d4498b301c9fc 100644 (file)
@@ -388,7 +388,7 @@ static Standard_Integer Collect (Draw_Interpretor& di,
     if (!DDF::GetDF(arg[1],DF)) return 1;
     if (!DDF::Find(DF,arg[2],TNaming_NamedShape::GetID(),A)) return 1;
     if (nb >= 4) {
-      OnlyModif = Draw::Atoi(arg[3]);
+      OnlyModif = Draw::Atoi(arg[3]) != 0;
     }
     TNaming_Tool::Collect(A,MNS,OnlyModif);
     for (TNaming_MapIteratorOfMapOfNamedShape it(MNS); it.More(); it.Next()) {
index 596b39a6d69e4977752c8939b251ac99b4af8f23..91a078d6ac4b7392e29e00fba0c387adcfde6663 100644 (file)
@@ -259,7 +259,7 @@ Standard_Boolean QANewBRepNaming_Loader::GetDangleShapes(const TopoDS_Shape& Sha
     const TopTools_ListOfShape& ancestors = subShapeAndAncestors.FindFromIndex(i);
     if (ancestors.Extent() == 1) Dangles.Bind(ancestors.First(), mayBeDangle);
   }
-  return Dangles.Extent();
+  return !Dangles.IsEmpty();
 }
 
 //=======================================================================
@@ -282,7 +282,7 @@ Standard_Boolean QANewBRepNaming_Loader::GetDangleShapes(const TopoDS_Shape& Sha
     const TopTools_ListOfShape& ancestors = subShapeAndAncestors.FindFromIndex(i);
     if (ancestors.Extent() == 1) Dangles.Add(mayBeDangle);
   }
-  return Dangles.Extent();
+  return !Dangles.IsEmpty();
 }
 
 //=======================================================================
index f602b01bf31d12191ee3d4bfb88a5f3ebb1d8edf..66c893a593d12fcc398e4ec6b9347466e780e530 100644 (file)
@@ -55,7 +55,7 @@ Standard_Boolean QANewBRepNaming_LoaderParent::GetDangleShapes(const TopoDS_Shap
     const TopTools_ListOfShape& ancestors = subShapeAndAncestors.FindFromIndex(i);
     if (ancestors.Extent() == 1) Dangles.Bind(ancestors.First(), mayBeDangle);
   }
-  return Dangles.Extent();
+  return !Dangles.IsEmpty();
 }
 
 //=======================================================================
@@ -79,7 +79,7 @@ Standard_Boolean QANewBRepNaming_LoaderParent::GetDangleShapes(const TopoDS_Shap
     const TopTools_ListOfShape& ancestors = subShapeAndAncestors.FindFromIndex(i);
     if (ancestors.Extent() == 1) Dangles.Add(mayBeDangle);
   }
-  return Dangles.Extent();
+  return !Dangles.IsEmpty();
 }
 */
 //=======================================================================
index 9be5e42bf09258681404c88da1d5e3be32e4e3a8..25e85d7f67fd2056c86323a85a3a8f651a40438f 100644 (file)
@@ -202,7 +202,7 @@ static Standard_Integer QANewDBRepNaming_NamePrism (Draw_Interpretor& di,
       namePrism.Load(mkPrism, Basis);
     }      
     else if (nb == 9) {
-      BRepPrimAPI_MakePrism mkPrism(Basis, Direction, (Standard_Boolean)Draw::Atoi(arg[8]));  
+      BRepPrimAPI_MakePrism mkPrism(Basis, Direction, Draw::Atoi(arg[8]) != 0);  
       mkPrism.Build();
       
       if(!mkPrism.IsDone()) {
index 39b9fea59b1543dbb65a07351444d5f545c5d30c..2ae26cbc789bf86c03bf29ac287d92bf1c765735 100644 (file)
@@ -175,21 +175,18 @@ Standard_Boolean QANewModTopOpe_Tools::HasSameDomain
   (const BOPAlgo_PBuilder& theBuilder, 
    const TopoDS_Shape& theFace) 
 {
-  Standard_Integer bRet;
-  bRet = Standard_False;
-  //
   if(theFace.IsNull() || (theFace.ShapeType() != TopAbs_FACE))
-    return bRet;
+    return Standard_False;
 
   BOPCol_ListIteratorOfListOfShape aIt;
   const BOPCol_DataMapOfShapeListOfShape& aImages = theBuilder->Images();
   if (!aImages.IsBound(theFace)) {
-    return bRet;
+    return Standard_False;
   }
   const BOPCol_ListOfShape& aLF=aImages.Find(theFace);
   
   if (aLF.Extent() == 0) {
-    return bRet;
+    return Standard_False;
   }
   const BOPCol_DataMapOfShapeShape& aShapesSD = theBuilder->ShapesSD();
 
@@ -197,12 +194,11 @@ Standard_Boolean QANewModTopOpe_Tools::HasSameDomain
   for (; aIt.More(); aIt.Next()) {
     const TopoDS_Shape& aFsp = aIt.Value();
     if (aShapesSD.IsBound(aFsp)) {
-      bRet = Standard_True;
-      break;
+      return Standard_True;
     }
   }
 
-  return bRet;
+  return Standard_False;
 }
 
 // ========================================================================================
index 5945f1de6890b5eca3737f08bb8303e98417d618..d574f348a206df9b109e47b98f8cfc3e99f7fda7 100644 (file)
@@ -129,8 +129,8 @@ inline static void WriteDouble2Float(OSD_File& ofile,Standard_Real value)
 inline static Standard_Real ReadFloat2Double(OSD_File &aFile)
 {
   union {
-    Standard_Boolean i; // don't be afraid, this is just an unsigned int
-    Standard_ShortReal f;
+    uint32_t i;
+    float    f;
   }bidargum;
 
   char c[4];
index a69849ae42a21a40c5246dbf1d1872e379519103..1076d49e9ff4ee68806d710f6c0d3e1c4ff11a7d 100644 (file)
@@ -667,7 +667,7 @@ Standard_Boolean STEPCAFControl_Writer::Transfer (STEPControl_Writer &writer,
     *  Write names for the sub-shapes
     * ================================ */
 
-  if ( Interface_Static::IVal("write.stepcaf.subshapes.name") )
+  if (Interface_Static::IVal("write.stepcaf.subshapes.name") != 0)
   {
     const Handle(XSControl_TransferWriter) &TW = this->ChangeWriter().WS()->TransferWriter();
     const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess();
index 3bfbd2309a953971e1b401d122ab440f1bcdc9a8..f0564511925a06588d7806fd9c46584d9cec824b 100644 (file)
@@ -775,7 +775,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
   Message_ProgressSentry PS ( TP->GetProgress(), "Sub-assembly", 0, nb, 1 );
 
   // [BEGIN] Proceed with non-manifold topology (ssv; 12.11.2010)
-  Standard_Boolean isNMMode = Interface_Static::IVal("read.step.nonmanifold");
+  Standard_Boolean isNMMode = Interface_Static::IVal("read.step.nonmanifold") != 0;
   Standard_Boolean isManifold = Standard_True;
   if ( isNMMode && sr->IsKind(STANDARD_TYPE(StepShape_NonManifoldSurfaceShapeRepresentation)) ) {
     isManifold = Standard_False;
index da131b2723a5fc03a0f5378805e017c7c5e6bc94..268c968ff88fc15555292a1032c86e1fb2c8b391 100644 (file)
@@ -643,7 +643,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape (const Handle(Tran
     return TransferCompound(start, SDR0, FP);
 
   // [BEGIN] Separate manifold topology from non-manifold in group mode 0 (ssv; 18.11.2010)
-  Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold");
+  Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0;
   Handle(Transfer_Binder) aNMBinder;
   if (isNMMode && !GroupMode() && theShape.ShapeType() == TopAbs_COMPOUND) {
     TopoDS_Compound aNMCompound;
@@ -1278,7 +1278,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound (const Handle(T
   TopoDS_Shape theShape = mapper->Value();
 
   // Inspect non-manifold topology case (ssv; 10.11.2010)
-  Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold");
+  Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0;
   Standard_Boolean isManifold;
   if (isNMMode)
     isManifold = IsManifoldShape(theShape);
index 0062dc44eb747c28f8998706d7d2d31e6eb65e8d..3ef05c4785c46021dcfd15612e659a6b1f9c9caa 100644 (file)
@@ -563,7 +563,6 @@ Standard_Boolean STEPControl_Reader::findUnits(
     nbFind++;
        
    }
-    
-  return (nbFind);
+
+  return nbFind != 0;
 }
-                                   
index 17d032c3060bb2940742b866eb9ce38c7a689949..71282904912e359c79174ec47de2fd230b55dac7 100644 (file)
@@ -613,8 +613,8 @@ static Standard_Integer freebounds (Draw_Interpretor& di,
   if (shape.IsNull()) return 1;
   Standard_Real toler = Draw::Atof (a[2]);
   Standard_Boolean splitclosed = Standard_False, splitopen = Standard_False;
-  if ( n > 3) splitclosed = Draw::Atoi (a[3]);
-  if ( n > 4) splitopen   = Draw::Atoi (a[4]);
+  if ( n > 3) splitclosed = Draw::Atoi (a[3]) != 0;
+  if ( n > 4) splitopen   = Draw::Atoi (a[4]) != 0;
 
   ShapeAnalysis_FreeBounds F;
   if (toler <= 0)
@@ -677,8 +677,8 @@ static Standard_Integer FreeBoundsProps(Draw_Interpretor& di,
   Standard_Real toler = 0.;
   Standard_Boolean splitclosed = Standard_False, splitopen = Standard_False;
   if (n > 2) toler =  Draw::Atof(a[2]);
-  if (n > 3) splitclosed = Draw::Atoi(a[3]);
-  if (n > 4) splitopen   = Draw::Atoi(a[4]);
+  if (n > 3) splitclosed = Draw::Atoi(a[3]) != 0;
+  if (n > 4) splitopen   = Draw::Atoi(a[4]) != 0;
   ShapeAnalysis_FreeBoundsProperties analyzer;
   if (toler > 0)
     analyzer.Init(source, toler, splitclosed, splitopen);
@@ -735,8 +735,8 @@ static Standard_Integer closefreebounds (Draw_Interpretor& di,
   if (shape.IsNull()) return 1;
   Standard_Real sewtoler = Draw::Atof (a[2]), closetoler = Draw::Atof (a[3]);
   Standard_Boolean splitclosed = Standard_False, splitopen = Standard_False;
-  if ( n > 4) splitclosed = Draw::Atoi (a[3]);
-  if ( n > 5) splitopen   = Draw::Atoi (a[4]);
+  if ( n > 4) splitclosed = Draw::Atoi (a[3]) != 0;
+  if ( n > 5) splitopen   = Draw::Atoi (a[4]) != 0;
 
   ShapeFix_FreeBounds F;
   if (sewtoler <= 0)
index 4037073ec416499c699fe9551cf588b064ca2142..b5375b39483347aec796db08131ac98e61d73f7d 100644 (file)
@@ -155,7 +155,7 @@ static void expcurv2d(const Handle(Geom2d_Curve)& aCurve, TColStd_Array2OfIntege
   if (aCurve->IsKind(STANDARD_TYPE(Geom2d_BezierCurve))) {
     Handle(Geom2d_BezierCurve) Bs = Handle(Geom2d_BezierCurve)::DownCast(aCurve); 
     if(Bs->Degree() > Degree) Nb.ChangeValue(2,1)++;
-    if(Bs->IsRational() > ((unsigned int)MaxSeg) )  Nb.ChangeValue(2,3)++;
+    if(Bs->IsRational())  Nb.ChangeValue(2,3)++;
     if(aCont < theCont)
     {
 
@@ -207,7 +207,7 @@ static void expcurv(const Handle(Geom_Curve)& aCurve, TColStd_Array2OfInteger& N
   if (aCurve->IsKind(STANDARD_TYPE(Geom_BezierCurve))) {
     Handle(Geom_BezierCurve) Bs = Handle(Geom_BezierCurve)::DownCast(aCurve); 
     if(Bs->Degree() > Degree) Nb.ChangeValue(2,1)++;
-    if(Bs->IsRational() > ((unsigned int)MaxSeg) )  Nb.ChangeValue(2,3)++;
+    if(Bs->IsRational())  Nb.ChangeValue(2,3)++;
     if(aCont < theCont) 
       Nb.ChangeValue(2,4)++;
     return;
@@ -433,7 +433,7 @@ static Standard_Integer BSplRes(Draw_Interpretor& di, Standard_Integer argc, con
     di<< "Invalid argument Cont3e\n"; return 1; }
 
   Handle(ShapeCustom_RestrictionParameters) aParameters = new ShapeCustom_RestrictionParameters;
-  TopoDS_Shape result = ShapeCustom::BSplineRestriction (Shape, Draw::Atof(argv[3]), Draw::Atof(argv[4]), Draw::Atoi(argv[5]),Draw::Atoi(argv[6]),aCont3,aCont2,(Standard_Boolean) Draw::Atoi(argv[9]),(Standard_Boolean) Draw::Atoi(argv[10]),aParameters);
+  TopoDS_Shape result = ShapeCustom::BSplineRestriction (Shape, Draw::Atof(argv[3]), Draw::Atof(argv[4]), Draw::Atoi(argv[5]),Draw::Atoi(argv[6]),aCont3,aCont2, Draw::Atoi(argv[9]) != 0, Draw::Atoi(argv[10]) != 0,aParameters);
   if (result.IsNull()) { di << "NO RESULT\n"; return 1; }
   else if (result == Shape) { 
     di << "NO MODIFICATIONS\n";
index ef5c82907e7d5d5d70af59620b1acf9ce1d811de..3940bc91cd3cc7555ce66ff2070ba34c46c343e5 100644 (file)
@@ -38,9 +38,10 @@ static Standard_Integer sortcompound (Draw_Interpretor& di, Standard_Integer arg
   if (argc < 4) {
     ShapeExtend_Explorer sbx;
     for (int i = 0; i < 2; i ++) {
-      TopAbs_ShapeEnum ts = sbx.ShapeType(Shape,i);
+      Standard_Boolean viaCompound = (i != 0);
+      TopAbs_ShapeEnum ts = sbx.ShapeType(Shape, viaCompound);
       //cout<<"   Type "<<(i ? " (via Compound) : " : "(True) : ");
-      if (i == 0) {
+      if (!viaCompound) {
        di<<"   Type (True) : ";
       } else {
        di<<"   Type  (via Compound) : ";
index 2d8d8baea28a18101233032c5ee78e5107da2415..79dabddaf20587ed3e4a09e6c5a543726591cd1e 100644 (file)
@@ -49,7 +49,7 @@ void SelectMgr_BaseFrustum::SetCamera (const Handle(Graphic3d_Camera)& theCamera
 //=======================================================================
 void SelectMgr_BaseFrustum::SetCamera (const Graphic3d_Mat4d& theProjection,
                                        const Graphic3d_Mat4d& theWorldView,
-                                       const Standard_Integer theIsOrthographic,
+                                       const Standard_Boolean theIsOrthographic,
                                        const Graphic3d_WorldViewProjState& theWVPState)
 {
   myCamera.Nullify();
index 740a9b540bd286be726959db6f2f1911498650a5..487cece2afd43c7dda014ca09689c2545bb94efb 100644 (file)
@@ -57,7 +57,7 @@ public:
   //! Passes camera projection and orientation matrices to builder
   Standard_EXPORT void SetCamera (const Graphic3d_Mat4d& theProjection,
                                   const Graphic3d_Mat4d& theWorldView,
-                                  const Standard_Integer theIsOrthographic,
+                                  const Standard_Boolean theIsOrthographic,
                                   const Graphic3d_WorldViewProjState& theWVPState = Graphic3d_WorldViewProjState());
 
   //! @return current camera projection transformation common for all selecting volumes
index 2611cd42464397994cff3d083f4d86ed688c1bc5..f5350f5d28563536b7a8868f07f1431e5855917a 100644 (file)
@@ -783,7 +783,7 @@ Standard_Boolean ShapeAnalysis_Surface::IsVClosed(const Standard_Real preci)
 //function : SurfaceNewton
 //purpose  : Newton algo (S4030)
 //=======================================================================
-Standard_Boolean ShapeAnalysis_Surface::SurfaceNewton(const gp_Pnt2d &p2dPrev,
+Standard_Integer ShapeAnalysis_Surface::SurfaceNewton(const gp_Pnt2d &p2dPrev,
                                                       const gp_Pnt& P3D,
                                                       const Standard_Real preci,
                                                       gp_Pnt2d &sol)
@@ -852,7 +852,7 @@ Standard_Boolean ShapeAnalysis_Surface::SurfaceNewton(const gp_Pnt2d &p2dPrev,
 //     cout << "Newton: solution found in " << i+1 << " iterations" << endl;
     sol.SetCoord( U, V );
     
-    return ( nrm2 < 0.01 * ru2 * rv2 ? 2 : Standard_True ); //:q6
+    return ( nrm2 < 0.01 * ru2 * rv2 ? 2 : 1 ); //:q6
   }
 //      cout << "Newton: failed after " << i+1 << " iterations (fail " << fail << " )" << endl;
   return Standard_False;
@@ -911,8 +911,8 @@ gp_Pnt2d ShapeAnalysis_Surface::NextValueOfUV(const gp_Pnt2d &p2dPrev,
       }
 
       gp_Pnt2d sol;
-      Standard_Boolean res = SurfaceNewton(p2dPrev,P3D,preci,sol);
-      if ( res )
+      Standard_Integer res = SurfaceNewton(p2dPrev,P3D,preci,sol);
+      if (res != 0)
       {
         Standard_Real gap = P3D.Distance ( Value(sol) );
         if ( res == 2 || //:q6 abv 19 Mar 99: protect against strange attractors
@@ -1002,7 +1002,8 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D,const Standard_Real
        //conic case
        gp_Pnt2d prev(S,T);
        gp_Pnt2d solution;
-       if (SurfaceNewton(prev,P3D,preci,solution)) {
+       if (SurfaceNewton(prev,P3D,preci,solution) != 0)
+  {
 #ifdef OCCT_DEBUG
          cout <<"Newton found point on conic extrusion"<<endl;
 #endif
@@ -1073,7 +1074,8 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D,const Standard_Real
        Standard_Boolean possLockal = Standard_False; //:study S4030 (optimizing)
        if (disSurf > preci) {
          gp_Pnt2d pp(UU,VV);
-         if ( SurfaceNewton(pp,P3D,preci,pp))  { //:q2 abv 16 Mar 99: PRO7226 #412920
+         if (SurfaceNewton (pp, P3D, preci, pp) != 0)
+    { //:q2 abv 16 Mar 99: PRO7226 #412920
            Standard_Real dist = P3D.Distance ( Value(pp) );
            if ( dist < disSurf ) {
              disSurf = dist;
index 0176b0565b1f1d2e4ddff1f692b16613e67061aa..e4ac811a60435a08536e8e6f376876ccb6532525 100644 (file)
@@ -347,9 +347,10 @@ private:
   Standard_EXPORT void ComputeSingularities();
   
   Standard_EXPORT void ComputeBoxes();
-  
-  Standard_EXPORT Standard_Boolean SurfaceNewton (const gp_Pnt2d& p2dPrev, const gp_Pnt& P3D, const Standard_Real preci, gp_Pnt2d& sol);
-  
+
+  //! @return 0, 1 or 2.
+  Standard_EXPORT Standard_Integer SurfaceNewton (const gp_Pnt2d& p2dPrev, const gp_Pnt& P3D, const Standard_Real preci, gp_Pnt2d& sol);
+
   Standard_EXPORT void SortSingularities();
 
 
index bbe58ea511bd08a717c6b69e19b768b725c58a89..93f569bba2992b9236b762c461fa226085feeb8a 100644 (file)
@@ -69,7 +69,7 @@ static Standard_Integer IsIndirectSurface (Handle(Geom_Surface) &S,
     Standard_Boolean neg = t.IsNegative();
     Standard_Boolean det = ( t.VectorialPart().Determinant() < 0.0 );
     Standard_Boolean dir = ES->Position().Direct();
-    if ( (Standard_Boolean)( neg != det ) == dir ) result = 1;
+    if ((neg != det) == dir) result = 1;
     Handle(Geom_ConicalSurface) CS = Handle(Geom_ConicalSurface)::DownCast(ES);
     if (!CS.IsNull()) {
       // does the cone have negative semiangle ?
index 230e14066bcc29e89add04e6d21d377943ed10dc..15776ad8ef8ada0b416a7915d1613d164edb577b 100644 (file)
@@ -405,7 +405,7 @@ static Standard_Integer ApplyContext (ShapeFix_WireSegment &wire,
 //purpose  : auxilary
 //=======================================================================
 // check points coincidence
-static inline Standard_Integer IsCoincided (const gp_Pnt2d &p1, const gp_Pnt2d &p2,
+static inline Standard_Boolean IsCoincided (const gp_Pnt2d &p1, const gp_Pnt2d &p2,
                                             const Standard_Real UResolution,
                                             const Standard_Real VResolution,
                                             const Standard_Real tol)
@@ -731,7 +731,7 @@ static void DistributeSplitPoints (const Handle(ShapeExtend_WireData) &sbwd,
 
   for ( i=1; i <= indexes.Length() && indexes(i) < index; i++ );
   for ( Standard_Integer shift = 1; i <= indexes.Length() && indexes(i) == index; i++ ) {
-    while (  shift < nsplit  && isreversed != (Standard_Boolean) ( values(i) > params(shift) ) ) shift++;
+    while (  shift < nsplit  && isreversed != (values(i) > params(shift)) ) shift++;
     indexes.SetValue ( i, index + shift - 1 );
   }
   for ( ; i <= indexes.Length(); i++ ) 
@@ -1116,7 +1116,7 @@ ShapeFix_WireSegment ShapeFix_ComposeShell::SplitWire (ShapeFix_WireSegment &wir
         B.SameRange(newEdge, Standard_False);
       //pdn take into account 0 codes (if ext)
       if(code == 0 && wire.Orientation()==TopAbs_EXTERNAL){
-        code  = ( ( isCutByU == (Standard_Boolean)( j == 1 ) ) ? 1 : 2 );
+        code  = ( ( isCutByU == (j == 1) ) ? 1 : 2 );
       }
 
       result.AddEdge ( 0, newEdge, iumin, iumax, ivmin, ivmax );
@@ -1159,7 +1159,7 @@ ShapeFix_WireSegment ShapeFix_ComposeShell::SplitWire (ShapeFix_WireSegment &wir
         result.AddEdge ( 0, edge, iumin, iumax, ivmin, ivmax );
       if(code == 0 && wire.Orientation()==TopAbs_EXTERNAL){
         //pdn defining code for intersection of two isos
-        code = ( ( isCutByU == (Standard_Boolean)( Abs(firstPar-currPar) < Abs(lastPar-currPar) ) ) ? 2 : 1 );
+        code = ( ( isCutByU == ( Abs(firstPar-currPar) < Abs(lastPar-currPar) ) ) ? 2 : 1 );
       }
       DefinePatch ( result, code, isCutByU, cutIndex );
     }
@@ -1366,7 +1366,7 @@ Standard_Boolean ShapeFix_ComposeShell::SplitByLine (ShapeFix_WireSegment &wire,
     // Sort by parameter on edge
     for ( i = IntEdgePar.Length(); i > start; i-- ) 
       for ( Standard_Integer j = start; j < i; j++ ) {
-        if ( isreversed == (Standard_Boolean) ( IntEdgePar(j+1) < IntEdgePar(j) ) ) continue;
+        if ( isreversed == ( IntEdgePar(j+1) < IntEdgePar(j) ) ) continue;
         IntLinePar.Exchange ( j, j+1 );
         IntEdgePar.Exchange ( j, j+1 );
       }
@@ -2056,7 +2056,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
       }
 
       // check whether current segment is on the same patch with previous
-      Standard_Integer sp = IsSamePatch ( seg, myGrid->NbUPatches(), myGrid->NbVPatches(),
+      Standard_Boolean sp = IsSamePatch ( seg, myGrid->NbUPatches(), myGrid->NbVPatches(),
                                           iumin, iumax, ivmin, ivmax );
 
       // not same patch has lowest priority
@@ -2077,14 +2077,14 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
         if ( ! endV.IsSame ( j ? seg.LastVertex() : seg.FirstVertex() ) ) continue;
 
         // check for misorientation only if nothing better is found
-        Standard_Integer misor = ( anOr == ( j ? TopAbs_REVERSED : TopAbs_FORWARD ) );
+        Standard_Boolean misor = ( anOr == ( j ? TopAbs_REVERSED : TopAbs_FORWARD ) );
         // if ( misor ) continue; // temporarily, to be improved
 
         // returning back by the same edge is lowest priority
         if ( lastEdge.IsSame ( wire->Edge ( j ? wire->NbEdges() : 1 ) ) ) {
           if ( ! index && ! canBeClosed ) { // || ( sp && ! samepatch ) ) {
             index = i;
-            reverse = j;
+            reverse = j != 0;
             connected = Standard_True;
             misoriented = misor;
             samepatch = sp;
@@ -2141,7 +2141,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
           continue;
 
         index = i;
-        reverse = j;
+        reverse = j != 0;
         angle = ang;
         mindist = dist;
         connected = conn;
@@ -2262,7 +2262,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires,
       for ( Standard_Integer k=1; k <= sbwd->NbEdges(); k++ ) {
         if ( !V.IsSame ( sae.FirstVertex ( sbwd->Edge(k) ) ) ) continue; //pdn I suppose that short segment should be inserted into the SAME vertex.
 
-        Standard_Integer sp = IsSamePatch ( wires(j), myGrid->NbUPatches(), myGrid->NbVPatches(),
+        Standard_Boolean sp = IsSamePatch ( wires(j), myGrid->NbUPatches(), myGrid->NbVPatches(),
                                             iumin, iumax, ivmin, ivmax );
         if ( samepatch && !sp) continue;
         gp_Pnt2d pp;
@@ -2510,7 +2510,7 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces,
       else
         continue;
       TopAbs_State state = clas.Perform (unp,Standard_False);
-      if ( (Standard_Boolean) ( state == TopAbs_OUT ) == reverse ) {
+      if ((state == TopAbs_OUT) == reverse) {
         holes.Append ( loops(j) );
         loops.Remove ( j-- );
       }
index 9887c08bd6b175bf56d958c037444198d5e6b250..589c4feff7a8ac477125c89337cec926b9474b1a 100644 (file)
@@ -1095,7 +1095,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap
     TopoDS_Face af = TopoDS::Face ( dummy );
     af.Orientation ( TopAbs_FORWARD );
     B.Add (af,ws.Value(1));
-    if ((myFixAddNaturalBoundMode != Standard_True || //: abv 29.08.01: Spatial_firex_lofting.sat
+    if ((myFixAddNaturalBoundMode != 1 ||
          !IsSurfaceUVPeriodic (mySurf->Surface())    ) &&
         !ShapeAnalysis::IsOuterBound (af)                )
     {
index a064c7a0370972b7d669e43befc02504868c8df5..c6e19f87c8af54b46570588cc8e8d22ca5201999 100644 (file)
@@ -144,7 +144,7 @@ Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)
   case TopAbs_COMPOUND:  
   case TopAbs_COMPSOLID: {
     TopoDS_Shape shape = myShape;
-    Standard_Boolean savFixSameParameterMode = myFixSameParameterMode;
+    Standard_Integer savFixSameParameterMode = myFixSameParameterMode;
     myFixSameParameterMode = Standard_False;
     myFixVertexTolMode = Standard_False;
     Standard_Integer aShapesNb = 0;
@@ -195,7 +195,7 @@ Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)
   case TopAbs_FACE: {
     if ( ! NeedFix ( myFixFaceMode ) ) break;
     Handle(ShapeFix_Face) sff = FixFaceTool();
-    Standard_Integer savTopoMode = sff->FixWireTool()->ModifyTopologyMode();
+    Standard_Boolean savTopoMode = sff->FixWireTool()->ModifyTopologyMode();
     sff->FixWireTool()->ModifyTopologyMode() = Standard_True;
     sff->Init(TopoDS::Face(S)); 
     sff->SetContext(Context());
@@ -210,8 +210,8 @@ Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)
   case TopAbs_WIRE: {
     if ( ! NeedFix ( myFixWireMode ) ) break;
     Handle(ShapeFix_Wire) sfw = FixWireTool();
-    Standard_Integer savTopoMode = sfw->ModifyTopologyMode();
-    Standard_Integer savClosedMode = sfw->ClosedWireMode();
+    Standard_Boolean savTopoMode = sfw->ModifyTopologyMode();
+    Standard_Boolean savClosedMode = sfw->ClosedWireMode();
     sfw->ModifyTopologyMode() = Standard_True;
     if ( ! S.Closed() ) 
       sfw->ClosedWireMode() = Standard_False;
index 27e921f8e1e6ab5595a2a519eeaf1357dec8fcf0..9bf0d58161d77ec2fa9014bb299bbaa3f90595b8 100644 (file)
@@ -181,7 +181,7 @@ static Standard_Boolean GetFreeEdges(const TopoDS_Shape& aShape,TopTools_MapOfSh
       else  MapEdges.Remove(edge);
     }
   }
-  return (MapEdges.Extent());
+  return !MapEdges.IsEmpty();
 }
 //=======================================================================
 // function : GetShells
@@ -576,9 +576,7 @@ static void GlueClosedCandidate(TopTools_SequenceOfShape& OpenShells,
     
     //Filling map MapOtherShells which contains candidate to creation of closed shell
     // with aShell.
-    
-    TopTools_DataMapOfShapeInteger MapOtherShells;
-    
+    NCollection_DataMap<TopoDS_Shape, Standard_Boolean, TopTools_ShapeMapHasher> MapOtherShells;
     for(Standard_Integer j = i+1 ; j <= OpenShells.Length();j++ )  {
       Standard_Boolean isAddShell = Standard_True;
       Standard_Boolean isReversed = Standard_False;
@@ -603,17 +601,19 @@ static void GlueClosedCandidate(TopTools_SequenceOfShape& OpenShells,
       if(!isAddShell) continue;
       MapOtherShells.Bind(OpenShells.Value(j),isReversed);
     }
-    if(!MapOtherShells.Extent()) continue;
+    if(MapOtherShells.IsEmpty()) continue;
     
     
-    if(MapOtherShells.Extent() >1) {
-      
+    if (!MapOtherShells.IsEmpty())
+    {
       // Case of compsolid when more than two shells have the same free boundary.
       TopTools_SequenceOfShape aSeqCandidate;
       aSeqCandidate.Append(OpenShells.Value(i));
       
-      for(TopTools_DataMapIteratorOfDataMapOfShapeInteger aIt(MapOtherShells); aIt.More(); aIt.Next())
-       aSeqCandidate.Append(aIt.Key());
+      for (NCollection_DataMap<TopoDS_Shape, Standard_Boolean, TopTools_ShapeMapHasher>::Iterator aIt(MapOtherShells); aIt.More(); aIt.Next())
+      {
+        aSeqCandidate.Append(aIt.Key());
+      }
       
       //Creation all possibly shells from choosen candidate.And
       // addition of them to temporary sequence.
@@ -627,9 +627,9 @@ static void GlueClosedCandidate(TopTools_SequenceOfShape& OpenShells,
           aB.MakeShell(aNewSh);
           for(TopoDS_Iterator aIt1(aSeqCandidate.Value(k),Standard_False); aIt1.More(); aIt1.Next())
             aB.Add(aNewSh,aIt1.Value());
-          Standard_Integer isRev = MapOtherShells.Find(aSeqCandidate.Value(l));
+          Standard_Boolean isRev = MapOtherShells.Find(aSeqCandidate.Value(l));
           if(k !=1) {
-            isRev = ((isRev == MapOtherShells.Find(aSeqCandidate.Value(k))) ? 1 : 0);
+            isRev = (isRev == MapOtherShells.Find(aSeqCandidate.Value(k)));
           }
           for(TopExp_Explorer aExp(aSeqCandidate.Value(l),TopAbs_FACE); aExp.More(); aExp.Next()) {
             TopoDS_Shape aFace = (isRev ? aExp.Current().Reversed(): aExp.Current());
@@ -656,9 +656,8 @@ static void GlueClosedCandidate(TopTools_SequenceOfShape& OpenShells,
       TopoDS_Shape addShell;
       Standard_Boolean isReversed = Standard_False;
       for(Standard_Integer j1 = i+1 ; j1 <= OpenShells.Length();j1++ )  {
-        if(!MapOtherShells.IsBound(OpenShells.Value(j1))) continue;
+        if(!MapOtherShells.Find (OpenShells.Value(j1), isReversed)) continue;
         addShell = OpenShells.Value(j1);
-        isReversed = MapOtherShells.Find(addShell);
         OpenShells.Remove(j1);
         break;
       }
index 550d518ea27d452f6b0f944b8accdb3101688880..dbeacee53e36c0043af0bebfaf23566ee0d400fa 100644 (file)
@@ -587,9 +587,9 @@ TopoDS_Solid ShapeFix_Solid::SolidFromShell (const TopoDS_Shell& shell)
 //purpose  : 
 //=======================================================================
 
- Standard_Boolean ShapeFix_Solid::Status(const ShapeExtend_Status /*status*/) const
+Standard_Boolean ShapeFix_Solid::Status (const ShapeExtend_Status theStatus) const
 {
return myStatus;
 return ShapeExtend::DecodeStatus (myStatus, theStatus);
 }
 
 //=======================================================================
index 6d583648d603e5d635c31c08b51536c98530d1e5..59334cb7fb2b67d417dc498d59c769d3350ee217 100644 (file)
@@ -343,7 +343,7 @@ Standard_Boolean ShapeFix_Wire::Perform()
   if ( !Context().IsNull() )
     myFixEdge->SetContext( Context() );
 
-  Standard_Integer Fixed = Standard_False;
+  Standard_Boolean Fixed = Standard_False;
   
   // FixReorder is first, because as a rule wire is required to be ordered
   // We shall analyze the order of edges in the wire and set appropriate 
index 6c2a894a5a27713e37100887c57baf7884b57f14..055adbe140a57ebd832a7bdf424d0aa635413f18 100644 (file)
@@ -405,9 +405,9 @@ Handle(TopoDS_TShape) ShapePersistent_BRep::pTEdge::createTShape() const
   Handle(BRep_TEdge) aTEdge = new BRep_TEdge;
 
   aTEdge->Tolerance     (myTolerance);
-  aTEdge->SameParameter (myFlags & ParameterMask);
-  aTEdge->SameRange     (myFlags & RangeMask);
-  aTEdge->Degenerated   (myFlags & DegeneratedMask);
+  aTEdge->SameParameter ((myFlags & ParameterMask)   != 0);
+  aTEdge->SameRange     ((myFlags & RangeMask)       != 0);
+  aTEdge->Degenerated   ((myFlags & DegeneratedMask) != 0);
 
   myCurves->Import (aTEdge->ChangeCurves());
 
index 3d3defded8fe82d6e00636cbcdaef34f362fca52..fd67472680b574395d7a88cdff5696101359155e 100644 (file)
@@ -41,12 +41,12 @@ void ShapePersistent_TopoDS::pTBase::setFlags
   (const Handle(TopoDS_TShape)& theTShape) const
 {
   theTShape->Free       (Standard_False); // Always frozen when coming from DB
-  theTShape->Modified   (myFlags & ModifiedMask);
-  theTShape->Checked    (myFlags & CheckedMask);
-  theTShape->Orientable (myFlags & OrientableMask);
-  theTShape->Closed     (myFlags & ClosedMask);
-  theTShape->Infinite   (myFlags & InfiniteMask);
-  theTShape->Convex     (myFlags & ConvexMask);
+  theTShape->Modified   ((myFlags & ModifiedMask)   != 0);
+  theTShape->Checked    ((myFlags & CheckedMask)    != 0);
+  theTShape->Orientable ((myFlags & OrientableMask) != 0);
+  theTShape->Closed     ((myFlags & ClosedMask)     != 0);
+  theTShape->Infinite   ((myFlags & InfiniteMask)   != 0);
+  theTShape->Convex     ((myFlags & ConvexMask)     != 0);
 }
 
 static inline void AddShape
index aff1c02c7a0bcd1511b6bdff1d4c1f04eff65090..c14b453ba609afdecbd72fc7c415d6d581cb5fe4 100644 (file)
@@ -308,7 +308,7 @@ Standard_Boolean ShapeProcess_Context::GetBoolean (const Standard_CString param,
   if ( myRC.IsNull() ) return Standard_False;
   try {
     OCC_CATCH_SIGNALS
-    val = (Standard_Boolean)myRC->Integer ( MakeName ( myScope, param )->ToCString() );
+    val = myRC->Integer (MakeName (myScope, param)->ToCString()) != 0;
     return Standard_True;
   }
   catch (Standard_Failure) {
index a60900953492506654c88fe6348f2659f53f7caa..1387b55842654c23f4351b48ac3ffcab2b671a00 100644 (file)
@@ -143,7 +143,7 @@ static Standard_Boolean sameparam (const Handle(ShapeProcess_Context)& context)
   if ( ! ctx->Messages().IsNull() ) msg = new ShapeExtend_MsgRegistrator;
 
   ShapeFix::SameParameter ( ctx->Result(),
-                            ctx->IntegerVal ( "Force", Standard_False ),
+                            ctx->BooleanVal ( "Force", Standard_False ),
                             ctx->RealVal ( "Tolerance3d", Precision::Confusion() /* -1 */),
                             NULL, msg );
 
@@ -232,9 +232,9 @@ static Standard_Boolean bsplinerestriction (const Handle(ShapeProcess_Context)&
   Handle(ShapeExtend_MsgRegistrator) msg;
   if ( ! ctx->Messages().IsNull() ) msg = new ShapeExtend_MsgRegistrator;
 
-  Standard_Boolean ModeSurf  = ctx->IntegerVal ( "SurfaceMode", Standard_True );
-  Standard_Boolean ModeC3d   = ctx->IntegerVal ( "Curve3dMode", Standard_True );
-  Standard_Boolean ModeC2d   = ctx->IntegerVal ( "Curve2dMode", Standard_True );
+  Standard_Boolean ModeSurf  = ctx->BooleanVal ( "SurfaceMode", Standard_True );
+  Standard_Boolean ModeC3d   = ctx->BooleanVal ( "Curve3dMode", Standard_True );
+  Standard_Boolean ModeC2d   = ctx->BooleanVal ( "Curve2dMode", Standard_True );
 
   Standard_Real aTol3d = ctx->RealVal ( "Tolerance3d", 0.01 );
   Standard_Real aTol2d = ctx->RealVal ( "Tolerance2d", 1e-06 );
@@ -245,8 +245,8 @@ static Standard_Boolean bsplinerestriction (const Handle(ShapeProcess_Context)&
   Standard_Integer aMaxDeg = ctx->IntegerVal ( "RequiredDegree", 9 );
   Standard_Integer aMaxSeg = ctx->IntegerVal ( "RequiredNbSegments", 10000 );
   
-  Standard_Boolean ModeDeg  = ctx->IntegerVal ( "PreferDegree", Standard_True );
-  Standard_Boolean Rational = ctx->IntegerVal ( "RationalToPolynomial", Standard_False );
+  Standard_Boolean ModeDeg  = ctx->BooleanVal ( "PreferDegree", Standard_True );
+  Standard_Boolean Rational = ctx->BooleanVal ( "RationalToPolynomial", Standard_False );
   
   Handle(ShapeCustom_RestrictionParameters)   aParameters = new ShapeCustom_RestrictionParameters;
   ctx->GetInteger ( "MaxDegree",          aParameters->GMaxDegree() );
@@ -711,7 +711,7 @@ static Standard_Boolean fixshape (const Handle(ShapeProcess_Context)& context)
   sfs->FixVertexPositionMode() = ctx->IntegerVal ( "FixVertexPositionMode", 0 );
 
   sfs->FixSolidTool()->FixShellMode() = ctx->IntegerVal ( "FixShellMode", -1 );
-  sfs->FixSolidTool()->CreateOpenSolidMode() = ctx->IntegerVal ( "CreateOpenSolidMode", 1 );
+  sfs->FixSolidTool()->CreateOpenSolidMode() = ctx->BooleanVal ( "CreateOpenSolidMode", Standard_True );
 
   sfs->FixShellTool()->FixFaceMode() = ctx->IntegerVal ( "FixFaceMode", -1 );
 
index 4a794a8feefa9a92516afe27a233d4781fb520c6..d34e15635a48c4556373738191a1a57326d52193 100644 (file)
@@ -55,19 +55,19 @@ inline Standard_Boolean IsEqual(const Standard_Character One,
 // IsAlphabetic : Returns Standard_True if a character is alphabetic
 // ==================================================================
 inline Standard_Boolean IsAlphabetic(const Standard_Character me) 
-{ return std::isalpha ((unsigned char)me); }
+{ return std::isalpha ((unsigned char)me) != 0; }
 
 // ==================================================================
 // IsDigit : Returns Standard_True if a character is a digit
 // ==================================================================
 inline Standard_Boolean IsDigit(const Standard_Character me) 
-{ return std::isdigit ((unsigned char)me); }
+{ return std::isdigit ((unsigned char)me) != 0; }
 
 // ==================================================================
 // IsXDigit : Returns Standard_True if a character is a digit
 // ==================================================================
 inline Standard_Boolean IsXDigit(const Standard_Character me) 
-{ return std::isxdigit((unsigned char)me); }
+{ return std::isxdigit((unsigned char)me) != 0; }
 
 // ==================================================================
 // IsAlphanumeric : Returns Standard_True if a character is alphanumeric
@@ -79,26 +79,26 @@ inline Standard_Boolean IsAlphanumeric(const Standard_Character me)
 // IsControl : Returns Standard_True if a character  is a control character
 // ==================================================================
 inline Standard_Boolean IsControl(const Standard_Character me) 
-{ return std::iscntrl((unsigned char)me); }
+{ return std::iscntrl((unsigned char)me) != 0; }
 
 
 // ==================================================================
 // IsGraphic : Returns Standard_True if a character is graphic
 // ==================================================================
 inline Standard_Boolean IsGraphic(const Standard_Character me) 
-{ return std::isgraph((unsigned char)me); }
+{ return std::isgraph((unsigned char)me) != 0; }
 
 // ==================================================================
 // IsLowerCase : Returns Standard_True if a character is lowercase
 // ==================================================================
 inline Standard_Boolean IsLowerCase(const Standard_Character me) 
-{ return std::islower((unsigned char)me); }
+{ return std::islower((unsigned char)me) != 0; }
 
 // ==================================================================
 // IsPrintable : Returns Standard_True if a character is printable
 // ==================================================================
 inline Standard_Boolean IsPrintable(const Standard_Character me) 
-{ return std::isprint((unsigned char)me); }
+{ return std::isprint((unsigned char)me) != 0; }
 
 // ==================================================================
 // IsPunctuation : Returns Standard_True if a character is a graphic and 
@@ -111,13 +111,13 @@ inline Standard_Boolean IsPunctuation(const Standard_Character me)
 // IsSpace : Returns Standard_True if a character is a space
 // ==================================================================
 inline Standard_Boolean IsSpace(const Standard_Character me) 
-{ return std::isspace((unsigned char)me); }
+{ return std::isspace((unsigned char)me) != 0; }
 
 // ==================================================================
 // IsUppercase : Returns Standard_True if a character is uppercase
 // ==================================================================
 inline Standard_Boolean IsUpperCase(const Standard_Character me) 
-{ return std::isupper((unsigned char)me); }
+{ return std::isupper((unsigned char)me) != 0; }
 
 // ==================================================================
 // LowerCase : Returns a lowercase character
index 561069fa88f95624eb94076d669d38dfa5ff81a2..a57af06ff79b21940ae3edb159c26ab3cdd73bfd 100644 (file)
@@ -39,7 +39,7 @@ const Handle(Standard_Type)& Standard_Transient::DynamicType() const
 //
 Standard_Boolean Standard_Transient::IsInstance(const Handle(Standard_Type) &AType) const
 {
-  return (Standard_Boolean) (AType ==  DynamicType());
+  return (AType == DynamicType());
 }
 
 //
index fa3a6ad2192c11eeb0db4fb38f7333302dbb2d72..d8fbdf73c80c5326a4623b0edd4c4c4aeda00914 100755 (executable)
   #include <inttypes.h>
 #endif
 
-#define Standard_False (Standard_Boolean)0
-#define Standard_True  (Standard_Boolean)1
+#define Standard_False false
+#define Standard_True  true
 
 #include <Standard_Macro.hxx>
 
 typedef int           Standard_Integer;
 typedef double        Standard_Real;
-typedef unsigned int  Standard_Boolean;
+typedef bool          Standard_Boolean;
 typedef float         Standard_ShortReal;
 typedef char          Standard_Character;
 typedef unsigned char Standard_Byte;
index 52029b2f056f5366440e2ce04987afe2960d7d0e..b7c8008e65811f3574f10f9271a22ab1d77c09e1 100644 (file)
@@ -33,6 +33,14 @@ struct StdLPersistent_Collection::byteConverter
     { return static_cast<Standard_Byte> (theValue); }
 };
 
+struct StdLPersistent_Collection::boolConverter
+{
+  boolConverter (const Handle(TDF_Data)&) {}
+
+  Standard_Boolean operator() (Standard_Integer theValue) const
+    { return theValue != 0; }
+};
+
 struct StdLPersistent_Collection::stringConverter
 {
   stringConverter (const Handle(TDF_Data)&) {}
@@ -222,7 +230,7 @@ template class StdLPersistent_Collection::instance
   <StdLPersistent_Collection::listBase,
    StdLPersistent_Collection::integer,
    TDataStd_BooleanList,
-   StdLPersistent_Collection::noConversion>;
+   StdLPersistent_Collection::boolConverter>;
 
 template class StdLPersistent_Collection::instance
   <StdLPersistent_Collection::listBase,
index aebdab2865577eda344da477361890010f5e61f3..dd7e5fb90e0e8afcadf0c15fd1171fcf0812fa0c 100644 (file)
@@ -37,6 +37,7 @@ class StdLPersistent_Collection
   // Converters
   struct noConversion;
   struct byteConverter;
+  struct boolConverter;
   struct stringConverter;
   struct referenceConverter;
 
@@ -175,7 +176,7 @@ public:
   typedef listT <real, TDataStd_RealList>
     RealList;
 
-  typedef listT <integer, TDataStd_BooleanList>
+  typedef listT <integer, TDataStd_BooleanList, boolConverter>
     BooleanList;
 
   typedef listT <persistent, TDataStd_ExtStringList, stringConverter>
index 58b8b6f9d23bec344c8efa046d4105b5b184beb0..fe3814eb14541a89628cb3018477a811655faf39 100644 (file)
@@ -375,7 +375,7 @@ static void GetCartesianPoints ( const Handle(StepShape_EdgeCurve)& EC,
                                 gp_Pnt &P1, gp_Pnt &P2)
 {
   for ( Standard_Integer i=1; i<=2; i++ ) {
-    const Handle(StepShape_Vertex) V = ( (Standard_Boolean)(i==1) == EC->SameSense() ? EC->EdgeStart() : EC->EdgeEnd() );
+    const Handle(StepShape_Vertex) V = ((i == 1) == EC->SameSense() ? EC->EdgeStart() : EC->EdgeEnd() );
     const Handle(StepShape_VertexPoint) VP = Handle(StepShape_VertexPoint)::DownCast(V);
     if ( VP.IsNull() ) continue;
     const Handle(StepGeom_CartesianPoint) P = Handle(StepGeom_CartesianPoint)::DownCast(VP->VertexGeometry());
index a0dd633a353730efd070238798c1bf35976a941c..dc56eaceb7a00436cd11cdd3d3aefe7fb5e05490 100644 (file)
@@ -65,7 +65,7 @@ class TColStd_PackedMapOfInteger : private TCollection_BasicMap
   inline Standard_Integer Extent        () const
   { return Standard_Integer (myExtent); }
 
-  inline Standard_Integer IsEmpty       () const
+  inline Standard_Boolean IsEmpty       () const
   { return TCollection_BasicMap::IsEmpty(); }
 
   inline void             Statistics    (Standard_OStream& outStream) const
index b91480f8f783089aa69aba1140753af0d38e5b71..a4920c366e1f0f25a90e660d14de21b3c0057f1a 100644 (file)
@@ -230,7 +230,7 @@ void TDataStd_BooleanList::Restore(const Handle(TDF_Attribute)& With)
   TDataStd_ListIteratorOfListOfByte itr(aList->List());
   for (; itr.More(); itr.Next())
   {
-    myList.Append(itr.Value());
+    myList.Append (itr.Value() ? 1 : 0);
   }
 }
 
@@ -246,7 +246,7 @@ void TDataStd_BooleanList::Paste (const Handle(TDF_Attribute)& Into,
   TDataStd_ListIteratorOfListOfByte itr(myList);
   for (; itr.More(); itr.Next())
   {
-    aList->Append(itr.Value());
+    aList->Append (itr.Value() != 0);
   }
 }
 
index 4300afa4805bcbe11e2bbe1bb00ad6cd7fa9b7a8..34d3867f94fbc9faca577f0bee312975064abf2d 100644 (file)
@@ -13,7 +13,6 @@ TFunction_DriverTable.hxx
 TFunction_ExecutionStatus.hxx
 TFunction_Function.cxx
 TFunction_Function.hxx
-TFunction_Function.lxx
 TFunction_GraphNode.cxx
 TFunction_GraphNode.hxx
 TFunction_HArray1OfDataMapOfGUIDDriver.hxx
index ee82107c6fe57fce5226d243894620d7e1a94030..0d227729a11833673283d748ae69c348cca3a8c1 100644 (file)
@@ -63,27 +63,26 @@ public:
   Standard_EXPORT static const Standard_GUID& GetID();
   
   Standard_EXPORT TFunction_Function();
-  
+
   //! Returns the GUID for this function's driver.
-    const Standard_GUID& GetDriverGUID() const;
-  
+  const Standard_GUID& GetDriverGUID() const { return myDriverGUID; }
+
   //! Sets the driver for this function as that
   //! indentified by the GUID guid.
   Standard_EXPORT void SetDriverGUID (const Standard_GUID& guid);
-  
+
   //! Returns true if the execution failed
-    Standard_Boolean Failed() const;
-  
+  Standard_Boolean Failed() const { return myFailure != 0; }
+
   //! Sets the failed index.
   Standard_EXPORT void SetFailure (const Standard_Integer mode = 0);
-  
 
   //! Returns an index of failure if the execution of this function failed.
   //! If this integer value is 0, no failure has occurred.
   //! Implementation of Attribute methods:
   //! ===================================
-    Standard_Integer GetFailure() const;
-  
+  Standard_Integer GetFailure() const { return myFailure; }
+
   Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
   
   Standard_EXPORT virtual void Restore (const Handle(TDF_Attribute)& with) Standard_OVERRIDE;
@@ -96,30 +95,13 @@ public:
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
 
-
-
-
   DEFINE_STANDARD_RTTIEXT(TFunction_Function,TDF_Attribute)
 
-protected:
-
-
-
-
 private:
 
-
   Standard_GUID myDriverGUID;
   Standard_Integer myFailure;
 
-
 };
 
-
-#include <TFunction_Function.lxx>
-
-
-
-
-
 #endif // _TFunction_Function_HeaderFile
diff --git a/src/TFunction/TFunction_Function.lxx b/src/TFunction/TFunction_Function.lxx
deleted file mode 100644 (file)
index ca6e887..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-// Created on: 1999-06-11
-// Created by: Vladislav ROMASHKO
-// Copyright (c) 1999-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-inline const Standard_GUID& TFunction_Function::GetDriverGUID() const
-{
-  return myDriverGUID;
-}
-
-inline Standard_Boolean TFunction_Function::Failed() const
-{
-  return myFailure;
-}
-
-inline Standard_Integer TFunction_Function::GetFailure() const
-{
-  return myFailure;
-}
-
-
-
index 6d69b927d543be3eb7afd484c16e6ec097850b7f..210eef3d43abfe49508e2f9d0f0b1b8d06de2257 100644 (file)
@@ -1395,7 +1395,7 @@ void TObj_Object::SetFlags(const Standard_Integer theMask)
 Standard_Boolean TObj_Object::TestFlags(const Standard_Integer theMask) const
 {
   Standard_Integer aFlags = getInteger(DataTag_Flags);
-  return aFlags & theMask;
+  return (aFlags & theMask) != 0;
 }
 
 //=======================================================================
index 30c00a0ab48c16fcbc6c00551258f393c8a60704..36a8db520fd1634114718f5522f89cbdf224df62 100644 (file)
@@ -462,7 +462,7 @@ Standard_Integer VARSTOPOARGS(TestTopOpe_BOOP& PT,Standard_Integer& na,const cha
     else if (!strcmp(thea,"-c")) {
       suppressarg(na,a,ia);
       if (ia < na) {
-       VT.SetClear((Standard_Boolean)Draw::Atoi(a[ia]));
+       VT.SetClear (Draw::Atoi(a[ia]) != 0);
        suppressarg(na,a,ia);
       }
       else VT.SetClear(Standard_True);
@@ -563,7 +563,7 @@ Standard_Integer TOPOCOMMANDS(TestTopOpe_BOOP& PT,Standard_Integer na,const char
   
 #ifdef OCCT_DEBUG
   Standard_Boolean tend = TopOpeBRepTool_GettraceEND();
-  TopOpeBRepTool_SettraceEND(PT.ChangeVarsTopo().GetVerbose());
+  TopOpeBRepTool_SettraceEND(PT.ChangeVarsTopo().GetVerbose() != 0);
 #endif
 
   err = 0;
index 1c71c7def4636afbd86851dcb17e45127e2d20b8..5df87f741b9bb3d2fd0b705b246f6b5d1e395186 100644 (file)
@@ -268,21 +268,16 @@ static Standard_Boolean FUN_ProjectPoint(const gp_Pnt& P1,
   if ( C2.IsNull() ) {
     return Standard_False;
   }
-  Standard_Real res = Standard_False;
-  
+
   GeomAPI_ProjectPointOnCurve mydist(P1,C2,FC2,LC2);
   if ( mydist.Extrema().IsDone() ) {
     if ( mydist.NbPoints() ) {
       T2 = mydist.LowerDistanceParameter();
-      res = Standard_True;
+      return Standard_True;
     }
   }
-//#ifdef OCCT_DEBUG
-//  return res; // BUG ???
-//#else
-  return (Standard_Boolean ) res ;
-//#endif
 
+  return Standard_False;
 }
 
 // -------------------------------------------------
index 634f99a09578d6fb75e68dadb7222cb4d312894f..c9406b0a9724ff88c7b676696ca6b4ae841da069 100644 (file)
@@ -273,7 +273,7 @@ private:
   TopTools_ListOfShape myERL;
   TopTools_DataMapOfShapeListOfShape myDataforDegenEd;
   Standard_Boolean myLastVPison0;
-  Standard_Boolean mykeptVPnbr;
+  Standard_Integer mykeptVPnbr;
   Standard_Integer myDSCIndex;
   TopOpeBRepDS_ListOfInterference myDSCIL;
   TopOpeBRep_PointClassifier myPointClassifier;
index 8f96eecf327236dbb7321eeaf5fd11933bf61b21..f86f050b05d159adcc18e679ea366f5f838891b5 100644 (file)
@@ -1152,7 +1152,7 @@ Standard_Boolean TopOpeBRep_FacesFiller::GetFFGeometry(const TopOpeBRepDS_Point&
 Standard_Boolean TopOpeBRep_FacesFiller::GetFFGeometry(const TopOpeBRep_VPointInter& VP,TopOpeBRepDS_Kind& K,Standard_Integer& G) const 
 {
   TopOpeBRepDS_Point DSP = TopOpeBRep_PointGeomTool::MakePoint(VP);
-  Standard_Integer found = GetFFGeometry(DSP,K,G);
+  Standard_Boolean found = GetFFGeometry(DSP,K,G);
   return found;
 }
 
index 87681269e9523de1ef00122ced26f37f634e4aa6..ec9a80e3901699e1e9df405d78f86cdb5f73e6d6 100644 (file)
@@ -115,7 +115,9 @@ Standard_EXPORT Standard_Integer TopOpeBRep_SettraceNVP(const Standard_Boolean b
 }
 
 Standard_EXPORT Standard_Boolean TopOpeBRep_GettraceNVP(Standard_Integer n,char**a)
-{ Standard_Integer b = BOOPNVP.Get(n,a); return b; }
+{
+  return BOOPNVP.Get(n,a);
+}
 
 Standard_EXPORT Standard_Boolean TopOpeBRep_GettraceNVP(Standard_Integer i1,Standard_Integer i2,Standard_Integer i3,Standard_Integer i4,Standard_Integer i5)
 {
@@ -135,12 +137,14 @@ Standard_EXPORT Standard_Integer TopOpeBRep_SettraceSHA(const Standard_Boolean b
 }
 
 Standard_EXPORT Standard_Boolean TopOpeBRep_GettraceSHA(Standard_Integer n,char**a)
-{ Standard_Integer b = BOOPSHA.Get(n,a); return b; }
+{
+  return BOOPSHA.Get(n,a);
+}
 
 Standard_EXPORT Standard_Boolean TopOpeBRep_GettraceSHA(const Standard_Integer i1)
 {
   char* t[1]; t[0]=AS(i1);
-  Standard_Boolean b = BOOPSHA.Get(1,t);return b;
+  return BOOPSHA.Get(1,t);
 }
 
 // #ifdef OCCT_DEBUG
index 6cd28ac533a3067bb70ef658edc3c25ef3ec68b1..2addf5280e1f788cd3969fca84684a18fd49d9dc 100644 (file)
@@ -619,7 +619,7 @@ void TopOpeBRep_FacesFiller::ProcessVPonR
 {
   Standard_Integer absindex = VP.ShapeIndex(); // 0,1,2,3
   Standard_Integer iVP = VP.Index();
-  Standard_Boolean OOShapeIndex = (ShapeIndex == 1) ? 2 : 1;
+  Standard_Integer OOShapeIndex = (ShapeIndex == 1) ? 2 : 1;
   Standard_Boolean on2edges = (absindex == 3);
   Standard_Boolean hasONedge = (VP.State(OOShapeIndex) == TopAbs_ON);
   Standard_Boolean hasOOedge = (on2edges) ? Standard_True : hasONedge;
index 629e78e7887808d535e39020cce602531f0b687e..0866e75a71d511dd67a691e556cbb355daa076c3 100644 (file)
@@ -170,7 +170,7 @@ void TopOpeBRep_FacesFiller::ProcessVPonclosingR(const TopOpeBRep_VPointInter& V
 //  Standard_Boolean isvertex = VP.IsVertex(ShapeIndex);
   Standard_Boolean isvertex = (PVKind == TopOpeBRepDS_VERTEX);
   Standard_Integer absindex = VP.ShapeIndex(); // 0,1,2,3
-  Standard_Boolean OOShapeIndex = (ShapeIndex == 1) ? 2 : 1;
+  Standard_Integer OOShapeIndex = (ShapeIndex == 1) ? 2 : 1;
   Standard_Boolean on2edges = (absindex == 3);
   Standard_Boolean hasONedge = (VP.State(OOShapeIndex) == TopAbs_ON);
   Standard_Boolean hasOOedge = (on2edges) ? Standard_True : hasONedge;
index 35e12a588c3e324f0dbc8017967771200001d78d..720817dd8849dd740e1f3fd31b383ead8b3beab5 100644 (file)
@@ -502,12 +502,9 @@ Standard_Boolean TopOpeBRepBuild_Builder::Reverse(const TopAbs_State ToBuild1,co
 //=======================================================================
 TopAbs_Orientation TopOpeBRepBuild_Builder::Orient(const TopAbs_Orientation Ori,const Standard_Boolean Reverse)
 {
-  TopAbs_Orientation result=TopAbs_FORWARD;
-  switch (Reverse) {
-    case Standard_True  : result = TopAbs::Complement(Ori); break;
-    case Standard_False : result = Ori; break;
-  }
-  return result;
+  return !Reverse
+       ? Ori
+       : TopAbs::Complement(Ori);
 }
 
 //=======================================================================
index aa7a0dd3d65c43cb343be1e50ff33b21f8f13a50..72f1f242655a89063c3442a054df7b13c12200f6 100644 (file)
@@ -555,9 +555,8 @@ void TopOpeBRepBuild_Builder1::GFillFaceSameDomSFS(const TopoDS_Shape& FOR,
     Standard_Boolean rev = Standard_False;
     for(Standard_Integer i = 1; i <= aEM.Extent(); i++) {
       const TopoDS_Shape& anEdge = aEM(i);
-      if(myMapOfEdgeWithFaceState.IsBound(anEdge)) {
-       rev = (Standard_Boolean)myMapOfEdgeWithFaceState.Find(anEdge);
-       break;
+      if (myMapOfEdgeWithFaceState.Find (anEdge, rev)) {
+        break;
       }
     }
     if(OrigRev)
@@ -671,7 +670,7 @@ void TopOpeBRepBuild_Builder1::GFillFaceSameDomWES(const TopoDS_Shape& FOR1,
              WES.AddStartElement(EOR);
            }
            
-           myMapOfEdgeWithFaceState.Bind(EOR, (Standard_Integer)stateOfFaceOri); 
+           myMapOfEdgeWithFaceState.Bind (EOR, stateOfFaceOri);
          }
 
          if(!UseEdges) {
@@ -740,7 +739,7 @@ void TopOpeBRepBuild_Builder1::GFillWireSameDomWES(const TopoDS_Shape& W,
 
        OrientateEdgeOnFace(TopoDS::Edge(EOR), TopoDS::Face(myBaseFaceToFill), 
                            TopoDS::Face(mySDFaceToFill), G1, stateOfFaceOri);
-       myMapOfEdgeWithFaceState.Bind(EOR, (Standard_Integer)stateOfFaceOri);
+       myMapOfEdgeWithFaceState.Bind (EOR, stateOfFaceOri);
        WES.AddElement(EOR);
       }
     }
@@ -796,7 +795,7 @@ void TopOpeBRepBuild_Builder1::GFillEdgeSameDomWES(const TopoDS_Shape& EOR,
     Standard_Boolean stateOfFaceOri = Standard_False;
     OrientateEdgeOnFace(newE, TopoDS::Face(myBaseFaceToFill), 
                        TopoDS::Face(mySDFaceToFill), G1, stateOfFaceOri);
-    myMapOfEdgeWithFaceState.Bind(newE, (Standard_Integer)stateOfFaceOri);
+    myMapOfEdgeWithFaceState.Bind (newE, stateOfFaceOri);
 
     WES.AddStartElement(newE);
   }
@@ -849,7 +848,7 @@ void TopOpeBRepBuild_Builder1::GFillEdgeSameDomWES(const TopoDS_Shape& EOR,
          if(!IsRev)
            aPieceToKeep.Reverse();
 
-         myMapOfEdgeWithFaceState.Bind(aPieceToKeep, (Standard_Integer)stateOfFaceOri);
+         myMapOfEdgeWithFaceState.Bind (aPieceToKeep, stateOfFaceOri);
 
          WES.AddStartElement(aPieceToKeep);
        }
@@ -980,7 +979,7 @@ void TopOpeBRepBuild_Builder1::GFillEdgeSameDomWES(const TopoDS_Shape& EOR,
        Standard_Boolean stateOfFaceOri = Standard_False;
        OrientateEdgeOnFace(aSplitPart, TopoDS::Face(myBaseFaceToFill), 
                            TopoDS::Face(mySDFaceToFill), G1, stateOfFaceOri);
-       myMapOfEdgeWithFaceState.Bind(aSplitPart, (Standard_Integer)stateOfFaceOri);
+       myMapOfEdgeWithFaceState.Bind (aSplitPart, stateOfFaceOri);
        
        WES.AddStartElement(aSplitPart);        
       }
@@ -1003,7 +1002,7 @@ void TopOpeBRepBuild_Builder1::GFillEdgeSameDomWES(const TopoDS_Shape& EOR,
       //compute orientation of the future face
       Standard_Boolean stateOfFaceOri = Standard_False;
       OrientateEdgeOnFace(aSplitPart, TopoDS::Face(myBaseFaceToFill), aSDFace, G1, stateOfFaceOri);
-      myMapOfEdgeWithFaceState.Bind(aSplitPart, (Standard_Integer)stateOfFaceOri);
+      myMapOfEdgeWithFaceState.Bind (aSplitPart, stateOfFaceOri);
 
       if(myBaseFaceToFill == mySDFaceToFill) {
        mySourceShapes.Add(aSplitPart);
@@ -1179,7 +1178,7 @@ void TopOpeBRepBuild_Builder1::PerformONParts(const TopoDS_Shape& FOR1,
        }
        newE.Orientation(neworiE);
 
-       myMapOfEdgeWithFaceState.Bind(newE, (Standard_Integer)stateOfFaceOri);
+       myMapOfEdgeWithFaceState.Bind (newE, stateOfFaceOri);
        WES.AddStartElement(newE);
       }
     }//end iteration on splON
index ec2183077ebcea2203cf35d566a977a574886158..1f9e1f7afcbd014de58e5d62fc3952727ba5dc89 100644 (file)
@@ -134,26 +134,17 @@ protected:
 
 private:
 
-
-
   TopTools_IndexedMapOfShape mySameDomMap;
   TopoDS_Shape mySDFaceToFill;
   TopoDS_Shape myBaseFaceToFill;
   TopTools_IndexedDataMapOfShapeListOfShape myMapOfEdgeFaces;
-  TopTools_DataMapOfOrientedShapeInteger myMapOfEdgeWithFaceState;
+  NCollection_DataMap<TopoDS_Shape, Standard_Boolean, TopTools_OrientedShapeMapHasher> myMapOfEdgeWithFaceState;
   TopTools_IndexedMapOfShape myProcessedPartsOut2d;
   TopTools_IndexedMapOfShape myProcessedPartsON2d;
   TopTools_IndexedMapOfShape mySplitsONtoKeep;
   TopTools_IndexedMapOfOrientedShape mySourceShapes;
   TopTools_IndexedDataMapOfShapeShape myMapOfCorrect2dEdges;
 
-
 };
 
-
-
-
-
-
-
 #endif // _TopOpeBRepBuild_Builder1_HeaderFile
index c86ffef7495b35bb30557e25c8dbf65937010ed6..0bdaa8879b7e1d24449666aa957586561687b257 100644 (file)
@@ -26,9 +26,9 @@
 TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GFusUnsh
 (const TopAbs_ShapeEnum t1, const TopAbs_ShapeEnum t2)
 {
-  return TopOpeBRepBuild_GTopo(0,0,0,
-                              0,0,1,
-                              0,1,0,
+  return TopOpeBRepBuild_GTopo(false, false, false,
+                              false, false, true,
+                              false, true,  false,
                               t1,t2,
                               TopOpeBRepDS_UNSHGEOMETRY,TopOpeBRepDS_UNSHGEOMETRY);
 }
@@ -41,9 +41,9 @@ TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GFusUnsh
 TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GFusSame
 (const TopAbs_ShapeEnum t1, const TopAbs_ShapeEnum t2)
 {
-  return TopOpeBRepBuild_GTopo(0,0,0,
-                              0,1,1,
-                              0,1,0,
+  return TopOpeBRepBuild_GTopo(false, false, false,
+                              false, true, true,
+                              false, true, false,
                               t1,t2,
                               TopOpeBRepDS_SAMEORIENTED,TopOpeBRepDS_SAMEORIENTED);
 }
@@ -56,9 +56,9 @@ TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GFusSame
 TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GFusDiff
 (const TopAbs_ShapeEnum t1, const TopAbs_ShapeEnum t2)
 {
-  return TopOpeBRepBuild_GTopo(0,0,0,
-                              0,0,1,
-                              0,1,0,
+  return TopOpeBRepBuild_GTopo(false, false, false,
+                              false, false, true,
+                              false, true,  false,
                               t1,t2,
                               TopOpeBRepDS_DIFFORIENTED,TopOpeBRepDS_SAMEORIENTED);
 }
@@ -71,9 +71,9 @@ TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GFusDiff
 TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GCutUnsh
 (const TopAbs_ShapeEnum t1, const TopAbs_ShapeEnum t2)
 {
-  return TopOpeBRepBuild_GTopo(0,1,0,
-                              0,0,1,
-                              0,0,0,
+  return TopOpeBRepBuild_GTopo(false, true, false,
+                              false, false, true,
+                              false, false, false,
                               t1,t2,
                               TopOpeBRepDS_UNSHGEOMETRY,TopOpeBRepDS_UNSHGEOMETRY);
 }
@@ -86,9 +86,9 @@ TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GCutUnsh
 TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GCutSame
 (const TopAbs_ShapeEnum t1, const TopAbs_ShapeEnum t2)
 {
-  return TopOpeBRepBuild_GTopo(0,1,0,
-                              0,0,1,
-                              0,0,0,
+  return TopOpeBRepBuild_GTopo(false, true, false,
+                              false, false, true,
+                              false, false, false,
                               t1,t2,
                               TopOpeBRepDS_SAMEORIENTED,TopOpeBRepDS_SAMEORIENTED);
 }
@@ -101,9 +101,9 @@ TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GCutSame
 TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GCutDiff
 (const TopAbs_ShapeEnum t1, const TopAbs_ShapeEnum t2)
 {
-  return TopOpeBRepBuild_GTopo(0,1,0,
-                              0,1,1,
-                              0,0,0,
+  return TopOpeBRepBuild_GTopo(false, true, false,
+                              false, true,  true,
+                              false, false, false,
                               t1,t2,
                               TopOpeBRepDS_DIFFORIENTED,TopOpeBRepDS_SAMEORIENTED);
 }
@@ -117,9 +117,9 @@ TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GCutDiff
 TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GComUnsh
 (const TopAbs_ShapeEnum t1, const TopAbs_ShapeEnum t2)
 {
-  return TopOpeBRepBuild_GTopo(0,1,0,
-                              1,0,0,
-                              0,0,0,
+  return TopOpeBRepBuild_GTopo(false, true, false,
+                              true,  false, false,
+                              false, false, false,
                               t1,t2,
                               TopOpeBRepDS_UNSHGEOMETRY,TopOpeBRepDS_UNSHGEOMETRY);
 }
@@ -132,9 +132,9 @@ TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GComUnsh
 TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GComSame
 (const TopAbs_ShapeEnum t1, const TopAbs_ShapeEnum t2)
 {
-  return TopOpeBRepBuild_GTopo(0,1,0,
-                              1,1,0,
-                              0,0,0,
+  return TopOpeBRepBuild_GTopo(false, true, false,
+                              true,  true,  false,
+                              false, false, false,
                               t1,t2,
                               TopOpeBRepDS_SAMEORIENTED,TopOpeBRepDS_SAMEORIENTED);
 }
@@ -147,9 +147,9 @@ TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GComSame
 TopOpeBRepBuild_GTopo TopOpeBRepBuild_GTool::GComDiff
 (const TopAbs_ShapeEnum t1, const TopAbs_ShapeEnum t2)
 {
-  return TopOpeBRepBuild_GTopo(0,1,0,
-                              1,0,0,
-                              0,0,0,
+  return TopOpeBRepBuild_GTopo(false, true, false,
+                              true,  false, false,
+                              false, false, false,
                               t1,t2,
                               TopOpeBRepDS_DIFFORIENTED,TopOpeBRepDS_SAMEORIENTED);
 }
index bed27733d4799b711a1b3844187446fe1e7a205c..734f7995b6a3afec97f00bed82e3918467a33193 100644 (file)
@@ -36,16 +36,16 @@ TopOpeBRepBuild_GTopo::TopOpeBRepBuild_GTopo()
 //=======================================================================
 
 TopOpeBRepBuild_GTopo::TopOpeBRepBuild_GTopo
-(const Standard_Integer ii,const Standard_Integer in,const Standard_Integer io,
- const Standard_Integer ni,const Standard_Integer nn,const Standard_Integer no,
- const Standard_Integer oi,const Standard_Integer on,const Standard_Integer oo,
+(const Standard_Boolean ii,const Standard_Boolean in,const Standard_Boolean io,
+ const Standard_Boolean ni,const Standard_Boolean nn,const Standard_Boolean no,
+ const Standard_Boolean oi,const Standard_Boolean on,const Standard_Boolean oo,
  const TopAbs_ShapeEnum t1, const TopAbs_ShapeEnum t2,
  const TopOpeBRepDS_Config C1, const TopOpeBRepDS_Config C2)
 {
   Reset();
-  Set((Standard_Boolean)ii,(Standard_Boolean)in,(Standard_Boolean)io,
-      (Standard_Boolean)ni,(Standard_Boolean)nn,(Standard_Boolean)no,  
-      (Standard_Boolean)oi,(Standard_Boolean)on,(Standard_Boolean)oo);
+  Set (ii, in, io,
+       ni, nn, no,
+       oi, on, oo);
   myt1 = t1; 
   myt2 = t2;
   myConfig1 = C1;
index dcbd6c7712a1ffa504652fb8df53ceb96b691bab..13ecd5112be9a0ac15f42a043b2904387034d64b 100644 (file)
@@ -40,8 +40,12 @@ public:
   
   Standard_EXPORT TopOpeBRepBuild_GTopo();
   
-  Standard_EXPORT TopOpeBRepBuild_GTopo(const Standard_Integer II, const Standard_Integer IN, const Standard_Integer IO, const Standard_Integer NI, const Standard_Integer NN, const Standard_Integer NO, const Standard_Integer OI, const Standard_Integer ON, const Standard_Integer OO, const TopAbs_ShapeEnum t1, const TopAbs_ShapeEnum t2, const TopOpeBRepDS_Config C1, const TopOpeBRepDS_Config C2);
-  
+  Standard_EXPORT TopOpeBRepBuild_GTopo (const Standard_Boolean II, const Standard_Boolean IN, const Standard_Boolean IO,
+                                         const Standard_Boolean NI, const Standard_Boolean NN, const Standard_Boolean NO,
+                                         const Standard_Boolean OI, const Standard_Boolean ON, const Standard_Boolean OO,
+                                         const TopAbs_ShapeEnum t1, const TopAbs_ShapeEnum t2,
+                                         const TopOpeBRepDS_Config C1, const TopOpeBRepDS_Config C2);
+
   Standard_EXPORT void Reset();
   
   Standard_EXPORT void Set (const Standard_Boolean II, const Standard_Boolean IN, const Standard_Boolean IO, const Standard_Boolean NI, const Standard_Boolean NN, const Standard_Boolean NO, const Standard_Boolean OI, const Standard_Boolean ON, const Standard_Boolean OO);
index df55f1ad5c80f731829042b57d3c000e67ace60a..c1349e18f5672881c9dc91fbfa591f209b5db843 100644 (file)
@@ -297,7 +297,7 @@ static Standard_Boolean FUN_changev(const Handle(TopOpeBRepDS_HDataStructure)& H
   if (!changev) return Standard_False;
   changev = HDS->HasSameDomain(v);
   if (!changev) return Standard_False;
-  Standard_Boolean rankv = HDS->DS().AncestorRank(v);
+  Standard_Integer rankv = HDS->DS().AncestorRank(v);
   changev = (rankv == 2);
   return changev;
 }
@@ -1113,14 +1113,11 @@ Standard_Integer TopOpeBRepBuild_Builder::KPisfafa()
 /*#ifdef OCCT_DEBUG
   Standard_Boolean TKPB = TopOpeBRepBuild_GettraceKPB();
 #endif*/
-  
-  Standard_Boolean iskp1 = KPisfafash(myShape1);
-  if ( !iskp1 ) return 0;
-  
-  Standard_Boolean iskp2 = KPisfafash(myShape2);
-  if ( !iskp2 ) return 0;
-  
-  return 1;
+
+  return KPisfafash(myShape1) != 0
+      && KPisfafash(myShape2) != 0
+       ? 1
+       : 0;
 }
 
 //=======================================================================
@@ -1133,14 +1130,11 @@ Standard_Integer TopOpeBRepBuild_Builder::KPissoso()
 /*#ifdef OCCT_DEBUG
   Standard_Boolean TKPB = TopOpeBRepBuild_GettraceKPB();
 #endif*/
-  
-  Standard_Boolean iskp1 = KPissososh(myShape1);
-  if ( !iskp1 ) return 0;
-  
-  Standard_Boolean iskp2 = KPissososh(myShape2);
-  if ( !iskp2 ) return 0;
-  
-  return 1;
+
+  return KPissososh(myShape1) != 0
+      && KPissososh(myShape2) != 0
+       ? 1
+       : 0;
 }
 
 //=======================================================================
index 537d1d853a0a22bec9e4b9d6fa23a5cedbe90a20..aa7d49af3e96c000a18c64da57d520ab8db2227f 100644 (file)
@@ -137,18 +137,18 @@ Standard_EXPORT Standard_Boolean FUN_ds_GetTr(
   
   TopOpeBRepDS_ListOfInterference l1dFOR,l1dREV,l1dINT,l1dEXT; Standard_Integer FOR1d,REV1d,INT1d,EXT1d;
   ::FUN_scanloi(l1d, l1dFOR,FOR1d, l1dREV,REV1d, l1dINT,INT1d, l1dEXT,EXT1d);
-  Standard_Boolean beforeIN1d = (REV1d + INT1d > 0); Standard_Boolean beforeOU1d = (FOR1d + EXT1d)
-  Standard_Boolean afterIN1d  = (FOR1d + INT1d > 0);   Standard_Boolean afterOU1d = (REV1d + EXT1d);  
+  Standard_Boolean beforeIN1d = (REV1d + INT1d > 0); Standard_Boolean beforeOU1d = (FOR1d + EXT1d) != 0;
+  Standard_Boolean afterIN1d  = (FOR1d + INT1d > 0); Standard_Boolean afterOU1d  = (REV1d + EXT1d) != 0;
   
   TopOpeBRepDS_ListOfInterference l2dFOR,l2dREV,l2dINT,l2dEXT; Standard_Integer FOR2d,REV2d,INT2d,EXT2d;
   ::FUN_scanloi(l2d, l2dFOR,FOR2d, l2dREV,REV2d, l2dINT,INT2d, l2dEXT,EXT2d);
-  Standard_Boolean beforeIN2d = (REV2d + INT2d > 0); Standard_Boolean beforeOU2d = (FOR2d + EXT2d)
-  Standard_Boolean afterIN2d  = (FOR2d + INT2d > 0);   Standard_Boolean afterOU2d = (REV2d + EXT2d);  
+  Standard_Boolean beforeIN2d = (REV2d + INT2d > 0); Standard_Boolean beforeOU2d = (FOR2d + EXT2d) != 0;
+  Standard_Boolean afterIN2d  = (FOR2d + INT2d > 0); Standard_Boolean afterOU2d  = (REV2d + EXT2d) != 0;
 
   TopOpeBRepDS_ListOfInterference l3dFOR,l3dREV,l3dINT,l3dEXT; Standard_Integer FOR3d,REV3d,INT3d,EXT3d;
   ::FUN_scanloi(l3d, l3dFOR,FOR3d, l3dREV,REV3d, l3dINT,INT3d, l3dEXT,EXT3d);
-  Standard_Boolean beforeIN3d = (REV3d + INT3d > 0); Standard_Boolean beforeOU3d = (FOR3d + EXT3d)
-  Standard_Boolean afterIN3d  = (FOR3d + INT3d > 0);   Standard_Boolean afterOU3d = (REV3d + EXT3d);  
+  Standard_Boolean beforeIN3d = (REV3d + INT3d > 0); Standard_Boolean beforeOU3d = (FOR3d + EXT3d) != 0;
+  Standard_Boolean afterIN3d  = (FOR3d + INT3d > 0); Standard_Boolean afterOU3d  = (REV3d + EXT3d) != 0;
 
   // state before
   stb = TopAbs_UNKNOWN; isb=0; bdim=0;
index 508683468ee35a72aa3fdd77ddca3df93f7119af..4e49eb7326aea9eec7b5512ef0105a41b3befa6d 100644 (file)
@@ -49,7 +49,7 @@ Standard_EXPORT void FDS_repvg2
   Standard_Boolean ispoint  = (GT == TopOpeBRepDS_POINT);
   Standard_Boolean isvertex = (GT == TopOpeBRepDS_VERTEX);
 
-  Standard_Boolean nLI = LI.Extent();
+  Standard_Integer nLI = LI.Extent();
 
   TopOpeBRepDS_ListIteratorOfListOfInterference it1(LI);
   while (it1.More()) {
index bc7552fc804e20bc2db5ef1b26d38713d0013585..9852dfb9e60ce5f957dd566e5b18067eb252280c 100644 (file)
@@ -89,7 +89,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
   aTool.SetCurrentEdge(aEdge);
 
   // [BEGIN] Processing non-manifold topology (ssv; 11.11.2010)
-  Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold");
+  Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0;
   if (isNMMode) {
     Handle(StepShape_EdgeCurve) anEC;
     Handle(TransferBRep_ShapeMapper) aSTEPMapper = TransferBRep::ShapeMapper(FP, aEdge);
index 9a63230fb431ee90b47035ec82633e603196a149..38f7f94d23ece66d4c682325328afd5864af825f 100644 (file)
@@ -125,7 +125,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace,
     new TransferBRep_ShapeMapper(aFace);  // on ne sait jamais
 
   // [BEGIN] Processing non-manifold topology (another approach) (ssv; 10.11.2010)
-  Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold");
+  Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0;
   if (isNMMode) {
     Handle(StepShape_AdvancedFace) anAF;
     Handle(TransferBRep_ShapeMapper) aSTEPMapper = TransferBRep::ShapeMapper(FP, aFace);
index 73d3ba50688884fb44ea794b764072680d1385c2..d3b7dc37fa5ce1424f64391499d4ceebda2a44a8 100644 (file)
@@ -62,7 +62,7 @@ void TopoDSToStep_MakeStepVertex::Init(const TopoDS_Vertex& aVertex,
   aTool.SetCurrentVertex(aVertex);
 
   // [BEGIN] Processing non-manifold topology (ssv; 11.11.2010)
-  Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold");
+  Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0;
   if (isNMMode) {
     Handle(StepShape_VertexPoint) aVP;
     Handle(TransferBRep_ShapeMapper) aSTEPMapper = TransferBRep::ShapeMapper(FP, aVertex);
index 69d747e45c0120a7e9cab1fd69de5afb75335c9b..f975daf866f0648d551bcbd44981db527f29b261 100644 (file)
@@ -1043,42 +1043,46 @@ static Standard_Integer VDump (Draw_Interpretor& theDI,
   return 0;
 }
 
-//==============================================================================
-//function : Displays,Erase...
-//purpose  :
-//Draw arg :
-//==============================================================================
-static int VwrTst_DispErase(const Handle(AIS_InteractiveObject)& IO,
-                           const Standard_Integer Mode,
-                           const Standard_Integer TypeOfOperation,
-                           const Standard_Boolean Upd)
+enum TypeOfDispOperation
 {
-  Handle(AIS_InteractiveContext) Ctx = ViewerTest::GetAISContext();
+  TypeOfDispOperation_SetDispMode,
+  TypeOfDispOperation_UnsetDispMode
+};
 
-  switch(TypeOfOperation){
-  case 1:
-    Ctx->Display(IO,Mode,Upd);
-    break;
-  case 2:{
-    Ctx->Erase(IO,Upd);
-    break;
-  }
-  case 3:{
-    if(IO.IsNull())
-      Ctx->SetDisplayMode((AIS_DisplayMode)Mode,Upd);
-    else
-      Ctx->SetDisplayMode(IO,Mode,Upd);
-    break;
-  }
-  case 4:{
-    if(IO.IsNull())
-      Ctx->SetDisplayMode(0,Upd);
-    else
-      Ctx->UnsetDisplayMode(IO,Upd);
-    break;
-  }
+//! Displays,Erase...
+static void VwrTst_DispErase (const Handle(AIS_InteractiveObject)& thePrs,
+                                               const Standard_Integer theMode,
+                                               const TypeOfDispOperation theType,
+                                               const Standard_Boolean theToUpdate)
+{
+  Handle(AIS_InteractiveContext) aCtx = ViewerTest::GetAISContext();
+  switch (theType)
+  {
+    case TypeOfDispOperation_SetDispMode:
+    {
+      if (!thePrs.IsNull())
+      {
+        aCtx->SetDisplayMode (thePrs, theMode, theToUpdate);
+      }
+      else
+      {
+        aCtx->SetDisplayMode ((AIS_DisplayMode )theMode, theToUpdate);
+      }
+      break;
+    }
+    case TypeOfDispOperation_UnsetDispMode:
+    {
+      if (!thePrs.IsNull())
+      {
+        aCtx->UnsetDisplayMode (thePrs, theToUpdate);
+      }
+      else
+      {
+        aCtx->SetDisplayMode (AIS_WireFrame, theToUpdate);
+      }
+      break;
+    }
   }
-  return 0;
 }
 
 //=======================================================================
@@ -1087,65 +1091,73 @@ static int VwrTst_DispErase(const Handle(AIS_InteractiveObject)& IO,
 //=======================================================================
 static int VDispMode (Draw_Interpretor& , Standard_Integer argc, const char** argv)
 {
-
-  TCollection_AsciiString name;
-  if(argc>3)
+  if (argc < 1
+   || argc > 3)
+  {
+    std::cout << "Syntax error: wrong number of arguments\n";
     return 1;
-  // display others presentations
-  Standard_Integer TypeOfOperation = (strcasecmp(argv[0],"vdispmode")==0)? 1:
-    (strcasecmp(argv[0],"verasemode")==0) ? 2 :
-      (strcasecmp(argv[0],"vsetdispmode")==0) ? 3 :
-       (strcasecmp(argv[0],"vunsetdispmode")==0) ? 4 : -1;
-
-  Handle(AIS_InteractiveContext) Ctx = ViewerTest::GetAISContext();
+  }
 
-  //unset displaymode.. comportement particulier...
-  if(TypeOfOperation==4){
-    if(argc==1){
-      if(Ctx->NbSelected()==0){
-       Handle(AIS_InteractiveObject) IO;
-       VwrTst_DispErase(IO,-1,4,Standard_False);
+  TypeOfDispOperation aType = TCollection_AsciiString (argv[0]) == "vunsetdispmode"
+                            ? TypeOfDispOperation_UnsetDispMode
+                            : TypeOfDispOperation_SetDispMode;
+  Handle(AIS_InteractiveContext) aCtx = ViewerTest::GetAISContext();
+  if (aType == TypeOfDispOperation_UnsetDispMode)
+  {
+    if (argc == 1)
+    {
+      if (aCtx->NbSelected() == 0)
+      {
+        VwrTst_DispErase (Handle(AIS_InteractiveObject)(), -1, TypeOfDispOperation_UnsetDispMode, Standard_False);
+      }
+      else
+      {
+        for (aCtx->InitSelected(); aCtx->MoreSelected(); aCtx->NextSelected())
+        {
+          VwrTst_DispErase (aCtx->SelectedInteractive(), -1, TypeOfDispOperation_UnsetDispMode, Standard_False);
+        }
       }
-      else{
-       for(Ctx->InitSelected();Ctx->MoreSelected();Ctx->NextSelected())
-         VwrTst_DispErase(Ctx->SelectedInteractive(),-1,4,Standard_False);}
-      Ctx->UpdateCurrentViewer();
+      aCtx->UpdateCurrentViewer();
     }
-    else{
-      Handle(AIS_InteractiveObject) IO;
-      name = argv[1];
-      if(GetMapOfAIS().IsBound2(name)){
-       IO = Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(name));
-        if (!IO.IsNull())
-          VwrTst_DispErase(IO,-1,4,Standard_True);
+    else
+    {
+      TCollection_AsciiString aName = argv[1];
+      if (GetMapOfAIS().IsBound2 (aName))
+      {
+        Handle(AIS_InteractiveObject) aPrs = Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2 (aName));
+        if (!aPrs.IsNull())
+        {
+          VwrTst_DispErase (aPrs, -1, TypeOfDispOperation_UnsetDispMode, Standard_True);
+        }
       }
     }
   }
-  else if(argc==2){
-    Standard_Integer Dmode = Draw::Atoi(argv[1]);
-    if(Ctx->NbSelected()==0 && TypeOfOperation==3){
-      Handle(AIS_InteractiveObject) IO;
-      VwrTst_DispErase(IO,Dmode,TypeOfOperation,Standard_True);
-    }
-    if(!Ctx->HasOpenedContext()){
-      // set/unset display mode sur le Contexte...
-      for(Ctx->InitSelected();Ctx->MoreSelected();Ctx->NextSelected()){
-       VwrTst_DispErase(Ctx->SelectedInteractive(),Dmode,TypeOfOperation,Standard_False);
-      }
-      Ctx->UpdateCurrentViewer();
+  else if (argc == 2)
+  {
+    Standard_Integer aDispMode = Draw::Atoi (argv[1]);
+    if (aCtx->NbSelected() == 0
+     && aType == TypeOfDispOperation_SetDispMode)
+    {
+      VwrTst_DispErase (Handle(AIS_InteractiveObject)(), aDispMode, TypeOfDispOperation_SetDispMode, Standard_True);
     }
-    else{
-      for(Ctx->InitSelected();Ctx->MoreSelected();Ctx->NextSelected())
-       Ctx->Display(Ctx->SelectedInteractive(),Dmode);
+    for (aCtx->InitSelected(); aCtx->MoreSelected(); aCtx->NextSelected())
+    {
+      VwrTst_DispErase (aCtx->SelectedInteractive(), aDispMode, aType, Standard_False);
     }
+    aCtx->UpdateCurrentViewer();
   }
-  else{
-    Handle(AIS_InteractiveObject) IO;
-    name = argv[1];
-    if(GetMapOfAIS().IsBound2(name))
-      IO = Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(name));
-    if (!IO.IsNull())
-      VwrTst_DispErase(IO,Draw::Atoi(argv[2]),TypeOfOperation,Standard_True);
+  else
+  {
+    Handle(AIS_InteractiveObject) aPrs;
+    TCollection_AsciiString aName (argv[1]);
+    if (GetMapOfAIS().IsBound2 (aName))
+    {
+      aPrs = Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2 (aName));
+    }
+    if (!aPrs.IsNull())
+    {
+      VwrTst_DispErase (aPrs, Draw::Atoi(argv[2]), aType, Standard_True);
+    }
   }
   return 0;
 }
@@ -5525,7 +5537,7 @@ static int VAutoActivateSelection (Draw_Interpretor& theDi,
   }
   else
   {
-    Standard_Boolean toActivate = Draw::Atoi (theArgVec[1]);
+    Standard_Boolean toActivate = Draw::Atoi (theArgVec[1]) != 0;
     aCtx->SetAutoActivateSelection (toActivate);
   }
 
@@ -5642,14 +5654,6 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands)
                  "vdisplaytype        : vdisplaytype <Type> <Signature> \n\t display all the objects of one given kind (see vtypes) which are stored the AISContext ",
                  __FILE__,VDisplayType,group);
 
-  theCommands.Add("vdisplaymode",
-                 "vdispmode       : vdispmode  [name] mode(1,2,..) : no name -> on selected objects ",
-                 __FILE__,VDispMode,group);
-
-  theCommands.Add("verasemode",
-                 "verasemode      : verasemode [name] mode(1,2,..) : no name -> on selected objects",
-                 __FILE__,VDispMode,group);
-
   theCommands.Add("vsetdispmode",
                  "vsetdispmode [name] mode(1,2,..)"
       "\n\t\t: Sets display mode for all, selected or named objects.",
index 2fd09c4730f51567f0066e0d56e836f85a7a0ba3..2e72813149d7c2c08aea46cd9348f558fa5f7861 100644 (file)
@@ -248,5 +248,5 @@ Standard_Integer ViewerTest_CmdParser::ArgInt (const std::string& theOptionName,
 //===============================================================================================
 Standard_Boolean ViewerTest_CmdParser::ArgBool (const std::string& theOptionName, const Standard_Integer theArgumentIndex)
 {
-  return static_cast<Standard_Boolean> (Draw::Atoi (Arg (theOptionName, theArgumentIndex).c_str()));
+  return Draw::Atoi (Arg (theOptionName, theArgumentIndex).c_str()) != 0;
 }
index 3ff30301d17bbc46f99fac94c44db3f6db1178e2..1cad752d8a02d70a7f8acd7ba4648a4cdae94466 100644 (file)
@@ -2150,7 +2150,7 @@ static int VCircleBuilder(Draw_Interpretor& /*di*/, Standard_Integer argc, const
   {
     // Get arguments
     TCollection_AsciiString aName(argv[1]);
-    Standard_Boolean isFilled = (Standard_Boolean)Draw::Atoi(argv[5]);
+    Standard_Boolean isFilled = Draw::Atoi(argv[5]) != 0;
 
     Handle(AIS_InteractiveObject) theShapeA;
     Handle(AIS_InteractiveObject) theShapeB;
@@ -4445,7 +4445,7 @@ static Standard_Integer VSetSelectionMode (Draw_Interpretor& /*di*/,
   }
 
   const Standard_Integer aSelectionMode = Draw::Atoi (anArgNb == 3 ? theArgv[1] : theArgv[2]);
-  const Standard_Boolean toTurnOn       = Draw::Atoi (anArgNb == 3 ? theArgv[2] : theArgv[3]);
+  const Standard_Boolean toTurnOn       = Draw::Atoi (anArgNb == 3 ? theArgv[2] : theArgv[3]) != 0;
   if (aSelectionMode == 0 && anAISContext->HasOpenedContext())
   {
     anAISContext->CloseLocalContext();
index fef1df89ee135dd079b38e086f12a195d2ed0f3c..3b38837b06b3c713a1a0fa57728cd4f6f76477f6 100644 (file)
@@ -1887,7 +1887,7 @@ static LRESULT WINAPI AdvViewerWindowProc( HWND hwnd,
           ViewerTest::GetAISContext()->CurrentViewer()->RedrawImmediate();
         }
 
-        VT_ProcessButton1Release (fwKeys & MK_SHIFT);
+        VT_ProcessButton1Release ((fwKeys & MK_SHIFT) != 0);
       }
       IsDragged = Standard_False;
       return ViewerWindowProc( hwnd, Msg, wParam, lParam );
@@ -2069,13 +2069,13 @@ static LRESULT WINAPI ViewerWindowProc( HWND hwnd,
 
         if (Msg == WM_LBUTTONDOWN)
         {
-          if (fwKeys & MK_CONTROL)
+          if ((fwKeys & MK_CONTROL) != 0)
           {
-            Ppick = VT_ProcessButton1Press (Pargc, Pargv, Ppick, (fwKeys & MK_SHIFT));
+            Ppick = VT_ProcessButton1Press (Pargc, Pargv, Ppick, (fwKeys & MK_SHIFT) != 0);
           }
           else
           {
-            VT_ProcessButton1Press (Pargc, Pargv, Ppick, (fwKeys & MK_SHIFT));
+            VT_ProcessButton1Press (Pargc, Pargv, Ppick, (fwKeys & MK_SHIFT) != 0);
           }
         }
         else if (Msg == WM_RBUTTONDOWN)
@@ -2117,27 +2117,32 @@ static LRESULT WINAPI ViewerWindowProc( HWND hwnd,
         Y_Motion = HIWORD(lParam);
 
         if ( Up &&
-          fwKeys & ( MK_LBUTTON|MK_MBUTTON|MK_RBUTTON ) ) {
+          (fwKeys & ( MK_LBUTTON|MK_MBUTTON|MK_RBUTTON )) != 0 )
+          {
             Up = 0;
             X_ButtonPress = LOWORD(lParam);
             Y_ButtonPress = HIWORD(lParam);
 
-            if ( fwKeys & MK_RBUTTON ) {
+            if ((fwKeys & MK_RBUTTON) != 0) {
               // Start rotation
               VT_ProcessButton3Press();
             }
           }
 
-          if ( fwKeys & MK_CONTROL ) {
-            if ( fwKeys & MK_LBUTTON ) {
+          if ((fwKeys & MK_CONTROL) != 0)
+          {
+            if ((fwKeys & MK_LBUTTON) != 0)
+            {
               ProcessControlButton1Motion();
             }
-            else if ( fwKeys & MK_MBUTTON ||
-              ((fwKeys&MK_LBUTTON) &&
-              (fwKeys&MK_RBUTTON) ) ){
-                VT_ProcessControlButton2Motion();
-              }
-            else if ( fwKeys & MK_RBUTTON ) {
+            else if ((fwKeys & MK_MBUTTON) != 0
+                 || ((fwKeys & MK_LBUTTON) != 0
+                  && (fwKeys & MK_RBUTTON) != 0))
+            {
+              VT_ProcessControlButton2Motion();
+            }
+            else if ((fwKeys & MK_RBUTTON) != 0)
+            {
               VT_ProcessControlButton3Motion();
             }
           }
@@ -5637,7 +5642,7 @@ static Standard_Integer VSelect (Draw_Interpretor& di,
     }
 
     Standard_Integer isToAllow = isShiftSelection ? Draw::Atoi(argv[argc - 2]) : Draw::Atoi(argv[argc - 1]);
-    myAIScontext->MainSelector()->AllowOverlapDetection((Standard_Boolean)isToAllow);
+    myAIScontext->MainSelector()->AllowOverlapDetection (isToAllow != 0);
     aCoordsNb -= 2;
   }
 
index e5b3001838caa0c0e0550de5f104ba8192986131..3d5e412b18db6643e55f31f9b7cb29b745535430 100644 (file)
@@ -309,7 +309,7 @@ Handle(XCAFDimTolObjects_DimensionObject) XCAFDoc_Dimension::GetObject()  const
   if(Label().FindChild(ChildLab_Class).FindAttribute(TDataStd_IntegerArray::GetID(), aClass) 
      && !aClass->Array().IsNull() && aClass->Array()->Length() > 0)
   {
-    anObj->SetClassOfTolerance(aClass->Array()->Value(1), (XCAFDimTolObjects_DimensionFormVariance)aClass->Array()->Value(2), (XCAFDimTolObjects_DimensionGrade)aClass->Array()->Value(3));
+    anObj->SetClassOfTolerance(aClass->Array()->Value(1) != 0, (XCAFDimTolObjects_DimensionFormVariance)aClass->Array()->Value(2), (XCAFDimTolObjects_DimensionGrade)aClass->Array()->Value(3));
   }
 
   Handle(TDataStd_IntegerArray) aDec;
index f0b3482391b00b7160f8b24525df538471c8808a..bcc5c64caa5182a5e1f5bedc6544db32dce87bb8 100644 (file)
@@ -477,7 +477,7 @@ static Standard_Integer closed (Draw_Interpretor& theDI, Standard_Integer theArg
     Handle(MeshVS_Mesh) aMesh = getMesh (theArgv[1], theDI);
     if (!aMesh.IsNull())
     {
-      Standard_Integer aFlag = Draw::Atoi (theArgv[2]);
+      Standard_Boolean aFlag = Draw::Atoi (theArgv[2]) != 0;
       aMesh->GetDrawer()->SetBoolean (MeshVS_DA_SupressBackFaces, aFlag);
 
       Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext();
@@ -841,7 +841,7 @@ static Standard_Integer meshcolors( Draw_Interpretor& di,
             aMesh->AddBuilder(aBuilder, Standard_True);
           }
 
-          aMesh->GetDrawer()->SetBoolean ( MeshVS_DA_ColorReflection, Standard_Boolean(aReflection) );
+          aMesh->GetDrawer()->SetBoolean (MeshVS_DA_ColorReflection, aReflection != 0);
 
           anIC->Redisplay( aMesh );
         }
@@ -919,7 +919,7 @@ static Standard_Integer meshvectors( Draw_Interpretor& di,
       }
       else if (aParam == "-issimple")
       {
-        isSimplePrs = Draw::Atoi(argv[anIdx]);
+        isSimplePrs = Draw::Atoi(argv[anIdx]) != 0;
       }
       aParam.Clear();
     }
index e958ab61395c9bbc40fd4af08433fc9d46113d1f..6d5ce67b1dfe07819c5984f0dc5d1f42c8a2a7cf 100644 (file)
@@ -129,7 +129,7 @@ Standard_Boolean XmlMDataStd_ByteArrayDriver::Paste(const XmlObjMgt_Persistent&
        return Standard_False;
       } 
     else
-      aDelta = (Standard_Boolean)aDeltaValue;
+      aDelta = aDeltaValue != 0;
   }
 #ifdef OCCT_DEBUG
   else if(XmlMDataStd::DocumentVersion() == -1)
@@ -155,7 +155,7 @@ void XmlMDataStd_ByteArrayDriver::Paste(const Handle(TDF_Attribute)& theSource,
 
   theTarget.Element().setAttribute(::FirstIndexString(), aL);
   theTarget.Element().setAttribute(::LastIndexString(), anU);
-  theTarget.Element().setAttribute(::IsDeltaOn(),aByteArray->GetDelta());
+  theTarget.Element().setAttribute(::IsDeltaOn(),aByteArray->GetDelta() ? 1 : 0);
 
   const Handle(TColStd_HArray1OfByte)& hArr = aByteArray->InternalArray();
   if (!hArr.IsNull() && hArr->Length())
index 42ab8da3211128d1d88c266ab5f7d34fbff14d80..dda5154c6f8bb0cfdc96ad09629b9eb980231a29 100644 (file)
@@ -195,7 +195,7 @@ Standard_Boolean XmlMDataStd_ExtStringArrayDriver::Paste
        return Standard_False;
       } 
     else
-      aDelta = (Standard_Boolean)aDeltaValue;
+      aDelta = aDeltaValue != 0;
   }
 #ifdef OCCT_DEBUG
   else if(XmlMDataStd::DocumentVersion() == -1)
@@ -223,7 +223,7 @@ void XmlMDataStd_ExtStringArrayDriver::Paste (const Handle(TDF_Attribute)& theSo
 
   if (aL != 1) anElement.setAttribute(::FirstIndexString(), aL);
   anElement.setAttribute(::LastIndexString(), anU);
-  anElement.setAttribute(::IsDeltaOn(), aExtStringArray->GetDelta()); 
+  anElement.setAttribute(::IsDeltaOn(), aExtStringArray->GetDelta() ? 1 : 0);
 
   // Find a separator.
   Standard_Boolean found(Standard_True);
index 870b69a8152de4a8744e79b9d5587bd4f6c60a3b..4a4cb41b1b0b2cbe21d44c0bf2a281d76434752e 100644 (file)
@@ -118,7 +118,7 @@ Standard_Boolean XmlMDataStd_IntPackedMapDriver::Paste
            return Standard_False;
          } 
        else
-         aDelta = (Standard_Boolean)aDeltaValue;
+         aDelta = aDeltaValue != 0;
       }
 #ifdef OCCT_DEBUG
       else if(XmlMDataStd::DocumentVersion() == -1)
@@ -148,7 +148,7 @@ void XmlMDataStd_IntPackedMapDriver::Paste (const Handle(TDF_Attribute)& theSour
 
   Standard_Integer aSize = (aS->IsEmpty()) ? 0 : aS->Extent();
   theTarget.Element().setAttribute(::IntPackedMapSize(), aSize);
-  theTarget.Element().setAttribute(::IsDeltaOn(),aS->GetDelta());
+  theTarget.Element().setAttribute(::IsDeltaOn(), aS->GetDelta() ? 1 : 0);
 
   if(aSize)
   {
index 5d59ccb33091c30648370cff950c2c65a19e8e0d..09aa5f44891ae9a51baec9a332404ac94ad108e9 100644 (file)
@@ -131,7 +131,7 @@ Standard_Boolean XmlMDataStd_IntegerArrayDriver::Paste
        return Standard_False;
       } 
     else
-      aDelta = (Standard_Boolean)aDeltaValue;
+      aDelta = aDeltaValue != 0;
   }
 #ifdef OCCT_DEBUG
   else if(XmlMDataStd::DocumentVersion() == -1)
@@ -160,7 +160,7 @@ void XmlMDataStd_IntegerArrayDriver::Paste
   if (aL != 1) 
     theTarget.Element().setAttribute(::FirstIndexString(), aL);
   theTarget.Element().setAttribute(::LastIndexString(), anU);
-  theTarget.Element().setAttribute(::IsDeltaOn(), anIntArray->GetDelta());
+  theTarget.Element().setAttribute(::IsDeltaOn(), anIntArray->GetDelta() ? 1 : 0);
 
   // Allocation of 12 chars for each integer including the space.
   // An example: -2 147 483 648
index 9fb09087fa1cf09107e585df38a4a4e85e12f3ed..8efe032df1a95c3e6b9c027b46215533812c5f99 100644 (file)
@@ -137,7 +137,7 @@ Standard_Boolean XmlMDataStd_RealArrayDriver::Paste
        return Standard_False;
       } 
     else
-      aDelta = (Standard_Boolean)aDeltaValue;
+      aDelta = aDeltaValue != 0;
   }
 #ifdef OCCT_DEBUG
   else if(XmlMDataStd::DocumentVersion() == -1)
@@ -164,7 +164,7 @@ void XmlMDataStd_RealArrayDriver::Paste (const Handle(TDF_Attribute)& theSource,
 
   if (aL != 1) theTarget.Element().setAttribute(::FirstIndexString(), aL);
   theTarget.Element().setAttribute(::LastIndexString(), anU);
-  theTarget.Element().setAttribute(::IsDeltaOn(), aRealArray->GetDelta());
+  theTarget.Element().setAttribute(::IsDeltaOn(), aRealArray->GetDelta() ? 1 : 0);
 
   // Allocation of 25 chars for each double value including the space:
   // An example: -3.1512678732195273e+020