From 586db386eb85337ae59e78d59972f08f3be73ab3 Mon Sep 17 00:00:00 2001 From: mgn Date: Wed, 2 Dec 2015 16:39:55 +0300 Subject: [PATCH] 0026922: Huge performance issue writing data to the output stream Test case for issue CR26922 Correction of literal (char to string) --- src/BOPTest/BOPTest_CheckCommands.cxx | 118 +++--- src/BRepTest/BRepTest_BasicCommands.cxx | 10 +- src/BRepTest/BRepTest_ChamferCommands.cxx | 12 +- src/BRepTest/BRepTest_CheckCommands.cxx | 112 +++--- src/BRepTest/BRepTest_CurveCommands.cxx | 24 +- src/BRepTest/BRepTest_DraftAngleCommands.cxx | 8 +- src/BRepTest/BRepTest_ExtremaCommands.cxx | 2 +- src/BRepTest/BRepTest_FeatureCommands.cxx | 14 +- src/BRepTest/BRepTest_FilletCommands.cxx | 50 +-- src/BRepTest/BRepTest_FillingCommands.cxx | 26 +- src/BRepTest/BRepTest_GPropCommands.cxx | 38 +- src/BRepTest/BRepTest_OtherCommands.cxx | 4 +- src/BRepTest/BRepTest_SurfaceCommands.cxx | 40 +- src/BRepTest/BRepTest_SweepCommands.cxx | 102 ++--- src/BRepTest/BRepTest_TopologyCommands.cxx | 6 +- src/BRepTools/BRepTools_ShapeSet.cxx | 10 +- src/BinTools/BinTools_LocationSet.cxx | 2 +- src/BinTools/BinTools_ShapeSet.cxx | 12 +- src/CDM/CDM_Document.cxx | 2 +- src/DBRep/DBRep.cxx | 10 +- src/DDF/DDF_BasicCommands.cxx | 12 +- src/DDF/DDF_DataCommands.cxx | 28 +- src/DDF/DDF_TransactionCommands.cxx | 10 +- src/DDataStd/DDataStd_BasicCommands.cxx | 156 ++++---- src/DDataStd/DDataStd_ConstraintCommands.cxx | 38 +- src/DDataStd/DDataStd_DatumCommands.cxx | 16 +- src/DDataStd/DDataStd_DrawDisplayCommands.cxx | 12 +- src/DDataStd/DDataStd_NameCommands.cxx | 4 +- src/DDataStd/DDataStd_NamedShapeCommands.cxx | 4 +- src/DDataStd/DDataStd_ObjectCommands.cxx | 2 +- src/DDataStd/DDataStd_TreeCommands.cxx | 52 +-- src/DDocStd/DDocStd_ApplicationCommands.cxx | 56 +-- src/DDocStd/DDocStd_DocumentCommands.cxx | 32 +- src/DDocStd/DDocStd_MTMCommands.cxx | 34 +- src/DDocStd/DDocStd_ToolsCommands.cxx | 14 +- src/DNaming/DNaming_BasicCommands.cxx | 26 +- src/DNaming/DNaming_ModelingCommands.cxx | 4 +- src/DNaming/DNaming_SelectionCommands.cxx | 18 +- src/DNaming/DNaming_ToolsCommands.cxx | 10 +- .../DPrsStd_AISPresentationCommands.cxx | 24 +- src/DPrsStd/DPrsStd_AISViewerCommands.cxx | 2 +- src/Draw/Draw_BasicCommands.cxx | 30 +- src/Draw/Draw_GraphicCommands.cxx | 22 +- src/Draw/Draw_UnitCommands.cxx | 8 +- .../DrawDim_PlanarDimensionCommands.cxx | 12 +- src/DrawTrSurf/DrawTrSurf.cxx | 4 +- src/FairCurve/FairCurve_Batten.cxx | 2 +- src/FairCurve/FairCurve_MinimalVariation.cxx | 2 +- src/GeometryTest/GeometryTest_APICommands.cxx | 8 +- .../GeometryTest_ConstraintCommands.cxx | 22 +- .../GeometryTest_CurveCommands.cxx | 78 ++-- .../GeometryTest_FairCurveCommands.cxx | 6 +- .../GeometryTest_SurfaceCommands.cxx | 6 +- .../GeometryTest_TestProjCommands.cxx | 6 +- .../GeomliteTest_ApproxCommands.cxx | 30 +- .../GeomliteTest_CurveCommands.cxx | 36 +- .../GeomliteTest_SurfaceCommands.cxx | 50 +-- src/HLRTest/HLRTest.cxx | 30 +- src/IFSelect/IFSelect_WorkSession.cxx | 14 +- src/IGESAppli/IGESAppli_ToolDrilledHole.cxx | 2 +- src/IGESData/IGESData_IGESDumper.cxx | 14 +- src/IGESData/IGESData_IGESModel.cxx | 8 +- src/IGESDefs/IGESDefs_ToolGenericData.cxx | 2 +- src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx | 2 +- src/IGESGeom/IGESGeom_ToolSplineSurface.cxx | 2 +- src/IntRes2d/IntRes2d_Intersection.cxx | 2 +- src/MeshTest/MeshTest.cxx | 54 +-- src/MeshTest/MeshTest_CheckTopology.cxx | 2 +- src/MeshTest/MeshTest_PluginCommands.cxx | 6 +- src/Message/Message_Msg.hxx | 2 +- src/QABugs/QABugs_1.cxx | 62 +-- src/QABugs/QABugs_10.cxx | 274 ++++++------- src/QABugs/QABugs_11.cxx | 308 +++++++-------- src/QABugs/QABugs_12.cxx | 2 +- src/QABugs/QABugs_13.cxx | 152 ++++---- src/QABugs/QABugs_14.cxx | 92 ++--- src/QABugs/QABugs_15.cxx | 4 +- src/QABugs/QABugs_16.cxx | 72 ++-- src/QABugs/QABugs_17.cxx | 64 ++-- src/QABugs/QABugs_18.cxx | 20 +- src/QABugs/QABugs_19.cxx | 92 ++--- src/QABugs/QABugs_2.cxx | 8 +- src/QABugs/QABugs_3.cxx | 120 +++--- src/QABugs/QABugs_5.cxx | 4 +- src/QABugs/QABugs_6.cxx | 6 +- src/QABugs/QABugs_7.cxx | 8 +- src/QABugs/QABugs_8.cxx | 6 +- src/QABugs/QABugs_9.cxx | 12 +- src/QADNaming/QADNaming_BasicCommands.cxx | 20 +- src/QADNaming/QADNaming_BuilderCommands.cxx | 6 +- src/QADNaming/QADNaming_IteratorsCommands.cxx | 24 +- src/QADNaming/QADNaming_SelectionCommands.cxx | 16 +- src/QADNaming/QADNaming_ToolsCommands.cxx | 4 +- src/QADraw/QADraw.cxx | 10 +- src/QANCollection/QANCollection_Perf.cxx | 6 +- src/QANCollection/QANCollection_Stl.cxx | 26 +- src/QANCollection/QANCollection_Test.cxx | 10 +- src/QANewDBRepNaming/QANewDBRepNaming.cxx | 20 +- .../QANewDBRepNaming_FeatureCommands.cxx | 2 +- src/SWDRAW/SWDRAW.cxx | 22 +- src/SWDRAW/SWDRAW_ShapeAnalysis.cxx | 162 ++++---- src/SWDRAW/SWDRAW_ShapeCustom.cxx | 40 +- src/SWDRAW/SWDRAW_ShapeExtend.cxx | 14 +- src/SWDRAW/SWDRAW_ShapeFix.cxx | 110 +++--- src/SWDRAW/SWDRAW_ShapeProcess.cxx | 6 +- src/SWDRAW/SWDRAW_ShapeProcessAPI.cxx | 2 +- src/SWDRAW/SWDRAW_ShapeTool.cxx | 44 +-- src/SWDRAW/SWDRAW_ShapeUpgrade.cxx | 362 +++++++++--------- .../ShapeUpgrade_SplitSurfaceContinuity.cxx | 2 +- src/TNaming/TNaming_Name.cxx | 8 +- src/TNaming/TNaming_Selector.cxx | 2 +- src/TObjDRAW/TObjDRAW.cxx | 26 +- src/TestTopOpe/TestTopOpe_BOOPCommands.cxx | 40 +- src/TestTopOpe/TestTopOpe_CORCommands.cxx | 130 +++---- src/TestTopOpe/TestTopOpe_HDSCommands.cxx | 140 +++---- src/TestTopOpe/TestTopOpe_MesureCommands.cxx | 22 +- src/TestTopOpe/TestTopOpe_OtherCommands.cxx | 12 +- src/TestTopOpe/TestTopOpe_VarsTopo.cxx | 14 +- .../TopOpeBRepBuild_Builder.cxx | 2 +- src/TopOpeBRepBuild/TopOpeBRepBuild_Grid.cxx | 4 +- .../TopOpeBRepBuild_WireEdgeSet.cxx | 2 +- src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx | 2 +- src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx | 2 +- .../TopOpeBRepDS_EdgeVertexInterference.cxx | 2 +- .../TopOpeBRepDS_ShapeShapeInterference.cxx | 2 +- src/TopOpeBRepTool/TopOpeBRepTool_REGUS.cxx | 4 +- src/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx | 2 +- src/TopTools/TopTools_ShapeSet.cxx | 12 +- src/ViewerTest/ViewerTest.cxx | 64 ++-- src/ViewerTest/ViewerTest_ObjectCommands.cxx | 80 ++-- .../ViewerTest_RelationCommands.cxx | 126 +++--- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 158 ++++---- src/Vrml/Vrml.cxx | 10 +- src/Vrml/Vrml_AsciiText.cxx | 24 +- src/Vrml/Vrml_Cone.cxx | 18 +- src/Vrml/Vrml_Coordinate3.cxx | 12 +- src/Vrml/Vrml_Cube.cxx | 16 +- src/Vrml/Vrml_Cylinder.cxx | 20 +- src/Vrml/Vrml_DirectionalLight.cxx | 18 +- src/Vrml/Vrml_FontStyle.cxx | 20 +- src/Vrml/Vrml_Group.cxx | 4 +- src/Vrml/Vrml_IndexedFaceSet.cxx | 36 +- src/Vrml/Vrml_IndexedLineSet.cxx | 30 +- src/Vrml/Vrml_Info.cxx | 8 +- src/Vrml/Vrml_Instancing.cxx | 4 +- src/Vrml/Vrml_LOD.cxx | 14 +- src/Vrml/Vrml_Material.cxx | 24 +- src/Vrml/Vrml_MaterialBinding.cxx | 20 +- src/Vrml/Vrml_MatrixTransform.cxx | 10 +- src/Vrml/Vrml_Normal.cxx | 12 +- src/Vrml/Vrml_NormalBinding.cxx | 20 +- src/Vrml/Vrml_OrthographicCamera.cxx | 22 +- src/Vrml/Vrml_PerspectiveCamera.cxx | 22 +- src/Vrml/Vrml_PointLight.cxx | 20 +- src/Vrml/Vrml_PointSet.cxx | 12 +- src/Vrml/Vrml_Rotation.cxx | 10 +- src/Vrml/Vrml_Scale.cxx | 8 +- src/Vrml/Vrml_Separator.cxx | 8 +- src/Vrml/Vrml_ShapeHints.cxx | 20 +- src/Vrml/Vrml_Sphere.cxx | 8 +- src/Vrml/Vrml_SpotLight.cxx | 32 +- src/Vrml/Vrml_Switch.cxx | 8 +- src/Vrml/Vrml_Texture2.cxx | 26 +- src/Vrml/Vrml_Texture2Transform.cxx | 20 +- src/Vrml/Vrml_TextureCoordinate2.cxx | 12 +- src/Vrml/Vrml_Transform.cxx | 28 +- src/Vrml/Vrml_TransformSeparator.cxx | 4 +- src/Vrml/Vrml_Translation.cxx | 8 +- src/Vrml/Vrml_WWWAnchor.cxx | 16 +- src/Vrml/Vrml_WWWInline.cxx | 16 +- src/VrmlData/VrmlData_Scene.cxx | 16 +- src/XDEDRAW/XDEDRAW.cxx | 64 ++-- src/XDEDRAW/XDEDRAW_Colors.cxx | 58 +-- src/XDEDRAW/XDEDRAW_Common.cxx | 68 ++-- src/XDEDRAW/XDEDRAW_GDTs.cxx | 206 +++++----- src/XDEDRAW/XDEDRAW_Layers.cxx | 58 +-- src/XDEDRAW/XDEDRAW_Props.cxx | 74 ++-- src/XDEDRAW/XDEDRAW_Shapes.cxx | 148 +++---- src/XSControl/XSControl_Functions.cxx | 20 +- src/XSDRAWIGES/XSDRAWIGES.cxx | 108 +++--- src/XSDRAWSTEP/XSDRAWSTEP.cxx | 78 ++-- src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 164 ++++---- tests/bugs/fclasses/bug26922 | 40 ++ 183 files changed, 3225 insertions(+), 3185 deletions(-) create mode 100755 tests/bugs/fclasses/bug26922 diff --git a/src/BOPTest/BOPTest_CheckCommands.cxx b/src/BOPTest/BOPTest_CheckCommands.cxx index 9c70043ccb..f9780a06a0 100644 --- a/src/BOPTest/BOPTest_CheckCommands.cxx +++ b/src/BOPTest/BOPTest_CheckCommands.cxx @@ -300,11 +300,11 @@ Standard_Integer bopcheck (Draw_Interpretor& di, // if (iErr) { di << "There were errors during the operation, "; - di << "so the list may be incomplete." << "\n"; + di << "so the list may be incomplete.\n"; } // if (!iCnt) { - di << " This shape seems to be OK." << "\n"; + di << " This shape seems to be OK.\n"; } if (bShowTime) { @@ -325,48 +325,48 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, di << "\n"; di << " Use >bopargcheck Shape1 [[Shape2] "; di << "[-F/O/C/T/S/U] [/R|F|T|V|E|I|P|C|S]] [#BF]\n\n"; - di << " -" << "\n"; - di << " F (fuse)" << "\n"; - di << " O (common)" << "\n"; - di << " C (cut)" << "\n"; - di << " T (cut21)" << "\n"; - di << " S (section)" << "\n"; - di << " U (unknown)" << "\n"; + di << " -\n"; + di << " F (fuse)\n"; + di << " O (common)\n"; + di << " C (cut)\n"; + di << " T (cut21)\n"; + di << " S (section)\n"; + di << " U (unknown)\n"; di << " For example: \"bopargcheck s1 s2 -F\" enables" ; - di << " checking for Fuse operation" << "\n"; - di << " default - section" << "\n" << "\n"; - di << " /" << "\n"; - di << " R (disable small edges (shrank range) test)" << "\n"; - di << " F (disable faces verification test)" << "\n"; - di << " T (disable tangent faces searching test)" << "\n"; - di << " V (disable test possibility to merge vertices)" << "\n"; - di << " E (disable test possibility to merge edges)" << "\n"; - di << " I (disable self-interference test)" << "\n"; - di << " P (disable shape type test)" << "\n"; - di << " C (disable test for shape continuity)" << "\n"; - di << " S (disable curve on surface check)" << "\n"; + di << " checking for Fuse operation\n"; + di << " default - section\n\n"; + di << " /\n"; + di << " R (disable small edges (shrank range) test)\n"; + di << " F (disable faces verification test)\n"; + di << " T (disable tangent faces searching test)\n"; + di << " V (disable test possibility to merge vertices)\n"; + di << " E (disable test possibility to merge edges)\n"; + di << " I (disable self-interference test)\n"; + di << " P (disable shape type test)\n"; + di << " C (disable test for shape continuity)\n"; + di << " S (disable curve on surface check)\n"; di << " For example: \"bopargcheck s1 s2 /RI\" disables "; - di << "small edge detection and self-intersection detection" << "\n"; - di << " default - all options are enabled" << "\n" << "\n"; - di << " #" << "\n"; - di << " B (stop test on first faulty found); default OFF" << "\n"; + di << "small edge detection and self-intersection detection\n"; + di << " default - all options are enabled\n\n"; + di << " #\n"; + di << " B (stop test on first faulty found); default OFF\n"; di << " F (full output for faulty shapes); default - output "; - di << "in a short format" << "\n" << "\n"; + di << "in a short format\n\n"; di << " NOTE: and are "; - di << "used only for couple" << "\n"; + di << "used only for couple\n"; di << " of argument shapes, except I and P options "; - di << "that are always used for" << "\n"; + di << "that are always used for\n"; di << " couple of shapes as well as for "; - di <<"single shape test." << "\n"; + di <<"single shape test.\n"; return 1; } TopoDS_Shape aS1 = DBRep::Get(a[1]); if(aS1.IsNull()) { - di << "Error: null shape not allowed!" << "\n"; + di << "Error: null shape not allowed!\n"; di << "Type bopargcheck without arguments for more "; - di <<"information" << "\n"; + di <<"information\n"; return 1; } @@ -410,15 +410,15 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, TopoDS_Shape aS22, aS2; if(isS2) { if(indxS2 != 2) { - di << "Error: second shape should follow the first one!" << "\n"; - di << "Type bopargcheck without arguments for more information" << "\n"; + di << "Error: second shape should follow the first one!\n"; + di << "Type bopargcheck without arguments for more information\n"; return 1; } else { aS22 = DBRep::Get(a[2]); if(aS22.IsNull()) { - di << "Error: second shape is null!" << "\n"; - di << "Type bopargcheck without arguments for more information" << "\n"; + di << "Error: second shape is null!\n"; + di << "Type bopargcheck without arguments for more information\n"; return 1; } } @@ -463,8 +463,8 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, aChecker.OperationType() = BOPAlgo_UNKNOWN; } else { - di << "Error: invalid boolean operation type!" << "\n"; - di << "Type bopargcheck without arguments for more information" << "\n"; + di << "Error: invalid boolean operation type!\n"; + di << "Type bopargcheck without arguments for more information\n"; return 1; } } @@ -508,8 +508,8 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, aChecker.CurveOnSurfaceMode() = Standard_False; } else { - di << "Error: invalid test option(s)!" << "\n"; - di << "Type bopargcheck without arguments for more information" << "\n"; + di << "Error: invalid test option(s)!\n"; + di << "Type bopargcheck without arguments for more information\n"; return 1; } ind++; @@ -528,8 +528,8 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, fullOutput = Standard_True; } else { - di << "Error: invalid additional test option(s)!" << "\n"; - di << "Type bopargcheck without arguments for more information" << "\n"; + di << "Error: invalid additional test option(s)!\n"; + di << "Type bopargcheck without arguments for more information\n"; return 1; } ind++; @@ -545,7 +545,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, } else { if(!fullOutput) { - di << "Faulties, that can not be treated by BOP, are detected." << "\n"; + di << "Faulties, that can not be treated by BOP, are detected.\n"; } else { const BOPAlgo_ListOfCheckResult& aResultList = aChecker.GetCheckResult(); @@ -720,7 +720,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, // output for first shape di << "Faulties for FIRST shape found : " << FS1 << "\n"; if(FS1 != 0) { - di << "---------------------------------" << "\n"; + di << "---------------------------------\n"; Standard_CString CString1; if (S1_BadType != 0) CString1="YES"; @@ -734,7 +734,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString2=aChecker.SelfInterMode() ? "NO" : "DISABLED"; di << "Self-Intersections : " << CString2; if(S1_SelfInt != 0) - di << " Cases(" << S1_SelfInt << ") Total shapes(" << S1_SelfIntAll << ")" << "\n"; + di << " Cases(" << S1_SelfInt << ") Total shapes(" << S1_SelfIntAll << ")\n"; else di << "\n"; Standard_CString CString13; @@ -750,7 +750,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString3=aChecker.SmallEdgeMode() ? "NO" : "DISABLED"; di << "Too small edges : " << CString3; if(S1_SmalE != 0) - di << " Cases(" << S1_SmalE << ") Total shapes(" << S1_SmalEAll << ")" << "\n"; + di << " Cases(" << S1_SmalE << ") Total shapes(" << S1_SmalEAll << ")\n"; else di << "\n"; Standard_CString CString4; @@ -760,7 +760,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString4=aChecker.RebuildFaceMode() ? "NO" : "DISABLED"; di << "Bad faces : " << CString4; if(S1_BadF != 0) - di << " Cases(" << S1_BadF << ") Total shapes(" << S1_BadFAll << ")" << "\n"; + di << " Cases(" << S1_BadF << ") Total shapes(" << S1_BadFAll << ")\n"; else di << "\n"; Standard_CString CString5; @@ -770,7 +770,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString5=aChecker.MergeVertexMode() ? "NO" : "DISABLED"; di << "Too close vertices : " << CString5; if(S1_BadV != 0) - di << " Cases(" << S1_BadV << ") Total shapes(" << S1_BadVAll << ")" << "\n"; + di << " Cases(" << S1_BadV << ") Total shapes(" << S1_BadVAll << ")\n"; else di << "\n"; Standard_CString CString6; @@ -780,7 +780,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString6=aChecker.MergeEdgeMode() ? "NO" : "DISABLED"; di << "Too close edges : " << CString6; if(S1_BadE != 0) - di << " Cases(" << S1_BadE << ") Total shapes(" << S1_BadEAll << ")" << "\n"; + di << " Cases(" << S1_BadE << ") Total shapes(" << S1_BadEAll << ")\n"; else di << "\n"; Standard_CString CString15; @@ -790,7 +790,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString15=aChecker.ContinuityMode() ? "NO" : "DISABLED"; di << "Shapes with Continuity C0 : " << CString15; if(S1_C0 != 0) - di << " Cases(" << S1_C0 << ") Total shapes(" << S1_C0All << ")" << "\n"; + di << " Cases(" << S1_C0 << ") Total shapes(" << S1_C0All << ")\n"; else di << "\n"; @@ -801,7 +801,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString17=aChecker.CurveOnSurfaceMode() ? "NO" : "DISABLED"; di << "Invalid Curve on Surface : " << CString17; if(S1_COnS != 0) - di << " Cases(" << S1_COnS << ") Total shapes(" << S1_COnSAll << ")" << "\n"; + di << " Cases(" << S1_COnS << ") Total shapes(" << S1_COnSAll << ")\n"; else di << "\n"; } @@ -810,7 +810,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, di << "\n"; di << "Faulties for SECOND shape found : " << FS2 << "\n"; if(FS2 != 0) { - di << "---------------------------------" << "\n"; + di << "---------------------------------\n"; Standard_CString CString7; if (S2_BadType != 0) CString7="YES"; @@ -824,7 +824,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString8=aChecker.SelfInterMode() ? "NO" : "DISABLED"; di << "Self-Intersections : " << CString8; if(S2_SelfInt != 0) - di << " Cases(" << S2_SelfInt << ") Total shapes(" << S2_SelfIntAll << ")" << "\n"; + di << " Cases(" << S2_SelfInt << ") Total shapes(" << S2_SelfIntAll << ")\n"; else di << "\n"; @@ -841,7 +841,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString9=aChecker.SmallEdgeMode() ? "NO" : "DISABLED"; di << "Too small edges : " << CString9; if(S2_SmalE != 0) - di << " Cases(" << S2_SmalE << ") Total shapes(" << S2_SmalEAll << ")" << "\n"; + di << " Cases(" << S2_SmalE << ") Total shapes(" << S2_SmalEAll << ")\n"; else di << "\n"; Standard_CString CString10; @@ -851,7 +851,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString10=aChecker.RebuildFaceMode() ? "NO" : "DISABLED"; di << "Bad faces : " << CString10; if(S2_BadF != 0) - di << " Cases(" << S2_BadF << ") Total shapes(" << S2_BadFAll << ")" << "\n"; + di << " Cases(" << S2_BadF << ") Total shapes(" << S2_BadFAll << ")\n"; else di << "\n"; Standard_CString CString11; @@ -861,7 +861,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString11=aChecker.MergeVertexMode() ? "NO" : "DISABLED"; di << "Too close vertices : " << CString11; if(S2_BadV != 0) - di << " Cases(" << S2_BadV << ") Total shapes(" << S2_BadVAll << ")" << "\n"; + di << " Cases(" << S2_BadV << ") Total shapes(" << S2_BadVAll << ")\n"; else di << "\n"; Standard_CString CString12; @@ -871,7 +871,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString12=aChecker.MergeEdgeMode() ? "NO" : "DISABLED"; di << "Too close edges : " << CString12; if(S2_BadE != 0) - di << " Cases(" << S2_BadE << ") Total shapes(" << S2_BadEAll << ")" << "\n"; + di << " Cases(" << S2_BadE << ") Total shapes(" << S2_BadEAll << ")\n"; else di << "\n"; Standard_CString CString16; @@ -881,7 +881,7 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString16=aChecker.ContinuityMode() ? "NO" : "DISABLED"; di << "Shapes with Continuity C0 : " << CString16; if(S2_C0 != 0) - di << " Cases(" << S2_C0 << ") Total shapes(" << S2_C0All << ")" << "\n"; + di << " Cases(" << S2_C0 << ") Total shapes(" << S2_C0All << ")\n"; else di << "\n"; @@ -892,14 +892,14 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, CString18=aChecker.CurveOnSurfaceMode() ? "NO" : "DISABLED"; di << "Invalid Curve on Surface : " << CString18; if(S2_COnS != 0) - di << " Cases(" << S2_COnS << ") Total shapes(" << S2_COnSAll << ")" << "\n"; + di << " Cases(" << S2_COnS << ") Total shapes(" << S2_COnSAll << ")\n"; else di << "\n"; } // warning if(hasUnknown) { di << "\n"; - di << "WARNING: The unexpected test break occurs!" << "\n"; + di << "WARNING: The unexpected test break occurs!\n"; } } // full output } // has faulties diff --git a/src/BRepTest/BRepTest_BasicCommands.cxx b/src/BRepTest/BRepTest_BasicCommands.cxx index 579ebae19b..6f1d9afa6d 100644 --- a/src/BRepTest/BRepTest_BasicCommands.cxx +++ b/src/BRepTest/BRepTest_BasicCommands.cxx @@ -189,7 +189,7 @@ static Standard_Integer deform(Draw_Interpretor& di,Standard_Integer n,const cha TopoDS_Shape S = DBRep::Get(a[2]); if (S.IsNull()) { //cout << a[2] << " is not a valid shape" << endl; - di << a[2] << " is not a valid shape" << "\n"; + di << a[2] << " is not a valid shape\n"; } else { gtrf.Perform(S); @@ -264,7 +264,7 @@ static Standard_Integer nurbsconvert(Draw_Interpretor& di,Standard_Integer n,con TopoDS_Shape S = DBRep::Get(a[2*i+2]); if (S.IsNull()) { //cout << a[2*i+2] << " is not a valid shape" << endl; - di << a[2*i+2] << " is not a valid shape" << "\n"; + di << a[2*i+2] << " is not a valid shape\n"; } else { nbscv.Perform(S); @@ -495,7 +495,7 @@ static Standard_Integer reperageshape(Draw_Interpretor& di, Standard_Integer nar TopoDS_Shape TheShape1 = DBRep::Get(id1); //cout << "Pick positions with button "<Length()<<"\n"; slv = new TopTools_HSequenceOfShape(); @@ -802,11 +802,11 @@ void StructuralDump(Draw_Interpretor& theCommands, char aName[20]; Sprintf(aName,"%s_v",Pref); DBRep::Set(aName,comp); - //cout<<"VERTEX"<<" : "<<(nb > 9 ? "" : " ")< compound named "< 9 ? "" : " ")< compound named "< 9) - theCommands<<"VERTEX"<<" : "<<""< compound named "< compound named "< compound named "< compound named "<Length()>0) { TopoDS_Compound comp; @@ -817,11 +817,11 @@ void StructuralDump(Draw_Interpretor& theCommands, char aName[20]; Sprintf(aName,"%s_e",Pref); DBRep::Set(aName,comp); - //cout<<"EDGE"<<" : "<<(nb > 9 ? "" : " ")< compound named "< 9 ? "" : " ")< compound named "< 9) - theCommands<<"EDGE"<<" : "<<""< compound named "< compound named "< compound named "< compound named "<Length()>0) { TopoDS_Compound comp; @@ -832,11 +832,11 @@ void StructuralDump(Draw_Interpretor& theCommands, char aName[20]; Sprintf(aName,"%s_w",Pref); DBRep::Set(aName,comp); - //cout<<"WIRE"<<" : "<<(nb > 9 ? "" : " ")< compound named "< 9 ? "" : " ")< compound named "< 9) - theCommands<<"WIRE"<<" : "<<""< compound named "< compound named "< compound named "< compound named "<Length()>0) { TopoDS_Compound comp; @@ -847,11 +847,11 @@ void StructuralDump(Draw_Interpretor& theCommands, char aName[20]; Sprintf(aName,"%s_f",Pref); DBRep::Set(aName,comp); - //cout<<"FACE"<<" : "<<(nb > 9 ? "" : " ")< compound named "< 9 ? "" : " ")< compound named "< 9) - theCommands<<"FACE"<<" : "<<""< compound named "< compound named "< compound named "< compound named "<Length()>0) { TopoDS_Compound comp; @@ -862,11 +862,11 @@ void StructuralDump(Draw_Interpretor& theCommands, char aName[20]; Sprintf(aName,"%s_s",Pref); DBRep::Set(aName,comp); - //cout<<"SHELL"<<" : "<<(nb > 9 ? "" : " ")< compound named "< 9 ? "" : " ")< compound named "< 9) - theCommands<<"SHELL"<<" : "<<""< compound named "< compound named "< compound named "< compound named "<Length()>0) { TopoDS_Compound comp; @@ -877,11 +877,11 @@ void StructuralDump(Draw_Interpretor& theCommands, char aName[20]; Sprintf(aName,"%s_o",Pref); DBRep::Set(aName,comp); - //cout<<"SOLID"<<" : "<<(nb > 9 ? "" : " ")< compound named "< 9 ? "" : " ")< compound named "< 9) - theCommands<<"SOLID"<<" : "<<""< compound named "< compound named "< compound named "< compound named "< 5) { //cout << "Invalid number of args!!!" << endl; //cout << "No args to have help." << endl; - theCommands << "Invalid number of args!!!" << "\n"; - theCommands << "No args to have help." << "\n"; + theCommands << "Invalid number of args!!!\n"; + theCommands << "No args to have help.\n"; return 1; } @@ -936,8 +936,8 @@ static Standard_Integer checkshape(Draw_Interpretor& theCommands, if (aCurInd > narg - 1) { //cout << "Invalid number of args!!!" << endl; //cout << "No args to have help." << endl; - theCommands << "Invalid number of args!!!" << "\n"; - theCommands << "No args to have help." << "\n"; + theCommands << "Invalid number of args!!!\n"; + theCommands << "No args to have help.\n"; return 1; } @@ -947,7 +947,7 @@ static Standard_Integer checkshape(Draw_Interpretor& theCommands, if (aShape.IsNull()) { //cout << a[aCurInd] << " is not a topological shape!!!" << endl; - theCommands << a[aCurInd] << " is not a topological shape!!!" << "\n"; + theCommands << a[aCurInd] << " is not a topological shape!!!\n"; return 1; } @@ -966,8 +966,8 @@ static Standard_Integer checkshape(Draw_Interpretor& theCommands, if (aCurInd < aBackInd - 1) { //cout << "Invalid number of args!!!" << endl; //cout << "No args to have help." << endl; - theCommands << "Invalid number of args!!!" << "\n"; - theCommands << "No args to have help." << "\n"; + theCommands << "Invalid number of args!!!\n"; + theCommands << "No args to have help.\n"; return 1; } else if (aCurInd < aBackInd) { @@ -1139,10 +1139,10 @@ static Standard_Integer shapeG1continuity (Draw_Interpretor& di, Standard_Intege //else { cout<<" the continuity is not G1 "< 0) { //cout< 0) { //cout<3) ) { //cout << " 1 or 2 arguments expected" << endl; - di << " 1 or 2 arguments expected" << "\n"; + di << " 1 or 2 arguments expected\n"; return 1; } @@ -1798,7 +1798,7 @@ Standard_Integer build3d(Draw_Interpretor& di, if (n==2) { Ok = BRepLib::BuildCurves3d(S); } else { Ok = BRepLib::BuildCurves3d(S,Draw::Atof(a[2])); } //if (!Ok) {cout << " one of the computation failed" << endl;} - if (!Ok) {di << " one of the computation failed" << "\n";} + if (!Ok) {di << " one of the computation failed\n";} return 0; } @@ -1819,7 +1819,7 @@ Standard_Integer reducepcurves(Draw_Interpretor& di, TopoDS_Shape aShape = DBRep::Get(a[i]); if (aShape.IsNull()) //cout << a[i] << " is not a valid shape" << endl; - di << a[i] << " is not a valid shape" << "\n"; + di << a[i] << " is not a valid shape\n"; else BRepTools::RemoveUnusedPCurves(aShape); } diff --git a/src/BRepTest/BRepTest_DraftAngleCommands.cxx b/src/BRepTest/BRepTest_DraftAngleCommands.cxx index af9cabbc51..a5f7c5e197 100644 --- a/src/BRepTest/BRepTest_DraftAngleCommands.cxx +++ b/src/BRepTest/BRepTest_DraftAngleCommands.cxx @@ -103,7 +103,7 @@ static Standard_Integer NDEP(Draw_Interpretor& theCommands, TopoDS_Shape V = DBRep::Get(a[2]); if ( V.IsNull()) { //cout << a[2] << " is not a Shape" << endl; - theCommands << a[2] << " is not a Shape" << "\n"; + theCommands << a[2] << " is not a Shape\n"; return 1; } @@ -123,7 +123,7 @@ static Standard_Integer NDEP(Draw_Interpretor& theCommands, if ( F.IsNull()) { //cout << a[9*ii+6] << " is not a face" << endl; - theCommands << a[9*ii+6] << " is not a face" << "\n"; + theCommands << a[9*ii+6] << " is not a face\n"; return 1; } @@ -211,11 +211,11 @@ static Standard_Integer draft (Draw_Interpretor& di, if (Internal) { MkDraft.SetDraft(Internal); - di << "Internal Draft : " << "\n"; + di << "Internal Draft : \n"; //cout << "Internal Draft : " << endl; } else - di << "External Draft : " << "\n"; + di << "External Draft : \n"; //cout << "External Draft : " << endl; TopoDS_Shape Stop = DBRep::Get(a[7]);//shape d'arret diff --git a/src/BRepTest/BRepTest_ExtremaCommands.cxx b/src/BRepTest/BRepTest_ExtremaCommands.cxx index bddb92657a..9c2f9dbe33 100644 --- a/src/BRepTest/BRepTest_ExtremaCommands.cxx +++ b/src/BRepTest/BRepTest_ExtremaCommands.cxx @@ -135,7 +135,7 @@ static Standard_Integer distmini(Draw_Interpretor& di, Standard_Integer n, const } - else di << "probleme"<< "\n"; + else di << "probleme\n"; //else cout << "probleme"<< endl; return 0; } diff --git a/src/BRepTest/BRepTest_FeatureCommands.cxx b/src/BRepTest/BRepTest_FeatureCommands.cxx index b4f715c388..ee9bf68062 100644 --- a/src/BRepTest/BRepTest_FeatureCommands.cxx +++ b/src/BRepTest/BRepTest_FeatureCommands.cxx @@ -544,7 +544,7 @@ static Standard_Integer PRW(Draw_Interpretor& theCommands, else { // il faudrait inverser V et appeler PerfomFromEnd... //cout << "Not Implemented" << endl; - theCommands << "Not Implemented" << "\n"; + theCommands << "Not Implemented\n"; } } if (!thePFace.IsDone()) { @@ -709,7 +709,7 @@ static Standard_Integer PRF(Draw_Interpretor& theCommands, else { //FUntil.IsNull() // il faudrait inverser V et appeler PerfomFromEnd... //cout << "Not Implemented" << endl; - theCommands << "Not Implemented" << "\n"; + theCommands << "Not Implemented\n"; } } if (!thePFace.IsDone()) { @@ -949,8 +949,8 @@ Standard_Integer offsetparameter(Draw_Interpretor& di, Standard_Integer n, const char** a) { if ( n == 1 ) { - di << " OffsetParameter Tol Inter(c/p) JoinType(a/i/t) [RemoveInternalEdges(r/k) RemoveInvalidFaces(r/k)]" << "\n"; - di << " Current Values" << "\n"; + di << " OffsetParameter Tol Inter(c/p) JoinType(a/i/t) [RemoveInternalEdges(r/k) RemoveInvalidFaces(r/k)]\n"; + di << " Current Values\n"; di << " --> Tolerance : " << TheTolerance << "\n"; di << " --> TheInter : "; if ( TheInter) { @@ -958,7 +958,7 @@ Standard_Integer offsetparameter(Draw_Interpretor& di, } else { di << "Partial"; } - di << "\n" << " --> TheJoin : "; + di << "\n --> TheJoin : "; switch (TheJoin) { case GeomAbs_Arc: di << "Arc"; break; @@ -967,7 +967,7 @@ Standard_Integer offsetparameter(Draw_Interpretor& di, break ; } // - di << "\n" << " --> Internal Edges : "; + di << "\n --> Internal Edges : "; if (RemoveIntEdges) { di << "Remove"; } @@ -975,7 +975,7 @@ Standard_Integer offsetparameter(Draw_Interpretor& di, di << "Keep"; } // - di << "\n" << " --> Invalid Faces : "; + di << "\n --> Invalid Faces : "; if (RemoveInvalidFaces) { di << "Remove"; } diff --git a/src/BRepTest/BRepTest_FilletCommands.cxx b/src/BRepTest/BRepTest_FilletCommands.cxx index f8cb060fb4..8d6f15d612 100644 --- a/src/BRepTest/BRepTest_FilletCommands.cxx +++ b/src/BRepTest/BRepTest_FilletCommands.cxx @@ -80,15 +80,15 @@ static Standard_Integer contblend(Draw_Interpretor& di, Standard_Integer narg, c switch (blend_cont) { case GeomAbs_C0: //cout << ""<IsDone()) { //cout<<"Active Builder Not Done"<NbContours(); @@ -242,7 +242,7 @@ static Standard_Integer CheckHist(Draw_Interpretor& di, PrintHist(curshape,It,nbgen); } //cout<<"foreach g [lsort [dir gen*]] { wclick; puts [dname $g]; donl $g; }"<Build(); @@ -528,16 +528,16 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons // if (Rakk.IsDone()==FilletSurf_IsPartial) cout <<"resultat partiel"< 1) { @@ -639,15 +639,15 @@ static Standard_Integer fillingparam( Draw_Interpretor & di, Standard_Integer n, di<<"Degree = "< 2 && n < 6) { - di << "Wrong arguments" << "\n"; + di << "Wrong arguments\n"; return 1; } @@ -227,8 +227,8 @@ Standard_Integer vpropsgk(Draw_Interpretor& di, Standard_Integer n, const char** aSStream0.precision(15); aSStream0 << "\n\n"; - aSStream0 << "Mass : " << setw(anOutWidth) << G.Mass() << "\n" << "\n"; - aSStream0 << "Relative error of mass computation : " << setw(anOutWidth) << eps << "\n" << "\n"; + aSStream0 << "Mass : " << setw(anOutWidth) << G.Mass() << "\n\n"; + aSStream0 << "Relative error of mass computation : " << setw(anOutWidth) << eps << "\n\n"; aSStream0 << ends; di << aSStream0; diff --git a/src/BRepTest/BRepTest_OtherCommands.cxx b/src/BRepTest/BRepTest_OtherCommands.cxx index 3583817c6e..8ba26a7e72 100644 --- a/src/BRepTest/BRepTest_OtherCommands.cxx +++ b/src/BRepTest/BRepTest_OtherCommands.cxx @@ -351,7 +351,7 @@ Standard_Integer brepintcs(Draw_Interpretor& di, Standard_Integer n, const char* } } if(!nbpi) - di<<"Points of intersections are not found"<<"\n"; + di<<"Points of intersections are not found\n"; if(indshape < n-1) DBRep::Set(a[n-1], aComp); //POP pour NT @@ -424,7 +424,7 @@ Standard_Integer MakeShell(Draw_Interpretor& , Standard_Integer , const char** a Standard_Integer xbounds(Draw_Interpretor& di, Standard_Integer n, const char** a) { if (n<2) { - di << "Usage : " << a[0] << " face" << "\n"; + di << "Usage : " << a[0] << " face\n"; return 0; } // diff --git a/src/BRepTest/BRepTest_SurfaceCommands.cxx b/src/BRepTest/BRepTest_SurfaceCommands.cxx index d3efa41d21..d4c792ec2c 100644 --- a/src/BRepTest/BRepTest_SurfaceCommands.cxx +++ b/src/BRepTest/BRepTest_SurfaceCommands.cxx @@ -328,7 +328,7 @@ static Standard_Integer sewing (Draw_Interpretor& theDi, } else { - theDi << "Error! min tolerance can't possess the null value" << "\n"; + theDi << "Error! min tolerance can't possess the null value\n"; return (1); } } @@ -338,7 +338,7 @@ static Standard_Integer sewing (Draw_Interpretor& theDi, aMaxTol = Draw::Atof (theArgv[++i]); else { - theDi << "Error! max tolerance can't possess the null value" << "\n"; + theDi << "Error! max tolerance can't possess the null value\n"; return (1); } } @@ -371,22 +371,22 @@ static Standard_Integer sewing (Draw_Interpretor& theDi, if (aPar < 2) { - theDi << "Use: " << theArgv[0] << " result [tolerance] shape1 shape2 ... [min tolerance] [max tolerance] [switches]" << "\n"; - theDi << "To set user's value of min/max tolerances the following syntax is used: + " << "\n"; - theDi << "- parameters are identified by letters:" << "\n"; - theDi << " mint - min tolerance" << "\n"; - theDi << " maxt - max tolerance" << "\n"; - theDi << "Switches allow to tune other parameters of Sewing" << "\n"; - theDi << "The following syntax is used: " << "\n"; - theDi << "- symbol may be - to set parameter off, + to set on" << "\n"; - theDi << "- parameters are identified by letters:" << "\n"; - theDi << " s - mode for creating sewed shape" << "\n"; - theDi << " a - mode for analysis of input shapes" << "\n"; - theDi << " c - mode for cutting of free edges" << "\n"; - theDi << " n - mode for non manifold processing" << "\n"; - theDi << " p - mode for same parameter processing for edges" << "\n"; - theDi << " e - mode for sewing floating edges" << "\n"; - theDi << " f - mode for sewing faces" << "\n"; + theDi << "Use: " << theArgv[0] << " result [tolerance] shape1 shape2 ... [min tolerance] [max tolerance] [switches]\n"; + theDi << "To set user's value of min/max tolerances the following syntax is used: + \n"; + theDi << "- parameters are identified by letters:\n"; + theDi << " mint - min tolerance\n"; + theDi << " maxt - max tolerance\n"; + theDi << "Switches allow to tune other parameters of Sewing\n"; + theDi << "The following syntax is used: \n"; + theDi << "- symbol may be - to set parameter off, + to set on\n"; + theDi << "- parameters are identified by letters:\n"; + theDi << " s - mode for creating sewed shape\n"; + theDi << " a - mode for analysis of input shapes\n"; + theDi << " c - mode for cutting of free edges\n"; + theDi << " n - mode for non manifold processing\n"; + theDi << " p - mode for same parameter processing for edges\n"; + theDi << " e - mode for sewing floating edges\n"; + theDi << " f - mode for sewing faces\n"; return (1); } @@ -398,12 +398,12 @@ static Standard_Integer sewing (Draw_Interpretor& theDi, aMinTol = Precision::Confusion(); if (aMinTol > aTol) { - theDi << "Error! min tolerance can't exceed working tolerance" << "\n"; + theDi << "Error! min tolerance can't exceed working tolerance\n"; return (1); } if (aMaxTol < aTol) { - theDi << "Error! max tolerance can't be less than working tolerance" << "\n"; + theDi << "Error! max tolerance can't be less than working tolerance\n"; return (1); } diff --git a/src/BRepTest/BRepTest_SweepCommands.cxx b/src/BRepTest/BRepTest_SweepCommands.cxx index 4c1203b8b5..a50255bc6b 100644 --- a/src/BRepTest/BRepTest_SweepCommands.cxx +++ b/src/BRepTest/BRepTest_SweepCommands.cxx @@ -130,11 +130,11 @@ static Standard_Integer pipe(Draw_Interpretor& di, { if (n == 1) { - di << "pipe result Wire_spine Profile [Mode [Approx]]" << "\n"; - di << "Mode = 0 - CorrectedFrenet," << "\n"; - di << " = 1 - Frenet," << "\n"; - di << " = 2 - DiscreteTrihedron" << "\n"; - di << "Approx - force C1-approximation if result is C0" << "\n"; + di << "pipe result Wire_spine Profile [Mode [Approx]]\n"; + di << "Mode = 0 - CorrectedFrenet,\n"; + di << " = 1 - Frenet,\n"; + di << " = 2 - DiscreteTrihedron\n"; + di << "Approx - force C1-approximation if result is C0\n"; return 0; } @@ -221,11 +221,11 @@ Standard_Integer evolved(Draw_Interpretor& di, Standard_Integer n, const char** //cout << " is given in the referencial axis. " << endl; //cout << " 2) evolved result base profil o : "<< endl; //cout << " This position is automatically computed." << endl; - di << " 1) evolved result base profil : "<< "\n"; - di << " The relative position of the profil on the base" << "\n"; - di << " is given in the referencial axis. " << "\n"; - di << " 2) evolved result base profil o : "<< "\n"; - di << " This position is automatically computed." << "\n"; + di << " 1) evolved result base profil : \n"; + di << " The relative position of the profil on the base\n"; + di << " is given in the referencial axis. \n"; + di << " 2) evolved result base profil o : \n"; + di << " This position is automatically computed.\n"; return 0; } @@ -450,22 +450,22 @@ static Standard_Integer setsweep(Draw_Interpretor& di, //cout << " -CN dx dy dz : BiNormal is given by dx dy dz" << endl; //cout << " -FX Tx Ty TZ [Nx Ny Nz] : Tangent and Normal are fixed" <> command !"<< endl; - di << "You have forgotten the <> command !"<< "\n"; + di << "You have forgotten the <> command !\n"; return 1; } if (!strcmp(a[1],"-FR")) { @@ -480,14 +480,14 @@ static Standard_Integer setsweep(Draw_Interpretor& di, else if (!strcmp(a[1],"-DX")) { if (n!=3) { //cout << "bad arguments !" << endl; - di << "bad arguments !" << "\n"; + di << "bad arguments !\n"; return 1; } TopoDS_Shape Surf; Surf = DBRep::Get(a[2],TopAbs_SHAPE); if (Surf.IsNull()) { //cout << a[2] <<"is not a shape !" << endl; - di << a[2] <<"is not a shape !" << "\n"; + di << a[2] <<"is not a shape !\n"; return 1; } Sweep->SetMode(Surf); @@ -495,7 +495,7 @@ static Standard_Integer setsweep(Draw_Interpretor& di, else if (!strcmp(a[1],"-CN")) { if (n!=5) { //cout << "bad arguments !" << endl; - di << "bad arguments !" << "\n"; + di << "bad arguments !\n"; return 1; } gp_Dir D(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4])); @@ -504,7 +504,7 @@ static Standard_Integer setsweep(Draw_Interpretor& di, else if (!strcmp(a[1],"-FX")) { if ((n!=5)&&(n!=8)) { //cout << "bad arguments !" << endl; - di << "bad arguments !" << "\n"; + di << "bad arguments !\n"; return 1; } gp_Dir D(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4])); @@ -523,7 +523,7 @@ static Standard_Integer setsweep(Draw_Interpretor& di, if (n != 5) { //cout << "bad arguments !" << endl; - di << "bad arguments !" << "\n"; + di << "bad arguments !\n"; return 1; } else @@ -539,7 +539,7 @@ static Standard_Integer setsweep(Draw_Interpretor& di, else { //cout << "The option "<< a[1] << " is unknown !" << endl; - di << "The option "<< a[1] << " is unknown !" << "\n"; + di << "The option "<< a[1] << " is unknown !\n"; return 1; } return 0; @@ -558,17 +558,17 @@ static Standard_Integer addsweep(Draw_Interpretor& di, //cout << " with the spine" <> command !"<< endl; - di << "You have forgotten the <> command !"<< "\n"; + di << "You have forgotten the <> command !\n"; return 1; } @@ -581,7 +581,7 @@ static Standard_Integer addsweep(Draw_Interpretor& di, Section.ShapeType() != TopAbs_VERTEX) { //cout << a[1] <<"is not a wire and is not a vertex!" << endl; - di << a[1] <<"is not a wire and is not a vertex!" << "\n"; + di << a[1] <<"is not a wire and is not a vertex!\n"; return 1; } @@ -659,7 +659,7 @@ static Standard_Integer deletesweep(Draw_Interpretor& di, // Section = TopoDS::Wire(DBRep::Get(a[1],TopAbs_SHAPE)); if (Section.IsNull()) { //cout << a[1] <<"is not a wire !" << endl; - di << a[1] <<"is not a wire !" << "\n"; + di << a[1] <<"is not a wire !\n"; return 1; } @@ -683,27 +683,27 @@ static Standard_Integer buildsweep(Draw_Interpretor& di, //cout << " -R : Discontinuities are treated like Round Corner" << endl; //cout << " Treatement is Intersect and Fill" << endl; //cout << " -S : To build a Solid" << endl; - di << "build sweep result [-M/-C/-R] [-S] [tol] : options are" << "\n"; - di << " -M : Discontinuities are treated by Modfication of"<< "\n"; - di << " the sweeping mode : it is the default" <<"\n"; - di << " -C : Discontinuities are treated like Right Corner" << "\n"; - di << " Treatement is Extent && Intersect" << "\n"; - di << " -R : Discontinuities are treated like Round Corner" << "\n"; - di << " Treatement is Intersect and Fill" << "\n"; - di << " -S : To build a Solid" << "\n"; + di << "build sweep result [-M/-C/-R] [-S] [tol] : options are\n"; + di << " -M : Discontinuities are treated by Modfication of\n"; + di << " the sweeping mode : it is the default\n"; + di << " -C : Discontinuities are treated like Right Corner\n"; + di << " Treatement is Extent && Intersect\n"; + di << " -R : Discontinuities are treated like Round Corner\n"; + di << " Treatement is Intersect and Fill\n"; + di << " -S : To build a Solid\n"; return 0; } Standard_Boolean mksolid = Standard_False; if (Sweep ==0) { //cout << "You have forgotten the <> command !"<< endl; - di << "You have forgotten the <> command !"<< "\n"; + di << "You have forgotten the <> command !\n"; return 1; } if (!Sweep->IsReady()) { //cout << "You have forgotten the <> command !"<< endl; - di << "You have forgotten the <> command !"<< "\n"; + di << "You have forgotten the <> command !\n"; return 1; } @@ -730,15 +730,15 @@ static Standard_Integer buildsweep(Draw_Interpretor& di, Sweep->Build(); if (!Sweep->IsDone()) { //cout << "Buildsweep : Not Done" << endl; - di << "Buildsweep : Not Done" << "\n"; + di << "Buildsweep : Not Done\n"; BRepBuilderAPI_PipeError Stat = Sweep->GetStatus(); if (Stat == BRepBuilderAPI_PlaneNotIntersectGuide) { //cout << "Buildsweep : One Plane not intersect the guide" << endl; - di << "Buildsweep : One Plane not intersect the guide" << "\n"; + di << "Buildsweep : One Plane not intersect the guide\n"; } if (Stat == BRepBuilderAPI_ImpossibleContact) { //cout << "BuildSweep : One section can not be in contact with the guide" << endl; - di << "BuildSweep : One section can not be in contact with the guide" << "\n"; + di << "BuildSweep : One section can not be in contact with the guide\n"; } return 1; } @@ -747,7 +747,7 @@ static Standard_Integer buildsweep(Draw_Interpretor& di, Standard_Boolean B; B = Sweep->MakeSolid(); //if (!B) cout << " BuildSweep : It is impossible to make a solid !" << endl; - if (!B) di << " BuildSweep : It is impossible to make a solid !" << "\n"; + if (!B) di << " BuildSweep : It is impossible to make a solid !\n"; } result = Sweep->Shape(); DBRep::Set(a[1],result); @@ -766,13 +766,13 @@ static Standard_Integer simulsweep(Draw_Interpretor& di, if (Sweep ==0) { //cout << "You have forgotten the <> command !"<< endl; - di << "You have forgotten the <> command !"<< "\n"; + di << "You have forgotten the <> command !\n"; return 1; } if (!Sweep->IsReady()) { //cout << "You have forgotten the <> command !"<< endl; - di << "You have forgotten the <> command !"<< "\n"; + di << "You have forgotten the <> command !\n"; return 1; } diff --git a/src/BRepTest/BRepTest_TopologyCommands.cxx b/src/BRepTest/BRepTest_TopologyCommands.cxx index b153e72055..d3a8355aa0 100644 --- a/src/BRepTest/BRepTest_TopologyCommands.cxx +++ b/src/BRepTest/BRepTest_TopologyCommands.cxx @@ -168,7 +168,7 @@ static Standard_Integer halfspace(Draw_Interpretor& di, TopoDS_Shape Shell = DBRep::Get(a[2],TopAbs_SHELL); if (Shell.IsNull()) { //cout << a[2] << " must be a face or a shell" << endl; - di << a[2] << " must be a face or a shell" << "\n"; + di << a[2] << " must be a face or a shell\n"; return 1; } else { @@ -178,7 +178,7 @@ static Standard_Integer halfspace(Draw_Interpretor& di, } else { //cout << " HalfSpace NotDone" << endl; - di << " HalfSpace NotDone" << "\n"; + di << " HalfSpace NotDone\n"; return 1; } } @@ -190,7 +190,7 @@ static Standard_Integer halfspace(Draw_Interpretor& di, } else { //cout << " HalfSpace NotDone" << endl; - di << " HalfSpace NotDone" << "\n"; + di << " HalfSpace NotDone\n"; return 1; } } diff --git a/src/BRepTools/BRepTools_ShapeSet.cxx b/src/BRepTools/BRepTools_ShapeSet.cxx index 526c021b07..a89ebf538a 100644 --- a/src/BRepTools/BRepTools_ShapeSet.cxx +++ b/src/BRepTools/BRepTools_ShapeSet.cxx @@ -543,7 +543,7 @@ void BRepTools_ShapeSet::DumpGeometry(const TopoDS_Shape& S, OS << " on triangulation " << myTriangulations.FindIndex(CR->Triangulation()); if (!CR->Location().IsIdentity()) OS << " location "<Location()); - OS << endl; + OS << "\n"; } itrc.Next(); } @@ -1240,7 +1240,7 @@ void BRepTools_ShapeSet::WritePolygonOnTriangulation(Standard_OStream& OS, Handle(Message_ProgressIndicator) progress = GetProgress(); Message_ProgressSentry PS(progress, "Polygons On Triangulation", 0, nbpOntri, 1); if (Compact) - OS << "PolygonOnTriangulations " << nbpOntri << endl; + OS << "PolygonOnTriangulations " << nbpOntri << "\n"; else { OS << " -------\n"; OS <<"Dump of " << nbpOntri << " PolygonOnTriangulations\n"; @@ -1271,7 +1271,7 @@ void BRepTools_ShapeSet::WritePolygonOnTriangulation(Standard_OStream& OS, if (!Param.IsNull()) { if (!Compact) { - OS << " "<< "Parameters :"; + OS << " Parameters :"; } else OS << "1 " ; if (!Compact) OS <<" "; @@ -1360,7 +1360,7 @@ void BRepTools_ShapeSet::WritePolygon3D(Standard_OStream& OS, Message_ProgressSentry PS(progress, "3D Poligons", 0, nbpol, 1); if (Compact) - OS << "Polygon3D " << nbpol << endl; + OS << "Polygon3D " << nbpol << "\n"; else { OS << " -------\n"; OS <<"Dump of " << nbpol << " Polygon3Ds\n"; @@ -1484,7 +1484,7 @@ void BRepTools_ShapeSet::WriteTriangulation(Standard_OStream& OS, Message_ProgressSentry PS(progress, "Triangulations", 0, nbtri, 1); if (Compact) - OS << "Triangulations " << nbtri << endl; + OS << "Triangulations " << nbtri << "\n"; else { OS << " -------\n"; OS <<"Dump of " << nbtri << " Triangulations\n"; diff --git a/src/BinTools/BinTools_LocationSet.cxx b/src/BinTools/BinTools_LocationSet.cxx index f20f890944..326357cf7f 100644 --- a/src/BinTools/BinTools_LocationSet.cxx +++ b/src/BinTools/BinTools_LocationSet.cxx @@ -164,7 +164,7 @@ void BinTools_LocationSet::Write(Standard_OStream& OS) const { Standard_Integer i, nbLoc = myMap.Extent(); - OS << "Locations "<< nbLoc < HAngMax) anglHLR = HAngMax; } di << "Angle of discretization : "; - di << anglHLR * 180 / M_PI << " degrees" << "\n"; + di << anglHLR * 180 / M_PI << " degrees\n"; } if (n >= nFirst + 1) { @@ -636,7 +636,7 @@ static Standard_Integer nexplode(Draw_Interpretor& di, // Check of equality of MidXYZ for (Index=1; Index < MaxShapes; Index++) { if (MidXYZ(OrderInd(Index+1)) == MidXYZ(OrderInd(Index))) - di<<"Warning! For this shape the results may be incorrect."<<"\n"; + di<<"Warning! For this shape the results may be incorrect.\n"; } for (Index=1 ;Index <= MaxShapes; Index++) { @@ -1155,7 +1155,7 @@ static Standard_Integer normals(Draw_Interpretor& di, V.Multiply(l/x); else { V.SetCoord(l/2.,0,0); - di << "Null normal"<< "\n"; + di << "Null normal\n"; } P2 = P1; diff --git a/src/DDF/DDF_BasicCommands.cxx b/src/DDF/DDF_BasicCommands.cxx index 820fbed519..f1c9084da8 100644 --- a/src/DDF/DDF_BasicCommands.cxx +++ b/src/DDF/DDF_BasicCommands.cxx @@ -220,7 +220,7 @@ static Standard_Integer DDF_SetTagger (Draw_Interpretor& di, TDF_TagSource::Set(L); return 0; } - di << "DDF_SetTagger : Error" << "\n"; + di << "DDF_SetTagger : Error\n"; return 1; } @@ -243,7 +243,7 @@ static Standard_Integer DDF_NewTag (Draw_Interpretor& di, di << A->NewTag (); return 0; } - di << "DDF_NewTag : Error" << "\n"; + di << "DDF_NewTag : Error\n"; return 1; } @@ -273,7 +273,7 @@ static Standard_Integer DDF_NewChild (Draw_Interpretor& di, return 0; } } - di << "DDF_NewChild : Error" << "\n"; + di << "DDF_NewChild : Error\n"; return 1; } @@ -290,13 +290,13 @@ static Standard_Integer DDF_Label (Draw_Interpretor& di,Standard_Integer n, cons TDF_Label L; if (!DDF::FindLabel(DF,a[2],L,Standard_False)) { DDF::AddLabel(DF,a[2],L); - //di << "Label : " << a[2] << " created" << "\n"; + //di << "Label : " << a[2] << " created\n"; } - //else di << "Label : " << a[2] << " retrieved" << "\n"; + //else di << "Label : " << a[2] << " retrieved\n"; DDF::ReturnLabel(di,L); return 0; } - di << "DDF_Label : Error" << "\n"; + di << "DDF_Label : Error\n"; return 1; } diff --git a/src/DDF/DDF_DataCommands.cxx b/src/DDF/DDF_DataCommands.cxx index a1d00aace5..254bb98280 100644 --- a/src/DDF/DDF_DataCommands.cxx +++ b/src/DDF/DDF_DataCommands.cxx @@ -66,7 +66,7 @@ static Standard_Integer MakeDF (Draw_Interpretor& di, if (!D.IsNull ()) { NewDDF = Handle(DDF_Data)::DownCast (D); if (!NewDDF.IsNull ()) { - di<<"DDF_BasicCommands::MakeDF - Sorry, this Data Framework already exists"<<"\n"; + di<<"DDF_BasicCommands::MakeDF - Sorry, this Data Framework already exists\n"; return 0; } } @@ -108,7 +108,7 @@ static Standard_Integer ClearDF (Draw_Interpretor& di, } } - di<<"DDF_BasicCommands::MakeDF - Sorry, this Data Framework doesn't exist"<<"\n"; + di<<"DDF_BasicCommands::MakeDF - Sorry, this Data Framework doesn't exist\n"; return 0; } @@ -182,18 +182,18 @@ static Standard_Integer MiniDumpDF (Draw_Interpretor& di, D = Draw::Get(a[1]); if (D.IsNull ()) { - di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist"<<"\n"; + di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist\n"; return Standard_False; } DDF = Handle(DDF_Data)::DownCast (D); if (DDF.IsNull ()) { - di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist"<<"\n"; + di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist\n"; return Standard_False; } - di<<"*********** Dump of "<DataFramework()->Dump(cout); Standard_SStream aSStream; @@ -220,18 +220,18 @@ static Standard_Integer XDumpDF (Draw_Interpretor& di, D = Draw::Get(a[1]); if (D.IsNull ()) { - di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist"<<"\n"; + di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist\n"; return Standard_False; } DDF = Handle(DDF_Data)::DownCast (D); if (DDF.IsNull ()) { - di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist"<<"\n"; + di<<"DDF_BasicCommands : Sorry this Data Framework doesn't exist\n"; return Standard_False; } - di<<"*********** Dump of "<DataFramework(),filter); @@ -257,7 +257,7 @@ static Standard_Integer CopyLabel_SCopy (Draw_Interpretor& di,Standard_Integer n if(!DDF::GetDF(a[1], DF)) return 1; if (!DDF::FindLabel(DF,a[2],SOURCE)) return 1; if (DDF::FindLabel(DF,a[3],TARGET)) { - di << " target label is already setted "<< "\n"; + di << " target label is already setted \n"; return 1; } DDF::AddLabel(DF,a[3],TARGET); @@ -265,10 +265,10 @@ static Standard_Integer CopyLabel_SCopy (Draw_Interpretor& di,Standard_Integer n cop.Load(SOURCE, TARGET); cop.Perform(); if (!cop.IsDone()) - di << "copy not done" << "\n"; + di << "copy not done\n"; return 0; } - di << "DDF_CopyLabel : Error" << "\n"; + di << "DDF_CopyLabel : Error\n"; return 1; } @@ -327,10 +327,10 @@ static Standard_Integer DDF_CheckAttrs (Draw_Interpretor& di,Standard_Integer n ds1->Clear(); } if(!Shar) - di << "Shareable attributes not found" << "\n"; + di << "Shareable attributes not found\n"; return 0; } - di << "DDF_CheckAttrs : Error" << "\n"; + di << "DDF_CheckAttrs : Error\n"; return 1; } @@ -367,7 +367,7 @@ static Standard_Integer DDF_CheckLabel (Draw_Interpretor& di,Standard_Integer n return 0; } - di << "DDF_ChecLabel : Error" << "\n"; + di << "DDF_ChecLabel : Error\n"; return 1; } diff --git a/src/DDF/DDF_TransactionCommands.cxx b/src/DDF/DDF_TransactionCommands.cxx index 281f0f295e..1b1cd0bc07 100644 --- a/src/DDF/DDF_TransactionCommands.cxx +++ b/src/DDF/DDF_TransactionCommands.cxx @@ -84,7 +84,7 @@ static Standard_Integer AbortTran (Draw_Interpretor& di, DDF_TStack.RemoveFirst(); } else { - di<<"DDF_BasicCommands::AbortTran - No more transaction to abort"<<"\n"; + di<<"DDF_BasicCommands::AbortTran - No more transaction to abort\n"; } } return 0; @@ -113,7 +113,7 @@ static Standard_Integer CommitTran (Draw_Interpretor& di, DDF_TStack.RemoveFirst(); } else { - di<<"DDF_BasicCommands::CommitTran - No more transaction to commit"<<"\n"; + di<<"DDF_BasicCommands::CommitTran - No more transaction to commit\n"; } } return 0; @@ -172,17 +172,17 @@ static Standard_Integer Undo (Draw_Interpretor& di, DDF_LastDelta = tmp; } else { - di<<"Undo not applicable HERE and NOW."<<"\n"; + di<<"Undo not applicable HERE and NOW.\n"; return 1; } } else { - di<<"No undo to apply."<<"\n"; + di<<"No undo to apply.\n"; return 1; } } else { - di<<"Unknown DF."<<"\n"; + di<<"Unknown DF.\n"; return 1; } return 0; diff --git a/src/DDataStd/DDataStd_BasicCommands.cxx b/src/DDataStd/DDataStd_BasicCommands.cxx index 19b0bfe662..f4dc8f8a8e 100644 --- a/src/DDataStd/DDataStd_BasicCommands.cxx +++ b/src/DDataStd/DDataStd_BasicCommands.cxx @@ -116,7 +116,7 @@ static Standard_Integer DDataStd_SetInteger (Draw_Interpretor& di, TDataStd_Integer::Set(L,Draw::Atoi(arg[3])); return 0; } - di << "DDataStd_SetInteger : Error" << "\n"; + di << "DDataStd_SetInteger : Error\n"; return 1; } @@ -137,7 +137,7 @@ static Standard_Integer DDataStd_SetReal (Draw_Interpretor& di, TDataStd_Real::Set(L,Draw::Atof(arg[3])); return 0; } - di << "DDataStd_SetReal : Error" << "\n"; + di << "DDataStd_SetReal : Error\n"; return 1; } @@ -162,7 +162,7 @@ static Standard_Integer DDataStd_SetReference (Draw_Interpretor& di, TDF_Reference::Set(L,LREF); return 0; } - di << "DDataStd_SetReference : Error" << "\n"; + di << "DDataStd_SetReference : Error\n"; return 1; } @@ -184,7 +184,7 @@ static Standard_Integer DDataStd_SetComment (Draw_Interpretor& di, TDataStd_Comment::Set(L,TCollection_ExtendedString(arg[3],Standard_True)); return 0; } - di << "DDataStd_SetComment : Error" << "\n"; + di << "DDataStd_SetComment : Error\n"; return 1; } @@ -209,7 +209,7 @@ static Standard_Integer DDataStd_GetInteger (Draw_Interpretor& di, di << A->Get(); return 0; } - di << "DDataStd_GetInteger : Error" << "\n"; + di << "DDataStd_GetInteger : Error\n"; return 1; } @@ -232,7 +232,7 @@ static Standard_Integer DDataStd_GetReal (Draw_Interpretor& di, di << A->Get(); return 0; } - di << "DDataStd_GetReal : Error" << "\n"; + di << "DDataStd_GetReal : Error\n"; return 1; } @@ -255,7 +255,7 @@ static Standard_Integer DDataStd_GetReference (Draw_Interpretor& di, di << entry.ToCString(); return 0; } - di << "DDataStd_GetReference : Error" << "\n"; + di << "DDataStd_GetReference : Error\n"; return 1; } @@ -277,7 +277,7 @@ static Standard_Integer DDataStd_GetComment (Draw_Interpretor& di, di << A->Get().ToExtString(); return 0; } - di << "DDataStd_GetComment : Error" << "\n"; + di << "DDataStd_GetComment : Error\n"; return 1; } @@ -306,7 +306,7 @@ static Standard_Integer DDataStd_Self (Draw_Interpretor& di, // } return 0; } - di << "Self : Error" << "\n"; + di << "Self : Error\n"; return 0; } @@ -543,7 +543,7 @@ static Standard_Integer DDataStd_GetIntArrayValue (Draw_Interpretor& di, Standard_Integer index = Draw::Atoi(arg[3]); if (index < A->Lower() || index > A->Upper()) { - di << "Index is out of range" << "\n"; + di << "Index is out of range\n"; return 1; } else { di << A->Value(index) << "\n"; @@ -605,7 +605,7 @@ static Standard_Integer DDataStd_ChangeIntArray (Draw_Interpretor& di, } return 0; } - di << "DDataStd_ChangeIntArray: Error" << "\n"; + di << "DDataStd_ChangeIntArray: Error\n"; return 0; } @@ -758,7 +758,7 @@ static Standard_Integer DDataStd_GetRealArrayValue (Draw_Interpretor& di, Standard_Integer index = Draw::Atoi(arg[3]); if (index < A->Lower() || index > A->Upper()) { - di << "Index is out of range" << "\n"; + di << "Index is out of range\n"; return 1; } else { di << A->Value(index) << "\n"; @@ -820,7 +820,7 @@ static Standard_Integer DDataStd_ChangeRealArray (Draw_Interpretor& di, } return 0; } - di << "DDataStd_ChangeRealArray: Error" << "\n"; + di << "DDataStd_ChangeRealArray: Error\n"; return 0; } @@ -847,7 +847,7 @@ static Standard_Integer DDataStd_SetVariable (Draw_Interpretor& di, return 0; } - di << "Wrong arguments" << "\n"; + di << "Wrong arguments\n"; return 1; } @@ -868,7 +868,7 @@ static Standard_Integer DDataStd_GetVariable (Draw_Interpretor& di, Handle(TDataStd_Variable) aV; if (!label.FindAttribute(TDataStd_Variable::GetID(), aV)) { - di << "TDataStd_Variable: no such attribute" << "\n"; + di << "TDataStd_Variable: no such attribute\n"; } Draw::Set(arg[3],TCollection_AsciiString(Standard_Integer(aV->IsConstant())).ToCString()); @@ -876,7 +876,7 @@ static Standard_Integer DDataStd_GetVariable (Draw_Interpretor& di, return 0; } - di << "Wrong arguments" << "\n"; + di << "Wrong arguments\n"; return 1; } @@ -909,14 +909,14 @@ static Standard_Integer DDataStd_SetRelation (Draw_Interpretor& di, } if (!label.FindAttribute(TDataStd_Variable::GetID(), aV)) { - di << "No TDataStd_Variable Attribute on label" << "\n"; + di << "No TDataStd_Variable Attribute on label\n"; return 1; } aR->GetVariables().Append(aV); } return 0; } - di << "Usage: SetRelation (DF, entry, expression, var1[, var2, ...])" << "\n"; + di << "Usage: SetRelation (DF, entry, expression, var1[, var2, ...])\n"; return 1; } @@ -964,7 +964,7 @@ static Standard_Integer DDataStd_DumpRelation (Draw_Interpretor& di, di << ")"; return 0; } - di << "Usage: DumpRelation (DF, entry)" << "\n"; + di << "Usage: DumpRelation (DF, entry)\n"; return 1; } @@ -1015,7 +1015,7 @@ static Standard_Integer DDataStd_GetFunction (Draw_Interpretor& di, Handle(TFunction_Function) aF; if (!label.FindAttribute(TFunction_Function::GetID(), aF)) { - di << "No TFunction_Function Attribute on label" << "\n"; + di << "No TFunction_Function Attribute on label\n"; } else { @@ -1149,7 +1149,7 @@ static Standard_Integer DDataStd_GetExtStringArrayValue (Draw_Interpretor& di, Standard_Integer index = Draw::Atoi(arg[3]); if (index < A->Lower() || index > A->Upper()) { - di << "Index is out of range" << "\n"; + di << "Index is out of range\n"; return 1; } else { const TCollection_ExtendedString& value = A->Value(index); @@ -1212,7 +1212,7 @@ static Standard_Integer DDataStd_ChangeExtStrArray (Draw_Interpretor& di, } return 0; } - di << "DDataStd_ChangeExtStringArray: Error" << "\n"; + di << "DDataStd_ChangeExtStringArray: Error\n"; return 0; } @@ -1259,7 +1259,7 @@ static Standard_Integer DDataStd_KeepUTF (Draw_Interpretor& di, } return 0; } - di << "SetUTFName : String is not kept in DF" << "\n"; + di << "SetUTFName : String is not kept in DF\n"; return 1; } @@ -1324,7 +1324,7 @@ static Standard_Integer DDataStd_GetUTFtoFile (Draw_Interpretor& di, anOS.close(); return 0; } - di << "GetUTF : Data is not extracted to the specified file " <<"\n"; + di << "GetUTF : Data is not extracted to the specified file \n"; return 1; } @@ -1359,7 +1359,7 @@ static Standard_Integer DDataStd_SetByteArray (Draw_Interpretor& di, } return 0; } - di << "DDataStd_SetByteArray: Error" << "\n"; + di << "DDataStd_SetByteArray: Error\n"; return 1; } @@ -1436,7 +1436,7 @@ static Standard_Integer DDataStd_SetBooleanArray (Draw_Interpretor& di, } return 0; } - di << "DDataStd_SetBooleanArray: Error" << "\n"; + di << "DDataStd_SetBooleanArray: Error\n"; return 1; } @@ -1463,7 +1463,7 @@ static Standard_Integer DDataStd_SetBooleanArrayValue (Draw_Interpretor& di, // Check the value. if (value != 0 && value != 1) { - di << "DDataStd_SetBooleanArrayValue: Error! The value should be either 0 or 1." << "\n"; + di << "DDataStd_SetBooleanArrayValue: Error! The value should be either 0 or 1.\n"; return 1; } @@ -1501,7 +1501,7 @@ static Standard_Integer DDataStd_SetExtStringList (Draw_Interpretor& di, } return 0; } - di << "DDataStd_SetExtStringList: Error" << "\n"; + di << "DDataStd_SetExtStringList: Error\n"; return 1; } // @@ -1532,7 +1532,7 @@ static Standard_Integer DDataStd_SetReferenceList (Draw_Interpretor& di, return 0; } } - di << "DDataStd_SetReferenceList: Error" << "\n"; + di << "DDataStd_SetReferenceList: Error\n"; return 1; } @@ -1565,7 +1565,7 @@ static Standard_Integer DDataStd_SetBooleanList (Draw_Interpretor& di, } return 0; } - di << "DDataStd_SetBooleanList: Error" << "\n"; + di << "DDataStd_SetBooleanList: Error\n"; return 1; } @@ -1592,7 +1592,7 @@ static Standard_Integer DDataStd_SetIntegerList (Draw_Interpretor& di, } return 0; } - di << "DDataStd_SetIntegerList: Error" << "\n"; + di << "DDataStd_SetIntegerList: Error\n"; return 1; } @@ -1619,7 +1619,7 @@ static Standard_Integer DDataStd_SetRealList (Draw_Interpretor& di, } return 0; } - di << "DDataStd_SetRealList: Error" << "\n"; + di << "DDataStd_SetRealList: Error\n"; return 1; } @@ -1681,7 +1681,7 @@ static Standard_Integer DDataStd_GetByteArrayValue (Draw_Interpretor& di, Standard_Integer index = Draw::Atoi(arg[3]); if (index < A->Lower() || index > A->Upper()) { - di << "Index is out of range" << "\n"; + di << "Index is out of range\n"; return 1; } else { di << A->Value(index) << "\n"; @@ -1750,7 +1750,7 @@ static Standard_Integer DDataStd_GetBooleanArrayValue (Draw_Interpretor& di, Standard_Integer index = Draw::Atoi(arg[3]); if (index < A->Lower() || index > A->Upper()) { - di << "Index is out of range" << "\n"; + di << "Index is out of range\n"; return 1; } else { di << ((A->Value(index) == Standard_True) ? "True" : "False") << "\n"; @@ -1816,7 +1816,7 @@ static Standard_Integer DDataStd_ChangeByteArray (Draw_Interpretor& di, } return 0; } - di << "DDataStd_ChangeByteArray: Error" << "\n"; + di << "DDataStd_ChangeByteArray: Error\n"; return 1; } @@ -1856,10 +1856,10 @@ static Standard_Integer DDataStd_GetBooleanList (Draw_Interpretor& di, } di << "\n"; } else - di << "List is empty" << "\n"; + di << "List is empty\n"; return 0; } - di << "DDataStd_GetBooleanList: Error" << "\n"; + di << "DDataStd_GetBooleanList: Error\n"; return 1; } @@ -1899,11 +1899,11 @@ static Standard_Integer DDataStd_GetIntegerList (Draw_Interpretor& di, } di << "\n"; } else - di << "List is empty" << "\n"; + di << "List is empty\n"; return 0; } - di << "DDataStd_GetIntegerList: Error" << "\n"; + di << "DDataStd_GetIntegerList: Error\n"; return 1; } @@ -1943,10 +1943,10 @@ static Standard_Integer DDataStd_GetRealList (Draw_Interpretor& di, } di << "\n"; } else - di << "List is empty" << "\n"; + di << "List is empty\n"; return 0; } - di << "DDataStd_GetRealList: Error" << "\n"; + di << "DDataStd_GetRealList: Error\n"; return 1; } @@ -1989,11 +1989,11 @@ static Standard_Integer DDataStd_GetExtStringList (Draw_Interpretor& di, di << "\n"; } else { - di << "List is empty" << "\n"; + di << "List is empty\n"; } return 0; } - di << "DDataStd_GetExtStringList: Error" << "\n"; + di << "DDataStd_GetExtStringList: Error\n"; return 1; } @@ -2039,10 +2039,10 @@ static Standard_Integer DDataStd_GetReferenceList (Draw_Interpretor& di, } di << "\n"; } else - di << "List is empty" << "\n"; + di << "List is empty\n"; return 0; } - di << "DDataStd_GetReferenceList: Error" << "\n"; + di << "DDataStd_GetReferenceList: Error\n"; return 1; } // @@ -2080,7 +2080,7 @@ static Standard_Integer DDataStd_SetIntPackedMap (Draw_Interpretor& di, cout << "Map extent = " << anAtt->Extent()<SetArrayOfIntegers(aKey, anArr); return 0; } - di << "DDataStd_SetNDataIntArrays2 : Error" << "\n"; + di << "DDataStd_SetNDataIntArrays2 : Error\n"; return 1; } @@ -2385,7 +2385,7 @@ static Standard_Integer DDataStd_SetAsciiString (Draw_Interpretor& di, cout << "String = " << anAtt->Get().ToCString() << " is kept in DF" << endl; return 0; } - di << "DDataStd_SetAsciiString : Error" << "\n"; + di << "DDataStd_SetAsciiString : Error\n"; return 1; } // @@ -2411,7 +2411,7 @@ static Standard_Integer DDataStd_GetAsciiString (Draw_Interpretor& di, cout << "String = " <Get().ToCString() << endl; return 0; } - di << "DDataStd_GetAsciiString : Error" << "\n"; + di << "DDataStd_GetAsciiString : Error\n"; return 1; } @@ -2456,7 +2456,7 @@ static Standard_Integer DDataStd_SetNDataIntegers (Draw_Interpretor& di, } return 0; } - di << "DDataStd_SetNDataIntegers : Error" << "\n"; + di << "DDataStd_SetNDataIntegers : Error\n"; return 1; } @@ -2493,7 +2493,7 @@ static Standard_Integer DDataStd_GetNDIntegers (Draw_Interpretor& di, return 0; } - di << "DDataStd_GetNDIntegers : Error" << "\n"; + di << "DDataStd_GetNDIntegers : Error\n"; return 1; } @@ -2529,7 +2529,7 @@ static Standard_Integer DDataStd_GetNDInteger (Draw_Interpretor& di, return 0; } } - di << "DDataStd_SetNDataIntegers : Error" << "\n"; + di << "DDataStd_SetNDataIntegers : Error\n"; return 1; } @@ -2566,7 +2566,7 @@ static Standard_Integer DDataStd_SetNDataReals (Draw_Interpretor& di, } return 0; } - di << "DDataStd_SetNDataReals : Error" << "\n"; + di << "DDataStd_SetNDataReals : Error\n"; return 1; } @@ -2601,7 +2601,7 @@ static Standard_Integer DDataStd_GetNDReals (Draw_Interpretor& di, } return 0; } - di << "DDataStd_GetNDReals : Error" << "\n"; + di << "DDataStd_GetNDReals : Error\n"; return 1; } @@ -2637,7 +2637,7 @@ static Standard_Integer DDataStd_GetNDReal (Draw_Interpretor& di, return 0; } } - di << "DDataStd_GetNDReal : Error" << "\n"; + di << "DDataStd_GetNDReal : Error\n"; return 1; } @@ -2674,7 +2674,7 @@ static Standard_Integer DDataStd_SetNDataStrings (Draw_Interpretor& di, } return 0; } - di << "DDataStd_SetNDataStrings : Error" << "\n"; + di << "DDataStd_SetNDataStrings : Error\n"; return 1; } @@ -2710,7 +2710,7 @@ static Standard_Integer DDataStd_GetNDStrings (Draw_Interpretor& di, } return 0; } - di << "DDataStd_GetNDStrings : Error" << "\n"; + di << "DDataStd_GetNDStrings : Error\n"; return 1; } @@ -2747,7 +2747,7 @@ static Standard_Integer DDataStd_GetNDString (Draw_Interpretor& di, return 0; } } - di << "DDataStd_GetNDString : Error" << "\n"; + di << "DDataStd_GetNDString : Error\n"; return 1; } @@ -2784,7 +2784,7 @@ static Standard_Integer DDataStd_SetNDataBytes (Draw_Interpretor& di, } return 0; } - di << "DDataStd_SetNDataBytes : Error" << "\n"; + di << "DDataStd_SetNDataBytes : Error\n"; return 1; } @@ -2819,7 +2819,7 @@ static Standard_Integer DDataStd_GetNDBytes (Draw_Interpretor& di, } return 0; } - di << "DDataStd_GetNDBytes : Error" << "\n"; + di << "DDataStd_GetNDBytes : Error\n"; return 1; } @@ -2855,7 +2855,7 @@ static Standard_Integer DDataStd_GetNDByte (Draw_Interpretor& di, return 0; } } - di << "DDataStd_GetNDByte : Error" << "\n"; + di << "DDataStd_GetNDByte : Error\n"; return 1; } //======================== IntArrays ==================================== @@ -2895,7 +2895,7 @@ static Standard_Integer DDataStd_SetNDataIntAr (Draw_Interpretor& di, anAtt->SetArrayOfIntegers(aKey, anArr); return 0; } - di << "DDataStd_SetNDataIntArrays : Error" << "\n"; + di << "DDataStd_SetNDataIntArrays : Error\n"; return 1; } @@ -2933,14 +2933,14 @@ static Standard_Integer DDataStd_GetNDIntArrays (Draw_Interpretor& di, Standard_Integer upper = anArrValue->Upper(); for(Standard_Integer i = lower; i<=upper;i++) { Standard_Integer aValue = anArrValue->Value(i); - cout << "\tValue("<Upper(); for(Standard_Integer i = lower; i<=upper;i++) { Standard_Integer aValue = anArrValue->Value(i); - cout << "\tValue("<SetArrayOfReals(aKey, anArr); return 0; } - di << "DDataStd_SetNDataRealArrays : Error" << "\n"; + di << "DDataStd_SetNDataRealArrays : Error\n"; return 1; } @@ -3063,14 +3063,14 @@ static Standard_Integer DDataStd_GetNDRealArrays (Draw_Interpretor& di, Standard_Integer upper = anArrValue->Upper(); for(Standard_Integer i = lower; i<=upper;i++) { Standard_Real aValue = anArrValue->Value(i); - cout << "\tValue("<Upper(); for(Standard_Integer i = lower; i<=upper;i++) { Standard_Real aValue = anArrValue->Value(i); - cout << "\tValue("<Lower() || index > A->Upper()) { - di << "Index is out of range" << "\n"; + di << "Index is out of range\n"; return 1; } else { const TDF_Label& value = A->Value(index); diff --git a/src/DDataStd/DDataStd_ConstraintCommands.cxx b/src/DDataStd/DDataStd_ConstraintCommands.cxx index b63a75bde5..87d139ecd0 100644 --- a/src/DDataStd/DDataStd_ConstraintCommands.cxx +++ b/src/DDataStd/DDataStd_ConstraintCommands.cxx @@ -47,9 +47,9 @@ static Standard_Integer DDataStd_SetConstraint (Draw_Interpretor& di, { if (nb < 5) { - di << "usage: SetConstraint DF entry keyword geometrie [geometrie ...]" << "\n"; - di << "or SetConstraint DF entry \"plane\" geometrie - to set plane for existing constraint" << "\n"; - di << "or SetConstraint DF entry \"value\" value - to set value for existing constraint" << "\n"; + di << "usage: SetConstraint DF entry keyword geometrie [geometrie ...]\n"; + di << "or SetConstraint DF entry \"plane\" geometrie - to set plane for existing constraint\n"; + di << "or SetConstraint DF entry \"value\" value - to set value for existing constraint\n"; return 1; } @@ -122,10 +122,10 @@ static Standard_Integer DDataStd_SetConstraint (Draw_Interpretor& di, else if (strcmp(aT,"offset") == 0) aCT = TDataXtd_OFFSET; else { - di << "DDataStd_SetConstraint : unknown type, must be one of:" << "\n"; - di << "rad/dia/minr/majr/tan/par/perp/concentric/equal/dist/angle/eqrad/symm/midp/" << "\n"; - di << "eqdist/fix/rigid or from/axis/mate/alignf/aligna/axesa/facesa/round/offset" << "\n"; - di << "or plane/value" << "\n"; + di << "DDataStd_SetConstraint : unknown type, must be one of:\n"; + di << "rad/dia/minr/majr/tan/par/perp/concentric/equal/dist/angle/eqrad/symm/midp/\n"; + di << "eqdist/fix/rigid or from/axis/mate/alignf/aligna/axesa/facesa/round/offset\n"; + di << "or plane/value\n"; return 1; } @@ -186,7 +186,7 @@ static Standard_Integer DDataStd_GetConstraint (Draw_Interpretor& di, } return 0; } - di << "DDataStd_GetConstraint : Error : not done" << "\n"; + di << "DDataStd_GetConstraint : Error : not done\n"; return 1; } @@ -200,7 +200,7 @@ static Standard_Integer DDataStd_SetPattern (Draw_Interpretor& di, { if (nb < 5) { - di << "usage: SetPattern (DF,entry,signature,NSentry[realEntry,intEntry[,NSentry,realEntry,intEntry]])" << "\n"; + di << "usage: SetPattern (DF,entry,signature,NSentry[realEntry,intEntry[,NSentry,realEntry,intEntry]])\n"; return 1; } @@ -226,9 +226,9 @@ static Standard_Integer DDataStd_SetPattern (Draw_Interpretor& di, { if (nb < 7) { - di<<"usage:"<<"\n"; - di<<"SetPattern (DF,entry,signature<=2,NSentry,realEntry,intEntry)"<<"\n"; - di<<"SetPattern (DF,entry,2 5) { - di<<"usage: SetPattern (DF,entry,signature>=5,NSentry)"<<"\n"; + di<<"usage: SetPattern (DF,entry,signature>=5,NSentry)\n"; return 1; } @@ -387,7 +387,7 @@ static Standard_Integer DDataStd_DumpPattern (Draw_Interpretor& di, } return 0; } - di << "DDataStd_DumpPattern : Error : not done" << "\n"; + di << "DDataStd_DumpPattern : Error : not done\n"; return 1; } @@ -411,7 +411,7 @@ static Standard_Integer DDataStd_SetPosition (Draw_Interpretor& di, TDataXtd_Position::Set(L,aPos); return 0; } - di << "Usage: SetPosition (DF, entry, X, Y, Z)" << "\n"; + di << "Usage: SetPosition (DF, entry, X, Y, Z)\n"; return 1; } @@ -432,7 +432,7 @@ static Standard_Integer DDataStd_GetPosition (Draw_Interpretor& di, gp_Pnt aPos; if (!TDataXtd_Position::Get(L, aPos)) { - di << "There is no TDataStd_Position attribute on this label" << "\n"; + di << "There is no TDataStd_Position attribute on this label\n"; return -1; } @@ -441,7 +441,7 @@ static Standard_Integer DDataStd_GetPosition (Draw_Interpretor& di, Draw::Set(arg[5],TCollection_AsciiString(aPos.Z()).ToCString()); return 0; } - di << "Usage: GetPosition (DF, entry, X(out), Y(out), Z(out))" << "\n"; + di << "Usage: GetPosition (DF, entry, X(out), Y(out), Z(out))\n"; return 1; } diff --git a/src/DDataStd/DDataStd_DatumCommands.cxx b/src/DDataStd/DDataStd_DatumCommands.cxx index 8b49ebb508..407ba64564 100644 --- a/src/DDataStd/DDataStd_DatumCommands.cxx +++ b/src/DDataStd/DDataStd_DatumCommands.cxx @@ -75,7 +75,7 @@ static Standard_Integer DDataStd_SetPoint (Draw_Interpretor& di, TDataXtd_Point::Set (L,p); } else { - di << "DDataStd_SetPoint : not a point" << "\n"; + di << "DDataStd_SetPoint : not a point\n"; return 1; } } @@ -104,7 +104,7 @@ static Standard_Integer DDataStd_SetAxis (Draw_Interpretor& di, else if (nb == 4) { Handle(Geom_Line) LINE = Handle(Geom_Line)::DownCast(DrawTrSurf::Get (arg[3])); if (LINE.IsNull()) { - di << "DDataStd_SetAxis : not a line" << "\n"; + di << "DDataStd_SetAxis : not a line\n"; return 1; } TDataXtd_Axis::Set (L,LINE->Lin()); @@ -135,7 +135,7 @@ static Standard_Integer DDataStd_SetPlane (Draw_Interpretor& di, else if (nb == 4) { Handle(Geom_Plane) PLANE = Handle(Geom_Plane)::DownCast(DrawTrSurf::Get (arg[3])); if (PLANE.IsNull()) { - di << "DDataStd_SetPlane : not a plane" << "\n"; + di << "DDataStd_SetPlane : not a plane\n"; return 1; } TDataXtd_Plane::Set (L,PLANE->Pln()); @@ -237,7 +237,7 @@ static Standard_Integer DDataStd_SetGeometry (Draw_Interpretor& di, { // set NS attribute TopoDS_Shape s = DBRep::Get(arg[4]); - if (s.IsNull()) { di <<"shape not found"<< "\n"; return 1;} + if (s.IsNull()) { di <<"shape not found\n"; return 1;} TNaming_Builder SI (L); SI.Generated(s); } @@ -260,8 +260,8 @@ static Standard_Integer DDataStd_SetGeometry (Draw_Interpretor& di, else if (strcmp(aT,"cyl") == 0) aType = TDataXtd_CYLINDER; else { - di << "DDataStd_SetGeometry : unknown type, must be one of:" << "\n"; - di << "any/pnt/lin/cir/ell/spl/pln/cyl" << "\n"; + di << "DDataStd_SetGeometry : unknown type, must be one of:\n"; + di << "any/pnt/lin/cir/ell/spl/pln/cyl\n"; return 1; } } @@ -295,7 +295,7 @@ static Standard_Integer DDataStd_GetGeometryType (Draw_Interpretor& di, Handle(TDataXtd_Geometry) aGA; if (!L.FindAttribute(TDataXtd_Geometry::GetID(),aGA)) { - di << "TDataStd_Geometry : attribute not found" << "\n"; + di << "TDataStd_Geometry : attribute not found\n"; return 1; } @@ -313,7 +313,7 @@ static Standard_Integer DDataStd_GetGeometryType (Draw_Interpretor& di, case TDataXtd_CYLINDER: di <<"cyl"; break; default: { - di << "DDataStd_GetGeometry : unknown type" << "\n"; + di << "DDataStd_GetGeometry : unknown type\n"; return 1; } } diff --git a/src/DDataStd/DDataStd_DrawDisplayCommands.cxx b/src/DDataStd/DDataStd_DrawDisplayCommands.cxx index 518d5b3922..c0f718cbc6 100644 --- a/src/DDataStd/DDataStd_DrawDisplayCommands.cxx +++ b/src/DDataStd/DDataStd_DrawDisplayCommands.cxx @@ -77,7 +77,7 @@ static Standard_Integer DDataStd_PNT (Draw_Interpretor& di, TDataXtd_Point::Set (L,gp_Pnt(x,y,z)); return 0; } - di << "DDataStd_PNT : Error : not done" << "\n"; + di << "DDataStd_PNT : Error : not done\n"; return 1; } @@ -96,7 +96,7 @@ static Standard_Integer DDataStd_Rmdraw (Draw_Interpretor& di, if (!D3D.IsNull()) dout.RemoveDrawable(D3D); return 0; } - di << "DDataStd_Rmdraw : Error : not done" << "\n"; + di << "DDataStd_Rmdraw : Error : not done\n"; return 1; } @@ -125,7 +125,7 @@ static Standard_Integer DDataStd_DrawOwner (Draw_Interpretor& di, else di << 0; return 0; } - di << "DDataStd_DrawOwner : Error" << "\n"; + di << "DDataStd_DrawOwner : Error\n"; return 1; } @@ -146,7 +146,7 @@ static Standard_Integer DDataStd_DrawDisplay (Draw_Interpretor& di, DDataStd_DrawPresentation::Display(L); return 0; } - di << "DDataStd_DrawDisplay : Error" << "\n"; + di << "DDataStd_DrawDisplay : Error\n"; return 1; } @@ -189,7 +189,7 @@ static Standard_Integer DDataStd_DrawErase (Draw_Interpretor& di, DDataStd_DrawPresentation::Erase(L); return 0; } - di << "DDataStd_DrawErase : Error" << "\n"; + di << "DDataStd_DrawErase : Error\n"; return 1; } @@ -210,7 +210,7 @@ static Standard_Integer DDataStd_DrawUpdate (Draw_Interpretor& di, DDataStd_DrawPresentation::Update(L); return 0; } - di << "DDataStd_DrawUpdate : Error" << "\n"; + di << "DDataStd_DrawUpdate : Error\n"; return 1; } diff --git a/src/DDataStd/DDataStd_NameCommands.cxx b/src/DDataStd/DDataStd_NameCommands.cxx index e54f6d457d..1613173213 100644 --- a/src/DDataStd/DDataStd_NameCommands.cxx +++ b/src/DDataStd/DDataStd_NameCommands.cxx @@ -71,7 +71,7 @@ static Standard_Integer DDataStd_SetName (Draw_Interpretor& di, N = TDataStd_Name::Set(L,arg[3]); return 0; } - di << "DDataStd_SetName : Error" << "\n"; + di << "DDataStd_SetName : Error\n"; return 1; } @@ -97,7 +97,7 @@ static Standard_Integer DDataStd_GetName (Draw_Interpretor& di, di << s.ToCString(); return 0; } - di << "DDataStd_SetName : Error" << "\n"; + di << "DDataStd_SetName : Error\n"; return 1; } diff --git a/src/DDataStd/DDataStd_NamedShapeCommands.cxx b/src/DDataStd/DDataStd_NamedShapeCommands.cxx index 51915f8b4c..7173f59efe 100644 --- a/src/DDataStd/DDataStd_NamedShapeCommands.cxx +++ b/src/DDataStd/DDataStd_NamedShapeCommands.cxx @@ -48,14 +48,14 @@ static Standard_Integer DDataStd_SetShape (Draw_Interpretor& di, Handle(TDF_Data) DF; if (!DDF::GetDF(arg[1],DF)) return 1; TopoDS_Shape s = DBRep::Get(arg[3]); - if (s.IsNull()) { di <<"shape not found"<< "\n"; return 1;} + if (s.IsNull()) { di <<"shape not found\n"; return 1;} TDF_Label L; DDF::AddLabel(DF, arg[2], L); TNaming_Builder SI (L); SI.Generated(s); return 0; } - di << "DDataStd_SetShape : Error" << "\n"; + di << "DDataStd_SetShape : Error\n"; return 1; } diff --git a/src/DDataStd/DDataStd_ObjectCommands.cxx b/src/DDataStd/DDataStd_ObjectCommands.cxx index be307540da..b5d3d93174 100644 --- a/src/DDataStd/DDataStd_ObjectCommands.cxx +++ b/src/DDataStd/DDataStd_ObjectCommands.cxx @@ -136,7 +136,7 @@ static Standard_Integer DDataStd_NewNoteBook (Draw_Interpretor& di, TDataStd_NoteBook::New(L); return 0; } - di << "DDataStd_NewNoteBook : Error" << "\n"; + di << "DDataStd_NewNoteBook : Error\n"; return 1; } diff --git a/src/DDataStd/DDataStd_TreeCommands.cxx b/src/DDataStd/DDataStd_TreeCommands.cxx index 1026d401d1..b7ac5c8d80 100644 --- a/src/DDataStd/DDataStd_TreeCommands.cxx +++ b/src/DDataStd/DDataStd_TreeCommands.cxx @@ -53,7 +53,7 @@ static Standard_Integer DDataStd_SetNode (Draw_Interpretor& di, return 0; } else if (n == 4) { if (!Standard_GUID::CheckGUIDFormat(a[3])) { - di<<"DDataStd_SetNode: The format of GUID is invalid"<<"\n"; + di<<"DDataStd_SetNode: The format of GUID is invalid\n"; return 1; } const Standard_GUID ID(a[3]); @@ -61,7 +61,7 @@ static Standard_Integer DDataStd_SetNode (Draw_Interpretor& di, DDF::ReturnLabel(di,TN->Label()); return 0; } - di << "DDataStd_SetNode : Error" << "\n"; + di << "DDataStd_SetNode : Error\n"; return 1; } @@ -84,7 +84,7 @@ static Standard_Integer DDataStd_AppendNode (Draw_Interpretor& di, ID=Standard_GUID(TDataStd_TreeNode::GetDefaultTreeID()); else{ if (!Standard_GUID::CheckGUIDFormat(a[4])) { - di<<"DDataStd_AppendNode: The format of GUID is invalid"<<"\n"; + di<<"DDataStd_AppendNode: The format of GUID is invalid\n"; return 1; } const Standard_GUID varID(a[4]); @@ -97,17 +97,17 @@ static Standard_Integer DDataStd_AppendNode (Draw_Interpretor& di, DDF::AddLabel(DF,a[3],L); if ( (L.FindAttribute(ID,child)) &&(!child->IsRoot()) ){ - di << "DDataStd_AppendNode : Error : childTreeNode don't detach" << "\n"; + di << "DDataStd_AppendNode : Error : childTreeNode don't detach\n"; return 1; } child = TDataStd_TreeNode::Set(L,ID); if (!father->Append(child)) return 1; #ifdef OCCT_DEBUG - di<<"AppendNode: OK"<<"\n"; + di<<"AppendNode: OK\n"; #endif return 0; } - di << "DDataStd_AppendNode : Error" << "\n"; + di << "DDataStd_AppendNode : Error\n"; return 1; } @@ -130,7 +130,7 @@ static Standard_Integer DDataStd_PrependNode (Draw_Interpretor& di, ID=Standard_GUID(TDataStd_TreeNode::GetDefaultTreeID()); else{ if (!Standard_GUID::CheckGUIDFormat(a[4])) { - di<<"DDataStd_PrependNode: The format of GUID is invalid"<<"\n"; + di<<"DDataStd_PrependNode: The format of GUID is invalid\n"; return 1; } const Standard_GUID varID(a[4]); @@ -143,17 +143,17 @@ static Standard_Integer DDataStd_PrependNode (Draw_Interpretor& di, DDF::AddLabel(DF,a[3],L); if ( (L.FindAttribute(ID,child)) &&(!child->IsRoot()) ){ - di << "DDataStd_PrependNode : Error : childTreeNode don't detach" << "\n"; + di << "DDataStd_PrependNode : Error : childTreeNode don't detach\n"; return 1; } child = TDataStd_TreeNode::Set(L,ID); if (!father->Prepend(child)) return 1; #ifdef OCCT_DEBUG - di<<"PrependNode: OK"<<"\n"; + di<<"PrependNode: OK\n"; #endif return 0; } - di << "DDataStd_PrependNode : Error" << "\n"; + di << "DDataStd_PrependNode : Error\n"; return 1; } @@ -176,7 +176,7 @@ static Standard_Integer DDataStd_RootNode (Draw_Interpretor& di, ID=Standard_GUID(TDataStd_TreeNode::GetDefaultTreeID()); else{ if (!Standard_GUID::CheckGUIDFormat(a[3])) { - di<<"DDataStd_RootNode: The format of GUID is invalid"<<"\n"; + di<<"DDataStd_RootNode: The format of GUID is invalid\n"; return 1; } const Standard_GUID varID(a[3]); @@ -187,7 +187,7 @@ static Standard_Integer DDataStd_RootNode (Draw_Interpretor& di, DDF::ReturnLabel(di,TN->Root()->Label()); return 0; } - di << "DDataStd_RootNode : Error" << "\n"; + di << "DDataStd_RootNode : Error\n"; return 1; } @@ -210,7 +210,7 @@ static Standard_Integer DDataStd_InsertNodeBefore(Draw_Interpretor& di, ID=Standard_GUID(TDataStd_TreeNode::GetDefaultTreeID()); else{ if (!Standard_GUID::CheckGUIDFormat(a[4])) { - di<<"DDataStd_InsertNodeBefore: The format of GUID is invalid"<<"\n"; + di<<"DDataStd_InsertNodeBefore: The format of GUID is invalid\n"; return 1; } const Standard_GUID varID(a[4]); @@ -226,7 +226,7 @@ static Standard_Integer DDataStd_InsertNodeBefore(Draw_Interpretor& di, if (!current->InsertBefore(TN)) return 1; return 0; } - di << "DDataStd_InsertBefore : Error" << "\n"; + di << "DDataStd_InsertBefore : Error\n"; return 1; } @@ -249,7 +249,7 @@ static Standard_Integer DDataStd_InsertNodeAfter(Draw_Interpretor& di, ID=Standard_GUID(TDataStd_TreeNode::GetDefaultTreeID()); else{ if (!Standard_GUID::CheckGUIDFormat(a[4])) { - di<<"DDataStd_InsertNodeAfter: The format of GUID is invalid"<<"\n"; + di<<"DDataStd_InsertNodeAfter: The format of GUID is invalid\n"; return 1; } const Standard_GUID varID(a[4]); @@ -264,7 +264,7 @@ static Standard_Integer DDataStd_InsertNodeAfter(Draw_Interpretor& di, if (!current->InsertAfter(TN)) return 1; return 0; } - di << "DDataStd_InsertNodeAfter : Error" << "\n"; + di << "DDataStd_InsertNodeAfter : Error\n"; return 1; } @@ -285,7 +285,7 @@ static Standard_Integer DDataStd_DetachNode (Draw_Interpretor& di,Standard_Integ ID=Standard_GUID(TDataStd_TreeNode::GetDefaultTreeID()); else{ if (!Standard_GUID::CheckGUIDFormat(a[3])) { - di<<"DDataStd_DetachNode: The format of GUID is invalid"<<"\n"; + di<<"DDataStd_DetachNode: The format of GUID is invalid\n"; return 1; } const Standard_GUID varID(a[3]); @@ -294,10 +294,10 @@ static Standard_Integer DDataStd_DetachNode (Draw_Interpretor& di,Standard_Integ if (!DDF::Find(DF,a[2],ID,TN)) return 1; if (!TN->Remove()) - di << "Can't Detach the TreeNode" << "\n"; + di << "Can't Detach the TreeNode\n"; return 0; } - di << "DDataStd_DetachNode : Error" << "\n"; + di << "DDataStd_DetachNode : Error\n"; return 1; } @@ -384,7 +384,7 @@ static Standard_Integer DDataStd_ChildNodeIterate (Draw_Interpretor& di, ID=Standard_GUID(TDataStd_TreeNode::GetDefaultTreeID()); else{ if (!Standard_GUID::CheckGUIDFormat(a[4])) { - di<<"DDataStd_ChildNodeIterate: The format of GUID is invalid"<<"\n"; + di<<"DDataStd_ChildNodeIterate: The format of GUID is invalid\n"; return 1; } const Standard_GUID varID(a[4]); @@ -392,7 +392,7 @@ static Standard_Integer DDataStd_ChildNodeIterate (Draw_Interpretor& di, } if (!DDF::Find(DF, a[2], ID, TN)) return 1; - //di<<"TDataStd_ChildNodeIterator: "<<"\n"; + //di<<"TDataStd_ChildNodeIterator: \n"; TDataStd_ChildNodeIterator itr(TN, AllLevels); for (; itr.More(); itr.Next()) { Value = itr.Value(); @@ -406,7 +406,7 @@ static Standard_Integer DDataStd_ChildNodeIterate (Draw_Interpretor& di, di<<"\n"; return 0; } - di << "DDataStd_ChildNodeIterate : Error" << "\n"; + di << "DDataStd_ChildNodeIterate : Error\n"; return 1; } @@ -431,7 +431,7 @@ static Standard_Integer DDataStd_InitChildNodeIterator (Draw_Interpretor& di, ID=Standard_GUID(TDataStd_TreeNode::GetDefaultTreeID()); else{ if (!Standard_GUID::CheckGUIDFormat(a[4])) { - di<<"DDataStd_ChildNodeIterator: The format of GUID is invalid"<<"\n"; + di<<"DDataStd_ChildNodeIterator: The format of GUID is invalid\n"; return 1; } const Standard_GUID varID(a[4]); @@ -443,7 +443,7 @@ static Standard_Integer DDataStd_InitChildNodeIterator (Draw_Interpretor& di, cni.Initialize(TN, AllLevels); return 0; } - di << "DDataStd_InitChildNodeIterator : Error" << "\n"; + di << "DDataStd_InitChildNodeIterator : Error\n"; return 1; } @@ -458,11 +458,11 @@ static Standard_Integer DDataStd_ChildNodeMore (Draw_Interpretor& di, { if (cni.More()) { //cout<<"TRUE"<Main()); } - else di << a[1] << " is already a document" << "\n"; + else di << a[1] << " is already a document\n"; return 0; } if (nb == 3) { @@ -110,13 +110,13 @@ static Standard_Integer DDocStd_NewDocument (Draw_Interpretor& di, DD = new DDocStd_DrawDocument(D); TDataStd_Name::Set(D->GetData()->Root(),a[1]); Draw::Set(a[1],DD); - di << "document " << a[1] << " created" << "\n"; + di << "document " << a[1] << " created\n"; DDocStd::ReturnLabel(di,D->Main()); } - else di << a[1] << " is already a document" << "\n"; + else di << a[1] << " is already a document\n"; return 0; } - di << "DDocStd_NewDocument : Error" << "\n"; + di << "DDocStd_NewDocument : Error\n"; return 1; } @@ -136,7 +136,7 @@ static Standard_Integer DDocStd_Open (Draw_Interpretor& di, Handle(TDocStd_Document) D; Standard_Integer insession = A->IsInSession(path); if (insession > 0) { - di <<"document " << insession << " is already in session" << "\n"; + di <<"document " << insession << " is already in session\n"; return 0; } PCDM_ReaderStatus theStatus = A->Open(path,D); @@ -149,32 +149,32 @@ static Standard_Integer DDocStd_Open (Draw_Interpretor& di, switch ( theStatus ) { case PCDM_RS_AlreadyRetrieved: case PCDM_RS_AlreadyRetrievedAndModified: { - di << " already retrieved " << "\n" ; + di << " already retrieved \n" ; break; } case PCDM_RS_NoDriver: { - di << " could not retrieve , no Driver to make it " <<"\n" ; + di << " could not retrieve , no Driver to make it \n" ; break ; } case PCDM_RS_UnknownDocument: case PCDM_RS_NoModel: { - di << " could not retrieve , Unknown Document or No Model " <<"\n"; + di << " could not retrieve , Unknown Document or No Model \n"; break ; } case PCDM_RS_TypeNotFoundInSchema: case PCDM_RS_UnrecognizedFileFormat: { - di << " could not retrieve , Type not found or Unrecognized File Format" <<"\n"; + di << " could not retrieve , Type not found or Unrecognized File Format\n"; break ; } case PCDM_RS_PermissionDenied: { - di << " could not retrieve , permission denied " << "\n" ; + di << " could not retrieve , permission denied \n" ; break; } default: - di << " could not retrieve " << "\n" ; + di << " could not retrieve \n" ; break; } - di << "DDocStd_Open : Error" << "\n"; + di << "DDocStd_Open : Error\n"; } } return 1; @@ -195,13 +195,13 @@ static Standard_Integer DDocStd_Save (Draw_Interpretor& di, Handle(TDocStd_Application) A; if (!DDocStd::Find(A)) return 1; if (!D->IsSaved()) { - di << "this document has never been saved" << "\n"; + di << "this document has never been saved\n"; return 0; } A->Save(D); return 0; } - di << "DDocStd_Save : Error" << "\n"; + di << "DDocStd_Save : Error\n"; return 1; } @@ -224,27 +224,27 @@ static Standard_Integer DDocStd_SaveAs (Draw_Interpretor& di, if (theStatus != PCDM_SS_OK ) { switch ( theStatus ) { case PCDM_SS_DriverFailure: { - di << "Error saving document: Could not store , no driver found to make it" << "\n"; + di << "Error saving document: Could not store , no driver found to make it\n"; break ; } case PCDM_SS_WriteFailure: { - di << "Error saving document: Write access failure" << "\n"; + di << "Error saving document: Write access failure\n"; break; } case PCDM_SS_Failure: { - di << "Error saving document: Write failure" << "\n" ; + di << "Error saving document: Write failure\n" ; break; } case PCDM_SS_Doc_IsNull: { - di << "Error saving document: No document to save" << "\n"; + di << "Error saving document: No document to save\n"; break ; } case PCDM_SS_No_Obj: { - di << "Error saving document: No objects written" << "\n"; + di << "Error saving document: No objects written\n"; break; } case PCDM_SS_Info_Section_Error: { - di << "Error saving document: Write info section failure" << "\n" ; + di << "Error saving document: Write info section failure\n" ; break; } default: @@ -255,7 +255,7 @@ static Standard_Integer DDocStd_SaveAs (Draw_Interpretor& di, return 0; } } - di << "DDocStd_SaveAs : Error not enough argument" << "\n"; + di << "DDocStd_SaveAs : Error not enough argument\n"; return 1; } @@ -323,7 +323,7 @@ static Standard_Integer DDocStd_IsInSession (Draw_Interpretor& di, di << A->IsInSession(a[1]); return 0; } - di << "DDocStd_IsInSession : Error" << "\n"; + di << "DDocStd_IsInSession : Error\n"; return 1; } @@ -348,7 +348,7 @@ static Standard_Integer DDocStd_OSDPath (Draw_Interpretor& di, di << "Extension : " << path.Extension().ToCString() << "\n"; return 0; } - di << "DDocStd_OSDPath : Error" << "\n"; + di << "DDocStd_OSDPath : Error\n"; return 1; } @@ -378,7 +378,7 @@ static Standard_Integer DDocStd_Path (Draw_Interpretor& di, di << "Path : " << PathAsciiString.ToCString() << "\n"; return 0; } - di << "DDocStd_Path : Error" << "\n"; + di << "DDocStd_Path : Error\n"; return 1; } @@ -400,7 +400,7 @@ static Standard_Integer DDocStd_AddComment (Draw_Interpretor& di, D->AddComment(comment); return 0; } - di << "DDocStd_AddComment : Wrong arguments number" << "\n"; + di << "DDocStd_AddComment : Wrong arguments number\n"; return 1; } @@ -428,7 +428,7 @@ static Standard_Integer DDocStd_PrintComments (Draw_Interpretor& di, return 0; } - di << "DDocStd_PrintComments : Wrong arguments number" << "\n"; + di << "DDocStd_PrintComments : Wrong arguments number\n"; return 1; } diff --git a/src/DDocStd/DDocStd_DocumentCommands.cxx b/src/DDocStd/DDocStd_DocumentCommands.cxx index dd5a9170a8..6a6ca12b78 100644 --- a/src/DDocStd/DDocStd_DocumentCommands.cxx +++ b/src/DDocStd/DDocStd_DocumentCommands.cxx @@ -61,7 +61,7 @@ static Standard_Integer DDocStd_Main (Draw_Interpretor& di,Standard_Integer nb, DDocStd::ReturnLabel(di,DOC->Main()); return 0; } - di << "DDocStd_Main : Error" << "\n"; + di << "DDocStd_Main : Error\n"; return 1; } @@ -89,7 +89,7 @@ static Standard_Integer DDocStd_Format (Draw_Interpretor& di,Standard_Integer n, D->ChangeStorageFormat(a[2]); return 0; } - di << "DDocStd_Format : Error" << "\n"; + di << "DDocStd_Format : Error\n"; return 1; } @@ -109,11 +109,11 @@ static Standard_Integer DDocStd_Copy (Draw_Interpretor& di,Standard_Integer n, c TDocStd_XLinkTool XLinkTool; XLinkTool.Copy(L,XL); if (!XLinkTool.IsDone()) { - di << "DDocStd_XLinkTool : not done" << "\n"; + di << "DDocStd_XLinkTool : not done\n"; } return 0; } - di << "DDocStd_XLinkTool : Error" << "\n"; + di << "DDocStd_XLinkTool : Error\n"; return 1; } @@ -134,11 +134,11 @@ static Standard_Integer DDocStd_CopyWithLink (Draw_Interpretor& di,Standard_Inte TDocStd_XLinkTool XLinkTool; XLinkTool.CopyWithLink(L,XL); if (!XLinkTool.IsDone()) { - di << "DDocStd_CopyWithLink : not done" << "\n"; + di << "DDocStd_CopyWithLink : not done\n"; } return 0; } - di << "DDocStd_CopyWithLink : Error" << "\n"; + di << "DDocStd_CopyWithLink : Error\n"; return 1; } @@ -157,20 +157,20 @@ static Standard_Integer DDocStd_UpdateLink (Draw_Interpretor& di,Standard_Intege if (!DDocStd::Find(DOC,a[2],TDF_Reference::GetID(),REF)) return 1; XLinkTool.UpdateLink(REF->Label()); if (!XLinkTool.IsDone()) { - di << "DDocStd_UpdateXLink : not done" << "\n"; + di << "DDocStd_UpdateXLink : not done\n"; } } else { for (TDocStd_XLinkIterator xit (DOC); xit.More(); xit.Next()) { XLinkTool.UpdateLink(xit.Value()->Label()); if (!XLinkTool.IsDone()) { - di << "DDocStd_UpdateXLink : not done" << "\n"; + di << "DDocStd_UpdateXLink : not done\n"; } } } return 0; } - di << "DDocStd_UpdateXLink : Error" << "\n"; + di << "DDocStd_UpdateXLink : Error\n"; return 1; } @@ -220,10 +220,10 @@ static Standard_Integer DDocStd_Undo (Draw_Interpretor& di,Standard_Integer n, c for (i = 1; i <= step; i++) { if (undo) { - if (!D->Undo()) di << "Undo not done" << "\n"; + if (!D->Undo()) di << "Undo not done\n"; } else { - if (!D->Redo()) di << "Redo not done" << "\n"; + if (!D->Redo()) di << "Redo not done\n"; } } @@ -305,7 +305,7 @@ static Standard_Integer DDocStd_DumpDocument (Draw_Interpretor& di, if (D->IsSaved()) di << "DOCUMENT : " << TCollection_AsciiString(D->GetName(),'?').ToCString(); else - di << "DOCUMENT : " << "not saved"; + di << "DOCUMENT : not saved"; di << "\n"; // format //cout << "FORMAT : " << D->StorageFormat(); @@ -337,7 +337,7 @@ static Standard_Integer DDocStd_DumpDocument (Draw_Interpretor& di, if (!TDocStd_Modified::IsEmpty(D->Main())) { di << "MODIFICATIONS : "; TDF_MapIteratorOfLabelMap it (D->GetModified()); - if (!it.More()) di << "VALID" << "\n"; + if (!it.More()) di << "VALID\n"; else { TCollection_AsciiString string; for (;it.More();it.Next()) { @@ -349,7 +349,7 @@ static Standard_Integer DDocStd_DumpDocument (Draw_Interpretor& di, } return 0; } - di << "DDocStd_DumpDocument : Error" << "\n"; + di << "DDocStd_DumpDocument : Error\n"; return 1; } @@ -369,7 +369,7 @@ static Standard_Integer DDocStd_SetModified (Draw_Interpretor& di,Standard_Integ } return 0; } - di << "DDocStd_SetModified : Error" << "\n"; + di << "DDocStd_SetModified : Error\n"; return 1; } @@ -400,7 +400,7 @@ static Standard_Integer DDocStd_Propagate (Draw_Interpretor& di,Standard_Integer // D->PurgeModified(); // return 0; // } - di << "DDocStd_Propagate : not implemented" << "\n"; + di << "DDocStd_Propagate : not implemented\n"; return 1; } diff --git a/src/DDocStd/DDocStd_MTMCommands.cxx b/src/DDocStd/DDocStd_MTMCommands.cxx index d431c1c557..0cddf6c9d3 100644 --- a/src/DDocStd/DDocStd_MTMCommands.cxx +++ b/src/DDocStd/DDocStd_MTMCommands.cxx @@ -63,20 +63,20 @@ static int mtmCreate (Draw_Interpretor& /*di*/, int n, const char** a) static int mtmAddDocument (Draw_Interpretor& di, int n, const char** a) { if(sMultiTransactionManager.IsNull()) { - di << "Error : manager is not initialised" << "\n"; + di << "Error : manager is not initialised\n"; return 1; } if(n > 1) { Handle(DDocStd_DrawDocument) aDrawDoc = Handle(DDocStd_DrawDocument)::DownCast(Draw::Get(a[1])); if(aDrawDoc.IsNull()) { - di << "Error : wrong document name" << "\n"; + di << "Error : wrong document name\n"; return 1; } sMultiTransactionManager->AddDocument(aDrawDoc->GetDocument()); } else { - di << "Error : document name is not defined" << "\n"; + di << "Error : document name is not defined\n"; return 1; } return 0; @@ -90,7 +90,7 @@ static int mtmAddDocument (Draw_Interpretor& di, int n, const char** a) static int mtmOpenTransaction (Draw_Interpretor& di, int /*n*/, const char** /*a*/) { if(sMultiTransactionManager.IsNull()) { - di << "Error : manager is not initialised" << "\n"; + di << "Error : manager is not initialised\n"; return 1; } sMultiTransactionManager->OpenCommand(); @@ -105,7 +105,7 @@ static int mtmOpenTransaction (Draw_Interpretor& di, int /*n*/, const char** /*a static int mtmCommitTransaction (Draw_Interpretor& di, int n, const char** a) { if(sMultiTransactionManager.IsNull()) { - di << "Error : manager is not initialised" << "\n"; + di << "Error : manager is not initialised\n"; return 1; } if(n > 1) @@ -123,7 +123,7 @@ static int mtmCommitTransaction (Draw_Interpretor& di, int n, const char** a) static int mtmAbortTransaction (Draw_Interpretor& di, int /*n*/, const char** /*a*/) { if(sMultiTransactionManager.IsNull()) { - di << "Error : manager is not initialised" << "\n"; + di << "Error : manager is not initialised\n"; return 1; } sMultiTransactionManager->AbortCommand(); @@ -138,15 +138,15 @@ static int mtmAbortTransaction (Draw_Interpretor& di, int /*n*/, const char** /* static int mtmDump (Draw_Interpretor& di, int /*n*/, const char** /*a*/) { if(sMultiTransactionManager.IsNull()) { - di << "Error : manager is not initialised" << "\n"; + di << "Error : manager is not initialised\n"; return 1; } - di << "*** Dump of MTM ***" << "\n"; + di << "*** Dump of MTM ***\n"; //sMultiTransactionManager->DumpTransaction(cout); Standard_SStream aStream; sMultiTransactionManager->DumpTransaction(aStream); di << aStream; - di << "\n" << "*** End ***" << "\n"; + di << "\n*** End ***\n"; return 0; } @@ -158,7 +158,7 @@ static int mtmDump (Draw_Interpretor& di, int /*n*/, const char** /*a*/) static int mtmUndo (Draw_Interpretor& di, int /*n*/, const char** /*a*/) { if(sMultiTransactionManager.IsNull()) { - di << "Error : manager is not initialised" << "\n"; + di << "Error : manager is not initialised\n"; return 1; } sMultiTransactionManager->Undo(); @@ -173,7 +173,7 @@ static int mtmUndo (Draw_Interpretor& di, int /*n*/, const char** /*a*/) static int mtmRedo (Draw_Interpretor& di, int /*n*/, const char** /*a*/) { if(sMultiTransactionManager.IsNull()) { - di << "Error : manager is not initialised" << "\n"; + di << "Error : manager is not initialised\n"; return 1; } sMultiTransactionManager->Redo(); @@ -188,7 +188,7 @@ static int mtmRedo (Draw_Interpretor& di, int /*n*/, const char** /*a*/) static int mtmNestedMode (Draw_Interpretor& di, int n, const char** a) { if(sMultiTransactionManager.IsNull()) { - di << "Error : manager is not initialised" << "\n"; + di << "Error : manager is not initialised\n"; return 1; } Standard_Boolean aMode = Standard_False; @@ -206,7 +206,7 @@ static int mtmNestedMode (Draw_Interpretor& di, int n, const char** a) static Standard_Integer XAttributeValue (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if ( argc <4 ) { di << "ERROR: Too few args" << "\n"; return 0; } + if ( argc <4 ) { di << "ERROR: Too few args\n"; return 0; } Handle(DDF_Browser) browser = Handle(DDF_Browser)::DownCast (Draw::Get(argv[1], Standard_True)); if ( browser.IsNull() ) { di << "ERROR: Not a browser: " << argv[1] << "\n"; return 0; } @@ -219,7 +219,7 @@ static Standard_Integer XAttributeValue (Draw_Interpretor& di, Standard_Integer TDF_AttributeIterator itr(lab,Standard_False); for (Standard_Integer i=1; itr.More() && i < num; i++) itr.Next(); - if ( ! itr.More() ) { di << "ERROR: Attribute #" << num << " not found" << "\n"; return 0; } + if ( ! itr.More() ) { di << "ERROR: Attribute #" << num << " not found\n"; return 0; } const Handle(TDF_Attribute)& att = itr.Value(); if ( att->IsKind(STANDARD_TYPE(TDataStd_TreeNode)) ) @@ -331,20 +331,20 @@ static Standard_Integer XAttributeValue (Draw_Interpretor& di, Standard_Integer static int mtmRemoveDocument (Draw_Interpretor& di, int n, const char** a) { if(sMultiTransactionManager.IsNull()) { - di << "Error : manager is not initialised" << "\n"; + di << "Error : manager is not initialised\n"; return 1; } if(n > 1) { Handle(DDocStd_DrawDocument) aDrawDoc = Handle(DDocStd_DrawDocument)::DownCast(Draw::Get(a[1])); if(aDrawDoc.IsNull()) { - di << "Error : wrong document name" << "\n"; + di << "Error : wrong document name\n"; return 1; } sMultiTransactionManager->RemoveDocument(aDrawDoc->GetDocument()); } else { - di << "Error : document name is not defined" << "\n"; + di << "Error : document name is not defined\n"; return 1; } return 0; diff --git a/src/DDocStd/DDocStd_ToolsCommands.cxx b/src/DDocStd/DDocStd_ToolsCommands.cxx index 31fa935a83..aefe5e7d98 100644 --- a/src/DDocStd/DDocStd_ToolsCommands.cxx +++ b/src/DDocStd/DDocStd_ToolsCommands.cxx @@ -67,7 +67,7 @@ static Standard_Integer DDocStd_DumpCommand (Draw_Interpretor& di, TDF_AttributeDeltaList added, forgoten, resumed, removed, modified; Handle(TDF_AttributeDelta) AD; if (D->GetUndos().IsEmpty()) { - di << "no UNDO available" << "\n"; + di << "no UNDO available\n"; return 0; } Handle(TDF_Delta) DELTA = D->GetUndos().Last(); @@ -90,7 +90,7 @@ static Standard_Integer DDocStd_DumpCommand (Draw_Interpretor& di, di << "ADDED :"; it.Initialize(added); if (it.More()) di << "\n"; - else di << " empty" << "\n"; + else di << " empty\n"; for (;it.More();it.Next()) { TDF_Tool::Entry (it.Value()->Label(),string); di << "- " << string.ToCString() << " "; @@ -102,7 +102,7 @@ static Standard_Integer DDocStd_DumpCommand (Draw_Interpretor& di, di << "FORGOTEN :"; it.Initialize(forgoten); if (it.More()) di << "\n"; - else di << " empty" << "\n"; + else di << " empty\n"; for (;it.More();it.Next()) { TDF_Tool::Entry (it.Value()->Label(),string); di << "- " << string.ToCString() << " "; @@ -114,7 +114,7 @@ static Standard_Integer DDocStd_DumpCommand (Draw_Interpretor& di, di << "RESUMED :"; it.Initialize(resumed); if (it.More()) di << "\n"; - else di << " empty" << "\n"; + else di << " empty\n"; for (;it.More();it.Next()) { TDF_Tool::Entry (it.Value()->Label(),string); di << "- " << string.ToCString() << " "; @@ -126,7 +126,7 @@ static Standard_Integer DDocStd_DumpCommand (Draw_Interpretor& di, di << "REMOVED :"; it.Initialize(removed); if (it.More()) di << "\n"; - else di << " empty" << "\n"; + else di << " empty\n"; for (;it.More();it.Next()) { TDF_Tool::Entry (it.Value()->Label(),string); di << "- " << string.ToCString() << " "; @@ -138,7 +138,7 @@ static Standard_Integer DDocStd_DumpCommand (Draw_Interpretor& di, di << "MODIFIED :"; it.Initialize(modified); if (it.More()) di << "\n"; - else di << " empty" << "\n"; + else di << " empty\n"; for (;it.More();it.Next()) { TDF_Tool::Entry (it.Value()->Label(),string); di << "- " << string.ToCString() << " "; @@ -147,7 +147,7 @@ static Standard_Integer DDocStd_DumpCommand (Draw_Interpretor& di, } return 0; } - di << "TDocStd_DumpCommand : Error" << "\n"; + di << "TDocStd_DumpCommand : Error\n"; return 1; } diff --git a/src/DNaming/DNaming_BasicCommands.cxx b/src/DNaming/DNaming_BasicCommands.cxx index 599ad7a007..3251de02a6 100644 --- a/src/DNaming/DNaming_BasicCommands.cxx +++ b/src/DNaming/DNaming_BasicCommands.cxx @@ -156,7 +156,7 @@ static Standard_Integer Getentry (Draw_Interpretor& di, Standard_Integer n, cons TopoDS_Shape S = DBRep::Get(a[2]); if (S.IsNull()) { - di <<"Noone shape selected"<<"\n"; + di <<"Noone shape selected\n"; //di << 0; return 0; } @@ -168,7 +168,7 @@ static Standard_Integer Getentry (Draw_Interpretor& di, Standard_Integer n, cons else { di <Transparency(); } else{ - di << "DPrsStd_AISTransparency: Warning : Transparency wasn't set" << "\n"; + di << "DPrsStd_AISTransparency: Warning : Transparency wasn't set\n"; di<<(-1); } } @@ -395,7 +395,7 @@ static Standard_Integer DPrsStd_AISColor (Draw_Interpretor& di, di<Color(); } else{ - di << "DPrsStd_AISColor: Warning : Color wasn't set" << "\n"; + di << "DPrsStd_AISColor: Warning : Color wasn't set\n"; di<<(-1); } return 0; @@ -464,7 +464,7 @@ static Standard_Integer DPrsStd_AISMaterial (Draw_Interpretor& di, di<Material(); } else{ - di << "DPrsStd_AISMaterial: Warning : Material wasn't set" << "\n"; + di << "DPrsStd_AISMaterial: Warning : Material wasn't set\n"; di<<(-1); } } @@ -516,7 +516,7 @@ static Standard_Integer DPrsStd_AISHasOwnColor (Draw_Interpretor& di, { if (nb >= 3) { if (nb > 3) - di << "DPrsStd_AISHasOwnColor : Warning : too many arguments" << "\n"; + di << "DPrsStd_AISHasOwnColor : Warning : too many arguments\n"; Handle(TDocStd_Document) D; if (!DDocStd::GetDocument(arg[1],D)) return 1; @@ -550,7 +550,7 @@ static Standard_Integer DPrsStd_AISHasOwnMaterial (Draw_Interpretor& di, { if (nb >= 3) { if (nb > 3) - di << "DPrsStd_AISHasOwnMaterial : Warning : too many arguments" << "\n"; + di << "DPrsStd_AISHasOwnMaterial : Warning : too many arguments\n"; Handle(TDocStd_Document) D; if (!DDocStd::GetDocument(arg[1],D)) return 1; @@ -584,7 +584,7 @@ static Standard_Integer DPrsStd_AISHasOwnTransparency (Draw_Interpretor& di, { if (nb >= 3) { if (nb > 3) - di << "DPrsStd_AISHasOwnTransparency : Warning : too many arguments" << "\n"; + di << "DPrsStd_AISHasOwnTransparency : Warning : too many arguments\n"; Handle(TDocStd_Document) D; if (!DDocStd::GetDocument(arg[1],D)) return 1; diff --git a/src/DPrsStd/DPrsStd_AISViewerCommands.cxx b/src/DPrsStd/DPrsStd_AISViewerCommands.cxx index ada1e7c61b..95a8460c42 100644 --- a/src/DPrsStd/DPrsStd_AISViewerCommands.cxx +++ b/src/DPrsStd/DPrsStd_AISViewerCommands.cxx @@ -85,7 +85,7 @@ static Standard_Integer DPrsStd_AISRepaint (Draw_Interpretor& di, TPrsStd_AISViewer::Update(acces); return 0; } - di << "DPrsStd_AISRepaint : Error" << "\n"; + di << "DPrsStd_AISRepaint : Error\n"; return 1; } diff --git a/src/Draw/Draw_BasicCommands.cxx b/src/Draw/Draw_BasicCommands.cxx index 02c5e9e935..3460a6df0e 100644 --- a/src/Draw/Draw_BasicCommands.cxx +++ b/src/Draw/Draw_BasicCommands.cxx @@ -82,8 +82,8 @@ static Standard_Integer chronom(Draw_Interpretor& di, else Draw_Chrono = (*a[1] == '1'); - if (Draw_Chrono) di << "Chronometers activated."<<"\n"; - else di << "Chronometers desactivated."<<"\n"; + if (Draw_Chrono) di << "Chronometers activated.\n"; + else di << "Chronometers desactivated.\n"; } else { Handle(Draw_Drawable3D) D = Draw::Get(a[1]); @@ -121,8 +121,8 @@ static Standard_Integer dchronom(Draw_Interpretor& I, else Draw_Chrono = (*a[1] == '1'); - if (Draw_Chrono) I << "Chronometers activated."<<"\n"; - else I << "Chronometers desactivated."<<"\n"; + if (Draw_Chrono) I << "Chronometers activated.\n"; + else I << "Chronometers desactivated.\n"; } else { Handle(Draw_Drawable3D) D = Draw::Get(a[1]); @@ -186,7 +186,7 @@ static Standard_Integer spy(Draw_Interpretor& di, Standard_Integer n, const char Draw_Spying = Standard_False; if (n > 1) { if (!Draw_Spyfile.open(a[1],ios::out)) { - di << "Cannot open "< is \"mem-log.txt\", is \"mem-stat.txt\"" int aType = (n > 2 ? Draw::Atoi(a[2]) : 1); if (aType < 0 || aType > 2) { - di << "unknown op of the command set" << "\n"; + di << "unknown op of the command set\n"; return 1; } else if (aType == 0) { OSD_MAllocHook::SetCallback(NULL); - di << "callback is unset" << "\n"; + di << "callback is unset\n"; } else if (aType == 1) { OSD_MAllocHook::SetCallback(OSD_MAllocHook::GetCollectBySize()); - di << "callback is set to CollectBySize" << "\n"; + di << "callback is set to CollectBySize\n"; } else //if (aType == 2) { OSD_MAllocHook::SetCallback(OSD_MAllocHook::GetLogFileHandler()); - di << "callback is set to LogFileHandler" << "\n"; + di << "callback is set to LogFileHandler\n"; } } else if (strcmp(a[1], "reset") == 0) { OSD_MAllocHook::GetCollectBySize()->Reset(); - di << "CollectBySize handler is reset" << "\n"; + di << "CollectBySize handler is reset\n"; } else if (strcmp(a[1], "open") == 0) { const char* aFileName = (n > 2 ? a[2] : "mem-log.txt"); if (!OSD_MAllocHook::GetLogFileHandler()->Open(aFileName)) { - di << "cannot create file " << aFileName << " for writing" << "\n"; + di << "cannot create file " << aFileName << " for writing\n"; return 1; } - di << "log file " << aFileName << " is opened for writing" << "\n"; + di << "log file " << aFileName << " is opened for writing\n"; } else if (strcmp(a[1], "close") == 0) { OSD_MAllocHook::GetLogFileHandler()->Close(); - di << "log file is closed" << "\n"; + di << "log file is closed\n"; } else if (strcmp(a[1], "report1") == 0) { @@ -594,7 +594,7 @@ By default is \"mem-log.txt\", is \"mem-stat.txt\"" aOutFile = a[2]; if (OSD_MAllocHook::GetCollectBySize()->MakeReport(aOutFile)) { - di << "report " << aOutFile << " has been created" << "\n"; + di << "report " << aOutFile << " has been created\n"; } else { @@ -619,7 +619,7 @@ By default is \"mem-log.txt\", is \"mem-stat.txt\"" } if (OSD_MAllocHook::LogFileHandler::MakeReport(aLogFile, aOutFile, includeAlive)) { - di << "report " << aOutFile << " has been created" << "\n"; + di << "report " << aOutFile << " has been created\n"; } else { diff --git a/src/Draw/Draw_GraphicCommands.cxx b/src/Draw/Draw_GraphicCommands.cxx index bdaea9da02..f09244be8f 100644 --- a/src/Draw/Draw_GraphicCommands.cxx +++ b/src/Draw/Draw_GraphicCommands.cxx @@ -135,7 +135,7 @@ static Standard_Integer wzoom(Draw_Interpretor& di, Standard_Integer argc, const } if(argc == 1) { - di << "Pick first corner"<<"\n"; + di << "Pick first corner\n"; dout.Select(id,X1,Y1,b); gp_Trsf T; @@ -162,7 +162,7 @@ static Standard_Integer wzoom(Draw_Interpretor& di, Standard_Integer argc, const d.Draw(gp_Pnt2d(dOX2,dY1),gp_Pnt2d(dX1,dY1)); d.Flush(); dout.GetPosSize(id,X,Y,W,H); - di << "Pick second corner"<<"\n"; + di << "Pick second corner\n"; b = 0; while (b == 0) { dout.Select(id,X2,Y2,b,Standard_False); @@ -236,7 +236,7 @@ static Standard_Integer wclick(Draw_Interpretor& di, Standard_Integer, const cha { Standard_Integer id1,X1,Y1,b; dout.Flush(); - di << "Just click."<<"\n"; + di << "Just click.\n"; dout.Select(id1,X1,Y1,b); return 0; } @@ -273,7 +273,7 @@ static Standard_Integer view(Draw_Interpretor& di, Standard_Integer n, const cha H = Draw::Atoi(a[6]); dout.MakeView(id,a[2],X,Y,W,H); if (!dout.HasView(id)) { - di << "View creation failed"<<"\n"; + di << "View creation failed\n"; return 1; } SetTitle(id); @@ -289,7 +289,7 @@ static Standard_Integer view(Draw_Interpretor& di, Standard_Integer n, const cha } dout.MakeView(id,a[2],a[3]); if (!dout.HasView(id)) { - di << "View creation failed"<<"\n"; + di << "View creation failed\n"; return 1; } SetTitle(id); @@ -808,12 +808,12 @@ static Standard_Integer dfont(Draw_Interpretor& di, static Standard_Integer hcolor(Draw_Interpretor& di, Standard_Integer n, const char** a) { if (n < 4) { - di << "code de couleur (Draw.cxx) : " << "\n" ; - di << "0 = White,\t 1 = Red,\t 2 = Green,\t 3 = Blue" << "\n" ; + di << "code de couleur (Draw.cxx) : \n" ; + di << "0 = White,\t 1 = Red,\t 2 = Green,\t 3 = Blue\n" ; di << "4 = Cyan,\t 5 = Gold,\t 6 = Magenta,\t 7 = Maroon" << "\n" ; - di << "8 = Orange,\t 9 = Pink,\t 10 = Salmon,\t 11 = Violet" << "\n" ; - di << "12 = Yellow,\t 13 = Khaki,\t 14 = Coral" << "\n" ; - di << "1 <= width <= 11, 0 (noir) <= gray <= 1 (blanc)" << "\n" ; + di << "8 = Orange,\t 9 = Pink,\t 10 = Salmon,\t 11 = Violet\n" ; + di << "12 = Yellow,\t 13 = Khaki,\t 14 = Coral\n" ; + di << "1 <= width <= 11, 0 (noir) <= gray <= 1 (blanc)\n" ; } else { dout.PostColor(Draw::Atoi(a[1]),Draw::Atoi(a[2]),Draw::Atof(a[3])); } @@ -916,7 +916,7 @@ static Standard_Integer dtext(Draw_Interpretor& di, Standard_Integer n, const ch Standard_Boolean is3d; if (n == 2) { Standard_Integer id,X,Y,b; - di << "Pick position with button 1, other button escape"<<"\n"; + di << "Pick position with button 1, other button escape\n"; dout.Select(id,X,Y,b); if (b != 1) return 0; diff --git a/src/Draw/Draw_UnitCommands.cxx b/src/Draw/Draw_UnitCommands.cxx index e21008f00e..07937c5ea9 100644 --- a/src/Draw/Draw_UnitCommands.cxx +++ b/src/Draw/Draw_UnitCommands.cxx @@ -34,7 +34,7 @@ static Standard_Integer parsing (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 2) { - di << "Usage : " << argv[0] << " string [nbiter]" << "\n"; + di << "Usage : " << argv[0] << " string [nbiter]\n"; return 1; } @@ -47,7 +47,7 @@ static Standard_Integer parsing Units_UnitSentence aUnitSent(aStrTok.ToCString()); if(!aUnitSent.IsDone()) { - di<<"can not create a sentence"<<"\n"; + di<<"can not create a sentence\n"; return 1; } @@ -85,7 +85,7 @@ static Standard_Integer converttoSI (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Invalid number of parameter, use: unitconvtoSI real string"<<"\n"; + di<<"Invalid number of parameter, use: unitconvtoSI real string\n"; return 1; } @@ -107,7 +107,7 @@ static Standard_Integer converttoMDTV (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Invalid number of parameter, use: unitconvtoMDTV real string"<<"\n"; + di<<"Invalid number of parameter, use: unitconvtoMDTV real string\n"; return 1; } diff --git a/src/DrawDim/DrawDim_PlanarDimensionCommands.cxx b/src/DrawDim/DrawDim_PlanarDimensionCommands.cxx index 24513537fa..7e2676804b 100644 --- a/src/DrawDim/DrawDim_PlanarDimensionCommands.cxx +++ b/src/DrawDim/DrawDim_PlanarDimensionCommands.cxx @@ -84,7 +84,7 @@ static Standard_Integer DrawDim_DISTANCE (Draw_Interpretor& di, } } } - di << "DrawDim_DISTANCE : error" << "\n"; + di << "DrawDim_DISTANCE : error\n"; return 1; } @@ -122,7 +122,7 @@ static Standard_Integer DrawDim_ANGLE (Draw_Interpretor& di, } } } - di << "DrawDim_PlanarAngle : error" << "\n"; + di << "DrawDim_PlanarAngle : error\n"; return 1; } @@ -156,7 +156,7 @@ static Standard_Integer DrawDim_RADIUS (Draw_Interpretor& di, return 0; } } - di << "DrawDim_PlanarRadius : error" << "\n"; + di << "DrawDim_PlanarRadius : error\n"; return 1; } @@ -188,7 +188,7 @@ static Standard_Integer DrawDim_CENTER (Draw_Interpretor& di, return 0; } } - di << "DrawDim_CENTER : error" << "\n"; + di << "DrawDim_CENTER : error\n"; return 1; } @@ -275,7 +275,7 @@ static Standard_Integer DrawDim_SPLACEMENT (Draw_Interpretor& di, return 0; } } - di << "DrawDim_SPlacement : error" << "\n"; + di << "DrawDim_SPlacement : error\n"; return 1; } @@ -309,7 +309,7 @@ static Standard_Integer DrawDim_GPLACEMENT (Draw_Interpretor& di, return 0; } } - di << "DrawDim_Placement : error" << "\n"; + di << "DrawDim_Placement : error\n"; return 1; } diff --git a/src/DrawTrSurf/DrawTrSurf.cxx b/src/DrawTrSurf/DrawTrSurf.cxx index c36040c7fb..39250cea50 100644 --- a/src/DrawTrSurf/DrawTrSurf.cxx +++ b/src/DrawTrSurf/DrawTrSurf.cxx @@ -1026,7 +1026,7 @@ static void printColor(Draw_Interpretor& di, const Draw_Color& theColor) case Draw_saumon: di << "salmon " << "\n"; break; case Draw_violet: di << "violet " << "\n"; break; case Draw_jaune: di << "yellow " << "\n"; break; - case Draw_kaki: di << "dark-olive green " << "\n"; break; + case Draw_kaki: di << "dark-olive green \n"; break; case Draw_corail: di << "coral " << "\n"; break; } } @@ -1193,7 +1193,7 @@ static void printMarker(Draw_Interpretor& di, const Draw_MarkerShape& theMarker) case Draw_X: di << "x " << "\n"; break; case Draw_Plus: di << "plus " << "\n"; break; case Draw_Circle: di << "circle " << "\n"; break; - case Draw_CircleZoom: di << "circle_zoom " << "\n"; break; + case Draw_CircleZoom: di << "circle_zoom \n"; break; } } diff --git a/src/FairCurve/FairCurve_Batten.cxx b/src/FairCurve/FairCurve_Batten.cxx index 505bbcf440..3f52ac8f59 100644 --- a/src/FairCurve/FairCurve_Batten.cxx +++ b/src/FairCurve/FairCurve_Batten.cxx @@ -531,7 +531,7 @@ void FairCurve_Batten::Dump(Standard_OStream& o) const // ================================================================== { -o << " Batten |"; o.width(7); o<< "Old " << " | " << " New" << endl; +o << " Batten |"; o.width(7); o<< "Old | New" << endl; o << " P1 X |"; o.width(7); o<< OldP1.X() << " | " << NewP1.X() << endl; o << " Y |"; o.width(7); o<< OldP1.Y() << " | " << NewP1.Y() << endl; o << " P2 X |"; o.width(7); o<< OldP2.X() << " | " << NewP2.X() << endl; diff --git a/src/FairCurve/FairCurve_MinimalVariation.cxx b/src/FairCurve/FairCurve_MinimalVariation.cxx index 002e2188f7..8a8230b7a5 100644 --- a/src/FairCurve/FairCurve_MinimalVariation.cxx +++ b/src/FairCurve/FairCurve_MinimalVariation.cxx @@ -434,7 +434,7 @@ void FairCurve_MinimalVariation::Dump(Standard_OStream& o) const //====================================================================================== { -o << " MVCurve |"; o.width(7); o<< "Old " << " | " << " New" << endl; +o << " MVCurve |"; o.width(7); o<< "Old | New" << endl; o << " P1 X |"; o.width(7); o<< OldP1.X() << " | " << NewP1.X() << endl; o << " Y |"; o.width(7); o<< OldP1.Y() << " | " << NewP1.Y() << endl; o << " P2 X |"; o.width(7); o<< OldP2.X() << " | " << NewP2.X() << endl; diff --git a/src/GeometryTest/GeometryTest_APICommands.cxx b/src/GeometryTest/GeometryTest_APICommands.cxx index dbc77b292f..a4ffdcc5d4 100644 --- a/src/GeometryTest/GeometryTest_APICommands.cxx +++ b/src/GeometryTest/GeometryTest_APICommands.cxx @@ -100,7 +100,7 @@ static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const ch char* temp = name; // portage WNT DrawTrSurf::Set(temp, P1); proj.Parameters(i,UU,VV); - di << " Le point est sur la surface." << "\n"; + di << " Le point est sur la surface.\n"; di << " Ses parametres sont: UU = " << UU << "\n"; di << " VV = " << VV << "\n"; } @@ -139,7 +139,7 @@ static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const ch DrawTrSurf::Set(temp, P1); di << name << " "; UU = proj.Parameter(i); - di << " Le point est sur la courbe." << "\n"; + di << " Le point est sur la courbe.\n"; di << " Son parametre est U = " << UU << "\n"; } } @@ -541,7 +541,7 @@ static Standard_Integer totalextcc(Draw_Interpretor& di, Standard_Integer n, con di << "Extrema is point : " << P1.X() << " " << P1.Y() << " " << P1.Z() << "\n"; } else { - di << "Extrema is segment of line" << "\n"; + di << "Extrema is segment of line\n"; Handle(Geom_Line) L = new Geom_Line(P1,gp_Vec(P1,P2)); Handle(Geom_TrimmedCurve) CT = new Geom_TrimmedCurve(L, 0., P1.Distance(P2)); @@ -558,7 +558,7 @@ static Standard_Integer totalextcc(Draw_Interpretor& di, Standard_Integer n, con } else { - di << "Curves are infinite and parallel" << "\n"; + di << "Curves are infinite and parallel\n"; } di << "Minimal distance : " << Ex.TotalLowerDistance() << "\n"; diff --git a/src/GeometryTest/GeometryTest_ConstraintCommands.cxx b/src/GeometryTest/GeometryTest_ConstraintCommands.cxx index 204fe3d935..7dd9cca968 100644 --- a/src/GeometryTest/GeometryTest_ConstraintCommands.cxx +++ b/src/GeometryTest/GeometryTest_ConstraintCommands.cxx @@ -221,7 +221,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const else { // C-R-R - di << "Curve, radius, radius ???"<<"\n"; + di << "Curve, radius, radius ???\n"; return 1; } } @@ -308,7 +308,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const else { // P-R-R - di << "Point, radius, radius ???"<<"\n"; + di << "Point, radius, radius ???\n"; return 1; } } @@ -338,7 +338,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const else { // R-C-R - di << "Radius - Curve - Radius ??"<<"\n"; + di << "Radius - Curve - Radius ??\n"; return 1; } } @@ -364,13 +364,13 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const } else { // R-P-R - di << "Radius - Point - Radius ??"<<"\n"; + di << "Radius - Point - Radius ??\n"; return 1; } } else { // R-R-.. - di << "radius, radius ???"<<"\n"; + di << "radius, radius ???\n"; return 1; } } @@ -418,7 +418,7 @@ static Standard_Integer lintang (Draw_Interpretor& di,Standard_Integer n, const } } else - di << "Lin2dTanObl Not done" << "\n"; + di << "Lin2dTanObl Not done\n"; } else { Geom2dGcc_Lin2d2Tan ct3(Geom2dGcc::Unqualified(C1), @@ -436,7 +436,7 @@ static Standard_Integer lintang (Draw_Interpretor& di,Standard_Integer n, const } } else - di << "Lin2d2Tan Not done" << "\n"; + di << "Lin2d2Tan Not done\n"; } DrawTrSurf_CurveColor(col); @@ -449,12 +449,12 @@ static Standard_Integer interpol (Draw_Interpretor& di,Standard_Integer n, const //================================================================================== { if (n == 1) { - di <<"give a name to your curve !" << "\n"; + di <<"give a name to your curve !\n"; return 0; } if (n == 2) { Standard_Integer id,XX,YY,b, i, j; - di << "Pick points "<< "\n"; + di << "Pick points \n"; dout.Select(id, XX, YY, b); Standard_Real zoom = dout.Zoom(id); if (b != 1) return 0; @@ -780,8 +780,8 @@ static Standard_Integer gcarc (Draw_Interpretor& di,Standard_Integer n, const ch } } } - di <<"give a name for arc and the type seg or cir then" << "\n"; - di <<"give passing points p1 p2 for seg p1 p2 p3 or p1 p2 p3 p4 for cir (p2 p3 is a tgtvec)!" << "\n"; + di <<"give a name for arc and the type seg or cir then\n"; + di <<"give passing points p1 p2 for seg p1 p2 p3 or p1 p2 p3 p4 for cir (p2 p3 is a tgtvec)!\n"; return 0; } diff --git a/src/GeometryTest/GeometryTest_CurveCommands.cxx b/src/GeometryTest/GeometryTest_CurveCommands.cxx index 2ff026b60c..0878a51f17 100644 --- a/src/GeometryTest/GeometryTest_CurveCommands.cxx +++ b/src/GeometryTest/GeometryTest_CurveCommands.cxx @@ -272,7 +272,7 @@ static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const ONE = 2; } else { - di << "gproject wait 2 or 3 arguments" << "\n"; + di << "gproject wait 2 or 3 arguments\n"; return 1; } @@ -309,8 +309,8 @@ static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const Projector.GetSurface()->D0(P2d.X(), P2d.Y(), P); DrawTrSurf::Set(temp, P); DrawTrSurf::Set(temp1, P2d); - di<Curve()), Ufin, Udeb); DrawTrSurf::Set(temp, OutCur); DrawTrSurf::Set(temp1, PCur2d); - di<%" << "\n"; - di << " -v n : verify the projection at points." << "\n"; - di << " -t tol : set the tolerance for approximation" << "\n"; + di << "project result2d c3d surf [-e p] [-v n] [-t tol]\n"; + di << " -e p : extent the surface of

%\n"; + di << " -v n : verify the projection at points.\n"; + di << " -t tol : set the tolerance for approximation\n"; return 0; } @@ -445,7 +445,7 @@ static Standard_Integer project (Draw_Interpretor& di, GeomProjLib::Curve2d(GC, GS, U1, U2, V1, V2, tolerance); if ( G2d.IsNull() ) { - di << "\n" << "Projection Failed" << "\n"; + di << "\nProjection Failed\n"; return 1; } else { @@ -453,7 +453,7 @@ static Standard_Integer project (Draw_Interpretor& di, } if ( Verif) { // verify the projection on n points if ( NbPoints <= 0) { - di << " n must be positive" << "\n"; + di << " n must be positive\n"; return 0; } gp_Pnt P1,P2; @@ -494,7 +494,7 @@ Standard_Integer projonplane(Draw_Interpretor& di, Handle(Geom_Plane) Pl = Handle(Geom_Plane)::DownCast(S); if ( Pl.IsNull()) { - di << " The surface must be a plane" << "\n"; + di << " The surface must be a plane\n"; return 1; } @@ -592,7 +592,7 @@ static Standard_Integer bisec (Draw_Interpretor& di, } } else { - di << " Bisec has failed !!" << "\n"; + di << " Bisec has failed !!\n"; return 1; } } @@ -610,7 +610,7 @@ static Standard_Integer bisec (Draw_Interpretor& di, } } else { - di << " Bisec has failed !!" << "\n"; + di << " Bisec has failed !!\n"; return 1; } } @@ -629,7 +629,7 @@ static Standard_Integer bisec (Draw_Interpretor& di, } } else { - di << " Bisec has failed !!" << "\n"; + di << " Bisec has failed !!\n"; return 1; } } @@ -648,12 +648,12 @@ static Standard_Integer bisec (Draw_Interpretor& di, } } else { - di << " Bisec has failed !!" << "\n"; + di << " Bisec has failed !!\n"; return 1; } } else { - di << " args must be line/circle/point line/circle/point" << "\n"; + di << " args must be line/circle/point line/circle/point\n"; return 1; } } @@ -670,7 +670,7 @@ static Standard_Integer bisec (Draw_Interpretor& di, } } else { - di << " Bisec has failed !!" << "\n"; + di << " Bisec has failed !!\n"; return 1; } } @@ -682,13 +682,13 @@ static Standard_Integer bisec (Draw_Interpretor& di, solution(Bis.ThisSolution(),a[1],0); } else { - di << " Bisec has failed !!" << "\n"; + di << " Bisec has failed !!\n"; return 1; } } } else { - di << " the second arg must be line/circle/point " << "\n"; + di << " the second arg must be line/circle/point \n"; } } else if ( ip1) { @@ -706,7 +706,7 @@ static Standard_Integer bisec (Draw_Interpretor& di, } } else { - di << " Bisec has failed !!" << "\n"; + di << " Bisec has failed !!\n"; return 1; } } @@ -718,7 +718,7 @@ static Standard_Integer bisec (Draw_Interpretor& di, solution(Bis.ThisSolution(),a[1],0); } else { - di << " Bisec has failed !!" << "\n"; + di << " Bisec has failed !!\n"; return 1; } } @@ -730,25 +730,25 @@ static Standard_Integer bisec (Draw_Interpretor& di, DrawTrSurf::Set(a[1],new Geom2d_Line(Bis.ThisSolution())); } else { - di << " Bisec has failed !!" << "\n"; + di << " Bisec has failed !!\n"; return 1; } } else { - di << " the second arg must be line/circle/point " << "\n"; + di << " the second arg must be line/circle/point \n"; return 1; } } else { - di << " args must be line/circle/point line/circle/point" << "\n"; + di << " args must be line/circle/point line/circle/point\n"; return 1; } if ( NbSol >= 2) { - di << "There are " << NbSol << " Solutions." << "\n"; + di << "There are " << NbSol << " Solutions.\n"; } else { - di << "There is " << NbSol << " Solution." << "\n"; + di << "There is " << NbSol << " Solution.\n"; } return 0; @@ -819,7 +819,7 @@ static Standard_Integer movelaw (Draw_Interpretor& di, Standard_Integer n, const Draw::Repaint(); } else { - di << "Not enought degree of freedom increase degree please" << "\n"; + di << "Not enought degree of freedom increase degree please\n"; } @@ -993,7 +993,7 @@ static Standard_Integer crvpoints (Draw_Interpretor& di, Standard_Integer /*n*/, GCPnts_QuasiUniformDeflection PntGen(GAC, defl); if(!PntGen.IsDone()) { - di << "Points generation failed" << "\n"; + di << "Points generation failed\n"; return 1; } @@ -1100,7 +1100,7 @@ static Standard_Integer uniformAbscissa (Draw_Interpretor& di, Standard_Integer ellip = DrawTrSurf::GetBSplineCurve(a[1]); if (ellip.IsNull()) { - di << " BSpline is NULL "<<"\n"; + di << " BSpline is NULL \n"; return 1; }*/ @@ -1108,7 +1108,7 @@ static Standard_Integer uniformAbscissa (Draw_Interpretor& di, Standard_Integer ellip = DrawTrSurf::GetCurve(a[1]); if (ellip.IsNull()) { - di << " Curve is NULL "<<"\n"; + di << " Curve is NULL \n"; return 1; } @@ -1146,7 +1146,7 @@ static Standard_Integer uniformAbscissa (Draw_Interpretor& di, Standard_Integer catch (Standard_Failure ) { - di << " Standard Failure " <<"\n"; + di << " Standard Failure \n"; } return 0; } @@ -1194,7 +1194,7 @@ static Standard_Integer EllipsUniformAbscissa (Draw_Interpretor& di, Standard_In catch(Standard_Failure) { - di << " Standard Failure "<<"\n"; + di << " Standard Failure \n"; } try @@ -1223,7 +1223,7 @@ static Standard_Integer EllipsUniformAbscissa (Draw_Interpretor& di, Standard_In catch (Standard_Failure ) { - di << " Standard Failure " <<"\n"; + di << " Standard Failure \n"; } return 0; } @@ -1625,14 +1625,14 @@ static Standard_Integer intersection (Draw_Interpretor& di, }//else if (n == 8 || n == 9 || n == 12 || n == 13 || n == 16 || n == 17) else { - di<<"incorrect number of arguments"<<"\n"; + di<<"incorrect number of arguments\n"; return 1; } // if (!Inters.IsDone()) { - di<<"No intersections found!"<<"\n"; + di<<"No intersections found!\n"; return 1; } @@ -1681,7 +1681,7 @@ static Standard_Integer intersection (Draw_Interpretor& di, // if (!Inters.IsDone()) { - di<<"No intersections found!"<<"\n"; + di<<"No intersections found!\n"; return 1; } diff --git a/src/GeometryTest/GeometryTest_FairCurveCommands.cxx b/src/GeometryTest/GeometryTest_FairCurveCommands.cxx index 2f07f4a5e5..48e7c8a40b 100644 --- a/src/GeometryTest/GeometryTest_FairCurveCommands.cxx +++ b/src/GeometryTest/GeometryTest_FairCurveCommands.cxx @@ -34,7 +34,7 @@ Standard_Boolean IsGoodNumber(Standard_Integer argc, Standard_Integer waiting, D // argc vaut 1 de plus, puisque argv[0] contient le nom de la commande if (argc != (waiting+1)) { - di << "Waiting "<< waiting << " arguments" << "\n"; + di << "Waiting "<< waiting << " arguments\n"; return Standard_False; } else @@ -75,7 +75,7 @@ BattenCurve(Draw_Interpretor& di, Standard_Integer argc, const char** argv) Handle(DrawFairCurve_Batten) aBatten = new DrawFairCurve_Batten(Bat); if (aBatten.IsNull()) { - di << " Batten null "<< "\n"; + di << " Batten null \n"; return 1; } Draw::Set(BattenName,aBatten); @@ -118,7 +118,7 @@ MVCurve(Draw_Interpretor& di, Standard_Integer argc, const char** argv) Handle(DrawFairCurve_MinimalVariation) aMVC = new DrawFairCurve_MinimalVariation(MVC); if (aMVC.IsNull()) { - di << " MVC null "<< "\n"; + di << " MVC null \n"; return 1; } Draw::Set(MVCName, aMVC); diff --git a/src/GeometryTest/GeometryTest_SurfaceCommands.cxx b/src/GeometryTest/GeometryTest_SurfaceCommands.cxx index b378b57158..cdc55d0c2c 100644 --- a/src/GeometryTest/GeometryTest_SurfaceCommands.cxx +++ b/src/GeometryTest/GeometryTest_SurfaceCommands.cxx @@ -231,12 +231,12 @@ static Standard_Integer ruled(Draw_Interpretor& di, Handle(Geom_Curve) C1 = DrawTrSurf::GetCurve(a[2]); if ( C1.IsNull()) { - di << " C1 is not a Curve ==> Command failed" << "\n"; + di << " C1 is not a Curve ==> Command failed\n"; return 1; } Handle(Geom_Curve) C2 = DrawTrSurf::GetCurve(a[3]); if ( C2.IsNull()) { - di << " C2 is not a Curve ==> Command failed" << "\n"; + di << " C2 is not a Curve ==> Command failed\n"; return 1; } @@ -277,7 +277,7 @@ static Standard_Integer appsurf(Draw_Interpretor& di, App.Perform( Line, Section); if ( !App.IsDone()) { - di << " Approximation aux fraises " << "\n"; + di << " Approximation aux fraises \n"; } Standard_Integer UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots, NbVKnots; diff --git a/src/GeometryTest/GeometryTest_TestProjCommands.cxx b/src/GeometryTest/GeometryTest_TestProjCommands.cxx index 1a075b58f3..2fbd7713d4 100644 --- a/src/GeometryTest/GeometryTest_TestProjCommands.cxx +++ b/src/GeometryTest/GeometryTest_TestProjCommands.cxx @@ -321,13 +321,13 @@ static Standard_Integer xdistcs(Draw_Interpretor& di, Standard_Integer n, const // aC=DrawTrSurf::GetCurve(a[1]); if (aC.IsNull()) { - di << "Error: " << a[1] << " is not a curve!" << "\n"; + di << "Error: " << a[1] << " is not a curve!\n"; return 0; } // aS=DrawTrSurf::GetSurface(a[2]); if (aS.IsNull()) { - di << "Error: " << a[2] << " is not a surface!" << "\n"; + di << "Error: " << a[2] << " is not a surface!\n"; return 0; } // @@ -354,7 +354,7 @@ static Standard_Integer xdistcs(Draw_Interpretor& di, Standard_Integer n, const aPPS.Init(aP, aS, aTol); bRet=aPPS.IsDone(); if (!bRet) { - di << "Error: GeomAPI_ProjectPointOnSurf failed" << "\n"; + di << "Error: GeomAPI_ProjectPointOnSurf failed\n"; return 0; } // diff --git a/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx b/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx index 5568d00e6c..234554bc92 100644 --- a/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx @@ -126,7 +126,7 @@ static Standard_Integer PointsByPick { Standard_Integer id,XX,YY,b, i; - di << "Pick points "<< "\n"; + di << "Pick points \n"; dout.Select(id, XX, YY, b); Standard_Real zoom = dout.Zoom(id); if (b != 1) return 0; @@ -253,7 +253,7 @@ static void PointsByFile(Handle(AppDef_HArray1OfMultiPointConstraint)& MPC, for(i=1; i<=nbc; i++) { iFile >> num >> ordre; if ((num<1)||(num>nbp)) { - di << "Error on point Index in constrainte" << "\n"; + di << "Error on point Index in constrainte\n"; return; } Constraint = (AppParCurves_Constraint) (ordre+1); @@ -304,7 +304,7 @@ static void PointsByFile(Handle(AppDef_HArray1OfMultiPointConstraint)& MPC, for(i=1; i<=nbc; i++) { iFile >> num >> ordre; if ((num<1)||(num>nbp)) { - di << "Error on point Index in constrainte" << "\n"; + di << "Error on point Index in constrainte\n"; return; } Constraint = (AppParCurves_Constraint) (ordre+1); @@ -342,11 +342,11 @@ static Standard_Integer smoothing (Draw_Interpretor& di,Standard_Integer n, cons Standard_Integer id = 0, DegMax = -1; if (n == 1) { - di <<"give a name to your curve !" << "\n"; + di <<"give a name to your curve !\n"; return 0; } if (n == 2) { - di <<"give a tolerance to your curve !" << "\n"; + di <<"give a tolerance to your curve !\n"; return 0; } if (n == 3) { @@ -381,7 +381,7 @@ static Standard_Integer smoothing (Draw_Interpretor& di,Standard_Integer n, cons const char* nomfic = a[ific]; ifstream iFile(nomfic, ios::in); if (!iFile) { - di << a[ific] <<"do not exist !" << "\n"; + di << a[ific] <<"do not exist !\n"; return 1; } PointsByFile(Points, TABofCC, iFile, di); @@ -509,20 +509,20 @@ static Standard_Integer smoothingbybezier (Draw_Interpretor& di, Standard_Integer Degree = 8; if (n == 1) { - di <<"give a name to your curve !" << "\n"; + di <<"give a name to your curve !\n"; return 0; } if (n == 2) { - di <<"give a tolerance to your curve !" << "\n"; + di <<"give a tolerance to your curve !\n"; return 0; } if (n == 3) { - di <<"give a max degree!" << "\n"; + di <<"give a max degree!\n"; return 0; } if (n == 4) { - di <<"give an option!" << "\n"; + di <<"give an option!\n"; return 0; } if (n >= 5) { @@ -551,7 +551,7 @@ static Standard_Integer smoothingbybezier (Draw_Interpretor& di, const char* nomfic = a[5]; ifstream iFile(nomfic, ios::in); if (!iFile) { - di << a[6] <<"do not exist !" << "\n"; + di << a[6] <<"do not exist !\n"; return 1; } PointsByFile(Points, TABofCC, iFile, di); @@ -603,7 +603,7 @@ static Standard_Integer smoothingbybezier (Draw_Interpretor& di, Appr.Perform (AML); if (! Appr.IsAllApproximated()) { - di << " No result" << "\n"; + di << " No result\n"; } AppParCurves_MultiCurve AnMuC = Appr.Value(); ThePoints = new (TColgp_HArray1OfPnt2d) (1, AnMuC.NbPoles() ); @@ -621,7 +621,7 @@ static Standard_Integer smoothingbybezier (Draw_Interpretor& di, Varia.Approximate(); if (! Varia.IsDone()) { - di << " No result" << "\n"; + di << " No result\n"; } AppParCurves_MultiBSpCurve AnMuC = Varia.Value(); @@ -678,7 +678,7 @@ static Standard_Integer smoothingbybezier (Draw_Interpretor& di, Appr.Perform (AML); if (! Appr.IsAllApproximated()) { - di << " No result" << "\n"; + di << " No result\n"; } AppParCurves_MultiCurve AnMuC = Appr.Value(); ThePoints = new (TColgp_HArray1OfPnt) (1, AnMuC.NbPoles() ); @@ -696,7 +696,7 @@ static Standard_Integer smoothingbybezier (Draw_Interpretor& di, Varia.SetTolerance(Abs(Tolerance)); Varia.Approximate(); if (! Varia.IsDone()) { - di << " No result" << "\n"; + di << " No result\n"; } AppParCurves_MultiBSpCurve AnMuC = Varia.Value(); diff --git a/src/GeomliteTest/GeomliteTest_CurveCommands.cxx b/src/GeomliteTest/GeomliteTest_CurveCommands.cxx index 161086771f..9325f31f70 100644 --- a/src/GeomliteTest/GeomliteTest_CurveCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_CurveCommands.cxx @@ -586,7 +586,7 @@ static Standard_Integer cmovetangent (Draw_Interpretor& di, Standard_Integer n, Draw::Repaint(); } else { - di << "Not enought degree of freedom increase degree please" << "\n"; + di << "Not enought degree of freedom increase degree please\n"; } return 0; @@ -617,7 +617,7 @@ static Standard_Integer cmovetangent (Draw_Interpretor& di, Standard_Integer n, Draw::Repaint(); } else { - di << "Not enought degree of freedom increase degree please" << "\n"; + di << "Not enought degree of freedom increase degree please\n"; } return 0; @@ -787,11 +787,11 @@ static Standard_Integer cremknot (Draw_Interpretor& di, Standard_Integer n, cons if (!GBs.IsNull()) { if (!GBs->RemoveKnot(index,mult,tol)) - di << "Remove knots failed"<<"\n"; + di << "Remove knots failed\n"; } else { if (!GBs2d->RemoveKnot(index,mult,tol)) - di << "Remove knots failed"<<"\n"; + di << "Remove knots failed\n"; } Draw::Repaint(); @@ -1368,7 +1368,7 @@ static Standard_Integer localprop(Draw_Interpretor& di, } } else - di <<"Tangent undefined."<<"\n"; + di <<"Tangent undefined.\n"; } else { Geom2dLProp_CLProps2d Prop (C2d,2,Precision::Confusion()); @@ -1395,7 +1395,7 @@ static Standard_Integer localprop(Draw_Interpretor& di, } } else - di <<"Tangent undefined."<<"\n"; + di <<"Tangent undefined.\n"; } return 0; } @@ -1436,32 +1436,32 @@ static Standard_Integer rawcont(Draw_Interpretor& di, Standard_Integer n, const Precision::Angular()) ; switch (cont) { case GeomAbs_C0: - di << " C0 Continuity " << "\n" ; + di << " C0 Continuity \n" ; break ; case GeomAbs_G1: - di << " G1 Continuity " << "\n" ; + di << " G1 Continuity \n" ; break ; case GeomAbs_C1 : - di << " C1 Continuity " << "\n" ; + di << " C1 Continuity \n" ; break ; case GeomAbs_G2 : - di << " G2 Continuity " << "\n" ; + di << " G2 Continuity \n" ; break ; case GeomAbs_C2 : - di << " C2 Continuity " << "\n" ; + di << " C2 Continuity \n" ; break ; case GeomAbs_C3 : - di << " C3 Continuity " << "\n" ; + di << " C3 Continuity \n" ; break ; case GeomAbs_CN : - di << " CN Continuity " << "\n" ; + di << " CN Continuity \n" ; break ; default: break ; } } else { - di << " not C0 continuity " << "\n" ; + di << " not C0 continuity \n" ; } return 0 ; } @@ -1507,7 +1507,7 @@ static Standard_Integer approxcurveonsurf(Draw_Interpretor& di, Standard_Integer return 0; } - di << "Approximation failed !" << "\n"; + di << "Approximation failed !\n"; return 1; } @@ -1699,7 +1699,7 @@ static Standard_Integer splitc1(Draw_Interpretor& di, Standard_Real l = ACurve->LastParameter(); if ( Precision::IsInfinite(f) || Precision::IsInfinite(l)) { - di << " Error: Infinite curves" << "\n"; + di << " Error: Infinite curves\n"; return 1; } @@ -1757,7 +1757,7 @@ static Standard_Integer splitc12d(Draw_Interpretor& di, Standard_Real l = ACurve->LastParameter(); if ( Precision::IsInfinite(f) || Precision::IsInfinite(l)) { - di << " Error: Infinite curves" << "\n"; + di << " Error: Infinite curves\n"; return 1; } @@ -1834,7 +1834,7 @@ static Standard_Integer length(Draw_Interpretor& di, L = GCPnts_AbscissaPoint::Length(AC, Tol); } else { - di << a[1] << "is not a curve" << "\n"; + di << a[1] << "is not a curve\n"; return 1; } diff --git a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx index edbf114007..e5cb4d1506 100644 --- a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx @@ -123,7 +123,7 @@ static Standard_Integer surface_radius (Draw_Interpretor& di, di << "Min Radius of Curvature : " << radius << "\n"; } else { - di << "Min Radius of Curvature : infinite" << "\n"; + di << "Min Radius of Curvature : infinite\n"; } radius = myProperties.MaxCurvature(); @@ -133,10 +133,10 @@ static Standard_Integer surface_radius (Draw_Interpretor& di, di << "Max Radius of Curvature : " << radius << "\n"; } else - di << "Min Radius of Curvature : infinite" << "\n"; + di << "Min Radius of Curvature : infinite\n"; } else { - di << "Curvature not defined." << "\n"; + di << "Curvature not defined.\n"; } } else { @@ -548,7 +548,7 @@ static Standard_Integer tobezier(Draw_Interpretor& di, Conv(S, U1, U2, V1, V2, Precision::PConfusion()); NbU = Conv.NbUPatches(); NbV = Conv.NbVPatches(); - di << NbU << " X " << NbV << " patches in the result" << "\n"; + di << NbU << " X " << NbV << " patches in the result\n"; for (i = 1; i <= NbU; i++) { for (j = 1; j <= NbV; j++) { Sprintf(name,"%s_%i_%i",a[1],i,j); @@ -561,7 +561,7 @@ static Standard_Integer tobezier(Draw_Interpretor& di, GeomConvert_BSplineSurfaceToBezierSurface Conv(S); NbU = Conv.NbUPatches(); NbV = Conv.NbVPatches(); - di << NbU << " X " << NbV << " patches in the result" << "\n"; + di << NbU << " X " << NbV << " patches in the result\n"; for (i = 1; i <= NbU; i++) { for (j = 1; j <= NbV; j++) { Sprintf(name,"%s_%i_%i",a[1],i,j); @@ -579,7 +579,7 @@ static Standard_Integer tobezier(Draw_Interpretor& di, GeomConvert_BSplineCurveToBezierCurve Conv(C3d, U1, U2, Precision::PConfusion()); NbArc = Conv.NbArcs(); - di << NbArc << " arcs in the result" << "\n"; + di << NbArc << " arcs in the result\n"; for (i = 1; i <= NbArc; i++) { Sprintf(name,"%s_%i",a[1],i); char *temp = name ; @@ -589,7 +589,7 @@ static Standard_Integer tobezier(Draw_Interpretor& di, else { GeomConvert_BSplineCurveToBezierCurve Conv(C3d); NbArc = Conv.NbArcs(); - di << NbArc << " arcs in the result" << "\n"; + di << NbArc << " arcs in the result\n"; for (i = 1; i <= NbArc; i++) { Sprintf(name,"%s_%i",a[1],i); char *temp = name ; @@ -606,7 +606,7 @@ static Standard_Integer tobezier(Draw_Interpretor& di, Geom2dConvert_BSplineCurveToBezierCurve Conv(C2d, U1, U2, Precision::PConfusion()); NbArc = Conv.NbArcs(); - di << NbArc << " arcs in the result" << "\n"; + di << NbArc << " arcs in the result\n"; for (i = 1; i <= NbArc; i++) { Sprintf(name,"%s_%i",a[1],i); char *temp = name ; @@ -616,7 +616,7 @@ static Standard_Integer tobezier(Draw_Interpretor& di, else { Geom2dConvert_BSplineCurveToBezierCurve Conv(C2d); NbArc = Conv.NbArcs(); - di << NbArc << " arcs in the result" << "\n"; + di << NbArc << " arcs in the result\n"; for (i = 1; i <= NbArc; i++) { Sprintf(name,"%s_%i",a[1],i); char *temp = name ; @@ -657,7 +657,7 @@ static Standard_Integer convbz(Draw_Interpretor& di, BZ(ii,jj) = Handle(Geom_BezierSurface)::DownCast(DrawTrSurf::Get(a[kk])); if (BZ(ii,jj).IsNull()) { - di << "the Surface " << kk <<"is not a BezierSurface" << "\n"; + di << "the Surface " << kk <<"is not a BezierSurface\n"; return 1; } kk++; @@ -667,7 +667,7 @@ static Standard_Integer convbz(Draw_Interpretor& di, GeomConvert_CompBezierSurfacesToBSplineSurface Conv(BZ, Tol); if (! Conv.IsDone()) { - di << "Convert Not Done" << "\n"; + di << "Convert Not Done\n"; return 1; } @@ -688,7 +688,7 @@ static Standard_Integer convbz(Draw_Interpretor& di, for (ii=1, kk=3; ii<=NbU; ii++,kk++) { BZ = Handle(Geom_BezierCurve)::DownCast(DrawTrSurf::Get(a[kk])); if (BZ.IsNull()) { - di << "the curve " << kk <<"is not a BezierCurve" << "\n"; + di << "the curve " << kk <<"is not a BezierCurve\n"; return 1; } TColgp_Array1OfPnt Poles(1, BZ->NbPoles()); @@ -1193,7 +1193,7 @@ static Standard_Integer rempole (Draw_Interpretor& di, Standard_Integer n, const if ( !strcasecmp(a[0],"remrowpole")) { if ( BSpline) { - di << " Error : Cannot remove a polerow on a BSplineSurface " << "\n"; + di << " Error : Cannot remove a polerow on a BSplineSurface \n"; } else { GBz->RemovePoleRow(NewIndex); @@ -1201,7 +1201,7 @@ static Standard_Integer rempole (Draw_Interpretor& di, Standard_Integer n, const } else if ( !strcasecmp(a[0],"remcolpole")) { if ( BSpline) { - di << " Error : Cannot remove a polecol on a BSplineSurface " << "\n"; + di << " Error : Cannot remove a polecol on a BSplineSurface \n"; } else { GBz->RemovePoleCol(NewIndex); @@ -1458,7 +1458,7 @@ static Standard_Integer parameters (Draw_Interpretor& di, Standard_Integer n, co { // try to find parameters on a Surface Handle(Geom_Surface) S = DrawTrSurf::GetSurface(a[1]); - if( S.IsNull() ) { di << "Unknown surface" << "\n"; return 1; } + if( S.IsNull() ) { di << "Unknown surface\n"; return 1; } gp_Pnt P(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4])); Standard_Real Tol = Draw::Atof(a[5]), U = 0., V = 0.; Standard_Boolean res = GeomLib_Tool::Parameters(S,P,Tol,U,V); @@ -1466,41 +1466,41 @@ static Standard_Integer parameters (Draw_Interpretor& di, Standard_Integer n, co Draw::Set(a[6],U); Draw::Set(a[7],V); - if( !res ) { di << "Wrong point" << "\n"; return 1; } + if( !res ) { di << "Wrong point\n"; return 1; } } else if(n == 7) { // try to find parameters on a 3d Curve Handle(Geom_Curve) C = DrawTrSurf::GetCurve(a[1]); - if( C.IsNull() ) { di << "Unknown curve" << "\n"; return 1; } + if( C.IsNull() ) { di << "Unknown curve\n"; return 1; } gp_Pnt P(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4])); Standard_Real Tol = Draw::Atof(a[5]), U = 0.; Standard_Boolean res = GeomLib_Tool::Parameter(C,P,Tol,U); Draw::Set(a[6],U); - if( !res ) { di << "Wrong point" << "\n"; return 1; } + if( !res ) { di << "Wrong point\n"; return 1; } } else if(n == 6) { // try to find parameters on a 2d Curve Handle(Geom2d_Curve) C = DrawTrSurf::GetCurve2d(a[1]); - if( C.IsNull() ) { di << "Unknown curve 2d" << "\n"; return 1; } + if( C.IsNull() ) { di << "Unknown curve 2d\n"; return 1; } gp_Pnt2d P(Draw::Atof(a[2]), Draw::Atof(a[3])); Standard_Real Tol = Draw::Atof(a[4]), U = 0.; Standard_Boolean res = GeomLib_Tool::Parameter(C,P,Tol,U); Draw::Set(a[5],U); - if( !res ) { di << "Wrong point" << "\n"; return 1; } + if( !res ) { di << "Wrong point\n"; return 1; } } else { - di << "Invalid parameters!" << "\n"; - di << "Usage:" << "\n"; - di << "parameters Surf X Y Z Tol U V" << "\n"; - di << "parameters Curv X Y Z Tol U" << "\n"; - di << "parameters Curv2d X Y Tol U" << "\n"; + di << "Invalid parameters!\n"; + di << "Usage:\n"; + di << "parameters Surf X Y Z Tol U V\n"; + di << "parameters Curv X Y Z Tol U\n"; + di << "parameters Curv2d X Y Tol U\n"; return 1; } diff --git a/src/HLRTest/HLRTest.cxx b/src/HLRTest/HLRTest.cxx index bc6e17498a..cd69e3d7db 100644 --- a/src/HLRTest/HLRTest.cxx +++ b/src/HLRTest/HLRTest.cxx @@ -134,7 +134,7 @@ hout (Draw_Interpretor& di, Standard_Integer n, const char** a) const char *name = a[2]; TopoDS_Shape S = DBRep::Get(name); if (S.IsNull()) { - di << name << " is not a shape." << "\n"; + di << name << " is not a shape.\n"; return 1; } HLRTest::Set(a[1],S); @@ -155,13 +155,13 @@ hfil (Draw_Interpretor& di, Standard_Integer n, const char** a) const char *name1 = a[1]; Handle(HLRTopoBRep_OutLiner) HS = HLRTest::GetOutLiner(name1); if (HS.IsNull()) { - di << name1 << " is not an OutLiner." << "\n"; + di << name1 << " is not an OutLiner.\n"; return 1; } const char *name2 = a[2]; HLRAlgo_Projector P; if (!HLRTest::GetProjector(name2,P)) { - di << name2 << " is not a projector." << "\n"; + di << name2 << " is not a projector.\n"; return 1; } BRepTopAdaptor_MapOfShapeTool MST; @@ -182,7 +182,7 @@ sori (Draw_Interpretor& di, Standard_Integer n, const char** a) const char *name2 = a[2]; Handle(HLRTopoBRep_OutLiner) HS = HLRTest::GetOutLiner(name2); if (HS.IsNull()) { - di << name2 << " is not an OutLiner." << "\n"; + di << name2 << " is not an OutLiner.\n"; return 1; } DBRep::Set(name1,HS->OriginalShape()); @@ -202,11 +202,11 @@ sout (Draw_Interpretor& di, Standard_Integer n, const char** a) const char *name2 = a[2]; Handle(HLRTopoBRep_OutLiner) HS = HLRTest::GetOutLiner(name2); if (HS.IsNull()) { - di << name2 << " is not an OutLiner." << "\n"; + di << name2 << " is not an OutLiner.\n"; return 1; } if (HS->OutLinedShape().IsNull()) { - di << name2 << " has no OutLinedShape." << "\n"; + di << name2 << " has no OutLinedShape.\n"; return 1; } DBRep::Set(name1,HS->OutLinedShape()); @@ -225,7 +225,7 @@ hloa (Draw_Interpretor& di, Standard_Integer n, const char** a) const char *name1 = a[1]; Handle(HLRTopoBRep_OutLiner) HS = HLRTest::GetOutLiner(name1); if (HS.IsNull()) { - di << name1 << " is not an OutLiner." << "\n"; + di << name1 << " is not an OutLiner.\n"; return 1; } hider->Load(HS); @@ -247,13 +247,13 @@ hrem (Draw_Interpretor& di, Standard_Integer n, const char** a) if (HS.IsNull()) { TopoDS_Shape S = DBRep::Get(name); if (S.IsNull()) { - di << name << " is not an OutLiner and not a shape." << "\n"; + di << name << " is not an OutLiner and not a shape.\n"; return 1; } else { index = hider->Index(S); if (index == 0) { - di << name << " not loaded shape." << "\n"; + di << name << " not loaded shape.\n"; return 1; } } @@ -261,18 +261,18 @@ hrem (Draw_Interpretor& di, Standard_Integer n, const char** a) else { index = hider->Index(HS->OriginalShape()); if (index == 0) { - di << name << " not loaded outliner." << "\n"; + di << name << " not loaded outliner.\n"; return 1; } } hider->Remove(index); - di << name << " removed" << "\n"; + di << name << " removed\n"; } else { while (hider->NbShapes() > 0) { hider->Remove(1); } - di << " all shapes removed" << "\n"; + di << " all shapes removed\n"; } return 0; } @@ -289,7 +289,7 @@ sprj (Draw_Interpretor& di, Standard_Integer n, const char** a) const char *name = a[1]; HLRAlgo_Projector P; if (!HLRTest::GetProjector(name,P)) { - di << name << " is not a projector." << "\n"; + di << name << " is not a projector.\n"; return 1; } hider->Projector(P); @@ -342,9 +342,9 @@ hdbg (Draw_Interpretor& di, Standard_Integer, const char**) { hider->Debug(!hider->Debug()); if (hider->Debug()) - di << "debug" << "\n"; + di << "debug\n"; else - di << "no debug" << "\n"; + di << "no debug\n"; return 0; } diff --git a/src/IFSelect/IFSelect_WorkSession.cxx b/src/IFSelect/IFSelect_WorkSession.cxx index eceb0fff74..5a3fe2bc88 100644 --- a/src/IFSelect/IFSelect_WorkSession.cxx +++ b/src/IFSelect/IFSelect_WorkSession.cxx @@ -1436,7 +1436,7 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::SelectionResult } // if (ItemIdent(sel) == 0) if (sel.IsNull()) - { cout << " Selection : "<<" Unknown"<DumpHeader(S); S<Value(i))) nbr ++; } S << " *****************************************************************\n"; - S << " ******** Model : "<NbDispatches() < numdisp || numdisp <= 0) - { sout<<"Dispatch : "<<" Unknown"<FinalSelection().IsNull()) - { sout<<"Dispatch "<<" : No Final Selection"<Label()<Graph()); diff --git a/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx b/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx index 3d453c6c62..373122bfad 100644 --- a/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx +++ b/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx @@ -137,7 +137,7 @@ void IGESAppli_ToolDrilledHole::OwnDump S << "Finish diameter size : " << ent->FinishDiaSize() << endl; S << "Plating indication flag : "; if (!ent->IsPlating()) S << "NO" << " - "; - else S << "YES" << " - "; + else S << "YES - "; S << "Lower Numbered Layer : " << ent->NbLowerLayer() << " "; S << "Higher Numbered Layer : " << ent->NbHigherLayer() << endl; } diff --git a/src/IGESData/IGESData_IGESDumper.cxx b/src/IGESData/IGESData_IGESDumper.cxx index cf7a3e9c21..6614427f4d 100644 --- a/src/IGESData/IGESData_IGESDumper.cxx +++ b/src/IGESData/IGESData_IGESDumper.cxx @@ -97,9 +97,9 @@ IGESData_IGESDumper::IGESData_IGESDumper S<<" ) ****"<= 2) S <<"** Status Number : Blank:"<BlankStatus() @@ -126,7 +126,7 @@ IGESData_IGESDumper::IGESData_IGESDumper if (ent->HasStructure()) { S<<"** Structure :"; PrintDNum (ent->Structure(),S); S<<"\n"; } - S<<"\n"<<" Graphic Attributes"<<"\n"; + S<<"\n Graphic Attributes\n"; if (ent->DefLineFont() == IGESData_DefValue) { S<<"** LineFont Value:"<RankLineFont()<<"\n"; } else if (ent->DefLineFont() == IGESData_DefReference) @@ -150,7 +150,7 @@ IGESData_IGESDumper::IGESData_IGESDumper S< 3) { - S<<"**** Own Data ****"<<"\n\n"; + S<<"**** Own Data ****\n\n"; OwnDump(ent,S,own); } } @@ -161,7 +161,7 @@ IGESData_IGESDumper::IGESData_IGESDumper Standard_Integer nb = iter.NbEntities(); Standard_Boolean iasuit = (nb > 0); if (nb > 0) { - S<<"\n"<<"**** Properties (nb:"< 0) iasuit = Standard_True; if (nb > 0) { - S<<"\n"<<"**** Associativities (nb:"<Length(); S<<"**** Dump of IGES Model , Start and Global Sections ****"< 0) { - S << "**** Start Section : "<Value(i)->ToCString()<ToCString()<<"\n"; @@ -139,7 +139,7 @@ void IGESData_IGESModel::DumpHeader << IGESData_BasicEditor::IGESVersionName(num); num = theheader.DraftingStandard(); - S << "\n"<<"[24] Drafting Standard : " << num; + S << "\n[24] Drafting Standard : " << num; if (num > 0) S<< " -> Name : " << IGESData_BasicEditor::DraftingName(num); S< 4 for content ]" << endl; break; case 5: diff --git a/src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx b/src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx index c4a61aa936..98caa6b375 100644 --- a/src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx +++ b/src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx @@ -420,7 +420,7 @@ void IGESGeom_ToolBSplineCurve::OwnDump(const Handle(IGESGeom_BSplineCurve)& ent S << endl << "Control Points (Poles) : "; IGESData_DumpListXYZL(S ,level,0, upind, ent->Pole, ent->Location()); S << endl << "Starting Parameter Value : " << ent->UMin(); - S << " " << "Ending Parameter Value : " << ent->UMax() << endl; + S << " Ending Parameter Value : " << ent->UMax() << endl; S << "Unit Normal : "; IGESData_DumpXYZL(S,level, ent->Normal(), ent->Location()); S << endl; diff --git a/src/IGESGeom/IGESGeom_ToolSplineSurface.cxx b/src/IGESGeom/IGESGeom_ToolSplineSurface.cxx index f074f276f5..38f183aceb 100644 --- a/src/IGESGeom/IGESGeom_ToolSplineSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolSplineSurface.cxx @@ -336,7 +336,7 @@ void IGESGeom_ToolSplineSurface::OwnDump else S << " (Unspecified)"; S << endl; S << "Number Of Segments. In U : " - << nbUSegs << " " << " In V : " << nbVSegs << endl; + << nbUSegs << " In V : " << nbVSegs << endl; S << "The U Break Points : "; IGESData_DumpVals(S ,level,1, nbUSegs+1,ent->UBreakPoint); S < 0.00001) { - di <<"temps total de maillage: "< "<< 100*edges/tot <<" %"<<"\n"; - di <<"maillage des edges: "< "<< 100*mailledges/tot <<" %"<<"\n"; - di <<"controle et points internes: "< "<< 100*etuinter/tot <<" %"<<"\n"; - di <<"derniers controles: "< "<< 100*lastcontrol/tot<<" %"<<"\n"; - di <<"stockage dans la S.D. "< "<< 100*stock/tot <<" %"<<"\n"; + di <<"temps total de maillage: "< "<< 100*edges/tot <<" %\n"; + di <<"maillage des edges: "< "<< 100*mailledges/tot <<" %\n"; + di <<"controle et points internes: "< "<< 100*etuinter/tot <<" %\n"; + di <<"derniers controles: "< "<< 100*lastcontrol/tot<<" %\n"; + di <<"stockage dans la S.D. "< "<< 100*stock/tot <<" %\n"; di << "\n"; - di <<"et plus precisement: "<<"\n"; - di <<"Add 11ere partie : "< "<<100*add11/tot <<" %"<<"\n"; - di <<"Add 12ere partie : "< "<<100*add12/tot <<" %"<<"\n"; - di <<"Add 2eme partie : "< "<<100*add2/tot <<" %"<<"\n"; - di <<"Update : "< "<<100*upda/tot <<" %"<<"\n"; - di <<"AddPoint : "< "<<100*addp/tot <<" %"<<"\n"; - di <<"UniformDeflection "< "<<100*unif/tot <<" %"<<"\n"; - di <<"Controle : "< "<<100*contr/tot <<" %"<<"\n"; - di <<"Points Internes: "< "<<100*inter/tot <<" %"<<"\n"; - di <<"calcul des isos et du, dv: "< "<<100*isos/tot <<" %"<<"\n"; - di <<"calcul des points sur isos: "< "<<100*pointsisos/tot <<" %"<<"\n"; - di <<"IsPointValid: "< "<<100*pointvalid/tot <<" %"<<"\n"; + di <<"et plus precisement: \n"; + di <<"Add 11ere partie : "< "<<100*add11/tot <<" %\n"; + di <<"Add 12ere partie : "< "<<100*add12/tot <<" %\n"; + di <<"Add 2eme partie : "< "<<100*add2/tot <<" %\n"; + di <<"Update : "< "<<100*upda/tot <<" %\n"; + di <<"AddPoint : "< "<<100*addp/tot <<" %\n"; + di <<"UniformDeflection "< "<<100*unif/tot <<" %\n"; + di <<"Controle : "< "<<100*contr/tot <<" %\n"; + di <<"Points Internes: "< "<<100*inter/tot <<" %\n"; + di <<"calcul des isos et du, dv: "< "<<100*isos/tot <<" %\n"; + di <<"calcul des points sur isos: "< "<<100*pointsisos/tot <<" %\n"; + di <<"IsPointValid: "< "<<100*pointvalid/tot <<" %\n"; di << "\n"; @@ -1126,7 +1126,7 @@ static Standard_Integer veriftriangles(Draw_Interpretor& di, Standard_Integer n, deflemin = Min(deflemin, defle); if (defle > defstock) { - di <<"face "<< nbface <<" deflection = " << defle <<" pour "< 0) { - di << "cross face errors: {face1, node1, face2, node2, distance}" << "\n"; + di << "cross face errors: {face1, node1, face2, node2, distance}\n"; for (i=1; i <= nbErr; i++) { Standard_Integer iF1, n1, iF2, n2; Standard_Real aVal; @@ -408,7 +408,7 @@ static Standard_Integer tricheck (Draw_Interpretor& di, int n, const char ** a) // dump info on edges Standard_Integer nbAsync = aCheck.NbAsyncEdges(); if (nbAsync > 0) { - di << "async edges:" << "\n"; + di << "async edges:\n"; for (i=1; i <= nbAsync; i++) { Standard_Integer ie = aCheck.GetAsyncEdgeNum(i); di << ie << " "; @@ -419,7 +419,7 @@ static Standard_Integer tricheck (Draw_Interpretor& di, int n, const char ** a) // dump info on free nodes Standard_Integer nbFreeNodes = aCheck.NbFreeNodes(); if (nbFreeNodes > 0) { - di << "free nodes (in pairs: face / node): " << "\n"; + di << "free nodes (in pairs: face / node): \n"; for (i=1; i <= nbFreeNodes; i++) { Standard_Integer iface, inode; aCheck.GetFreeNodeNum(i, iface, inode); diff --git a/src/Message/Message_Msg.hxx b/src/Message/Message_Msg.hxx index 7529a33efe..821793932e 100644 --- a/src/Message/Message_Msg.hxx +++ b/src/Message/Message_Msg.hxx @@ -45,7 +45,7 @@ class TCollection_HExtendedString; //! with previous versions). //! //! User fills the parameter fields in the text of the message by -//! calling corresponding methods Arg() or operators "<<". +//! calling corresponding methods Arg() or operators . //! //! The resulting message, filled with all parameters, can be obtained //! by method Get(). If some parameters were not filled, the text diff --git a/src/QABugs/QABugs_1.cxx b/src/QABugs/QABugs_1.cxx index 99539a8ab7..dda08524c2 100644 --- a/src/QABugs/QABugs_1.cxx +++ b/src/QABugs/QABugs_1.cxx @@ -70,12 +70,12 @@ static Standard_Integer OCC328bug (Draw_Interpretor& di, Standard_Integer argc, { Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if(aContext.IsNull()) { - di << argv[0] << "ERROR : use 'vinit' command before " << "\n"; + di << argv[0] << "ERROR : use 'vinit' command before \n"; return 1; } if ( argc != 3) { - di << "ERROR : Usage : " << argv[0] << " shape mode" << "\n"; + di << "ERROR : Usage : " << argv[0] << " shape mode\n"; return 1; } @@ -102,7 +102,7 @@ static Standard_Integer OCC328bug (Draw_Interpretor& di, Standard_Integer argc, ChoosingMode = 7; } if ( ChoosingMode == -1 ) { - di << "ERROR : " << argv[1] << " : vrong value of a mode" << "\n"; + di << "ERROR : " << argv[1] << " : vrong value of a mode\n"; return 1; } @@ -114,12 +114,12 @@ static Standard_Integer OCC328bug (Draw_Interpretor& di, Standard_Integer argc, Handle(AIS_InteractiveObject) AISObj; if(!aMap.IsBound2(aName)) { - di << "Use 'vdisplay' before" << "\n"; + di << "Use 'vdisplay' before\n"; return 1; } else { AISObj = Handle(AIS_InteractiveObject)::DownCast(aMap.Find2(aName)); if(AISObj.IsNull()){ - di << argv[1] << " : No interactive object" << "\n"; + di << argv[1] << " : No interactive object\n"; return 1; } @@ -182,7 +182,7 @@ static Standard_Integer OCC328bug (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer OCC159bug (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if ( argc != 2) { - di << "ERROR : Usage : " << argv[0] << " Doc" << "\n"; + di << "ERROR : Usage : " << argv[0] << " Doc\n"; return 1; } @@ -197,9 +197,9 @@ static Standard_Integer OCC159bug (Draw_Interpretor& di, Standard_Integer argc, Handle(TDocStd_Document) OwnerD1 = Owner->GetDocument(); if (OwnerD1.IsNull()) { - di << "DocOwner1 = NULL" << "\n"; + di << "DocOwner1 = NULL\n"; } else { - di << "DocOwner1 = NOTNULL" << "\n"; + di << "DocOwner1 = NOTNULL\n"; } Handle(TDocStd_Application) A; @@ -211,9 +211,9 @@ static Standard_Integer OCC159bug (Draw_Interpretor& di, Standard_Integer argc, Handle(TDocStd_Document) OwnerD2 = Owner->GetDocument(); if (OwnerD2.IsNull()) { - di << "DocOwner2 = NULL" << "\n"; + di << "DocOwner2 = NULL\n"; } else { - di << "DocOwner2 = NOTNULL" << "\n"; + di << "DocOwner2 = NOTNULL\n"; } Standard_Integer DocRefCount2 = D->GetRefCount(); @@ -225,7 +225,7 @@ static Standard_Integer OCC159bug (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer OCC145bug (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if ( argc != 3) { - di << "ERROR : Usage : " << argv[0] << " Shape MaxNbr" << "\n"; + di << "ERROR : Usage : " << argv[0] << " Shape MaxNbr\n"; return 1; } @@ -236,7 +236,7 @@ static Standard_Integer OCC145bug (Draw_Interpretor& di, Standard_Integer argc, TopoDS_Shape aShape; if (!BRepTools::Read(aShape, aFileName.ToCString(), aBld)) { - di << "ERROR :Could not read a shape!!!" << "\n"; + di << "ERROR :Could not read a shape!!!\n"; return 1; } @@ -246,7 +246,7 @@ static Standard_Integer OCC145bug (Draw_Interpretor& di, Standard_Integer argc, for (i = 1; i <= aMaxNbr; i++) { BRepBuilderAPI_MakeFace aMF(aWire); if (!aMF.IsDone()) { - di << "ERROR : Could not make a face" << "\n"; + di << "ERROR : Could not make a face\n"; return 1; } } @@ -257,7 +257,7 @@ static Standard_Integer OCC145bug (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer OCC73_SelectionMode (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if ( argc < 3) { - di << "ERROR : Usage : " << argv[0] << " DOC entry [SelectionMode]" << "\n"; + di << "ERROR : Usage : " << argv[0] << " DOC entry [SelectionMode]\n"; return 1; } @@ -299,13 +299,13 @@ static Standard_Integer OCC10bug (Draw_Interpretor& di, Standard_Integer argc, c } if(argc != 4) { - di << "Usage : " << argv[0] << " name plane Length" << "\n"; + di << "Usage : " << argv[0] << " name plane Length\n"; return 1; } TopoDS_Shape S = DBRep::Get( argv[2] ); if ( S.IsNull() ) { - di << "Shape is empty" << "\n"; + di << "Shape is empty\n"; return 1; } @@ -378,9 +378,9 @@ static Standard_Integer OCC10bug (Draw_Interpretor& di, Standard_Integer argc, c di << "getLength = " << getLength << "\n"; if (getLength == Length) { - di << "OCC10: OK" << "\n"; + di << "OCC10: OK\n"; } else { - di << "OCC10: ERROR" << "\n"; + di << "OCC10: ERROR\n"; } return 0; @@ -390,12 +390,12 @@ static Standard_Integer OCC74bug_set (Draw_Interpretor& di, Standard_Integer arg { Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if(aContext.IsNull()) { - di << argv[0] << "ERROR : use 'vinit' command before " << "\n"; + di << argv[0] << "ERROR : use 'vinit' command before \n"; return 1; } if ( argc != 3) { - di << "ERROR : Usage : " << argv[0] << " shape mode; set selection mode" << "\n"; + di << "ERROR : Usage : " << argv[0] << " shape mode; set selection mode\n"; return 1; } @@ -409,12 +409,12 @@ static Standard_Integer OCC74bug_set (Draw_Interpretor& di, Standard_Integer arg Standard_Integer SelectMode = Draw::Atoi(argv[2]); if(!aMap.IsBound2(aName)) { - di << "Use 'vdisplay' before" << "\n"; + di << "Use 'vdisplay' before\n"; return 1; } else { AISObj = Handle(AIS_InteractiveObject)::DownCast(aMap.Find2(aName)); if(AISObj.IsNull()){ - di << argv[1] << " : No interactive object" << "\n"; + di << argv[1] << " : No interactive object\n"; return 1; } if (!aContext->HasOpenedContext()) { @@ -434,12 +434,12 @@ static Standard_Integer OCC74bug_get (Draw_Interpretor& di, Standard_Integer arg { Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if(aContext.IsNull()) { - di << argv[0] << "ERROR : use 'vinit' command before " << "\n"; + di << argv[0] << "ERROR : use 'vinit' command before \n"; return 1; } if ( argc != 2) { - di << "ERROR : Usage : " << argv[0] << " shape; get selection mode" << "\n"; + di << "ERROR : Usage : " << argv[0] << " shape; get selection mode\n"; return 1; } @@ -449,12 +449,12 @@ static Standard_Integer OCC74bug_get (Draw_Interpretor& di, Standard_Integer arg Handle(AIS_InteractiveObject) AISObj; if(!aMap.IsBound2(aName)) { - di << "Use 'vdisplay' before" << "\n"; + di << "Use 'vdisplay' before\n"; return 1; } else { AISObj = Handle(AIS_InteractiveObject)::DownCast(aMap.Find2(aName)); if(AISObj.IsNull()){ - di << argv[1] << " : No interactive object" << "\n"; + di << argv[1] << " : No interactive object\n"; return 1; } TColStd_ListOfInteger anActivatedModes; @@ -475,14 +475,14 @@ static Standard_Integer OCC74bug_get (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer OCC361bug (Draw_Interpretor& di, Standard_Integer nb, const char ** a) { if ( nb != 2) { - di << "ERROR : Usage : " << a[0] << " Doc" << "\n"; - di << "-1" << "\n"; + di << "ERROR : Usage : " << a[0] << " Doc\n"; + di << "-1\n"; return -1; } Handle(TDocStd_Document) D; if (!DDocStd::GetDocument(a[1],D)) { - di << "-2" << "\n"; + di << "-2\n"; return 1; } @@ -504,9 +504,9 @@ static Standard_Integer OCC361bug (Draw_Interpretor& di, Standard_Integer nb, co aTBox = aBuilder2.NamedShape()->Get(); if(aTBox.Orientation() != TopAbs_REVERSED) { - di << "1" << "\n"; + di << "1\n"; } else { - di << "0" << "\n"; + di << "0\n"; } return 0; } diff --git a/src/QABugs/QABugs_10.cxx b/src/QABugs/QABugs_10.cxx index a4229cc9cb..dc58ec50d1 100644 --- a/src/QABugs/QABugs_10.cxx +++ b/src/QABugs/QABugs_10.cxx @@ -52,7 +52,7 @@ static Standard_Integer OCC426 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc < 7 || argc > 8) { - di << "Usage : " << argv[0] << " shape1 shape2 shape3 shape4 shape5 shape6 [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " shape1 shape2 shape3 shape4 shape5 shape6 [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -61,7 +61,7 @@ static Standard_Integer OCC426 (Draw_Interpretor& di, Standard_Integer argc, con if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def01) -// di << "Error: There is not BRepAlgo_Fuse class" << "\n"; +// di << "Error: There is not BRepAlgo_Fuse class\n"; // return 1; #endif } @@ -119,13 +119,13 @@ static Standard_Integer OCC426 (Draw_Interpretor& di, Standard_Integer argc, con TopoDS_Shape fuse32, fuse321; if (IsBRepAlgoAPI) { - di << "fuse32 = BRepAlgoAPI_Fuse(rs3, rs2)" <<"\n"; - di << "fuse321 = BRepAlgoAPI_Fuse(fuse32, rs1)" <<"\n"; + di << "fuse32 = BRepAlgoAPI_Fuse(rs3, rs2)\n"; + di << "fuse321 = BRepAlgoAPI_Fuse(fuse32, rs1)\n"; fuse32 = BRepAlgoAPI_Fuse(rs3, rs2); fuse321 = BRepAlgoAPI_Fuse(fuse32, rs1); } else { - di << "fuse32 = BRepAlgo_Fuse(rs3, rs2)" <<"\n"; - di << "fuse321 = BRepAlgo_Fuse(fuse32, rs1)" <<"\n"; + di << "fuse32 = BRepAlgo_Fuse(rs3, rs2)\n"; + di << "fuse321 = BRepAlgo_Fuse(fuse32, rs1)\n"; fuse32 = BRepAlgo_Fuse(rs3, rs2); fuse321 = BRepAlgo_Fuse(fuse32, rs1); } @@ -133,10 +133,10 @@ static Standard_Integer OCC426 (Draw_Interpretor& di, Standard_Integer argc, con //Give the mass claculation of the shpae "fuse321" GProp_GProps G; BRepGProp::VolumeProperties(fuse321, G); - di<<" "<<"\n"; - di<<"Mass: "< Fails @@ -332,7 +332,7 @@ static Standard_Integer OCC712 (Draw_Interpretor& di, Standard_Integer argc, con if (!MW.IsDone()) { - di << "my Wire not done" << "\n"; + di << "my Wire not done\n"; return 1; } TopoDS_Wire W = MW.Wire(); @@ -340,7 +340,7 @@ static Standard_Integer OCC712 (Draw_Interpretor& di, Standard_Integer argc, con TopoDS_Face F = BRepBuilderAPI_MakeFace(W); if ( F.IsNull()) { - di << " Error in Face creation " << "\n"; + di << " Error in Face creation \n"; return 1; } @@ -358,7 +358,7 @@ static Standard_Integer OCC712 (Draw_Interpretor& di, Standard_Integer argc, con BRepPrimAPI_MakePrism slab(F, slabVect, Standard_True); if ( ! slab.IsDone() ) { - di << " Error in Slab creation " << "\n"; + di << " Error in Slab creation \n"; return 1; } @@ -379,17 +379,17 @@ static Standard_Integer OCC712 (Draw_Interpretor& di, Standard_Integer argc, con draftSlab.Add(aFace, slabDir, angle, slabPln); if (!draftSlab.AddDone()) { - di << " Error in Add " << "\n"; + di << " Error in Add \n"; return 1; } } - di << "All Faces added. Building... " << "\n"; //cout.flush(); + di << "All Faces added. Building... \n"; //cout.flush(); draftSlab.Build(); - di << "Build done..." << "\n"; //cout.flush(); + di << "Build done...\n"; //cout.flush(); if (!draftSlab.IsDone()) //--------------> STEP:1 { - di << " Error in Build " << "\n"; + di << " Error in Build \n"; return 1; } slabShape = draftSlab.Shape(); @@ -398,7 +398,7 @@ static Standard_Integer OCC712 (Draw_Interpretor& di, Standard_Integer argc, con } catch ( Standard_Failure ) //--------------------> STEP:2 { - di << " Error in Draft Slab " << "\n"; + di << " Error in Draft Slab \n"; return 1; } return 0; @@ -426,20 +426,20 @@ Standard_Integer performTriangulation (TopoDS_Shape aShape, Draw_Interpretor& di if (facing.IsNull()) { failed++; - di << "******************** FAILED during Triangulation " << "\n"; + di << "******************** FAILED during Triangulation \n"; } else { - di << facing->NbTriangles() << " Triangles" <<"\n"; + di << facing->NbTriangles() << " Triangles\n"; } } - di<<"Triangulation of all Faces Completed: "<<"\n"<<"\n"; + di<<"Triangulation of all Faces Completed: \n\n"; if (failed == 0) return 1; - di<<"***************************************************"<<"\n"; - di<<"******* ********"<<"\n"; - di<<"***** Triangulation FAILED for " << failed << " of " << total << " Faces ******"<<"\n"; - di<<"******* ********"<<"\n"; - di<<"***************************************************"<<"\n"; + di<<"***************************************************\n"; + di<<"******* ********\n"; + di<<"***** Triangulation FAILED for " << failed << " of " << total << " Faces ******\n"; + di<<"******* ********\n"; + di<<"***************************************************\n"; return 0; } @@ -454,7 +454,7 @@ Standard_Integer performTriangulation (TopoDS_Shape aShape, Draw_Interpretor& di static Standard_Integer OCC822_1 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc < 4 || argc > 5) { - di << "Usage : " << argv[0] << " name1 name2 result [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " name1 name2 result [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -463,11 +463,11 @@ static Standard_Integer OCC822_1 (Draw_Interpretor& di, Standard_Integer argc, c if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def01) -// di << "Error: There is not BRepAlgo_Fuse class" << "\n"; +// di << "Error: There is not BRepAlgo_Fuse class\n"; // return 1; #endif #if ! defined(BRepAlgo_def02) -// di << "Error: There is not BRepAlgo_Cut class" << "\n"; +// di << "Error: There is not BRepAlgo_Cut class\n"; // return 1; #endif } @@ -493,42 +493,42 @@ static Standard_Integer OCC822_1 (Draw_Interpretor& di, Standard_Integer argc, c TopoDS_Shape conIn = conMakerIn.Shape(); TopoDS_Shape conOut = conMakerOut.Shape(); - di << "All primitives created..... Creating Boolean" << "\n"; + di << "All primitives created..... Creating Boolean\n"; TopoDS_Shape theIn, theOut, theRes; try { OCC_CATCH_SIGNALS if (IsBRepAlgoAPI) { - di << "theIn = BRepAlgoAPI_Fuse(cylIn, conIn)" <<"\n"; - di << "theOut = BRepAlgoAPI_Fuse(cylOut, conOut)" <<"\n"; - di << "theRes = BRepAlgoAPI_Cut(theOut, theIn)" <<"\n"; + di << "theIn = BRepAlgoAPI_Fuse(cylIn, conIn)\n"; + di << "theOut = BRepAlgoAPI_Fuse(cylOut, conOut)\n"; + di << "theRes = BRepAlgoAPI_Cut(theOut, theIn)\n"; theIn = BRepAlgoAPI_Fuse(cylIn, conIn); theOut = BRepAlgoAPI_Fuse(cylOut, conOut); theRes = BRepAlgoAPI_Cut(theOut, theIn); } else { - di << "theIn = BRepAlgo_Fuse(cylIn, conIn)" <<"\n"; - di << "theOut = BRepAlgo_Fuse(cylOut, conOut)" <<"\n"; + di << "theIn = BRepAlgo_Fuse(cylIn, conIn)\n"; + di << "theOut = BRepAlgo_Fuse(cylOut, conOut)\n"; theIn = BRepAlgo_Fuse(cylIn, conIn); theOut = BRepAlgo_Fuse(cylOut, conOut); - di << "theRes = BRepAlgo_Cut(theOut, theIn)" <<"\n"; + di << "theRes = BRepAlgo_Cut(theOut, theIn)\n"; theRes = BRepAlgo_Cut(theOut, theIn); } if (index < argc) DBRep::Set(argv[index++], theIn); if (index < argc) DBRep::Set(argv[index++], theOut); if (index < argc) DBRep::Set(argv[index++], theRes); - di << "Booleans Created ! Triangulating !" <<"\n"; + di << "Booleans Created ! Triangulating !\n"; performTriangulation(theRes, di); } catch ( Standard_Failure ) { - di<<"*********************************************************"<<"\n"; - di<<"***** ******"<<"\n"; - di<<"***** Standard_Failure : Exception in Shoe Function *****"<<"\n"; - di<<"***** ******"<<"\n"; - di<<"*********************************************************"<<"\n"; + di<<"*********************************************************\n"; + di<<"***** ******\n"; + di<<"***** Standard_Failure : Exception in Shoe Function *****\n"; + di<<"***** ******\n"; + di<<"*********************************************************\n"; return 1; } return 0; @@ -544,7 +544,7 @@ static Standard_Integer OCC822_1 (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer OCC822_2 (Draw_Interpretor& di,Standard_Integer argc, const char ** argv) { if(argc < 4 || argc > 5) { - di << "Usage : " << argv[0] << " name1 name2 result [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " name1 name2 result [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -553,7 +553,7 @@ static Standard_Integer OCC822_2 (Draw_Interpretor& di,Standard_Integer argc, co if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def01) -// di << "Error: There is not BRepAlgo_Fuse class" << "\n"; +// di << "Error: There is not BRepAlgo_Fuse class\n"; // return 1; #endif } @@ -573,17 +573,17 @@ static Standard_Integer OCC822_2 (Draw_Interpretor& di,Standard_Integer argc, co TopoDS_Shape sph = sphereMaker.Shape(); if (index < argc) DBRep::Set(argv[index++], sph); - di << "All primitives created..... Creating Cut Objects" << "\n"; + di << "All primitives created..... Creating Cut Objects\n"; TopoDS_Shape fuse; try { OCC_CATCH_SIGNALS if (IsBRepAlgoAPI) { - di << "fuse = BRepAlgoAPI_Fuse(box, sph)" <<"\n"; + di << "fuse = BRepAlgoAPI_Fuse(box, sph)\n"; fuse = BRepAlgoAPI_Fuse(box, sph); } else { - di << "fuse = BRepAlgo_Fuse(box, sph)" <<"\n"; + di << "fuse = BRepAlgo_Fuse(box, sph)\n"; fuse = BRepAlgo_Fuse(box, sph); } if (index < argc) DBRep::Set(argv[index++], fuse); @@ -593,11 +593,11 @@ static Standard_Integer OCC822_2 (Draw_Interpretor& di,Standard_Integer argc, co } catch ( Standard_Failure ) { - di<<"*********************************************************"<<"\n"; - di<<"***** ******"<<"\n"; - di<<"***** Standard_Failure : Exception in HSP Function ******"<<"\n"; - di<<"***** ******"<<"\n"; - di<<"*********************************************************"<<"\n"; + di<<"*********************************************************\n"; + di<<"***** ******\n"; + di<<"***** Standard_Failure : Exception in HSP Function ******\n"; + di<<"***** ******\n"; + di<<"*********************************************************\n"; return 1; } @@ -611,7 +611,7 @@ static Standard_Integer OCC822_2 (Draw_Interpretor& di,Standard_Integer argc, co static Standard_Integer OCC823 (Draw_Interpretor& di,Standard_Integer argc, const char ** argv) { if(argc < 4 || argc > 5) { - di << "Usage : " << argv[0] << " name1 name2 result [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " name1 name2 result [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -620,7 +620,7 @@ static Standard_Integer OCC823 (Draw_Interpretor& di,Standard_Integer argc, cons if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def01) -// di << "Error: There is not BRepAlgo_Fuse class" << "\n"; +// di << "Error: There is not BRepAlgo_Fuse class\n"; // return 1; #endif } @@ -642,31 +642,31 @@ static Standard_Integer OCC823 (Draw_Interpretor& di,Standard_Integer argc, cons TopoDS_Shape cyl2 = mkCyl2.Shape(); if (index < argc) DBRep::Set(argv[index++], cyl2); - di << "All primitives created..... Creating Boolean" << "\n"; + di << "All primitives created..... Creating Boolean\n"; TopoDS_Shape fuse; try { OCC_CATCH_SIGNALS if (IsBRepAlgoAPI) { - di << "fuse = BRepAlgoAPI_Fuse(cyl2, cyl1)" <<"\n"; + di << "fuse = BRepAlgoAPI_Fuse(cyl2, cyl1)\n"; fuse = BRepAlgoAPI_Fuse(cyl2, cyl1); } else { - di << "fuse = BRepAlgo_Fuse(cyl2, cyl1)" <<"\n"; + di << "fuse = BRepAlgo_Fuse(cyl2, cyl1)\n"; fuse = BRepAlgo_Fuse(cyl2, cyl1); } if (index < argc) DBRep::Set(argv[index++], fuse); - di << "Fuse Created ! Triangulating !" <<"\n"; + di << "Fuse Created ! Triangulating !\n"; performTriangulation(fuse, di); } catch ( Standard_Failure ) { - di<<"*********************************************************"<<"\n"; - di<<"***** ******"<<"\n"; - di<<"***** Standard_Failure : Exception in TEE Function ******"<<"\n"; - di<<"***** ******"<<"\n"; - di<<"*********************************************************"<<"\n"; + di<<"*********************************************************\n"; + di<<"***** ******\n"; + di<<"***** Standard_Failure : Exception in TEE Function ******\n"; + di<<"***** ******\n"; + di<<"*********************************************************\n"; return 1; } return 0; @@ -679,7 +679,7 @@ static Standard_Integer OCC823 (Draw_Interpretor& di,Standard_Integer argc, cons static Standard_Integer OCC824 (Draw_Interpretor& di,Standard_Integer argc, const char ** argv) { if(argc < 4 || argc > 5) { - di << "Usage : " << argv[0] << " name1 name2 result [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " name1 name2 result [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -688,7 +688,7 @@ static Standard_Integer OCC824 (Draw_Interpretor& di,Standard_Integer argc, cons if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def01) -// di << "Error: There is not BRepAlgo_Fuse class" << "\n"; +// di << "Error: There is not BRepAlgo_Fuse class\n"; // return 1; #endif } @@ -706,31 +706,31 @@ static Standard_Integer OCC824 (Draw_Interpretor& di,Standard_Integer argc, cons TopoDS_Shape sph = sphere.Shape(); if (index < argc) DBRep::Set(argv[index++], sph); - di << "All primitives created..... Creating Boolean" << "\n"; + di << "All primitives created..... Creating Boolean\n"; TopoDS_Shape fuse; try { OCC_CATCH_SIGNALS if (IsBRepAlgoAPI) { - di << "fuse = BRepAlgoAPI_Fuse(cyl, sph)" <<"\n"; + di << "fuse = BRepAlgoAPI_Fuse(cyl, sph)\n"; fuse = BRepAlgoAPI_Fuse(cyl, sph); } else { - di << "fuse = BRepAlgo_Fuse(cyl, sph)" <<"\n"; + di << "fuse = BRepAlgo_Fuse(cyl, sph)\n"; fuse = BRepAlgo_Fuse(cyl, sph); } - di << "Fuse Created ! Triangulating !" <<"\n"; + di << "Fuse Created ! Triangulating !\n"; if (index < argc) DBRep::Set(argv[index++], fuse); performTriangulation(fuse, di); } catch ( Standard_Failure ) { - di<<"*********************************************************"<<"\n"; - di<<"***** ******"<<"\n"; - di<<"***** Standard_Failure : Exception in YOU Function ******"<<"\n"; - di<<"***** ******"<<"\n"; - di<<"*********************************************************"<<"\n"; + di<<"*********************************************************\n"; + di<<"***** ******\n"; + di<<"***** Standard_Failure : Exception in YOU Function ******\n"; + di<<"***** ******\n"; + di<<"*********************************************************\n"; return 1; } return 0; @@ -748,7 +748,7 @@ static Standard_Integer OCC824 (Draw_Interpretor& di,Standard_Integer argc, cons static Standard_Integer OCC825 (Draw_Interpretor& di,Standard_Integer argc, const char ** argv) { if(argc < 6 || argc > 7) { - di << "Usage : " << argv[0] << " name1 name2 name3 result1 result2 [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " name1 name2 name3 result1 result2 [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -757,7 +757,7 @@ static Standard_Integer OCC825 (Draw_Interpretor& di,Standard_Integer argc, cons if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def02) -// di << "Error: There is not BRepAlgo_Cut class" << "\n"; +// di << "Error: There is not BRepAlgo_Cut class\n"; // return 1; #endif } @@ -790,59 +790,59 @@ static Standard_Integer OCC825 (Draw_Interpretor& di,Standard_Integer argc, cons TopoDS_Shape sph2 = sphere2.Shape(); if (index < argc) DBRep::Set(argv[index++], sph2); - di << "All primitives created..... Creating Cut Objects" << "\n"; + di << "All primitives created..... Creating Cut Objects\n"; TopoDS_Shape cut1, cut2; try { OCC_CATCH_SIGNALS if (IsBRepAlgoAPI) { - di << "cut1 = BRepAlgoAPI_Cut(sph1, hsp)" << "\n"; + di << "cut1 = BRepAlgoAPI_Cut(sph1, hsp)\n"; cut1 = BRepAlgoAPI_Cut(sph1, hsp); } else { - di << "cut1 = BRepAlgo_Cut(sph1, hsp)" << "\n"; + di << "cut1 = BRepAlgo_Cut(sph1, hsp)\n"; cut1 = BRepAlgo_Cut(sph1, hsp); } if (index < argc) DBRep::Set(argv[index++], cut1); di << "CUT 1 Created ! " ; if (IsBRepAlgoAPI) { - di << "cut2 = BRepAlgoAPI_Cut(sph2, hsp)" << "\n"; + di << "cut2 = BRepAlgoAPI_Cut(sph2, hsp)\n"; cut2 = BRepAlgoAPI_Cut(sph2, hsp); } else { - di << "cut2 = BRepAlgo_Cut(sph2, hsp)" << "\n"; + di << "cut2 = BRepAlgo_Cut(sph2, hsp)\n"; cut2 = BRepAlgo_Cut(sph2, hsp); } if (index < argc) DBRep::Set(argv[index++], cut2); - di << "CUT 2 Created !" << "\n" << "\n"; + di << "CUT 2 Created !\n\n"; GProp_GProps G; BRepGProp::VolumeProperties(cut1, G); - di<<"CUT 1 Mass = "< 5) { - di << "Usage : " << argv[0] << " name1 name2 result [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " name1 name2 result [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -863,7 +863,7 @@ static Standard_Integer OCC826 (Draw_Interpretor& di,Standard_Integer argc, cons if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def01) -// di << "Error: There is not BRepAlgo_Fuse class" << "\n"; +// di << "Error: There is not BRepAlgo_Fuse class\n"; // return 1; #endif } @@ -896,30 +896,30 @@ static Standard_Integer OCC826 (Draw_Interpretor& di,Standard_Integer argc, cons TopoDS_Shape sph = sphere.Shape(); if (index < argc) DBRep::Set(argv[index++], sph); - di << "All primitives created..... Creating Boolean" << "\n"; + di << "All primitives created..... Creating Boolean\n"; TopoDS_Shape fuse; try { OCC_CATCH_SIGNALS if (IsBRepAlgoAPI) { - di << "fuse = BRepAlgoAPI_Fuse(rev, sph)" << "\n"; + di << "fuse = BRepAlgoAPI_Fuse(rev, sph)\n"; fuse = BRepAlgoAPI_Fuse(rev, sph); } else { - di << "fuse = BRepAlgo_Fuse(rev, sph)" << "\n"; + di << "fuse = BRepAlgo_Fuse(rev, sph)\n"; fuse = BRepAlgo_Fuse(rev, sph); } if (index < argc) DBRep::Set(argv[index++], fuse); - di << "Fuse Created ! Triangulating !" << "\n"; + di << "Fuse Created ! Triangulating !\n"; performTriangulation(fuse, di); } catch ( Standard_Failure ) { - di<<"*********************************************************"<< "\n"; - di<<"***** ******"<< "\n"; - di<<"***** Standard_Failure : Exception in SPH Function ******"<< "\n"; - di<<"***** ******"<< "\n"; - di<<"*********************************************************"<< "\n"; + di<<"*********************************************************\n"; + di<<"***** ******\n"; + di<<"***** Standard_Failure : Exception in SPH Function ******\n"; + di<<"***** ******\n"; + di<<"*********************************************************\n"; return 1; } return 0; @@ -933,7 +933,7 @@ static Standard_Integer OCC826 (Draw_Interpretor& di,Standard_Integer argc, cons static Standard_Integer OCC827 (Draw_Interpretor& di,Standard_Integer argc, const char ** argv) { if(argc < 6 || argc > 7) { - di << "Usage : " << argv[0] << " name1 name2 name3 result1 result2 [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " name1 name2 name3 result1 result2 [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -942,7 +942,7 @@ static Standard_Integer OCC827 (Draw_Interpretor& di,Standard_Integer argc, cons if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def01) -// di << "Error: There is not BRepAlgo_Fuse class" << "\n"; +// di << "Error: There is not BRepAlgo_Fuse class\n"; // return 1; #endif } @@ -982,40 +982,40 @@ static Standard_Integer OCC827 (Draw_Interpretor& di,Standard_Integer argc, cons TopoDS_Shape tor2 = Torus2.Shape(); if (index < argc) DBRep::Set(argv[index++], tor2); - di << "All primitives created..... Creating Boolean" << "\n"; + di << "All primitives created..... Creating Boolean\n"; TopoDS_Shape fuse1, fuse2; try { OCC_CATCH_SIGNALS if (IsBRepAlgoAPI) { - di << "Fuse1 = BRepAlgoAPI_Fuse(tor1, rev)" << "\n"; + di << "Fuse1 = BRepAlgoAPI_Fuse(tor1, rev)\n"; fuse1 = BRepAlgoAPI_Fuse(tor1, rev); } else { - di << "Fuse1 = BRepAlgo_Fuse(tor1, rev)" << "\n"; + di << "Fuse1 = BRepAlgo_Fuse(tor1, rev)\n"; fuse1 = BRepAlgo_Fuse(tor1, rev); } if (index < argc) DBRep::Set(argv[index++], fuse1); - di << "Fuse1 Created ! Creating Fuse 2" << "\n"; + di << "Fuse1 Created ! Creating Fuse 2\n"; if (IsBRepAlgoAPI) { - di << "Fuse2 = BRepAlgoAPI_Fuse(tor2, fuse1)" << "\n"; + di << "Fuse2 = BRepAlgoAPI_Fuse(tor2, fuse1)\n"; fuse2 = BRepAlgoAPI_Fuse(tor2, fuse1); } else { - di << "Fuse2 = BRepAlgo_Fuse(tor2, fuse1)" << "\n"; + di << "Fuse2 = BRepAlgo_Fuse(tor2, fuse1)\n"; fuse2 = BRepAlgo_Fuse(tor2, fuse1); } if (index < argc) DBRep::Set(argv[index++], fuse2); - di << "Fuse2 Created ! Triangulating !" << "\n"; + di << "Fuse2 Created ! Triangulating !\n"; performTriangulation(fuse2, di); } catch ( Standard_Failure ) { - di<<"*********************************************************"<< "\n"; - di<<"***** ******"<< "\n"; - di<<"***** Standard_Failure : Exception in REV Function ******"<< "\n"; - di<<"***** ******"<< "\n"; - di<<"*********************************************************"<< "\n"; + di<<"*********************************************************\n"; + di<<"***** ******\n"; + di<<"***** Standard_Failure : Exception in REV Function ******\n"; + di<<"***** ******\n"; + di<<"*********************************************************\n"; return 1; } return 0; @@ -1053,14 +1053,14 @@ int performBlend (TopoDS_Shape aShape, Standard_Real rad, TopoDS_Shape& bShape, status = 1; } if(status) { - di<<"*******************************************************"<< "\n"; - di<<"****** *******"<< "\n"; - di<<"****** Blending Failed (Radius = " << rad << ") *******"<< "\n"; - di<<"****** *******"<< "\n"; - di<<"*******************************************************"<< "\n"; + di<<"*******************************************************\n"; + di<<"****** *******\n"; + di<<"****** Blending Failed (Radius = " << rad << ") *******\n"; + di<<"****** *******\n"; + di<<"*******************************************************\n"; return 1; } else { - di<<"Blending successfully performed on all Edges: "<< "\n" << "\n"; + di<<"Blending successfully performed on all Edges: \n\n"; } bShape = blend.Shape(); return 0; @@ -1074,7 +1074,7 @@ int performBlend (TopoDS_Shape aShape, Standard_Real rad, TopoDS_Shape& bShape, static Standard_Integer OCC828 (Draw_Interpretor& di,Standard_Integer argc, const char ** argv) { if(argc != 2) { - di << "Usage : " << argv[0] << " shape" << "\n"; + di << "Usage : " << argv[0] << " shape\n"; } int index = 1; @@ -1117,7 +1117,7 @@ static Standard_Integer OCC828 (Draw_Interpretor& di,Standard_Integer argc, cons if (!MW.IsDone()) { - di << "my Wire not done" << "\n"; + di << "my Wire not done\n"; return 1; } @@ -1125,7 +1125,7 @@ static Standard_Integer OCC828 (Draw_Interpretor& di,Standard_Integer argc, cons TopoDS_Face F = BRepBuilderAPI_MakeFace(W); if ( F.IsNull()) { - di << " Error in Face creation " << "\n"; + di << " Error in Face creation \n"; return 1; } @@ -1139,7 +1139,7 @@ static Standard_Integer OCC828 (Draw_Interpretor& di,Standard_Integer argc, cons BRepPrimAPI_MakePrism slab(F, slabVect, Standard_True); if ( ! slab.IsDone() ) { - di << " Error in Slab creation " << "\n"; + di << " Error in Slab creation \n"; return 1; } if (index < argc) DBRep::Set(argv[index++], slab.Shape()); @@ -1155,7 +1155,7 @@ static Standard_Integer OCC828 (Draw_Interpretor& di,Standard_Integer argc, cons } catch ( Standard_Failure ) { - di << " Error in Draft Slab " << "\n"; + di << " Error in Draft Slab \n"; return 1; } return 0; diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index f74ea412ae..24557a6427 100644 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -376,7 +376,7 @@ static int pipe_OCC9 (Draw_Interpretor& di, Standard_Integer n, const char ** a) { if (n < 6) { - di << "Usage: " << a[0] << " result path cur1 cur2 radius [tolerance]" << "\n"; + di << "Usage: " << a[0] << " result path cur1 cur2 radius [tolerance]\n"; return 1; } @@ -385,7 +385,7 @@ static int pipe_OCC9 (Draw_Interpretor& di, for (i=2 ; i<=4; i++) { Handle(Geom_Curve) aC = Handle(Geom_Curve)::DownCast( DrawTrSurf::Get(a[i]) ); if (aC.IsNull()) { - di << a[i] << " is not a curve" << "\n"; + di << a[i] << " is not a curve\n"; return 1; } aCurveSeq.Append(aC); @@ -469,21 +469,21 @@ Standard_Integer OCC157(Draw_Interpretor& di, //static Standard_Integer findplanarsurface(Draw_Interpretor&, Standard_Integer n, const char ** a) { if (n<3) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } // try to read a shape: TopoDS_Shape inputShape=DBRep::Get(a[2]); if (inputShape.IsNull() || inputShape.ShapeType() != TopAbs_WIRE) { - di << "Invalid input shape"<< "\n"; + di << "Invalid input shape\n"; return 1; } Standard_Real toler = Draw::Atof(a[3]); TopoDS_Wire aWire = TopoDS::Wire(inputShape); BRepLib_FindSurface FS(aWire, toler, Standard_True); if(FS.Found()) { - di<<"OCC157: OK; Planar surface is found"<<"\n"; + di<<"OCC157: OK; Planar surface is found\n"; Handle(Geom_Surface) aSurf = FS.Surface(); BRepBuilderAPI_MakeFace aMakeFace(aSurf,aWire,Standard_True); if(aMakeFace.IsDone()) { @@ -526,7 +526,7 @@ Standard_Integer OCC165(Draw_Interpretor& di , { if (n > 2) { - di <<"Usage : " << a[0] << " [file]"<<"\n"; + di <<"Usage : " << a[0] << " [file]\n"; return 1; } di.Eval ("axo"); @@ -676,7 +676,7 @@ static Standard_Integer OCC305 (Draw_Interpretor& di,Standard_Integer argc, cons { if (argc != 2) { - di <<"Usage : " << argv[0] << " file"<<"\n"; + di <<"Usage : " << argv[0] << " file\n"; return 1; } Standard_CString file = argv[1]; @@ -760,7 +760,7 @@ static Standard_Integer OCC166 (Draw_Interpretor& di, Standard_Integer /*argc*/, static Standard_Integer OCC381_Save (Draw_Interpretor& di, Standard_Integer nb, const char ** a) { if (nb != 2) { - di << "Usage: " << a[0] << " Doc" << "\n"; + di << "Usage: " << a[0] << " Doc\n"; return 1; } @@ -772,34 +772,34 @@ static Standard_Integer OCC381_Save (Draw_Interpretor& di, Standard_Integer nb, TCollection_ExtendedString theStatusMessage; if (!D->IsSaved()) { - di << "this document has never been saved" << "\n"; + di << "this document has never been saved\n"; return 0; } PCDM_StoreStatus theStatus = A->Save(D, theStatusMessage); if (theStatus != PCDM_SS_OK ) { switch ( theStatus ) { case PCDM_SS_DriverFailure: { - di << "Error saving document: Could not store , no driver found to make it" << "\n"; + di << "Error saving document: Could not store , no driver found to make it\n"; break ; } case PCDM_SS_WriteFailure: { - di << "Error saving document: Write access failure" << "\n"; + di << "Error saving document: Write access failure\n"; break; } case PCDM_SS_Failure: { - di << "Error saving document: Write failure" << "\n" ; + di << "Error saving document: Write failure\n" ; break; } case PCDM_SS_Doc_IsNull: { - di << "Error saving document: No document to save" << "\n"; + di << "Error saving document: No document to save\n"; break ; } case PCDM_SS_No_Obj: { - di << "Error saving document: No objects written" << "\n"; + di << "Error saving document: No objects written\n"; break; } case PCDM_SS_Info_Section_Error: { - di << "Error saving document: Write info section failure" << "\n" ; + di << "Error saving document: Write info section failure\n" ; break; } default: @@ -813,7 +813,7 @@ static Standard_Integer OCC381_Save (Draw_Interpretor& di, Standard_Integer nb, static Standard_Integer OCC381_SaveAs (Draw_Interpretor& di, Standard_Integer nb, const char ** a) { if (nb != 3) { - di << "Usage: " << a[0] << " Doc Path" << "\n"; + di << "Usage: " << a[0] << " Doc Path\n"; return 1; } @@ -829,27 +829,27 @@ static Standard_Integer OCC381_SaveAs (Draw_Interpretor& di, Standard_Integer nb if (theStatus != PCDM_SS_OK ) { switch ( theStatus ) { case PCDM_SS_DriverFailure: { - di << "Error saving document: Could not store , no driver found to make it" << "\n"; + di << "Error saving document: Could not store , no driver found to make it\n"; break ; } case PCDM_SS_WriteFailure: { - di << "Error saving document: Write access failure" << "\n"; + di << "Error saving document: Write access failure\n"; break; } case PCDM_SS_Failure: { - di << "Error saving document: Write failure" << "\n" ; + di << "Error saving document: Write failure\n" ; break; } case PCDM_SS_Doc_IsNull: { - di << "Error saving document: No document to save" << "\n"; + di << "Error saving document: No document to save\n"; break ; } case PCDM_SS_No_Obj: { - di << "Error saving document: No objects written" << "\n"; + di << "Error saving document: No objects written\n"; break; } case PCDM_SS_Info_Section_Error: { - di << "Error saving document: Write info section failure" << "\n" ; + di << "Error saving document: Write info section failure\n" ; break; } default: @@ -919,10 +919,10 @@ static Standard_Integer OCC309bug (Draw_Interpretor& di, Standard_Integer nb, co OSD_Path d = p.CurrentDirectory(); TCollection_AsciiString s; d.SystemName(s); - di << "*" << s.ToCString() << "*" << "\n"; + di << "*" << s.ToCString() << "*\n"; d.UpTrek(); d.SystemName(s); - di << "*" << s.ToCString() << "*" <<"\n"; + di << "*" << s.ToCString() << "*\n"; return 0; } @@ -951,7 +951,7 @@ static Standard_Integer OCC277bug (Draw_Interpretor& di, Standard_Integer nb, co // return 1; //} if(nb < 1 || nb > 2) { - di << "Usage : " << a[0] << " [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << a[0] << " [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -977,14 +977,14 @@ static Standard_Integer OCC277bug (Draw_Interpretor& di, Standard_Integer nb, co //#endif TopoDS_Shape fuse,comm; if (IsBRepAlgoAPI) { - di << "fuse = BRepAlgoAPI_Fuse( shape1, shape2 )" <<"\n"; - di << "comm = BRepAlgoAPI_Common( shape1, shape2 )" <<"\n"; + di << "fuse = BRepAlgoAPI_Fuse( shape1, shape2 )\n"; + di << "comm = BRepAlgoAPI_Common( shape1, shape2 )\n"; fuse = BRepAlgoAPI_Fuse( shape1, shape2 ); comm = BRepAlgoAPI_Common( shape1, shape2 ); } else { - di << "fuse = BRepAlgo_Fuse( shape1, shape2 )" <<"\n"; + di << "fuse = BRepAlgo_Fuse( shape1, shape2 )\n"; fuse = BRepAlgo_Fuse( shape1, shape2 ); - di << "comm = BRepAlgo_Common( shape1, shape2 )" <<"\n"; + di << "comm = BRepAlgo_Common( shape1, shape2 )\n"; comm = BRepAlgo_Common( shape1, shape2 ); } @@ -996,22 +996,22 @@ static Standard_Integer OCC277bug (Draw_Interpretor& di, Standard_Integer nb, co static Standard_Integer OCC333bug (Draw_Interpretor& di, Standard_Integer n, const char ** a) { if( n < 3) { - di<<"-1"<<"\n"; - di << "Usage: " << a[0] << " edge1 edge2 [toler domaindist]" << "\n"; + di<<"-1\n"; + di << "Usage: " << a[0] << " edge1 edge2 [toler domaindist]\n"; return 1; } TopoDS_Shape Sh1 = DBRep::Get(a[1]); TopoDS_Shape Sh2 = DBRep::Get(a[2]); if(Sh1.IsNull() || Sh2.IsNull()) { - di<<"-2"<<"\n"; - di<<"Invalid arguments"<<"\n"; + di<<"-2\n"; + di<<"Invalid arguments\n"; return 1; } TopoDS_Edge e1 = TopoDS::Edge(Sh1); TopoDS_Edge e2 = TopoDS::Edge(Sh2); if(e1.IsNull() || e2.IsNull()) { - di<<"-3"<<"\n"; - di<<"Invalid type of arguments"<<"\n"; + di<<"-3\n"; + di<<"Invalid type of arguments\n"; return 1; } Standard_Real aTol = Precision::Confusion(); @@ -1025,17 +1025,17 @@ static Standard_Integer OCC333bug (Draw_Interpretor& di, Standard_Integer n, con ShapeAnalysis_Edge sae; if(sae.CheckOverlapping(e1,e2,aTol,aDistDomain)) { if(aDistDomain ==0.0) { - di<<"1"<<"\n"; - di<<"Edges is overlaping comletly"<<"\n"; + di<<"1\n"; + di<<"Edges is overlaping comletly\n"; } else { - di<<"2"<<"\n"; - di<<"Edges is overlaped"<<"\n"; + di<<"2\n"; + di<<"Edges is overlaped\n"; di<<"with tolerance = "< 5) { - di << "Usage : " << argv[0] << " shape1 shape2 shape3 [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " shape1 shape2 shape3 [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -1463,9 +1463,9 @@ static Standard_Integer OCC578 (Draw_Interpretor& di, Standard_Integer argc, con Standard_Integer IsB = Draw::Atoi(argv[4]); if (IsB != 1) { IsBRepAlgoAPI = Standard_False; -// di << "Error: There is not BRepAlgo_Fuse class" << "\n"; +// di << "Error: There is not BRepAlgo_Fuse class\n"; // return 1; -// di << "Error: There is not BRepAlgo_Cut class" << "\n"; +// di << "Error: There is not BRepAlgo_Cut class\n"; // return 1; } } @@ -1540,10 +1540,10 @@ static Standard_Integer OCC578 (Draw_Interpretor& di, Standard_Integer argc, con //#endif TopoDS_Shape wedge_common; if (IsBRepAlgoAPI) { - di << "wedge_common = BRepAlgoAPI_Fuse(wedge1a , wedge2a)" <<"\n"; + di << "wedge_common = BRepAlgoAPI_Fuse(wedge1a , wedge2a)\n"; wedge_common = BRepAlgoAPI_Fuse(wedge1a , wedge2a); } else { - di << "wedge_common = BRepAlgo_Fuse(wedge1a , wedge2a)" <<"\n"; + di << "wedge_common = BRepAlgo_Fuse(wedge1a , wedge2a)\n"; wedge_common = BRepAlgo_Fuse(wedge1a , wedge2a); } @@ -1555,10 +1555,10 @@ static Standard_Integer OCC578 (Draw_Interpretor& di, Standard_Integer argc, con //#endif TopoDS_Shape sub_etch1; if (IsBRepAlgoAPI) { - di << "sub_etch1 = BRepAlgoAPI_Cut(substrate, wedge_common)" <<"\n"; + di << "sub_etch1 = BRepAlgoAPI_Cut(substrate, wedge_common)\n"; sub_etch1 = BRepAlgoAPI_Cut(substrate, wedge_common); } else { - di << "sub_etch1 = BRepAlgo_Cut(substrate, wedge_common)" <<"\n"; + di << "sub_etch1 = BRepAlgo_Cut(substrate, wedge_common)\n"; sub_etch1 = BRepAlgo_Cut(substrate, wedge_common); } @@ -1657,12 +1657,12 @@ static Standard_Integer OCC708 (Draw_Interpretor& di, Standard_Integer argc, con { Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if(aContext.IsNull()) { - di << argv[0] << "ERROR : use 'vinit' command before " << "\n"; + di << argv[0] << "ERROR : use 'vinit' command before \n"; return 1; } if ( argc != 2) { - di << "ERROR : Usage : " << argv[0] << " shape ; Deactivate the current transformation" << "\n"; + di << "ERROR : Usage : " << argv[0] << " shape ; Deactivate the current transformation\n"; return 1; } @@ -1674,12 +1674,12 @@ static Standard_Integer OCC708 (Draw_Interpretor& di, Standard_Integer argc, con Handle(AIS_InteractiveObject) AISObj; if(!aMap.IsBound2(aName)) { - di << "Use 'vdisplay' before" << "\n"; + di << "Use 'vdisplay' before\n"; return 1; } else { AISObj = Handle(AIS_InteractiveObject)::DownCast(aMap.Find2(aName)); if(AISObj.IsNull()){ - di << argv[1] << " : No interactive object" << "\n"; + di << argv[1] << " : No interactive object\n"; return 1; } AISObj->ResetTransformation(); @@ -1766,7 +1766,7 @@ static Standard_Integer OCC909 (Draw_Interpretor& di, Standard_Integer argc, con TopoDS_Wire awire = TopoDS::Wire(DBRep::Get(argv[1])); //read the wire TopoDS_Face aface = TopoDS::Face(DBRep::Get(argv[2])); //read the face if (awire.IsNull() || aface.IsNull()) { - di << "Null object" << "\n"; + di << "Null object\n"; return 1; } @@ -1792,7 +1792,7 @@ static Standard_Integer OCC921 (Draw_Interpretor& di, Standard_Integer argc, con { if (argc != 2) { - di <<"Usage : " << argv[0] << " face"<<"\n"; + di <<"Usage : " << argv[0] << " face\n"; return 1; } Standard_Real u1, u2, v1, v2; @@ -1815,7 +1815,7 @@ static Standard_Integer OCC902(Draw_Interpretor& di, Standard_Integer argc, cons { if (argc != 2) { - di <<"Usage : " << argv[0] << " expression"<<"\n"; + di <<"Usage : " << argv[0] << " expression\n"; return 1; } @@ -1873,7 +1873,7 @@ static Standard_Integer OCC1029_AISTransparency (Draw_Interpretor& di, return 0; } } - di << arg[0] << " : Error" << "\n"; + di << arg[0] << " : Error\n"; return 1; } @@ -1906,7 +1906,7 @@ static Standard_Integer OCC1030_AISColor (Draw_Interpretor& di, return 0; } } - di << arg[0] << " : Error" << "\n"; + di << arg[0] << " : Error\n"; return 1; } @@ -1940,7 +1940,7 @@ static Standard_Integer OCC1031_AISMaterial (Draw_Interpretor& di, return 0; } } - di << arg[0] << " : Error" << "\n"; + di << arg[0] << " : Error\n"; return 1; } @@ -1974,7 +1974,7 @@ static Standard_Integer OCC1032_AISWidth (Draw_Interpretor& di, return 0; } } - di << arg[0] << " : Error" << "\n"; + di << arg[0] << " : Error\n"; return 1; } @@ -2008,7 +2008,7 @@ static Standard_Integer OCC1033_AISMode (Draw_Interpretor& di, return 0; } } - di << arg[0] << " : Error" << "\n"; + di << arg[0] << " : Error\n"; return 1; } @@ -2042,7 +2042,7 @@ static Standard_Integer OCC1034_AISSelectionMode (Draw_Interpretor& di, return 0; } } - di << arg[0] << " : Error" << "\n"; + di << arg[0] << " : Error\n"; return 1; } @@ -2059,7 +2059,7 @@ static Standard_Integer OCC1487 (Draw_Interpretor& di, Standard_Integer argc, co // return -1; //} if(argc < 5 || argc > 6) { - di << "Usage : " << argv[0] << " CylinderVariant(=1/2) cylinder1 cylinder2 cutshape [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " CylinderVariant(=1/2) cylinder1 cylinder2 cutshape [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -2067,7 +2067,7 @@ static Standard_Integer OCC1487 (Draw_Interpretor& di, Standard_Integer argc, co Standard_Integer IsB = Draw::Atoi(argv[5]); if (IsB != 1) { IsBRepAlgoAPI = Standard_False; -// di << "Error: There is not BRepAlgo_Cut class" << "\n"; +// di << "Error: There is not BRepAlgo_Cut class\n"; // return 1; } } @@ -2098,10 +2098,10 @@ static Standard_Integer OCC1487 (Draw_Interpretor& di, Standard_Integer argc, co // o_cut_shape = BRepAlgo_Cut (o_mc1.Solid (), o_mc2.Solid ()); //#endif if (IsBRepAlgoAPI) { - di << "o_cut_shape = BRepAlgoAPI_Cut (o_mc1.Solid (), o_mc2.Solid ())" <<"\n"; + di << "o_cut_shape = BRepAlgoAPI_Cut (o_mc1.Solid (), o_mc2.Solid ())\n"; o_cut_shape = BRepAlgoAPI_Cut (o_mc1.Solid (), o_mc2.Solid ()); } else { - di << "o_cut_shape = BRepAlgo_Cut (o_mc1.Solid (), o_mc2.Solid ())" <<"\n"; + di << "o_cut_shape = BRepAlgo_Cut (o_mc1.Solid (), o_mc2.Solid ())\n"; o_cut_shape = BRepAlgo_Cut (o_mc1.Solid (), o_mc2.Solid ()); } } else { @@ -2118,10 +2118,10 @@ static Standard_Integer OCC1487 (Draw_Interpretor& di, Standard_Integer argc, co // o_cut_shape = BRepAlgo_Cut (o_mc1.Solid (), o_mc2.Solid ()); //#endif if (IsBRepAlgoAPI) { - di << "o_cut_shape = BRepAlgoAPI_Cut (o_mc1.Solid (), o_mc2.Solid ())" <<"\n"; + di << "o_cut_shape = BRepAlgoAPI_Cut (o_mc1.Solid (), o_mc2.Solid ())\n"; o_cut_shape = BRepAlgoAPI_Cut (o_mc1.Solid (), o_mc2.Solid ()); } else { - di << "o_cut_shape = BRepAlgo_Cut (o_mc1.Solid (), o_mc2.Solid ())" <<"\n"; + di << "o_cut_shape = BRepAlgo_Cut (o_mc1.Solid (), o_mc2.Solid ())\n"; o_cut_shape = BRepAlgo_Cut (o_mc1.Solid (), o_mc2.Solid ()); } } @@ -2234,7 +2234,7 @@ TopoDS_Shape OCC1077_Bug() static Standard_Integer OCC1077 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc < 1 || argc > 2) { - di << "Usage : " << argv[0] << " result" << "\n"; + di << "Usage : " << argv[0] << " result\n"; return 1; } @@ -2253,7 +2253,7 @@ static Standard_Integer OCC5739_UniAbs (Draw_Interpretor& di, Standard_Integer a { if (argc < 4) { - di << "Usage : " << argv[0] << " name shape step" << "\n"; + di << "Usage : " << argv[0] << " name shape step\n"; return 1; } const char *name = argv[1]; @@ -2266,7 +2266,7 @@ static Standard_Integer OCC5739_UniAbs (Draw_Interpretor& di, Standard_Integer a TopoDS_Shape wire = DBRep::Get(argv[2]); if (wire.IsNull() || wire.ShapeType() != TopAbs_WIRE) { - di << argv[0] <<" Faulty : incorrect 1st parameter, curve or wire expected"<<"\n"; + di << argv[0] <<" Faulty : incorrect 1st parameter, curve or wire expected\n"; return 1; } adapCurve = new BRepAdaptor_CompCurve(TopoDS::Wire(wire)); @@ -2276,7 +2276,7 @@ static Standard_Integer OCC5739_UniAbs (Draw_Interpretor& di, Standard_Integer a int res; if (!aUni.IsDone()) { - di << argv[0] <<" : fail"<<"\n"; + di << argv[0] <<" : fail\n"; res = 1; } else @@ -2301,7 +2301,7 @@ static Standard_Integer OCC6046 (Draw_Interpretor& di, Standard_Integer argc, co { if (argc != 3) { - di << "Usage : " << argv[0] << " nb_of_vectors size" << "\n"; + di << "Usage : " << argv[0] << " nb_of_vectors size\n"; return 1; } @@ -2310,7 +2310,7 @@ static Standard_Integer OCC6046 (Draw_Interpretor& di, Standard_Integer argc, co Standard_Real val = 10; math_Vector **pv = new math_Vector *[nb]; - di<<"creating "< Precision::Confusion()) { //cout.precision(3); di<<"error_dist = "<GetMessageString(); - di << ")... KO" << "\n"; + di << ")... KO\n"; Succes = Standard_False; } #ifndef NO_CXX_EXCEPTION // this case tests if (...) supersedes (Standard_*), // the normal behaviour is not catch(...) { - di<<" unknown exception... (But) Ok"<<"\n"; + di<<" unknown exception... (But) Ok\n"; } #endif } @@ -2445,23 +2445,23 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co di << "\n"; Standard_Real res, a= 4.0, b=0.0; res = a / b; - di << " 4.0 / 0.0 = " << res << " Does not Caught... OK"<< "\n"; + di << " 4.0 / 0.0 = " << res << " Does not Caught... OK\n"; } catch(Standard_DivideByZero) // Solaris, Windows w/o SSE2 { - di << " KO" << "\n"; + di << " KO\n"; Succes = Standard_False; } catch(Standard_NumericError) // Linux, Windows with SSE2 { - di << " KO" << "\n"; + di << " KO\n"; Succes = Standard_False; } catch(Standard_Failure) { //cout << " Caught (" << Standard_Failure::Caught() << ")... KO" << endl; di << " Caught ("; di << Standard_Failure::Caught()->GetMessageString(); - di << ")... KO" << "\n"; + di << ")... KO\n"; Succes = Standard_False; } } @@ -2477,16 +2477,16 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co res = i + 1; //++++ cout << " -- "<GetMessageString(); - di << ")... KO" << "\n"; + di << ")... KO\n"; Succes = Standard_False; } } @@ -2503,23 +2503,23 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co (void)sin(1.); //this function tests FPU flags and raises signal (tested on LINUX). - di << "-- "<GetMessageString(); - di << ")... KO" << "\n"; + di << ")... KO\n"; Succes = Standard_False; } } @@ -2536,23 +2536,23 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co //res = res + 1.; //++++ cout<<"-- "<GetMessageString(); - di << ")... KO" << "\n"; + di << ")... KO\n"; Succes = Standard_False; } } @@ -2566,17 +2566,17 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co di << "\n"; Standard_Real res, r=-1; res = sqrt(r); - di<<" "<GetMessageString(); - di << ")... KO" << "\n"; + di << ")... KO\n"; Succes = Standard_False; } } @@ -2590,7 +2590,7 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co di << "\n"; int* pint=NULL; *pint = 4; - di << " Does not Caught... KO"<<"\n"; + di << " Does not Caught... KO\n"; Succes = Standard_False; } #ifdef _WIN32 @@ -2599,12 +2599,12 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co catch(OSD_SIGSEGV) #endif { - di << " Ok"<< "\n"; + di << " Ok\n"; } catch(Standard_Failure) { //cout << " Caught (" << Standard_Failure::Caught() << ")... KO" << endl; di << " Caught ("; di << Standard_Failure::Caught()->GetMessageString(); - di << ")... KO" << "\n"; + di << ")... KO\n"; Succes = Standard_False; } } @@ -2618,26 +2618,26 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co //cout.flush(); di << "\n"; StackOverflow(); - di << " Does not Caught... KO"<<"\n"; + di << " Does not Caught... KO\n"; Succes = Standard_False; } catch(OSD_Exception_STACK_OVERFLOW) { - di << " Ok"<< "\n"; + di << " Ok\n"; } catch(Standard_Failure) { //cout << " Caught (" << Standard_Failure::Caught() << ")... KO" << endl; di << " Caught ("; di << Standard_Failure::Caught()->GetMessageString(); - di << ")... KO" << "\n"; + di << ")... KO\n"; Succes = Standard_False; } } #endif if(Succes) { - di << "TestExcept: Successfull completion" << "\n"; + di << "TestExcept: Successfull completion\n"; } else { - di << "TestExcept: failure" << "\n"; + di << "TestExcept: failure\n"; } return 0; @@ -2671,7 +2671,7 @@ static Standard_Integer OCC7141 (Draw_Interpretor& di, Standard_Integer argc, co if (argc > 3) { - di << "Usage : " << argv[0] << " [nCount] path" << "\n"; + di << "Usage : " << argv[0] << " [nCount] path\n"; return 1; } @@ -2686,7 +2686,7 @@ static Standard_Integer OCC7141 (Draw_Interpretor& di, Standard_Integer argc, co shapeTool->AddShape(AddTestStructure(nCount), Standard_True); STEPControl_StepModelType mode = STEPControl_AsIs; if (!Interface_Static::SetIVal("write.step.assembly",1)) { //assembly mode - di << "Failed to set assembly mode for step data\n" << "\n"; + di << "Failed to set assembly mode for step data\n\n"; return 0; } try { @@ -2696,14 +2696,14 @@ static Standard_Integer OCC7141 (Draw_Interpretor& di, Standard_Integer argc, co } } catch(OSD_Exception_STACK_OVERFLOW) { - di << "Failed : STACK OVERFLOW\n" << "\n"; + di << "Failed : STACK OVERFLOW\n\n"; } catch (Standard_Failure) { - di << "Failed :\n" << "\n"; + di << "Failed :\n\n"; //cout << Standard_Failure::Caught() << endl; di << Standard_Failure::Caught()->GetMessageString(); } - di << argv[0] << " : Finish" << "\n"; + di << argv[0] << " : Finish\n"; return 0; } @@ -2755,7 +2755,7 @@ static Standard_Integer OCC8169 (Draw_Interpretor& di, Standard_Integer argc, co { if (argc != 4) { - di << "Usage : " << argv[0] << " edge1 edge2 plane" << "\n"; + di << "Usage : " << argv[0] << " edge1 edge2 plane\n"; return 1; } TopoDS_Edge theEdge1 = TopoDS::Edge(DBRep::Get(argv[1],TopAbs_EDGE)); @@ -2794,7 +2794,7 @@ static Standard_Integer OCC8169 (Draw_Interpretor& di, Standard_Integer argc, co Standard_Integer i; for (i=1; i<=NbPoints; i++) { gp_Pnt2d aPi = anInter.Point(i); - di << "Point.X(" << i << ") = " << aPi.X() << " " << "Point.Y(" << i << ") = " << aPi.Y() << "\n" ; + di << "Point.X(" << i << ") = " << aPi.X() << " Point.Y(" << i << ") = " << aPi.Y() << "\n" ; } } @@ -2810,20 +2810,20 @@ static Standard_Integer OCC8169 (Draw_Interpretor& di, Standard_Integer argc, co Standard_Real aDist = aP1.Distance(aP2); - di << "aP1.X() = " << aP1.X() << " " << "aP1.Y() = " << aP1.Y() << "\n" ; - di << "aP2.X() = " << aP2.X() << " " << "aP2.Y() = " << aP2.Y() << "\n" ; + di << "aP1.X() = " << aP1.X() << " aP1.Y() = " << aP1.Y() << "\n" ; + di << "aP2.X() = " << aP2.X() << " aP2.Y() = " << aP2.Y() << "\n" ; di << "Distance = " << aDist << "\n" ; di << "Confusion = " << aConfusion << "\n" ; if (aDist > aConfusion) { - di << "\n" << argv[0] << " Faulty" << "\n" ; + di << "\n" << argv[0] << " Faulty\n" ; } else { - di << "\n" << argv[0] << " OK" << "\n" ; + di << "\n" << argv[0] << " OK\n" ; } } else { - di << "\n" << argv[0] << " OK" << "\n" ; + di << "\n" << argv[0] << " OK\n" ; } return 0; @@ -2832,7 +2832,7 @@ static Standard_Integer OCC10138 (Draw_Interpretor& di, Standard_Integer argc, c { if (argc != 3) { - di << "Usage : " << argv[0] << " lower upper" << "\n"; + di << "Usage : " << argv[0] << " lower upper\n"; return 1; } @@ -3042,7 +3042,7 @@ static Standard_Integer OCC7639 (Draw_Interpretor& di, Standard_Integer argc, co if (argc < 3 || IsEvenArgc) { - di << "Usage : " << argv[0] << " index1 value1 ... [indexN valueN]" << "\n"; + di << "Usage : " << argv[0] << " index1 value1 ... [indexN valueN]\n"; return 1; } @@ -4529,7 +4529,7 @@ static Standard_Integer OCC12584 (Draw_Interpretor& di, Standard_Integer argc, c { Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if(aContext.IsNull()) { - di << argv[0] << " ERROR : use 'vinit' command before " << "\n"; + di << argv[0] << " ERROR : use 'vinit' command before \n"; return -1; } @@ -4577,9 +4577,9 @@ static Standard_Integer OCC12584 (Draw_Interpretor& di, Standard_Integer argc, c if (mode == 2) { Standard_Boolean IsDisplayed = aContext->IsDisplayed (aCS); if (IsDisplayed) - di <<"ColorScaleIsDisplayed = " << "1" << "\n"; + di <<"ColorScaleIsDisplayed = 1\n"; else - di <<"ColorScaleIsDisplayed = " << "0" << "\n"; + di <<"ColorScaleIsDisplayed = 0\n"; } } return 0; @@ -4641,8 +4641,8 @@ static Standard_Integer OCC18612igesbrep (Draw_Interpretor& di, Standard_Integer progress->Show(); if (readstat != IFSelect_RetDone) { - if (modfic) di<<"Could not read file "<ClearContext(); XSDRAW::SetTransferProcess (thesession->MapReader()); @@ -4702,7 +4702,7 @@ static Standard_Integer OCC18612igesbrep (Draw_Interpretor& di, Standard_Integer if ( answer == 1 || answer == 3) { TopoDS_Shape shape = Reader.OneShape(); // save the shape - if (shape.IsNull()) { di<<"No Shape produced"<<"\n"; continue; } + if (shape.IsNull()) { di<<"No Shape produced\n"; continue; } char fname[110]; Sprintf(fname, "%s", rnom.ToCString()); di << "Saving shape in variable Draw : " << fname << "\n"; @@ -4714,7 +4714,7 @@ static Standard_Integer OCC18612igesbrep (Draw_Interpretor& di, Standard_Integer catch(Standard_Failure) { di << "** Exception : "; di << Standard_Failure::Caught()->GetMessageString(); - di<<" ** Skip"<<"\n"; + di<<" ** Skip\n"; di << "Saving shape in variable Draw : " << fname << "\n"; IGESToBRep::WriteShape (shape,1); } @@ -4725,7 +4725,7 @@ static Standard_Integer OCC18612igesbrep (Draw_Interpretor& di, Standard_Integer for (Standard_Integer inum = 1; inum <= numshape; inum++) { // save all the shapes TopoDS_Shape shape = Reader.Shape(inum); - if (shape.IsNull()) { di<<"No Shape produced"<<"\n"; continue; } + if (shape.IsNull()) { di<<"No Shape produced\n"; continue; } char fname[110]; Sprintf(fname, "%s_%d", rnom.ToCString(),inum); di << "Saving shape in variable Draw : " << fname << "\n"; @@ -4737,7 +4737,7 @@ static Standard_Integer OCC18612igesbrep (Draw_Interpretor& di, Standard_Integer catch(Standard_Failure) { di << "** Exception : "; di << Standard_Failure::Caught()->GetMessageString(); - di<<" ** Skip"<<"\n"; + di<<" ** Skip\n"; } } } @@ -4751,12 +4751,12 @@ static Standard_Integer OCC18612igesbrep (Draw_Interpretor& di, Standard_Integer cout << " give the number of the Entity : " << flush; nent = XSDRAW::GetEntityNumber(); - if (!Reader.TransferOne (nent)) di<<"Transfer entity n0 "< DRAW Shape: "<ClearContext(); XSDRAW::SetTransferProcess (thesession->MapReader()); @@ -4801,7 +4801,7 @@ static Standard_Integer OCC18612igesbrep (Draw_Interpretor& di, Standard_Integer catch(Standard_Failure) { di << "** Exception : "; di << Standard_Failure::Caught()->GetMessageString(); - di<<" ** Skip"<<"\n"; + di<<" ** Skip\n"; di << "Saving shape in variable Draw : " << fname << "\n"; IGESToBRep::WriteShape (shape,1); } @@ -4820,7 +4820,7 @@ static Standard_Integer OCC18612igesbrep (Draw_Interpretor& di, Standard_Integer list = XSDRAW::GetList (compart.ToCString()); } if (list.IsNull()) { - di<<"No list defined. Give a selection name or * for all visible transferrable roots"<<"\n"; + di<<"No list defined. Give a selection name or * for all visible transferrable roots\n"; continue; } } @@ -4864,12 +4864,12 @@ static Standard_Integer OCC18612igesbrep (Draw_Interpretor& di, Standard_Integer nent = Reader.Model()->Number(list->Value(ill)); if (nent == 0) continue; - if (!Reader.TransferOne(nent)) di<<"Transfer entity n0 "< DRAW Shape: "< 5) { - di << "Usage : " << argv[0] << " result [angle [reverse [order]]]" << "\n"; + di << "Usage : " << argv[0] << " result [angle [reverse [order]]]\n"; return 1; } diff --git a/src/QABugs/QABugs_13.cxx b/src/QABugs/QABugs_13.cxx index 81a236f49e..796373b9ee 100644 --- a/src/QABugs/QABugs_13.cxx +++ b/src/QABugs/QABugs_13.cxx @@ -75,10 +75,10 @@ static Standard_Integer OCC332bug (Draw_Interpretor& di, Standard_Integer argc, //if ((bend_angle >= M_PI)) { if ((bend_angle >= M_PI)) { - di << "The arguments are invalid." << "\n"; + di << "The arguments are invalid.\n"; return 1; } - di << "creating the shape for a bent tube" << "\n"; + di << "creating the shape for a bent tube\n"; double radius_l = dia1/2.0; double radius_r = dia2/2.0; @@ -313,60 +313,60 @@ static Standard_Integer OCC332bug (Draw_Interpretor& di, Standard_Integer argc, if (check) { if (!(BRepCheck_Analyzer(wallSolid).IsValid())) - di << "The TopoDS_Solid was checked, and it was invalid!" << "\n"; + di << "The TopoDS_Solid was checked, and it was invalid!\n"; else - di << "The TopoDS_Solid was checked, and it was valid." << "\n"; + di << "The TopoDS_Solid was checked, and it was valid.\n"; if (!wallSolid.Closed()) - di << "The TopoDS_Solid is not closed!" << "\n"; + di << "The TopoDS_Solid is not closed!\n"; else - di << "The TopoDS_Solid is closed." << "\n"; + di << "The TopoDS_Solid is closed.\n"; if (!wallSolid.Checked()) - di << "The TopoDS_Solid is not checked!" << "\n"; + di << "The TopoDS_Solid is not checked!\n"; else - di << "The TopoDS_Solid has been checked." << "\n"; + di << "The TopoDS_Solid has been checked.\n"; if (wallSolid.Infinite()) - di << "The TopoDS_Solid is infinite!" << "\n"; + di << "The TopoDS_Solid is infinite!\n"; else - di << "The TopoDS_Solid is finite." << "\n"; + di << "The TopoDS_Solid is finite.\n"; } di << "The result is a "; // Check to see if we have a solid switch (wallSolid.ShapeType()) { case (TopAbs_COMPOUND): - di << "TopAbs_COMPOUND" << "\n"; + di << "TopAbs_COMPOUND\n"; break; case (TopAbs_COMPSOLID): - di << "TopAbs_COMPSOLID" << "\n"; + di << "TopAbs_COMPSOLID\n"; break; case (TopAbs_SOLID): - di << "TopAbs_SOLID" << "\n"; + di << "TopAbs_SOLID\n"; break; case (TopAbs_SHELL): - di << "TopAbs_SHELL" << "\n"; + di << "TopAbs_SHELL\n"; break; case (TopAbs_FACE): - di << "TopAbs_FACE" << "\n"; + di << "TopAbs_FACE\n"; break; case (TopAbs_WIRE): - di << "TopAbs_WIRE" << "\n"; + di << "TopAbs_WIRE\n"; break; case (TopAbs_EDGE): - di << "TopAbs_EDGE" << "\n"; + di << "TopAbs_EDGE\n"; break; case (TopAbs_VERTEX): - di << "TopAbs_VERTEX" << "\n"; + di << "TopAbs_VERTEX\n"; break; case (TopAbs_SHAPE): - di << "TopAbs_SHAPE" << "\n"; + di << "TopAbs_SHAPE\n"; } di << "Can we turn it into a solid? "; try { OCC_CATCH_SIGNALS - di << " yes" << "\n"; + di << " yes\n"; } catch (Standard_TypeMismatch) { - di << " no" << "\n"; + di << " no\n"; } getFaces.Clear(); @@ -400,7 +400,7 @@ static Standard_Integer OCC332bug (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer OCC544 (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if(argc > 7) { - di << "Usage : " << argv[0] << " [[[[[wT [[[[d1 [[[d2 [[R [length [BRepAlgoAPI/BRepAlgo = 1/0]]]]]]" << "\n"; + di << "Usage : " << argv[0] << " [[[[[wT [[[[d1 [[[d2 [[R [length [BRepAlgoAPI/BRepAlgo = 1/0]]]]]]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -409,7 +409,7 @@ static Standard_Integer OCC544 (Draw_Interpretor& di, Standard_Integer argc, con if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def01) -// di << "Error: There is not BRepAlgo_Fuse class" << "\n"; +// di << "Error: There is not BRepAlgo_Fuse class\n"; // return 1; #endif } @@ -438,10 +438,10 @@ static Standard_Integer OCC544 (Draw_Interpretor& di, Standard_Integer argc, con // mkv 15.07.03 if ((bend_angle >= 2.0*M_PI)) { if ((bend_angle >= 2.0*M_PI)) { - di << "The arguments are invalid." << "\n"; + di << "The arguments are invalid.\n"; return 1; } - di << "creating the shape for a bent tube" << "\n"; + di << "creating the shape for a bent tube\n"; gp_Ax2 origin(gp_Pnt(500.0,-300.0, 100.0), gp_Dir(0.0, -1.0/sqrt(2.0), -1.0/sqrt(2.0))); @@ -634,31 +634,31 @@ static Standard_Integer OCC544 (Draw_Interpretor& di, Standard_Integer argc, con // Check to see if we have a solid switch (SewIt.SewedShape().ShapeType()) { case (TopAbs_COMPOUND): - di << "TopAbs_COMPOUND" << "\n"; + di << "TopAbs_COMPOUND\n"; break; case (TopAbs_COMPSOLID): - di << "TopAbs_COMPSOLID" << "\n"; + di << "TopAbs_COMPSOLID\n"; break; case (TopAbs_SOLID): - di << "TopAbs_SOLID" << "\n"; + di << "TopAbs_SOLID\n"; break; case (TopAbs_SHELL): - di << "TopAbs_SHELL" << "\n"; + di << "TopAbs_SHELL\n"; break; case (TopAbs_FACE): - di << "TopAbs_FACE" << "\n"; + di << "TopAbs_FACE\n"; break; case (TopAbs_WIRE): - di << "TopAbs_WIRE" << "\n"; + di << "TopAbs_WIRE\n"; break; case (TopAbs_EDGE): - di << "TopAbs_EDGE" << "\n"; + di << "TopAbs_EDGE\n"; break; case (TopAbs_VERTEX): - di << "TopAbs_VERTEX" << "\n"; + di << "TopAbs_VERTEX\n"; break; case (TopAbs_SHAPE): - di << "TopAbs_SHAPE" << "\n"; + di << "TopAbs_SHAPE\n"; } BRep_Builder B; @@ -670,19 +670,19 @@ static Standard_Integer OCC544 (Draw_Interpretor& di, Standard_Integer argc, con TubeShell = TopoDS::Shell(SewIt.SewedShape()); B.MakeSolid(wallSolid); B.Add(wallSolid,TubeShell); - di << " yes" << "\n"; + di << " yes\n"; } catch (Standard_TypeMismatch) { - di << "Can't convert to shell..." << "\n"; + di << "Can't convert to shell...\n"; TopExp_Explorer getSol; getSol.Init(SewIt.SewedShape(), TopAbs_SOLID); if (getSol.More()) { - di << "First solid found in compound" << "\n"; + di << "First solid found in compound\n"; wallSolid = TopoDS::Solid(getSol.Current()); TopoDS_Solid test_solid; while (getSol.More()) { - di << "Next solid found in compound" << "\n"; + di << "Next solid found in compound\n"; getSol.Next(); test_solid = TopoDS::Solid(getSol.Current()); //////#if ! defined(BRepAlgoAPI_def01) @@ -692,12 +692,12 @@ static Standard_Integer OCC544 (Draw_Interpretor& di, Standard_Integer argc, con //////#endif ////// fuser.Build(); if (IsBRepAlgoAPI) { - di << "BRepAlgoAPI_Fuse fuser(test_solid, wallSolid)" <<"\n"; + di << "BRepAlgoAPI_Fuse fuser(test_solid, wallSolid)\n"; BRepAlgoAPI_Fuse fuser(test_solid, wallSolid); fuser.Build(); wallSolid = TopoDS::Solid(fuser.Shape()); } else { - di << "BRepAlgo_Fuse fuser(test_solid, wallSolid)" <<"\n"; + di << "BRepAlgo_Fuse fuser(test_solid, wallSolid)\n"; BRepAlgo_Fuse fuser(test_solid, wallSolid); fuser.Build(); wallSolid = TopoDS::Solid(fuser.Shape()); @@ -709,14 +709,14 @@ static Standard_Integer OCC544 (Draw_Interpretor& di, Standard_Integer argc, con TopExp_Explorer getShel; getShel.Init(SewIt.SewedShape(), TopAbs_SHELL); if (getShel.More()) { - di << "First shell found in compound" << "\n"; + di << "First shell found in compound\n"; B.MakeSolid(wallSolid); - di << "B.Add(wallSolid,TopoDS::Shell(getShel.Current()));" << "\n"; + di << "B.Add(wallSolid,TopoDS::Shell(getShel.Current()));\n"; int i = 1; while (getShel.More()) { - di << "Next shell found in compound" << "\n"; - di << "B.Add(wallSolid,TopoDS::Shell(getShel.Current()));" << "\n"; + di << "Next shell found in compound\n"; + di << "B.Add(wallSolid,TopoDS::Shell(getShel.Current()));\n"; Sprintf(name,"shell%d", i++); DBRep::Set(name,getShel.Current()); B.Add(wallSolid,TopoDS::Shell(getShel.Current())); @@ -736,52 +736,52 @@ static Standard_Integer OCC544 (Draw_Interpretor& di, Standard_Integer argc, con if (check) { if (!(BRepCheck_Analyzer(wallSolid).IsValid())) - di << "The TopoDS_Solid was checked, and it was invalid!" << "\n"; + di << "The TopoDS_Solid was checked, and it was invalid!\n"; else - di << "The TopoDS_Solid was checked, and it was valid." << "\n"; + di << "The TopoDS_Solid was checked, and it was valid.\n"; if (!wallSolid.Closed()) - di << "The TopoDS_Solid is not closed!" << "\n"; + di << "The TopoDS_Solid is not closed!\n"; else - di << "The TopoDS_Solid is closed." << "\n"; + di << "The TopoDS_Solid is closed.\n"; if (!wallSolid.Checked()) - di << "The TopoDS_Solid is not checked!" << "\n"; + di << "The TopoDS_Solid is not checked!\n"; else - di << "The TopoDS_Solid has been checked." << "\n"; + di << "The TopoDS_Solid has been checked.\n"; if (wallSolid.Infinite()) - di << "The TopoDS_Solid is infinite!" << "\n"; + di << "The TopoDS_Solid is infinite!\n"; else - di << "The TopoDS_Solid is finite." << "\n"; + di << "The TopoDS_Solid is finite.\n"; } di << "The result is a "; // Check to see if we have a solid switch (wallSolid.ShapeType()) { case (TopAbs_COMPOUND): - di << "TopAbs_COMPOUND" << "\n"; + di << "TopAbs_COMPOUND\n"; break; case (TopAbs_COMPSOLID): - di << "TopAbs_COMPSOLID" << "\n"; + di << "TopAbs_COMPSOLID\n"; break; case (TopAbs_SOLID): - di << "TopAbs_SOLID" << "\n"; + di << "TopAbs_SOLID\n"; break; case (TopAbs_SHELL): - di << "TopAbs_SHELL" << "\n"; + di << "TopAbs_SHELL\n"; break; case (TopAbs_FACE): - di << "TopAbs_FACE" << "\n"; + di << "TopAbs_FACE\n"; break; case (TopAbs_WIRE): - di << "TopAbs_WIRE" << "\n"; + di << "TopAbs_WIRE\n"; break; case (TopAbs_EDGE): - di << "TopAbs_EDGE" << "\n"; + di << "TopAbs_EDGE\n"; break; case (TopAbs_VERTEX): - di << "TopAbs_VERTEX" << "\n"; + di << "TopAbs_VERTEX\n"; break; case (TopAbs_SHAPE): - di << "TopAbs_SHAPE" << "\n"; + di << "TopAbs_SHAPE\n"; } return 0; @@ -810,7 +810,7 @@ static Standard_Integer OCC817 (Draw_Interpretor& di, Standard_Integer argc, con ////////// return 1; //////////} if(argc < 3 || argc > 4) { - di << "Usage : " << argv[0] << " result mesh_delta [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " result mesh_delta [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -819,11 +819,11 @@ static Standard_Integer OCC817 (Draw_Interpretor& di, Standard_Integer argc, con if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def02) -// di << "Error: There is not BRepAlgo_Cut class" << "\n"; +// di << "Error: There is not BRepAlgo_Cut class\n"; // return 1; #endif #if ! defined(BRepAlgo_def03) -// di << "Error: There is not BRepAlgo_Common class" << "\n"; +// di << "Error: There is not BRepAlgo_Common class\n"; // return 1; #endif } @@ -833,7 +833,7 @@ static Standard_Integer OCC817 (Draw_Interpretor& di, Standard_Integer argc, con Standard_Real mesh_delt = Draw::Atof(argv[2]); if (mesh_delt <= 0.0) { - di<<"Error: mesh_delta must be positive value"<<"\n"; + di<<"Error: mesh_delta must be positive value\n"; return -1; } @@ -860,21 +860,21 @@ static Standard_Integer OCC817 (Draw_Interpretor& di, Standard_Integer argc, con TopoDS_Shape cut_shape; if (IsBRepAlgoAPI) { - di << "BRepAlgoAPI_Cut cut( fullSolid, internalSolid )" <<"\n"; + di << "BRepAlgoAPI_Cut cut( fullSolid, internalSolid )\n"; BRepAlgoAPI_Cut cut( fullSolid, internalSolid ); cut_shape = cut.Shape(); if ( !cut.IsDone() ) { - di << "Error: Could not cut volumes" << "\n"; + di << "Error: Could not cut volumes\n"; return -1; } } else { - di << "BRepAlgo_Cut cut( fullSolid, internalSolid )" <<"\n"; + di << "BRepAlgo_Cut cut( fullSolid, internalSolid )\n"; BRepAlgo_Cut cut( fullSolid, internalSolid ); cut_shape = cut.Shape(); if ( !cut.IsDone() ) { - di << "Error: Could not cut volumes" << "\n"; + di << "Error: Could not cut volumes\n"; return -1; } } @@ -890,7 +890,7 @@ static Standard_Integer OCC817 (Draw_Interpretor& di, Standard_Integer argc, con } if ( found_solid != 1 ) { - di << "Error: Cut operation produced " << found_solid << " solids" << "\n"; + di << "Error: Cut operation produced " << found_solid << " solids\n"; return -1; } DBRep::Set(argv[1],cutSolid); @@ -913,7 +913,7 @@ static Standard_Integer OCC817 (Draw_Interpretor& di, Standard_Integer argc, con Xmax += delt; Ymax += delt; Zmax += delt; - di<<"Info: Bounds\n ("< SubvolumeVol(l)) || (vol <= 0.0); //cout << (err? "ERROR" : "Info") << ": final subvolume " << l << " volume = " << vol << endl; if (err) - di << "ERROR" << ": final subvolume " << l << " volume = " << vol << "\n"; + di << "ERROR: final subvolume " << l << " volume = " << vol << "\n"; else - di << "Info" << ": final subvolume " << l << " volume = " << vol << "\n"; + di << "Info: final subvolume " << l << " volume = " << vol << "\n"; accumulatedVolume += vol; if (err) { diff --git a/src/QABugs/QABugs_14.cxx b/src/QABugs/QABugs_14.cxx index ca31b63e31..df00deffb2 100644 --- a/src/QABugs/QABugs_14.cxx +++ b/src/QABugs/QABugs_14.cxx @@ -88,7 +88,7 @@ static Standard_Integer BUC60897 (Draw_Interpretor& di, Standard_Integer /*argc* Geom2dGcc_Circ2d2TanRad aGccCirc2d(aQualifCurve1, aQualifCurve2, 10, 1e-7); if(!aGccCirc2d.IsDone()) { - di << "Faulty: can not create a circle." << "\n"; + di << "Faulty: can not create a circle.\n"; return 1; } for(Standard_Integer i = 1; i <= aGccCirc2d.NbSolutions(); i++) @@ -99,34 +99,34 @@ static Standard_Integer BUC60897 (Draw_Interpretor& di, Standard_Integer /*argc* gp_Pnt2d aPnt2d1, aPnt2d2; aGccCirc2d.Tangency1(i, aTmpR1, aTmpR2, aPnt2d1); aGccCirc2d.Tangency2(i, aTmpR1, aTmpR2, aPnt2d2); - di << "\n" << "tangency1 : X " << aPnt2d1.X() << " Y " << aPnt2d1.Y(); - di << "\n" << "tangency2 : X " << aPnt2d2.X() << " Y " << aPnt2d2.Y() << "\n"; + di << "\ntangency1 : X " << aPnt2d1.X() << " Y " << aPnt2d1.Y(); + di << "\ntangency2 : X " << aPnt2d2.X() << " Y " << aPnt2d2.Y() << "\n"; Sprintf(abuf,"circle_%d",i); Handle(Geom2d_Curve) circ_res = new Geom2d_Circle(aCirc2d); DrawTrSurf::Set (st, circ_res); } - di << "done" << "\n"; + di << "done\n"; return 0; } static Standard_Integer BUC60889 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc != 10) { - di << "Usage : " << argv[0] << " point_1 point_2 name_of_edge bndbox_X1 bndbox_Y1 bndbox_Z1 bndbox_X2 bndbox_Y2 bndbox_Z2" << "\n"; + di << "Usage : " << argv[0] << " point_1 point_2 name_of_edge bndbox_X1 bndbox_Y1 bndbox_Z1 bndbox_X2 bndbox_Y2 bndbox_Z2\n"; return 1; } else { gp_Pnt p1, p2; if (!(DrawTrSurf::GetPoint(argv[1], p1)) || !(DrawTrSurf::GetPoint(argv[2], p2))) { - di << "Need two points to define a band" << "\n"; + di << "Need two points to define a band\n"; return 1; } TopoDS_Edge ed = TopoDS::Edge(DBRep::Get(argv[3])); if (ed.IsNull()) { - di << "Need an edge to define the band direction" << "\n"; + di << "Need an edge to define the band direction\n"; return 1; } BRepAdaptor_Curve curve(ed); @@ -134,9 +134,9 @@ static Standard_Integer BUC60889 (Draw_Interpretor& di, Standard_Integer argc, c Bnd_Box bnd_box; bnd_box.Update(Draw::Atof(argv[4]), Draw::Atof(argv[5]), Draw::Atof(argv[6]), Draw::Atof(argv[7]), Draw::Atof(argv[8]), Draw::Atof(argv[9])); if(bnd_box.IsOut(p1, p2, d)) - di << "The band lies out of the box" << "\n"; + di << "The band lies out of the box\n"; else - di << "The band intersects the box" << "\n"; + di << "The band intersects the box\n"; return 0; } @@ -145,20 +145,20 @@ static Standard_Integer BUC60889 (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer BUC60852 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc != 8) - di << "Usage : " << argv[0] << " name_of_edge bndbox_X1 bndbox_Y1 bndbox_Z1 bndbox_X2 bndbox_Y2 bndbox_Z2" << "\n"; + di << "Usage : " << argv[0] << " name_of_edge bndbox_X1 bndbox_Y1 bndbox_Z1 bndbox_X2 bndbox_Y2 bndbox_Z2\n"; else { TopoDS_Edge shape = TopoDS::Edge(DBRep::Get(argv[1])); if(shape.ShapeType() != TopAbs_EDGE) - di << "shape must be an edge" << "\n"; + di << "shape must be an edge\n"; else { BRepAdaptor_Curve curve(shape); gp_Lin lin = curve.Line(); Bnd_Box bnd_box; bnd_box.Update(Draw::Atof(argv[2]), Draw::Atof(argv[3]), Draw::Atof(argv[4]), Draw::Atof(argv[5]), Draw::Atof(argv[6]), Draw::Atof(argv[7])); if(bnd_box.IsOut(lin)) - di << "Line that lies on edge does not intersect the box" << "\n"; + di << "Line that lies on edge does not intersect the box\n"; else - di << "Line that lies on edge intersects the box" << "\n"; + di << "Line that lies on edge intersects the box\n"; } } return 0; @@ -269,7 +269,7 @@ static Standard_Integer BUC60870 (Draw_Interpretor& di, Standard_Integer argc, c { Standard_Integer i1; if (argc != 5) { - di << "Usage : " << argv[0] << " result name_of_shape_1 name_of_shape_2 dev" << "\n"; + di << "Usage : " << argv[0] << " result name_of_shape_1 name_of_shape_2 dev\n"; return 1; } const char *ns1 = (argv[2]), *ns2 = (argv[3]), *ns0 = (argv[1]); @@ -311,7 +311,7 @@ static Standard_Integer BUC60870 (Draw_Interpretor& di, Standard_Integer argc, c } } } else { - di << "Faulty : found a problem"<< "\n"; + di << "Faulty : found a problem\n"; } return 0; } @@ -328,7 +328,7 @@ static Standard_Integer BUC60902 (Draw_Interpretor& di, Standard_Integer /*argc* GeomAPI_Interpolate anInterpolater(aPnts, Standard_False, Precision::Confusion()); anInterpolater.Perform(); if(!anInterpolater.IsDone()) { - di << "Faulty : error in interpolation" << "\n"; + di << "Faulty : error in interpolation\n"; return 1; } Handle(Geom_BSplineCurve) aCur = anInterpolater.Curve(); @@ -341,7 +341,7 @@ static Standard_Integer BUC60902 (Draw_Interpretor& di, Standard_Integer /*argc* anInterpolater1.Load(aFirstTang, aLastTang, Standard_False); anInterpolater1.Perform(); if(!anInterpolater1.IsDone()) { - di << "Faulty : error in interpolation 1" << "\n"; + di << "Faulty : error in interpolation 1\n"; return 1; } aCur = anInterpolater1.Curve(); @@ -351,16 +351,16 @@ static Standard_Integer BUC60902 (Draw_Interpretor& di, Standard_Integer /*argc* di << " Tang1 after compute = " << aFirstTang1.X() << " " << aFirstTang1.Y() << " " << aFirstTang1.Z() << "\n"; di << " Tang2 after compute = " << aLastTang1.X() << " " << aLastTang1.Y() << " " << aLastTang1.Z() << "\n"; if(aFirstTang.IsEqual(aFirstTang1, Precision::Confusion(), Precision::Angular())) { - di << "First tangent is OK" << "\n"; + di << "First tangent is OK\n"; } else { - di << "Faulty : first tangent is wrong" << "\n"; + di << "Faulty : first tangent is wrong\n"; } if(aLastTang.IsEqual(aLastTang1, Precision::Confusion(), Precision::Angular())) { - di << "Last tangent is OK" << "\n"; + di << "Last tangent is OK\n"; } else { - di << "Faulty : last tangent is wrong" << "\n"; + di << "Faulty : last tangent is wrong\n"; } return 0; } @@ -368,7 +368,7 @@ static Standard_Integer BUC60902 (Draw_Interpretor& di, Standard_Integer /*argc* static Standard_Integer BUC60944 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc != 2) { - di << "Usage : " << argv[0] << " path" << "\n"; + di << "Usage : " << argv[0] << " path\n"; } TCollection_AsciiString in(argv[1]); @@ -376,7 +376,7 @@ static Standard_Integer BUC60944 (Draw_Interpretor& di, Standard_Integer argc, c TCollection_AsciiString out; aPath->SystemName(out); if(in == out) - di << "The convertion is right." << "\n"; + di << "The convertion is right.\n"; else di << "Faulty : The convertion is incorrect : " << out.ToCString() << "\n"; di << out.ToCString() << "\n"; @@ -524,14 +524,14 @@ Standard_Boolean BuildBoundWires(const TopoDS_Shape &theShell, static Standard_Integer BUC60868 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if (argc != 3) { - di << "Usage : " < 2) { - di << "Usage: " << argv[0] << " [nb]" << "\n"; + di << "Usage: " << argv[0] << " [nb]\n"; return 1; } diff --git a/src/QABugs/QABugs_15.cxx b/src/QABugs/QABugs_15.cxx index 47364659d6..02121ebc6f 100644 --- a/src/QABugs/QABugs_15.cxx +++ b/src/QABugs/QABugs_15.cxx @@ -38,7 +38,7 @@ static Standard_Integer BUC60720 (Draw_Interpretor& di,Standard_Integer argc,con } if(argc != 2) { - di << "Usage : " << argv[0] << " 0/1" << "\n"; + di << "Usage : " << argv[0] << " 0/1\n"; } if(Draw::Atoi(argv[1]) == 0) { @@ -56,7 +56,7 @@ static Standard_Integer BUC60720 (Draw_Interpretor& di,Standard_Integer argc,con myAISContext->Display(theObject2); } } else { - di << "Usage : " << argv[0] << " 0/1" << "\n"; + di << "Usage : " << argv[0] << " 0/1\n"; return -1; } return 0; diff --git a/src/QABugs/QABugs_16.cxx b/src/QABugs/QABugs_16.cxx index 8f31685a18..a4957a81d9 100644 --- a/src/QABugs/QABugs_16.cxx +++ b/src/QABugs/QABugs_16.cxx @@ -89,12 +89,12 @@ Standard_EXPORT ViewerTest_DoubleMapOfInteractiveAndName& GetMapOfAIS(); static Standard_Integer BUC60848 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if ( argc != 2 ) { - di << "Usage : " << argv[0] << " shape " << "\n"; + di << "Usage : " << argv[0] << " shape \n"; return 1; } TopoDS_Shape S = DBRep::Get( argv[1] ); if ( S.IsNull() ) { - di << "Shape is empty" << "\n"; + di << "Shape is empty\n"; return 1; } GProp_GProps G; @@ -121,8 +121,8 @@ static Standard_Integer BUC60828 (Draw_Interpretor& di, Standard_Integer /*argc* Standard_Boolean aValue1; aValue1=anEdge.Infinite(); di << "Current flag : " << (Standard_Integer) aValue1 << "\n"; - if(aValue1) di << "Flag was set properly." << "\n"; - else di << "Faulty : flag was not set properly." << "\n"; + if(aValue1) di << "Flag was set properly.\n"; + else di << "Faulty : flag was not set properly.\n"; return 0; } @@ -232,7 +232,7 @@ static Standard_Integer BUC60972 (Draw_Interpretor& di, Standard_Integer argc, c } if(argc != 6) { - di << "Usage : " << argv[0] << " edge edge plane val text" << "\n"; + di << "Usage : " << argv[0] << " edge edge plane val text\n"; return 1; } @@ -264,13 +264,13 @@ static Standard_Integer OCC218bug (Draw_Interpretor& di, Standard_Integer argc, } if(argc != 5) { - di << "Usage : " << argv[0] << " name plane Xlabel Ylabel" << "\n"; + di << "Usage : " << argv[0] << " name plane Xlabel Ylabel\n"; return 1; } TopoDS_Shape S = DBRep::Get( argv[2] ); if ( S.IsNull() ) { - di << "Shape is empty" << "\n"; + di << "Shape is empty\n"; return 1; } @@ -345,7 +345,7 @@ static Standard_Integer OCC218bug (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer OCC295(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc != 4) { - di << "Usage : " << argv[0] << " edge_result edge1 edge2" << "\n"; + di << "Usage : " << argv[0] << " edge_result edge1 edge2\n"; return 1; } @@ -380,7 +380,7 @@ static Standard_Integer OCC49 (Draw_Interpretor& di, Standard_Integer argc, cons { if ( argc != 2 ) { - di << "Usage : " << argv[0] << " name" << "\n"; + di << "Usage : " << argv[0] << " name\n"; return 1; } @@ -392,9 +392,9 @@ static Standard_Integer OCC49 (Draw_Interpretor& di, Standard_Integer argc, cons GProp_PrincipalProps Pr = G.PrincipalProperties(); Standard_Boolean Result = Pr.HasSymmetryAxis(); if (Result) { - di << "1" << "\n"; + di << "1\n"; } else { - di << "0" << "\n"; + di << "0\n"; } return 0; } @@ -420,7 +420,7 @@ static Standard_Integer OCC132 (Draw_Interpretor& di, Standard_Integer argc, con */ if ( argc != 2 ) { - di << "Usage : " << argv[0] << " DependentName" << "\n"; + di << "Usage : " << argv[0] << " DependentName\n"; return 1; } @@ -433,7 +433,7 @@ static Standard_Integer OCC132 (Draw_Interpretor& di, Standard_Integer argc, con OSD_Path Path (argv[1], SysType1); } catch (Standard_ProgramError) { - di << "1" << "\n"; + di << "1\n"; return 0; } } @@ -444,19 +444,19 @@ static Standard_Integer OCC132 (Draw_Interpretor& di, Standard_Integer argc, con OSD_Path Path (argv[1], SysType2); } catch (Standard_ProgramError) { - di << "2" << "\n"; + di << "2\n"; return 0; } } - di << "0" << "\n"; + di << "0\n"; return 0; } static Standard_Integer OCC405 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc != 4) { - di << "Usage : " << argv[0] << " edge_result edge1 edge2; merge two edges" << "\n"; + di << "Usage : " << argv[0] << " edge_result edge1 edge2; merge two edges\n"; return 1; } @@ -514,7 +514,7 @@ static Standard_Integer OCC405 (Draw_Interpretor& di, Standard_Integer argc, con static Standard_Integer OCC252 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(!(argc == 4 || argc == 5)) { - di << "Usage : " << argv[0] << " result part tool [ModeOfLimitation=0/1/2]" << "\n"; + di << "Usage : " << argv[0] << " result part tool [ModeOfLimitation=0/1/2]\n"; return 1; } @@ -527,7 +527,7 @@ static Standard_Integer OCC252 (Draw_Interpretor& di, Standard_Integer argc, con if(argc==5) { Standard_Integer ModeOfLimitationInteger = Draw::Atoi(argv[4]); if(!(ModeOfLimitationInteger == 0 || ModeOfLimitationInteger == 1 || ModeOfLimitationInteger == 2)) { - di << "Usage : " << argv[0] << " result part tool [ModeOfLimitation=0/1/2]" << "\n"; + di << "Usage : " << argv[0] << " result part tool [ModeOfLimitation=0/1/2]\n"; return 1; } //if (ModeOfLimitationInteger == 1) ModeOfLimitation = QAModTopOpe_Reversed; @@ -539,7 +539,7 @@ static Standard_Integer OCC252 (Draw_Interpretor& di, Standard_Integer argc, con //TopoDS_Shape res = QAModTopOpe_Limitation(s1,s2,ModeOfLimitation); TopoDS_Shape res = QANewModTopOpe_Limitation(s1,s2,ModeOfLimitation); if (res.IsNull()) { - di << "Error : result is null" << "\n"; + di << "Error : result is null\n"; return 1; } @@ -551,7 +551,7 @@ static Standard_Integer OCC252 (Draw_Interpretor& di, Standard_Integer argc, con static Standard_Integer OCC307 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(!(argc == 4 || argc == 5)) { - di << "Usage : " << argv[0] << " result part tool [AllowCutting=0/1]" << "\n"; + di << "Usage : " << argv[0] << " result part tool [AllowCutting=0/1]\n"; return 1; } @@ -563,7 +563,7 @@ static Standard_Integer OCC307 (Draw_Interpretor& di, Standard_Integer argc, con if(argc==5) { Standard_Integer AllowCuttingInteger = Draw::Atoi(argv[4]); if(!( AllowCuttingInteger == 0 || AllowCuttingInteger == 1)) { - di << "Usage : " << argv[0] << " result part tool [AllowCutting=0/1]" << "\n"; + di << "Usage : " << argv[0] << " result part tool [AllowCutting=0/1]\n"; return 1; } if (AllowCuttingInteger == 1) AllowCutting = Standard_True; @@ -572,7 +572,7 @@ static Standard_Integer OCC307 (Draw_Interpretor& di, Standard_Integer argc, con //TopoDS_Shape res = QAModTopOpe_Glue(s1,s2,AllowCutting); TopoDS_Shape res = QANewModTopOpe_Glue(s1,s2,AllowCutting); if (res.IsNull()) { - di << "Error : result is null" << "\n"; + di << "Error : result is null\n"; return 1; } @@ -584,7 +584,7 @@ static Standard_Integer OCC307 (Draw_Interpretor& di, Standard_Integer argc, con static Standard_Integer OCC395 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc != 4) { - di << "Usage : " << argv[0] << " edge_result edge1 edge2" << "\n"; + di << "Usage : " << argv[0] << " edge_result edge1 edge2\n"; return 1; } //TCollection_AsciiString fnom(a[1]); @@ -631,7 +631,7 @@ static Standard_Integer OCC395 (Draw_Interpretor& di, Standard_Integer argc, con static Standard_Integer OCC394 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc < 3) { - di << "Usage : " << argv[0] << " edge_result edge [tol [mode [tolang]]]" << "\n"; + di << "Usage : " << argv[0] << " edge_result edge [tol [mode [tolang]]]\n"; return 1; } TopoDS_Shape Sh = DBRep::Get(argv[2]); @@ -677,7 +677,7 @@ static Standard_Integer OCC301 (Draw_Interpretor& di, Standard_Integer argc, con return 1; } if ( argc != 3 ) { - di << "Usage : " << argv[0] << " ArcRadius ArrowSize" << "\n"; + di << "Usage : " << argv[0] << " ArcRadius ArrowSize\n"; return 1; } @@ -715,7 +715,7 @@ static Standard_Integer OCC301 (Draw_Interpretor& di, Standard_Integer argc, con static Standard_Integer OCC294 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc < 4) { - di << "Usage : " << argv[0] << " shape_result shape edge" << "\n"; + di << "Usage : " << argv[0] << " shape_result shape edge\n"; return 1; } TopoDS_Shape Sh1 = DBRep::Get(argv[2]); @@ -728,7 +728,7 @@ static Standard_Integer OCC294 (Draw_Interpretor& di, Standard_Integer argc, con ReShaper.Remove(Sh2); const TopoDS_Shape& ResultShape = ReShaper.GetResult(); if(ResultShape.IsNull()) { - di << "Faulty " << argv[0] << " : " << argv[1] << " - shape_result is null" << "\n"; + di << "Faulty " << argv[0] << " : " << argv[1] << " - shape_result is null\n"; return 1; } @@ -744,7 +744,7 @@ static Standard_Integer OCC60 (Draw_Interpretor& di, Standard_Integer argc, cons return 1; } if(argc < 5) { - di << "Usage : " << argv[0] << " xmin ymin xmax ymax; selection window" << "\n"; + di << "Usage : " << argv[0] << " xmin ymin xmax ymax; selection window\n"; return 1; } @@ -769,11 +769,11 @@ static Standard_Integer OCC70 (Draw_Interpretor& di, Standard_Integer argc, cons return 1; } if(argc < 7) { - di << "Usage : " << argv[0] << " x1 y1 x2 y2 x3 y3 [x y ...]; polygon of selection" << "\n"; + di << "Usage : " << argv[0] << " x1 y1 x2 y2 x3 y3 [x y ...]; polygon of selection\n"; return 1; } if (((argc - 1) % 2) != 0) { - di << "Usage : " << argv[0] << " x1 y1 x2 y2 x3 y3 [x y ...]; polygon of selection" << "\n"; + di << "Usage : " << argv[0] << " x1 y1 x2 y2 x3 y3 [x y ...]; polygon of selection\n"; return 1; } @@ -796,7 +796,7 @@ static Standard_Integer OCC70 (Draw_Interpretor& di, Standard_Integer argc, cons static Standard_Integer OCC261 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc != 2) { - di << "Usage : " << argv[0] << " Doc" << "\n"; + di << "Usage : " << argv[0] << " Doc\n"; return 1; } @@ -812,16 +812,16 @@ static Standard_Integer OCC261 (Draw_Interpretor& di, Standard_Integer argc, con static Standard_Integer OCC710 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc != 2) { - di << "Usage : " << argv[0] << " path" << "\n"; + di << "Usage : " << argv[0] << " path\n"; } TCollection_AsciiString in(argv[1]); OSD_File* aFile = new OSD_File(in); Standard_Boolean anExists = aFile->Exists(); if(anExists == Standard_True) - di << "1" << "\n"; + di << "1\n"; else - di << "0" << "\n"; + di << "0\n"; return 0; } @@ -830,11 +830,11 @@ static Standard_Integer OCC710 (Draw_Interpretor& di, Standard_Integer argc, con static Standard_Integer OCC904 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc != 4) { - di << "Usage : " << argv[0] << " result shape nonmanifoldmode(0/1)" << "\n"; + di << "Usage : " << argv[0] << " result shape nonmanifoldmode(0/1)\n"; } TopoDS_Shape S = DBRep::Get(argv[2]); if (S.IsNull() || S.ShapeType() != TopAbs_SHELL) { - di << " Shape is null" << "\n"; + di << " Shape is null\n"; return 1; } Standard_Boolean nonmanifmode = (Draw::Atoi(argv[3]) != 0); diff --git a/src/QABugs/QABugs_17.cxx b/src/QABugs/QABugs_17.cxx index 77ca53c7ba..ea039d4ff3 100644 --- a/src/QABugs/QABugs_17.cxx +++ b/src/QABugs/QABugs_17.cxx @@ -128,7 +128,7 @@ static Standard_Integer BUC60842 (Draw_Interpretor& di, Standard_Integer /*argc* static Standard_Integer BUC60843 (Draw_Interpretor& di, Standard_Integer argc,const char ** argv) { if (argc != 4 && argc != 5 && argc != 6 && argc != 7) { - di << "Usage : " << argv[0] << "result_shape name_of_circle name_of_curve [ par1 [ tol ] ]" << "\n"; + di << "Usage : " << argv[0] << "result_shape name_of_circle name_of_curve [ par1 [ tol ] ]\n"; return 1; } @@ -143,7 +143,7 @@ static Standard_Integer BUC60843 (Draw_Interpretor& di, Standard_Integer argc,co Handle(Geom2d_Curve) aCur2d1 = DrawTrSurf::GetCurve2d(argv[2]); Handle(Geom2d_Curve) aCur2d2 = DrawTrSurf::GetCurve2d(argv[3]); if (aCur2d1.IsNull() || aCur2d2.IsNull()) { - di << "Faulty : not curves" << "\n"; + di << "Faulty : not curves\n"; return 1; } Standard_Boolean c1IsCircle = Standard_False; @@ -162,7 +162,7 @@ static Standard_Integer BUC60843 (Draw_Interpretor& di, Standard_Integer argc,co Handle(Geom2d_Line) glin = new Geom2d_Line(lin); DrawTrSurf::Set(argv[1], glin); } else { - di << "Faulty : tangent line is not done." << "\n"; + di << "Faulty : tangent line is not done.\n"; } } else { @@ -176,7 +176,7 @@ static Standard_Integer BUC60843 (Draw_Interpretor& di, Standard_Integer argc,co Handle(Geom2d_Line) glin = new Geom2d_Line(lin); DrawTrSurf::Set(argv[1], glin); } else { - di << "Faulty : tangent line is not done." << "\n"; + di << "Faulty : tangent line is not done.\n"; } } return 0; @@ -186,7 +186,7 @@ static Standard_Integer BUC60970 (Draw_Interpretor& di, Standard_Integer argc, c { if(argc!=3) { - di << "Usage : " << argv[0] << " shape result" <<"\n"; + di << "Usage : " << argv[0] << " shape result\n"; return 1; } @@ -290,7 +290,7 @@ static Standard_Integer BUC60818(Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if (argc > 1) { - di<<"Function don't has parameters"<<"\n"; + di<<"Function don't has parameters\n"; return 1; } @@ -535,7 +535,7 @@ static Standard_Integer OCC280 (Draw_Interpretor& di, Standard_Integer argc, con return -1; } if ( argc != 3) { - di << "ERROR : Usage : " << argv[0] << " hlr=0/1 setsurfecedetail=0/1; set perspecrive view" << "\n"; + di << "ERROR : Usage : " << argv[0] << " hlr=0/1 setsurfecedetail=0/1; set perspecrive view\n"; return 1; } @@ -753,7 +753,7 @@ static Standard_Integer OCC189 (Draw_Interpretor& di, Standard_Integer /*argc*/ static Standard_Integer OCC566(Draw_Interpretor& di,Standard_Integer n,const char ** a) { if (n < 2) { - di<<"Usage: " << a[0] << " shape [ xmin ymin zmin xmax ymax zmax]"<<"\n"; + di<<"Usage: " << a[0] << " shape [ xmin ymin zmin xmax ymax zmax]\n"; return 1; } TopoDS_Shape S = DBRep::Get(a[1]); @@ -782,7 +782,7 @@ static Standard_Integer OCC566(Draw_Interpretor& di,Standard_Integer n,const cha static Standard_Integer OCC570 (Draw_Interpretor& di, Standard_Integer argc,const char ** argv) { if (argc < 2) { - di<<"Usage: " << argv[0] << " result"<<"\n"; + di<<"Usage: " << argv[0] << " result\n"; return 1; } @@ -829,7 +829,7 @@ static Standard_Integer OCC570 (Draw_Interpretor& di, Standard_Integer argc,cons } catch(Standard_Failure) { - di << argv[0] << ": Exception in fillet"<<"\n"; + di << argv[0] << ": Exception in fillet\n"; return 2; } } @@ -889,7 +889,7 @@ static Standard_Integer UPDATEVOL(Draw_Interpretor& di, const char ** a) { if(Rake == 0){ - di << "MakeFillet non initialise"<<"\n"; + di << "MakeFillet non initialise\n"; return 1 ; } if(narg%2 != 0 || narg < 4) return 1; @@ -906,7 +906,7 @@ static Standard_Integer UPDATEVOL(Draw_Interpretor& di, const Standard_Boolean aLawMode = !strcmp(a[0],"OCC570evollaw"); if (aLawMode) { - di<<"INFO: Using law to define variable fillet"<<"\n"; + di<<"INFO: Using law to define variable fillet\n"; Handle(Law_Interpol) law = new Law_Interpol; law->Set(uandr); Rake->Add(law,E); @@ -922,7 +922,7 @@ static Standard_Integer BUILDEVOL(Draw_Interpretor& di, const char **) { if(Rake == 0){ - di << "MakeFillet non initialise"<<"\n"; + di << "MakeFillet non initialise\n"; return 1 ; } Rake->Build(); @@ -948,13 +948,13 @@ static Standard_Integer OCC606 ( Draw_Interpretor& di, Standard_Integer n, const { if (n != 3 && n != 4) { - di << "Usage : " << a[0] << " result shape [-t]" << "\n"; + di << "Usage : " << a[0] << " result shape [-t]\n"; return 0; } Standard_Boolean TrimMode = (n == 4); - if (TrimMode) di<<"INFO: Using trimmed curves..."<<"\n"; - else di<<"INFO: Using non trimmed curves..."<<"\n"; + if (TrimMode) di<<"INFO: Using trimmed curves...\n"; + else di<<"INFO: Using non trimmed curves...\n"; TopoDS_Shape S = DBRep::Get(a[2]); @@ -994,7 +994,7 @@ static Standard_Integer OCC606 ( Draw_Interpretor& di, Standard_Integer n, const } catch(Standard_Failure) { - di<<"ERROR: Exception in GeomFill_NSections"<<"\n"; + di<<"ERROR: Exception in GeomFill_NSections\n"; } } @@ -1010,7 +1010,7 @@ static Standard_Integer OCC813 (Draw_Interpretor& di, Standard_Integer argc,cons { if (argc < 3) { - di << "Usage : " << argv[0] << " U V" << "\n"; + di << "Usage : " << argv[0] << " U V\n"; return 1; } @@ -1149,7 +1149,7 @@ static Standard_Integer OCC884 (Draw_Interpretor& di, Standard_Integer argc, con { if (argc < 3 || argc > 5) { - di << "Usage : " << argv[0] << " result shape [toler [maxtoler]]" << "\n"; + di << "Usage : " << argv[0] << " result shape [toler [maxtoler]]\n"; return 1; } @@ -1158,7 +1158,7 @@ static Standard_Integer OCC884 (Draw_Interpretor& di, Standard_Integer argc, con TopExp_Explorer exp(shape, TopAbs_EDGE); if (!exp.More()) { - di<<"Error: no edge found"<<"\n"; + di<<"Error: no edge found\n"; return 1; } @@ -1279,7 +1279,7 @@ static Standard_Integer OCC1188 (Draw_Interpretor& di, Standard_Integer argc, co { if (argc < 2 || argc > 3) { - di << "Usage : " << argv[0] << " imagefile [filltype] : Load image as background" << "\n"; + di << "Usage : " << argv[0] << " imagefile [filltype] : Load image as background\n"; return 1; } @@ -1301,7 +1301,7 @@ static Standard_Integer OCC1188 (Draw_Interpretor& di, Standard_Integer argc, co else { di << "Wrong fill type : " << szType << "\n"; - di << "Must be one of CENTERED, TILED, STRETCH, NONE" << "\n"; + di << "Must be one of CENTERED, TILED, STRETCH, NONE\n"; return 1; } } @@ -1323,7 +1323,7 @@ static Standard_Integer OCC1174_1 (Draw_Interpretor& di, Standard_Integer argc, { if (argc != 2) { - di << "Usage : " << argv[0] << " shape" << "\n"; + di << "Usage : " << argv[0] << " shape\n"; return 1; } @@ -1381,7 +1381,7 @@ static Standard_Integer OCC1174_2 (Draw_Interpretor& di, Standard_Integer argc, { if (argc != 2) { - di << "Usage : " << argv[0] << " shape" << "\n"; + di << "Usage : " << argv[0] << " shape\n"; return 1; } @@ -1433,7 +1433,7 @@ static Standard_Integer OCCN1 (Draw_Interpretor& di, Standard_Integer argc, cons { if (argc != 4) { - di << "Usage : " << argv[0] << " angle fuse(1 for boss / 0 for slot) length" << "\n"; + di << "Usage : " << argv[0] << " angle fuse(1 for boss / 0 for slot) length\n"; return 1; } @@ -1494,7 +1494,7 @@ static Standard_Integer OCCN1 (Draw_Interpretor& di, Standard_Integer argc, cons static Standard_Integer OCCN2 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if (argc > 2) { - di << "Usage : " << argv[0] << " [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -1525,19 +1525,19 @@ static Standard_Integer OCCN2 (Draw_Interpretor& di, Standard_Integer argc, cons TopoDS_Shape shape; if (IsBRepAlgoAPI) { - di << "BRepAlgoAPI_Section section(cylinder_sh, sphere_sh)" <<"\n"; + di << "BRepAlgoAPI_Section section(cylinder_sh, sphere_sh)\n"; BRepAlgoAPI_Section section(cylinder_sh, sphere_sh); section.Build(); if(!section.IsDone()){ - di << "Error performing intersection: not done." << "\n"; + di << "Error performing intersection: not done.\n"; } shape = section.Shape(); } else { - di << "BRepAlgo_Section section(cylinder_sh, sphere_sh)" <<"\n"; + di << "BRepAlgo_Section section(cylinder_sh, sphere_sh)\n"; BRepAlgo_Section section(cylinder_sh, sphere_sh); section.Build(); if(!section.IsDone()){ - di << "Error performing intersection: not done." << "\n"; + di << "Error performing intersection: not done.\n"; } shape = section.Shape(); } @@ -1561,7 +1561,7 @@ static Standard_Integer OCC2569 (Draw_Interpretor& di, Standard_Integer argc, co return 1; } if(argc != 3) { - di << "Usage : " << argv[0] << " nbpoles result" << "\n"; + di << "Usage : " << argv[0] << " nbpoles result\n"; return 1; } @@ -1590,7 +1590,7 @@ static Standard_Integer OCC2569 (Draw_Interpretor& di, Standard_Integer argc, co static Standard_Integer OCC1642 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if (argc != 10) { - di<<"Usage: " << argv[0] << " FinalWare FinalFace InitWare InitFace shape FixReorder FixDegenerated FixConnected FixSelfIntersection"<<"\n"; + di<<"Usage: " << argv[0] << " FinalWare FinalFace InitWare InitFace shape FixReorder FixDegenerated FixConnected FixSelfIntersection\n"; return 1; } diff --git a/src/QABugs/QABugs_18.cxx b/src/QABugs/QABugs_18.cxx index 9704383ef6..6d97a002ab 100644 --- a/src/QABugs/QABugs_18.cxx +++ b/src/QABugs/QABugs_18.cxx @@ -48,7 +48,7 @@ static Standard_Integer OCC267 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if ( argc != 3) { - di << "ERROR OCC267: Usage : " << argv[0] << " DOC path" << "\n"; + di << "ERROR OCC267: Usage : " << argv[0] << " DOC path\n"; return 1; } @@ -60,9 +60,9 @@ static Standard_Integer OCC267 (Draw_Interpretor& di, Standard_Integer argc, con PCDM_StoreStatus theStatus = A->SaveAs(D,path); if (theStatus == PCDM_SS_OK ) { - di << "OCC267 : PCDM_StoreStatus = PCDM_SS_OK" << "\n"; + di << "OCC267 : PCDM_StoreStatus = PCDM_SS_OK\n"; } else { - di << "OCC267 : PCDM_StoreStatus = Bad_Store_Status" << "\n"; + di << "OCC267 : PCDM_StoreStatus = Bad_Store_Status\n"; } return 0; @@ -71,7 +71,7 @@ static Standard_Integer OCC267 (Draw_Interpretor& di, Standard_Integer argc, con static Standard_Integer OCC181 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if ( argc != 5) { - di << "ERROR OCC181: Usage : " << argv[0] << " FileName path1 path2 verbose=0/1" << "\n"; + di << "ERROR OCC181: Usage : " << argv[0] << " FileName path1 path2 verbose=0/1\n"; return 1; } Standard_CString aFileName = argv[1]; @@ -97,9 +97,9 @@ static Standard_Integer OCC181 (Draw_Interpretor& di, Standard_Integer argc, con Standard_Boolean aStatus = aManager.Save(); if (aStatus) { - di << "\nOCC181 : Status = TRUE" << "\n"; + di << "\nOCC181 : Status = TRUE\n"; } else { - di << "\nOCC181 : Status = FALSE" << "\n"; + di << "\nOCC181 : Status = FALSE\n"; } return 0; @@ -121,7 +121,7 @@ static Standard_Real delta_percent (Standard_Real a, Standard_Real b) static Standard_Integer OCC367 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if ( argc != 7) { - di << "ERROR : Usage : " << argv[0] << " shape step goodX goodY goodZ percent_tolerance" << "\n"; + di << "ERROR : Usage : " << argv[0] << " shape step goodX goodY goodZ percent_tolerance\n"; return 1; } @@ -208,9 +208,9 @@ static Standard_Integer OCC367 (Draw_Interpretor& di, Standard_Integer argc, con di << "\n\nFirstEdge = " << FirstEdgeX <<" " << FirstEdgeY <<" " << FirstEdgeZ << "\n"; di << "deltaX = " << deltaX << " deltaY = " << deltaY << " deltaZ = " << deltaZ << "\n"; if (Status) { - di << argv[0] << " : OK" << "\n"; + di << argv[0] << " : OK\n"; } else { - di << argv[0] << " : ERROR" << "\n"; + di << argv[0] << " : ERROR\n"; } return 0; @@ -220,7 +220,7 @@ static Standard_Integer OCC71bug (Draw_Interpretor& di, Standard_Integer /*argc* { Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if(aContext.IsNull()) { - di << argv[0] << "ERROR : use 'vinit' command before " << "\n"; + di << argv[0] << "ERROR : use 'vinit' command before \n"; return 1; } diff --git a/src/QABugs/QABugs_19.cxx b/src/QABugs/QABugs_19.cxx index 09101acaa3..2d8b94fd89 100644 --- a/src/QABugs/QABugs_19.cxx +++ b/src/QABugs/QABugs_19.cxx @@ -63,17 +63,17 @@ static Standard_Integer OCC230 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if ( argc != 4) { - di << "ERROR OCC230: Usage : " << argv[0] << " TrimmedCurve Pnt2d Pnt2d" << "\n"; + di << "ERROR OCC230: Usage : " << argv[0] << " TrimmedCurve Pnt2d Pnt2d\n"; return 1; } gp_Pnt2d P1, P2; if ( !DrawTrSurf::GetPoint2d(argv[2],P1)) { - di << "ERROR OCC230: " << argv[2] << " is not Pnt2d" << "\n"; + di << "ERROR OCC230: " << argv[2] << " is not Pnt2d\n"; return 1; } if ( !DrawTrSurf::GetPoint2d(argv[3],P2)) { - di << "ERROR OCC230: " << argv[3] << " is not Pnt2d" << "\n"; + di << "ERROR OCC230: " << argv[3] << " is not Pnt2d\n"; return 1; } @@ -100,9 +100,9 @@ static Standard_Integer OCC23361 (Draw_Interpretor& di, Standard_Integer /*argc* // points must be equal if ( ! p2.IsEqual(p3, Precision::Confusion()) ) - di << "ERROR OCC23361: equivalent transformations does not produce equal points" << "\n"; + di << "ERROR OCC23361: equivalent transformations does not produce equal points\n"; else - di << "OCC23361: OK" << "\n"; + di << "OCC23361: OK\n"; return 0; } @@ -300,7 +300,7 @@ static Standard_Boolean OCC23774Test(const TopoDS_Face& grossPlateFace, const To BRepBuilderAPI_Transform transformer1(mirror1); transformer1.Perform(originalWire); if(!transformer1.IsDone()) { - di << "Not Done1 " << "\n"; + di << "Not Done1 \n"; return Standard_False; } TopoDS_Shape step1ModifiedShape = transformer1.ModifiedShape(originalWire); @@ -517,7 +517,7 @@ static Standard_Integer OCC23952intersect (Draw_Interpretor& di, Standard_Intege static Standard_Integer OCC23683 (Draw_Interpretor& di, Standard_Integer argc,const char ** argv) { if (argc < 2) { - di<<"Usage: " << argv[0] << " invalid number of arguments"<<"\n"; + di<<"Usage: " << argv[0] << " invalid number of arguments\n"; return 1; } @@ -548,7 +548,7 @@ static int test_offset(Draw_Interpretor& di, Standard_Integer argc, const char** // Check the command arguments if ( argc != 1 ) { - di << "Error: " << argv[0] << " - invalid number of arguments" << "\n"; + di << "Error: " << argv[0] << " - invalid number of arguments\n"; di << "Usage: type help " << argv[0] << "\n"; return 1; // TCL_ERROR } @@ -557,8 +557,8 @@ static int test_offset(Draw_Interpretor& di, Standard_Integer argc, const char** gp_Ax22d Ax2( gp::Origin2d(), gp::DY2d(), gp::DX2d() ); Handle(Geom_Surface) Plane = new Geom_Plane( gp::YOZ() ); - di << "<<<< Preparing sample surface of revolution based on trimmed curve >>>>" << "\n"; - di << "-----------------------------------------------------------------------" << "\n"; + di << "<<<< Preparing sample surface of revolution based on trimmed curve >>>>\n"; + di << "-----------------------------------------------------------------------\n"; Handle(Geom2d_Circle) C2d1 = new Geom2d_Circle(Ax2, 1.0); Handle(Geom2d_TrimmedCurve) C2d1Trimmed = new Geom2d_TrimmedCurve(C2d1, 0.0, M_PI/2.0); @@ -571,10 +571,10 @@ static int test_offset(Draw_Interpretor& di, Standard_Integer argc, const char** DBRep::Set("f1", F1); - di << "Result: f1" << "\n"; + di << "Result: f1\n"; - di << "<<<< Preparing sample surface of revolution based on offset curve >>>>" << "\n"; - di << "-----------------------------------------------------------------------" << "\n"; + di << "<<<< Preparing sample surface of revolution based on offset curve >>>>\n"; + di << "-----------------------------------------------------------------------\n"; Handle(Geom2d_OffsetCurve) C2d2Offset = new Geom2d_OffsetCurve(C2d1Trimmed, -0.5); TopoDS_Edge E2 = BRepBuilderAPI_MakeEdge(C2d2Offset, Plane); @@ -586,7 +586,7 @@ static int test_offset(Draw_Interpretor& di, Standard_Integer argc, const char** DBRep::Set("f2", F2); - di << "Result: f2" << "\n"; + di << "Result: f2\n"; return 0; } @@ -602,17 +602,17 @@ static int test_offset(Draw_Interpretor& di, Standard_Integer argc, const char** static Standard_Integer OCC24008 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if (argc != 3) { - di << "Usage: " << argv[0] << " invalid number of arguments" << "\n"; + di << "Usage: " << argv[0] << " invalid number of arguments\n"; return 1; } Handle(Geom_Curve) aCurve = DrawTrSurf::GetCurve(argv[1]); Handle(Geom_Surface) aSurf = DrawTrSurf::GetSurface(argv[2]); if (aCurve.IsNull()) { - di << "Curve was not read" << "\n"; + di << "Curve was not read\n"; return 1; } if (aSurf.IsNull()) { - di << "Surface was not read" << "\n"; + di << "Surface was not read\n"; return 1; } ShapeConstruct_ProjectCurveOnSurface aProj; @@ -621,11 +621,11 @@ static Standard_Integer OCC24008 (Draw_Interpretor& di, Standard_Integer argc, c Handle(Geom2d_Curve) aPCurve; aProj.Perform (aCurve, aCurve->FirstParameter(), aCurve->LastParameter(), aPCurve); if (aPCurve.IsNull()) { - di << "PCurve was not created" << "\n"; + di << "PCurve was not created\n"; return 1; } } catch (...) { - di << "Exception was caught" << "\n"; + di << "Exception was caught\n"; } return 0; } @@ -1198,7 +1198,7 @@ static Standard_Integer OCC24005 (Draw_Interpretor& theDI, Standard_Integer theN if (!anInters.IsDone()) { - theDI<<"No intersections found!"<<"\n"; + theDI<<"No intersections found!\n"; return 1; } @@ -1315,9 +1315,9 @@ static Standard_Integer OCC24086 (Draw_Interpretor& di, Standard_Integer argc, c ana.NbFaces(); if (!(BRepAlgo::IsValid(result))) { - di << "Result was checked and it is INVALID" << "\n"; + di << "Result was checked and it is INVALID\n"; } else { - di << "Result was checked and it is VALID" << "\n"; + di << "Result was checked and it is VALID\n"; } Handle(AIS_InteractiveObject) myShape = new AIS_Shape (result); @@ -1334,7 +1334,7 @@ static Standard_Integer OCC24086 (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer OCC24945 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if (argc != 1) { - di << "Usage: " << argv[0] << " invalid number of arguments" << "\n"; + di << "Usage: " << argv[0] << " invalid number of arguments\n"; return 1; } @@ -1368,7 +1368,7 @@ static Standard_Integer OCC24137 (Draw_Interpretor& theDI, Standard_Integer theN Standard_Integer anArgIter = 1; if (theNArg < 5) { - theDI <<"Usage: " << theArgv[0] << " face vertex U V [N]"<<"\n"; + theDI <<"Usage: " << theArgv[0] << " face vertex U V [N]\n"; return 1; } @@ -1591,7 +1591,7 @@ static Standard_Integer OCC23972 (Draw_Interpretor& di,Standard_Integer n, const static Standard_Integer OCC24370 (Draw_Interpretor& di, Standard_Integer argc,const char ** argv) { if (argc < 5) { - di<<"Usage: " << argv[0] << " invalid number of arguments"<<"\n"; + di<<"Usage: " << argv[0] << " invalid number of arguments\n"; return 1; } @@ -1707,7 +1707,7 @@ struct QABugs_NHandleClass { Standard_Integer NHandleProc (Draw_Interpretor& , Standard_Integer , const char** theArgVec) { - std::cerr << "QABugs_NHandleClass[" << this << "] " << "" << theArgVec[0] << "\n"; + std::cerr << "QABugs_NHandleClass[" << this << "] " << theArgVec[0] << "\n"; return 0; } }; @@ -1718,7 +1718,7 @@ struct QABugs_NHandleClass static Standard_Integer OCC23951 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if (argc != 2) { - di << "Usage: " << argv[0] << " invalid number of arguments" << "\n"; + di << "Usage: " << argv[0] << " invalid number of arguments\n"; return 1; } Handle(TDocStd_Document) aDoc = new TDocStd_Document("dummy");; @@ -1777,7 +1777,7 @@ static Standard_Integer OCC23950 (Draw_Interpretor& di, Standard_Integer argc, c STEPCAFControl_Writer writer; if (! writer.Transfer (aDoc, mode)) { - di << "The document cannot be translated or gives no result" << "\n"; + di << "The document cannot be translated or gives no result\n"; return 1; } @@ -1852,11 +1852,11 @@ static Standard_Integer OCC24667 (Draw_Interpretor& di, Standard_Integer n, cons { if (n == 1) { - di << "OCC24667 result Wire_spine Profile [Mode [Approx]]" << "\n"; - di << "Mode = 0 - CorrectedFrenet," << "\n"; - di << " = 1 - Frenet," << "\n"; - di << " = 2 - DiscreteTrihedron" << "\n"; - di << "Approx - force C1-approximation if result is C0" << "\n"; + di << "OCC24667 result Wire_spine Profile [Mode [Approx]]\n"; + di << "Mode = 0 - CorrectedFrenet,\n"; + di << " = 1 - Frenet,\n"; + di << " = 2 - DiscreteTrihedron\n"; + di << "Approx - force C1-approximation if result is C0\n"; return 0; } @@ -1936,7 +1936,7 @@ static TopoDS_Shape CreateTestShape (int& theShapeNb) static Standard_Integer OCC24931 (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc != 2) { - di << "Usage: " << argv[0] << " invalid number of arguments"<<"\n"; + di << "Usage: " << argv[0] << " invalid number of arguments\n"; return 1; } TCollection_ExtendedString aFileName (argv[1]); @@ -2475,7 +2475,7 @@ class mOcafApplication : public TDocStd_Application static Standard_Integer OCC23010 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if (argc != 2) { - di << "Usage: " << argv[0] << " invalid number of arguments" << "\n"; + di << "Usage: " << argv[0] << " invalid number of arguments\n"; return 1; } std::string fileName=argv[1]; @@ -2585,7 +2585,7 @@ static Standard_Integer OCC25202 ( Draw_Interpretor& theDI, static Standard_Integer OCC7570 (Draw_Interpretor& di, Standard_Integer n, const char** a) { if (n != 2) { - di<<"Usage: "< aMaxDeviation) { theDI << "Failed. Number of incorrect results is too huge: " << - aDeviation * 100 << "% (Max " << aMaxDeviation * 100 << "%)" << "\n"; + aDeviation * 100 << "% (Max " << aMaxDeviation * 100 << "%)\n"; return 1; } theDI << "Deviation of incorrect results is: " << - aDeviation * 100 << "% (Max " << aMaxDeviation * 100 << "%)" << "\n"; + aDeviation * 100 << "% (Max " << aMaxDeviation * 100 << "%)\n"; theDI << "Test completed\n"; return 0; } @@ -3604,7 +3604,7 @@ Standard_Integer OCC26446 (Draw_Interpretor& di, const char** a) { if (n != 4) { - di << "Usage: OCC26446 r c1 c2" << "\n"; + di << "Usage: OCC26446 r c1 c2\n"; return 1; } @@ -3614,12 +3614,12 @@ Standard_Integer OCC26446 (Draw_Interpretor& di, Handle(Geom_BSplineCurve)::DownCast(DrawTrSurf::GetCurve(a[3])); if (aCurve1.IsNull()) { - di << a[2] << " is not a BSpline curve" << "\n"; + di << a[2] << " is not a BSpline curve\n"; return 1; } if (aCurve2.IsNull()) { - di << a[3] << " is not a BSpline curve" << "\n"; + di << a[3] << " is not a BSpline curve\n"; return 1; } @@ -4034,7 +4034,7 @@ static Standard_Integer OCC26313(Draw_Interpretor& di,Standard_Integer n,const c TopoDS_Shape aSrcShape = DBRep::Get(a[2]); if (aSrcShape.IsNull()) { - di << a[2] << " is not a valid shape" << "\n"; + di << a[2] << " is not a valid shape\n"; return 1; } diff --git a/src/QABugs/QABugs_2.cxx b/src/QABugs/QABugs_2.cxx index ca5a272dab..ace869c480 100644 --- a/src/QABugs/QABugs_2.cxx +++ b/src/QABugs/QABugs_2.cxx @@ -51,7 +51,7 @@ static Standard_Integer OCC527(Draw_Interpretor& di, Standard_Integer argc, cons // 1. Verify amount of arguments of the command //if (argc < 2) { di << "OCC527 FAULTY. Use : OCC527 shape "; return 0;} if (argc < 2 || argc > 3) { - di << "Usage : " << argv[0] << " shape [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " shape [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -60,7 +60,7 @@ static Standard_Integer OCC527(Draw_Interpretor& di, Standard_Integer argc, cons if (IsB != 1) { IsBRepAlgoAPI = Standard_False; //#if ! defined(BRepAlgo_def04) -// di << "Error: There is not BRepAlgo_Section class" << "\n"; +// di << "Error: There is not BRepAlgo_Section class\n"; // return 1; //#endif } @@ -110,14 +110,14 @@ static Standard_Integer OCC527(Draw_Interpretor& di, Standard_Integer argc, cons Standard_Boolean IsDone; TopoDS_Shape aResult; if (IsBRepAlgoAPI) { - di << "BRepAlgoAPI_Section aSection(aFace,pl,Standard_False)" <<"\n"; + di << "BRepAlgoAPI_Section aSection(aFace,pl,Standard_False)\n"; BRepAlgoAPI_Section aSection(aFace,pl,Standard_False); aSection.Approximation(Standard_True); aSection.Build(); IsDone = aSection.IsDone(); aResult = aSection.Shape(); } else { - di << "BRepAlgo_Section aSection(aFace,pl,Standard_False)" <<"\n"; + di << "BRepAlgo_Section aSection(aFace,pl,Standard_False)\n"; BRepAlgo_Section aSection(aFace,pl,Standard_False); aSection.Approximation(Standard_True); aSection.Build(); diff --git a/src/QABugs/QABugs_3.cxx b/src/QABugs/QABugs_3.cxx index 87ce5db80f..c4681b7cc4 100644 --- a/src/QABugs/QABugs_3.cxx +++ b/src/QABugs/QABugs_3.cxx @@ -33,7 +33,7 @@ static int BUC60623(Draw_Interpretor& di, Standard_Integer argc, const char ** a { if(argc!=4) { - di << "Usage : " << a[0] << " result Shape1 Shape2" << "\n"; + di << "Usage : " << a[0] << " result Shape1 Shape2\n"; return -1; } @@ -46,7 +46,7 @@ static int BUC60623(Draw_Interpretor& di, Standard_Integer argc, const char ** a GeomInt_IntSS Inter; Inter.Perform(GSF1,GSF2, BRep_Tool::Tolerance(F1)); if (!Inter.IsDone()) { - di << "Intersection not done" << "\n"; + di << "Intersection not done\n"; return 1; } Standard_Integer nbsol = Inter.NbLines(); @@ -60,7 +60,7 @@ static int BUC60623(Draw_Interpretor& di, Standard_Integer argc, const char ** a return 0; } else di << "The first solution is Null!" << "\n"; - di << "fini" << "\n"; + di << "fini\n"; return 0; } @@ -72,7 +72,7 @@ static int BUC60569(Draw_Interpretor& di, Standard_Integer argc, const char ** a { if(argc!=2) { - di << "Usage : " << argv[0] << " shape" << "\n"; + di << "Usage : " << argv[0] << " shape\n"; return -1; } @@ -95,7 +95,7 @@ static int BUC60614(Draw_Interpretor& di, Standard_Integer argc, const char ** a { if(argc!=2) { - di << "Usage : "<< argv[0] << " shape" << "\n"; + di << "Usage : "<< argv[0] << " shape\n"; return -1; } @@ -138,7 +138,7 @@ static int BUC60609(Draw_Interpretor& di, Standard_Integer argc, const char ** a } else if ( argc == 5 ) { // BUC60609 shape name U V } else { - di << "Usage : "<< argv[0] << " shape name [U V]" << "\n"; + di << "Usage : "<< argv[0] << " shape name [U V]\n"; return(-1); } @@ -176,7 +176,7 @@ static int BUC60609(Draw_Interpretor& di, Standard_Integer argc, const char ** a BRepTools::UVBounds (face, faceUMin,faceUMax,faceVMin,faceVMax); - di << "The bounds of the trimmed face:" << "\n"; + di << "The bounds of the trimmed face:\n"; di << faceUMin << " <= U <= " << faceUMax << "\n"; di << faceVMin << " <= V <= " << faceVMax << "\n"; @@ -184,9 +184,9 @@ static int BUC60609(Draw_Interpretor& di, Standard_Integer argc, const char ** a TopOpeBRep_PointClassifier PClass; - di << "Now test the point classifier by inputting U,V values" << "\n"; - di << "inside or outside the bounds displayed above" << "\n"; - di << "Type stop to exit" << "\n"; + di << "Now test the point classifier by inputting U,V values\n"; + di << "inside or outside the bounds displayed above\n"; + di << "Type stop to exit\n"; // Please register this: // *********************************************** @@ -201,25 +201,25 @@ static int BUC60609(Draw_Interpretor& di, Standard_Integer argc, const char ** a uvSurf = gp_Pnt2d(0.14,5.1); state = PClass.Classify(face,uvSurf,Precision::PConfusion()); if(state == TopAbs_IN || state == TopAbs_ON){ - di << "U=" << 0.14 << " V=" << 5.1 << " classified INSIDE" << "\n"; + di << "U=" << 0.14 << " V=" << 5.1 << " classified INSIDE\n"; }else{ - di << "U=" << 0.14 << " V=" << 5.1 << " classified OUTSIDE" << "\n"; + di << "U=" << 0.14 << " V=" << 5.1 << " classified OUTSIDE\n"; } uvSurf = gp_Pnt2d(1.28,5.1); state = PClass.Classify(face,uvSurf,Precision::PConfusion()); if(state == TopAbs_IN || state == TopAbs_ON){ - di << "U=" << 1.28 << " V=" << 5.1 << " classified INSIDE" << "\n"; + di << "U=" << 1.28 << " V=" << 5.1 << " classified INSIDE\n"; }else{ - di << "U=" << 1.28 << " V=" << 5.1 << " classified OUTSIDE" << "\n"; + di << "U=" << 1.28 << " V=" << 5.1 << " classified OUTSIDE\n"; } } else { uvSurf = gp_Pnt2d(Draw::Atof(argv[3]),Draw::Atof(argv[4])); state = PClass.Classify(face,uvSurf,Precision::PConfusion()); if(state == TopAbs_IN || state == TopAbs_ON){ - di << "U=" << Draw::Atof(argv[3]) << " V=" << Draw::Atof(argv[4]) << " classified INSIDE" << "\n"; + di << "U=" << Draw::Atof(argv[3]) << " V=" << Draw::Atof(argv[4]) << " classified INSIDE\n"; }else{ - di << "U=" << Draw::Atof(argv[3]) << " V=" << Draw::Atof(argv[4]) << " classified OUTSIDE" << "\n"; + di << "U=" << Draw::Atof(argv[3]) << " V=" << Draw::Atof(argv[4]) << " classified OUTSIDE\n"; } } return 0; @@ -314,7 +314,7 @@ Standard_Integer ksection(Draw_Interpretor& di, Standard_Integer n, const char * Toler2d=Draw::Atof(a[6]); RelativeTol=Draw::Atoi(a[7]); - di << "BRepAlgo_BooleanOperations myalgo" << "\n"; + di << "BRepAlgo_BooleanOperations myalgo\n"; BRepAlgo_BooleanOperations myalgo; myalgo.Shapes(s1, s2); @@ -397,7 +397,7 @@ static Standard_Integer BUC60699(Draw_Interpretor& di, Standard_Integer /*n*/, c static Standard_Integer GER61394(Draw_Interpretor& di, Standard_Integer argc, const char ** argv ) { if(argc > 2) { - di << "Usage : " << argv[0] << " [1/0]" << "\n"; + di << "Usage : " << argv[0] << " [1/0]\n"; return -1; } @@ -530,7 +530,7 @@ static Standard_Integer BUC60726 (Draw_Interpretor& di,Standard_Integer argc, co } if(argc != 2) { - di << "Usage : " << argv[0] << " 0/1" << "\n"; + di << "Usage : " << argv[0] << " 0/1\n"; } if(Draw::Atoi(argv[1]) == 0) { @@ -547,7 +547,7 @@ static Standard_Integer BUC60726 (Draw_Interpretor& di,Standard_Integer argc, co myAISContext->OpenLocalContext(); myAISContext->ActivateStandardMode(TopAbs_FACE); } else { - di << "Usage : " << argv[0] << " 0/1" << "\n"; + di << "Usage : " << argv[0] << " 0/1\n"; return -1; } @@ -604,7 +604,7 @@ static Standard_Integer BUC60724(Draw_Interpretor& di, Standard_Integer /*argc*/ static Standard_Integer BUC60727(Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** /*argv*/ ) { -di <<"Program Test" << "\n"; +di <<"Program Test\n"; UnitsAPI::SetLocalSystem(UnitsAPI_MDTV); //length is mm di <<"AnyToLS (3,mm) = " << UnitsAPI::AnyToLS(3.,"mm") << "\n"; // result was WRONG. @@ -786,12 +786,12 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co Ex.Init(FP, TopAbs_VERTEX); TopoDS_Vertex v1 = TopoDS::Vertex(Ex.Current()); fillet.AddFillet(v1, 20); - di << "\n" << "Error is " << fillet.Status() << "\n"; + di << "\nError is " << fillet.Status() << "\n"; // printf("\nError is %d ", fillet.Status()); Ex.Next(); TopoDS_Vertex V2 = TopoDS::Vertex(Ex.Current()); fillet.AddFillet(V2, 20); - di << "\n" << "Error is " << fillet.Status() << "\n"; + di << "\nError is " << fillet.Status() << "\n"; // printf("\nError is %d ", fillet.Status()); fillet.Build(); FP1 = fillet.Shape(); @@ -853,7 +853,7 @@ static int BUC60825(Draw_Interpretor& di, Standard_Integer argc, const char ** a static int OCC10006(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc > 2) { - di << "Usage : " << argv[0] << " [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -862,7 +862,7 @@ static int OCC10006(Draw_Interpretor& di, Standard_Integer argc, const char ** a if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def01) -// di << "Error: There is not BRepAlgo_Fuse class" << "\n"; +// di << "Error: There is not BRepAlgo_Fuse class\n"; // return 1; #endif } @@ -911,11 +911,11 @@ static int OCC10006(Draw_Interpretor& di, Standard_Integer argc, const char ** a // BRepAlgo_Fuse result(loft1.Shape(), loft2.Shape()); //#endif if (IsBRepAlgoAPI) { - di << "BRepAlgoAPI_Fuse result(loft1.Shape(), loft2.Shape())" <<"\n"; + di << "BRepAlgoAPI_Fuse result(loft1.Shape(), loft2.Shape())\n"; BRepAlgoAPI_Fuse result(loft1.Shape(), loft2.Shape()); DBRep::Set("F",result.Shape()); } else { - di << "BRepAlgo_Fuse result(loft1.Shape(), loft2.Shape())" <<"\n"; + di << "BRepAlgo_Fuse result(loft1.Shape(), loft2.Shape())\n"; BRepAlgo_Fuse result(loft1.Shape(), loft2.Shape()); DBRep::Set("F",result.Shape()); } @@ -1032,7 +1032,7 @@ static Standard_Integer BUC60876_ (Draw_Interpretor& di, return -1; } if((argc != 2) && (argc != 3)) { - di<< "usage : " << argv[0] << " shape [mode==1]" << "\n"; + di<< "usage : " << argv[0] << " shape [mode==1]\n"; return -1; } TopoDS_Shape aShape = DBRep::Get(argv[1]); @@ -1066,7 +1066,7 @@ static int TestCMD(Draw_Interpretor& di, Standard_Integer argc, const char ** ar { if(argc > 2) { - di << "Usage : " << argv[0] << " [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -1075,7 +1075,7 @@ static int TestCMD(Draw_Interpretor& di, Standard_Integer argc, const char ** ar if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def01) -// di << "Error: There is not BRepAlgo_Fuse class" << "\n"; +// di << "Error: There is not BRepAlgo_Fuse class\n"; // return 1; #endif } @@ -1133,16 +1133,16 @@ static int TestCMD(Draw_Interpretor& di, Standard_Integer argc, const char ** ar TopoDS_Shape fuse; if (IsBRepAlgoAPI) { - di << "BRepAlgoAPI_Fuse SFuse(SCyl, SCon)" <<"\n"; + di << "BRepAlgoAPI_Fuse SFuse(SCyl, SCon)\n"; BRepAlgoAPI_Fuse SFuse(SCyl, SCon); if(! SFuse.IsDone() ) - di<<"Error: Boolean fuse operation failed !"<<"\n"; + di<<"Error: Boolean fuse operation failed !\n"; fuse = SFuse.Shape(); } else { - di << "BRepAlgo_Fuse SFuse(SCyl, SCon)" <<"\n"; + di << "BRepAlgo_Fuse SFuse(SCyl, SCon)\n"; BRepAlgo_Fuse SFuse(SCyl, SCon); if(! SFuse.IsDone() ) - di<<"Error: Boolean fuse operation failed !"<<"\n"; + di<<"Error: Boolean fuse operation failed !\n"; fuse = SFuse.Shape(); } @@ -1164,7 +1164,7 @@ static Standard_Integer statface (Draw_Interpretor& di,Standard_Integer /*argc*/ TopoDS_Shape aShape = DBRep::Get(argv[1]); if(aShape.IsNull()) { - di<<"Invalid input shape"<<"\n"; + di<<"Invalid input shape\n"; return 1; } Handle(Dico_DictionaryOfInteger) aDico = new Dico_DictionaryOfInteger(); @@ -1247,8 +1247,8 @@ static Standard_Integer statface (Draw_Interpretor& di,Standard_Integer /*argc*/ } di<<"\n"; - di<<"Degenerated edges :"<<"\n"; - di< 2) { - di << "Usage : " << argv[0] << " [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << argv[0] << " [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -1268,7 +1268,7 @@ static Standard_Integer BUC60841(Draw_Interpretor& di, Standard_Integer argc, co if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def01) -// di << "Error: There is not BRepAlgo_Fuse class" << "\n"; +// di << "Error: There is not BRepAlgo_Fuse class\n"; // return 1; #endif } @@ -1299,11 +1299,11 @@ static Standard_Integer BUC60841(Draw_Interpretor& di, Standard_Integer argc, co TopoDS_Shape fsh1; if (IsBRepAlgoAPI) { - di << "BRepAlgoAPI_Fuse fuse1(sh1, sh2)" <<"\n"; + di << "BRepAlgoAPI_Fuse fuse1(sh1, sh2)\n"; BRepAlgoAPI_Fuse fuse1(sh1, sh2); fsh1 = fuse1.Shape(); } else { - di << "BRepAlgo_Fuse fuse1(sh1, sh2)" <<"\n"; + di << "BRepAlgo_Fuse fuse1(sh1, sh2)\n"; BRepAlgo_Fuse fuse1(sh1, sh2); fsh1 = fuse1.Shape(); } @@ -1323,11 +1323,11 @@ static Standard_Integer BUC60841(Draw_Interpretor& di, Standard_Integer argc, co TopoDS_Shape fsh2; if (IsBRepAlgoAPI) { - di << "BRepAlgoAPI_Fuse fuse2(fsh1,sh3)" <<"\n"; + di << "BRepAlgoAPI_Fuse fuse2(fsh1,sh3)\n"; BRepAlgoAPI_Fuse fuse2(fsh1,sh3); fsh2 = fuse2.Shape(); } else { - di << "BRepAlgo_Fuse fuse2(fsh1,sh3)" <<"\n"; + di << "BRepAlgo_Fuse fuse2(fsh1,sh3)\n"; BRepAlgo_Fuse fuse2(fsh1,sh3); fsh2 = fuse2.Shape(); } @@ -1370,7 +1370,7 @@ static Standard_Integer BUC60874(Draw_Interpretor& /*di*/, Standard_Integer /*ar static int BUC60817(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc!=2) { - di << "Usage : " << argv[0] << " D" << "\n"; + di << "Usage : " << argv[0] << " D\n"; di<<1; return 0; } @@ -1397,7 +1397,7 @@ static int BUC60817(Draw_Interpretor& di, Standard_Integer argc, const char ** a static int BUC60831_1(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc!=2) { - di << "Usage : " << argv[0] << " D" << "\n"; + di << "Usage : " << argv[0] << " D\n"; di<<-1; return 0; } @@ -1419,7 +1419,7 @@ static int BUC60831_1(Draw_Interpretor& di, Standard_Integer argc, const char ** static int BUC60831_2(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc!=3) { - di << "Usage : " << argv[0] << " D Label" << "\n"; + di << "Usage : " << argv[0] << " D Label\n"; di<<1; return 0; } @@ -1438,7 +1438,7 @@ static int BUC60831_2(Draw_Interpretor& di, Standard_Integer argc, const char ** static int BUC60836(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc!=2) { - di << "Usage : " << argv[0] << " D" << "\n"; + di << "Usage : " << argv[0] << " D\n"; di<<1; return 0; } @@ -1508,7 +1508,7 @@ static int BUC60836(Draw_Interpretor& di, Standard_Integer argc, const char ** a static int BUC60847(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc!=3) { - di << "Usage : " << argv[0] << " D Shape" << "\n"; + di << "Usage : " << argv[0] << " D Shape\n"; di<<1; return 0; } @@ -1517,7 +1517,7 @@ static int BUC60847(Draw_Interpretor& di, Standard_Integer argc, const char ** a if (!DDF::GetDF(argv[1],aDF)) {di<<2;return 0;} TopoDS_Shape s = DBRep::Get(argv[2]); - if (s.IsNull()) { di <<"shape not found"<< "\n"; di<<3;return 0;} + if (s.IsNull()) { di <<"shape not found\n"; di<<3;return 0;} TDF_Label L; DDF::AddLabel(aDF, "0:2", L); TNaming_Builder SI (L); @@ -1535,7 +1535,7 @@ static int BUC60847(Draw_Interpretor& di, Standard_Integer argc, const char ** a static int BUC60862(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc!=3) { - di << "Usage : " << argv[0] << " D Shape" << "\n"; + di << "Usage : " << argv[0] << " D Shape\n"; di<<1; return 0; } @@ -1544,7 +1544,7 @@ static int BUC60862(Draw_Interpretor& di, Standard_Integer argc, const char ** a if (!DDF::GetDF(argv[1],aDF)) {di<<2;return 0;} TopoDS_Shape s = DBRep::Get(argv[2]); - if (s.IsNull()) { di <<"shape not found"<< "\n"; di<<3;return 0;} + if (s.IsNull()) { di <<"shape not found\n"; di<<3;return 0;} TDF_Label L; DDF::AddLabel(aDF, "0:2", L); TNaming_Builder SI (L); @@ -1567,7 +1567,7 @@ static int BUC60867(Draw_Interpretor& di, Standard_Integer argc, const char ** a Handle(TDocStd_Document) D; Standard_Integer insession = A->IsInSession(path); if (insession > 0) { - di <<"document " << insession << " is already in session" << "\n"; + di <<"document " << insession << " is already in session\n"; di<<2; return 0; } @@ -1583,7 +1583,7 @@ static int BUC60867(Draw_Interpretor& di, Standard_Integer argc, const char ** a static int BUC60910(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc!=2) { - di << "Usage : " << argv[0] << " D" << "\n"; + di << "Usage : " << argv[0] << " D\n"; di<<1; return 0; } @@ -1611,7 +1611,7 @@ static int BUC60910(Draw_Interpretor& di, Standard_Integer argc, const char ** a static int BUC60925(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc!=2) { - di << "Usage : " << argv[0] << " D" << "\n"; + di << "Usage : " << argv[0] << " D\n"; di<<1; return 0; } @@ -1639,7 +1639,7 @@ static int BUC60925(Draw_Interpretor& di, Standard_Integer argc, const char ** a static int BUC60932(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc!=2) { - di << "Usage : " << argv[0] << " D" << "\n"; + di << "Usage : " << argv[0] << " D\n"; di<<1; return 0; } @@ -1684,7 +1684,7 @@ static int AISWidth(Draw_Interpretor& di, Standard_Integer argc, const char ** a di<Width(); } else{ - di << "AISWidth: Warning : Width wasn't set" << "\n"; + di << "AISWidth: Warning : Width wasn't set\n"; di<<(-4); } } @@ -1737,7 +1737,7 @@ static Standard_Integer BUC60951_(Draw_Interpretor& di, Standard_Integer argc, c // return -1; // } if(argc < 2 || argc > 3) { - di << "Usage : " << a[0] << " [BRepAlgoAPI/BRepAlgo = 1/0]" << "\n"; + di << "Usage : " << a[0] << " [BRepAlgoAPI/BRepAlgo = 1/0]\n"; return 1; } Standard_Boolean IsBRepAlgoAPI = Standard_True; @@ -1746,7 +1746,7 @@ static Standard_Integer BUC60951_(Draw_Interpretor& di, Standard_Integer argc, c if (IsB != 1) { IsBRepAlgoAPI = Standard_False; #if ! defined(BRepAlgo_def01) -// di << "Error: There is not BRepAlgo_Fuse class" << "\n"; +// di << "Error: There is not BRepAlgo_Fuse class\n"; // return 1; #endif } @@ -1793,11 +1793,11 @@ static Standard_Integer BUC60951_(Draw_Interpretor& di, Standard_Integer argc, c // sh = fuse.Shape(); if (IsBRepAlgoAPI) { - di << "BRepAlgoAPI_Fuse fuse(sol, sh)" <<"\n"; + di << "BRepAlgoAPI_Fuse fuse(sol, sh)\n"; BRepAlgoAPI_Fuse fuse(sol, sh); sh = fuse.Shape(); } else { - di << "BRepAlgo_Fuse fuse(sol, sh)" <<"\n"; + di << "BRepAlgo_Fuse fuse(sol, sh)\n"; BRepAlgo_Fuse fuse(sol, sh); sh = fuse.Shape(); } diff --git a/src/QABugs/QABugs_5.cxx b/src/QABugs/QABugs_5.cxx index 325e499f64..04204814aa 100644 --- a/src/QABugs/QABugs_5.cxx +++ b/src/QABugs/QABugs_5.cxx @@ -40,7 +40,7 @@ static Standard_Integer OCC6001 (Draw_Interpretor& di, Standard_Integer argc, co { if (argc < 4) { - di<<"missing parameters"<<"\n"; + di<<"missing parameters\n"; return 1; } const char *name = argv[1]; @@ -53,7 +53,7 @@ static Standard_Integer OCC6001 (Draw_Interpretor& di, Standard_Integer argc, co TopoDS_Shape wire = DBRep::Get(argv[2]); if (wire.IsNull() || wire.ShapeType() != TopAbs_WIRE) { - di<<"incorrect 1st parameter, curve or wire expected"<<"\n"; + di<<"incorrect 1st parameter, curve or wire expected\n"; return 1; } BRepAdaptor_CompCurve comp_curve(TopoDS::Wire(wire)); diff --git a/src/QABugs/QABugs_6.cxx b/src/QABugs/QABugs_6.cxx index d5809b4814..73f03e4742 100644 --- a/src/QABugs/QABugs_6.cxx +++ b/src/QABugs/QABugs_6.cxx @@ -37,7 +37,7 @@ static Standard_Integer OCC281bug (Draw_Interpretor& di, Standard_Integer argc, return -1; } if(argc < 4) { - di << "Usage : " << argv[0] << " x y TypeOfMarker(0-12)" << "\n"; + di << "Usage : " << argv[0] << " x y TypeOfMarker(0-12)\n"; return 1; } @@ -106,11 +106,11 @@ static Standard_Integer OCC281bug (Draw_Interpretor& di, Standard_Integer argc, V3d_Coordinate X,Y,Z; aView->ConvertToGrid(x,y,X,Y,Z); } else { - di << "NOT aViewer->GridEcho()" << "\n"; + di << "NOT aViewer->GridEcho()\n"; return 1; } } else { - di << "NOT aViewer->IsActive()" << "\n"; + di << "NOT aViewer->IsActive()\n"; return 1; } return 0; diff --git a/src/QABugs/QABugs_7.cxx b/src/QABugs/QABugs_7.cxx index 004cf61f45..0568f84fe7 100644 --- a/src/QABugs/QABugs_7.cxx +++ b/src/QABugs/QABugs_7.cxx @@ -253,7 +253,7 @@ const Standard_Integer Glob_Mults[Glob_NbKnots] = static Standard_Integer OCC862 (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if ( argc != 3) { - di << "ERROR : Usage : " << argv[0] << " curve1 curve2" << "\n"; + di << "ERROR : Usage : " << argv[0] << " curve1 curve2\n"; return 1; } @@ -304,12 +304,12 @@ static Standard_Integer OCC862 (Draw_Interpretor& di, Standard_Integer argc, con const Standard_Real D = Ex.LowerDistance(); // IMPORTANT: minimal distance here means accuracy reached in intersection di<<"Info: Minimal distance is "< 3) { - di << "ERROR : Usage : " << argv[0] << " highlight_mode [shape]" << "\n"; + di << "ERROR : Usage : " << argv[0] << " highlight_mode [shape]\n"; return 1; } @@ -97,12 +97,12 @@ static Standard_Integer OCC137 (Draw_Interpretor& di, Standard_Integer argc, con TCollection_AsciiString aName(argv[2]); Handle(AIS_InteractiveObject) AISObj; if(!aMap1.IsBound2(aName)) { - di << "Use 'vdisplay' before" << "\n"; + di << "Use 'vdisplay' before\n"; return 1; } else { AISObj = Handle(AIS_InteractiveObject)::DownCast(aMap1.Find2(aName)); if(AISObj.IsNull()){ - di << argv[2] << " : No interactive object" << "\n"; + di << argv[2] << " : No interactive object\n"; return 1; } aMap.Bind(AISObj,aName); @@ -132,11 +132,11 @@ static Standard_Integer OCC137_z (Draw_Interpretor& di, Standard_Integer argc, c { Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if(aContext.IsNull()) { - di << argv[0] << "ERROR : use 'vinit' command before " << "\n"; + di << argv[0] << "ERROR : use 'vinit' command before \n"; return 1; } if ( argc != 1 && argc != 2) { - di << "ERROR : Usage : " << argv[0] << " [ZDetection_mode]" << "\n"; + di << "ERROR : Usage : " << argv[0] << " [ZDetection_mode]\n"; return 1; } aContext->SetZDetection(((argc == 1 || (argc == 2 && Draw::Atoi(argv[1]) == 1)) ? Standard_True : Standard_False)); diff --git a/src/QADNaming/QADNaming_BasicCommands.cxx b/src/QADNaming/QADNaming_BasicCommands.cxx index 4552227249..2124fe2b13 100644 --- a/src/QADNaming/QADNaming_BasicCommands.cxx +++ b/src/QADNaming/QADNaming_BasicCommands.cxx @@ -156,7 +156,7 @@ static Standard_Integer Getentry (Draw_Interpretor& di, Standard_Integer n, cons TopoDS_Shape S = DBRep::Get(a[2]); if (S.IsNull()) { - di <<"Noone shape selected"<<"\n"; + di <<"Noone shape selected\n"; di << 0; return 0; } @@ -168,7 +168,7 @@ static Standard_Integer Getentry (Draw_Interpretor& di, Standard_Integer n, cons else { di <Evolution()); @@ -76,7 +76,7 @@ static Standard_Integer GetNewShapes (Draw_Interpretor& di, } di<<" "<Evolution()); @@ -106,7 +106,7 @@ static Standard_Integer GetOldShapes (Draw_Interpretor& di, } di<<" "<Root(),aName,0); } } else { - di<<"Usage: GetAllNewShapes df entry/shape [res]"<<"\n"; + di<<"Usage: GetAllNewShapes df entry/shape [res]\n"; return 1; } di<Root(),aName,0); } } else { - di<<"Usage: GetAllNewShapes df entry/shape [res]"<<"\n"; + di<<"Usage: GetAllNewShapes df entry/shape [res]\n"; return 1; } di<Display(XLine); diff --git a/src/QANCollection/QANCollection_Perf.cxx b/src/QANCollection/QANCollection_Perf.cxx index 5921d0f3c0..e42e14500e 100644 --- a/src/QANCollection/QANCollection_Perf.cxx +++ b/src/QANCollection/QANCollection_Perf.cxx @@ -993,17 +993,17 @@ static void CompSparseArray (Draw_Interpretor& theDI, Standard_Integer CheckArguments(Draw_Interpretor& di, Standard_Integer argc, const char ** argv, Standard_Integer& Repeat, Standard_Integer& Size) { if ( argc != 3) { - di << "Usage : " << argv[0] << " Repeat Size" << "\n"; + di << "Usage : " << argv[0] << " Repeat Size\n"; return 1; } Repeat = Draw::Atoi(argv[1]); Size = Draw::Atoi(argv[2]); if ( Repeat < 1 ) { - di << "Repeat > 0" << "\n"; + di << "Repeat > 0\n"; return 1; } if ( Size < 1 ) { - di << "Size > 0" << "\n"; + di << "Size > 0\n"; return 1; } return 0; diff --git a/src/QANCollection/QANCollection_Stl.cxx b/src/QANCollection/QANCollection_Stl.cxx index e36a5afa6c..9459e13d33 100644 --- a/src/QANCollection/QANCollection_Stl.cxx +++ b/src/QANCollection/QANCollection_Stl.cxx @@ -951,7 +951,7 @@ void TestPerformanceRandomIterator(Draw_Interpretor& di) // check that result is the same if ( ! std::equal (aVector->begin(), aVector->end(), aCollec->begin()) ) - di << "Error: sequences are not the same at the end!" << "\n"; + di << "Error: sequences are not the same at the end!\n"; delete aVector; delete aCollec; @@ -1003,7 +1003,7 @@ void TestPerformanceForwardIterator(Draw_Interpretor& di) // check that result is the same if ( ! std::equal (aVector->begin(), aVector->end(), aCollec->begin()) ) - di << "Error: sequences are not the same at the end!" << "\n"; + di << "Error: sequences are not the same at the end!\n"; delete aVector; delete aCollec; @@ -1055,7 +1055,7 @@ void TestPerformanceBidirIterator(Draw_Interpretor& di) // check that result is the same if ( ! std::equal (aVector->begin(), aVector->end(), aCollec->begin()) ) - di << "Error: sequences are not the same at the end!" << "\n"; + di << "Error: sequences are not the same at the end!\n"; delete aVector; delete aCollec; @@ -1140,33 +1140,33 @@ void TestPerformanceMapAccess(Draw_Interpretor& di) //======================================================================= static Standard_Integer QANTestNCollectionPerformance (Draw_Interpretor& di, Standard_Integer, const char**) { - di << "Testing performance (Size | STL time | OCCT time | STL/OCCT boost)" << "\n"; + di << "Testing performance (Size | STL time | OCCT time | STL/OCCT boost)\n"; - di << "\n" << "std::vector vs NCollection_Array1 (sort):" << "\n\n"; + di << "\nstd::vector vs NCollection_Array1 (sort):\n\n"; TestPerformanceRandomIterator, std::vector >(di); - di << "\n" << "std::vector vs NCollection_Vector (sort):" << "\n\n"; + di << "\nstd::vector vs NCollection_Vector (sort):\n\n"; TestPerformanceRandomIterator, std::vector >(di); - di << "\n" << "std::vector vs NCollection_Array1 (replace):" << "\n\n"; + di << "\nstd::vector vs NCollection_Array1 (replace):\n\n"; TestPerformanceForwardIterator, std::vector >(di); - di << "\n" << "std::vector vs NCollection_Vector (replace):" << "\n\n"; + di << "\nstd::vector vs NCollection_Vector (replace):\n\n"; TestPerformanceForwardIterator, std::vector >(di); - di << "\n" << "std::list vs NCollection_List (replace):" << "\n\n"; + di << "\nstd::list vs NCollection_List (replace):\n\n"; TestPerformanceForwardIterator, std::list >(di); - di << "\n" << "std::list vs NCollection_Sequence (replace):" << "\n\n"; + di << "\nstd::list vs NCollection_Sequence (replace):\n\n"; TestPerformanceForwardIterator, std::list >(di); - di << "\n" << "std::list vs NCollection_Sequence (reverse):" << "\n\n"; + di << "\nstd::list vs NCollection_Sequence (reverse):\n\n"; TestPerformanceBidirIterator, std::list >(di); - di << "\n" << "std::set vs NCollection_Map (search):" << "\n\n"; + di << "\nstd::set vs NCollection_Map (search):\n\n"; TestPerformanceMapAccess, int>(di); - di << "\n" << "std::set vs NCollection_IndexedMap (search):" << "\n\n"; + di << "\nstd::set vs NCollection_IndexedMap (search):\n\n"; TestPerformanceMapAccess, int>(di); return 0; diff --git a/src/QANCollection/QANCollection_Test.cxx b/src/QANCollection/QANCollection_Test.cxx index 06a642400c..19655dde86 100644 --- a/src/QANCollection/QANCollection_Test.cxx +++ b/src/QANCollection/QANCollection_Test.cxx @@ -592,13 +592,13 @@ static void TestIndexedDataMap (QANCollection_IDMapFunc& theM) Standard_Integer CheckArguments1(Draw_Interpretor& di, Standard_Integer argc, const char ** argv, Standard_Integer& Lower, Standard_Integer& Upper) { if ( argc != 3) { - di << "Usage : " << argv[0] << " Lower Upper" << "\n"; + di << "Usage : " << argv[0] << " Lower Upper\n"; return 1; } Lower = Draw::Atoi(argv[1]); Upper = Draw::Atoi(argv[2]); if ( Lower > Upper ) { - di << "Lower > Upper" << "\n"; + di << "Lower > Upper\n"; return 1; } return 0; @@ -611,7 +611,7 @@ Standard_Integer CheckArguments1(Draw_Interpretor& di, Standard_Integer argc, co Standard_Integer CheckArguments2(Draw_Interpretor& di, Standard_Integer argc, const char ** argv, Standard_Integer& LowerRow, Standard_Integer& UpperRow, Standard_Integer& LowerCol, Standard_Integer& UpperCol) { if ( argc != 5) { - di << "Usage : " << argv[0] << " LowerRow UpperRow LowerCol UpperCol" << "\n"; + di << "Usage : " << argv[0] << " LowerRow UpperRow LowerCol UpperCol\n"; return 1; } LowerRow = Draw::Atoi(argv[1]); @@ -619,11 +619,11 @@ Standard_Integer CheckArguments2(Draw_Interpretor& di, Standard_Integer argc, co LowerCol = Draw::Atoi(argv[3]); UpperCol = Draw::Atoi(argv[4]); if ( LowerRow > UpperRow ) { - di << "LowerRow > UpperRow" << "\n"; + di << "LowerRow > UpperRow\n"; return 1; } if ( LowerCol > UpperCol ) { - di << "LowerCol UpperCol> " << "\n"; + di << "LowerCol UpperCol> \n"; return 1; } return 0; diff --git a/src/QANewDBRepNaming/QANewDBRepNaming.cxx b/src/QANewDBRepNaming/QANewDBRepNaming.cxx index 71ed386248..c17e32c59b 100644 --- a/src/QANewDBRepNaming/QANewDBRepNaming.cxx +++ b/src/QANewDBRepNaming/QANewDBRepNaming.cxx @@ -114,7 +114,7 @@ static Standard_Integer QANewDBRepNaming_CheckNaming(Draw_Interpretor& di,Standa TDF_Label L2; DDF::AddLabel(DF, a[5], L2); if (!L2.FindAttribute(TNaming_NamedShape::GetID(), atiNS)) { - di<<"Error: Cannot find shape on label."<<"\n"; + di<<"Error: Cannot find shape on label.\n"; return 1; } amyNS = atiNS; @@ -124,12 +124,12 @@ static Standard_Integer QANewDBRepNaming_CheckNaming(Draw_Interpretor& di,Standa if (!strcmp(a[4],"Viewer")) aSelectedShape = ViewerTest::PickShape(TopAbs_SHAPE); else{ - di<<"Error: Incorrect argument #4"<<"\n"; + di<<"Error: Incorrect argument #4\n"; return 1; } if (aSelectedShape.IsNull()) { - di<<"Nothing has been selected ... try again"<<"\n"; + di<<"Nothing has been selected ... try again\n"; return 1; } @@ -152,21 +152,21 @@ static Standard_Integer QANewDBRepNaming_CheckNaming(Draw_Interpretor& di,Standa OCC_CATCH_SIGNALS if(SL.Select(aSubShape, aSelectedShape) == Standard_False) { // if(SL.Select(aSubShape, amyNS->Get()) == Standard_False) - di << "Selection error!!!" << "\n"; + di << "Selection error!!!\n"; return 1; } Handle(TNaming_NamedShape) aNS; if (!aSubLabel.FindAttribute(TNaming_NamedShape::GetID(), aNS)) { - di<<"Selection didn't produced a Named Shape ..."<<"\n"; + di<<"Selection didn't produced a Named Shape ...\n"; return 1; } const TopoDS_Shape& aResultOfSelection = TNaming_Tool::GetShape(aNS); if (!aSubShape.IsSame(aResultOfSelection)) { - di<<"Failure of selection"<<"\n"; + di<<"Failure of selection\n"; return 1; } } catch (Standard_Failure) { - di<<"!!! Solving Failed !!!" << "\n"; + di<<"!!! Solving Failed !!!\n"; continue; } @@ -190,7 +190,7 @@ static Standard_Integer QANewDBRepNaming_CheckNaming(Draw_Interpretor& di,Standa aTrsf.SetTranslation(aTranslation); TopLoc_Location aLoc(aTrsf); const TDF_Label& anOriginLabel = TNaming_Tool::NamedShape(aSelectedShape, L)->Label(); - if (anOriginLabel.IsNull()) di<<"Origin is null"<<"\n"; + if (anOriginLabel.IsNull()) di<<"Origin is null\n"; // TNaming::Displace(anOriginLabel, aLoc); // cout<<"Translate label ";anOriginLabel.EntryDump(cout);cout<2 ) { TopoDS_Shape b = DBRep::Get ( argv[2] ); if ( b.IsNull() ) { - di << "No shape named \"" << argv[2] << "\" found" << "\n"; + di << "No shape named \"" << argv[2] << "\" found\n"; return 1; } if ( argc >3 ) { TopoDS_Shape c = DBRep::Get ( argv[3] ); if ( c.IsNull() ) { - di << "No shape named \"" << argv[3] << "\" found" << "\n"; + di << "No shape named \"" << argv[3] << "\" found\n"; return 1; } L = b.Location().Multiplied ( c.Location().Inverted() ); @@ -87,19 +87,19 @@ static Standard_Integer LocSet (Draw_Interpretor& di, Standard_Integer argc, con static Standard_Integer LocDump (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 2) { - di << argv[0] << "LocDump a: dump location of shape \"a\"" << "\n"; + di << argv[0] << "LocDump a: dump location of shape \"a\"\n"; return 1; } TopoDS_Shape a = DBRep::Get ( argv[1] ); if ( a.IsNull() ) { - di << "No shape named \"" << argv[1] << "\" found" << "\n"; + di << "No shape named \"" << argv[1] << "\" found\n"; return 1; } TopLoc_Location L = a.Location(); - di << "Location of shape " << argv[1] << ":" << "\n"; - di << "Results in:" << "\n"; + di << "Location of shape " << argv[1] << ":\n"; + di << "Results in:\n"; gp_Trsf T = L.Transformation(); TopLoc_Location l ( T ); Standard_SStream aSStream; diff --git a/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx b/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx index 8495e3685f..17d032c306 100644 --- a/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx +++ b/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx @@ -69,7 +69,7 @@ static Standard_Integer tolerance << "myshape [mode] valmin : sub-shapes over valmin\n" <<"myshape [mode] valmin valmax : between valmin and valmax\n" <<"myshape [mode] 0 valmax : below valmax\n" - <<" more : all shapes(D) v vertices e edges f faces c combined(faces)"<<"\n"; + <<" more : all shapes(D) v vertices e edges f faces c combined(faces)\n"; return (argc < 2 ? 0 : 1 /* Error */); } Standard_CString arg1 = argv[1]; TopoDS_Shape Shape = DBRep::Get(arg1); @@ -132,11 +132,11 @@ static Standard_Integer tolerance static Standard_Integer projface (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if (argc < 4) { di<<"Give FACE name and X Y [Z]"<<"\n"; return 1 /* Error */; } + if (argc < 4) { di<<"Give FACE name and X Y [Z]\n"; return 1 /* Error */; } Standard_CString arg1 = argv[1]; TopoDS_Shape Shape = DBRep::Get(arg1); if (Shape.IsNull()) { di<<"Shape unknown : "<FirstParameter(); cl = C->LastParameter(); if (argc >= 7) { cf = Draw::Atof (argv[2]); cl = Draw::Atof (argv[3]); i0 = 2; } di<<"Curve 3D "< 0) di<<"GProps:Mass Out"<<"\n"; - else di<<"GProps:Mass In"<<"\n"; + if (G.Mass() > 0) di<<"GProps:Mass Out\n"; + else di<<"GProps:Mass In\n"; /// return (G.Mass() > 0); BRepTopAdaptor_FClass2d fcl (Face,BRep_Tool::Tolerance(Face)); - if (fcl.PerformInfinitePoint () == TopAbs_OUT) di<<"Classifier Infinite : Out"<<"\n"; - else di<<"Classifier Infinite : In"<<"\n"; + if (fcl.PerformInfinitePoint () == TopAbs_OUT) di<<"Classifier Infinite : Out\n"; + else di<<"Classifier Infinite : In\n"; gp_Pnt2d pcl; pcl.SetCoord(umin-difu,vmin-difv); - if (fcl.Perform (pcl) == TopAbs_OUT) di<<"Classifier UMin-VMin : Out"<<"\n"; + if (fcl.Perform (pcl) == TopAbs_OUT) di<<"Classifier UMin-VMin : Out\n"; pcl.SetCoord(umin-difu,vmax+difv); - if (fcl.Perform (pcl) == TopAbs_OUT) di<<"Classifier UMin-VMax : Out"<<"\n"; + if (fcl.Perform (pcl) == TopAbs_OUT) di<<"Classifier UMin-VMax : Out\n"; pcl.SetCoord(umax+difu,vmin-difv); - if (fcl.Perform (pcl) == TopAbs_OUT) di<<"Classifier UMax-VMin : Out"<<"\n"; + if (fcl.Perform (pcl) == TopAbs_OUT) di<<"Classifier UMax-VMin : Out\n"; pcl.SetCoord(umax+difu,vmax+difv); - if (fcl.Perform (pcl) == TopAbs_OUT) di<<"Classifier UMax-VMax : Out"<<"\n"; + if (fcl.Perform (pcl) == TopAbs_OUT) di<<"Classifier UMax-VMax : Out\n"; } } - if (ShapeAnalysis::IsOuterBound (Face)) di<<"ShapeAnalysis: Outer Bound"<<"\n"; - else di<<"ShapeAnalysis: Not Outer Bound"<<"\n"; - di<<" Total "<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di< 8192 poles"<<"\n"; + if(nb>0) di< 8192 poles\n"; nb = analyzer.NbBezierSurf(); - if(nb>0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<0) di<2 ) { @@ -558,7 +558,7 @@ static Standard_Integer XSHAPE_comptoledge } num++; } - if ( ! num ) { di << "No edges found in the shape" << "\n"; return 1; } + if ( ! num ) { di << "No edges found in the shape\n"; return 1; } di << "Edges tolerance computed by " << nbpnts << " points: \n" "MAX=" << max << " AVG=" << ave/num << " MIN=" << min << "\n"; @@ -626,11 +626,11 @@ static Standard_Integer freebounds (Draw_Interpretor& di, TopoDS_Shape wires = F.GetClosedWires(); Sprintf (name, "%s_c", a[1]); DBRep::Set (name, wires); - di << name << " - closed wires" << "\n"; + di << name << " - closed wires\n"; wires = F.GetOpenWires(); Sprintf (name, "%s_o", a[1]); DBRep::Set (name, wires); - di << name << " - open wires" << "\n"; + di << name << " - open wires\n"; return 0; } @@ -664,7 +664,7 @@ static Standard_Integer FreeBoundsProps(Draw_Interpretor& di, Standard_Integer n, const char** a) { if ( (n < 2)||(n > 5) ) { - di<<"Usage : freeprops shapename [tolerance [splitclosed [splitopen]]]"<<"\n"; + di<<"Usage : freeprops shapename [tolerance [splitclosed [splitopen]]]\n"; return 1; } @@ -690,10 +690,10 @@ static Standard_Integer FreeBoundsProps(Draw_Interpretor& di, Standard_Integer nb = analyzer.NbClosedFreeBounds(); di<<"\n"; - di<<" \t"<<"Area mm2"<<"\t"<<"Length mm"<<"\t"<<"Ratio L/W"<<"\t"<<"Width mm"<<"\t"<<"Nb noth"<<"\n"; + di<<" \tArea mm2\tLength mm\tRatio L/W\tWidth mm\tNb noth\n"; B.MakeCompound(closed); if (nb) { - di<<"Closed bounds properties"<<"\n"; + di<<"Closed bounds properties\n"; for (Standard_Integer i=1; i <= nb; i++) { Handle(ShapeAnalysis_FreeBoundData) fbd = analyzer.ClosedFreeBound(i); PrintProps(i, fbd, di); @@ -704,7 +704,7 @@ static Standard_Integer FreeBoundsProps(Draw_Interpretor& di, nb = analyzer.NbOpenFreeBounds(); B.MakeCompound(open); if (nb) { - di<<"Open bounds properties"<<"\n"; + di<<"Open bounds properties\n"; for (Standard_Integer i=1; i <= nb; i++) { Handle(ShapeAnalysis_FreeBoundData) fbd = analyzer.OpenFreeBound(i); PrintProps(i, fbd, di); @@ -717,7 +717,7 @@ static Standard_Integer FreeBoundsProps(Draw_Interpretor& di, di << name << " - closed wires, "; DBRep::Set(name, closed); Sprintf (name, "%s_o",a[1]); - di << name << " - closed wires " << "\n"; + di << name << " - closed wires \n"; DBRep::Set(name, open); return 0; } @@ -748,11 +748,11 @@ static Standard_Integer closefreebounds (Draw_Interpretor& di, TopoDS_Shape wires = F.GetClosedWires(); Sprintf (name, "%s_c", a[1]); DBRep::Set (name, wires); - di << name << " - closed wires" << "\n"; + di << name << " - closed wires\n"; wires = F.GetOpenWires(); Sprintf (name, "%s_o", a[1]); DBRep::Set (name, wires); - di << name << " - open wires" << "\n"; + di << name << " - open wires\n"; return 0; } @@ -824,11 +824,11 @@ static Standard_Integer getareacontour (Draw_Interpretor& di, if (n < 2) return 1; TopoDS_Shape shape = DBRep::Get(a[1]); if (shape.IsNull()) { - di<<"Shape is not defined"<<"\n"; + di<<"Shape is not defined\n"; return 1; } if(shape.ShapeType() != TopAbs_WIRE) { - di<<"invalid type of argument"<<"\n"; + di<<"invalid type of argument\n"; return 1; } //Handle(ShapeExtend_WireData) asewd = new ShapeExtend_WireData(TopoDS::Wire(shape)); @@ -843,7 +843,7 @@ static Standard_Integer checkselfintersection { if (argc < 2) { - di<<"Call please \"checkselfintersection wire [face]\""<<"\n"; + di<<"Call please \"checkselfintersection wire [face]\"\n"; return 1; } @@ -852,7 +852,7 @@ static Standard_Integer checkselfintersection TopoDS_Shape wire = DBRep::Get(arg1); if (wire.IsNull() || wire.ShapeType() != TopAbs_WIRE) { - di<<"A null shape or not a wire is used."<<"\n"; + di<<"A null shape or not a wire is used.\n"; return 2; } @@ -864,7 +864,7 @@ static Standard_Integer checkselfintersection face = DBRep::Get(arg2); if (face.IsNull() || face.ShapeType() != TopAbs_FACE) { - di<<"A null shape or not a face is used."<<"\n"; + di<<"A null shape or not a face is used.\n"; return 3; } } @@ -877,7 +877,7 @@ static Standard_Integer checkselfintersection face = mkFace.Face(); else { - di<<"Can't make a face for the wire. Provide please a face for analysis."<<"\n"; + di<<"Can't make a face for the wire. Provide please a face for analysis.\n"; return 4; } } @@ -886,9 +886,9 @@ static Standard_Integer checkselfintersection Standard_Boolean result = analyser.CheckSelfIntersection(); if (result == Standard_True) - di<<"A self-intersecting wire."<<"\n"; + di<<"A self-intersecting wire.\n"; else - di<<"Not self-intersecting wire."<<"\n"; + di<<"Not self-intersecting wire.\n"; return 0; } @@ -896,7 +896,7 @@ static Standard_Integer checkedge(Draw_Interpretor& di, Standard_Integer argc, c { if (argc < 2) { - di<<"Call please \"checkedge edge [face]\""<<"\n"; + di<<"Call please \"checkedge edge [face]\"\n"; return 1; } @@ -905,7 +905,7 @@ static Standard_Integer checkedge(Draw_Interpretor& di, Standard_Integer argc, c TopoDS_Shape edge = DBRep::Get(arg1); if (edge.IsNull() || edge.ShapeType() != TopAbs_EDGE) { - di<<"A null shape or not an edge is used."<<"\n"; + di<<"A null shape or not an edge is used.\n"; return 2; } @@ -917,7 +917,7 @@ static Standard_Integer checkedge(Draw_Interpretor& di, Standard_Integer argc, c face = DBRep::Get(arg2); if (face.IsNull() || face.ShapeType() != TopAbs_FACE) { - di<<"A null shape or not a face is used."<<"\n"; + di<<"A null shape or not a face is used.\n"; return 3; } } diff --git a/src/SWDRAW/SWDRAW_ShapeCustom.cxx b/src/SWDRAW/SWDRAW_ShapeCustom.cxx index 0569c300dc..4037073ec4 100644 --- a/src/SWDRAW/SWDRAW_ShapeCustom.cxx +++ b/src/SWDRAW/SWDRAW_ShapeCustom.cxx @@ -70,15 +70,15 @@ static Standard_Integer ContToInteger( const GeomAbs_Shape Cont) static Standard_Integer directfaces(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if (argc < 3) { di<<"Donner un nom de SHAPE + un nom de RESULTAT"<<"\n"; return 1 /* Error */; } + if (argc < 3) { di<<"Donner un nom de SHAPE + un nom de RESULTAT\n"; return 1 /* Error */; } Standard_CString arg1 = argv[1]; Standard_CString arg2 = argv[2]; TopoDS_Shape Shape = DBRep::Get(arg2); if (Shape.IsNull()) { di<<"Shape unknown : "< Result : "< Result : "< 2 ? argv[2] : NULL); // **** Edge:SameParameter **** - if (argc < 2) { di<<"shapename , option f to force, else only Edges not-SameParameter are computed"<<"\n"; return 1 /* Error */; } + if (argc < 2) { di<<"shapename , option f to force, else only Edges not-SameParameter are computed\n"; return 1 /* Error */; } TopoDS_Shape Shape = DBRep::Get(argv[1]); if (!ShapeFix::SameParameter(Shape, (argc > 2 && arg2[0] == 'f') , BRepBuilderAPI::Precision()) ) - di<<"Some edges were not processed"<<"\n"; + di<<"Some edges were not processed\n"; di<<"\n"; return 0; // Done } @@ -96,11 +96,11 @@ static Standard_Integer edgesameparam (Draw_Interpretor& di, Standard_Integer ar static Standard_Integer settolerance (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<< "myshape val : forces tolerances at "<<"\n" - << "myshape < max : sets maximum tolerance to "<<"\n" - << "myshape > min : sets minimum tolerance to "<<"\n" - << "myshape min max : bounds tolerances between and "<<"\n" - <<"myshape mode=v-e-f other args : idem but only on vertex-edge-face"<<"\n"; + di<< "myshape val : forces tolerances at \n" + << "myshape < max : sets maximum tolerance to \n" + << "myshape > min : sets minimum tolerance to \n" + << "myshape min max : bounds tolerances between and \n" + <<"myshape mode=v-e-f other args : idem but only on vertex-edge-face\n"; return (argc < 2 ? 0 : 1 /* Error */); } Standard_CString arg1 = argv[1]; @@ -140,15 +140,15 @@ static Standard_Integer settolerance (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer stwire (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 2) { // help - di<<"Donner nom shape depart + nom shape resultat + option"<<"\n"; + di<<"Donner nom shape depart + nom shape resultat + option\n"; di<<"Options de chargement : x add connected (sinon add simple)\n" << "Options de traitement : l fix little/BRepBuilderAPI\n" <<"Options de sortie : aucune make simple\n" <<" m MakeAPI r avec reorder v vertex\n" - <<"Autres (se cumulent) : q quid(stats)"<<"\n"; + <<"Autres (se cumulent) : q quid(stats)\n"; return 0; } - if (argc < 4) { di<<"stwire tout court pour help"<<"\n"; return 1 /* Error */; } + if (argc < 4) { di<<"stwire tout court pour help\n"; return 1 /* Error */; } Standard_CString arg1 = argv[1]; Standard_CString arg2 = argv[2]; @@ -170,7 +170,7 @@ static Standard_Integer stwire (Draw_Interpretor& di, Standard_Integer argc, con } } TopoDS_Shape Shape = DBRep::Get(arg1); - if (Shape.IsNull()) { di<FixReorder (WO); // Mais on n execute pas } @@ -282,13 +282,13 @@ static Standard_Integer stwire (Draw_Interpretor& di, Standard_Integer argc, con Standard_Integer stat = sawv.Data (i,pos,upre,ufol); di<= 3 && stat <= 5) di<<"\n - Position : "<WireAPIMake(); else result = sbwd->Wire(); if (result.IsNull()) { - di<<"Pas de resultat, desole"<<"\n"; + di<<"Pas de resultat, desole\n"; return 1; // Fail } DBRep::Set (arg2,result); @@ -338,7 +338,7 @@ static Standard_Integer stwire (Draw_Interpretor& di, Standard_Integer argc, con static Standard_Integer reface (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if (argc < 3) { di<<"Donner un nom de SHAPE (SHELL ou FACE) + un nom de RESULTAT"<<"\n"; return 1 /* Error */; } + if (argc < 3) { di<<"Donner un nom de SHAPE (SHELL ou FACE) + un nom de RESULTAT\n"; return 1 /* Error */; } Standard_CString arg1 = argv[1]; Standard_CString arg2 = argv[2]; TopoDS_Shape Shape = DBRep::Get(arg1); @@ -391,7 +391,7 @@ static Standard_Integer reface (Draw_Interpretor& di, Standard_Integer argc, con DBRep::Set (arg2,resh.Apply (Shape,TopAbs_FACE,2)); return 0; // Done } - else di<<"ShapeFix_Face n a rien trouve a redire"<<"\n"; + else di<<"ShapeFix_Face n a rien trouve a redire\n"; return 0; } @@ -465,20 +465,20 @@ static Standard_Integer fixshape (Draw_Interpretor& di, Standard_Integer argc, c if ( par <2 ) { di << "Use: " << argv[0] << " result shape [tolerance [max_tolerance]] [switches]\n" - "[-maxtaila ] [-maxtailw ]" << "\n"; - di << "Switches allow to tune parameters of ShapeFix" << "\n"; - di << "The following syntax is used: " << "\n"; - di << "- symbol may be - to set parameter off, + to set on or * to set default" << "\n"; - di << "- parameters are identified by letters:" << "\n"; - di << " l - FixLackingMode" << "\n"; - di << " o - FixOrientationMode" << "\n"; - di << " h - FixShiftedMode" << "\n"; - di << " m - FixMissingSeamMode" << "\n"; - di << " d - FixDegeneratedMode" << "\n"; - di << " s - FixSmallMode" << "\n"; - di << " i - FixSelfIntersectionMode" << "\n"; - di << " n - FixNotchedEdgesMode" << "\n"; - di << "For enhanced message output, use switch '+?'" << "\n"; + "[-maxtaila ] [-maxtailw ]\n"; + di << "Switches allow to tune parameters of ShapeFix\n"; + di << "The following syntax is used: \n"; + di << "- symbol may be - to set parameter off, + to set on or * to set default\n"; + di << "- parameters are identified by letters:\n"; + di << " l - FixLackingMode\n"; + di << " o - FixOrientationMode\n"; + di << " h - FixShiftedMode\n"; + di << " m - FixMissingSeamMode\n"; + di << " d - FixDegeneratedMode\n"; + di << " s - FixSmallMode\n"; + di << " i - FixSelfIntersectionMode\n"; + di << " n - FixNotchedEdgesMode\n"; + di << "For enhanced message output, use switch '+?'\n"; return 1; } @@ -546,7 +546,7 @@ Standard_Integer fixgaps(Draw_Interpretor& di, Standard_Integer n, const char** TopoDS_Shape S = DBRep::Get(a[2]); if (S.IsNull()) { - di << " Shape is null" << "\n"; + di << " Shape is null\n"; return 1; } @@ -555,7 +555,7 @@ Standard_Integer fixgaps(Draw_Interpretor& di, Standard_Integer n, const char** SFWF->SetPrecision(prec); if ( SFWF->FixWireGaps() ) { DBRep::Set(a[1],SFWF->Shape()); - di<<" Wireframe gaps fixed on shape"<<"\n"; + di<<" Wireframe gaps fixed on shape\n"; } return 0; @@ -572,7 +572,7 @@ Standard_Integer fixsmall(Draw_Interpretor& di, Standard_Integer n, const char** TopoDS_Shape S = DBRep::Get(a[2]); if (S.IsNull()) { - di << " Shape is null" << "\n"; + di << " Shape is null\n"; return 1; } @@ -582,7 +582,7 @@ Standard_Integer fixsmall(Draw_Interpretor& di, Standard_Integer n, const char** if (SFWF.FixSmallEdges()) { DBRep::Set(a[1],SFWF.Shape()); - di<<" Small edges fixed on shape"<<"\n"; + di<<" Small edges fixed on shape\n"; } return 0; @@ -596,7 +596,7 @@ Standard_Integer fixsmall(Draw_Interpretor& di, Standard_Integer n, const char** static Standard_Integer fixsmalledges(Draw_Interpretor& di, Standard_Integer n, const char** a) { if( n < 3) { - di<<"Invalid number of arguments"<<"\n"; + di<<"Invalid number of arguments\n"; return 1; } TopoDS_Shape Sh = DBRep::Get(a[2]); @@ -641,19 +641,19 @@ static Standard_Integer fixsmalledges(Draw_Interpretor& di, Standard_Integer n, static Standard_Integer checkoverlapedges(Draw_Interpretor& di, Standard_Integer n, const char** a) { if( n < 3) { - di<<"Invalid number of arguments"<<"\n"; + di<<"Invalid number of arguments\n"; return 1; } TopoDS_Shape Sh1 = DBRep::Get(a[1]); TopoDS_Shape Sh2 = DBRep::Get(a[2]); if(Sh1.IsNull() || Sh2.IsNull()) { - di<<"Invalid arguments"<<"\n"; + di<<"Invalid arguments\n"; return 1; } TopoDS_Edge e1 = TopoDS::Edge(Sh1); TopoDS_Edge e2 = TopoDS::Edge(Sh2); if(e1.IsNull() || e2.IsNull()) { - di<<"Invalid type of arguments"<<"\n"; + di<<"Invalid type of arguments\n"; return 1; } @@ -680,14 +680,14 @@ static Standard_Integer checkoverlapedges(Draw_Interpretor& di, Standard_Integer ShapeAnalysis_Edge sae; if(sae.CheckOverlapping(e1,e2,aTol,aDistDomain)) { if(aDistDomain ==0.0) - di<<"Edges is overlaping comletly"<<"\n"; + di<<"Edges is overlaping comletly\n"; else { - di<<"Edges is overlaped"<<"\n"; + di<<"Edges is overlaped\n"; di<<"with tolerance = "<Length() ; i++) { TopoDS_Shape aW = aSeqWires->Value(i); - di<<"Wire - "<Result(); // seq.PrintPreparationResult (); if ( result.IsNull() ) { - di << "No result" << "\n"; + di << "No result\n"; } else if ( result == Shape ) { - di << "Shape not modified" << "\n"; + di << "Shape not modified\n"; } DBRep::Set (arg1,result); return 0; diff --git a/src/SWDRAW/SWDRAW_ShapeProcessAPI.cxx b/src/SWDRAW/SWDRAW_ShapeProcessAPI.cxx index 9a1f281b6f..28751b6dc8 100644 --- a/src/SWDRAW/SWDRAW_ShapeProcessAPI.cxx +++ b/src/SWDRAW/SWDRAW_ShapeProcessAPI.cxx @@ -29,7 +29,7 @@ //======================================================================= static Standard_Integer ApplySequence(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if (argc < 4) { di<<"Specify result, shape, resource name and prefix (optional)"<<"\n"; return 1 /* Error */; } + if (argc < 4) { di<<"Specify result, shape, resource name and prefix (optional)\n"; return 1 /* Error */; } Standard_CString arg1 = argv[1]; Standard_CString arg2 = argv[2]; Standard_CString arg3 = argv[3]; diff --git a/src/SWDRAW/SWDRAW_ShapeTool.cxx b/src/SWDRAW/SWDRAW_ShapeTool.cxx index d92b161e93..25490490f3 100644 --- a/src/SWDRAW/SWDRAW_ShapeTool.cxx +++ b/src/SWDRAW/SWDRAW_ShapeTool.cxx @@ -57,10 +57,10 @@ static Standard_Integer XSHAPE_edge (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if (argc < 2) { di<<"donner un nom de shape"<<"\n"; return 1 /* Error */; } + if (argc < 2) { di<<"donner un nom de shape\n"; return 1 /* Error */; } Standard_CString arg1 = argv[1]; TopoDS_Shape Shape = DBRep::Get(arg1); - if (Shape.IsNull()) { di< 2) { @@ -106,11 +106,11 @@ static Standard_Integer XSHAPE_explorewire } int* nbs = new int[nbe+1]; for (i = 0; i <= nbe; i ++) nbs[i] = 0; - di<<"TopoDS_Iterator(EDGE) donne "< 1 fois en MULTWE_num"<<"\n"; - if (nbs[0] > 0) di<<"NB : Edge n0 0 comptee "< 1 fois en MULTWE_num\n"; + if (nbs[0] > 0) di<<"NB : Edge n0 0 comptee "< 1) { - di<<"Edge n0 "< Freeing"<<"\n"; + di<<"Shape non Free -> Freeing\n"; Shape.Free(Standard_True); } TopoDS_Shell sh = TopoDS::Shell (Shape); @@ -171,7 +171,7 @@ static Standard_Integer XSHAPE_ssolid if (bsc3d.State() == TopAbs_IN) { // Ensuite, inverser C-A-D REPRENDRE LES SHELLS // (l inversion du solide n est pas bien prise en compte) - di<<"NB : Shell to be reversed"<<"\n"; + di<<"NB : Shell to be reversed\n"; TopoDS_Solid soli2; B.MakeSolid (soli2); // on recommence sh.Reverse(); @@ -190,7 +190,7 @@ static Standard_Integer XSHAPE_edgeregul Standard_Real tolang = Precision::Angular(); // = Interface_Static::RVal("XSTEP.encoderegularity.angle"); // if (argc < 3) di<<"Current value for regularity angle : "< samerange shape" << "\n"; - di << "or" << "\n"; - di << "> samerange newcurve curve2d first last newfirst newlast" << "\n"; + di << "Apply BRepLib::SameRange() to shape or GeomLib::SameRange() to pcurve:\n"; + di << "> samerange shape\n"; + di << "or\n"; + di << "> samerange newcurve curve2d first last newfirst newlast\n"; } return 0; diff --git a/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx b/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx index d4f9bd4e5b..c7a7e5a227 100644 --- a/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx +++ b/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx @@ -93,14 +93,14 @@ static Standard_Integer DT_ShapeDivide (Draw_Interpretor& di, // a[n-1]= Tolerance if (n<3) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } // try to read a shape: TopoDS_Shape inputShape=DBRep::Get(a[2]); if (inputShape.IsNull()) { - di << "Unknown shape"<< "\n"; + di << "Unknown shape\n"; return 1; } // a[2] is a shape. managing: @@ -120,23 +120,23 @@ static Standard_Integer DT_ShapeDivide (Draw_Interpretor& di, tool.Perform(); TopoDS_Shape res = tool.Result(); - if ( tool.Status ( ShapeExtend_OK ) ) di << "Status: OK" << "\n"; - if ( tool.Status ( ShapeExtend_DONE1 ) ) di << "Status: DONE1" << "\n"; - if ( tool.Status ( ShapeExtend_DONE2 ) ) di << "Status: DONE2" << "\n"; - if ( tool.Status ( ShapeExtend_DONE3 ) ) di << "Status: DONE3" << "\n"; - if ( tool.Status ( ShapeExtend_DONE4 ) ) di << "Status: DONE4" << "\n"; - if ( tool.Status ( ShapeExtend_DONE5 ) ) di << "Status: DONE5" << "\n"; - if ( tool.Status ( ShapeExtend_DONE6 ) ) di << "Status: DONE6" << "\n"; - if ( tool.Status ( ShapeExtend_DONE7 ) ) di << "Status: DONE7" << "\n"; - if ( tool.Status ( ShapeExtend_DONE8 ) ) di << "Status: DONE8" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL1 ) ) di << "Status: FAIL1" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL2 ) ) di << "Status: FAIL2" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL3 ) ) di << "Status: FAIL3" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL4 ) ) di << "Status: FAIL4" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL5 ) ) di << "Status: FAIL5" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL6 ) ) di << "Status: FAIL6" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL7 ) ) di << "Status: FAIL7" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL8 ) ) di << "Status: FAIL8" << "\n"; + if ( tool.Status ( ShapeExtend_OK ) ) di << "Status: OK\n"; + if ( tool.Status ( ShapeExtend_DONE1 ) ) di << "Status: DONE1\n"; + if ( tool.Status ( ShapeExtend_DONE2 ) ) di << "Status: DONE2\n"; + if ( tool.Status ( ShapeExtend_DONE3 ) ) di << "Status: DONE3\n"; + if ( tool.Status ( ShapeExtend_DONE4 ) ) di << "Status: DONE4\n"; + if ( tool.Status ( ShapeExtend_DONE5 ) ) di << "Status: DONE5\n"; + if ( tool.Status ( ShapeExtend_DONE6 ) ) di << "Status: DONE6\n"; + if ( tool.Status ( ShapeExtend_DONE7 ) ) di << "Status: DONE7\n"; + if ( tool.Status ( ShapeExtend_DONE8 ) ) di << "Status: DONE8\n"; + if ( tool.Status ( ShapeExtend_FAIL1 ) ) di << "Status: FAIL1\n"; + if ( tool.Status ( ShapeExtend_FAIL2 ) ) di << "Status: FAIL2\n"; + if ( tool.Status ( ShapeExtend_FAIL3 ) ) di << "Status: FAIL3\n"; + if ( tool.Status ( ShapeExtend_FAIL4 ) ) di << "Status: FAIL4\n"; + if ( tool.Status ( ShapeExtend_FAIL5 ) ) di << "Status: FAIL5\n"; + if ( tool.Status ( ShapeExtend_FAIL6 ) ) di << "Status: FAIL6\n"; + if ( tool.Status ( ShapeExtend_FAIL7 ) ) di << "Status: FAIL7\n"; + if ( tool.Status ( ShapeExtend_FAIL8 ) ) di << "Status: FAIL8\n"; // fixes @@ -150,23 +150,23 @@ static Standard_Integer DT_ShapeConvertRev (Draw_Interpretor& di, Standard_Integer n, const char** a) { if (n<5) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } // try to read a shape: TopoDS_Shape inputShape=DBRep::Get(a[2]); if (inputShape.IsNull()) { - di << "Unknown shape"<< "\n"; + di << "Unknown shape\n"; return 1; } Standard_Integer c2d = Draw::Atoi(a[3]); Standard_Integer c3d = Draw::Atoi(a[4]); TopoDS_Shape revsh = ShapeCustom::ConvertToRevolution (inputShape); - if (revsh.IsNull()) { di<<"NO RESULT"<<"\n"; return 1; } - else if (revsh == inputShape) { di<<"No modif"<<"\n";} - else di<<"ConvertToRevolution -> Result : "<<"\n"; + if (revsh.IsNull()) { di<<"NO RESULT\n"; return 1; } + else if (revsh == inputShape) { di<<"No modif\n";} + else di<<"ConvertToRevolution -> Result : \n"; ShapeUpgrade_ShapeConvertToBezier tool(revsh); tool.SetSurfaceConversion(Standard_True); @@ -184,23 +184,23 @@ static Standard_Integer DT_ShapeConvertRev (Draw_Interpretor& di, tool.Perform(); TopoDS_Shape res = tool.Result(); - if ( tool.Status ( ShapeExtend_OK ) ) di << "Status: OK" << "\n"; - if ( tool.Status ( ShapeExtend_DONE1 ) ) di << "Status: DONE1" << "\n"; - if ( tool.Status ( ShapeExtend_DONE2 ) ) di << "Status: DONE2" << "\n"; - if ( tool.Status ( ShapeExtend_DONE3 ) ) di << "Status: DONE3" << "\n"; - if ( tool.Status ( ShapeExtend_DONE4 ) ) di << "Status: DONE4" << "\n"; - if ( tool.Status ( ShapeExtend_DONE5 ) ) di << "Status: DONE5" << "\n"; - if ( tool.Status ( ShapeExtend_DONE6 ) ) di << "Status: DONE6" << "\n"; - if ( tool.Status ( ShapeExtend_DONE7 ) ) di << "Status: DONE7" << "\n"; - if ( tool.Status ( ShapeExtend_DONE8 ) ) di << "Status: DONE8" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL1 ) ) di << "Status: FAIL1" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL2 ) ) di << "Status: FAIL2" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL3 ) ) di << "Status: FAIL3" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL4 ) ) di << "Status: FAIL4" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL5 ) ) di << "Status: FAIL5" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL6 ) ) di << "Status: FAIL6" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL7 ) ) di << "Status: FAIL7" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL8 ) ) di << "Status: FAIL8" << "\n"; + if ( tool.Status ( ShapeExtend_OK ) ) di << "Status: OK\n"; + if ( tool.Status ( ShapeExtend_DONE1 ) ) di << "Status: DONE1\n"; + if ( tool.Status ( ShapeExtend_DONE2 ) ) di << "Status: DONE2\n"; + if ( tool.Status ( ShapeExtend_DONE3 ) ) di << "Status: DONE3\n"; + if ( tool.Status ( ShapeExtend_DONE4 ) ) di << "Status: DONE4\n"; + if ( tool.Status ( ShapeExtend_DONE5 ) ) di << "Status: DONE5\n"; + if ( tool.Status ( ShapeExtend_DONE6 ) ) di << "Status: DONE6\n"; + if ( tool.Status ( ShapeExtend_DONE7 ) ) di << "Status: DONE7\n"; + if ( tool.Status ( ShapeExtend_DONE8 ) ) di << "Status: DONE8\n"; + if ( tool.Status ( ShapeExtend_FAIL1 ) ) di << "Status: FAIL1\n"; + if ( tool.Status ( ShapeExtend_FAIL2 ) ) di << "Status: FAIL2\n"; + if ( tool.Status ( ShapeExtend_FAIL3 ) ) di << "Status: FAIL3\n"; + if ( tool.Status ( ShapeExtend_FAIL4 ) ) di << "Status: FAIL4\n"; + if ( tool.Status ( ShapeExtend_FAIL5 ) ) di << "Status: FAIL5\n"; + if ( tool.Status ( ShapeExtend_FAIL6 ) ) di << "Status: FAIL6\n"; + if ( tool.Status ( ShapeExtend_FAIL7 ) ) di << "Status: FAIL7\n"; + if ( tool.Status ( ShapeExtend_FAIL8 ) ) di << "Status: FAIL8\n"; // fixes @@ -218,7 +218,7 @@ static Standard_Integer DT_ShapeConvertRev (Draw_Interpretor& di, TopoDS_Face inputFace = TopoDS::Face(inputShape); if (inputFace.IsNull()) { - di << a[2] << " is not a face" << "\n"; + di << a[2] << " is not a face\n"; return 1; } @@ -238,21 +238,21 @@ static Standard_Integer DT_ShapeConvertRev (Draw_Interpretor& di, ShapeUpgrade_Error theError=theTool.Error(); di << "Not done: error="; if (theError==ShapeUpgrade_Done) - di << "Done"<<"\n"; + di << "Done\n"; else if (theError==ShapeUpgrade_NotDone) - di << "NotDone"<<"\n"; + di << "NotDone\n"; else if (theError==ShapeUpgrade_EmptyShell) - di << "EmptyShell"<<"\n"; + di << "EmptyShell\n"; else if (theError==ShapeUpgrade_InvalidCriterion) - di << "InvalidCriterion"<<"\n"; + di << "InvalidCriterion\n"; else if (theError==ShapeUpgrade_InvalidGridSurface) - di << "InvalidGridSurface"<<"\n"; + di << "InvalidGridSurface\n"; else if (theError==ShapeUpgrade_DegeneratedEdge) - di << "DegeneratedEdge"<<"\n"; + di << "DegeneratedEdge\n"; else if (theError==ShapeUpgrade_NoSurface) - di << "NoSurface"<<"\n"; + di << "NoSurface\n"; else if (theError==ShapeUpgrade_NoTolerance) - di << "NoTolerance"<<"\n"; + di << "NoTolerance\n"; return 1; } TopoDS_Shell res = theTool.Shell(); @@ -281,7 +281,7 @@ static Standard_Integer DT_ShapeConvertRev (Draw_Interpretor& di, if (n>=5) { TopoDS_Shape inputBoundary=DBRep::Get(a[3]); if (inputBoundary.IsNull()) { - di << "Invalid Boundary" << "\n"; + di << "Invalid Boundary\n"; return 1; } TopoDS_Wire WireBoundary = TopoDS::Wire(inputBoundary); @@ -289,7 +289,7 @@ static Standard_Integer DT_ShapeConvertRev (Draw_Interpretor& di, // DT_ShapeDivide result Surface Wire Surf Tol Handle(Geom_Surface) WireSupport = DrawTrSurf::GetSurface(a[4]); if (WireSupport.IsNull()) { - di << "Invalid Surface supporting the Wire" << "\n"; + di << "Invalid Surface supporting the Wire\n"; return 1; } theTool.SetBoundary(WireBoundary, WireSupport); @@ -307,14 +307,14 @@ static Standard_Integer DT_ShapeConvertRev (Draw_Interpretor& di, // DT_ShapeDivide result NbU NbV {Surf_u_v...} Face Tol // DT_ShapeDivide result NbU NbV {Surf_u_v...} Wire Surf Tol if (n<6) { - di << "bad number of arguments for grid input" <<"\n"; + di << "bad number of arguments for grid input\n"; return 1; } // number of surf: Standard_Integer NbU=Draw::Atoi(a[2]); Standard_Integer NbV=Draw::Atoi(a[3]); if (n < 4+NbU*NbV+1) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } @@ -333,7 +333,7 @@ static Standard_Integer DT_ShapeConvertRev (Draw_Interpretor& di, if (n>=6+NbU*NbV) { TopoDS_Shape inputBoundary=DBRep::Get(a[4+NbU*NbV]); if (inputBoundary.IsNull()) { - di << "Invalid Boundary" << "\n"; + di << "Invalid Boundary\n"; return 1; } TopoDS_Wire WireBoundary = TopoDS::Wire(inputBoundary); @@ -341,7 +341,7 @@ static Standard_Integer DT_ShapeConvertRev (Draw_Interpretor& di, // DT_ShapeDivide result Surface Wire Surf Tol Handle(Geom_Surface) WireSupport = DrawTrSurf::GetSurface(a[4+NbU*NbV+1]); if (WireSupport.IsNull()) { - di << "Invalid Surface supporting the Wire" << "\n"; + di << "Invalid Surface supporting the Wire\n"; return 1; } theTool.SetBoundary(WireBoundary, WireSupport); @@ -359,21 +359,21 @@ static Standard_Integer DT_ShapeConvertRev (Draw_Interpretor& di, ShapeUpgrade_Error theError=theTool.Error(); di << "Not done: error="; if (theError==ShapeUpgrade_Done) - di << "Done"<<"\n"; + di << "Done\n"; else if (theError==ShapeUpgrade_NotDone) - di << "NotDone"<<"\n"; + di << "NotDone\n"; else if (theError==ShapeUpgrade_EmptyShell) - di << "EmptyShell"<<"\n"; + di << "EmptyShell\n"; else if (theError==ShapeUpgrade_InvalidCriterion) - di << "InvalidCriterion"<<"\n"; + di << "InvalidCriterion\n"; else if (theError==ShapeUpgrade_InvalidGridSurface) - di << "InvalidGridSurface"<<"\n"; + di << "InvalidGridSurface\n"; else if (theError==ShapeUpgrade_DegeneratedEdge) - di << "DegeneratedEdge"<<"\n"; + di << "DegeneratedEdge\n"; else if (theError==ShapeUpgrade_NoSurface) - di << "NoSurface"<<"\n"; + di << "NoSurface\n"; else if (theError==ShapeUpgrade_NoTolerance) - di << "NoTolerance"<<"\n"; + di << "NoTolerance\n"; return 1; } @@ -388,14 +388,14 @@ static Standard_Integer DT_ShapeConvert (Draw_Interpretor& di, Standard_Integer n, const char** a) { if (n<5) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } // try to read a shape: TopoDS_Shape inputShape=DBRep::Get(a[2]); if (inputShape.IsNull()) { - di << "Unknown shape"<< "\n"; + di << "Unknown shape\n"; return 1; } @@ -411,23 +411,23 @@ static Standard_Integer DT_ShapeConvert (Draw_Interpretor& di, tool.Perform(); TopoDS_Shape res = tool.Result(); - if ( tool.Status ( ShapeExtend_OK ) ) di << "Status: OK" << "\n"; - if ( tool.Status ( ShapeExtend_DONE1 ) ) di << "Status: DONE1" << "\n"; - if ( tool.Status ( ShapeExtend_DONE2 ) ) di << "Status: DONE2" << "\n"; - if ( tool.Status ( ShapeExtend_DONE3 ) ) di << "Status: DONE3" << "\n"; - if ( tool.Status ( ShapeExtend_DONE4 ) ) di << "Status: DONE4" << "\n"; - if ( tool.Status ( ShapeExtend_DONE5 ) ) di << "Status: DONE5" << "\n"; - if ( tool.Status ( ShapeExtend_DONE6 ) ) di << "Status: DONE6" << "\n"; - if ( tool.Status ( ShapeExtend_DONE7 ) ) di << "Status: DONE7" << "\n"; - if ( tool.Status ( ShapeExtend_DONE8 ) ) di << "Status: DONE8" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL1 ) ) di << "Status: FAIL1" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL2 ) ) di << "Status: FAIL2" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL3 ) ) di << "Status: FAIL3" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL4 ) ) di << "Status: FAIL4" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL5 ) ) di << "Status: FAIL5" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL6 ) ) di << "Status: FAIL6" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL7 ) ) di << "Status: FAIL7" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL8 ) ) di << "Status: FAIL8" << "\n"; + if ( tool.Status ( ShapeExtend_OK ) ) di << "Status: OK\n"; + if ( tool.Status ( ShapeExtend_DONE1 ) ) di << "Status: DONE1\n"; + if ( tool.Status ( ShapeExtend_DONE2 ) ) di << "Status: DONE2\n"; + if ( tool.Status ( ShapeExtend_DONE3 ) ) di << "Status: DONE3\n"; + if ( tool.Status ( ShapeExtend_DONE4 ) ) di << "Status: DONE4\n"; + if ( tool.Status ( ShapeExtend_DONE5 ) ) di << "Status: DONE5\n"; + if ( tool.Status ( ShapeExtend_DONE6 ) ) di << "Status: DONE6\n"; + if ( tool.Status ( ShapeExtend_DONE7 ) ) di << "Status: DONE7\n"; + if ( tool.Status ( ShapeExtend_DONE8 ) ) di << "Status: DONE8\n"; + if ( tool.Status ( ShapeExtend_FAIL1 ) ) di << "Status: FAIL1\n"; + if ( tool.Status ( ShapeExtend_FAIL2 ) ) di << "Status: FAIL2\n"; + if ( tool.Status ( ShapeExtend_FAIL3 ) ) di << "Status: FAIL3\n"; + if ( tool.Status ( ShapeExtend_FAIL4 ) ) di << "Status: FAIL4\n"; + if ( tool.Status ( ShapeExtend_FAIL5 ) ) di << "Status: FAIL5\n"; + if ( tool.Status ( ShapeExtend_FAIL6 ) ) di << "Status: FAIL6\n"; + if ( tool.Status ( ShapeExtend_FAIL7 ) ) di << "Status: FAIL7\n"; + if ( tool.Status ( ShapeExtend_FAIL8 ) ) di << "Status: FAIL8\n"; // fixes @@ -440,13 +440,13 @@ static Standard_Integer DT_SplitAngle(Draw_Interpretor& di, Standard_Integer n, const char** a) { if (n<3) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } TopoDS_Shape inputShape=DBRep::Get(a[2]); if (inputShape.IsNull()) { - di << "Unknown shape"<< "\n"; + di << "Unknown shape\n"; return 1; } @@ -460,23 +460,23 @@ static Standard_Integer DT_SplitAngle(Draw_Interpretor& di, tool.Perform(); TopoDS_Shape res = tool.Result(); - if ( tool.Status ( ShapeExtend_OK ) ) di << "Status: OK" << "\n"; - if ( tool.Status ( ShapeExtend_DONE1 ) ) di << "Status: DONE1" << "\n"; - if ( tool.Status ( ShapeExtend_DONE2 ) ) di << "Status: DONE2" << "\n"; - if ( tool.Status ( ShapeExtend_DONE3 ) ) di << "Status: DONE3" << "\n"; - if ( tool.Status ( ShapeExtend_DONE4 ) ) di << "Status: DONE4" << "\n"; - if ( tool.Status ( ShapeExtend_DONE5 ) ) di << "Status: DONE5" << "\n"; - if ( tool.Status ( ShapeExtend_DONE6 ) ) di << "Status: DONE6" << "\n"; - if ( tool.Status ( ShapeExtend_DONE7 ) ) di << "Status: DONE7" << "\n"; - if ( tool.Status ( ShapeExtend_DONE8 ) ) di << "Status: DONE8" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL1 ) ) di << "Status: FAIL1" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL2 ) ) di << "Status: FAIL2" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL3 ) ) di << "Status: FAIL3" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL4 ) ) di << "Status: FAIL4" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL5 ) ) di << "Status: FAIL5" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL6 ) ) di << "Status: FAIL6" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL7 ) ) di << "Status: FAIL7" << "\n"; - if ( tool.Status ( ShapeExtend_FAIL8 ) ) di << "Status: FAIL8" << "\n"; + if ( tool.Status ( ShapeExtend_OK ) ) di << "Status: OK\n"; + if ( tool.Status ( ShapeExtend_DONE1 ) ) di << "Status: DONE1\n"; + if ( tool.Status ( ShapeExtend_DONE2 ) ) di << "Status: DONE2\n"; + if ( tool.Status ( ShapeExtend_DONE3 ) ) di << "Status: DONE3\n"; + if ( tool.Status ( ShapeExtend_DONE4 ) ) di << "Status: DONE4\n"; + if ( tool.Status ( ShapeExtend_DONE5 ) ) di << "Status: DONE5\n"; + if ( tool.Status ( ShapeExtend_DONE6 ) ) di << "Status: DONE6\n"; + if ( tool.Status ( ShapeExtend_DONE7 ) ) di << "Status: DONE7\n"; + if ( tool.Status ( ShapeExtend_DONE8 ) ) di << "Status: DONE8\n"; + if ( tool.Status ( ShapeExtend_FAIL1 ) ) di << "Status: FAIL1\n"; + if ( tool.Status ( ShapeExtend_FAIL2 ) ) di << "Status: FAIL2\n"; + if ( tool.Status ( ShapeExtend_FAIL3 ) ) di << "Status: FAIL3\n"; + if ( tool.Status ( ShapeExtend_FAIL4 ) ) di << "Status: FAIL4\n"; + if ( tool.Status ( ShapeExtend_FAIL5 ) ) di << "Status: FAIL5\n"; + if ( tool.Status ( ShapeExtend_FAIL6 ) ) di << "Status: FAIL6\n"; + if ( tool.Status ( ShapeExtend_FAIL7 ) ) di << "Status: FAIL7\n"; + if ( tool.Status ( ShapeExtend_FAIL8 ) ) di << "Status: FAIL8\n"; // fixes @@ -502,7 +502,7 @@ static Standard_Integer DT_PlaneDividedFace (Draw_Interpretor& di, // a[3]= Tolerance if (n !=4) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } @@ -510,7 +510,7 @@ static Standard_Integer DT_PlaneDividedFace (Draw_Interpretor& di, TopoDS_Shape inputShape=DBRep::Get(a[2]); TopoDS_Face inputFace = TopoDS::Face(inputShape); if (inputFace.IsNull()) { - di << a[2] << " is not a face" << "\n"; + di << a[2] << " is not a face\n"; return 1; } @@ -520,7 +520,7 @@ static Standard_Integer DT_PlaneDividedFace (Draw_Interpretor& di, //theTool.SetTolerance(Tol); theTool.Build(); if (!theTool.IsDone()) { - di << "Not done" << "\n"; + di << "Not done\n"; return 1; } @@ -555,7 +555,7 @@ static Standard_Integer DT_PlaneGridShell (Draw_Interpretor& di, Standard_Integer NbU=Draw::Atoi(a[2]); Standard_Integer NbV=Draw::Atoi(a[3]); if (n != 4+NbU+NbV+1) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } @@ -595,21 +595,21 @@ static Standard_Integer DT_PlaneFaceCommon (Draw_Interpretor& di, // a[3]= input Shell if (n !=4) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } TopoDS_Shape inputShape= DBRep::Get(a[2]); TopoDS_Face inputFace = TopoDS::Face(inputShape); if (inputFace.IsNull()) { - di << a[2] << " is not a face" << "\n"; + di << a[2] << " is not a face\n"; return 1; } inputShape = DBRep::Get(a[3]); TopoDS_Shell inputShell = TopoDS::Shell(inputShape); if (inputShell.IsNull()) { - di << a[3] << " is not a shell" << "\n"; + di << a[3] << " is not a shell\n"; return 1; } @@ -636,7 +636,7 @@ static Standard_Integer DT_SplitCurve (Draw_Interpretor& di, // a[2]= Tolerance if (n < 3) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } @@ -681,7 +681,7 @@ static Standard_Integer DT_SplitCurve2d (Draw_Interpretor& di, // a[2]= Tolerance if (n < 3) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } @@ -724,18 +724,18 @@ static Standard_Integer DT_SplitWire (Draw_Interpretor& di, { if (n <3) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } TopoDS_Face source = TopoDS::Face(DBRep::Get(a[2])); if(source.IsNull()) { - di <<"Shape is not face"<<"\n"; + di <<"Shape is not face\n"; return 1; } TopoDS_Iterator wi(source); if(!wi.More()) { - di <<"Shape is face without wire"<<"\n"; + di <<"Shape is face without wire\n"; return 1; } @@ -758,13 +758,13 @@ static Standard_Integer DT_SplitFace (Draw_Interpretor& di, { if (n <3) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } TopoDS_Face source = TopoDS::Face(DBRep::Get(a[2])); if(source.IsNull()) { - di <<"Shape is not face"<<"\n"; + di <<"Shape is not face\n"; return 1; } Handle(ShapeUpgrade_ShapeDivideContinuity) tool = new ShapeUpgrade_FaceDivideContinuity; @@ -779,23 +779,23 @@ static Standard_Integer DT_SplitFace (Draw_Interpretor& di, TopoDS_Shape result = tool->Result(); - if ( tool->Status ( ShapeExtend_OK ) ) di << "Status: OK" << "\n"; - if ( tool->Status ( ShapeExtend_DONE1 ) ) di << "Status: DONE1" << "\n"; - if ( tool->Status ( ShapeExtend_DONE2 ) ) di << "Status: DONE2" << "\n"; - if ( tool->Status ( ShapeExtend_DONE3 ) ) di << "Status: DONE3" << "\n"; - if ( tool->Status ( ShapeExtend_DONE4 ) ) di << "Status: DONE4" << "\n"; - if ( tool->Status ( ShapeExtend_DONE5 ) ) di << "Status: DONE5" << "\n"; - if ( tool->Status ( ShapeExtend_DONE6 ) ) di << "Status: DONE6" << "\n"; - if ( tool->Status ( ShapeExtend_DONE7 ) ) di << "Status: DONE7" << "\n"; - if ( tool->Status ( ShapeExtend_DONE8 ) ) di << "Status: DONE8" << "\n"; - if ( tool->Status ( ShapeExtend_FAIL1 ) ) di << "Status: FAIL1" << "\n"; - if ( tool->Status ( ShapeExtend_FAIL2 ) ) di << "Status: FAIL2" << "\n"; - if ( tool->Status ( ShapeExtend_FAIL3 ) ) di << "Status: FAIL3" << "\n"; - if ( tool->Status ( ShapeExtend_FAIL4 ) ) di << "Status: FAIL4" << "\n"; - if ( tool->Status ( ShapeExtend_FAIL5 ) ) di << "Status: FAIL5" << "\n"; - if ( tool->Status ( ShapeExtend_FAIL6 ) ) di << "Status: FAIL6" << "\n"; - if ( tool->Status ( ShapeExtend_FAIL7 ) ) di << "Status: FAIL7" << "\n"; - if ( tool->Status ( ShapeExtend_FAIL8 ) ) di << "Status: FAIL8" << "\n"; + if ( tool->Status ( ShapeExtend_OK ) ) di << "Status: OK\n"; + if ( tool->Status ( ShapeExtend_DONE1 ) ) di << "Status: DONE1\n"; + if ( tool->Status ( ShapeExtend_DONE2 ) ) di << "Status: DONE2\n"; + if ( tool->Status ( ShapeExtend_DONE3 ) ) di << "Status: DONE3\n"; + if ( tool->Status ( ShapeExtend_DONE4 ) ) di << "Status: DONE4\n"; + if ( tool->Status ( ShapeExtend_DONE5 ) ) di << "Status: DONE5\n"; + if ( tool->Status ( ShapeExtend_DONE6 ) ) di << "Status: DONE6\n"; + if ( tool->Status ( ShapeExtend_DONE7 ) ) di << "Status: DONE7\n"; + if ( tool->Status ( ShapeExtend_DONE8 ) ) di << "Status: DONE8\n"; + if ( tool->Status ( ShapeExtend_FAIL1 ) ) di << "Status: FAIL1\n"; + if ( tool->Status ( ShapeExtend_FAIL2 ) ) di << "Status: FAIL2\n"; + if ( tool->Status ( ShapeExtend_FAIL3 ) ) di << "Status: FAIL3\n"; + if ( tool->Status ( ShapeExtend_FAIL4 ) ) di << "Status: FAIL4\n"; + if ( tool->Status ( ShapeExtend_FAIL5 ) ) di << "Status: FAIL5\n"; + if ( tool->Status ( ShapeExtend_FAIL6 ) ) di << "Status: FAIL6\n"; + if ( tool->Status ( ShapeExtend_FAIL7 ) ) di << "Status: FAIL7\n"; + if ( tool->Status ( ShapeExtend_FAIL8 ) ) di << "Status: FAIL8\n"; // fixes @@ -821,7 +821,7 @@ static Standard_Integer DT_SplitSurface (Draw_Interpretor& di, // a[4+nbU*nbV]= Tolerance if (n <4) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } @@ -835,7 +835,7 @@ static Standard_Integer DT_SplitSurface (Draw_Interpretor& di, /* if ( GS.IsNull()) { // Case of composite grid surface - di << "composite surf" << "\n"; + di << "composite surf\n"; Standard_Integer nbU=Draw::Atoi(a[2]); Standard_Integer nbV=Draw::Atoi(a[3]); if (nbU==0 || nbV==0) return 1; @@ -847,14 +847,14 @@ static Standard_Integer DT_SplitSurface (Draw_Interpretor& di, theGrid->SetValue(iu,iv,GS); } } - di << "appel a SplitSurface::Init" << "\n"; + di << "appel a SplitSurface::Init\n"; theTool->Init(theGrid); } else {*/ // Case of single surface - di << "single surf" << "\n"; + di << "single surf\n"; - di << "appel a SplitSurface::Init" << "\n"; + di << "appel a SplitSurface::Init\n"; theTool->Init(GS); if(Split ==1) { Handle(TColStd_HSequenceOfReal) spval = new TColStd_HSequenceOfReal; @@ -863,10 +863,10 @@ static Standard_Integer DT_SplitSurface (Draw_Interpretor& di, theTool->SetVSplitValues(spval); } - di << "appel a SplitSurface::Build" << "\n"; + di << "appel a SplitSurface::Build\n"; theTool->Build(Standard_True); - di << "appel a SplitSurface::GlobalU/VKnots" << "\n"; + di << "appel a SplitSurface::GlobalU/VKnots\n"; Handle(ShapeExtend_CompositeSurface) Grid = theTool->ResSurfaces(); Handle(TColStd_HArray1OfReal) GlobalU=Grid->UJointValues(); Handle(TColStd_HArray1OfReal) GlobalV=Grid->VJointValues(); @@ -881,10 +881,10 @@ static Standard_Integer DT_SplitSurface (Draw_Interpretor& di, di <<" "<< GlobalV->Value(iv); di <<"\n"; -di << "appel a Surfaces" << "\n"; +di << "appel a Surfaces\n"; Handle(TColGeom_HArray2OfSurface) theSurfaces= Grid->Patches(); -di << "transfert resultat" << "\n"; +di << "transfert resultat\n"; Standard_Integer NbRow=theSurfaces->ColLength(); Standard_Integer NbCol=theSurfaces->RowLength(); for (Standard_Integer irow=1; irow<=NbRow; irow++) { @@ -909,7 +909,7 @@ static Standard_Integer offset2dcurve (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"result + curve + offset"<<"\n"; + di<<"result + curve + offset\n"; return 1 /* Error */; } @@ -932,7 +932,7 @@ static Standard_Integer offsetcurve (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 5) { - di<<"result + curve + offset + Dir"<<"\n"; + di<<"result + curve + offset + Dir\n"; return 1 /* Error */; } @@ -957,14 +957,14 @@ static Standard_Integer splitface (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 5) { - di << "Split face: splitface result face [u usplit1 usplit2...] [v vsplit1 vsplit2 ...]" << "\n"; + di << "Split face: splitface result face [u usplit1 usplit2...] [v vsplit1 vsplit2 ...]\n"; return 1; } TopoDS_Shape aLocalShape = DBRep::Get(argv[2]) ; TopoDS_Face face = TopoDS::Face ( aLocalShape ); if ( face.IsNull() ) { - di << argv[2] << " is not Face" << "\n"; + di << argv[2] << " is not Face\n"; return 1; } @@ -1006,21 +1006,21 @@ static Standard_Integer splitface Standard_Real val = Draw::Atof ( argv[i] ); TColStd_SequenceOfReal &vals = ( byV ? vval : uval ); if ( vals.Length() >0 && val - vals.Last() < Precision::PConfusion() ) { - di << "Values should be sorted in increasing order; skipped" << "\n"; + di << "Values should be sorted in increasing order; skipped\n"; continue; } if ( ( byV && ( val < Vf+Precision::PConfusion() || val > Vl-Precision::PConfusion() ) ) || (!byV && ( val < Uf+Precision::PConfusion() || val > Ul-Precision::PConfusion() ) ) ) { - di << "Values should be inside range of surface; skipped" << "\n"; + di << "Values should be inside range of surface; skipped\n"; continue; } vals.Append ( val ); } } if ( uval.Length() <1 && vval.Length() <1 ) { - di << "No splitting defined" << "\n"; + di << "No splitting defined\n"; return 1; } if ( uval.Length() >0 ) { @@ -1065,7 +1065,7 @@ static Standard_Integer splitface } Handle(ShapeExtend_CompositeSurface) Grid = new ShapeExtend_CompositeSurface; - if ( ! Grid->Init ( AS ) ) di << "Grid badly connected!" << "\n"; + if ( ! Grid->Init ( AS ) ) di << "Grid badly connected!\n"; ShapeFix_ComposeShell SUCS; TopLoc_Location l; @@ -1074,23 +1074,23 @@ static Standard_Integer splitface SUCS.SetContext( RS ); SUCS.Perform (); - if ( SUCS.Status ( ShapeExtend_OK ) ) di << "Status: OK" << "\n"; - if ( SUCS.Status ( ShapeExtend_DONE1 ) ) di << "Status: DONE1" << "\n"; - if ( SUCS.Status ( ShapeExtend_DONE2 ) ) di << "Status: DONE2" << "\n"; - if ( SUCS.Status ( ShapeExtend_DONE3 ) ) di << "Status: DONE3" << "\n"; - if ( SUCS.Status ( ShapeExtend_DONE4 ) ) di << "Status: DONE4" << "\n"; - if ( SUCS.Status ( ShapeExtend_DONE5 ) ) di << "Status: DONE5" << "\n"; - if ( SUCS.Status ( ShapeExtend_DONE6 ) ) di << "Status: DONE6" << "\n"; - if ( SUCS.Status ( ShapeExtend_DONE7 ) ) di << "Status: DONE7" << "\n"; - if ( SUCS.Status ( ShapeExtend_DONE8 ) ) di << "Status: DONE8" << "\n"; - if ( SUCS.Status ( ShapeExtend_FAIL1 ) ) di << "Status: FAIL1" << "\n"; - if ( SUCS.Status ( ShapeExtend_FAIL2 ) ) di << "Status: FAIL2" << "\n"; - if ( SUCS.Status ( ShapeExtend_FAIL3 ) ) di << "Status: FAIL3" << "\n"; - if ( SUCS.Status ( ShapeExtend_FAIL4 ) ) di << "Status: FAIL4" << "\n"; - if ( SUCS.Status ( ShapeExtend_FAIL5 ) ) di << "Status: FAIL5" << "\n"; - if ( SUCS.Status ( ShapeExtend_FAIL6 ) ) di << "Status: FAIL6" << "\n"; - if ( SUCS.Status ( ShapeExtend_FAIL7 ) ) di << "Status: FAIL7" << "\n"; - if ( SUCS.Status ( ShapeExtend_FAIL8 ) ) di << "Status: FAIL8" << "\n"; + if ( SUCS.Status ( ShapeExtend_OK ) ) di << "Status: OK\n"; + if ( SUCS.Status ( ShapeExtend_DONE1 ) ) di << "Status: DONE1\n"; + if ( SUCS.Status ( ShapeExtend_DONE2 ) ) di << "Status: DONE2\n"; + if ( SUCS.Status ( ShapeExtend_DONE3 ) ) di << "Status: DONE3\n"; + if ( SUCS.Status ( ShapeExtend_DONE4 ) ) di << "Status: DONE4\n"; + if ( SUCS.Status ( ShapeExtend_DONE5 ) ) di << "Status: DONE5\n"; + if ( SUCS.Status ( ShapeExtend_DONE6 ) ) di << "Status: DONE6\n"; + if ( SUCS.Status ( ShapeExtend_DONE7 ) ) di << "Status: DONE7\n"; + if ( SUCS.Status ( ShapeExtend_DONE8 ) ) di << "Status: DONE8\n"; + if ( SUCS.Status ( ShapeExtend_FAIL1 ) ) di << "Status: FAIL1\n"; + if ( SUCS.Status ( ShapeExtend_FAIL2 ) ) di << "Status: FAIL2\n"; + if ( SUCS.Status ( ShapeExtend_FAIL3 ) ) di << "Status: FAIL3\n"; + if ( SUCS.Status ( ShapeExtend_FAIL4 ) ) di << "Status: FAIL4\n"; + if ( SUCS.Status ( ShapeExtend_FAIL5 ) ) di << "Status: FAIL5\n"; + if ( SUCS.Status ( ShapeExtend_FAIL6 ) ) di << "Status: FAIL6\n"; + if ( SUCS.Status ( ShapeExtend_FAIL7 ) ) di << "Status: FAIL7\n"; + if ( SUCS.Status ( ShapeExtend_FAIL8 ) ) di << "Status: FAIL8\n"; TopoDS_Shape sh = SUCS.Result(); ShapeFix::SameParameter ( sh, Standard_False ); @@ -1115,7 +1115,7 @@ static Standard_Integer converttobspline TopoDS_Shape inputShape=DBRep::Get(argv[2]); if (inputShape.IsNull()) { - di << "Unknown shape"<< "\n"; + di << "Unknown shape\n"; return 1; } TopoDS_Shape revsh = ShapeCustom::ConvertToRevolution (inputShape); @@ -1135,13 +1135,13 @@ static Standard_Integer splitclosed (Draw_Interpretor& di, const char** argv) { if (argc<3) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } TopoDS_Shape inputShape=DBRep::Get(argv[2]); if (inputShape.IsNull()) { - di << "Unknown shape"<< "\n"; + di << "Unknown shape\n"; return 1; } @@ -1159,13 +1159,13 @@ static Standard_Integer splitarea (Draw_Interpretor& di, const char** argv) { if (argc<4) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } TopoDS_Shape inputShape=DBRep::Get(argv[2]); if (inputShape.IsNull()) { - di << "Unknown shape"<< "\n"; + di << "Unknown shape\n"; return 1; } Standard_Real aMaxArea = Draw::Atof(argv[3]); @@ -1190,13 +1190,13 @@ static Standard_Integer removeinternalwires (Draw_Interpretor& di, const char** argv) { if (argc<4) { - di << "bad number of arguments" <<"\n"; + di << "bad number of arguments\n"; return 1; } Standard_Real aMinArea = Draw::Atof(argv[2]); TopoDS_Shape inputShape=DBRep::Get(argv[3]); if (inputShape.IsNull()) { - di << "Unknown shape"<< "\n"; + di << "Unknown shape\n"; return 1; } Handle(ShapeUpgrade_RemoveInternalWires) aTool; @@ -1204,7 +1204,7 @@ static Standard_Integer removeinternalwires (Draw_Interpretor& di, if(inputShape.ShapeType() < TopAbs_WIRE) aTool = new ShapeUpgrade_RemoveInternalWires(inputShape); else { - di<<"Invalid type of first shape: should be FACE,SHELL,SOLID or COMPOUND"<<"\n"; + di<<"Invalid type of first shape: should be FACE,SHELL,SOLID or COMPOUND\n"; return 1; } @@ -1233,17 +1233,17 @@ static Standard_Integer removeinternalwires (Draw_Interpretor& di, else aTool->Perform(); if(aTool->Status(ShapeExtend_FAIL1)) - di<<"Initial shape has invalid type"<<"\n"; + di<<"Initial shape has invalid type\n"; else if(aTool->Status(ShapeExtend_FAIL2)) - di<<"Specified sub-shape is not belonged to whole shape"<<"\n"; + di<<"Specified sub-shape is not belonged to whole shape\n"; if(aTool->Status(ShapeExtend_DONE1)) { const TopTools_SequenceOfShape& aRemovedWires =aTool->RemovedWires(); - di<Status(ShapeExtend_DONE2)) { const TopTools_SequenceOfShape& aRemovedFaces =aTool->RemovedFaces(); - di<GetResult(); @@ -1258,7 +1258,7 @@ static Standard_Integer removeloc (Draw_Interpretor& di, const char** argv) { if (argc<3) { - di << "bad number of arguments. Should be: removeloc res shape" <<"\n"; + di << "bad number of arguments. Should be: removeloc res shape\n"; return 1; } @@ -1352,7 +1352,7 @@ static Standard_Integer copytranslate(Draw_Interpretor& di, const char** argv) { if (argc<6) { - di << "bad number of arguments. Should be: removeloc res shape dx dyy dz" <<"\n"; + di << "bad number of arguments. Should be: removeloc res shape dx dyy dz\n"; return 1; } TopoDS_Shape aShape = DBRep::Get(argv[2]); diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx index 45325a2ba8..2601afa44c 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx @@ -205,7 +205,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity() if(mySurface->IsKind(STANDARD_TYPE(Geom_BSplineSurface))) MyBSpline = Handle(Geom_BSplineSurface)::DownCast(mySurface->Copy()); if (MyBSpline.IsNull()) { -// if (ShapeUpgrade::Debug()) cout<<". "<<" Surface is not a Bspline"<Continuity() >= myCriterion) { diff --git a/src/TNaming/TNaming_Name.cxx b/src/TNaming/TNaming_Name.cxx index 182d623a2c..697a8f07a5 100644 --- a/src/TNaming/TNaming_Name.cxx +++ b/src/TNaming/TNaming_Name.cxx @@ -1623,8 +1623,8 @@ static Standard_Boolean ORientation (const TDF_Label& L, CS = FindSubShapeInAncestor(aShape, AS); // <=== end 21.10.2009 #ifdef OCCT_DEBUG_OR - cout << "ORIENTATION: Selection" <<" TShape = " <Save(); if (!isSaved) { - di << "Error: Document not saved" << "\n"; + di << "Error: Document not saved\n"; return 1; } return 0; @@ -232,7 +232,7 @@ static Standard_Integer loadModel (Draw_Interpretor& di, Standard_Integer argc, if (!isLoaded) { - di << "Error: Document not loaded" << "\n"; + di << "Error: Document not loaded\n"; return 1; } return 0; @@ -267,7 +267,7 @@ static Standard_Integer addObj (Draw_Interpretor& di, Standard_Integer argc, con new TObjDRAW_Object( aModel->GetMainPartition()->NewLabel() ); if ( tObj.IsNull() ) { - di << "Error: Object not created" << "\n"; + di << "Error: Object not created\n"; return 1; } tObj->SetName( argv[2] ); @@ -297,7 +297,7 @@ static Standard_Integer setVal (Draw_Interpretor& di, Standard_Integer argc, con Handle(TObjDRAW_Object) tObj = getObjByName( argv[1], argv[2] ); if ( tObj.IsNull() ) { - di << "Error: Object " << argv[2] << " not found" << "\n"; + di << "Error: Object " << argv[2] << " not found\n"; return 1; } if ( !strcmp(argv[3],"-r") ) @@ -325,7 +325,7 @@ static Standard_Integer getVal (Draw_Interpretor& di, Standard_Integer argc, con Handle(TObjDRAW_Object) tObj = getObjByName( argv[1], argv[2] ); if ( tObj.IsNull() ) { - di << "Error: Object " << argv[2] << " not found" << "\n"; + di << "Error: Object " << argv[2] << " not found\n"; return 1; } if ( !strcmp(argv[3],"-i") ) @@ -357,7 +357,7 @@ static Standard_Integer setRef (Draw_Interpretor& di, Standard_Integer argc, con Handle(TObjDRAW_Object) tObj2 = getObjByName( argv[1], argv[3] ); if ( tObj1.IsNull() || tObj2.IsNull() ) { - di << "Error: Object " << argv[2] << " or object " << argv[3] << " not found" << "\n"; + di << "Error: Object " << argv[2] << " or object " << argv[3] << " not found\n"; return 1; } tObj1->SetRef( tObj2 ); @@ -376,7 +376,7 @@ static Standard_Integer getRef (Draw_Interpretor& di, Standard_Integer argc, con Handle(TObjDRAW_Object) tObj = getObjByName( argv[1], argv[2] ); if ( tObj.IsNull() ) { - di << "Error: Object " << argv[2] << " not found" << "\n"; + di << "Error: Object " << argv[2] << " not found\n"; return 1; } Handle(TObj_Object) aRefObj = tObj->GetRef(); @@ -403,13 +403,13 @@ static Standard_Integer addChild (Draw_Interpretor& di, Standard_Integer argc, c Handle(TObjDRAW_Object) tObj = getObjByName( argv[1], argv[2] ); if ( tObj.IsNull() ) { - di << "Error: Object " << argv[2] << " not found" << "\n"; + di << "Error: Object " << argv[2] << " not found\n"; return 1; } Handle(TObj_Object) chldObj = tObj->AddChild(); if ( chldObj.IsNull() ) { - di << "Error: No child object created" << "\n"; + di << "Error: No child object created\n"; return 1; } chldObj->SetName( new TCollection_HExtendedString( argv[3] ) ); @@ -428,7 +428,7 @@ static Standard_Integer getChild (Draw_Interpretor& di, Standard_Integer argc, c Handle(TObjDRAW_Object) tObj = getObjByName( argv[1], argv[2] ); if ( tObj.IsNull() ) { - di << "Error: Object " << argv[2] << " not found" << "\n"; + di << "Error: Object " << argv[2] << " not found\n"; return 1; } Handle(TObj_ObjectIterator) anItr = tObj->GetChildren(); @@ -511,7 +511,7 @@ void TObjDRAW::Factory(Draw_Interpretor& theDI) TObjDRAW::Init(theDI); #ifdef OCCT_DEBUG - theDI << "Draw Plugin : All TKTObjDRAW commands are loaded" << "\n"; + theDI << "Draw Plugin : All TKTObjDRAW commands are loaded\n"; #endif } diff --git a/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx b/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx index c58d2401ed..30c00a0ab4 100644 --- a/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx +++ b/src/TestTopOpe/TestTopOpe_BOOPCommands.cxx @@ -253,7 +253,7 @@ Standard_Integer TOPOC(Draw_Interpretor& interpretor,Standard_Integer na,const c } } if ( !eca && !esa ) { - interpretor<<"edge "< "<<"\n"; - di<<"toposet "<<"\n"; - di<<"kind = p | c | s | v | e | f | w "<<"\n"; + di<<"toposet \n"; + di<<"toposet \n"; + di<<"kind = p | c | s | v | e | f | w \n"; return 1; case 4: if(!strcasecmp(a[1],"p")) @@ -368,23 +368,23 @@ Standard_Integer TOPOSETCOMMANDS(TestTopOpe_BOOP& PT,Standard_Integer na,const c void TOPOHELP(TestTopOpe_BOOP& PT, Draw_Interpretor& di) { di<<"\n"; - di<<"Help on topo command :"<<"\n"; - di<<"----------------------"<<"\n"; + di<<"Help on topo command :\n"; + di<<"----------------------\n"; for (Standard_Integer ic=0;ic among input shapes (exploration index)"<<"\n"; - di<<"-v [0]/1 : do not trace / trace methods name"<<"\n"; - di<<"-d : dump all control variables"<<"\n"; - di<<"-i : initialize control variables to default values"<<"\n"; - di<<"-h : help"<<"\n"; - di<<"----------------------"<<"\n"; + di<<"args :\n"; + di<<"-2d -no2d : produce (or not) 2d curves in section\n"; + di<<"-a : section curves approximated (default)\n"; + di<<"-p : section curve discretisated\n"; + di<<"-tx [default] | tol1 tol2 : set approximation tolerances\n"; + di<<"-ti [shape] | tol1 tol2 : set intersection tolerances\n"; + di<<"-c 0/[1] : clear view before displaying result\n"; + di<<"-m [0]/1 : execute methods / explode methods\n"; + di<<"-f [name] : retrieve shape/index among input shapes (exploration index)\n"; + di<<"-v [0]/1 : do not trace / trace methods name\n"; + di<<"-d : dump all control variables\n"; + di<<"-i : initialize control variables to default values\n"; + di<<"-h : help\n"; + di<<"----------------------\n"; } // ------------------------------------------------------- diff --git a/src/TestTopOpe/TestTopOpe_CORCommands.cxx b/src/TestTopOpe/TestTopOpe_CORCommands.cxx index b0ca3e45b3..1879250e1d 100644 --- a/src/TestTopOpe/TestTopOpe_CORCommands.cxx +++ b/src/TestTopOpe/TestTopOpe_CORCommands.cxx @@ -139,13 +139,13 @@ Standard_Integer regularize(Draw_Interpretor& di, Standard_Integer n, const char TopoDS_Shape aLocalShape = DBRep::Get(a[1]); TopoDS_Face fa = TopoDS::Face(aLocalShape); // TopoDS_Face fa = TopoDS::Face(DBRep::Get(a[1])); - if (fa.IsNull()) {di<<"null face"<<"\n"; return 1;} + if (fa.IsNull()) {di<<"null face\n"; return 1;} TopTools_DataMapOfShapeListOfShape ESplits; TopTools_ListOfShape lof; TopOpeBRepTool::Regularize(fa, lof, ESplits); Standard_Integer nfa = lof.Extent(); - di<<"face gives "< newFsp"<<"\n"; + di<<"-> newFsp\n"; return 0; } @@ -406,8 +406,8 @@ static Standard_Integer isclosingE(Draw_Interpretor& di, Standard_Integer n, con Standard_SStream aSStream; TopAbs::Print(oriE,aSStream); di << aSStream; - di<<" closing edge"<<"\n";} - else di <<"edge is NOT closing edge"<<"\n"; + di<<" closing edge\n";} + else di <<"edge is NOT closing edge\n"; return 0; } @@ -417,9 +417,9 @@ static Standard_Integer compareshsh(Draw_Interpretor& di, Standard_Integer n, co TopoDS_Shape sh1 = DBRep::Get(a[1]); TopoDS_Shape sh2 = DBRep::Get(a[2]); Standard_Boolean issame = sh1.IsSame(sh2); - if (issame) di<<" same shapes"<<"\n"; - else di <<" shapes are not same"<<"\n"; - Standard_Boolean isequal = sh1.IsEqual(sh2); if (isequal) di<<" equal shapes"<<"\n"; + if (issame) di<<" same shapes\n"; + else di <<" shapes are not same\n"; + Standard_Boolean isequal = sh1.IsEqual(sh2); if (isequal) di<<" equal shapes\n"; return 0; } static Standard_Integer pcurveedgeonface(Draw_Interpretor& di, Standard_Integer n, const char** a) @@ -458,12 +458,12 @@ static Standard_Integer orivine(Draw_Interpretor& di, Standard_Integer n, const // TopoDS_Edge ed = TopoDS::Edge(DBRep::Get(a[2])); Standard_Integer ori = TopOpeBRepTool_TOOL::OriinSor(v,ed); - if (ori==0) di<<"v not in ed"<<"\n"; - else if (ori==1) di<<"v FORWARD in ed"<<"\n"; - else if (ori==2) di<<"v REVERSED in ed"<<"\n"; - else if (ori==3) di<<"v INTERNAL in ed"<<"\n"; - else if (ori==4) di<<"v EXTERNAL in ed"<<"\n"; - else if (ori==5) di<<"v CLOSING in ed"<<"\n"; + if (ori==0) di<<"v not in ed\n"; + else if (ori==1) di<<"v FORWARD in ed\n"; + else if (ori==2) di<<"v REVERSED in ed\n"; + else if (ori==3) di<<"v INTERNAL in ed\n"; + else if (ori==4) di<<"v EXTERNAL in ed\n"; + else if (ori==5) di<<"v CLOSING in ed\n"; return 0; } @@ -486,12 +486,12 @@ static Standard_Integer vine(Draw_Interpretor& di, Standard_Integer n, const cha di << "p2df";FUN_cout(p2df,di); di << "p2dl";FUN_cout(p2dl,di);di<<"\n"; Standard_Integer ori = TopOpeBRepTool_TOOL::OriinSor(v,ed); - if (ori==0) {di<<"v not in ed"<<"\n"; return 0;} - else if (ori==1) di<<"v FORWARD in ed"<<"\n"; - else if (ori==2) di<<"v REVERSED in ed"<<"\n"; - else if (ori==3) di<<"v INTERNAL in ed"<<"\n"; - else if (ori==4) di<<"v EXTERNAL in ed"<<"\n"; - else if (ori==5) di<<"v CLOSING in ed"<<"\n"; + if (ori==0) {di<<"v not in ed\n"; return 0;} + else if (ori==1) di<<"v FORWARD in ed\n"; + else if (ori==2) di<<"v REVERSED in ed\n"; + else if (ori==3) di<<"v INTERNAL in ed\n"; + else if (ori==4) di<<"v EXTERNAL in ed\n"; + else if (ori==5) di<<"v CLOSING in ed\n"; if ((ori == 1) || (ori == 2)) { Standard_Real par = TopOpeBRepTool_TOOL::ParE(ori,ed);//FUN_tool_parOnE(ind,ed,fa); @@ -516,8 +516,8 @@ static Standard_Integer issubshape(Draw_Interpretor& di, Standard_Integer n, con for (; ex.More(); ex.Next()) if (ex.Current().IsSame(subshape)) {issubs = Standard_True; break;} - if (issubs) di<<" is subshape"<<"\n"; - else di<<" is NOT subshape"<<"\n"; + if (issubs) di<<" is subshape\n"; + else di<<" is NOT subshape\n"; return 0; } @@ -633,10 +633,10 @@ static Standard_Integer pntonc(Draw_Interpretor& di, Standard_Integer n, const c if (n < 3) return 1; Standard_Real x = Draw::Atof(a[1]); Handle(Geom_Curve) C = DrawTrSurf::GetCurve(a[2]); - if (C.IsNull()) {di<<"null curve"<<"\n"; return 1;} + if (C.IsNull()) {di<<"null curve\n"; return 1;} gp_Pnt p = C->Value(x); di<<"point on curve of parameter "<Value(x); - di<<"point on curve of parameter "<Value(p2d.X(),p2d.Y()); di<<"point on curve of parameter "< KO"<<"\n"; return 1;} + else {di<<"shape is not a solid nor a shell => KO\n"; return 1;} sta = soclassi.State(); di<<"point is "; @@ -734,7 +734,7 @@ static Standard_Integer solidclassifier(Draw_Interpretor& di, Standard_Integer n Standard_SStream aSStream; TopAbs::Print(sta,aSStream); di << aSStream; - di<<" shape s"<<"\n"; + di<<" shape s\n"; return 0; } @@ -742,7 +742,7 @@ static Standard_Integer class3dclassifier(Draw_Interpretor& di, Standard_Integer { if (n < 4) return 1; TopoDS_Shape s = DBRep::Get(a[1]); - if (s.IsNull()) {di<<"null shape"<<"\n";return 1;} + if (s.IsNull()) {di<<"null shape\n";return 1;} gp_Pnt p; DrawTrSurf::GetPoint(a[2], p); Standard_Real tol = Draw::Atof(a[3]); @@ -756,22 +756,22 @@ static Standard_Integer class3dclassifier(Draw_Interpretor& di, Standard_Integer Standard_SStream aSStream; TopAbs::Print(sta,aSStream); di << aSStream; - di<<" shape s"<<"\n"; + di<<" shape s\n"; return 0; } static Standard_Integer shapeclassifier(Draw_Interpretor& di, Standard_Integer n, const char** a) { if (n < 3) return 1; TopoDS_Shape sh = DBRep::Get(a[1]); - if (sh.IsNull()) {di<<"null shape"<<"\n";return 1;} + if (sh.IsNull()) {di<<"null shape\n";return 1;} TopoDS_Shape shref = DBRep::Get(a[2]); - if (shref.IsNull()) {di<<"null reference shape"<<"\n";return 1;} + if (shref.IsNull()) {di<<"null reference shape\n";return 1;} Standard_Boolean hastoavoid = (n > 3); TopTools_ListOfShape toavoid; if (hastoavoid) { for (Standard_Integer i=3; i<=n; i++) { TopoDS_Shape shtoavoid = DBRep::Get(a[i]); - if (shtoavoid.IsNull()) {di<<"null toavoid shape"<<"\n";return 1;} + if (shtoavoid.IsNull()) {di<<"null toavoid shape\n";return 1;} toavoid.Append(shtoavoid); } } @@ -787,7 +787,7 @@ static Standard_Integer shapeclassifier(Draw_Interpretor& di, Standard_Integer n Standard_SStream aSStream; TopAbs::Print(sta,aSStream); di << aSStream; - di<<" shape ref"<<"\n"; + di<<" shape ref\n"; return 0; } @@ -797,7 +797,7 @@ static Standard_Integer curvature(Draw_Interpretor& di, Standard_Integer n, cons TopoDS_Shape aLocalShape = DBRep::Get(a[1]); TopoDS_Face f = TopoDS::Face(aLocalShape); // TopoDS_Face f = TopoDS::Face(DBRep::Get(a[1])); - if (f.IsNull()) {di<<"null shape"<<"\n";return 1;} + if (f.IsNull()) {di<<"null shape\n";return 1;} Standard_Real x = Draw::Atof(a[2]); Standard_Real y = Draw::Atof(a[3]); Standard_Real z = Draw::Atof(a[4]); @@ -806,9 +806,9 @@ static Standard_Integer curvature(Draw_Interpretor& di, Standard_Integer n, cons Handle(Geom_Surface) su = BRep_Tool::Surface(f); GeomAPI_IntCS intcs(line,su); Standard_Boolean done = intcs.IsDone(); - if (!done) {di<<"intersection point on surface not found"<<"\n"; return 1;} + if (!done) {di<<"intersection point on surface not found\n"; return 1;} Standard_Integer npnts = intcs.NbPoints(); - if (npnts < 1) {di<<"intersection point on surface not found"<<"\n"; return 1;} + if (npnts < 1) {di<<"intersection point on surface not found\n"; return 1;} Standard_Real tol = Precision::Confusion(); BRepLProp_SLProps props(BS,2,tol); @@ -816,10 +816,10 @@ static Standard_Integer curvature(Draw_Interpretor& di, Standard_Integer n, cons for (Standard_Integer i = 1; i <= npnts; i++) { gp_Pnt p = intcs.Point(i); Standard_Real u,v,w; intcs.Parameters(i,u,v,w); - di<<"point("< and an ."<<"\n"; - di<<"basic usage :"<<"\n"; - di<<" tsee "<<"\n"; - di<<" = so sh f w e v s for solid/shell/face/wire/edge/vertex/shape"<<"\n"; - di<<" su cu p for surface/curve/point (N.B : su is NYI)"<<"\n"; - di<<" = integer"<<"\n"; - di<<"example : 'tsee e 3' will draw the edge of index 3"<<"\n"; - di<<" 'tsee e 3 6' will draw the edges of index 3 and 6"<<"\n"; - di<<" 'tsee e' will draw all the edges."<<"\n"; - di<<""<<"\n"; - di<<"Index values of DS entities may be given by the 'tds' command which prints"<<"\n"; - di<<"the content of the DS for each shape and geometry type."<<"\n"; - di<<"Entities are drawn with a specific color according to their type."<<"\n"; - di<<""<<"\n"; - di<<"Naming : "<<"\n"; - di<<"'tsee ' creates the drawable object named _."<<"\n"; - di<<"This name is displayed near the entity in one if the forms : "<<"\n"; - di<<" *_ meaning entity belongs to the first shape of current operation."<<"\n"; - di<<" _* meaning entity belongs to the second shape of current operation."<<"\n"; - di<<""<<"\n"; - di<<"Same Domain shapes : "<<"\n"; - di<<"'tsee sd' to display all shapes of having same domain data."<<"\n"; - di<<"example : 'tsee e sd' to display all edges sharing a 1d geometric domain"<<"\n"; - di<<" with other edges."<<"\n"; - di<<""<<"\n"; - di<<"Optional flags :"<<"\n"; + di<<"\n"; + di<<"tsee : Draw entities of data structure (DS) loaded by TestTopOpe::CurrentDS().\n"; + di<<"DS entities are shapes and geometries accessed by a and an .\n"; + di<<"basic usage :\n"; + di<<" tsee \n"; + di<<" = so sh f w e v s for solid/shell/face/wire/edge/vertex/shape\n"; + di<<" su cu p for surface/curve/point (N.B : su is NYI)\n"; + di<<" = integer\n"; + di<<"example : 'tsee e 3' will draw the edge of index 3\n"; + di<<" 'tsee e 3 6' will draw the edges of index 3 and 6\n"; + di<<" 'tsee e' will draw all the edges.\n"; + di<<"\n"; + di<<"Index values of DS entities may be given by the 'tds' command which prints\n"; + di<<"the content of the DS for each shape and geometry type.\n"; + di<<"Entities are drawn with a specific color according to their type.\n"; + di<<"\n"; + di<<"Naming : \n"; + di<<"'tsee ' creates the drawable object named _.\n"; + di<<"This name is displayed near the entity in one if the forms : \n"; + di<<" *_ meaning entity belongs to the first shape of current operation.\n"; + di<<" _* meaning entity belongs to the second shape of current operation.\n"; + di<<"\n"; + di<<"Same Domain shapes : \n"; + di<<"'tsee sd' to display all shapes of having same domain data.\n"; + di<<"example : 'tsee e sd' to display all edges sharing a 1d geometric domain\n"; + di<<" with other edges.\n"; + di<<"\n"; + di<<"Optional flags :\n"; OthersCommands_help(CommandName); - di<<"Other types :"<<"\n"; - di<<"'tsee fev' : displays all faces,then edges,then vertices."<<"\n"; - di<<"'tsee es ' displays edge described as section edge ."<<"\n"; - di<<" The name of a section edge likes t_i,where :"<<"\n"; - di<<" - i is the edge index in the set of section edge,"<<"\n"; - di<<" - j is edge index in the DS (as any edge)."<<"\n"; - di<<""<<"\n"; + di<<"Other types :\n"; + di<<"'tsee fev' : displays all faces,then edges,then vertices.\n"; + di<<"'tsee es ' displays edge described as section edge .\n"; + di<<" The name of a section edge likes t_i,where :\n"; + di<<" - i is the edge index in the set of section edge,\n"; + di<<" - j is edge index in the DS (as any edge).\n"; + di<<"\n"; } static void tseei_help(Draw_Interpretor& di) { - di<<""<<"\n"; - di<<"tseei : Draws entities of data structure (DS) loaded by TestTopOpe::CurrentDS()."<<"\n"; - di<<"Draws the objects appearing in interferences DS objects."<<"\n"; - di<<"See command 'tsee' for discussion about DS objects."<<"\n"; + di<<"\n"; + di<<"tseei : Draws entities of data structure (DS) loaded by TestTopOpe::CurrentDS().\n"; + di<<"Draws the objects appearing in interferences DS objects.\n"; + di<<"See command 'tsee' for discussion about DS objects.\n"; di<<"\n"; } static void tki_help(Draw_Interpretor& di) { - di<<""<<"\n"; - di<<"tki,tkig,tkis : Groups interferences of DS objects"<<"\n"; - di<<" by geometry (g),or support (s),and index."<<"\n"; - di<<"See command 'tsee' for discussion about DS objects."<<"\n"; - di<<"(Test of class TopOpeBRepDS_TKI)"<<"\n"; + di<<"\n"; + di<<"tki,tkig,tkis : Groups interferences of DS objects\n"; + di<<" by geometry (g),or support (s),and index.\n"; + di<<"See command 'tsee' for discussion about DS objects.\n"; + di<<"(Test of class TopOpeBRepDS_TKI)\n"; di<<"\n"; } static void tds_help(Draw_Interpretor& di) { - di<<""<<"\n"; - di<<"tds : dump current DS (loaded by CurrentDS())"<<"\n"; - di<<"basic usage : tds <-arg> type "<<"\n"; di<<"\n"; - di<<"Description of curve geometry (type = c) : <-arg> = -t -k -s -l"<<"\n"; - di<<"\t-k : print only the curve with keep = Standard_True"<<"\n"; - di<<"\t-l : (long) print all poles and knots for BSplines curves"<<"\n"; - di<<"\t-s : (short) print only 4 poles and 4 knots for BSplines curves"<<"\n"; - di<<"on shapes (type = s|so|sh|f|w|e|v) : <-arg> = -ssi"<<"\n"; - di<<"\t-ssi : print only ShapeShapeInterferences"<<"\n"; - di<<""<<"\n"; - di<<"See command 'tsee' for discussion about type and ."<<"\n"; + di<<"tds : dump current DS (loaded by CurrentDS())\n"; + di<<"basic usage : tds <-arg> type \n"; + di<<"\n"; + di<<"Description of curve geometry (type = c) : <-arg> = -t -k -s -l\n"; + di<<"\t-k : print only the curve with keep = Standard_True\n"; + di<<"\t-l : (long) print all poles and knots for BSplines curves\n"; + di<<"\t-s : (short) print only 4 poles and 4 knots for BSplines curves\n"; + di<<"on shapes (type = s|so|sh|f|w|e|v) : <-arg> = -ssi\n"; + di<<"\t-ssi : print only ShapeShapeInterferences\n"; + di<<"\n"; + di<<"See command 'tsee' for discussion about type and .\n"; di<<"\n"; } typedef Standard_Integer (*tf_SeeShape)(const Standard_Integer I,const TopoDS_Shape& S); extern void OthersCommands_flags(Standard_Integer& na,const char** a,TestTopOpeDraw_Displayer& TD); -void COUTNOHDS(Draw_Interpretor& di) {di<<"no current HDS"<<"\n";} +void COUTNOHDS(Draw_Interpretor& di) {di<<"no current HDS\n";} Standard_Integer tsee_SeeShapefunc(Draw_Interpretor& di,Standard_Integer na_in,const char** a,tf_SeeShape SeeShapefunc) { if (na_in == 1 || (na_in == 2 && !strcasecmp(a[1],"-h"))) { @@ -899,7 +899,7 @@ Standard_Integer SeeShapeISI(const Standard_Integer I,const TopoDS_Shape& S,Draw // TopOpeBRepDS_Kind kk = (TopOpeBRepDS_Kind)ITLOKK.Value(); Standard_Integer ii = ITLOII.Value(); TopOpeBRepDS::Print(kk,ii,cout,""," "); } - if (ya) di<<"\n"; else di<<"no shape interference"<<"\n"; + if (ya) di<<"\n"; else di<<"no shape interference\n"; ITLOKK.Initialize(LOKK); ITLOII.Initialize(LOII); for(; ITLOKK.More(),ITLOII.More(); ITLOKK.Next(),ITLOII.Next()) { @@ -1117,7 +1117,7 @@ Standard_Integer TPPE(Draw_Interpretor& di,Standard_Integer na,const char** a) Standard_Integer ie = Draw::Atoi(a[4]); ok = ok && (ip >= 1); ok = ok && (ie >= 1); if (!ok) { - di <<" bad data"<<"\n"; + di <<" bad data\n"; return 1; } @@ -1126,7 +1126,7 @@ Standard_Integer TPPE(Draw_Interpretor& di,Standard_Integer na,const char** a) ok = Standard_True; ok = ok && (ip <= HDS->NbPoints()); if (ok) pds = HDS->Point(ip).Point(); - if (!ok) di<<" geometry "<NbShapes()); @@ -1145,7 +1145,7 @@ Standard_Integer TPPE(Draw_Interpretor& di,Standard_Integer na,const char** a) ok = ok && (sh.ShapeType() == TopAbs_EDGE); if (ok) ed = TopoDS::Edge(sh); } - if (!ok) di<<" shape "<CurrentHDS()->ChkIntg(); - di<<"Check interference integrity completed"<<"\n"; + di<<"Check interference integrity completed\n"; } void FUN_ChkIntgSamDomain(Draw_Interpretor& di) //***Check Integrity SameDomain @@ -1188,7 +1188,7 @@ void FUN_ChkIntgSamDomain(Draw_Interpretor& di) //***Check Integrity SameDomain if ( PHDSD == NULL ) return; TopOpeBRepDS_Check C(PHDSD->CurrentHDS()); if(C.ChkIntgSamDom()) - di<<"Check SameDomain integrity completed"<<"\n"; + di<<"Check SameDomain integrity completed\n"; } void FUN_ChkIntg(Draw_Interpretor& di) //***Check Integrity @@ -1203,7 +1203,7 @@ void FUN_ChkVertex(Draw_Interpretor& di) //***Check Vertex SameDomain if ( PHDSD == NULL ) return; TopOpeBRepDS_Check C(PHDSD->CurrentHDS()); if(C.OneVertexOnPnt()) - di<<"Check Structure Vertex SameDomain Complete"<<"\n"; + di<<"Check Structure Vertex SameDomain Complete\n"; } //--------------------------------------------------------- @@ -1223,10 +1223,10 @@ Standard_Integer topochk(Draw_Interpretor& di,Standard_Integer na,const char** a } else if(!strcmp (a[1],"-s")) ::FUN_ChkVertex(di); else { - di<<"option : -i = check DS full integrity"<<"\n"; - di<<"option : -ii = check only interferences"<<"\n"; - di<<"option : -isd = check only SameDomain data"<<"\n"<<"\n"; - di<<"option : -s = check only SameDomain data on vertex"<<"\n"; + di<<"option : -i = check DS full integrity\n"; + di<<"option : -ii = check only interferences\n"; + di<<"option : -isd = check only SameDomain data\n\n"; + di<<"option : -s = check only SameDomain data on vertex\n"; return 1; } return 0; @@ -1246,7 +1246,7 @@ Standard_Integer SeeShapeTCX(const Standard_Integer I,const TopoDS_Shape& S) static void tcx_help(Draw_Interpretor& di) { - di<<"tcx : function not documented"<<"\n"; + di<<"tcx : function not documented\n"; } //----------------------------------------------------------------------- diff --git a/src/TestTopOpe/TestTopOpe_MesureCommands.cxx b/src/TestTopOpe/TestTopOpe_MesureCommands.cxx index f7777d5ff0..6c6c4196fb 100644 --- a/src/TestTopOpe/TestTopOpe_MesureCommands.cxx +++ b/src/TestTopOpe/TestTopOpe_MesureCommands.cxx @@ -64,17 +64,17 @@ static Standard_Integer SetName(const Standard_Character *C, Draw_Interpretor& d static void Mes_help(Draw_Interpretor& di) { di<<"\n"; - di<<"mesure M : create/reset measurement M "<<"\n"; - di<<"mesure reset : reinitialize all measurements"<<"\n"; - di<<"mesure M n t : add data [n t] to M"<<"\n"; - di<<"mesure range M : sort indexes 'min max' of M"<<"\n"; - di<<"mesure minmax M : take 'xmin ymin xmax ymax' from M"<<"\n"; - di<<"mesure xy M : take 'x y' = M(i)"<<"\n"; - di<<"seem M : visualize M"<<"\n"; - di<<"seemx M fx : visualize M with factor in x"<<"\n"; - di<<"seemx M fy : visualize M with factor in y"<<"\n"; - di<<"seemxy M fx fy : visualize M with factor in x,y"<<"\n"; - di<<""<<"\n"; + di<<"mesure M : create/reset measurement M \n"; + di<<"mesure reset : reinitialize all measurements\n"; + di<<"mesure M n t : add data [n t] to M\n"; + di<<"mesure range M : sort indexes 'min max' of M\n"; + di<<"mesure minmax M : take 'xmin ymin xmax ymax' from M\n"; + di<<"mesure xy M : take 'x y' = M(i)\n"; + di<<"seem M : visualize M\n"; + di<<"seemx M fx : visualize M with factor in x\n"; + di<<"seemx M fy : visualize M with factor in y\n"; + di<<"seemxy M fx fy : visualize M with factor in x,y\n"; + di<<"\n"; } // ---------------------------------------------------------------------- diff --git a/src/TestTopOpe/TestTopOpe_OtherCommands.cxx b/src/TestTopOpe/TestTopOpe_OtherCommands.cxx index 5649309889..a6e377fedb 100644 --- a/src/TestTopOpe/TestTopOpe_OtherCommands.cxx +++ b/src/TestTopOpe/TestTopOpe_OtherCommands.cxx @@ -113,7 +113,7 @@ Standard_Integer DOTVIEW(Draw_Interpretor&, Standard_Integer narg, const char** } Standard_Integer VECTEUR(Draw_Interpretor& di, Standard_Integer , const char** ) { - di << "Pick positions with button "<<"\n"; + di << "Pick positions with button \n"; Standard_Integer id,X,Y,b; gp_Trsf T; gp_Pnt P1,P2,PP1,PP2; @@ -240,12 +240,12 @@ Standard_Integer GRILLE(Draw_Interpretor& di, Standard_Integer narg, const char* return 1; if(nbx) dx = (xmax-xmin)/nbx; else dx=0; if(nby) dy = (ymax-ymin)/nby; else dy=0; - di<<"compound CE"<<"\n"; + di<<"compound CE\n"; for(Standard_Real x=xmin; x cross "<<" "< cross "< on garde EE"< on vire EE"<UserBreak()) { - OS << "Interrupted by the user"<EndScope(); myProgress->Show(); if (myProgress->UserBreak()) - OS << "Interrupted by the user"< 4) { - std::cout << theArgv[0] << ": " << " invalid arguments.\n"; + std::cout << theArgv[0] << ": invalid arguments.\n"; std::cout << "Type help for more information.\n"; return 1; } @@ -3189,7 +3189,7 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb, Handle(AIS_InteractiveContext) anAISContext = ViewerTest::GetAISContext(); if (anAISContext.IsNull()) { - std::cout << aCommandName << ": " << " please use 'vinit' command to initialize view.\n"; + std::cout << aCommandName << ": please use 'vinit' command to initialize view.\n"; return 1; } @@ -3237,8 +3237,8 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb, if (aTextureArg.IsEmpty()) { - std::cout << aCommandName << ": " << " Texture mapping disabled.\n"; - std::cout << "To enable it, use 'vtexture NameOfShape NameOfTexture'\n" << "\n"; + std::cout << aCommandName << ": Texture mapping disabled.\n"; + std::cout << "To enable it, use 'vtexture NameOfShape NameOfTexture'\n\n"; anAISContext->SetDisplayMode (aTexturedIO, AIS_Shaded, Standard_False); if (aPreviousMode == 3) @@ -3255,14 +3255,14 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb, { TCollection_AsciiString aTextureFolder = Graphic3d_TextureRoot::TexturesFolder(); - theDi << "\n Files in current directory : \n" << "\n"; + theDi << "\n Files in current directory : \n\n"; theDi.Eval ("glob -nocomplain *"); TCollection_AsciiString aCmnd ("glob -nocomplain "); aCmnd += aTextureFolder; aCmnd += "/* "; - theDi << "Files in " << aTextureFolder.ToCString() << " : \n" << "\n"; + theDi << "Files in " << aTextureFolder.ToCString() << " : \n\n"; theDi.Eval (aCmnd.ToCString()); return 0; } @@ -3840,15 +3840,15 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) { myTimer.Start(); if (Draw::Atoi(argv[3])==1 ) { - di<<" Primitives sensibles OFF"<<"\n"; + di<<" Primitives sensibles OFF\n"; TheAISContext()->Deactivate(aIO); } else { - di<<" Primitives sensibles ON"<<"\n"; + di<<" Primitives sensibles ON\n"; } // Movement par transformation if(Draw::Atoi(argv[2]) ==1) { - di<<" Calcul par Transformation"<<"\n"; + di<<" Calcul par Transformation\n"; for (Standard_Real myAngle=0;Angle<10*2*M_PI; myAngle++) { Angle=Step*myAngle; @@ -3860,7 +3860,7 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) { } } else { - di<<" Calcul par Locations"<<"\n"; + di<<" Calcul par Locations\n"; gp_Trsf myAngleTrsf; myAngleTrsf.SetRotation(gp_Ax1(gp_Pnt(0,0,0),gp_Dir(0,0,1) ), Step ); TopLoc_Location myDeltaAngle (myAngleTrsf); @@ -3880,7 +3880,7 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) { } a3DView() -> Redraw(); myTimer.Stop(); - di<<" Temps ecoule "<<"\n"; + di<<" Temps ecoule \n"; myTimer.Show(); return 0; } @@ -3891,7 +3891,7 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) { //================================================================================== static int VAnimation (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc != 5) { - di<<"Use: "<3) { di<<" Syntaxe error"<<"\n";return 1;} + if (argc<2||argc>3) { di<<" Syntaxe error\n";return 1;} ThereIsName = (argc == 3); } else { // vunsetam - if (argc>1) {di<<" Syntaxe error"<<"\n";return 1;} + if (argc>1) {di<<" Syntaxe error\n";return 1;} else { - di<<" R.A.Z de tous les modes de selecion"<<"\n"; - di<<" Fermeture du Context local"<<"\n"; + di<<" R.A.Z de tous les modes de selecion\n"; + di<<" Fermeture du Context local\n"; if (TheAISContext()->HasOpenedContext()) TheAISContext()->CloseLocalContext(); } @@ -4752,7 +4752,7 @@ Standard_Boolean ViewerTest::PickShapes (const TopAbs_ShapeEnum TheType, Standard_Integer Taille = thearr->Length(); if(Taille>1) - cout<<" WARNING : Pick with Shift+ MB1 for Selection of more than 1 object"<<"\n"; + cout<<" WARNING : Pick with Shift+ MB1 for Selection of more than 1 object\n"; // step 1: prepare the data Standard_Integer curindex = TheAISContext()->OpenLocalContext(); @@ -4962,7 +4962,7 @@ static int VIOTypes( Draw_Interpretor& di, Standard_Integer , const char** ) Colum[i].Center(20,' '); for(i=0;i<=2;i++) di<<"|"<IndexOfCurrentLocal(); // On active les modes de selections faces. TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(4) ); - di<<" Select a face ."<<"\n"; + di<<" Select a face .\n"; // Boucle d'attente waitpick. Standard_Integer argccc = 5; @@ -388,7 +388,7 @@ static int VSize (Draw_Interpretor& di, Standard_Integer argc, const char** argv Quantity_NameOfColor col = Quantity_NOC_BLACK ; // Verification des arguments - if ( argc>3 ) {di<3 ) {di<8 ) {di<<" Syntaxe error"<<"\n";return 1;} + if (argc<2 || argc>8 ) {di<<" Syntaxe error\n";return 1;} if (argc==8) HasArg=Standard_True; else HasArg=Standard_False; @@ -655,7 +655,7 @@ static int VAxisBuilder(Draw_Interpretor& di, Standard_Integer argc, const char* // Active le mode edge et le mode vertex TheAISContext()->ActivateStandardMode(AIS_Shape::SelectionType(1) ); TheAISContext()->ActivateStandardMode(AIS_Shape::SelectionType(2) ); - di<<" Select an edge or a vertex."<<"\n"; + di<<" Select an edge or a vertex.\n"; // Boucle d'attente waitpick. Standard_Integer argcc = 5; @@ -677,7 +677,7 @@ static int VAxisBuilder(Draw_Interpretor& di, Standard_Integer argc, const char* if (ShapeA.ShapeType()==TopAbs_VERTEX) { // on desactive le mode edge TheAISContext()->DeactivateStandardMode(AIS_Shape::SelectionType(2) ); - di<<" Select a different vertex."<<"\n"; + di<<" Select a different vertex.\n"; TopoDS_Shape ShapeB; do { @@ -736,7 +736,7 @@ static int VAxisBuilder(Draw_Interpretor& di, Standard_Integer argc, const char* // Active le mode edge TheAISContext()->ActivateStandardMode(AIS_Shape::SelectionType(2) ); - di<<" Select an edge."<<"\n"; + di<<" Select an edge.\n"; // Boucle d'attente waitpick. Standard_Integer argcc = 5; @@ -752,7 +752,7 @@ static int VAxisBuilder(Draw_Interpretor& di, Standard_Integer argc, const char* // Active le mode vertex et deactive edges TheAISContext()->DeactivateStandardMode(AIS_Shape::SelectionType(2) ); TheAISContext()->ActivateStandardMode(AIS_Shape::SelectionType(1) ); - di<<" Select a vertex."<<"\n"; + di<<" Select a vertex.\n"; // Boucle d'attente waitpick. Standard_Integer argccc = 5; @@ -792,7 +792,7 @@ static int VAxisBuilder(Draw_Interpretor& di, Standard_Integer argc, const char* // Active le mode edge TheAISContext()->ActivateStandardMode(AIS_Shape::SelectionType(2) ); - di<<" Select an edge."<<"\n"; + di<<" Select an edge.\n"; // Boucle d'attente waitpick. Standard_Integer argcc = 5; @@ -808,7 +808,7 @@ static int VAxisBuilder(Draw_Interpretor& di, Standard_Integer argc, const char* // Active le mode vertex et deactive edges TheAISContext()->DeactivateStandardMode(AIS_Shape::SelectionType(2) ); TheAISContext()->ActivateStandardMode(AIS_Shape::SelectionType(1) ); - di<<" Slect a vertex."<<"\n"; + di<<" Slect a vertex.\n"; // Boucle d'attente waitpick. Standard_Integer argccc = 5; @@ -873,7 +873,7 @@ static int VPointBuilder(Draw_Interpretor& di, Standard_Integer argc, const char Standard_Integer myCurrentIndex; // Verification - if (argc<2 || argc>5 ) {di<<" Syntaxe error"<<"\n";return 1;} + if (argc<2 || argc>5 ) {di<<" Syntaxe error\n";return 1;} if (argc==5) HasArg=Standard_True; else HasArg=Standard_False; @@ -900,7 +900,7 @@ static int VPointBuilder(Draw_Interpretor& di, Standard_Integer argc, const char // Active le mode Vertex et Edges TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(1) ); TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(2) ); - di<<" Select a vertex or an edge(build the middle)"<<"\n"; + di<<" Select a vertex or an edge(build the middle)\n"; // Boucle d'attente waitpick. Standard_Integer argcc = 5; @@ -1064,21 +1064,21 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/, Abs(aCartPointB->Z()-aCartPointA->Z())<=Precision::Confusion()) { // B=A - std::cout<<"vplane error: same points"<<"\n";return 1; + std::cout<<"vplane error: same points\n";return 1; } if(Abs(aCartPointC->X()-aCartPointA->X())<=Precision::Confusion() && Abs(aCartPointC->Y()-aCartPointA->Y())<=Precision::Confusion() && Abs(aCartPointC->Z()-aCartPointA->Z())<=Precision::Confusion()) { // C=A - std::cout<<"vplane error: same points"<<"\n";return 1; + std::cout<<"vplane error: same points\n";return 1; } if(Abs(aCartPointC->X()-aCartPointB->X())<=Precision::Confusion() && Abs(aCartPointC->Y()-aCartPointB->Y())<=Precision::Confusion() && Abs(aCartPointC->Z()-aCartPointB->Z())<=Precision::Confusion()) { // C=B - std::cout<<"vplane error: same points"<<"\n";return 1; + std::cout<<"vplane error: same points\n";return 1; } gp_Pnt A = aCartPointA->Pnt(); @@ -1549,7 +1549,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/, } else { - std::cout<<" vplanepara: error"<<"\n";return 1; + std::cout<<" vplanepara: error\n";return 1; } } } @@ -1850,7 +1850,7 @@ static int VLineBuilder(Draw_Interpretor& di, Standard_Integer argc, const char* { Standard_Integer myCurrentIndex; // Verifications - if (argc!=4 && argc!=8 && argc!=2 ) {di<<"vline error: number of arguments not correct "<<"\n";return 1; } + if (argc!=4 && argc!=8 && argc!=2 ) {di<<"vline error: number of arguments not correct \n";return 1; } // Fermeture des contextes TheAISContext()->CloseAllContexts(); @@ -1872,11 +1872,11 @@ static int VLineBuilder(Draw_Interpretor& di, Standard_Integer argc, const char* if (theShapeA.IsNull() || (!(theShapeB->Type()==AIS_KOI_Datum && theShapeB->Signature()==1))) { - di <<"vline error: wrong type of 2de argument."<<"\n"; + di <<"vline error: wrong type of 2de argument.\n"; return 1; } } - else {di <<"vline error: wrong type of 1st argument."<<"\n";return 1; } + else {di <<"vline error: wrong type of 1st argument.\n";return 1; } // Les deux parametres sont du bon type. On verifie que les points ne sont pas confondus Handle(AIS_Point) theAISPointA= Handle(AIS_Point)::DownCast (theShapeA); Handle(AIS_Point) theAISPointB= Handle(AIS_Point)::DownCast (theShapeB); @@ -1891,7 +1891,7 @@ static int VLineBuilder(Draw_Interpretor& di, Standard_Integer argc, const char* if (myCartPointB->X()==myCartPointA->X() && myCartPointB->Y()==myCartPointA->Y() && myCartPointB->Z()==myCartPointA->Z() ) { // B=A - di<<"vline error: same points"<<"\n";return 1; + di<<"vline error: same points\n";return 1; } // Les deux points sont OK...Construction de l'AIS_Line (en faite, le segment AB) Handle(AIS_Line) theAISLine= new AIS_Line(myCartPointA,myCartPointB ); @@ -1930,7 +1930,7 @@ static int VLineBuilder(Draw_Interpretor& di, Standard_Integer argc, const char* // Active le mode Vertex. TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(1) ); - di<<" Select a vertex "<<"\n"; + di<<" Select a vertex \n"; // Boucle d'attente waitpick. Standard_Integer argcc = 5; @@ -1947,7 +1947,7 @@ static int VLineBuilder(Draw_Interpretor& di, Standard_Integer argc, const char* // ShapeA est un Vertex if (ShapeA.ShapeType()==TopAbs_VERTEX ) { - di<<" Select a different vertex."<<"\n"; + di<<" Select a different vertex.\n"; TopoDS_Shape ShapeB; do { @@ -1982,7 +1982,7 @@ static int VLineBuilder(Draw_Interpretor& di, Standard_Integer argc, const char* } else { - di<<"vline error."<<"\n"; + di<<"vline error.\n"; } } @@ -3250,7 +3250,7 @@ static int VComputeHLR (Draw_Interpretor& di, if ( argc != 3 && argc != 12 ) { di << "Usage: " << argv[0] << " ShapeName HlrName " - << "[ eye_x eye_y eye_z dir_x dir_y dir_z upx upy upz ]" << "\n" + << "[ eye_x eye_y eye_z dir_x dir_y dir_z upx upy upz ]\n" << " ShapeName - name of the initial shape\n" << " HlrName - result hlr object from initial shape\n" << " eye, dir are eye position and look direction\n" @@ -4179,13 +4179,13 @@ static Standard_Integer VDisconnect (Draw_Interpretor& di, Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if (aContext.IsNull()) { - std::cout << argv[0] << "ERROR : use 'vinit' command before " << "\n"; + std::cout << argv[0] << "ERROR : use 'vinit' command before \n"; return 1; } if (argc != 3) { - std::cout << "ERROR : Usage : " << argv[0] << " name object" << "\n"; + std::cout << "ERROR : Usage : " << argv[0] << " name object\n"; return 1; } @@ -4198,14 +4198,14 @@ static Standard_Integer VDisconnect (Draw_Interpretor& di, Handle(AIS_MultipleConnectedInteractive) anAssembly; if (!aMap.IsBound2 (aName) ) { - std::cout << "Use 'vdisplay' before" << "\n"; + std::cout << "Use 'vdisplay' before\n"; return 1; } anAssembly = Handle(AIS_MultipleConnectedInteractive)::DownCast (aMap.Find2 (aName)); if (anAssembly.IsNull()) { - di << "Not an assembly" << "\n"; + di << "Not an assembly\n"; return 1; } @@ -4228,7 +4228,7 @@ static Standard_Integer VDisconnect (Draw_Interpretor& di, } else { - std::cout << "Use 'vdisplay' before" << "\n"; + std::cout << "Use 'vdisplay' before\n"; return 1; } } @@ -4256,7 +4256,7 @@ static Standard_Integer VAddConnected (Draw_Interpretor& di, Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if (aContext.IsNull()) { - std::cout << argv[0] << "error : use 'vinit' command before " << "\n"; + std::cout << argv[0] << "error : use 'vinit' command before \n"; return 1; } @@ -4277,21 +4277,21 @@ static Standard_Integer VAddConnected (Draw_Interpretor& di, Handle(AIS_MultipleConnectedInteractive) anAssembly; if (!aMap.IsBound2 (aName) ) { - std::cout << "Use 'vdisplay' before" << "\n"; + std::cout << "Use 'vdisplay' before\n"; return 1; } anAssembly = Handle(AIS_MultipleConnectedInteractive)::DownCast (aMap.Find2 (aName)); if (anAssembly.IsNull()) { - di << "Not an assembly" << "\n"; + di << "Not an assembly\n"; return 1; } Handle(AIS_InteractiveObject) anIObj; if (!aMap.IsBound2 (anObject)) { - std::cout << "Use 'vdisplay' before" << "\n"; + std::cout << "Use 'vdisplay' before\n"; return 1; } @@ -4319,13 +4319,13 @@ static Standard_Integer VListConnected (Draw_Interpretor& /*di*/, Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if (aContext.IsNull()) { - std::cout << argv[0] << "ERROR : use 'vinit' command before " << "\n"; + std::cout << argv[0] << "ERROR : use 'vinit' command before \n"; return 1; } if (argc != 2) { - std::cout << "ERROR : Usage : " << argv[0] << " name" << "\n"; + std::cout << "ERROR : Usage : " << argv[0] << " name\n"; return 1; } @@ -4336,14 +4336,14 @@ static Standard_Integer VListConnected (Draw_Interpretor& /*di*/, Handle(AIS_MultipleConnectedInteractive) anAssembly; if (!aMap.IsBound2 (aName) ) { - std::cout << "Use 'vdisplay' before" << "\n"; + std::cout << "Use 'vdisplay' before\n"; return 1; } anAssembly = Handle(AIS_MultipleConnectedInteractive)::DownCast (aMap.Find2 (aName)); if (anAssembly.IsNull()) { - std::cout << "Not an assembly" << "\n"; + std::cout << "Not an assembly\n"; return 1; } @@ -4916,7 +4916,7 @@ static Standard_Integer VObjZLayer (Draw_Interpretor& di, ViewerTest_DoubleMapOfInteractiveAndName& aMap = GetMapOfAIS(); if (!aMap.IsBound2 (aName)) { - di << "Use 'vdisplay' before" << "\n"; + di << "Use 'vdisplay' before\n"; return 1; } diff --git a/src/ViewerTest/ViewerTest_RelationCommands.cxx b/src/ViewerTest/ViewerTest_RelationCommands.cxx index 140ef984ab..51222c98ba 100644 --- a/src/ViewerTest/ViewerTest_RelationCommands.cxx +++ b/src/ViewerTest/ViewerTest_RelationCommands.cxx @@ -866,7 +866,7 @@ static int VDiameterDimBuilder(Draw_Interpretor& di, Standard_Integer argc, cons // Verification if (argc != 2) { - di<<" vdiameterdim error"<<"\n"; + di<<" vdiameterdim error\n"; return 1; } @@ -878,7 +878,7 @@ static int VDiameterDimBuilder(Draw_Interpretor& di, Standard_Integer argc, cons // Activate 'edge' selection mode TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(2) ); - di<<" Select an circled edge."<<"\n"; + di<<" Select an circled edge.\n"; // Loop that will handle the picking. Standard_Integer argcc = 5; @@ -895,13 +895,13 @@ static int VDiameterDimBuilder(Draw_Interpretor& di, Standard_Integer argc, cons if (aShape.IsNull()) { - di << argv[0] << ": no shape is selected." << "\n"; + di << argv[0] << ": no shape is selected.\n"; return 1; } if (aShape.ShapeType() != TopAbs_EDGE) { - di << " vdiameterdim error: the selection of a face or an edge was expected." << "\n"; + di << " vdiameterdim error: the selection of a face or an edge was expected.\n"; return 1; } @@ -910,7 +910,7 @@ static int VDiameterDimBuilder(Draw_Interpretor& di, Standard_Integer argc, cons if (aCurve.GetType() != GeomAbs_Circle) { - di << "vdiameterdim error: the edge is not a circular one." << "\n"; + di << "vdiameterdim error: the edge is not a circular one.\n"; return 1; } @@ -939,7 +939,7 @@ static int VConcentricBuilder(Draw_Interpretor& di, Standard_Integer argc, const Standard_Integer myCurrentIndex; // Verification - if (argc!=2) {di<<"vconcentric error."<<"\n";return 1;} + if (argc!=2) {di<<"vconcentric error.\n";return 1;} // Fermeture des contextes locaux TheAISContext()->CloseAllContexts(); // Ouverture d'un contexte local et recuperation de son index. @@ -948,7 +948,7 @@ static int VConcentricBuilder(Draw_Interpretor& di, Standard_Integer argc, const // On active les modes de selections Edges et Faces. TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(2) ); - di<<" Select a circled edge."<<"\n"; + di<<" Select a circled edge.\n"; // Boucle d'attente waitpick. Standard_Integer argcc = 5; @@ -965,7 +965,7 @@ static int VConcentricBuilder(Draw_Interpretor& di, Standard_Integer argc, const // ================== if (ShapeA.ShapeType()==TopAbs_EDGE ) { TheAISContext()->DeactivateStandardMode (AIS_Shape::SelectionType(4) ); - di<<" Select an edge."<<"\n"; + di<<" Select an edge.\n"; // Boucle d'attente waitpick. Standard_Integer argccc = 5; @@ -979,7 +979,7 @@ static int VConcentricBuilder(Draw_Interpretor& di, Standard_Integer argc, const ShapeB = TheAISContext()->SelectedShape(); } if (ShapeB.ShapeType()!=TopAbs_EDGE ) { - di<<" vconcentric error: select an edge."<<"\n";return 1; + di<<" vconcentric error: select an edge.\n";return 1; } // Construction du plane. @@ -1004,7 +1004,7 @@ static int VConcentricBuilder(Draw_Interpretor& di, Standard_Integer argc, const else { - di<<" vconcentric error: the selection of a face or an edge was expected."<<"\n";return 1; + di<<" vconcentric error: the selection of a face or an edge was expected.\n";return 1; } return 0; @@ -1025,7 +1025,7 @@ static int VEqualDistRelation(Draw_Interpretor& di, Standard_Integer argc, const Standard_Integer myCurrentIndex; // Verification - if (argc!=2) {di<<" vequaldistrelation error: no arguments allowed."<<"\n";return 1;} + if (argc!=2) {di<<" vequaldistrelation error: no arguments allowed.\n";return 1;} // Fermeture des contextes locaux TheAISContext()->CloseAllContexts(); @@ -1037,7 +1037,7 @@ static int VEqualDistRelation(Draw_Interpretor& di, Standard_Integer argc, const // On active les modes de selections Edges et Vertexes. TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(2) ); TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(1) ); - di<<" Select an edge or a vertex"<<"\n"; + di<<" Select an edge or a vertex\n"; // Boucle d'attente waitpick. Standard_Integer argc1 = 5; @@ -1051,7 +1051,7 @@ static int VEqualDistRelation(Draw_Interpretor& di, Standard_Integer argc, const ShapeA = TheAISContext()->SelectedShape(); } - di<<" Select an edge or a vertex"<<"\n"; + di<<" Select an edge or a vertex\n"; // Boucle d'attente waitpick. Standard_Integer argc2 = 5; const char *buf2[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -1069,12 +1069,12 @@ static int VEqualDistRelation(Draw_Interpretor& di, Standard_Integer argc, const // A et B sont des edges ils doivent etre paralleles BRepExtrema_ExtCC myDeltaEdge (TopoDS::Edge(ShapeA) ,TopoDS::Edge(ShapeB) ); // on verifie qu'ils sont pas paralleles. - if (!myDeltaEdge.IsParallel() ) {di<<"vequaldist error: non parallel edges."<<"\n";return 1; } + if (!myDeltaEdge.IsParallel() ) {di<<"vequaldist error: non parallel edges.\n";return 1; } } - di<<" Select an edge or a vertex"<<"\n"; + di<<" Select an edge or a vertex\n"; // Boucle d'attente waitpick. Standard_Integer argc3 = 5; const char *buf3[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -1087,7 +1087,7 @@ static int VEqualDistRelation(Draw_Interpretor& di, Standard_Integer argc, const ShapeC = TheAISContext()->SelectedShape(); } - di<<" Select an edge or a vertex"<<"\n"; + di<<" Select an edge or a vertex\n"; // Boucle d'attente waitpick. Standard_Integer argc4 = 5; const char *buf4[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -1104,7 +1104,7 @@ static int VEqualDistRelation(Draw_Interpretor& di, Standard_Integer argc, const // C et D sont des edges ils doivent etre paralleles BRepExtrema_ExtCC myDeltaEdge2 (TopoDS::Edge(ShapeC) ,TopoDS::Edge(ShapeD) ); // on verifie qu'ils sont pas paralleles. - if (!myDeltaEdge2.IsParallel() ) {di<<"vequaldist error: non parallel edges."<<"\n";return 1; } + if (!myDeltaEdge2.IsParallel() ) {di<<"vequaldist error: non parallel edges.\n";return 1; } } @@ -1182,7 +1182,7 @@ static int VEqualRadiusRelation(Draw_Interpretor& di, Standard_Integer argc, con Standard_Integer myCurrentIndex; // Verification - if (argc!=2) {di<<" vequalrad error: no arguments allowed."<<"\n";return 1;} + if (argc!=2) {di<<" vequalrad error: no arguments allowed.\n";return 1;} // Fermeture des contextes locaux TheAISContext()->CloseAllContexts(); @@ -1193,7 +1193,7 @@ static int VEqualRadiusRelation(Draw_Interpretor& di, Standard_Integer argc, con // On active les modes de selections Edges. TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(2) ); - di<<" Select an circled edge "<<"\n"; + di<<" Select an circled edge \n"; // Boucle d'attente waitpick. Standard_Integer argc1 = 5; @@ -1207,7 +1207,7 @@ static int VEqualRadiusRelation(Draw_Interpretor& di, Standard_Integer argc, con ShapeA = TheAISContext()->SelectedShape(); } - di<<" Select the last circled edge."<<"\n"; + di<<" Select the last circled edge.\n"; // Boucle d'attente waitpick. Standard_Integer argc2 = 5; const char *buf2[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -1255,7 +1255,7 @@ static int VFixRelation(Draw_Interpretor& di, Standard_Integer argc, const char* Standard_Integer myCurrentIndex; // Verification - if (argc!=2) {di<<" vfix error: no arguments allowed."<<"\n";return 1;} + if (argc!=2) {di<<" vfix error: no arguments allowed.\n";return 1;} // Fermeture des contextes locaux TheAISContext()->CloseAllContexts(); @@ -1266,7 +1266,7 @@ static int VFixRelation(Draw_Interpretor& di, Standard_Integer argc, const char* // On active les modes de selections edge. TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(2) ); - di<<" Select an edge. "<<"\n"; + di<<" Select an edge. \n"; // Boucle d'attente waitpick. Standard_Integer argc1 = 5; @@ -1316,7 +1316,7 @@ static int VIdenticRelation(Draw_Interpretor& di, Standard_Integer argc, const c Standard_Integer myCurrentIndex; // Verification - if (argc!=2) {di<<" videntity error: no arguments allowed."<<"\n";return 1;} + if (argc!=2) {di<<" videntity error: no arguments allowed.\n";return 1;} // Fermeture des contextes locaux TheAISContext()->CloseAllContexts(); @@ -1329,7 +1329,7 @@ static int VIdenticRelation(Draw_Interpretor& di, Standard_Integer argc, const c TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(2) ); TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(1) ); TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(4) ); - di<<" Select an edge, a face or a vertex. "<<"\n"; + di<<" Select an edge, a face or a vertex. \n"; // Boucle d'attente waitpick. Standard_Integer argc1 = 5; @@ -1343,7 +1343,7 @@ static int VIdenticRelation(Draw_Interpretor& di, Standard_Integer argc, const c ShapeA = TheAISContext()->SelectedShape(); } - di<<" Select an edge, a face or a vertex. "<<"\n"; + di<<" Select an edge, a face or a vertex. \n"; // Boucle d'attente waitpick. Standard_Integer argc2 = 5; const char *buf2[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -1468,7 +1468,7 @@ static int VLenghtDimension(Draw_Interpretor& di, Standard_Integer argc, const c TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(4)); // First shape picking - di << " Select an edge, a face or a vertex. " << "\n"; + di << " Select an edge, a face or a vertex. \n"; // Loop that will handle the picking. Standard_Integer argc1 = 5; const char *buf1[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -1489,7 +1489,7 @@ static int VLenghtDimension(Draw_Interpretor& di, Standard_Integer argc, const c } // Second shape picking - di << " Select an edge, a face or a vertex. " << "\n"; + di << " Select an edge, a face or a vertex. \n"; // Loop that will handle the picking. Standard_Integer argc2 = 5; const char *buf2[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -1519,7 +1519,7 @@ static int VLenghtDimension(Draw_Interpretor& di, Standard_Integer argc, const c if (!myDeltaEdge.IsParallel()) { - di << argv[0] << " error: non parallel edges." << "\n"; + di << argv[0] << " error: non parallel edges.\n"; return 1; } @@ -1571,7 +1571,7 @@ static int VLenghtDimension(Draw_Interpretor& di, Standard_Integer argc, const c if (!aDeltaEdgeFace.IsParallel()) { - di << argv[0] << "error: the edge isn't parallel to the face;can't compute the distance." << "\n"; + di << argv[0] << "error: the edge isn't parallel to the face;can't compute the distance.\n"; return 1; } @@ -1669,7 +1669,7 @@ static int VLenghtDimension(Draw_Interpretor& di, Standard_Integer argc, const c if (!aDeltaEdgeFace.IsParallel()) { - di << argv[0] << " error: the edge isn't parallel to the face;can't compute the distance. " << "\n"; + di << argv[0] << " error: the edge isn't parallel to the face;can't compute the distance. \n"; return 1; } @@ -1715,7 +1715,7 @@ static int VLenghtDimension(Draw_Interpretor& di, Standard_Integer argc, const c if (!aDeltaFaceFace.IsParallel()) { - di << argv[0] << " error: the faces are not parallel. "<<"\n"; + di << argv[0] << " error: the faces are not parallel. \n"; return 1; } @@ -1744,7 +1744,7 @@ static int VRadiusDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const // Verification if (argc != 2) { - di << argv[0] << " error: wrong number of parameters." << "\n"; + di << argv[0] << " error: wrong number of parameters.\n"; return 1; } @@ -1758,7 +1758,7 @@ static int VRadiusDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const // Current selection modes - faces and edges TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(2)); TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(4)); - di << " Select a circled edge or face." << "\n"; + di << " Select a circled edge or face.\n"; // Loop that will be handle picking. Standard_Integer argcc = 5; @@ -1776,13 +1776,13 @@ static int VRadiusDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const if (aShape.IsNull()) { - di << argv[0] << ": no shape is selected." << "\n"; + di << argv[0] << ": no shape is selected.\n"; return 1; } if (aShape.ShapeType() != TopAbs_EDGE && aShape.ShapeType() != TopAbs_FACE) { - di << argv[0] << " error: the selection of a face or an edge was expected." << "\n"; + di << argv[0] << " error: the selection of a face or an edge was expected.\n"; return 1; } @@ -1803,7 +1803,7 @@ static int VRadiusDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const BRepAdaptor_Curve aCurve (anEdge); if (aCurve.GetType() != GeomAbs_Circle) { - di << argv[0] << " error: the edge is not a circular one." << "\n"; + di << argv[0] << " error: the edge is not a circular one.\n"; return 1; } // Close the context @@ -1830,7 +1830,7 @@ static int VOffsetDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const Standard_Real theDist; // Verification - if (argc!=2) {di<<" voffsetdim error"<<"\n";return 1;} + if (argc!=2) {di<<" voffsetdim error\n";return 1;} // Fermeture des contextes locaux TheAISContext()->CloseAllContexts(); @@ -1841,7 +1841,7 @@ static int VOffsetDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const // On active les modes de selections Faces. TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(4) ); - di<<" Select a face."<<"\n"; + di<<" Select a face.\n"; // Boucle d'attente waitpick. Standard_Integer argcc = 5; @@ -1855,7 +1855,7 @@ static int VOffsetDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const ShapeA = TheAISContext()->SelectedShape(); } - di<<" Select a face."<<"\n"; + di<<" Select a face.\n"; // Boucle d'attente waitpick. Standard_Integer argccc = 5; const char *bufff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -1877,7 +1877,7 @@ static int VOffsetDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const BRepExtrema_ExtFF myDeltaFaceFace (FaceA ,FaceB ); // On verifie que les deux faces sont bien parelles. - if (!myDeltaFaceFace.IsParallel() ) {di<<"vdistdim error: the faces are not parallel. "<<"\n";return 1; } + if (!myDeltaFaceFace.IsParallel() ) {di<<"vdistdim error: the faces are not parallel. \n";return 1; } // On saisit la distance et on l'arrondit! theDist=Round (sqrt (myDeltaFaceFace.SquareDistance(1))*10. )/10.; @@ -1896,7 +1896,7 @@ static int VOffsetDimBuilder(Draw_Interpretor& di, Standard_Integer argc, const } else { - di<<" voffsetdim error: the selection of a face was expected."<<"\n";return 1; + di<<" voffsetdim error: the selection of a face was expected.\n";return 1; } return 0; @@ -1917,7 +1917,7 @@ static int VParallelBuilder(Draw_Interpretor& di, Standard_Integer argc, const c Standard_Integer myCurrentIndex; // Verification - if (argc!=2) {di<<" vparallel error"<<"\n";return 1;} + if (argc!=2) {di<<" vparallel error\n";return 1;} // Fermeture des contextes locaux TheAISContext()->CloseAllContexts(); @@ -1929,7 +1929,7 @@ static int VParallelBuilder(Draw_Interpretor& di, Standard_Integer argc, const c // On active les modes de selections Edges. TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(2) ); TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(4) ); - di<<" Select an edge or a face "<<"\n"; + di<<" Select an edge or a face \n"; // Boucle d'attente waitpick. Standard_Integer argcc = 5; @@ -1949,7 +1949,7 @@ static int VParallelBuilder(Draw_Interpretor& di, Standard_Integer argc, const c // desactivation du mode face TheAISContext()->DeactivateStandardMode (AIS_Shape::SelectionType(4) ); - di<<" Select a second edge"<<"\n"; + di<<" Select a second edge\n"; // Boucle d'attente waitpick. Standard_Integer argccc = 5; const char *bufff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -1967,7 +1967,7 @@ static int VParallelBuilder(Draw_Interpretor& di, Standard_Integer argc, const c TopoDS_Edge EdgeB=TopoDS::Edge(ShapeB); BRepExtrema_ExtCC myDeltaEdge (EdgeA ,EdgeB ); // on verifie qu'ils ne sont pas paralleles. - if (!myDeltaEdge.IsParallel() ) {di<<"vparallel error: non parallel edges."<<"\n";return 1; } + if (!myDeltaEdge.IsParallel() ) {di<<"vparallel error: non parallel edges.\n";return 1; } // On recupere les vertexes extremites des edge A et B. @@ -1997,7 +1997,7 @@ static int VParallelBuilder(Draw_Interpretor& di, Standard_Integer argc, const c // desactivation du mode edge TheAISContext()->DeactivateStandardMode (AIS_Shape::SelectionType(2) ); - di<<" Select a second edge"<<"\n"; + di<<" Select a second edge\n"; // Boucle d'attente waitpick. Standard_Integer argccc = 5; const char *bufff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -2015,7 +2015,7 @@ static int VParallelBuilder(Draw_Interpretor& di, Standard_Integer argc, const c BRepExtrema_ExtFF myDeltaFaceFace (FaceA ,FaceB ); // On verifie que les deux faces sont bien parelles. - if (!myDeltaFaceFace.IsParallel() ) {di<<"vdistdim error: the faces are not parallel. "<<"\n";return 1; } + if (!myDeltaFaceFace.IsParallel() ) {di<<"vdistdim error: the faces are not parallel. \n";return 1; } // recuperation des edges des faces. TopExp_Explorer FaceExpA(FaceA,TopAbs_EDGE); @@ -2065,7 +2065,7 @@ static int VPerpendicularBuilder(Draw_Interpretor& di, Standard_Integer argc, co Standard_Integer myCurrentIndex; // Verification - if (argc!=2) {di<<" vortho error"<<"\n";return 1;} + if (argc!=2) {di<<" vortho error\n";return 1;} // Fermeture des contextes locaux TheAISContext()->CloseAllContexts(); @@ -2077,7 +2077,7 @@ static int VPerpendicularBuilder(Draw_Interpretor& di, Standard_Integer argc, co // On active les modes de selections Edges. TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(2) ); TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(4) ); - di<<" Select an edge or a face "<<"\n"; + di<<" Select an edge or a face \n"; // Boucle d'attente waitpick. Standard_Integer argcc = 5; @@ -2097,7 +2097,7 @@ static int VPerpendicularBuilder(Draw_Interpretor& di, Standard_Integer argc, co // desactivation du mode face TheAISContext()->DeactivateStandardMode (AIS_Shape::SelectionType(4) ); - di<<" Select a second edge"<<"\n"; + di<<" Select a second edge\n"; // Boucle d'attente waitpick. Standard_Integer argccc = 5; const char *bufff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -2145,7 +2145,7 @@ static int VPerpendicularBuilder(Draw_Interpretor& di, Standard_Integer argc, co // desactivation du mode edge TheAISContext()->DeactivateStandardMode (AIS_Shape::SelectionType(2) ); - di<<" Select a second edge"<<"\n"; + di<<" Select a second edge\n"; // Boucle d'attente waitpick. Standard_Integer argccc = 5; const char *bufff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -2207,7 +2207,7 @@ static int VTangentBuilder(Draw_Interpretor& di, Standard_Integer argc, const ch Standard_Integer myCurrentIndex; // Verification - if (argc!=2) {di<<" vtangent error"<<"\n";return 1;} + if (argc!=2) {di<<" vtangent error\n";return 1;} // Fermeture des contextes locaux TheAISContext()->CloseAllContexts(); @@ -2219,7 +2219,7 @@ static int VTangentBuilder(Draw_Interpretor& di, Standard_Integer argc, const ch // On active les modes de selections Edges. TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(2) ); TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(4) ); - di<<" Select two coplanar edges(First the circular edge then the tangent edge) or two faces "<<"\n"; + di<<" Select two coplanar edges(First the circular edge then the tangent edge) or two faces \n"; // Boucle d'attente waitpick. Standard_Integer argcc = 5; @@ -2239,7 +2239,7 @@ static int VTangentBuilder(Draw_Interpretor& di, Standard_Integer argc, const ch // desactivation du mode face TheAISContext()->DeactivateStandardMode (AIS_Shape::SelectionType(4) ); - di<<" Select a second edge"<<"\n"; + di<<" Select a second edge\n"; // Boucle d'attente waitpick. Standard_Integer argccc = 5; const char *bufff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -2284,7 +2284,7 @@ static int VTangentBuilder(Draw_Interpretor& di, Standard_Integer argc, const ch // desactivation du mode edge TheAISContext()->DeactivateStandardMode (AIS_Shape::SelectionType(2) ); - di<<" Select a second edge"<<"\n"; + di<<" Select a second edge\n"; // Boucle d'attente waitpick. Standard_Integer argccc = 5; const char *bufff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -2345,7 +2345,7 @@ static int VSymmetricBuilder(Draw_Interpretor& di, Standard_Integer argc, const Standard_Integer myCurrentIndex; // Verification - if (argc!=2) {di<<" vSymmetric error"<<"\n";return 1;} + if (argc!=2) {di<<" vSymmetric error\n";return 1;} // Fermeture des contextes locaux TheAISContext()->CloseAllContexts(); @@ -2356,7 +2356,7 @@ static int VSymmetricBuilder(Draw_Interpretor& di, Standard_Integer argc, const // On active les modes de selections TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(2) ); - di<<" Select an edge:the axis of symetry "<<"\n"; + di<<" Select an edge:the axis of symetry \n"; // Boucle d'attente waitpick. Standard_Integer argcc = 5; @@ -2375,7 +2375,7 @@ static int VSymmetricBuilder(Draw_Interpretor& di, Standard_Integer argc, const // On active les modes de selections TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(2) ); TheAISContext()->ActivateStandardMode (AIS_Shape::SelectionType(1) ); - di<<" Select two edges or two vertices. "<<"\n"; + di<<" Select two edges or two vertices. \n"; // Boucle d'attente waitpick. Standard_Integer argcc2 = 5; @@ -2399,7 +2399,7 @@ static int VSymmetricBuilder(Draw_Interpretor& di, Standard_Integer argc, const // desactivation du mode vertex TheAISContext()->DeactivateStandardMode (AIS_Shape::SelectionType(1) ); - di<<" Select a second edge"<<"\n"; + di<<" Select a second edge\n"; // Boucle d'attente waitpick. Standard_Integer argccc = 5; const char *bufff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -2419,8 +2419,8 @@ static int VSymmetricBuilder(Draw_Interpretor& di, Standard_Integer argc, const BRepExtrema_ExtCC myDeltaEdgeAB (EdgeA ,EdgeB ); BRepExtrema_ExtCC myDeltaEdgeAC (EdgeA ,EdgeC ); // on verifie qu'ils sont paralleles. - if (!myDeltaEdgeAB.IsParallel() ) {di<<"vsymetric error: non parallel edges."<<"\n";return 1; } - if (!myDeltaEdgeAC.IsParallel() ) {di<<"vsymetric error: non parallel edges."<<"\n";return 1; } + if (!myDeltaEdgeAB.IsParallel() ) {di<<"vsymetric error: non parallel edges.\n";return 1; } + if (!myDeltaEdgeAC.IsParallel() ) {di<<"vsymetric error: non parallel edges.\n";return 1; } // on recupere les vertexs TopoDS_Vertex Va,Vb,Vc,Vd; TopExp::Vertices(EdgeB,Va,Vb ); @@ -2449,7 +2449,7 @@ static int VSymmetricBuilder(Draw_Interpretor& di, Standard_Integer argc, const // desactivation du mode edge TheAISContext()->DeactivateStandardMode (AIS_Shape::SelectionType(2) ); - di<<" Select a second edge"<<"\n"; + di<<" Select a second edge\n"; // Boucle d'attente waitpick. Standard_Integer argccc = 5; const char *bufff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" }; @@ -2638,7 +2638,7 @@ static int VMoveDim (Draw_Interpretor& theDi, Standard_Integer theArgNum, const } if (!isPicked) { - theDi << theArgVec[0] << ": no dimension or relation is selected." << "\n"; + theDi << theArgVec[0] << ": no dimension or relation is selected.\n"; return 1; } } diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 8a3cdc160b..0cceba06b6 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -935,7 +935,7 @@ static int VHLRType (Draw_Interpretor& di, Standard_Integer argc, const char** a if (!aMap.IsBound2 (aName)) { - di << argv[0] << ":" << " Wrong shape name:" << aName.ToCString() << ".\n"; + di << argv[0] << ": Wrong shape name:" << aName.ToCString() << ".\n"; continue; } Handle(AIS_Shape) anAISObject = @@ -1281,7 +1281,7 @@ static int VViewList (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const if (isTreeView) { TCollection_AsciiString aContextName(aContextIter.Key1()); - theDi << " " << aContextName.Split(aDriverIter.Key1().Length() + 1) << ":" << "\n"; + theDi << " " << aContextName.Split(aDriverIter.Key1().Length() + 1) << ":\n"; } for (NCollection_DoubleMap ::Iterator @@ -1293,7 +1293,7 @@ static int VViewList (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const if (isTreeView) { if (aViewIter.Value() == ViewerTest::CurrentView()) - theDi << " " << aViewName.Split(aContextIter.Key1().Length() + 1) << "(*)" << "\n"; + theDi << " " << aViewName.Split(aContextIter.Key1().Length() + 1) << "(*)\n"; else theDi << " " << aViewName.Split(aContextIter.Key1().Length() + 1) << "\n"; } @@ -1733,7 +1733,7 @@ static int ViewProject(Draw_Interpretor& di, const V3d_TypeOfOrientation ori) { if ( ViewerTest::CurrentView().IsNull() ) { - di<<"Call vinit before this command, please"<<"\n"; + di<<"Call vinit before this command, please\n"; return 1; } @@ -1827,39 +1827,39 @@ static int VBack(Draw_Interpretor& di, Standard_Integer , const char** ) static int VHelp(Draw_Interpretor& di, Standard_Integer , const char** ) { - di << "Q : Quit the application" << "\n"; - - di << "========================="<<"\n"; - di << "F : FitAll" << "\n"; - di << "T : TopView" << "\n"; - di << "B : BottomView" << "\n"; - di << "R : RightView" << "\n"; - di << "L : LeftView" << "\n"; - di << "A : AxonometricView" << "\n"; - di << "D : ResetView" << "\n"; - - di << "========================="<<"\n"; - di << "S : Shading" << "\n"; - di << "W : Wireframe" << "\n"; - di << "H : HidelLineRemoval" << "\n"; - di << "U : Unset display mode" << "\n"; - di << "Delete : Remove selection from viewer" << "\n"; - - di << "========================="<<"\n"; - di << "Selection mode "<<"\n"; - di << "0 : Shape" <<"\n"; - di << "1 : Vertex" <<"\n"; - di << "2 : Edge" <<"\n"; - di << "3 : Wire" <<"\n"; - di << "4 : Face" <<"\n"; - di << "5 : Shell" <<"\n"; - di << "6 : Solid" <<"\n"; - di << "7 : Compound" <<"\n"; - - di << "========================="<<"\n"; - di << "Z : Switch Z clipping On/Off" << "\n"; - di << ", : Hilight next detected" << "\n"; - di << ". : Hilight previous detected" << "\n"; + di << "Q : Quit the application\n"; + + di << "=========================\n"; + di << "F : FitAll\n"; + di << "T : TopView\n"; + di << "B : BottomView\n"; + di << "R : RightView\n"; + di << "L : LeftView\n"; + di << "A : AxonometricView\n"; + di << "D : ResetView\n"; + + di << "=========================\n"; + di << "S : Shading\n"; + di << "W : Wireframe\n"; + di << "H : HidelLineRemoval\n"; + di << "U : Unset display mode\n"; + di << "Delete : Remove selection from viewer\n"; + + di << "=========================\n"; + di << "Selection mode \n"; + di << "0 : Shape\n"; + di << "1 : Vertex\n"; + di << "2 : Edge\n"; + di << "3 : Wire\n"; + di << "4 : Face\n"; + di << "5 : Shell\n"; + di << "6 : Solid\n"; + di << "7 : Compound\n"; + + di << "=========================\n"; + di << "Z : Switch Z clipping On/Off\n"; + di << ", : Hilight next detected\n"; + di << ". : Hilight previous detected\n"; return 0; } @@ -2657,7 +2657,7 @@ static int VPick(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (ViewerTest::CurrentView().IsNull() ) return 1; if ( argc < 4 ) { - di << argv[0] << "Invalid number of arguments" << "\n"; + di << argv[0] << "Invalid number of arguments\n"; return 1; } @@ -2676,8 +2676,8 @@ static int VSetBg(Draw_Interpretor& di, Standard_Integer argc, const char** argv { if (argc < 2 || argc > 3) { - di << "Usage : " << argv[0] << " imagefile [filltype] : Load image as background" << "\n"; - di << "filltype can be one of CENTERED, TILED, STRETCH, NONE" << "\n"; + di << "Usage : " << argv[0] << " imagefile [filltype] : Load image as background\n"; + di << "filltype can be one of CENTERED, TILED, STRETCH, NONE\n"; return 1; } @@ -2699,7 +2699,7 @@ static int VSetBg(Draw_Interpretor& di, Standard_Integer argc, const char** argv else { di << "Wrong fill type : " << szType << "\n"; - di << "Must be one of CENTERED, TILED, STRETCH, NONE" << "\n"; + di << "Must be one of CENTERED, TILED, STRETCH, NONE\n"; return 1; } } @@ -2719,8 +2719,8 @@ static int VSetBgMode(Draw_Interpretor& di, Standard_Integer argc, const char** { if (argc != 2) { - di << "Usage : " << argv[0] << " filltype : Change background image mode" << "\n"; - di << "filltype must be one of CENTERED, TILED, STRETCH, NONE" << "\n"; + di << "Usage : " << argv[0] << " filltype : Change background image mode\n"; + di << "filltype must be one of CENTERED, TILED, STRETCH, NONE\n"; return 1; } @@ -2739,7 +2739,7 @@ static int VSetBgMode(Draw_Interpretor& di, Standard_Integer argc, const char** else { di << "Wrong fill type : " << szType << "\n"; - di << "Must be one of CENTERED, TILED, STRETCH, NONE" << "\n"; + di << "Must be one of CENTERED, TILED, STRETCH, NONE\n"; return 1; } Handle(V3d_View) V3dView = ViewerTest::CurrentView(); @@ -2755,10 +2755,10 @@ static int VSetGradientBg(Draw_Interpretor& di, Standard_Integer argc, const cha { if (argc != 8 ) { - di << "Usage : " << argv[0] << " R1 G1 B1 R2 G2 B2 Type : Mount gradient background" << "\n"; - di << "R1,G1,B1,R2,G2,B2 = [0..255]" << "\n"; - di << "Type must be one of 0 = NONE, 1 = HOR, 2 = VER, 3 = DIAG1, 4 = DIAG2" << "\n"; - di << " 5 = CORNER1, 6 = CORNER2, 7 = CORNER3, 8 = CORNER4" << "\n"; + di << "Usage : " << argv[0] << " R1 G1 B1 R2 G2 B2 Type : Mount gradient background\n"; + di << "R1,G1,B1,R2,G2,B2 = [0..255]\n"; + di << "Type must be one of 0 = NONE, 1 = HOR, 2 = VER, 3 = DIAG1, 4 = DIAG2\n"; + di << " 5 = CORNER1, 6 = CORNER2, 7 = CORNER3, 8 = CORNER4\n"; return 1; } @@ -2784,9 +2784,9 @@ static int VSetGradientBg(Draw_Interpretor& di, Standard_Integer argc, const cha int aType = Draw::Atoi(argv[7]); if( aType < 0 || aType > 8 ) { - di << "Wrong fill type " << "\n"; - di << "Must be one of 0 = NONE, 1 = HOR, 2 = VER, 3 = DIAG1, 4 = DIAG2" << "\n"; - di << " 5 = CORNER1, 6 = CORNER2, 7 = CORNER3, 8 = CORNER4" << "\n"; + di << "Wrong fill type \n"; + di << "Must be one of 0 = NONE, 1 = HOR, 2 = VER, 3 = DIAG1, 4 = DIAG2\n"; + di << " 5 = CORNER1, 6 = CORNER2, 7 = CORNER3, 8 = CORNER4\n"; return 1; } @@ -2807,9 +2807,9 @@ static int VSetGradientBgMode(Draw_Interpretor& di, Standard_Integer argc, const { if (argc != 2 ) { - di << "Usage : " << argv[0] << " Type : Change gradient background fill type" << "\n"; - di << "Type must be one of 0 = NONE, 1 = HOR, 2 = VER, 3 = DIAG1, 4 = DIAG2" << "\n"; - di << " 5 = CORNER1, 6 = CORNER2, 7 = CORNER3, 8 = CORNER4" << "\n"; + di << "Usage : " << argv[0] << " Type : Change gradient background fill type\n"; + di << "Type must be one of 0 = NONE, 1 = HOR, 2 = VER, 3 = DIAG1, 4 = DIAG2\n"; + di << " 5 = CORNER1, 6 = CORNER2, 7 = CORNER3, 8 = CORNER4\n"; return 1; } @@ -2824,9 +2824,9 @@ static int VSetGradientBgMode(Draw_Interpretor& di, Standard_Integer argc, const int aType = Draw::Atoi(argv[1]); if( aType < 0 || aType > 8 ) { - di << "Wrong fill type " << "\n"; - di << "Must be one of 0 = NONE, 1 = HOR, 2 = VER, 3 = DIAG1, 4 = DIAG2" << "\n"; - di << " 5 = CORNER1, 6 = CORNER2, 7 = CORNER3, 8 = CORNER4" << "\n"; + di << "Wrong fill type \n"; + di << "Must be one of 0 = NONE, 1 = HOR, 2 = VER, 3 = DIAG1, 4 = DIAG2\n"; + di << " 5 = CORNER1, 6 = CORNER2, 7 = CORNER3, 8 = CORNER4\n"; return 1; } @@ -2847,8 +2847,8 @@ static int VSetColorBg(Draw_Interpretor& di, Standard_Integer argc, const char** { if (argc != 4 ) { - di << "Usage : " << argv[0] << " R G B : Set color background" << "\n"; - di << "R,G,B = [0..255]" << "\n"; + di << "Usage : " << argv[0] << " R G B : Set color background\n"; + di << "R,G,B = [0..255]\n"; return 1; } @@ -2936,7 +2936,7 @@ static int VScale(Draw_Interpretor& di, Standard_Integer argc, const char** argv if ( V3dView.IsNull() ) return 1; if ( argc != 4 ) { - di << argv[0] << "Invalid number of arguments" << "\n"; + di << argv[0] << "Invalid number of arguments\n"; return 1; } V3dView->SetAxialScale( Draw::Atof(argv[1]), Draw::Atof(argv[2]), Draw::Atof(argv[3]) ); @@ -3267,13 +3267,13 @@ static int VZoom( Draw_Interpretor& di, Standard_Integer argc, const char** argv if ( argc == 2 ) { Standard_Real coef = Draw::Atof(argv[1]); if ( coef <= 0.0 ) { - di << argv[1] << "Invalid value" << "\n"; + di << argv[1] << "Invalid value\n"; return 1; } V3dView->SetZoom( Draw::Atof(argv[1]) ); return 0; } else { - di << argv[0] << " Invalid number of arguments" << "\n"; + di << argv[0] << " Invalid number of arguments\n"; return 1; } } @@ -3291,7 +3291,7 @@ static int VPan( Draw_Interpretor& di, Standard_Integer argc, const char** argv V3dView->Pan( Draw::Atoi(argv[1]), Draw::Atoi(argv[2]) ); return 0; } else { - di << argv[0] << " Invalid number of arguments" << "\n"; + di << argv[0] << " Invalid number of arguments\n"; return 1; } } @@ -4053,7 +4053,7 @@ static int VGraduatedTrihedron (Draw_Interpretor& /*theDi*/, Standard_Integer th Handle(AIS_InteractiveContext) anAISContext = ViewerTest::GetAISContext(); if (anAISContext.IsNull()) { - std::cout << theArgs[0] << ": " << " please use 'vinit' command to initialize view.\n"; + std::cout << theArgs[0] << ": please use 'vinit' command to initialize view.\n"; return 1; } @@ -5775,7 +5775,7 @@ static Standard_Integer VSelect (Draw_Interpretor& di, { if(argc < 3) { - di << "Usage : " << argv[0] << " x1 y1 [x2 y2 [... xn yn]] [shift_selection = 1|0]" << "\n"; + di << "Usage : " << argv[0] << " x1 y1 [x2 y2 [... xn yn]] [shift_selection = 1|0]\n"; return 1; } @@ -5847,7 +5847,7 @@ static Standard_Integer VMoveTo (Draw_Interpretor& di, { if(argc != 3) { - di << "Usage : " << argv[0] << " x y" << "\n"; + di << "Usage : " << argv[0] << " x y\n"; return 1; } @@ -6108,8 +6108,8 @@ static Standard_Integer VZClipping (Draw_Interpretor& di, { if(argc>4) { - di << "Usage : " << argv[0] << " [mode] [depth width]" << "\n" - <<"mode = OFF|BACK|FRONT|SLICE depth = [0..1] width = [0..1]" << "\n"; + di << "Usage : " << argv[0] << " [mode] [depth width]\n" + <<"mode = OFF|BACK|FRONT|SLICE depth = [0..1] width = [0..1]\n"; return -1; } Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); @@ -6170,8 +6170,8 @@ static Standard_Integer VZClipping (Draw_Interpretor& di, } if (aStatus != 1) { - di << "Bad mode; Usage : " << argv[0] << " [mode] [depth width]" << "\n" - << "mode = OFF|BACK|FRONT|SLICE depth = [0..1] width = [0..1]" << "\n"; + di << "Bad mode; Usage : " << argv[0] << " [mode] [depth width]\n" + << "mode = OFF|BACK|FRONT|SLICE depth = [0..1] width = [0..1]\n"; return 1; } aView->SetZClippingType(aZClippingMode); @@ -6192,14 +6192,14 @@ static Standard_Integer VZClipping (Draw_Interpretor& di, if(aDepth<0. || aDepth>1.) { - di << "Bad depth; Usage : " << argv[0] << " [mode] [depth width]" << "\n" - << "mode = OFF|BACK|FRONT|SLICE depth = [0..1] width = [0..1]" << "\n"; + di << "Bad depth; Usage : " << argv[0] << " [mode] [depth width]\n" + << "mode = OFF|BACK|FRONT|SLICE depth = [0..1] width = [0..1]\n"; return 1; } if(aWidth<0. || aWidth>1.) { - di << "Bad width; Usage : " << argv[0] << " [mode] [depth width]" << "\n" - << "mode = OFF|BACK|FRONT|SLICE depth = [0..1] width = [0..1]" << "\n"; + di << "Bad width; Usage : " << argv[0] << " [mode] [depth width]\n" + << "mode = OFF|BACK|FRONT|SLICE depth = [0..1] width = [0..1]\n"; return 1; } @@ -6244,7 +6244,7 @@ static Standard_Integer VAntialiasing (Draw_Interpretor& di, { if(argc > 2) { - di << "Usage : " << argv[0] << " [1|0]" << "\n"; + di << "Usage : " << argv[0] << " [1|0]\n"; return 1; } @@ -7068,7 +7068,7 @@ static int VAutoZFit (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const if (theArgsNb < 2) { - theDi << "Auto z-fit mode: " << "\n" + theDi << "Auto z-fit mode: \n" << "On: " << (aCurrentView->AutoZFitMode() ? "enabled" : "disabled") << "\n" << "Scale: " << aScale << "\n"; return 0; @@ -8768,13 +8768,13 @@ static Standard_Integer VXRotate (Draw_Interpretor& di, Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if (aContext.IsNull()) { - di << argv[0] << "ERROR : use 'vinit' command before " << "\n"; + di << argv[0] << "ERROR : use 'vinit' command before \n"; return 1; } if (argc != 3) { - di << "ERROR : Usage : " << argv[0] << " name angle" << "\n"; + di << "ERROR : Usage : " << argv[0] << " name angle\n"; return 1; } @@ -8786,7 +8786,7 @@ static Standard_Integer VXRotate (Draw_Interpretor& di, Handle(AIS_InteractiveObject) anIObj; if (!aMap.IsBound2 (aName) ) { - di << "Use 'vdisplay' before" << "\n"; + di << "Use 'vdisplay' before\n"; return 1; } else diff --git a/src/Vrml/Vrml.cxx b/src/Vrml/Vrml.cxx index 07af5d2e43..77a357f29b 100644 --- a/src/Vrml/Vrml.cxx +++ b/src/Vrml/Vrml.cxx @@ -18,16 +18,16 @@ Standard_OStream& Vrml::VrmlHeaderWriter(Standard_OStream& anOStream) { - anOStream << "#VRML V1.0 ascii" << endl; - anOStream << endl; - anOStream << "# Generated by Open CASCADE Technology " << OCC_VERSION_STRING << endl; - anOStream << endl; + anOStream << "#VRML V1.0 ascii\n"; + anOStream << "\n"; + anOStream << "# Generated by Open CASCADE Technology " << OCC_VERSION_STRING << "\n"; + anOStream << "\n"; return anOStream; } Standard_OStream& Vrml::CommentWriter(const Standard_CString aComment, Standard_OStream& anOStream) { - anOStream << "# " << aComment << endl; + anOStream << "# " << aComment << "\n"; return anOStream; } diff --git a/src/Vrml/Vrml_AsciiText.cxx b/src/Vrml/Vrml_AsciiText.cxx index abd038b5b6..d2e3ab0638 100644 --- a/src/Vrml/Vrml_AsciiText.cxx +++ b/src/Vrml/Vrml_AsciiText.cxx @@ -80,42 +80,42 @@ Standard_OStream& Vrml_AsciiText::Print(Standard_OStream& anOStream) const { Standard_Integer i; - anOStream << "AsciiText {" << endl; + anOStream << "AsciiText {\n"; i = myString->Lower(); if ( myString->Length() != 1 || myString->Value(i) != "" ) { - anOStream << " string [" << endl << '\t'; + anOStream << " string [\n\t"; for ( i = myString->Lower(); i <= myString->Upper(); i++ ) { anOStream << '"' << myString->Value(i) << '"'; if ( i < myString->Length() ) - anOStream << ',' << endl << '\t'; + anOStream << ",\n\t"; } - anOStream << " ]" << endl; + anOStream << " ]\n"; } if ( Abs(mySpacing - 1 ) > 0.0001 ) { - anOStream << " spacing" << "\t\t"; - anOStream << mySpacing << endl; + anOStream << " spacing\t\t"; + anOStream << mySpacing << "\n"; } switch ( myJustification ) { - case Vrml_LEFT: break; // anOStream << " justification" << "\t LEFT"; - case Vrml_CENTER: anOStream << " justification" << "\tCENTER" << endl; break; - case Vrml_RIGHT: anOStream << " justification" << "\tRIGHT" << endl; break; + case Vrml_LEFT: break; // anOStream << " justification\t LEFT"; + case Vrml_CENTER: anOStream << " justification\tCENTER\n"; break; + case Vrml_RIGHT: anOStream << " justification\tRIGHT\n"; break; } if ( Abs(myWidth - 0 ) > 0.0001 ) { - anOStream << " width" << "\t\t"; - anOStream << myWidth << endl; + anOStream << " width\t\t"; + anOStream << myWidth << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Cone.cxx b/src/Vrml/Vrml_Cone.cxx index aed135200e..c769d84912 100644 --- a/src/Vrml/Vrml_Cone.cxx +++ b/src/Vrml/Vrml_Cone.cxx @@ -55,27 +55,27 @@ Vrml_Cone::Vrml_Cone(const Vrml_ConeParts aParts, Standard_OStream& Vrml_Cone::Print(Standard_OStream& anOStream) const { - anOStream << "Cone {" << endl; + anOStream << "Cone {\n"; switch ( myParts ) { - case Vrml_ConeALL: break; // anOStream << " parts" << "\t\tALL "; - case Vrml_ConeSIDES: anOStream << " parts" << "\t\tSIDES" << endl; break; - case Vrml_ConeBOTTOM: anOStream << " parts" << "\t\tBOTTOM" << endl; break; + case Vrml_ConeALL: break; // anOStream << " parts\t\tALL "; + case Vrml_ConeSIDES: anOStream << " parts\t\tSIDES\n"; break; + case Vrml_ConeBOTTOM: anOStream << " parts\t\tBOTTOM\n"; break; } if ( Abs(myBottomRadius - 1 ) > 0.0001 ) { - anOStream << " bottomRadius" << '\t'; - anOStream << myBottomRadius << endl; + anOStream << " bottomRadius\t"; + anOStream << myBottomRadius << "\n"; } if ( Abs(myHeight - 2 ) > 0.0001 ) { - anOStream << " height" << "\t\t"; - anOStream << myHeight << endl; + anOStream << " height\t\t"; + anOStream << myHeight << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Coordinate3.cxx b/src/Vrml/Vrml_Coordinate3.cxx index 35c2cdbc59..6645dd8b0e 100644 --- a/src/Vrml/Vrml_Coordinate3.cxx +++ b/src/Vrml/Vrml_Coordinate3.cxx @@ -43,28 +43,28 @@ Standard_OStream& Vrml_Coordinate3::Print(Standard_OStream& anOStream) const { Standard_Integer i; - anOStream << "Coordinate3 {" << endl; + anOStream << "Coordinate3 {\n"; i = myPoint->Lower(); if ( myPoint->Length() == 1 && Abs(myPoint->Value(i).X() - 0) < 0.0001 && Abs(myPoint->Value(i).Y() - 0) < 0.0001 && Abs(myPoint->Value(i).Z() - 0) < 0.0001 ) { - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } else { - anOStream << " point [" << endl << '\t'; + anOStream << " point [\n\t"; for ( i = myPoint->Lower(); i <= myPoint->Upper(); i++ ) { anOStream << myPoint->Value(i).X() << ' ' << myPoint->Value(i).Y() << ' ' << myPoint->Value(i).Z(); if ( i < myPoint->Length() ) - anOStream << ',' << endl << '\t'; + anOStream << ",\n\t"; } - anOStream << " ]" << endl; + anOStream << " ]\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Cube.cxx b/src/Vrml/Vrml_Cube.cxx index 8a062058f7..79988707e9 100644 --- a/src/Vrml/Vrml_Cube.cxx +++ b/src/Vrml/Vrml_Cube.cxx @@ -55,27 +55,27 @@ Vrml_Cube::Vrml_Cube(const Standard_Real aWidth, Standard_OStream& Vrml_Cube::Print(Standard_OStream& anOStream) const { - anOStream << "Cube {" << endl; + anOStream << "Cube {\n"; if ( Abs(myWidth - 2) > 0.0001 ) { - anOStream << " width" << '\t'; - anOStream << myWidth << endl; + anOStream << " width\t"; + anOStream << myWidth << "\n"; } if ( Abs(myHeight - 2) > 0.0001 ) { - anOStream << " height" << '\t'; - anOStream << myHeight << endl; + anOStream << " height\t"; + anOStream << myHeight << "\n"; } if ( Abs(myDepth - 2) > 0.0001 ) { - anOStream << " depth" << '\t'; - anOStream << myDepth << endl; + anOStream << " depth\t"; + anOStream << myDepth << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Cylinder.cxx b/src/Vrml/Vrml_Cylinder.cxx index 6f622f95ae..77abdc4e48 100644 --- a/src/Vrml/Vrml_Cylinder.cxx +++ b/src/Vrml/Vrml_Cylinder.cxx @@ -55,29 +55,29 @@ Vrml_Cylinder::Vrml_Cylinder(const Vrml_CylinderParts aParts, Standard_OStream& Vrml_Cylinder::Print(Standard_OStream& anOStream) const { - anOStream << "Cylinder {" << endl; + anOStream << "Cylinder {\n"; switch ( myParts ) { - case Vrml_CylinderALL: break; // anOStream << "\tparts" << "\tALL "; - case Vrml_CylinderSIDES: anOStream << " parts" << "\tSIDES" << endl; break; - case Vrml_CylinderTOP: anOStream << " parts" << "\tTOP" << endl; break; - case Vrml_CylinderBOTTOM: anOStream << " parts" << "\tBOTTOM" << endl; break; + case Vrml_CylinderALL: break; // anOStream << "\tparts\tALL "; + case Vrml_CylinderSIDES: anOStream << " parts\tSIDES\n"; break; + case Vrml_CylinderTOP: anOStream << " parts\tTOP\n"; break; + case Vrml_CylinderBOTTOM: anOStream << " parts\tBOTTOM\n"; break; } if ( Abs(myRadius - 1) > 0.0001 ) { - anOStream << " radius" << '\t'; - anOStream << myRadius << endl; + anOStream << " radius\t"; + anOStream << myRadius << "\n"; } if ( Abs(myHeight - 2) > 0.0001 ) { - anOStream << " height" << '\t'; - anOStream << myHeight << endl; + anOStream << " height\t"; + anOStream << myHeight << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_DirectionalLight.cxx b/src/Vrml/Vrml_DirectionalLight.cxx index 307190ba8a..3b24d06eb9 100644 --- a/src/Vrml/Vrml_DirectionalLight.cxx +++ b/src/Vrml/Vrml_DirectionalLight.cxx @@ -88,26 +88,26 @@ gp_Vec Vrml_DirectionalLight::Direction() const Standard_OStream& Vrml_DirectionalLight::Print(Standard_OStream& anOStream) const { - anOStream << "DirectionalLight {" << endl; + anOStream << "DirectionalLight {\n"; if ( myOnOff != Standard_True ) { - anOStream << " on" << "\t\t" << "FALSE" << endl; -// anOStream << myOnOff << endl; + anOStream << " on\t\tFALSE\n"; +// anOStream << myOnOff << "\n"; } if ( Abs(myIntensity - 1) > 0.0001 ) { - anOStream << " intensity" << '\t'; - anOStream << myIntensity << endl; + anOStream << " intensity\t"; + anOStream << myIntensity << "\n"; } if ( Abs(myColor.Red() - 1) > 0.0001 || Abs(myColor.Green() - 1) > 0.0001 || Abs(myColor.Blue() - 1) > 0.0001 ) { - anOStream << " color" << '\t'; - anOStream << myColor.Red() << ' ' << myColor.Green() << ' ' << myColor.Blue() << endl; + anOStream << " color\t"; + anOStream << myColor.Red() << " " << myColor.Green() << " " << myColor.Blue() << "\n"; } if ( Abs(myDirection.X() - 0) > 0.0001 || @@ -115,9 +115,9 @@ Standard_OStream& Vrml_DirectionalLight::Print(Standard_OStream& anOStream) cons Abs(myDirection.Z() + 1) > 0.0001 ) { anOStream << " direction" << '\t'; - anOStream << myDirection.X() << ' ' << myDirection.Y() << ' ' << myDirection.Z() << endl; + anOStream << myDirection.X() << " " << myDirection.Y() << " " << myDirection.Z() << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_FontStyle.cxx b/src/Vrml/Vrml_FontStyle.cxx index 72f8c45514..48667c4380 100644 --- a/src/Vrml/Vrml_FontStyle.cxx +++ b/src/Vrml/Vrml_FontStyle.cxx @@ -55,29 +55,29 @@ Vrml_FontStyle::Vrml_FontStyle(const Standard_Real aSize, Standard_OStream& Vrml_FontStyle::Print(Standard_OStream& anOStream) const { - anOStream << "FontStyle {" << endl; + anOStream << "FontStyle {\n"; if ( Abs(mySize - 10) > 0.0001 ) { - anOStream << " size" << '\t'; - anOStream << mySize << endl; + anOStream << " size\t"; + anOStream << mySize << "\n"; } switch ( myFamily ) { - case Vrml_SERIF: break; // anOStream << " family" << "\tSERIF "; - case Vrml_SANS: anOStream << " family" << "\tSANS" << endl; break; - case Vrml_TYPEWRITER: anOStream << " family" << "\tTYPEWRITER" << endl; break; + case Vrml_SERIF: break; // anOStream << " family\tSERIF "; + case Vrml_SANS: anOStream << " family\tSANS\n"; break; + case Vrml_TYPEWRITER: anOStream << " family\tTYPEWRITER\n"; break; } switch ( myStyle ) { - case Vrml_NONE: break; // anOStream << " style" << "\tSERIF "; - case Vrml_BOLD: anOStream << " style" << "\tBOLD" << endl; break; - case Vrml_ITALIC: anOStream << " style" << "\tITALIC" << endl; break; + case Vrml_NONE: break; // anOStream << " style\tSERIF "; + case Vrml_BOLD: anOStream << " style\tBOLD\n"; break; + case Vrml_ITALIC: anOStream << " style\tITALIC\n"; break; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Group.cxx b/src/Vrml/Vrml_Group.cxx index e8fa500074..f8425cc2db 100644 --- a/src/Vrml/Vrml_Group.cxx +++ b/src/Vrml/Vrml_Group.cxx @@ -23,12 +23,12 @@ Standard_OStream& Vrml_Group::Print(Standard_OStream& anOStream) { if ( myFlagPrint == 0 ) { - anOStream << "Group {" << endl; + anOStream << "Group {\n"; myFlagPrint = 1; } //End of if else { - anOStream << '}' << endl; + anOStream << "}\n"; myFlagPrint = 0; } return anOStream; diff --git a/src/Vrml/Vrml_IndexedFaceSet.cxx b/src/Vrml/Vrml_IndexedFaceSet.cxx index 97b8669151..39c5d0eb9d 100644 --- a/src/Vrml/Vrml_IndexedFaceSet.cxx +++ b/src/Vrml/Vrml_IndexedFaceSet.cxx @@ -78,67 +78,67 @@ Handle(TColStd_HArray1OfInteger) Vrml_IndexedFaceSet::TextureCoordIndex() const Standard_OStream& Vrml_IndexedFaceSet::Print(Standard_OStream& anOStream) const { Standard_Integer i; - anOStream << "IndexedFaceSet {" << endl; + anOStream << "IndexedFaceSet {\n"; if ( myCoordIndex->Length() != 1 || myCoordIndex->Value(myCoordIndex->Lower())!=0 ) { - anOStream << " coordIndex [" << endl << '\t'; + anOStream << " coordIndex [\n\t"; for ( i = myCoordIndex->Lower(); i <= myCoordIndex->Upper(); i++ ) { anOStream << myCoordIndex->Value(i); if ( i < myCoordIndex->Length() ) - anOStream << ','; + anOStream << ","; if ( myCoordIndex->Value(i) == -1 ) - anOStream << endl << '\t'; + anOStream << "\n\t"; } - anOStream << ']' << endl; + anOStream << "]\n"; } if ( myMaterialIndex->Length() != 1 || myMaterialIndex->Value(myMaterialIndex->Lower())!=-1 ) { - anOStream << " materialIndex [" << endl << '\t'; + anOStream << " materialIndex [\n\t"; for ( i=myMaterialIndex->Lower(); i <= myMaterialIndex->Upper(); i++ ) { anOStream << myMaterialIndex->Value(i); if ( i < myMaterialIndex->Length() ) - anOStream << ','; + anOStream << ","; if ( myMaterialIndex->Value(i) == -1 ) - anOStream << endl << '\t'; + anOStream << "\n\t"; } // End of for - anOStream << ']' << endl; + anOStream << "]\n"; } if ( myNormalIndex->Length() != 1 || myNormalIndex->Value(myNormalIndex->Lower())!=-1 ) { - anOStream << " normalIndex [" << endl << '\t'; + anOStream << " normalIndex [\n\t"; for ( i=myNormalIndex->Lower(); i <= myNormalIndex->Upper(); i++ ) { anOStream << myNormalIndex->Value(i); if ( i < myNormalIndex->Length() ) - anOStream << ','; + anOStream << ","; if ( myNormalIndex->Value(i) == -1 ) - anOStream << endl << '\t'; + anOStream << "\n\t"; } // End of for - anOStream << ']' << endl; + anOStream << "]\n"; } if ( myTextureCoordIndex->Length() != 1 || myTextureCoordIndex->Value(myTextureCoordIndex->Lower())!=-1 ) { - anOStream << " textureCoordIndex [" << endl << '\t'; + anOStream << " textureCoordIndex [\n\t"; for ( i=myTextureCoordIndex->Lower(); i <= myTextureCoordIndex->Upper(); i++ ) { anOStream << myTextureCoordIndex->Value(i); if ( i < myTextureCoordIndex->Length() ) - anOStream << ','; + anOStream << ","; if ( myTextureCoordIndex->Value(i) == -1 ) - anOStream << endl << '\t'; + anOStream << "\n\t"; } // End of for - anOStream << ']' << endl; + anOStream << "]\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_IndexedLineSet.cxx b/src/Vrml/Vrml_IndexedLineSet.cxx index 8da97bd653..547fc8f925 100644 --- a/src/Vrml/Vrml_IndexedLineSet.cxx +++ b/src/Vrml/Vrml_IndexedLineSet.cxx @@ -78,11 +78,11 @@ Standard_OStream& Vrml_IndexedLineSet::Print(Standard_OStream& anOStream) const { Standard_Integer i; - anOStream << "IndexedLineSet {" << endl; + anOStream << "IndexedLineSet {" << '\n'; if ( myCoordIndex->Length() != 1 || myCoordIndex->Value(myCoordIndex->Lower())!=0 ) { - anOStream << " coordIndex [" << endl << '\t'; + anOStream << " coordIndex [" << '\n' << '\t'; for ( i = myCoordIndex->Lower(); i <= myCoordIndex->Upper(); i++ ) { anOStream << myCoordIndex->Value(i); @@ -90,14 +90,14 @@ Standard_OStream& Vrml_IndexedLineSet::Print(Standard_OStream& anOStream) const anOStream << ','; if ( myCoordIndex->Value(i) == -1 ) - anOStream << endl << '\t'; + anOStream << '\n' << '\t'; } - anOStream << ']' << endl; + anOStream << ']' << '\n'; } if ( myMaterialIndex->Length() != 1 || myMaterialIndex->Value(myMaterialIndex->Lower())!=-1 ) { - anOStream << " materialIndex [" << endl << '\t'; + anOStream << " materialIndex [" << '\n' << '\t'; for ( i = myMaterialIndex->Lower(); i <= myMaterialIndex->Upper(); i++ ) { anOStream << myMaterialIndex->Value(i); @@ -105,14 +105,14 @@ Standard_OStream& Vrml_IndexedLineSet::Print(Standard_OStream& anOStream) const anOStream << ',' ; if ( myMaterialIndex->Value(i) == -1 ) - anOStream << endl << '\t'; + anOStream << '\n' << '\t'; } // End of for - anOStream << ']' << endl; + anOStream << ']' << '\n'; } if ( myNormalIndex->Length() != 1 || myNormalIndex->Value(myNormalIndex->Lower())!=-1 ) { - anOStream << " normalIndex [" << endl << '\t'; + anOStream << " normalIndex [" << '\n' << '\t'; for ( i=myNormalIndex->Lower(); i <= myNormalIndex->Upper(); i++ ) { anOStream << myNormalIndex->Value(i); @@ -120,25 +120,25 @@ Standard_OStream& Vrml_IndexedLineSet::Print(Standard_OStream& anOStream) const anOStream << ','; if ( myNormalIndex->Value(i) == -1 ) - anOStream << endl << '\t'; + anOStream << '\n' << '\t'; } // End of for - anOStream << ']' << endl; + anOStream << ']' << '\n'; } if ( myTextureCoordIndex->Length() != 1 || myTextureCoordIndex->Value(myTextureCoordIndex->Lower())!=-1 ) { - anOStream << " textureCoordIndex [" << endl << '\t'; + anOStream << " textureCoordIndex [\n\t"; for ( i=myTextureCoordIndex->Lower(); i <= myTextureCoordIndex->Upper(); i++ ) { anOStream << myTextureCoordIndex->Value(i); if ( i < myTextureCoordIndex->Length() ) - anOStream << ','; + anOStream << ","; if ( myTextureCoordIndex->Value(i) == -1 ) - anOStream << endl << '\t'; + anOStream << "\n\t"; } // End of for - anOStream << ']' << endl; + anOStream << "]\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Info.cxx b/src/Vrml/Vrml_Info.cxx index 07d14239db..a362b98095 100644 --- a/src/Vrml/Vrml_Info.cxx +++ b/src/Vrml/Vrml_Info.cxx @@ -32,14 +32,14 @@ Vrml_Info::Vrml_Info(const TCollection_AsciiString& aString) Standard_OStream& Vrml_Info::Print(Standard_OStream& anOStream) const { - anOStream << "Info {" << endl; + anOStream << "Info {\n"; if ( !(myString.IsEqual( "") ) ) { - anOStream << " string" << '\t'; - anOStream << '"' << myString << '"' << endl; + anOStream << " string\t"; + anOStream << '"' << myString << '"' << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Instancing.cxx b/src/Vrml/Vrml_Instancing.cxx index 8938963afa..c4ba55e758 100644 --- a/src/Vrml/Vrml_Instancing.cxx +++ b/src/Vrml/Vrml_Instancing.cxx @@ -24,12 +24,12 @@ Vrml_Instancing::Vrml_Instancing(const TCollection_AsciiString& aString) Standard_OStream& Vrml_Instancing::DEF(Standard_OStream& anOStream) const { - anOStream << "DEF " << myName << endl; + anOStream << "DEF " << myName << "\n"; return anOStream; } Standard_OStream& Vrml_Instancing::USE(Standard_OStream& anOStream) const { - anOStream << "USE " << myName << endl; + anOStream << "USE " << myName << "\n"; return anOStream; } diff --git a/src/Vrml/Vrml_LOD.cxx b/src/Vrml/Vrml_LOD.cxx index a3faa50664..97b3e82469 100644 --- a/src/Vrml/Vrml_LOD.cxx +++ b/src/Vrml/Vrml_LOD.cxx @@ -56,28 +56,28 @@ Vrml_LOD::Vrml_LOD(const Handle(TColStd_HArray1OfReal)& aRange, Standard_OStream& Vrml_LOD::Print(Standard_OStream& anOStream) const { Standard_Integer i; - anOStream << "LOD {" << endl; + anOStream << "LOD {\n"; if ( myRangeFlag == Standard_True ) { - anOStream << " range [" << endl << "\t"; + anOStream << " range [\n\t"; for ( i = myRange->Lower(); i <= myRange->Upper(); i++ ) { anOStream << myRange->Value(i); if ( i < myRange->Length() ) - anOStream << ','; + anOStream << ","; } - anOStream << " ]" << endl; + anOStream << " ]\n"; } if ( Abs(myCenter.X() - 0) > 0.0001 || Abs(myCenter.Y() - 0) > 0.0001 || Abs(myCenter.Z() - 0) > 0.0001 ) { - anOStream << " center" << '\t'; - anOStream << myCenter.X() << ' ' << myCenter.Y() << ' ' << myCenter.Z() << endl; + anOStream << " center\t"; + anOStream << myCenter.X() << " " << myCenter.Y() << " " << myCenter.Z() << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Material.cxx b/src/Vrml/Vrml_Material.cxx index 828e917e32..64423d744e 100644 --- a/src/Vrml/Vrml_Material.cxx +++ b/src/Vrml/Vrml_Material.cxx @@ -148,7 +148,7 @@ Handle(TColStd_HArray1OfReal) Vrml_Material::Transparency() const Standard_OStream& Vrml_Material::Print(Standard_OStream& anOStream) const { Standard_Integer i; - anOStream << "Material {" << endl; + anOStream << "Material {\n"; if ( myAmbientColor->Length() != 1 || Abs(myAmbientColor->Value(myAmbientColor->Lower()).Red() - 0.2) > 0.0001 || @@ -160,9 +160,9 @@ Standard_OStream& Vrml_Material::Print(Standard_OStream& anOStream) const { anOStream << myAmbientColor->Value(i).Red() << ' ' << myAmbientColor->Value(i).Green() << ' ' << myAmbientColor->Value(i).Blue(); if ( i < myAmbientColor->Length() ) - anOStream << ',' << endl << '\t'; // ,,,,,,,,,, + anOStream << ",\n\t"; // ,,,,,,,,,, } - anOStream << " ]" << endl; + anOStream << " ]\n"; } if ( myDiffuseColor->Length() != 1 || @@ -175,9 +175,9 @@ Standard_OStream& Vrml_Material::Print(Standard_OStream& anOStream) const { anOStream << myDiffuseColor->Value(i).Red() << ' ' << myDiffuseColor->Value(i).Green() << ' ' << myDiffuseColor->Value(i).Blue(); if ( i < myDiffuseColor->Length() ) - anOStream << ',' << endl << '\t'; + anOStream << ",\n\t"; } - anOStream << " ]" << endl; + anOStream << " ]\n"; } if ( mySpecularColor->Length() != 1 || @@ -190,9 +190,9 @@ Standard_OStream& Vrml_Material::Print(Standard_OStream& anOStream) const { anOStream << mySpecularColor->Value(i).Red() << ' ' << mySpecularColor->Value(i).Green() << ' ' << mySpecularColor->Value(i).Blue(); if ( i < mySpecularColor->Length() ) - anOStream << ',' << endl << "\t"; + anOStream << ",\n\t"; } - anOStream << " ]" << endl; + anOStream << " ]\n"; } if ( myEmissiveColor->Length() != 1 || @@ -205,9 +205,9 @@ Standard_OStream& Vrml_Material::Print(Standard_OStream& anOStream) const { anOStream << myEmissiveColor->Value(i).Red() << ' ' << myEmissiveColor->Value(i).Green() << ' ' << myEmissiveColor->Value(i).Blue(); if ( i < myEmissiveColor->Length() ) - anOStream << ',' << endl << "\t"; + anOStream << ",\n\t"; } - anOStream << " ]" << endl; + anOStream << " ]\n"; } if ( myShininess->Length() != 1 || Abs(myShininess->Value(myShininess->Lower()) - 0.2) > 0.0001 ) @@ -219,7 +219,7 @@ Standard_OStream& Vrml_Material::Print(Standard_OStream& anOStream) const if ( i < myShininess->Length() ) anOStream << ", "; } - anOStream << " ]" << endl; + anOStream << " ]\n"; } if ( myTransparency->Length() != 1 || Abs(myTransparency->Value(myTransparency->Lower()) - 0) > 0.0001 ) @@ -231,9 +231,9 @@ Standard_OStream& Vrml_Material::Print(Standard_OStream& anOStream) const if ( i < myTransparency->Length() ) anOStream << ", "; } - anOStream << " ]" << endl; + anOStream << " ]\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_MaterialBinding.cxx b/src/Vrml/Vrml_MaterialBinding.cxx index 59182b7900..8a3f471fb5 100644 --- a/src/Vrml/Vrml_MaterialBinding.cxx +++ b/src/Vrml/Vrml_MaterialBinding.cxx @@ -36,19 +36,19 @@ Vrml_MaterialBindingAndNormalBinding Vrml_MaterialBinding::Value() const Standard_OStream& Vrml_MaterialBinding::Print(Standard_OStream& anOStream) const { - anOStream << "MaterialBinding {" << endl; + anOStream << "MaterialBinding {\n"; switch ( myValue ) { - case Vrml_DEFAULT: break; // anOStream << " value" << "\tDEFAULT"; - case Vrml_OVERALL: anOStream << " value" << "\tOVERALL" << endl; break; - case Vrml_PER_PART: anOStream << " value" << "\tPER_PART" << endl; break; - case Vrml_PER_PART_INDEXED: anOStream << " value" << "\tPER_PART_INDEXED" << endl; break; - case Vrml_PER_FACE: anOStream << " value" << "\tPER_FACE" << endl; break; - case Vrml_PER_FACE_INDEXED: anOStream << " value" << "\tPER_FACE_INDEXED" << endl; break; - case Vrml_PER_VERTEX: anOStream << " value" << "\tPER_VERTEX" << endl; break; - case Vrml_PER_VERTEX_INDEXED: anOStream << " value" << "\tPER_VERTEX_INDEXED" << endl; break; + case Vrml_DEFAULT: break; // anOStream << " value\tDEFAULT"; + case Vrml_OVERALL: anOStream << " value\tOVERALL\n"; break; + case Vrml_PER_PART: anOStream << " value\tPER_PART\n"; break; + case Vrml_PER_PART_INDEXED: anOStream << " value\tPER_PART_INDEXED\n"; break; + case Vrml_PER_FACE: anOStream << " value\tPER_FACE\n"; break; + case Vrml_PER_FACE_INDEXED: anOStream << " value\tPER_FACE_INDEXED\n"; break; + case Vrml_PER_VERTEX: anOStream << " value\tPER_VERTEX\n"; break; + case Vrml_PER_VERTEX_INDEXED: anOStream << " value\tPER_VERTEX_INDEXED\n"; break; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_MatrixTransform.cxx b/src/Vrml/Vrml_MatrixTransform.cxx index 9768cb7061..96d0b8fa00 100644 --- a/src/Vrml/Vrml_MatrixTransform.cxx +++ b/src/Vrml/Vrml_MatrixTransform.cxx @@ -54,14 +54,14 @@ Vrml_MatrixTransform::Vrml_MatrixTransform() Standard_OStream& Vrml_MatrixTransform::Print(Standard_OStream& anOStream) const { Standard_Integer i,j; - anOStream << "MatrixTransform {" << endl; + anOStream << "MatrixTransform {\n"; if ( Abs(myMatrix.Value(1,1) - 1) > 0.0000001 || Abs(myMatrix.Value(2,1) - 0) > 0.0000001 || Abs(myMatrix.Value(3,1) - 0) > 0.0000001 || Abs(myMatrix.Value(1,2) - 0) > 0.0000001 || Abs(myMatrix.Value(2,2) - 1) > 0.0000001 || Abs(myMatrix.Value(3,2) - 0) > 0.0000001 || Abs(myMatrix.Value(1,3) - 0) > 0.0000001 || Abs(myMatrix.Value(2,3) - 0) > 0.0000001 || Abs(myMatrix.Value(3,3) - 1) > 0.0000001 || Abs(myMatrix.Value(1,4) - 0) > 0.0000001 || Abs(myMatrix.Value(2,4) - 0) > 0.0000001 || Abs(myMatrix.Value(3,4) - 0) > 0.0000001 ) { - anOStream << " matrix" << '\t'; + anOStream << " matrix\t"; for ( j = 1; j <=4; j++ ) { @@ -72,15 +72,15 @@ Vrml_MatrixTransform::Vrml_MatrixTransform() } if (j!=4) { - anOStream << '0' << endl; + anOStream << "0\n"; anOStream << "\t\t"; } else { - anOStream << myMatrix.ScaleFactor() << endl; + anOStream << myMatrix.ScaleFactor() << "\n"; } } } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Normal.cxx b/src/Vrml/Vrml_Normal.cxx index 3596c2fdcd..6aff57e947 100644 --- a/src/Vrml/Vrml_Normal.cxx +++ b/src/Vrml/Vrml_Normal.cxx @@ -43,14 +43,14 @@ Standard_OStream& Vrml_Normal::Print(Standard_OStream& anOStream) const { Standard_Integer i; - anOStream << "Normal {" << endl; + anOStream << "Normal {\n"; i = myVector->Lower(); if ( myVector->Length() == 1 && Abs(myVector->Value(i).X() - 0) < 0.0001 && Abs(myVector->Value(i).Y() - 0) < 0.0001 && Abs(myVector->Value(i).Z() - 1) < 0.0001 ) { - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } else @@ -58,13 +58,13 @@ Standard_OStream& Vrml_Normal::Print(Standard_OStream& anOStream) const anOStream << " vector [\n\t"; for ( i = myVector->Lower(); i <= myVector->Upper(); i++ ) { - anOStream << myVector->Value(i).X() << ' ' << myVector->Value(i).Y() << ' ' << myVector->Value(i).Z(); + anOStream << myVector->Value(i).X() << " " << myVector->Value(i).Y() << " " << myVector->Value(i).Z(); if ( i < myVector->Length() ) - anOStream << ',' << endl << '\t'; + anOStream << ",\n\t"; } - anOStream << " ]" << endl; + anOStream << " ]\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_NormalBinding.cxx b/src/Vrml/Vrml_NormalBinding.cxx index ef030979c3..2f3620f6a2 100644 --- a/src/Vrml/Vrml_NormalBinding.cxx +++ b/src/Vrml/Vrml_NormalBinding.cxx @@ -36,18 +36,18 @@ Vrml_MaterialBindingAndNormalBinding Vrml_NormalBinding::Value() const Standard_OStream& Vrml_NormalBinding::Print(Standard_OStream& anOStream) const { - anOStream << "NormalBinding {" << endl; + anOStream << "NormalBinding {\n"; switch ( myValue ) { - case Vrml_DEFAULT: break; // anOStream << " value" << "\tDEFAULT"; - case Vrml_OVERALL: anOStream << " value" << "\tOVERALL" << endl; break; - case Vrml_PER_PART: anOStream << " value" << "\tPER_PART" << endl; break; - case Vrml_PER_PART_INDEXED: anOStream << " value" << "\tPER_PART_INDEXED" << endl; break; - case Vrml_PER_FACE: anOStream << " value" << "\tPER_FACE" << endl; break; - case Vrml_PER_FACE_INDEXED: anOStream << " value" << "\tPER_FACE_INDEXED" << endl; break; - case Vrml_PER_VERTEX: anOStream << " value" << "\tPER_VERTEX" << endl; break; - case Vrml_PER_VERTEX_INDEXED: anOStream << " value" << "\tPER_VERTEX_INDEXED" << endl; break; + case Vrml_DEFAULT: break; // anOStream << " value\tDEFAULT"; + case Vrml_OVERALL: anOStream << " value\tOVERALL\n"; break; + case Vrml_PER_PART: anOStream << " value\tPER_PART\n"; break; + case Vrml_PER_PART_INDEXED: anOStream << " value\tPER_PART_INDEXED\n"; break; + case Vrml_PER_FACE: anOStream << " value\tPER_FACE\n"; break; + case Vrml_PER_FACE_INDEXED: anOStream << " value\tPER_FACE_INDEXED\n"; break; + case Vrml_PER_VERTEX: anOStream << " value\tPER_VERTEX\n"; break; + case Vrml_PER_VERTEX_INDEXED: anOStream << " value\tPER_VERTEX_INDEXED\n"; break; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_OrthographicCamera.cxx b/src/Vrml/Vrml_OrthographicCamera.cxx index 005a304aa7..44f4a32d32 100644 --- a/src/Vrml/Vrml_OrthographicCamera.cxx +++ b/src/Vrml/Vrml_OrthographicCamera.cxx @@ -81,13 +81,13 @@ Standard_Real Vrml_OrthographicCamera::Height() const Standard_OStream& Vrml_OrthographicCamera::Print(Standard_OStream& anOStream) const { - anOStream << "OrthographicCamera {" << endl; + anOStream << "OrthographicCamera {\n"; if ( Abs(myPosition.X() - 0) > 0.0001 || Abs(myPosition.Y() - 0) > 0.0001 || Abs(myPosition.Z() - 1) > 0.0001 ) { - anOStream << " position" << "\t\t"; - anOStream << myPosition.X() << ' ' << myPosition.Y() << ' ' << myPosition.Z() << endl; + anOStream << " position\t\t"; + anOStream << myPosition.X() << " " << myPosition.Y() << " " << myPosition.Z() << "\n"; } if ( Abs(myOrientation.RotationX() - 0) > 0.0001 || @@ -95,21 +95,21 @@ Standard_OStream& Vrml_OrthographicCamera::Print(Standard_OStream& anOStream) co Abs(myOrientation.RotationZ() - 1) > 0.0001 || Abs(myOrientation.Angle() - 0) > 0.0001 ) { - anOStream << " orientation" << "\t\t"; - anOStream << myOrientation.RotationX() << ' ' << myOrientation.RotationY() << ' '; - anOStream << myOrientation.RotationZ() << ' ' << myOrientation.Angle() << endl; + anOStream << " orientation\t\t"; + anOStream << myOrientation.RotationX() << " " << myOrientation.RotationY() << " "; + anOStream << myOrientation.RotationZ() << " " << myOrientation.Angle() << "\n"; } if ( Abs(myFocalDistance - 5) > 0.0001 ) { - anOStream << " focalDistance" << '\t'; - anOStream << myFocalDistance << endl; + anOStream << " focalDistance\t"; + anOStream << myFocalDistance << "\n"; } if ( Abs(myHeight - 2) > 0.0001 ) { - anOStream << " height" << "\t\t"; - anOStream << myHeight << endl; + anOStream << " height\t\t"; + anOStream << myHeight << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_PerspectiveCamera.cxx b/src/Vrml/Vrml_PerspectiveCamera.cxx index 6ee4eac164..c52dcee775 100644 --- a/src/Vrml/Vrml_PerspectiveCamera.cxx +++ b/src/Vrml/Vrml_PerspectiveCamera.cxx @@ -81,13 +81,13 @@ Standard_Real Vrml_PerspectiveCamera::Angle() const Standard_OStream& Vrml_PerspectiveCamera::Print(Standard_OStream& anOStream) const { - anOStream << "PerspectiveCamera {" << endl; + anOStream << "PerspectiveCamera {\n"; if ( Abs(myPosition.X() - 0) > 0.0001 || Abs(myPosition.Y() - 0) > 0.0001 || Abs(myPosition.Z() - 1) > 0.0001 ) { - anOStream << " position" << "\t\t"; - anOStream << myPosition.X() << ' ' << myPosition.Y() << ' ' << myPosition.Z() << endl; + anOStream << " position\t\t"; + anOStream << myPosition.X() << " " << myPosition.Y() << " " << myPosition.Z() << "\n"; } if ( Abs(myOrientation.RotationX() - 0) > 0.0001 || @@ -95,21 +95,21 @@ Standard_OStream& Vrml_PerspectiveCamera::Print(Standard_OStream& anOStream) con Abs(myOrientation.RotationZ() - 1) > 0.0001 || Abs(myOrientation.Angle() - 0) > 0.0001 ) { - anOStream << " orientation" << "\t\t"; - anOStream << myOrientation.RotationX() << ' ' << myOrientation.RotationY() << ' '; - anOStream << myOrientation.RotationZ() << ' ' << myOrientation.Angle() << endl; + anOStream << " orientation\t\t"; + anOStream << myOrientation.RotationX() << " " << myOrientation.RotationY() << " "; + anOStream << myOrientation.RotationZ() << " " << myOrientation.Angle() << "\n"; } if ( Abs(myFocalDistance - 5) > 0.0001 ) { - anOStream << " focalDistance" << '\t'; - anOStream << myFocalDistance << endl; + anOStream << " focalDistance\t"; + anOStream << myFocalDistance << "\n"; } if ( Abs(myHeightAngle - 0.785398) > 0.0000001 ) { - anOStream << " heightAngle" << "\t\t"; - anOStream << myHeightAngle << endl; + anOStream << " heightAngle\t\t"; + anOStream << myHeightAngle << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_PointLight.cxx b/src/Vrml/Vrml_PointLight.cxx index 7a29ea74f8..f5b22c39dc 100644 --- a/src/Vrml/Vrml_PointLight.cxx +++ b/src/Vrml/Vrml_PointLight.cxx @@ -88,36 +88,36 @@ gp_Vec Vrml_PointLight::Location() const Standard_OStream& Vrml_PointLight::Print(Standard_OStream& anOStream) const { - anOStream << "PointLight {" << endl; + anOStream << "PointLight {\n"; if ( myOnOff != Standard_True ) { - anOStream << " on" << "\t\t" << "FALSE" << endl; -// anOStream << myOnOff << endl; + anOStream << " on\t\tFALSE\n"; +// anOStream << myOnOff << "\n"; } if ( Abs(myIntensity - 1) > 0.0001 ) { - anOStream << " intensity" << '\t'; - anOStream << myIntensity << endl; + anOStream << " intensity\t"; + anOStream << myIntensity << "\n"; } if ( Abs(myColor.Red() - 1) > 0.0001 || Abs(myColor.Green() - 1) > 0.0001 || Abs(myColor.Blue() - 1) > 0.0001 ) { - anOStream << " color" << '\t'; - anOStream << myColor.Red() << ' ' << myColor.Green() << ' ' << myColor.Blue() << endl; + anOStream << " color\t"; + anOStream << myColor.Red() << " " << myColor.Green() << " " << myColor.Blue() << "\n"; } if ( Abs(myLocation.X() - 0) > 0.0001 || Abs(myLocation.Y() - 0) > 0.0001 || Abs(myLocation.Z() - 1) > 0.0001 ) { - anOStream << " location" << '\t'; - anOStream << myLocation.X() << ' ' << myLocation.Y() << ' ' << myLocation.Z() << endl; + anOStream << " location\t"; + anOStream << myLocation.X() << " " << myLocation.Y() << " " << myLocation.Z() << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_PointSet.cxx b/src/Vrml/Vrml_PointSet.cxx index feb4637650..cc8cab9022 100644 --- a/src/Vrml/Vrml_PointSet.cxx +++ b/src/Vrml/Vrml_PointSet.cxx @@ -43,21 +43,21 @@ Standard_Integer Vrml_PointSet::NumPoints() const Standard_OStream& Vrml_PointSet::Print(Standard_OStream& anOStream) const { - anOStream << "PointSet {" << endl; + anOStream << "PointSet {\n"; if ( myStartIndex != 0 || myNumPoints !=-1 ) { if ( myStartIndex != 0) { - anOStream << " startIndex" << '\t'; - anOStream << myStartIndex << endl; + anOStream << " startIndex\t"; + anOStream << myStartIndex << "\n"; } if ( myNumPoints != 0) { - anOStream << " numPoints" << '\t'; - anOStream << myNumPoints << endl; + anOStream << " numPoints\t"; + anOStream << myNumPoints << "\n"; } } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Rotation.cxx b/src/Vrml/Vrml_Rotation.cxx index 0203e6a804..c6d205d677 100644 --- a/src/Vrml/Vrml_Rotation.cxx +++ b/src/Vrml/Vrml_Rotation.cxx @@ -38,18 +38,18 @@ Vrml_Rotation::Vrml_Rotation(const Vrml_SFRotation& aRotation) Standard_OStream& Vrml_Rotation::Print(Standard_OStream& anOStream) const { - anOStream << "Rotation {" << endl; + anOStream << "Rotation {\n"; if ( Abs(myRotation.RotationX() - 0) > 0.0001 || Abs(myRotation.RotationY() - 0) > 0.0001 || Abs(myRotation.RotationZ() - 1) > 0.0001 || Abs(myRotation.Angle() - 0) > 0.0001 ) { - anOStream << " rotation" << '\t'; - anOStream << myRotation.RotationX() << ' ' << myRotation.RotationY() << ' '; - anOStream << myRotation.RotationZ() << ' ' << myRotation.Angle() << endl; + anOStream << " rotation\t"; + anOStream << myRotation.RotationX() << " " << myRotation.RotationY() << " "; + anOStream << myRotation.RotationZ() << " " << myRotation.Angle() << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Scale.cxx b/src/Vrml/Vrml_Scale.cxx index d3eba32e3e..c91858e7a4 100644 --- a/src/Vrml/Vrml_Scale.cxx +++ b/src/Vrml/Vrml_Scale.cxx @@ -38,16 +38,16 @@ Vrml_Scale::Vrml_Scale(const gp_Vec& aScaleFactor) Standard_OStream& Vrml_Scale::Print(Standard_OStream& anOStream) const { - anOStream << "Scale {" << endl; + anOStream << "Scale {\n"; if ( Abs(myScaleFactor.X() - 1) > 0.0001 || Abs(myScaleFactor.Y() - 1) > 0.0001 || Abs(myScaleFactor.Z() - 1) > 0.0001 ) { - anOStream << " scaleFactor" << '\t'; - anOStream << myScaleFactor.X() << ' ' << myScaleFactor.Y() << ' ' << myScaleFactor.Z() << endl; + anOStream << " scaleFactor\t"; + anOStream << myScaleFactor.X() << " " << myScaleFactor.Y() << " " << myScaleFactor.Z() << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Separator.cxx b/src/Vrml/Vrml_Separator.cxx index 75962697e2..026d21159c 100644 --- a/src/Vrml/Vrml_Separator.cxx +++ b/src/Vrml/Vrml_Separator.cxx @@ -40,19 +40,19 @@ Standard_OStream& Vrml_Separator::Print(Standard_OStream& anOStream) { if ( myFlagPrint == 0 ) { - anOStream << "Separator {" << endl; + anOStream << "Separator {\n"; if ( myRenderCulling != Vrml_AUTO ) { if ( myRenderCulling == Vrml_ON ) - anOStream << " renderCulling" << "\tON" << endl; + anOStream << " renderCulling\tON\n"; else - anOStream << " renderCulling" << "\tOFF" << endl; + anOStream << " renderCulling\tOFF\n"; } myFlagPrint = 1; } //End of if else { - anOStream << '}' << endl; + anOStream << "}\n"; myFlagPrint = 0; } return anOStream; diff --git a/src/Vrml/Vrml_ShapeHints.cxx b/src/Vrml/Vrml_ShapeHints.cxx index 2e9b21df7c..66db06d71e 100644 --- a/src/Vrml/Vrml_ShapeHints.cxx +++ b/src/Vrml/Vrml_ShapeHints.cxx @@ -67,32 +67,32 @@ Standard_Real Vrml_ShapeHints::Angle() const Standard_OStream& Vrml_ShapeHints::Print(Standard_OStream& anOStream) const { - anOStream << "ShapeHints {" << endl; + anOStream << "ShapeHints {\n"; switch ( myVertexOrdering ) { - case Vrml_UNKNOWN_ORDERING: break; // anOStream << " vertexOrdering" << "\tUNKNOWN_ORDERING"; - case Vrml_CLOCKWISE: anOStream << " vertexOrdering" << "\tCLOCKWISE" << endl; break; - case Vrml_COUNTERCLOCKWISE: anOStream << " vertexOrdering" << "\tCOUNTERCLOCKWISE" << endl; break; + case Vrml_UNKNOWN_ORDERING: break; // anOStream << " vertexOrdering\tUNKNOWN_ORDERING"; + case Vrml_CLOCKWISE: anOStream << " vertexOrdering\tCLOCKWISE\n"; break; + case Vrml_COUNTERCLOCKWISE: anOStream << " vertexOrdering\tCOUNTERCLOCKWISE\n"; break; } switch ( myShapeType ) { - case Vrml_UNKNOWN_SHAPE_TYPE: break; //anOStream << " shapeType" << "\t\tUNKNOWN_SHAPE_TYPE"; - case Vrml_SOLID: anOStream << " shapeType" << "\t\tSOLID" << endl; break; + case Vrml_UNKNOWN_SHAPE_TYPE: break; //anOStream << " shapeType\t\tUNKNOWN_SHAPE_TYPE"; + case Vrml_SOLID: anOStream << " shapeType\t\tSOLID\n"; break; } switch ( myFaceType ) { - case Vrml_UNKNOWN_FACE_TYPE: anOStream << " faceType" << "\t\tUNKNOWN_FACE_TYPE" << endl; break; - case Vrml_CONVEX: break; //anOStream << " faceType" << "\t\tCONVEX"; + case Vrml_UNKNOWN_FACE_TYPE: anOStream << " faceType\t\tUNKNOWN_FACE_TYPE\n"; break; + case Vrml_CONVEX: break; //anOStream << " faceType\t\tCONVEX"; } if ( Abs(myAngle - 0.5) > 0.0001 ) { - anOStream << " creaseAngle\t" << '\t' << myAngle << endl; + anOStream << " creaseAngle\t\t" << myAngle << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Sphere.cxx b/src/Vrml/Vrml_Sphere.cxx index 34d9a1876a..d73f4bc7b4 100644 --- a/src/Vrml/Vrml_Sphere.cxx +++ b/src/Vrml/Vrml_Sphere.cxx @@ -31,14 +31,14 @@ Vrml_Sphere::Vrml_Sphere(const Standard_Real aRadius) Standard_OStream& Vrml_Sphere::Print(Standard_OStream& anOStream) const { - anOStream << "Sphere {" << endl; + anOStream << "Sphere {\n"; if ( Abs(myRadius - 1) > 0.0001 ) { - anOStream << " radius" << '\t'; - anOStream << myRadius << endl; + anOStream << " radius\t"; + anOStream << myRadius << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_SpotLight.cxx b/src/Vrml/Vrml_SpotLight.cxx index 3cacb32ad9..39f5b3aa52 100644 --- a/src/Vrml/Vrml_SpotLight.cxx +++ b/src/Vrml/Vrml_SpotLight.cxx @@ -129,56 +129,56 @@ Standard_Real Vrml_SpotLight::CutOffAngle() const Standard_OStream& Vrml_SpotLight::Print(Standard_OStream& anOStream) const { - anOStream << "SpotLight {" << endl; + anOStream << "SpotLight {\n"; if ( myOnOff != Standard_True ) { - anOStream << " on" << "\t\t" << "FALSE" << endl; -// anOStream << myOnOff << endl; + anOStream << " on\t\tFALSE\n"; +// anOStream << myOnOff << "\n"; } if ( Abs(myIntensity - 1) > 0.0001 ) { - anOStream << " intensity" << '\t'; - anOStream << myIntensity << endl; + anOStream << " intensity\t"; + anOStream << myIntensity << "\n"; } if ( Abs(myColor.Red() - 1) > 0.0001 || Abs(myColor.Green() - 1) > 0.0001 || Abs(myColor.Blue() - 1) > 0.0001 ) { - anOStream << " color" << '\t'; - anOStream << myColor.Red() << ' ' << myColor.Green() << ' ' << myColor.Blue() << endl; + anOStream << " color\t"; + anOStream << myColor.Red() << " " << myColor.Green() << " " << myColor.Blue() << "\n"; } if ( Abs(myLocation.X() - 0) > 0.0001 || Abs(myLocation.Y() - 0) > 0.0001 || Abs(myLocation.Z() - 1) > 0.0001 ) { - anOStream << " location" << '\t'; - anOStream << myLocation.X() << ' ' << myLocation.Y() << ' ' << myLocation.Z() << endl; + anOStream << " location\t"; + anOStream << myLocation.X() << " " << myLocation.Y() << " " << myLocation.Z() << "\n"; } if ( Abs(myDirection.X() - 0) > 0.0001 || Abs(myDirection.Y() - 0) > 0.0001 || Abs(myDirection.Z() + 1) > 0.0001 ) { - anOStream << " direction" << '\t'; - anOStream << myDirection.X() << ' ' << myDirection.Y() << ' ' << myDirection.Z() << endl; + anOStream << " direction\t"; + anOStream << myDirection.X() << " " << myDirection.Y() << " " << myDirection.Z() << "\n"; } if ( Abs(myDropOffRate - 0) > 0.0001 ) { - anOStream << " dropOffRate" << '\t'; - anOStream << myDropOffRate << endl; + anOStream << " dropOffRate\t"; + anOStream << myDropOffRate << "\n"; } if ( Abs(myCutOffAngle - 0.785398) > 0.0000001 ) { - anOStream << " cutOffAngle" << '\t'; - anOStream << myCutOffAngle << endl; + anOStream << " cutOffAngle\t"; + anOStream << myCutOffAngle << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Switch.cxx b/src/Vrml/Vrml_Switch.cxx index 7609734cf8..11efaea6eb 100644 --- a/src/Vrml/Vrml_Switch.cxx +++ b/src/Vrml/Vrml_Switch.cxx @@ -31,12 +31,12 @@ Vrml_Switch::Vrml_Switch(const Standard_Integer aWhichChild) Standard_OStream& Vrml_Switch::Print(Standard_OStream& anOStream) const { - anOStream << "Switch {" << endl; + anOStream << "Switch {\n"; if ( myWhichChild != -1 ) { - anOStream << " whichChild" << '\t'; - anOStream << myWhichChild << endl; + anOStream << " whichChild\t"; + anOStream << myWhichChild << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Texture2.cxx b/src/Vrml/Vrml_Texture2.cxx index e7e37431f1..6f12d260e0 100644 --- a/src/Vrml/Vrml_Texture2.cxx +++ b/src/Vrml/Vrml_Texture2.cxx @@ -85,18 +85,18 @@ Vrml_Texture2::Vrml_Texture2(const TCollection_AsciiString& aFilename, Standard_OStream& Vrml_Texture2::Print(Standard_OStream& anOStream) const { Standard_Integer i; - anOStream << "Texture2 {" << endl; + anOStream << "Texture2 {\n"; if ( !(myFilename.IsEqual("") ) ) { - anOStream << " filename" << '\t'; - anOStream << '"' << myFilename << '"' << endl; + anOStream << " filename\t"; + anOStream << '"' << myFilename << '"' << "\n"; } if ( myImage->Width() != 0 || myImage->Height() != 0 || myImage->Number() != Vrml_NULL ) { - anOStream << " image" << '\t'; - anOStream << myImage->Width() << ' ' << myImage->Height() << ' '; + anOStream << " image\t"; + anOStream << myImage->Width() << " " << myImage->Height() << " "; switch ( myImage->Number() ) { @@ -111,25 +111,25 @@ Vrml_Texture2::Vrml_Texture2(const TCollection_AsciiString& aFilename, { for ( i = myImage->Array()->Lower(); i <= myImage->Array()->Upper(); i++ ) { -// anOStream << ' ' << hex(myImage->Array()->Value(i),0); - anOStream << ' ' << myImage->Array()->Value(i); +// anOStream << " " << hex(myImage->Array()->Value(i),0); + anOStream << " " << myImage->Array()->Value(i); } } - anOStream << endl; + anOStream << "\n"; } switch ( myWrapS ) { - case Vrml_REPEAT: break; // anOStream << " wrapS" << "\tREPEAT "; - case Vrml_CLAMP: anOStream << " wrapS" << "\tCLAMP" << endl; break; + case Vrml_REPEAT: break; // anOStream << " wrapS\tREPEAT "; + case Vrml_CLAMP: anOStream << " wrapS\tCLAMP\n"; break; } switch ( myWrapT ) { - case Vrml_REPEAT: break; // anOStream << " wrapT" << "\tREPEAT "; - case Vrml_CLAMP: anOStream << " wrapT" << "\tCLAMP" << endl; break; + case Vrml_REPEAT: break; // anOStream << " wrapT\tREPEAT "; + case Vrml_CLAMP: anOStream << " wrapT\tCLAMP\n"; break; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Texture2Transform.cxx b/src/Vrml/Vrml_Texture2Transform.cxx index 94997c921a..becb5ffb68 100644 --- a/src/Vrml/Vrml_Texture2Transform.cxx +++ b/src/Vrml/Vrml_Texture2Transform.cxx @@ -80,33 +80,33 @@ Vrml_Texture2Transform::Vrml_Texture2Transform(const gp_Vec2d& aTranslation, Standard_OStream& Vrml_Texture2Transform::Print(Standard_OStream& anOStream) const { - anOStream << "Texture2Transform {" << endl; + anOStream << "Texture2Transform {\n"; if ( Abs(myTranslation.X() - 0) > 0.0001 || Abs(myTranslation.Y() - 0) > 0.0001 ) { - anOStream << " translation" << '\t'; - anOStream << myTranslation.X() << ' ' << myTranslation.Y() << endl; + anOStream << " translation\t"; + anOStream << myTranslation.X() << " " << myTranslation.Y() << "\n"; } if ( Abs(myRotation - 0) > 0.0001 ) { - anOStream << " rotation" << '\t'; - anOStream << myRotation << endl; + anOStream << " rotation\t"; + anOStream << myRotation << "\n"; } if ( Abs(myScaleFactor.X() - 0) > 0.0001 || Abs(myScaleFactor.Y() - 0) > 0.0001 ) { - anOStream << " scaleFactor" << '\t'; - anOStream << myScaleFactor.X() << ' ' << myScaleFactor.Y() << endl; + anOStream << " scaleFactor\t"; + anOStream << myScaleFactor.X() << " " << myScaleFactor.Y() << "\n"; } if ( Abs(myCenter.X() - 0) > 0.0001 || Abs(myCenter.Y() - 0) > 0.0001 ) { - anOStream << " center" << '\t'; - anOStream << myCenter.X() << ' ' << myCenter.Y() << endl; + anOStream << " center\t"; + anOStream << myCenter.X() << " " << myCenter.Y() << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_TextureCoordinate2.cxx b/src/Vrml/Vrml_TextureCoordinate2.cxx index 753f937d0b..d4b533ea8d 100644 --- a/src/Vrml/Vrml_TextureCoordinate2.cxx +++ b/src/Vrml/Vrml_TextureCoordinate2.cxx @@ -39,21 +39,21 @@ Vrml_TextureCoordinate2::Vrml_TextureCoordinate2(const Handle(TColgp_HArray1OfVe Standard_OStream& Vrml_TextureCoordinate2::Print(Standard_OStream& anOStream) const { Standard_Integer i; - anOStream << "TextureCoordinate2 {" << endl; + anOStream << "TextureCoordinate2 {\n"; if ( myPoint->Length() != 1 || Abs(myPoint->Value(myPoint->Lower()).X() - 0) > 0.0001 || Abs(myPoint->Value(myPoint->Lower()).Y() - 0) > 0.0001 ) { - anOStream << " point [" << endl << '\t'; + anOStream << " point [\n\t"; for ( i = myPoint->Lower(); i <= myPoint->Upper(); i++ ) { - anOStream << myPoint->Value(i).X() << ' ' << myPoint->Value(i).Y(); + anOStream << myPoint->Value(i).X() << " " << myPoint->Value(i).Y(); if ( i < myPoint->Length() ) - anOStream << ',' << endl << '\t'; + anOStream << ",\n\t"; } - anOStream << " ]" << endl; + anOStream << " ]\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_Transform.cxx b/src/Vrml/Vrml_Transform.cxx index ac671b82c9..29ee339e4f 100644 --- a/src/Vrml/Vrml_Transform.cxx +++ b/src/Vrml/Vrml_Transform.cxx @@ -106,14 +106,14 @@ Vrml_Transform::Vrml_Transform(const gp_Vec& aTranslation, Standard_OStream& Vrml_Transform::Print(Standard_OStream& anOStream) const { - anOStream << "Transform {" << endl; + anOStream << "Transform {\n"; if ( Abs(myTranslation.X() - 0) > 0.0001 || Abs(myTranslation.Y() - 0) > 0.0001 || Abs(myTranslation.Z() - 0) > 0.0001 ) { - anOStream << " translation" << "\t\t"; - anOStream << myTranslation.X() << ' ' << myTranslation.Y() << ' ' << myTranslation.Z() << endl; + anOStream << " translation\t\t"; + anOStream << myTranslation.X() << " " << myTranslation.Y() << " " << myTranslation.Z() << "\n"; } if ( Abs(myRotation.RotationX() - 0) > 0.0001 || @@ -121,17 +121,17 @@ Vrml_Transform::Vrml_Transform(const gp_Vec& aTranslation, Abs(myRotation.RotationZ() - 1) > 0.0001 || Abs(myRotation.Angle() - 0) > 0.0001 ) { - anOStream << " rotation" << "\t\t"; - anOStream << myRotation.RotationX() << ' ' << myRotation.RotationY() << ' '; - anOStream << myRotation.RotationZ() << ' ' << myRotation.Angle() << endl; + anOStream << " rotation\t\t"; + anOStream << myRotation.RotationX() << " " << myRotation.RotationY() << " "; + anOStream << myRotation.RotationZ() << " " << myRotation.Angle() << "\n"; } if ( Abs(myScaleFactor.X() - 1) > 0.0001 || Abs(myScaleFactor.Y() - 1) > 0.0001 || Abs(myScaleFactor.Z() - 1) > 0.0001 ) { - anOStream << " scaleFactor" << "\t\t"; - anOStream << myTranslation.X() << ' ' << myTranslation.Y() << ' ' << myTranslation.Z() << endl; + anOStream << " scaleFactor\t\t"; + anOStream << myTranslation.X() << " " << myTranslation.Y() << " " << myTranslation.Z() << "\n"; } if ( Abs(myScaleOrientation.RotationX() - 0) > 0.0001 || @@ -139,19 +139,19 @@ Vrml_Transform::Vrml_Transform(const gp_Vec& aTranslation, Abs(myScaleOrientation.RotationZ() - 1) > 0.0001 || Abs(myScaleOrientation.Angle() - 0) > 0.0001 ) { - anOStream << " scaleOrientation" << '\t'; - anOStream << myScaleOrientation.RotationX() << ' ' << myScaleOrientation.RotationY() << ' '; - anOStream << myScaleOrientation.RotationZ() << ' ' << myScaleOrientation.Angle() << endl; + anOStream << " scaleOrientation\t"; + anOStream << myScaleOrientation.RotationX() << " " << myScaleOrientation.RotationY() << " "; + anOStream << myScaleOrientation.RotationZ() << " " << myScaleOrientation.Angle() << "\n"; } if ( Abs(myCenter.X() - 0) > 0.0001 || Abs(myCenter.Y() - 0) > 0.0001 || Abs(myCenter.Z() - 0) > 0.0001 ) { - anOStream << " center" << "\t\t"; - anOStream << myCenter.X() << ' ' << myCenter.Y() << ' ' << myCenter.Z() << endl; + anOStream << " center\t\t"; + anOStream << myCenter.X() << " " << myCenter.Y() << " " << myCenter.Z() << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_TransformSeparator.cxx b/src/Vrml/Vrml_TransformSeparator.cxx index 6b465d799c..794b8bf0ae 100644 --- a/src/Vrml/Vrml_TransformSeparator.cxx +++ b/src/Vrml/Vrml_TransformSeparator.cxx @@ -23,12 +23,12 @@ Standard_OStream& Vrml_TransformSeparator::Print(Standard_OStream& anOStream) { if ( myFlagPrint == 0 ) { - anOStream << "TransformSeparator {" << endl; + anOStream << "TransformSeparator {\n"; myFlagPrint = 1; } else { - anOStream << '}' << endl; + anOStream << "}\n"; myFlagPrint = 0; } return anOStream; diff --git a/src/Vrml/Vrml_Translation.cxx b/src/Vrml/Vrml_Translation.cxx index 4f077ccc0f..c53c69dee4 100644 --- a/src/Vrml/Vrml_Translation.cxx +++ b/src/Vrml/Vrml_Translation.cxx @@ -38,16 +38,16 @@ Vrml_Translation::Vrml_Translation(const gp_Vec& aTranslation) Standard_OStream& Vrml_Translation::Print(Standard_OStream& anOStream) const { - anOStream << "Translation {" << endl; + anOStream << "Translation {\n"; if ( Abs(myTranslation.X() - 0) > 0.0001 || Abs(myTranslation.Y() - 0) > 0.0001 || Abs(myTranslation.Z() - 0) > 0.0001 ) { - anOStream << " translation" << '\t'; - anOStream << myTranslation.X() << ' ' << myTranslation.Y() << ' ' << myTranslation.Z() << endl; + anOStream << " translation\t"; + anOStream << myTranslation.X() << " " << myTranslation.Y() << " " << myTranslation.Z() << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_WWWAnchor.cxx b/src/Vrml/Vrml_WWWAnchor.cxx index 1fc95da08f..a92d176cf8 100644 --- a/src/Vrml/Vrml_WWWAnchor.cxx +++ b/src/Vrml/Vrml_WWWAnchor.cxx @@ -56,27 +56,27 @@ Vrml_WWWAnchor::Vrml_WWWAnchor(const TCollection_AsciiString& aName, Standard_OStream& Vrml_WWWAnchor::Print(Standard_OStream& anOStream) const { - anOStream << "WWWAnchor {" << endl; + anOStream << "WWWAnchor {\n"; if ( !(myName.IsEqual( "" ) ) ) { - anOStream << " name" << '\t'; - anOStream << '"' << myName << '"' << endl; + anOStream << " name\t"; + anOStream << '"' << myName << '"' << "\n"; } if ( !(myDescription.IsEqual("") ) ) { - anOStream << " description" << '\t'; - anOStream << '"' << myDescription << '"' << endl; + anOStream << " description\t"; + anOStream << '"' << myDescription << '"' << "\n"; } switch ( myMap ) { - case Vrml_MAP_NONE: break; // anOStream << " map" << "\tNONE "; - case Vrml_POINT: anOStream << " map" << "\t\tPOINT" << endl; break; + case Vrml_MAP_NONE: break; // anOStream << " map\tNONE "; + case Vrml_POINT: anOStream << " map\t\tPOINT\n"; break; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/Vrml/Vrml_WWWInline.cxx b/src/Vrml/Vrml_WWWInline.cxx index 7724db7974..1a68bba216 100644 --- a/src/Vrml/Vrml_WWWInline.cxx +++ b/src/Vrml/Vrml_WWWInline.cxx @@ -65,30 +65,30 @@ gp_Vec Vrml_WWWInline::BboxCenter() const Standard_OStream& Vrml_WWWInline::Print(Standard_OStream& anOStream) const { - anOStream << "WWWInline {" << endl; + anOStream << "WWWInline {\n"; if ( !(myName.IsEqual ("") ) ) { - anOStream << " name" << '\t'; - anOStream << '"' << myName << '"' << endl; + anOStream << " name\t"; + anOStream << '"' << myName << '"' << "\n"; } if ( Abs(myBboxSize.X() - 0) > 0.0001 || Abs(myBboxSize.Y() - 0) > 0.0001 || Abs(myBboxSize.Z() - 0) > 0.0001 ) { - anOStream << " bboxSize" << '\t'; - anOStream << myBboxSize.X() << ' ' << myBboxSize.Y() << ' ' << myBboxSize.Z() << endl; + anOStream << " bboxSize\t"; + anOStream << myBboxSize.X() << " " << myBboxSize.Y() << " " << myBboxSize.Z() << "\n"; } if ( Abs(myBboxCenter.X() - 0) > 0.0001 || Abs(myBboxCenter.Y() - 0) > 0.0001 || Abs(myBboxCenter.Z() - 0) > 0.0001 ) { - anOStream << " bboxCenter" << '\t'; - anOStream << myBboxCenter.X() << ' ' << myBboxCenter.Y() << ' ' << myBboxCenter.Z() << endl; + anOStream << " bboxCenter\t"; + anOStream << myBboxCenter.X() << " " << myBboxCenter.Y() << " " << myBboxCenter.Z() << "\n"; } - anOStream << '}' << endl; + anOStream << "}\n"; return anOStream; } diff --git a/src/VrmlData/VrmlData_Scene.cxx b/src/VrmlData/VrmlData_Scene.cxx index a1e3a51210..ef92b569c7 100644 --- a/src/VrmlData/VrmlData_Scene.cxx +++ b/src/VrmlData/VrmlData_Scene.cxx @@ -145,7 +145,7 @@ Standard_OStream& operator << (Standard_OStream& theOutput, aScene.myOutput = &theOutput; aScene.myNamedNodesOut.Clear(); - theOutput << "#VRML V2.0 utf8" << endl << endl; + theOutput << "#VRML V2.0 utf8\n\n"; // Real write @@ -966,17 +966,17 @@ VrmlData_ErrorStatus VrmlData_Scene::WriteLine if (aCurrentIndent < 0) aCurrentIndent = 0; if (theLin0 == 0L && theLin1 == 0L) - (* myOutput) << endl; + (* myOutput) << "\n"; else { const Standard_Integer nSpaces = Min (aCurrentIndent, sizeof(spaces)-1); (* myOutput) << &spaces[sizeof(spaces)-1 - nSpaces]; if (theLin0) { (* myOutput) << theLin0; if (theLin1) - (* myOutput) << ' ' << theLin1; + (* myOutput) << " " << theLin1; } else (* myOutput) << theLin1; - (* myOutput) << endl; + (* myOutput) << "\n"; } const int stat = myOutput->rdstate(); if (stat & ios::badbit) @@ -1075,7 +1075,7 @@ VrmlData_ErrorStatus VrmlData_Scene::WriteNode void VrmlData_Scene::Dump (Standard_OStream& theStream) const { theStream << " ===== Diagnostic Dump of a Scene (" << myAllNodes.Extent() - << " nodes)" << endl; + << " nodes)\n"; /* Iterator anIterA(myAllNodes); @@ -1194,9 +1194,9 @@ void dumpNodeHeader (Standard_OStream& theStream, const char * theType, const char * theName) { - theStream << theIndent << theType <<" node"; + theStream << theIndent << theType << " node"; if (theName[0] == '\0') - theStream << endl; + theStream << "\n"; else - theStream << ": \"" << theName << '\"' << endl; + theStream << ": \"" << theName << "\"\n"; } diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index 46d8ed7bbb..5405eac530 100644 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -106,7 +106,7 @@ //======================================================================= static Standard_Integer newDoc (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if (argc < 2) {di<<"Give document name"<<"\n";return 1;} + if (argc < 2) {di<<"Give document name\n";return 1;} Handle(TDocStd_Document) D; Handle(DDocStd_DrawDocument) DD; @@ -119,10 +119,10 @@ static Standard_Integer newDoc (Draw_Interpretor& di, Standard_Integer argc, con DD = new DDocStd_DrawDocument(D); TDataStd_Name::Set(D->GetData()->Root(),argv[1]); Draw::Set(argv[1],DD); - di << "document " << argv[1] << " created" << "\n"; + di << "document " << argv[1] << " created\n"; //DDocStd::ReturnLabel(di,D->Main()); } - else di << argv[1] << " is already a document" << "\n"; + else di << argv[1] << " is already a document\n"; return 0; } @@ -152,7 +152,7 @@ static Standard_Integer saveDoc (Draw_Interpretor& di, Standard_Integer argc, co return 0; } if (!D->IsSaved()) { - di << "this document has never been saved" << "\n"; + di << "this document has never been saved\n"; return 1; } A->Save(D); @@ -174,7 +174,7 @@ static Standard_Integer openDoc (Draw_Interpretor& di, Standard_Integer argc, co if ( argc != 3 ) { - di << "invalid number of arguments. Usage:\t XOpen filename docname" << "\n"; + di << "invalid number of arguments. Usage:\t XOpen filename docname\n"; return 1; } @@ -183,13 +183,13 @@ static Standard_Integer openDoc (Draw_Interpretor& di, Standard_Integer argc, co if ( DDocStd::GetDocument(DocName, D, Standard_False) ) { - di << "document with name " << DocName << " already exists" << "\n"; + di << "document with name " << DocName << " already exists\n"; return 1; } if ( A->Open(Filename, D) != PCDM_RS_OK ) { - di << "cannot open XDE document" << "\n"; + di << "cannot open XDE document\n"; return 1; } @@ -197,7 +197,7 @@ static Standard_Integer openDoc (Draw_Interpretor& di, Standard_Integer argc, co TDataStd_Name::Set(D->GetData()->Root(), DocName); Draw::Set(DocName, DD); - di << "document " << DocName << " opened" << "\n"; + di << "document " << DocName << " opened\n"; return 0; } @@ -209,12 +209,12 @@ static Standard_Integer openDoc (Draw_Interpretor& di, Standard_Integer argc, co static Standard_Integer dump (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc<2) { - di<<"Use: "<Main()); Standard_Boolean deep = Standard_False; @@ -304,7 +304,7 @@ static void StatAssembly(const TDF_Label L, if(i==1) di<<"\""<Main()); @@ -344,7 +344,7 @@ static Standard_Integer statdoc (Draw_Interpretor& di, Standard_Integer argc, co TDF_LabelSequence SeqLabels; aTool->GetShapes(SeqLabels); if(SeqLabels.Length()<=0) return 0; - if(PrintStructMode) di<<"\n"<<"Structure of shapes in the document:"<<"\n"; + if(PrintStructMode) di<<"\nStructure of shapes in the document:\n"; Standard_Integer level=0; Standard_Integer NbCentroidProp=0, NbVolumeProp=0, NbAreaProp=0; Standard_Integer NbShapesWithName=0, NbShapesWithColor=0, NbShapesWithLayer=0; @@ -357,7 +357,7 @@ static Standard_Integer statdoc (Draw_Interpretor& di, Standard_Integer argc, co NbShapesWithLayer, Doc, PrintStructMode, di); } Standard_Integer NbLabelsShape = 0; - di<<"\n"<<"Statistis of shapes in the document:"<<"\n"; + di<<"\nStatistis of shapes in the document:\n"; for(i=0; i<=20; i++) { if(HAI->Value(i)==0) break; //di<<"level N "<Main()); TDF_LabelSequence CLabels; CTool->GetColors(CLabels); - di<<"\n"<<"Number of colors = "<0) { for(i=1; i<=CLabels.Length(); i++) { TDF_Label aLabel = CLabels.Value(i); @@ -391,7 +391,7 @@ static Standard_Integer statdoc (Draw_Interpretor& di, Standard_Integer argc, co Handle(XCAFDoc_LayerTool) LTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main()); TDF_LabelSequence LLabels; LTool->GetLayerLabels(LLabels); - di<<"\n"<<"Number of layers = "<0) { for(i=1; i<=LLabels.Length(); i++) { TDF_Label aLabel = LLabels.Value(i); @@ -415,13 +415,13 @@ static Standard_Integer statdoc (Draw_Interpretor& di, Standard_Integer argc, co static Standard_Integer setPrs (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc <2) { - di<<"Use: "<Main()); @@ -466,7 +466,7 @@ static Standard_Integer setPrs (Draw_Interpretor& di, Standard_Integer argc, con static Standard_Integer show (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc <2) { - di<<"Use: "<GetData()->Root(), IC ) ) { @@ -572,7 +572,7 @@ static Standard_Integer xwd (Draw_Interpretor& di, Standard_Integer argc, const //======================================================================= static Standard_Integer XAttributeValue (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if ( argc <4 ) { di << "ERROR: Too few args" << "\n"; return 0; } + if ( argc <4 ) { di << "ERROR: Too few args\n"; return 0; } Handle(DDF_Browser) browser = Handle(DDF_Browser)::DownCast (Draw::Get(argv[1], Standard_True)); if ( browser.IsNull() ) { di << "ERROR: Not a browser: " << argv[1] << "\n"; return 0; } @@ -585,7 +585,7 @@ static Standard_Integer XAttributeValue (Draw_Interpretor& di, Standard_Integer TDF_AttributeIterator itr(lab,Standard_False); for (Standard_Integer i=1; itr.More() && i < num; i++) itr.Next(); - if ( ! itr.More() ) { di << "ERROR: Attribute #" << num << " not found" << "\n"; return 0; } + if ( ! itr.More() ) { di << "ERROR: Attribute #" << num << " not found\n"; return 0; } const Handle(TDF_Attribute)& att = itr.Value(); if ( att->IsKind(STANDARD_TYPE(TDataStd_TreeNode)) ) { @@ -808,7 +808,7 @@ static Standard_Integer XAttributeValue (Draw_Interpretor& di, Standard_Integer static Standard_Integer setviewName (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc <2) { - di<<"Use: "<GetData(), argv[2], aLabel); @@ -63,12 +63,12 @@ static Standard_Integer setColor (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer getColor (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<GetData(), argv[2], aLabel); @@ -84,12 +84,12 @@ static Standard_Integer getColor (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer getShapeColor (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<GetData(), argv[2], aLabel); @@ -114,12 +114,12 @@ static Standard_Integer getShapeColor (Draw_Interpretor& di, Standard_Integer ar static Standard_Integer getAllColors (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=2) { - di<<"Use: "<Main()); @@ -141,12 +141,12 @@ static Standard_Integer getAllColors (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer addColor (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=5) { - di<<"Use: "<Main()); @@ -163,12 +163,12 @@ static Standard_Integer addColor (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer removeColor (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<GetData(), argv[2], aLabel); @@ -181,12 +181,12 @@ static Standard_Integer removeColor (Draw_Interpretor& di, Standard_Integer argc static Standard_Integer findColor (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=5) { - di<<"Use: "<Main()); @@ -201,12 +201,12 @@ static Standard_Integer findColor (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer unsetColor (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=4) { - di<<"Use: "<GetData(), argv[2], aLabel); @@ -224,12 +224,12 @@ static Standard_Integer unsetColor (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer setVisibility (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc<3) { - di<<"Use: "<Main()); Standard_Boolean isvisible = Standard_False; if ( (argc==4) && (Draw::Atoi(argv[3])==1) ) isvisible = Standard_True; @@ -244,7 +244,7 @@ static Standard_Integer setVisibility (Draw_Interpretor& di, Standard_Integer ar } } if ( aLabel.IsNull() ) { - di << " cannot find indicated label in document" << "\n"; + di << " cannot find indicated label in document\n"; return 1; } localTool->SetVisibility( aLabel, isvisible ); @@ -254,12 +254,12 @@ static Standard_Integer setVisibility (Draw_Interpretor& di, Standard_Integer ar static Standard_Integer getVisibility (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc<3) { - di<<"Use: "<Main()); TDF_Label aLabel; TDF_Tool::Label(Doc->GetData(), argv[2], aLabel); @@ -271,7 +271,7 @@ static Standard_Integer getVisibility (Draw_Interpretor& di, Standard_Integer ar } } if ( aLabel.IsNull() ) { - di << " cannot find indicated label in document" << "\n"; + di << " cannot find indicated label in document\n"; return 1; } if (localTool->IsVisible( aLabel) ) di << 1; @@ -282,12 +282,12 @@ static Standard_Integer getVisibility (Draw_Interpretor& di, Standard_Integer ar static Standard_Integer getStyledVisibility (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc<3) { - di<<"Use: "<Main()); TopoDS_Shape aShape; aShape = DBRep::Get(argv[2]); @@ -299,12 +299,12 @@ static Standard_Integer getStyledVisibility (Draw_Interpretor& di, Standard_Inte static Standard_Integer getStyledcolor (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc<3) { - di<<"Use: "<Main()); if (!localTool->SetInstanceColor( aShape, type, col) ) { - di << "cannot set color for the indicated component" << "\n"; + di << "cannot set color for the indicated component\n"; return 1; } return 0; diff --git a/src/XDEDRAW/XDEDRAW_Common.cxx b/src/XDEDRAW/XDEDRAW_Common.cxx index ce55357485..d0aa39246c 100644 --- a/src/XDEDRAW/XDEDRAW_Common.cxx +++ b/src/XDEDRAW/XDEDRAW_Common.cxx @@ -107,7 +107,7 @@ static Standard_Boolean SetCurrentWS (TCollection_AsciiString filename) static Standard_Integer SetCurWS (Draw_Interpretor& di , Standard_Integer argc, const char** argv) { if (argc <2) { - di<<"Use: "<IsEmpty() ) return 1; Dico_IteratorOfDictionaryOfTransient DicIt ( DictWS ); - di << " The list of last translated files:" << "\n"; + di << " The list of last translated files:\n"; Standard_Integer num = 0; for (; DicIt.More() ; DicIt.Next(), num++ ) { TCollection_AsciiString strng ( DicIt.Name() ); @@ -156,7 +156,7 @@ static Standard_Integer GetCurWS (Draw_Interpretor& di, Standard_Integer /*argc* static Standard_Integer FromShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if ( argc <2 ) { - di << argv[0] << " shape: search for shape origin among all last tranalated files" << "\n"; + di << argv[0] << " shape: search for shape origin among all last tranalated files\n"; return 0; } @@ -168,7 +168,7 @@ static Standard_Integer FromShape (Draw_Interpretor& di, Standard_Integer argc, Handle(XSControl_WorkSession) WS = XSDRAW::Session(); Dico_IteratorOfDictionaryOfTransient DicIt ( DictWS ); -// di << "Searching for shape among all the loaded files:" << "\n"; +// di << "Searching for shape among all the loaded files:\n"; Standard_Integer num = 0; for (; DicIt.More() ; DicIt.Next(), num++ ) { Handle(XSControl_WorkSession) CurrentWS = @@ -189,7 +189,7 @@ static Standard_Integer FromShape (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer ReadIges (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if ( argc <3 ) { - di << "Use: " << argv[0] << " Doc filename [mode]: read IGES file to a document" << "\n"; + di << "Use: " << argv[0] << " Doc filename [mode]: read IGES file to a document\n"; return 0; } @@ -218,15 +218,15 @@ static Standard_Integer ReadIges (Draw_Interpretor& di, Standard_Integer argc, c if (modfic) readstat = reader.ReadFile (fnom.ToCString()); else if (XSDRAW::Session()->NbStartingEntities() > 0) readstat = IFSelect_RetDone; if (readstat != IFSelect_RetDone) { - if (modfic) di<<"Could not read file "<NewDocument("BinXCAF",doc); TDataStd_Name::Set(doc->GetData()->Root(),argv[1]); Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc); @@ -234,7 +234,7 @@ static Standard_Integer ReadIges (Draw_Interpretor& di, Standard_Integer argc, c // di << "Document saved with name " << argv[1]; } if ( ! reader.Transfer ( doc ) ) { - di << "Cannot read any relevant data from the IGES file" << "\n"; + di << "Cannot read any relevant data from the IGES file\n"; return 1; } @@ -253,14 +253,14 @@ static Standard_Integer ReadIges (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer WriteIges (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if ( argc <3 ) { - di << "Use: " << argv[0] << " Doc filename [mode]: write document to IGES file" << "\n"; + di << "Use: " << argv[0] << " Doc filename [mode]: write document to IGES file\n"; return 0; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); if ( Doc.IsNull() ) { - di << argv[1] << " is not a document" << "\n"; + di << argv[1] << " is not a document\n"; return 1; } @@ -284,8 +284,8 @@ static Standard_Integer WriteIges (Draw_Interpretor& di, Standard_Integer argc, writer.Transfer ( Doc ); di << "Writig IGES model to file " << argv[2] << "\n"; - if ( writer.Write ( argv[2] ) ) di<<" Write OK"<<"\n"; - else di<<" Write failed"<<"\n"; + if ( writer.Write ( argv[2] ) ) di<<" Write OK\n"; + else di<<" Write failed\n"; return 0; } @@ -298,7 +298,7 @@ static Standard_Integer WriteIges (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer ReadStep (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if ( argc <3 ) { - di << "Use: " << argv[0] << " Doc filename [mode]: read STEP file to a document" << "\n"; + di << "Use: " << argv[0] << " Doc filename [mode]: read STEP file to a document\n"; return 0; } @@ -329,15 +329,15 @@ static Standard_Integer ReadStep (Draw_Interpretor& di, Standard_Integer argc, c if (modfic) readstat = reader.ReadFile (fnom.ToCString()); else if (XSDRAW::Session()->NbStartingEntities() > 0) readstat = IFSelect_RetDone; if (readstat != IFSelect_RetDone) { - if (modfic) di<<"Could not read file "<NewDocument("BinXCAF",doc); TDataStd_Name::Set(doc->GetData()->Root(),argv[1]); Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc); @@ -345,7 +345,7 @@ static Standard_Integer ReadStep (Draw_Interpretor& di, Standard_Integer argc, c // di << "Document saved with name " << argv[1]; } if ( ! reader.Transfer ( doc ) ) { - di << "Cannot read any relevant data from the STEP file" << "\n"; + di << "Cannot read any relevant data from the STEP file\n"; return 1; } @@ -368,8 +368,8 @@ static Standard_Integer ReadStep (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer WriteStep (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if ( argc <3 ) { - di << "Use: " << argv[0] << " Doc filename [mode [multifile_prefix [label]]]: write document to the STEP file" << "\n"; - di << "mode can be: a or 0 : AsIs (default)" << "\n"; + di << "Use: " << argv[0] << " Doc filename [mode [multifile_prefix [label]]]: write document to the STEP file\n"; + di << "mode can be: a or 0 : AsIs (default)\n"; di << " f or 1 : FacettedBRep s or 2 : ShellBasedSurfaceModel\n"; di << " m or 3 : ManifoldSolidBrep w or 4 : GeometricCurveSet/WireFrame\n"; di << "multifile_prefix: triggers writing assembly components as separate files,\n"; @@ -381,7 +381,7 @@ static Standard_Integer WriteStep (Draw_Interpretor& di, Standard_Integer argc, Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); if ( Doc.IsNull() ) { - di << argv[1] << " is not a document" << "\n"; + di << argv[1] << " is not a document\n"; return 1; } Standard_CString multifile = 0; @@ -404,7 +404,7 @@ static Standard_Integer WriteStep (Draw_Interpretor& di, Standard_Integer argc, case '3' : mode = STEPControl_ManifoldSolidBrep; break; case 'w' : case '4' : mode = STEPControl_GeometricCurveSet; break; - default : di<<"3st arg = mode, incorrect [give fsmw]"<<"\n"; return 1; + default : di<<"3st arg = mode, incorrect [give fsmw]\n"; return 1; } Standard_Boolean wrmode = Standard_True; for ( Standard_Integer i = 0; argv[k][i] ; i++ ) @@ -438,19 +438,19 @@ static Standard_Integer WriteStep (Draw_Interpretor& di, Standard_Integer argc, } if( !label.IsNull()) { - di << "Translating label "<< argv[k]<<" of document " << argv[1] << " to STEP" << "\n"; + di << "Translating label "<< argv[k]<<" of document " << argv[1] << " to STEP\n"; if(!writer.Transfer ( label, mode, multifile )) { - di << "The label of document cannot be translated or gives no result" << "\n"; + di << "The label of document cannot be translated or gives no result\n"; return 1; } } else { - di << "Translating document " << argv[1] << " to STEP" << "\n"; + di << "Translating document " << argv[1] << " to STEP\n"; if ( ! writer.Transfer ( Doc, mode, multifile ) ) { - di << "The document cannot be translated or gives no result" << "\n"; + di << "The document cannot be translated or gives no result\n"; } } @@ -458,16 +458,16 @@ static Standard_Integer WriteStep (Draw_Interpretor& di, Standard_Integer argc, di << "Writing STEP file " << argv[2] << "\n"; IFSelect_ReturnStatus stat = writer.Write(argv[2]); switch (stat) { - case IFSelect_RetVoid : di<<"No file written"<<"\n"; break; + case IFSelect_RetVoid : di<<"No file written\n"; break; case IFSelect_RetDone : { - di<<"File "<Main()); Standard_Boolean recurs = Standard_False; @@ -490,7 +490,7 @@ static Standard_Integer Expand (Draw_Interpretor& di, Standard_Integer argc, con if (argc == 3) { if(!XCAFDoc_Editor::Expand(Doc->Main(), recurs)){ - di << "The shape is assembly or not compaund" << "\n"; + di << "The shape is assembly or not compaund\n"; return 1; } } @@ -508,12 +508,12 @@ static Standard_Integer Expand (Draw_Interpretor& di, Standard_Integer argc, con if (!aLabel.IsNull()){ if(!XCAFDoc_Editor::Expand(Doc->Main(), aLabel, recurs)){ - di << "The shape is assembly or not compaund" << "\n"; + di << "The shape is assembly or not compaund\n"; return 1; } } else - { di << argv[i] << " is not a shape" << "\n"; return 1; } + { di << argv[i] << " is not a shape\n"; return 1; } } } return 0; diff --git a/src/XDEDRAW/XDEDRAW_GDTs.cxx b/src/XDEDRAW/XDEDRAW_GDTs.cxx index 8636f2054a..d6632738d3 100644 --- a/src/XDEDRAW/XDEDRAW_GDTs.cxx +++ b/src/XDEDRAW/XDEDRAW_GDTs.cxx @@ -62,12 +62,12 @@ static Standard_Integer DumpDGTs (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XDumpDGTs Doc shape/label/all\n"; + di<<"Use: XDumpDGTs Doc shape/label/all\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool= XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -123,7 +123,7 @@ static Standard_Integer DumpDGTs (Draw_Interpretor& di, Standard_Integer argc, c { TCollection_AsciiString Entry; TDF_Tool::Entry(aLabels.Value(i), Entry); - di << "\n " << Entry << " Shape" << "."<< i; + di << "\n " << Entry << " Shape."<< i; flag = Standard_False; } TCollection_AsciiString Entry; @@ -131,7 +131,7 @@ static Standard_Integer DumpDGTs (Draw_Interpretor& di, Standard_Integer argc, c di << "\n \t " << Entry; flag = Standard_False; - di << " Dimension" << "."<< i << "."<< j; + di << " Dimension."<< i << "."<< j; if (argc > 3) { di <<" ("; @@ -193,7 +193,7 @@ static Standard_Integer DumpDGTs (Draw_Interpretor& di, Standard_Integer argc, c { TCollection_AsciiString Entry; TDF_Tool::Entry(aLabels.Value(i), Entry); - di << "\n " << Entry << " Shape" << "."<< i; + di << "\n " << Entry << " Shape."<< i; flag = Standard_False; } TCollection_AsciiString Entry; @@ -201,7 +201,7 @@ static Standard_Integer DumpDGTs (Draw_Interpretor& di, Standard_Integer argc, c di << "\n \t " << Entry; flag = Standard_False; - di << " GeomTolerance" << "."<< i << "."<< j; + di << " GeomTolerance."<< i << "."<< j; if (argc > 3) { di <<" ("; @@ -257,7 +257,7 @@ static Standard_Integer DumpDGTs (Draw_Interpretor& di, Standard_Integer argc, c TCollection_AsciiString anEntry; TDF_Tool::Entry(aNode->GetChild(k)->Label(), anEntry); di << "\n \t \t " << anEntry; - di << " Datum" << "."<< i << "."<< j << "."<< k; + di << " Datum."<< i << "."<< j << "."<< k; if (argc > 3) { di <<" ("; @@ -299,7 +299,7 @@ static Standard_Integer DumpDGTs (Draw_Interpretor& di, Standard_Integer argc, c { TCollection_AsciiString Entry; TDF_Tool::Entry(aLabels.Value(i), Entry); - di << "\n " << Entry << " Shape" << "."<< i; + di << "\n " << Entry << " Shape."<< i; flag = Standard_False; } TCollection_AsciiString Entry; @@ -307,7 +307,7 @@ static Standard_Integer DumpDGTs (Draw_Interpretor& di, Standard_Integer argc, c di << "\n \t " << Entry; flag = Standard_False; - di << " Datum target" << "."<< i << "."<< j; + di << " Datum target."<< i << "."<< j; if (argc > 3) { di <<" ("; @@ -339,12 +339,12 @@ static Standard_Integer DumpDGTs (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer DumpNbDGTs (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 2) { - di<<"Use: "<<"XDumpNbDGTs Doc"; + di<<"Use: XDumpNbDGTs Doc"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool= XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -403,12 +403,12 @@ static Standard_Integer DumpNbDGTs (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer addDim (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XAddDimension Doc shape/label [shape/label]\n"; + di<<"Use: XAddDimension Doc shape/label [shape/label]\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -460,12 +460,12 @@ static Standard_Integer addDim (Draw_Interpretor& di, Standard_Integer argc, con static Standard_Integer addGTol (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XAddGeomTolerance Doc shape/label\n"; + di<<"Use: XAddGeomTolerance Doc shape/label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -496,12 +496,12 @@ static Standard_Integer addGTol (Draw_Interpretor& di, Standard_Integer argc, co static Standard_Integer addDatum (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XAddDatum Doc shape/label\n"; + di<<"Use: XAddDatum Doc shape/label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -532,12 +532,12 @@ static Standard_Integer addDatum (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer setDatum (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XSetDatum Doc Datum_Label GeomTol_Label\n"; + di<<"Use: XSetDatum Doc Datum_Label GeomTol_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -564,12 +564,12 @@ static Standard_Integer setDatum (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer getDatum (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetDatum Doc GeomTol_Label/Shape_Label\n"; + di<<"Use: XGetDatum Doc GeomTol_Label/Shape_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -599,12 +599,12 @@ static Standard_Integer getDatum (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer addDatumModif (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XAddDatumModifier Doc Datum_Label mod1 mod2 ...\n"; + di<<"Use: XAddDatumModifier Doc Datum_Label mod1 mod2 ...\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -634,12 +634,12 @@ static Standard_Integer addDatumModif (Draw_Interpretor& di, Standard_Integer ar static Standard_Integer getDatumModif (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetDatumModifiers Doc Datum_Label\n"; + di<<"Use: XGetDatumModifiers Doc Datum_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -690,12 +690,12 @@ static Standard_Integer getDatumModif (Draw_Interpretor& di, Standard_Integer ar static Standard_Integer setDatumName (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XSetDatumName Doc Datum_Label name\n"; + di<<"Use: XSetDatumName Doc Datum_Label name\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -719,12 +719,12 @@ static Standard_Integer setDatumName (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer getDatumName (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetDatumName Doc Datum_Label\n"; + di<<"Use: XGetDatumName Doc Datum_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -746,12 +746,12 @@ static Standard_Integer getDatumName (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer setTypeOfTol (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XSetTypeOfTolerance Doc GTol_Label type\n"; + di<<"Use: XSetTypeOfTolerance Doc GTol_Label type\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -778,12 +778,12 @@ static Standard_Integer setTypeOfTol (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer getTypeOfTol (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetTypeOfTolerance Doc GTol_Label\n"; + di<<"Use: XGetTypeOfTolerance Doc GTol_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -823,12 +823,12 @@ static Standard_Integer getTypeOfTol (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer setTypeOfTolVal (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XSetTypeOfToleranceValue Doc GTol_Label type\n"; + di<<"Use: XSetTypeOfToleranceValue Doc GTol_Label type\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -855,12 +855,12 @@ static Standard_Integer setTypeOfTolVal (Draw_Interpretor& di, Standard_Integer static Standard_Integer getTypeOfTolVal (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetTypeOfToleranceValue Doc GTol_Label\n"; + di<<"Use: XGetTypeOfToleranceValue Doc GTol_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -887,12 +887,12 @@ static Standard_Integer getTypeOfTolVal (Draw_Interpretor& di, Standard_Integer static Standard_Integer setTolVal (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XSetToleranceValue Doc GTol_Label value\n"; + di<<"Use: XSetToleranceValue Doc GTol_Label value\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -916,12 +916,12 @@ static Standard_Integer setTolVal (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer getTolVal (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetToleranceValue Doc GTol_Label\n"; + di<<"Use: XGetToleranceValue Doc GTol_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -943,12 +943,12 @@ static Standard_Integer getTolVal (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer setMatReq (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XSetTolMaterialReq Doc GTol_Label mod\n"; + di<<"Use: XSetTolMaterialReq Doc GTol_Label mod\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -975,12 +975,12 @@ static Standard_Integer setMatReq (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer getMatReq (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetTolMaterialReq Doc GTol_Label\n"; + di<<"Use: XGetTolMaterialReq Doc GTol_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1007,12 +1007,12 @@ static Standard_Integer getMatReq (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer setZoneMod (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XSetTolZoneMod Doc GTol_Label mod\n"; + di<<"Use: XSetTolZoneMod Doc GTol_Label mod\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1039,12 +1039,12 @@ static Standard_Integer setZoneMod (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer getZoneMod (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetTolZoneMod Doc GTol_Label\n"; + di<<"Use: XGetTolZoneMod Doc GTol_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1071,12 +1071,12 @@ static Standard_Integer getZoneMod (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer setZoneModVal (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XSetTolZoneModValue Doc GTol_Label val\n"; + di<<"Use: XSetTolZoneModValue Doc GTol_Label val\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1100,12 +1100,12 @@ static Standard_Integer setZoneModVal (Draw_Interpretor& di, Standard_Integer ar static Standard_Integer getZoneModVal (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetTolZoneModValue Doc GTol_Label\n"; + di<<"Use: XGetTolZoneModValue Doc GTol_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1127,12 +1127,12 @@ static Standard_Integer getZoneModVal (Draw_Interpretor& di, Standard_Integer ar static Standard_Integer addTolModif (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XAddTolModifier Doc Tol_Label mod1 mod2 ...\n"; + di<<"Use: XAddTolModifier Doc Tol_Label mod1 mod2 ...\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1162,12 +1162,12 @@ static Standard_Integer addTolModif (Draw_Interpretor& di, Standard_Integer argc static Standard_Integer getTolModif (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetTolModifiers Doc Tol_Label\n"; + di<<"Use: XGetTolModifiers Doc Tol_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1211,12 +1211,12 @@ static Standard_Integer getTolModif (Draw_Interpretor& di, Standard_Integer argc static Standard_Integer setTolMaxVal (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XSetTolMaxValue Doc Dim_Label val\n"; + di<<"Use: XSetTolMaxValue Doc Dim_Label val\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1240,12 +1240,12 @@ static Standard_Integer setTolMaxVal (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer getTolMaxVal (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetTolMaxValue Doc Dim_Label\n"; + di<<"Use: XGetTolMaxValue Doc Dim_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1267,12 +1267,12 @@ static Standard_Integer getTolMaxVal (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer setDimType (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XSetDimensionType Doc Dim_Label type\n"; + di<<"Use: XSetDimensionType Doc Dim_Label type\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1299,12 +1299,12 @@ static Standard_Integer setDimType (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer getDimType (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetDimensionType Doc Dim_Label\n"; + di<<"Use: XGetDimensionType Doc Dim_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1358,12 +1358,12 @@ static Standard_Integer getDimType (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer setDimVal (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XSetDimensionValue Doc Dim_Label val\n"; + di<<"Use: XSetDimensionValue Doc Dim_Label val\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1387,12 +1387,12 @@ static Standard_Integer setDimVal (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer getDimVal (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetDimensionValue Doc Dim_Label\n"; + di<<"Use: XGetDimensionValue Doc Dim_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1414,12 +1414,12 @@ static Standard_Integer getDimVal (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer setDimQalif (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XSetDimensionQualifier Doc Dim_Label val\n"; + di<<"Use: XSetDimensionQualifier Doc Dim_Label val\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1446,12 +1446,12 @@ static Standard_Integer setDimQalif (Draw_Interpretor& di, Standard_Integer argc static Standard_Integer getDimQalif (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetDimensionQualifier Doc Dim_Label\n"; + di<<"Use: XGetDimensionQualifier Doc Dim_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1480,12 +1480,12 @@ static Standard_Integer getDimQalif (Draw_Interpretor& di, Standard_Integer argc static Standard_Integer setDimRange (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 5) { - di<<"Use: "<<"XSetDimensionRange Doc Dim_Label low_val up_val\n"; + di<<"Use: XSetDimensionRange Doc Dim_Label low_val up_val\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1513,12 +1513,12 @@ static Standard_Integer setDimRange (Draw_Interpretor& di, Standard_Integer argc static Standard_Integer getDimRange (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetDimensionRange Doc Dim_Label\n"; + di<<"Use: XGetDimensionRange Doc Dim_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1541,12 +1541,12 @@ static Standard_Integer getDimRange (Draw_Interpretor& di, Standard_Integer argc static Standard_Integer setDimPlusMinusTol (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 5) { - di<<"Use: "<<"XSetDimensionPlusMinusTol Doc Dim_Label low_val up_val\n"; + di<<"Use: XSetDimensionPlusMinusTol Doc Dim_Label low_val up_val\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1574,12 +1574,12 @@ static Standard_Integer setDimPlusMinusTol (Draw_Interpretor& di, Standard_Integ static Standard_Integer getDimPlusMinusTol (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetDimensionPlusMinusTol Doc Dim_Label\n"; + di<<"Use: XGetDimensionPlusMinusTol Doc Dim_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1602,12 +1602,12 @@ static Standard_Integer getDimPlusMinusTol (Draw_Interpretor& di, Standard_Integ static Standard_Integer setDimClassTol (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 6) { - di<<"Use: "<<"XSetDimensionClassOfTol Doc Dim_Label ishole[1/0] formVar grade\n"; + di<<"Use: XSetDimensionClassOfTol Doc Dim_Label ishole[1/0] formVar grade\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1634,12 +1634,12 @@ static Standard_Integer setDimClassTol (Draw_Interpretor& di, Standard_Integer a static Standard_Integer getDimClassTol (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetDimensionClassOfTol Doc Dim_Label\n"; + di<<"Use: XGetDimensionClassOfTol Doc Dim_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1757,12 +1757,12 @@ static Standard_Integer getDimClassTol (Draw_Interpretor& di, Standard_Integer a static Standard_Integer setDimNbOfDecimalPlaces (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 5) { - di<<"Use: "<<"XSetDimensionNbOfDecimalPlaces Doc Dim_Label l_val r_val\n"; + di<<"Use: XSetDimensionNbOfDecimalPlaces Doc Dim_Label l_val r_val\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1786,12 +1786,12 @@ static Standard_Integer setDimNbOfDecimalPlaces (Draw_Interpretor& di, Standard_ static Standard_Integer getDimNbOfDecimalPlaces (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetDimensionNbOfDecimalPlaces Doc Dim_Label\n"; + di<<"Use: XGetDimensionNbOfDecimalPlaces Doc Dim_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1815,12 +1815,12 @@ static Standard_Integer getDimNbOfDecimalPlaces (Draw_Interpretor& di, Standard_ static Standard_Integer addDimModifier (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XAddDimensionModifiers Doc Dim_Label mod1 mod2 ...\n"; + di<<"Use: XAddDimensionModifiers Doc Dim_Label mod1 mod2 ...\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1850,12 +1850,12 @@ static Standard_Integer addDimModifier (Draw_Interpretor& di, Standard_Integer a static Standard_Integer getDimModifier (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetDimensionModifiers Doc Dim_Label\n"; + di<<"Use: XGetDimensionModifiers Doc Dim_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1908,12 +1908,12 @@ static Standard_Integer getDimModifier (Draw_Interpretor& di, Standard_Integer a static Standard_Integer addDimPath (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 4) { - di<<"Use: "<<"XSetDimensionPath Doc Dim_Label path(edge)\n"; + di<<"Use: XSetDimensionPath Doc Dim_Label path(edge)\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1941,12 +1941,12 @@ static Standard_Integer addDimPath (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer addDimPoints (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 5) { - di<<"Use: "<<"XSetDimensionPoints Doc Dim_Label v1 v2\n"; + di<<"Use: XSetDimensionPoints Doc Dim_Label v1 v2\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -1978,12 +1978,12 @@ static Standard_Integer addDimPoints (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer getDimPoints (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XGetDimensionPoints Doc Dim_Label\n"; + di<<"Use: XGetDimensionPoints Doc Dim_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -2010,12 +2010,12 @@ static Standard_Integer getDimPoints (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer addDimDir (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 6) { - di<<"Use: "<<"XSetDimensionDir Doc Dim_Label x y z\n"; + di<<"Use: XSetDimensionDir Doc Dim_Label x y z\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); @@ -2039,12 +2039,12 @@ static Standard_Integer addDimDir (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer getDimDir (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<<"XSetDimensionDir Doc Dim_Label\n"; + di<<"Use: XSetDimensionDir Doc Dim_Label\n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); Handle(XCAFDoc_ShapeTool) aShapeTool= XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); diff --git a/src/XDEDRAW/XDEDRAW_Layers.cxx b/src/XDEDRAW/XDEDRAW_Layers.cxx index 0fc6ff6a85..e28b2c632e 100644 --- a/src/XDEDRAW/XDEDRAW_Layers.cxx +++ b/src/XDEDRAW/XDEDRAW_Layers.cxx @@ -35,12 +35,12 @@ static Standard_Integer addLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<Main()); TCollection_ExtendedString aLayer = argv[2]; @@ -54,12 +54,12 @@ static Standard_Integer addLayer (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer findLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<Main()); TCollection_ExtendedString aLayer = argv[2]; @@ -73,12 +73,12 @@ static Standard_Integer findLayer (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer removeLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<Main()); TDF_Label aLabel; @@ -96,14 +96,14 @@ static Standard_Integer removeLayer (Draw_Interpretor& di, Standard_Integer argc static Standard_Integer setLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc<4) { - di<<"Use: "<Main()); TDF_Label aLabel; TCollection_ExtendedString aLayer = argv[3]; @@ -125,13 +125,13 @@ static Standard_Integer setLayer (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer getLayers (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<Main()); TDF_Label aLabel; Handle(TColStd_HSequenceOfExtendedString) aLayerS; @@ -149,7 +149,7 @@ static Standard_Integer getLayers (Draw_Interpretor& di, Standard_Integer argc, if (!aLayerS.IsNull() && aLayerS->Length()!=0) for (; i <= aLayerS->Length(); i++) { TCollection_AsciiString Entry(aLayerS->Value(i),'?'); - di << "\"" << Entry.ToCString() << "\"" << " "; + di << "\"" << Entry.ToCString() << "\" "; } return 0; } @@ -158,12 +158,12 @@ static Standard_Integer getLayers (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer getLayerLabels (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=2) { - di<<"Use: "<Main()); TDF_LabelSequence aLabs; localLayerTool->GetLayerLabels(aLabs); @@ -186,12 +186,12 @@ static Standard_Integer getLayerLabels (Draw_Interpretor& di, Standard_Integer a static Standard_Integer getOneLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<Main()); TDF_Label aLabel; TDF_Tool::Label(Doc->GetData(), argv[2], aLabel); @@ -208,14 +208,14 @@ static Standard_Integer getOneLayer (Draw_Interpretor& di, Standard_Integer argc static Standard_Integer setLinkLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc<4) { - di<<"Use: "<Main()); TDF_Label aLabel, layerLabel; TDF_Tool::Label(Doc->GetData(), argv[3], layerLabel); @@ -239,12 +239,12 @@ static Standard_Integer setLinkLayer (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer getAllLayers (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=2) { - di<<"Use: "<Main()); TDF_LabelSequence aLabs; localLayerTool->GetLayerLabels(aLabs); @@ -270,12 +270,12 @@ static Standard_Integer getAllLayers (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer unSetLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=4) { - di<<"Use: "<Main()); TDF_Label aLabel; TCollection_ExtendedString aLayer = argv[3]; @@ -297,12 +297,12 @@ static Standard_Integer unSetLayer (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer unSetAllLayers (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<Main()); TDF_Label aLabel; @@ -323,12 +323,12 @@ static Standard_Integer unSetAllLayers (Draw_Interpretor& di, Standard_Integer a static Standard_Integer removeAllLayers (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=2) { - di<<"Use: "<Main()); TDF_LabelSequence aLabs; @@ -349,12 +349,12 @@ static Standard_Integer removeAllLayers (Draw_Interpretor& di, Standard_Integer static Standard_Integer setVisibility (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc<3) { - di<<"Use: "<Main()); Standard_Boolean isvisible = Standard_False; if ( (argc==4) && (Draw::Atoi(argv[3])==1) ) isvisible = Standard_True; @@ -374,12 +374,12 @@ static Standard_Integer setVisibility (Draw_Interpretor& di, Standard_Integer ar static Standard_Integer isVisible (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<Main()); TDF_Label aLabel; diff --git a/src/XDEDRAW/XDEDRAW_Props.cxx b/src/XDEDRAW/XDEDRAW_Props.cxx index a4c61af65e..64c818cea6 100644 --- a/src/XDEDRAW/XDEDRAW_Props.cxx +++ b/src/XDEDRAW/XDEDRAW_Props.cxx @@ -171,7 +171,7 @@ static Standard_Real CalculVolume(const TopoDS_Shape& So, localCentroid = localCentroid * (1./ myVolume); - di << "Centroid:" << "\n"; + di << "Centroid:\n"; di << "X=\t" << localCentroid.X() << "\n"; di << "Y=\t" << localCentroid.Y() << "\n"; di << "Z=\t" << localCentroid.Z() << "\n"; @@ -194,12 +194,12 @@ static Standard_Real CalculVolume(const TopoDS_Shape& So, static Standard_Integer SetProps (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { - di<<"Use: "<GetData(), argv[2], aLabel); @@ -406,12 +406,12 @@ static Standard_Integer GetVolume (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer GetArea (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<GetData(), argv[2], aLabel); @@ -442,12 +442,12 @@ static Standard_Integer GetArea (Draw_Interpretor& di, Standard_Integer argc, co static Standard_Integer GetCentroid (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<2 && Draw::Atof(argv[2]) != 0 ) withVolFix = Standard_True; Standard_Boolean wholeDoc = ( argc <4 ); @@ -515,7 +515,7 @@ static Standard_Integer CheckProps (Draw_Interpretor& di, Standard_Integer argc, STool->GetShapes(seq); } if ( wholeDoc ) { - di << "Label Area defect Volume defect dX dY dZ Name" << "\n"; + di << "Label Area defect Volume defect dX dY dZ Name\n"; } for ( Standard_Integer i=1; i <= seq.Length(); i++ ) { TDF_Label aLabel = seq(i); @@ -661,7 +661,7 @@ static Standard_Integer CheckProps (Draw_Interpretor& di, Standard_Integer argc, //fflush ( stdout ); di << ": "; di << Standard_Failure::Caught()->GetMessageString(); - di<<" ** Skip"<<"\n"; + di<<" ** Skip\n"; #endif } } @@ -693,7 +693,7 @@ static Standard_Integer CheckProps (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer ShapeVolume (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<2) atol = Draw::Atof(argv[2]); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Standard_Boolean wholeDoc = ( argc <4 ); TDF_LabelSequence seq; if ( ! wholeDoc ) { @@ -843,7 +843,7 @@ static Standard_Integer ShapeMassProps (Draw_Interpretor& di, Standard_Integer a STool->GetShapes(seq); } //if ( wholeDoc ) { - // di << "Label Area defect Volume defect dX dY dZ Name" << "\n"; + // di << "Label Area defect Volume defect dX dY dZ Name\n"; // } gp_XYZ aCenterGravity(0.0,0.0,0.0); Standard_Real aMassVal =0.0; @@ -861,8 +861,8 @@ static Standard_Integer ShapeMassProps (Draw_Interpretor& di, Standard_Integer a di<<"\n"; } else { -// di<<"For one component density is absent"<<"\n"; - di<<"Shape from label : "<GetData(), argv[2], aLabel); diff --git a/src/XDEDRAW/XDEDRAW_Shapes.cxx b/src/XDEDRAW/XDEDRAW_Shapes.cxx index 53c230acb3..954be5fccc 100644 --- a/src/XDEDRAW/XDEDRAW_Shapes.cxx +++ b/src/XDEDRAW/XDEDRAW_Shapes.cxx @@ -41,12 +41,12 @@ static Standard_Integer addShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc<3) { - di<<"Use: "<AddShape(aShape, makeAssembly); - if (aLabel.IsNull()) di<<"Null Label"<<"\n"; + if (aLabel.IsNull()) di<<"Null Label\n"; TCollection_AsciiString Entry; TDF_Tool::Entry(aLabel, Entry); di << Entry.ToCString(); @@ -65,13 +65,13 @@ static Standard_Integer addShape (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer newShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=2) { - di<<"Use: "<Main()); //XCAFDoc_ShapeTool myAssembly; @@ -87,17 +87,17 @@ static Standard_Integer newShape (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer setShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=4) { - di<<"Use: "<GetData(), argv[2], aLabel); TopoDS_Shape aShape; - // if (aLabel.IsNull()) di<<"Null Label"<<"\n"; + // if (aLabel.IsNull()) di<<"Null Label\n"; aShape = DBRep::Get(argv[3]); // XCAFDoc_ShapeTool myAssembly; // myAssembly.Init(Doc); @@ -110,16 +110,16 @@ static Standard_Integer setShape (Draw_Interpretor& di, Standard_Integer argc, c static Standard_Integer getShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=4) { - di<<"Use: "<GetData(), argv[3], aLabel); - if (aLabel.IsNull()) {di<<"No such Label"<<"\n"; return 1;} + if (aLabel.IsNull()) {di<<"No such Label\n"; return 1;} TopoDS_Shape aShape; // XCAFDoc_ShapeTool myAssembly; // myAssembly.Init(Doc); @@ -135,16 +135,16 @@ static Standard_Integer removeShape (Draw_Interpretor& di, Standard_Integer argc { if (argc != 3 && argc != 4) { - di<<"Use: "<GetData(), argv[2], aLabel); - if (aLabel.IsNull()) {di<<"No such Label"<<"\n"; return 1;} + if (aLabel.IsNull()) {di<<"No such Label\n"; return 1;} TopoDS_Shape aShape; // XCAFDoc_ShapeTool myAssembly; // myAssembly.Init(Doc); @@ -160,12 +160,12 @@ static Standard_Integer removeShape (Draw_Interpretor& di, Standard_Integer argc static Standard_Integer findShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<GetData(), argv[2], aLabel); @@ -199,22 +199,22 @@ static Standard_Integer labelInfo (Draw_Interpretor& di, Standard_Integer argc, TCollection_AsciiString Entry; if ( myAssembly->IsShape(aLabel) ) { - //di<<"There are a TopLevelShape"<<"\n"; + //di<<"There are a TopLevelShape\n"; Entry="There are a TopLevelShape"; di << Entry.ToCString(); } if ( myAssembly->IsComponent(aLabel) ) { - //di<<"There are a Component"<<"\n"; + //di<<"There are a Component\n"; Entry="There are a Component"; di << Entry.ToCString(); } if ( myAssembly->IsAssembly(aLabel) ) { - //di<<"There are an Assembly"<<"\n"; + //di<<"There are an Assembly\n"; Entry="There are an Assembly"; di << Entry.ToCString(); } if ( myAssembly->IsFree(aLabel) ) { - //di<<"This Shape don't used"<<"\n"; + //di<<"This Shape don't used\n"; Entry="This Shape don't used"; di << Entry.ToCString(); } @@ -224,7 +224,7 @@ static Standard_Integer labelInfo (Draw_Interpretor& di, Standard_Integer argc, static Standard_Integer getUsers (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc<3) { - di<<"Use: "<GetData(), argv[2], aLabel); @@ -241,21 +241,21 @@ static Standard_Integer getUsers (Draw_Interpretor& di, Standard_Integer argc, c TCollection_AsciiString Entry; Entry=myAssembly->GetUsers(aLabel, labseq, getsubchilds); di << Entry.ToCString(); - //di<GetUsers(aLabel, labseq, getsubchilds)<<" assemblies use this component"<<"\n"; + //di<GetUsers(aLabel, labseq, getsubchilds)<<" assemblies use this component\n"; return 0; } static Standard_Integer nbComponents (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc<3) { - di<<"Use: "<GetData(), argv[2], aLabel); @@ -266,8 +266,8 @@ static Standard_Integer nbComponents (Draw_Interpretor& di, Standard_Integer arg TCollection_AsciiString Entry; Entry=myAssembly->NbComponents( aLabel, getsubchilds); di << Entry.ToCString(); - //di<<" components"<<"\n"; - //di<<"This assembly has "<NbComponents( aLabel, getsubchilds )<<" components"<<"\n"; + //di<<" components\n"; + //di<<"This assembly has "<NbComponents( aLabel, getsubchilds )<<" components\n"; return 0; } @@ -275,12 +275,12 @@ static Standard_Integer nbComponents (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer addComponent (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=4) { - di<<"Use: "<GetData(), argv[2], aLabel); @@ -300,12 +300,12 @@ static Standard_Integer addComponent (Draw_Interpretor& di, Standard_Integer arg static Standard_Integer removeComponent (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<GetData(), argv[2], aLabel); @@ -319,12 +319,12 @@ static Standard_Integer removeComponent (Draw_Interpretor& di, Standard_Integer static Standard_Integer getReferredShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<GetData(), argv[2], aLabel); @@ -343,12 +343,12 @@ static Standard_Integer getReferredShape (Draw_Interpretor& di, Standard_Integer static Standard_Integer getTopLevelShapes (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=2) { - di<<"Use: "<Main()); STool->GetFreeShapes(Labels); if ( Labels.Length() <=0 ) { - di << "Document " << argv[1] << " contain no shapes" << "\n"; + di << "Document " << argv[1] << " contain no shapes\n"; return 0; } @@ -414,19 +414,19 @@ static Standard_Integer getFreeShapes (Draw_Interpretor& di, Standard_Integer ar static Standard_Integer getOneShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc!=3) { - di<<"Use: "<Main()); STool->GetFreeShapes(Labels); if ( Labels.Length() <=0 ) { - di << "Document " << argv[2] << " contain no shapes" << "\n"; + di << "Document " << argv[2] << " contain no shapes\n"; return 0; } @@ -456,14 +456,14 @@ static Standard_Integer XDumpLocation (Draw_Interpretor& di, Standard_Integer ar { if (argc != 3) { - di << "Use: " << argv[0] << " Doc Label " << "\n"; + di << "Use: " << argv[0] << " Doc Label \n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); if (Doc.IsNull()) { - di << argv[1] << " is not a document" << "\n"; + di << argv[1] << " is not a document\n"; return 1; } @@ -473,7 +473,7 @@ static Standard_Integer XDumpLocation (Draw_Interpretor& di, Standard_Integer ar Handle(XCAFDoc_Location) aLoc; if (!aLabel.FindAttribute(XCAFDoc_Location::GetID(), aLoc)) { - di << "Label " << argv[2] << " doesn't contain XCAFDoc_Location attribute" << "\n"; + di << "Label " << argv[2] << " doesn't contain XCAFDoc_Location attribute\n"; return 1; } @@ -499,12 +499,12 @@ static Standard_Integer setSHUO (Draw_Interpretor& di, Standard_Integer argc, co { if (argc < 4) { - di << "Use: " << argv[0] << " Doc UU_Label NU_Label " << "\n"; + di << "Use: " << argv[0] << " Doc UU_Label NU_Label \n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } TDF_LabelSequence aLabSeq; for (Standard_Integer i = 3; i <= argc; i++) { @@ -516,13 +516,13 @@ static Standard_Integer setSHUO (Draw_Interpretor& di, Standard_Integer argc, co di << argv[i - 1] << " is null label" << "\n"; } if (aLabSeq.Length() < 2) { - di << "Error: couldnot set SHUO between on less then 2 labels" << "\n"; + di << "Error: couldnot set SHUO between on less then 2 labels\n"; } Handle(XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); Handle(XCAFDoc_GraphNode) aMainSHUO; myAssembly->SetSHUO( aLabSeq, aMainSHUO ); if (aMainSHUO.IsNull()) { - di << "Error: cannot set the SHUO" << "\n"; + di << "Error: cannot set the SHUO\n"; return 1; } @@ -533,12 +533,12 @@ static Standard_Integer getSHUOUpperUsage (Draw_Interpretor& di, Standard_Intege { if (argc < 3) { - di << "Use: " << argv[0] << " Doc NU_Label " << "\n"; + di << "Use: " << argv[0] << " Doc NU_Label \n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } TDF_Label NL; TDF_Tool::Label(Doc->GetData(), argv[2], NL); if (NL.IsNull()) { @@ -563,12 +563,12 @@ static Standard_Integer getSHUONextUsage (Draw_Interpretor& di, Standard_Integer { if (argc < 3) { - di << "Use: " << argv[0] << " Doc UU_Label " << "\n"; + di << "Use: " << argv[0] << " Doc UU_Label \n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } TDF_Label UL; TDF_Tool::Label(Doc->GetData(), argv[2], UL); if (UL.IsNull()) { @@ -593,12 +593,12 @@ static Standard_Integer removeSHUO (Draw_Interpretor& di, Standard_Integer argc, { if (argc < 3) { - di << "Use: " << argv[0] << " Doc SHUOComponent_Label " << "\n"; + di << "Use: " << argv[0] << " Doc SHUOComponent_Label \n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } TDF_Label UL; TDF_Tool::Label(Doc->GetData(), argv[2], UL); if (UL.IsNull()) { @@ -615,12 +615,12 @@ static Standard_Integer hasSHUO (Draw_Interpretor& di, Standard_Integer argc, co { if (argc < 3) { - di << "Use: " << argv[0] << " Doc SHUO_Label " << "\n"; + di << "Use: " << argv[0] << " Doc SHUO_Label \n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } TDF_Label UL; TDF_Tool::Label(Doc->GetData(), argv[2], UL); if (UL.IsNull()) { @@ -641,12 +641,12 @@ static Standard_Integer getAllSHUO (Draw_Interpretor& di, Standard_Integer argc, { if (argc < 3) { - di << "Use: " << argv[0] << " Doc SHUO_Label " << "\n"; + di << "Use: " << argv[0] << " Doc SHUO_Label \n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); TDF_Label UL; TDF_Tool::Label(Doc->GetData(), argv[2], UL); @@ -671,12 +671,12 @@ static Standard_Integer findComponent (Draw_Interpretor& di, Standard_Integer ar { if (argc < 3) { - di << "Use: " << argv[0] << " Doc shape " << "\n"; + di << "Use: " << argv[0] << " Doc shape \n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); TopoDS_Shape aShape; aShape = DBRep::Get(argv[2]); @@ -697,12 +697,12 @@ static Standard_Integer getStyledComponent (Draw_Interpretor& di, Standard_Integ { if (argc < 4) { - di << "Use: " << argv[0] << " Doc res SHUO_label " << "\n"; + di << "Use: " << argv[0] << " Doc res SHUO_label \n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); TopoDS_Shape aShape; TDF_Label aLabel; @@ -712,7 +712,7 @@ static Standard_Integer getStyledComponent (Draw_Interpretor& di, Standard_Integ aShape = myAssembly->GetSHUOInstance( SHUO ); if (aShape.IsNull()) { - di << "cannot get component" << "\n"; + di << "cannot get component\n"; return 1; } DBRep::Set ( argv[2], aShape ); @@ -724,12 +724,12 @@ static Standard_Integer getAllStyledComponents (Draw_Interpretor& di, Standard_I { if (argc < 4) { - di << "Use: " << argv[0] << " Doc res SHUO_label " << "\n"; + di << "Use: " << argv[0] << " Doc res SHUO_label \n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); TopTools_SequenceOfShape aShapes; TDF_Label aLabel; @@ -755,12 +755,12 @@ static Standard_Integer findSHUO (Draw_Interpretor& di, Standard_Integer argc, c { if (argc < 4) { - di << "Use: " << argv[0] << " Doc labels " << "\n"; + di << "Use: " << argv[0] << " Doc labels \n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); TDF_LabelSequence aLabSeq; for (Standard_Integer i = 3; i <= argc; i++) { @@ -772,12 +772,12 @@ static Standard_Integer findSHUO (Draw_Interpretor& di, Standard_Integer argc, c di << argv[i - 1] << " is null label" << "\n"; } if (aLabSeq.Length() < 2) { - di << "Error: couldnot find SHUO between on less then 2 labels" << "\n"; + di << "Error: couldnot find SHUO between on less then 2 labels\n"; } Handle(XCAFDoc_GraphNode) SHUO; myAssembly->FindSHUO( aLabSeq, SHUO ); if (SHUO.IsNull()) { - di << "cannot find SHUO" << "\n"; + di << "cannot find SHUO\n"; return 1; } TCollection_AsciiString Entry; @@ -791,17 +791,17 @@ static Standard_Integer setStyledComponent (Draw_Interpretor& di, Standard_Integ { if (argc < 3) { - di << "Use: " << argv[0] << " Doc shape " << "\n"; + di << "Use: " << argv[0] << " Doc shape \n"; return 1; } Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { di << argv[1] << " is not a document" << "\n"; return 1; } + if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); TopoDS_Shape aShape; aShape = DBRep::Get(argv[2]); if (aShape.IsNull()) { - di << "Shape " << argv[2] << " is null" << "\n"; + di << "Shape " << argv[2] << " is null\n"; return 1; } Handle(XCAFDoc_GraphNode) aSHUOAttr; diff --git a/src/XSControl/XSControl_Functions.cxx b/src/XSControl/XSControl_Functions.cxx index 0dc6a1814c..09c3e1497e 100644 --- a/src/XSControl/XSControl_Functions.cxx +++ b/src/XSControl/XSControl_Functions.cxx @@ -443,16 +443,16 @@ static IFSelect_ReturnStatus XSControl_tpstat(const Handle(IFSelect_SessionPilot if (mod1 < -1) sout<<"Unknown Mode"<Show(); if (readstat != IFSelect_RetDone) { - if (modfic) di<<"Could not read file "<ClearContext(); XSDRAW::SetTransferProcess (thesession->MapReader()); @@ -177,7 +177,7 @@ static Standard_Integer igesbrep (Draw_Interpretor& di, Standard_Integer argc, c if ( answer == 1 || answer == 3) { TopoDS_Shape shape = Reader.OneShape(); // save the shape - if (shape.IsNull()) { di<<"No Shape produced"<<"\n"; continue; } + if (shape.IsNull()) { di<<"No Shape produced\n"; continue; } char fname[110]; Sprintf(fname, "%s", rnom.ToCString()); di << "Saving shape in variable Draw : " << fname << "\n"; @@ -189,7 +189,7 @@ static Standard_Integer igesbrep (Draw_Interpretor& di, Standard_Integer argc, c catch(Standard_Failure) { di << "** Exception : "; di << Standard_Failure::Caught()->GetMessageString(); - di<<" ** Skip"<<"\n"; + di<<" ** Skip\n"; di << "Saving shape in variable Draw : " << fname << "\n"; IGESToBRep::WriteShape (shape,1); } @@ -200,7 +200,7 @@ static Standard_Integer igesbrep (Draw_Interpretor& di, Standard_Integer argc, c for (Standard_Integer inum = 1; inum <= numshape; inum++) { // save all the shapes TopoDS_Shape shape = Reader.Shape(inum); - if (shape.IsNull()) { di<<"No Shape produced"<<"\n"; continue; } + if (shape.IsNull()) { di<<"No Shape produced\n"; continue; } char fname[110]; Sprintf(fname, "%s_%d", rnom.ToCString(),inum); di << "Saving shape in variable Draw : " << fname << "\n"; @@ -212,7 +212,7 @@ static Standard_Integer igesbrep (Draw_Interpretor& di, Standard_Integer argc, c catch(Standard_Failure) { di << "** Exception : "; di << Standard_Failure::Caught()->GetMessageString(); - di<<" ** Skip"<<"\n"; + di<<" ** Skip\n"; } } } @@ -226,12 +226,12 @@ static Standard_Integer igesbrep (Draw_Interpretor& di, Standard_Integer argc, c cout << " give the number of the Entity : " << flush; nent = XSDRAW::GetEntityNumber(); - if (!Reader.TransferOne (nent)) di<<"Transfer entity n0 "< DRAW Shape: "<ClearContext(); XSDRAW::SetTransferProcess (thesession->MapReader()); @@ -276,7 +276,7 @@ static Standard_Integer igesbrep (Draw_Interpretor& di, Standard_Integer argc, c catch(Standard_Failure) { di << "** Exception : "; di << Standard_Failure::Caught()->GetMessageString(); - di<<" ** Skip"<<"\n"; + di<<" ** Skip\n"; di << "Saving shape in variable Draw : " << fname << "\n"; IGESToBRep::WriteShape (shape,1); } @@ -295,7 +295,7 @@ static Standard_Integer igesbrep (Draw_Interpretor& di, Standard_Integer argc, c list = XSDRAW::GetList (compart.ToCString()); } if (list.IsNull()) { - di<<"No list defined. Give a selection name or * for all visible transferrable roots"<<"\n"; + di<<"No list defined. Give a selection name or * for all visible transferrable roots\n"; continue; } } @@ -339,12 +339,12 @@ static Standard_Integer igesbrep (Draw_Interpretor& di, Standard_Integer argc, c nent = Reader.Model()->Number(list->Value(ill)); if (nent == 0) continue; - if (!Reader.TransferOne(nent)) di<<"Transfer entity n0 "< DRAW Shape: "<) : brepiges shape [+shape][ +shape] nomfic // c a d tant qu il y a des + on ajoute ce qui suit @@ -442,11 +442,11 @@ static Standard_Integer brepiges (Draw_Interpretor& di, Standard_Integer n, cons progress->NewScope(10,"Writing"); progress->Show(); - di<NbEntities()<<" Entities"<<"\n"; + di<NbEntities()<<" Entities\n"; if ( ! nomfic ) // delayed write { - di<<" Now, to write a file, command : writeall filename"<<"\n"; + di<<" Now, to write a file, command : writeall filename\n"; return 0; } @@ -469,8 +469,8 @@ static Standard_Integer testwrite (Draw_Interpretor& di, Standard_Integer n, con { if (n != 3) { - di << "ERROR in " << a[0] << "Wrong Number of Arguments."<<"\n"; - di << " Usage : " << a[0] <<" file_name shape_name"<< "\n"; + di << "ERROR in " << a[0] << "Wrong Number of Arguments.\n"; + di << " Usage : " << a[0] <<" file_name shape_name\n"; return 1; } IGESControl_Writer Writer; @@ -478,15 +478,15 @@ static Standard_Integer testwrite (Draw_Interpretor& di, Standard_Integer n, con TopoDS_Shape shape = DBRep::Get(a[2]); Standard_Boolean ok = Writer.AddShape(shape); if(!ok){ - di<<"Shape not add"<<"\n"; + di<<"Shape not add\n"; return 1; } if(!(Writer.Write(filename))){ - di<<"Error on writing file"<<"\n"; + di<<"Error on writing file\n"; return 1; } - di<<"File Is Written"<<"\n"; + di<<"File Is Written\n"; return 0; } //-------------------------------------------------------------- @@ -498,12 +498,12 @@ static Standard_Integer testwrite (Draw_Interpretor& di, Standard_Integer n, con static Standard_Integer igesparam (Draw_Interpretor& di, Standard_Integer , const char** ) { // liste des parametres - di<<"List of parameters which control IGES :"<<"\n"; - di<<" unit : write.iges.unit\n mode write : write.iges.brep.mode\n spline_continuity (read) : read.iges.bspline.continuity\nSee definition by defparam, read/edit value by param"<<"\n"; + di<<"List of parameters which control IGES :\n"; + di<<" unit : write.iges.unit\n mode write : write.iges.brep.mode\n spline_continuity (read) : read.iges.bspline.continuity\nSee definition by defparam, read/edit value by param\n"; di<<"unit (write) : "<Session(); Transfer_IteratorOfProcessForTransient itrp = TP->AbnormalResult(); @@ -541,14 +541,14 @@ static Standard_Integer XSDRAWIGES_tplosttrim (Draw_Interpretor& di, Standard_In if(typarg.Value(k).Location(Arg,1,typarg.Value(k).Length()) != 0) break; } } - if( k == 4) {di<< "Invalid argument"<<"\n"; return 0; } + if( k == 4) {di<< "Invalid argument\n"; return 0; } for(Standard_Integer j = 1 ; j <= 3; j++) { TColStd_MapOfTransient aMap; if(narg == 1) k=j; Handle(TColStd_HSequenceOfTransient) list = IFSelect_Functions::GiveList(pilot->Session(),strarg.Value(k).ToCString()); if (!list.IsNull()) itrp.Filter (list); else { - di << "No untrimmed faces" << "\n"; + di << "No untrimmed faces\n"; return 0; } for (itrp.Start(); itrp.More(); itrp.Next()) { @@ -565,14 +565,14 @@ static Standard_Integer XSDRAWIGES_tplosttrim (Draw_Interpretor& di, Standard_In } } if(nbFaces != 0) { - if( j == 1 ) di << "Number of untrimmed faces: " << "\n"; + if( j == 1 ) di << "Number of untrimmed faces: \n"; switch(k){ case 1: - di << "Trimmed Surface: " << "\n"; break; + di << "Trimmed Surface: \n"; break; case 2: - di << "Bounded Surface: " << "\n"; break; + di << "Bounded Surface: \n"; break; case 3: - di << "Face: " << "\n"; break; + di << "Face: \n"; break; } TColStd_MapIteratorOfMapOfTransient itmap; @@ -581,14 +581,14 @@ static Standard_Integer XSDRAWIGES_tplosttrim (Draw_Interpretor& di, Standard_In di << " "; } di << "\n"; - di << "\n" << "Number:"<< nbFaces << "\n"; + di << "\nNumber:"<< nbFaces << "\n"; totFaces += nbFaces; } if(narg > 1) break; nbFaces = 0; } - if(totFaces == 0) di << "No untrimmed faces" << "\n"; + if(totFaces == 0) di << "No untrimmed faces\n"; else di << "Total number :" << totFaces << "\n"; return 0; } @@ -607,10 +607,10 @@ static Standard_Integer XSDRAWIGES_TPSTAT(Draw_Interpretor& di,Standard_Integer IGESControl_Reader read; //(XSControl::Session(pilot),Standard_False); //read.SetTransientProcess(TP); // **** tpent **** -// if (TP.IsNull()) { di<<"No Transfer Read"<<"\n"; return IFSelect_RetError;} +// if (TP.IsNull()) { di<<"No Transfer Read\n"; return IFSelect_RetError;} Handle(Interface_InterfaceModel) model = TP->Model(); //Handle(Interface_InterfaceModel) model = read.Model(); - if (model.IsNull()) {di<<"No Transfer Read"<<"\n"; return -1;} + if (model.IsNull()) {di<<"No Transfer Read\n"; return -1;} //DeclareAndCast(IGESData_IGESModel,modelig,model); // read.SetModel(modelig); Handle(XSControl_WorkSession) thesession = read.WS(); @@ -629,12 +629,12 @@ static Standard_Integer XSDRAWIGES_TPSTAT(Draw_Interpretor& di,Standard_Integer default : mod1 = -2; break; } } - if (mod1 < -1) di<<"Unknown Mode"<<"\n"; + if (mod1 < -1) di<<"Unknown Mode\n"; if (mod1 < 0) { di<<"Modes available :\n" - <<"g : general c : checks (count) C (list)"<<"\n" - <<"r : number of CasCade resulting shapes"<<"\n" - <<"s : mapping between IGES entities and CasCade shapes"<<"\n"; + <<"g : general c : checks (count) C (list)\n" + <<"r : number of CasCade resulting shapes\n" + <<"s : mapping between IGES entities and CasCade shapes\n"; if (mod1 < -1) return -1; return 0; } @@ -644,7 +644,7 @@ static Standard_Integer XSDRAWIGES_TPSTAT(Draw_Interpretor& di,Standard_Integer static Standard_Integer etest(Draw_Interpretor& di, Standard_Integer argc, const char** a) { if(argc < 3) { - di<<"etest igesfile shape"<<"\n"; + di<<"etest igesfile shape\n"; return 0; } IGESControl_Reader aReader; diff --git a/src/XSDRAWSTEP/XSDRAWSTEP.cxx b/src/XSDRAWSTEP/XSDRAWSTEP.cxx index 6adfcfafc9..5fc4be0af7 100644 --- a/src/XSDRAWSTEP/XSDRAWSTEP.cxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP.cxx @@ -146,8 +146,8 @@ static Standard_Integer stepread (Draw_Interpretor& di/*theCommands*/, Standard_ progress->Show(); if (readstat != IFSelect_RetDone) { - if (modfic) di<<"Could not read file "<>modepri; } - if (modepri == 0) { di<<"End Reading STEP"<<"\n"; return 0; } + if (modepri == 0) { di<<"End Reading STEP\n"; return 0; } if (modepri <= 2) { num = 1; if (modepri == 2) { @@ -180,12 +180,12 @@ static Standard_Integer stepread (Draw_Interpretor& di/*theCommands*/, Standard_ progress->Show(); sr.WS()->MapReader()->SetProgress ( progress ); - if (!sr.TransferRoot (num)) di<<"Transfer root n0 "< DRAW Shape: "< DRAW Shape: "< (k+1) ? argv[k+1] : 0 ) ); } - if (list.IsNull()) { di<<"No list defined. Give a selection name or * for all transferrable roots"<<"\n"; continue; } + if (list.IsNull()) { di<<"No list defined. Give a selection name or * for all transferrable roots\n"; continue; } } else { cout<<"Name of Selection :"<Length(); @@ -246,12 +246,12 @@ static Standard_Integer stepread (Draw_Interpretor& di/*theCommands*/, Standard_ for (ill = 1; ill <= nbl && PSentry.More(); ill ++, PSentry.Next()) { num = sr.Model()->Number(list->Value(ill)); if (num == 0) continue; - if (!sr.TransferOne(num)) di<<"Transfer entity n0 "< DRAW Shape: "<NbEntities()); - if (nbavant > 0) di<<"Beware : Model not empty before transferring"<<"\n"; - if (nbapres <= nbavant) di<<"Beware : No data produced by this transfer"<<"\n"; - if (nbapres == 0) { di<<"No data to write"<<"\n"; return 0; } + if (nbavant > 0) di<<"Beware : Model not empty before transferring\n"; + if (nbapres <= nbavant) di<<"Beware : No data produced by this transfer\n"; + if (nbapres == 0) { di<<"No data to write\n"; return 0; } if (argc <= 3) { - di<<" Now, to write a file, command : writeall filename"<<"\n"; + di<<" Now, to write a file, command : writeall filename\n"; return 0; } const char *nomfic = argv[3]; stat = sw.Write(nomfic); switch (stat) { - case IFSelect_RetVoid : di<<"Error: No file written"<<"\n"; break; - case IFSelect_RetDone : di<<"File "<EndScope(); @@ -431,8 +431,8 @@ static Standard_Integer testwrite (Draw_Interpretor& di, Standard_Integer argc, { if (argc != 3) { - di << "ERROR in " << argv[0] << "Wrong Number of Arguments."<<"\n"; - di << " Usage : " << argv[0] <<" file_name shape_name "<< "\n"; + di << "ERROR in " << argv[0] << "Wrong Number of Arguments.\n"; + di << " Usage : " << argv[0] <<" file_name shape_name \n"; return 1; } STEPControl_Writer Writer; @@ -441,10 +441,10 @@ static Standard_Integer testwrite (Draw_Interpretor& di, Standard_Integer argc, IFSelect_ReturnStatus stat = Writer.Transfer(shape,STEPControl_AsIs); stat = Writer.Write(filename); if(stat != IFSelect_RetDone){ - di<<"Error on writing file"<<"\n"; + di<<"Error on writing file\n"; return 1; } - di<<"File Is Written"<<"\n"; + di<<"File Is Written\n"; return 0; } @@ -509,7 +509,7 @@ static Standard_Integer stepfileunits (Draw_Interpretor& di, Standard_Integer ar if (readstat != IFSelect_RetDone) { - di<<"No model loaded"<<"\n"; + di<<"No model loaded\n"; return 1; } @@ -520,17 +520,17 @@ static Standard_Integer stepfileunits (Draw_Interpretor& di, Standard_Integer ar Standard_Integer i =1; di<<"=====================================================\n"; - di<<"LENTH Unit"<<"\n"; + di<<"LENTH Unit\n"; for( ; i <= anUnitLengthNames.Length() ; i++) di< 4) { di << "Use: " << argv[0] - << " shape file [ascii/binary (0/1) : 1 by default]" << "\n"; + << " shape file [ascii/binary (0/1) : 1 by default]\n"; } else { TopoDS_Shape aShape = DBRep::Get(argv[1]); Standard_Boolean isASCIIMode = Standard_False; @@ -124,7 +124,7 @@ static Standard_Integer writevrml { if (argc < 3 || argc > 5) { - di << "wrong number of parameters" << "\n"; + di << "wrong number of parameters\n"; return 0; } @@ -235,7 +235,7 @@ static Standard_Integer loadvrml } } else { - di << "cannot open file" << "\n"; + di << "cannot open file\n"; } @@ -250,15 +250,15 @@ static Standard_Integer createmesh { if (argc<3) { - di << "Wrong number of parameters" << "\n"; - di << "Use: " << argv[0] << " " << "\n"; + di << "Wrong number of parameters\n"; + di << "Use: " << argv[0] << " \n"; return 0; } Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if (aContext.IsNull()) { - di << "No active view. Please call 'vinit' first" << "\n"; + di << "No active view. Please call 'vinit' first\n"; return 0; } @@ -267,11 +267,11 @@ static Standard_Integer createmesh Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (di, 1); Handle(StlMesh_Mesh) aSTLMesh = RWStl::ReadFile (aFile, aProgress); - di << "Reading OK..." << "\n"; + di << "Reading OK...\n"; Handle( XSDRAWSTLVRML_DataSource ) aDS = new XSDRAWSTLVRML_DataSource( aSTLMesh ); - di << "Data source is created successful" << "\n"; + di << "Data source is created successful\n"; Handle( MeshVS_Mesh ) aMesh = new MeshVS_Mesh(); - di << "MeshVS_Mesh is created successful" << "\n"; + di << "MeshVS_Mesh is created successful\n"; aMesh->SetDataSource( aDS ); aMesh->AddBuilder( new MeshVS_MeshPrsBuilder( aMesh.operator->() ), Standard_True ); @@ -303,22 +303,22 @@ static Standard_Integer create3d { if (argc<2) { - di << "Wrong number of parameters" << "\n"; - di << "Use: " << argv[0] << " " << "\n"; + di << "Wrong number of parameters\n"; + di << "Use: " << argv[0] << " \n"; return 0; } Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if (aContext.IsNull()) { - di << "No active view. Please call 'vinit' first" << "\n"; + di << "No active view. Please call 'vinit' first\n"; return 0; } Handle( XSDRAWSTLVRML_DataSource3D ) aDS = new XSDRAWSTLVRML_DataSource3D(); - di << "Data source is created successful" << "\n"; + di << "Data source is created successful\n"; Handle( MeshVS_Mesh ) aMesh = new MeshVS_Mesh(); - di << "MeshVS_Mesh is created successful" << "\n"; + di << "MeshVS_Mesh is created successful\n"; aMesh->SetDataSource( aDS ); aMesh->AddBuilder( new MeshVS_MeshPrsBuilder( aMesh.operator->() ), Standard_True ); @@ -351,7 +351,7 @@ Handle( MeshVS_Mesh ) getMesh( const char* theName, Draw_Interpretor& di) if( aDrawMesh.IsNull() ) { - di << "There is no such object" << "\n"; + di << "There is no such object\n"; return NULL; } else @@ -359,7 +359,7 @@ Handle( MeshVS_Mesh ) getMesh( const char* theName, Draw_Interpretor& di) Handle( MeshVS_Mesh ) aMesh = aDrawMesh->GetMesh(); if( aMesh.IsNull() ) { - di << "There is invalid mesh" << "\n"; + di << "There is invalid mesh\n"; return NULL; } else @@ -372,7 +372,7 @@ static Standard_Integer setcolor (Draw_Interpretor& di, Standard_Integer argc, const char** argv, Standard_Integer theParam ) { if (argc<5) - di << "Wrong number of parameters" << "\n"; + di << "Wrong number of parameters\n"; else { Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); @@ -387,7 +387,7 @@ static Standard_Integer setcolor Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); if( aContext.IsNull() ) - di << "The context is null" << "\n"; + di << "The context is null\n"; else aContext->Redisplay( aMesh ); } @@ -411,7 +411,7 @@ static Standard_Integer meshmat (Draw_Interpretor& di, Standard_Integer argc, const char** argv ) { if (argc<3) - di << "Wrong number of parameters" << "\n"; + di << "Wrong number of parameters\n"; else { Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); @@ -433,7 +433,7 @@ static Standard_Integer meshmat Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); if( aContext.IsNull() ) - di << "The context is null" << "\n"; + di << "The context is null\n"; else aContext->Redisplay( aMesh ); } @@ -445,7 +445,7 @@ static Standard_Integer shrink (Draw_Interpretor& di, Standard_Integer argc, const char** argv ) { if (argc<3) - di << "Wrong number of parameters" << "\n"; + di << "Wrong number of parameters\n"; else { Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); @@ -457,7 +457,7 @@ static Standard_Integer shrink Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); if( aContext.IsNull() ) - di << "The context is null" << "\n"; + di << "The context is null\n"; else aContext->Redisplay( aMesh ); } @@ -470,7 +470,7 @@ static Standard_Integer closed (Draw_Interpretor& theDI, Standard_Integer theArg { if (theArgc < 3) { - theDI << "Wrong number of parameters." << "\n"; + theDI << "Wrong number of parameters.\n"; } else { @@ -483,7 +483,7 @@ static Standard_Integer closed (Draw_Interpretor& theDI, Standard_Integer theArg Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); if (aContext.IsNull()) { - theDI << "The context is null" << "\n"; + theDI << "The context is null\n"; } else { @@ -500,7 +500,7 @@ static Standard_Integer mdisplay (Draw_Interpretor& di, Standard_Integer argc, const char** argv ) { if (argc<2) - di << "Wrong number of parameters" << "\n"; + di << "Wrong number of parameters\n"; else { Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); @@ -509,7 +509,7 @@ static Standard_Integer mdisplay Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); if( aContext.IsNull() ) - di << "The context is null" << "\n"; + di << "The context is null\n"; else { if( aContext->HasOpenedContext() ) @@ -526,7 +526,7 @@ static Standard_Integer merase (Draw_Interpretor& di, Standard_Integer argc, const char** argv ) { if (argc<2) - di << "Wrong number of parameters" << "\n"; + di << "Wrong number of parameters\n"; else { Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); @@ -535,7 +535,7 @@ static Standard_Integer merase Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); if( aContext.IsNull() ) - di << "The context is null" << "\n"; + di << "The context is null\n"; else { if( aContext->HasOpenedContext() ) @@ -545,7 +545,7 @@ static Standard_Integer merase } } else - di << "Mesh is null" << "\n"; + di << "Mesh is null\n"; } return 0; } @@ -555,8 +555,8 @@ static Standard_Integer hidesel { if (argc<2) { - di << "Wrong number of parameters" << "\n"; - di << "Use: " << argv[0] << " " << "\n"; + di << "Wrong number of parameters\n"; + di << "Use: " << argv[0] << " \n"; return 0; } @@ -564,12 +564,12 @@ static Standard_Integer hidesel Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); if( aMesh.IsNull() ) { - di << "The mesh is invalid" << "\n"; + di << "The mesh is invalid\n"; return 0; } if( aContext.IsNull() ) - di << "The context is null" << "\n"; + di << "The context is null\n"; else { Handle(TColStd_HPackedMapOfInteger) aHiddenNodes = aMesh->GetHiddenNodes(); @@ -612,8 +612,8 @@ static Standard_Integer showonly { if (argc<2) { - di << "Wrong number of parameters" << "\n"; - di << "Use: " << argv[0] << " " << "\n"; + di << "Wrong number of parameters\n"; + di << "Use: " << argv[0] << " \n"; return 0; } @@ -622,12 +622,12 @@ static Standard_Integer showonly Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); if( aMesh.IsNull() ) { - di << "The mesh is invalid" << "\n"; + di << "The mesh is invalid\n"; return 0; } if( aContext.IsNull() ) - di << "The context is null" << "\n"; + di << "The context is null\n"; else { Handle(TColStd_HPackedMapOfInteger) aHiddenNodes = @@ -663,8 +663,8 @@ static Standard_Integer showall { if (argc<2) { - di << "Wrong number of parameters" << "\n"; - di << "Use: " << argv[0] << " " << "\n"; + di << "Wrong number of parameters\n"; + di << "Use: " << argv[0] << " \n"; return 0; } @@ -672,12 +672,12 @@ static Standard_Integer showall Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); if( aMesh.IsNull() ) { - di << "The mesh is invalid" << "\n"; + di << "The mesh is invalid\n"; return 0; } if( aContext.IsNull() ) - di << "The context is null" << "\n"; + di << "The context is null\n"; else { aMesh->SetHiddenNodes( new TColStd_HPackedMapOfInteger() ); @@ -698,15 +698,15 @@ static Standard_Integer meshcolors( Draw_Interpretor& di, OCC_CATCH_SIGNALS if ( argc < 4 ) { - di << "Wrong number of parameters" << "\n"; - di << "Use : meshcolors " << "\n"; - di << "mode : {elem1|elem2|nodal|nodaltex|none}"<< "\n"; - di << " elem1 - different color for each element" << "\n"; - di << " elem2 - one color for one side"<<"\n"; - di << " nodal - different color for each node"<< "\n"; - di << " nodaltex - different color for each node with texture interpolation"<< "\n"; - di << " none - clear"<< "\n"; - di << "isreflect : {0|1} "<< "\n"; + di << "Wrong number of parameters\n"; + di << "Use : meshcolors \n"; + di << "mode : {elem1|elem2|nodal|nodaltex|none}\n"; + di << " elem1 - different color for each element\n"; + di << " elem2 - one color for one side\n"; + di << " nodal - different color for each node\n"; + di << " nodaltex - different color for each node with texture interpolation\n"; + di << " none - clear\n"; + di << "isreflect : {0|1} \n"; return 0; } @@ -715,13 +715,13 @@ static Standard_Integer meshcolors( Draw_Interpretor& di, if ( aMesh.IsNull() ) { - di << "Mesh not found" << "\n"; + di << "Mesh not found\n"; return 0; } Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); if ( anIC.IsNull() ) { - di << "The context is null" << "\n"; + di << "The context is null\n"; return 0; } if( !aMesh.IsNull() ) @@ -852,14 +852,14 @@ static Standard_Integer meshcolors( Draw_Interpretor& di, } else { - di << "Wrong mode name" << "\n"; + di << "Wrong mode name\n"; return 0; } } } catch ( Standard_Failure ) { - di << "Error" << "\n"; + di << "Error\n"; } return 0; @@ -871,12 +871,12 @@ static Standard_Integer meshvectors( Draw_Interpretor& di, { if ( argc < 3 ) { - di << "Wrong number of parameters" << "\n"; - di << "Use : meshvectors < -mode {elem|nodal|none} > [-maxlen len] [-color name] [-arrowpart ratio] [-issimple {1|0}]" << "\n"; - di << "Supported mode values:"<< "\n"; - di << " elem - vector per element" << "\n"; - di << " nodal - vector per node"<< "\n"; - di << " none - clear"<< "\n"; + di << "Wrong number of parameters\n"; + di << "Use : meshvectors < -mode {elem|nodal|none} > [-maxlen len] [-color name] [-arrowpart ratio] [-issimple {1|0}]\n"; + di << "Supported mode values:\n"; + di << " elem - vector per element\n"; + di << " nodal - vector per node\n"; + di << " none - clear\n"; return 0; } @@ -885,13 +885,13 @@ static Standard_Integer meshvectors( Draw_Interpretor& di, if ( aMesh.IsNull() ) { - di << "Mesh not found" << "\n"; + di << "Mesh not found\n"; return 0; } Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); if ( anIC.IsNull() ) { - di << "The context is null" << "\n"; + di << "The context is null\n"; return 0; } @@ -936,7 +936,7 @@ static Standard_Integer meshvectors( Draw_Interpretor& di, if( !aMode.IsEqual("elem") && !aMode.IsEqual("nodal") && !aMode.IsEqual("none") ) { - di << "Wrong mode name" << "\n"; + di << "Wrong mode name\n"; return 0; } @@ -995,8 +995,8 @@ static Standard_Integer meshtext( Draw_Interpretor& di, { if ( argc < 2 ) { - di << "Wrong number of parameters" << "\n"; - di << "Use : meshtext " << "\n"; + di << "Wrong number of parameters\n"; + di << "Use : meshtext \n"; return 0; } @@ -1004,14 +1004,14 @@ static Standard_Integer meshtext( Draw_Interpretor& di, if ( aMesh.IsNull() ) { - di << "Mesh not found" << "\n"; + di << "Mesh not found\n"; return 0; } Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); if ( anIC.IsNull() ) { - di << "The context is null" << "\n"; + di << "The context is null\n"; return 0; } @@ -1035,8 +1035,8 @@ static Standard_Integer meshdeform( Draw_Interpretor& di, { if ( argc < 3 ) { - di << "Wrong number of parameters" << "\n"; - di << "Use : meshdeform < -mode {on|off} > [-scale scalefactor]" << "\n"; + di << "Wrong number of parameters\n"; + di << "Use : meshdeform < -mode {on|off} > [-scale scalefactor]\n"; return 0; } @@ -1044,13 +1044,13 @@ static Standard_Integer meshdeform( Draw_Interpretor& di, if ( aMesh.IsNull() ) { - di << "Mesh not found" << "\n"; + di << "Mesh not found\n"; return 0; } Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); if ( anIC.IsNull() ) { - di << "The context is null" << "\n"; + di << "The context is null\n"; return 0; } @@ -1080,7 +1080,7 @@ static Standard_Integer meshdeform( Draw_Interpretor& di, if(!aMode.IsEqual("on") && !aMode.IsEqual("off")) { - di << "Wrong mode name" << "\n"; + di << "Wrong mode name\n"; return 0; } @@ -1124,22 +1124,22 @@ static Standard_Integer mesh_edge_width( Draw_Interpretor& di, OCC_CATCH_SIGNALS if ( argc < 3 ) { - di << "Wrong number of parameters" << "\n"; - di << "Use : mesh_edge_width " << "\n"; + di << "Wrong number of parameters\n"; + di << "Use : mesh_edge_width \n"; return 0; } Handle(MeshVS_Mesh) aMesh = getMesh( argv[ 1 ], di ); if ( aMesh.IsNull() ) { - di << "Mesh not found" << "\n"; + di << "Mesh not found\n"; return 0; } const char* aWidthStr = argv[ 2 ]; if ( aWidthStr == 0 || Draw::Atof( aWidthStr ) <= 0 ) { - di << "Width must be real value more than zero" << "\n"; + di << "Width must be real value more than zero\n"; return 0; } @@ -1148,14 +1148,14 @@ static Standard_Integer mesh_edge_width( Draw_Interpretor& di, Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); if ( anIC.IsNull() ) { - di << "The context is null" << "\n"; + di << "The context is null\n"; return 0; } Handle(MeshVS_Drawer) aDrawer = aMesh->GetDrawer(); if ( aDrawer.IsNull() ) { - di << "The drawer is null" << "\n"; + di << "The drawer is null\n"; return 0; } @@ -1164,7 +1164,7 @@ static Standard_Integer mesh_edge_width( Draw_Interpretor& di, } catch ( Standard_Failure ) { - di << "Error" << "\n"; + di << "Error\n"; } return 0; @@ -1178,14 +1178,14 @@ static Standard_Integer meshinfo(Draw_Interpretor& di, { if ( argc != 2 ) { - di << "Wrong number of parameters. Use : meshinfo mesh" << "\n"; + di << "Wrong number of parameters. Use : meshinfo mesh\n"; return 0; } Handle(MeshVS_Mesh) aMesh = getMesh(argv[ 1 ], di); if ( aMesh.IsNull() ) { - di << "Mesh not found" << "\n"; + di << "Mesh not found\n"; return 0; } @@ -1246,7 +1246,7 @@ void XSDRAWSTLVRML::Factory(Draw_Interpretor& theDI) XSDRAWSTLVRML::InitCommands(theDI); XSDRAW::LoadDraw(theDI); #ifdef OCCT_DEBUG - theDI << "Draw Plugin : All TKXSDRAW commands are loaded" << "\n"; + theDI << "Draw Plugin : All TKXSDRAW commands are loaded\n"; #endif } diff --git a/tests/bugs/fclasses/bug26922 b/tests/bugs/fclasses/bug26922 new file mode 100755 index 0000000000..bd432cebdf --- /dev/null +++ b/tests/bugs/fclasses/bug26922 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC26922" +puts "============" +puts "" +############################### +## Huge performance issue writing data to the output stream +############################### + +pload XDE + +if { [regexp {Debug mode} [dversion]] } { + if { [regexp {Windows} [dversion]] } { + set max_time 0.5 + } else { + set max_time 0.5 + } +} else { + if { [regexp {Windows} [dversion]] } { + set max_time 0.5 + } else { + set max_time 0.5 + } +} + +psphere result 50. +incmesh result 0.01 +set tri_info [trinfo result] +regexp { +([-0-9.+eE]+) +triangles} $tri_info full numTriangles +regexp { +([-0-9.+eE]+) +nodes} $tri_info full numNodes + +set time_info [time {writevrml result ${imagedir}/bug26922.wrl 2 2}] +regexp {([-0-9.+eE]+)} ${time_info} full time_performance +set time_performance [expr {${time_performance} / 1e6}] +puts "Performance data writing into the file is ${time_performance} seconds" + +if { ${time_performance} > ${max_time} } { + puts "Elapsed time of data writing into the file is more than ${max_time} seconds - Faulty" +} else { + puts "Elapsed time of data writing into the file is less than ${max_time} seconds - OK" +} -- 2.20.1