//
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)
{
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 << " -<Boolean Operation>" << "\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 << " -<Boolean Operation>\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 << " /<Test Options>" << "\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 << " /<Test Options>\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 << " #<Additional Test Options>" << "\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 << " #<Additional Test Options>\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: <Boolean Operation> and <Test Options> 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;
}
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;
}
}
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;
}
}
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++;
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++;
}
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();
// 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";
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;
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;
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;
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;
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;
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";
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";
}
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";
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";
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;
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;
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;
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;
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";
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
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);
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);
TopoDS_Shape TheShape1 = DBRep::Get(id1);
//cout << "Pick positions with button "<<endl;
- 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;
static Standard_Integer vecdc(Draw_Interpretor& di,Standard_Integer ,const char** ) {
//cout << "Pick positions with button "<<endl;
- di << "Pick positions with button "<< "\n";
+ di << "Pick positions with button \n";
Standard_Integer id,X,Y,b;
gp_Trsf T;
Standard_Boolean IsWire=OrtProj.BuildWire(Wire);
if (IsWire) {
//cout << " BuildWire OK " << endl;
- di << " BuildWire OK " << "\n";
+ di << " BuildWire OK \n";
}
DBRep::Set(a[1], OrtProj.Shape());
return 0;
//cout <<" Construction by equal distances from edge : chamf newname shape edge face S dist"<< endl;
//cout <<" Construction by two distances from edge : chamf newname shape edge face dist1 dist2"<< endl;
//cout <<" Construction by distance from edge and given angle : chamf newname shape edge face A dist angle"<< endl;
- di <<" help for chamf : "<< "\n";
- di <<" Construction by equal distances from edge : chamf newname shape edge face S dist"<< "\n";
- di <<" Construction by two distances from edge : chamf newname shape edge face dist1 dist2"<< "\n";
- di <<" Construction by distance from edge and given angle : chamf newname shape edge face A dist angle"<< "\n";
+ di <<" help for chamf : \n";
+ di <<" Construction by equal distances from edge : chamf newname shape edge face S dist\n";
+ di <<" Construction by two distances from edge : chamf newname shape edge face dist1 dist2\n";
+ di <<" Construction by distance from edge and given angle : chamf newname shape edge face A dist angle\n";
}
else {
if (narg < 7) return 1;
if (aMCh.NbContours() == 0 )
{
//cout<<"No suitable edges to chamfer"<<endl;
- di<<"No suitable edges to chamfer"<<"\n";
+ di<<"No suitable edges to chamfer\n";
return 1;
}
else aMCh.Build();
}
else {
//cout<<"compute of chamfer failed"<<endl;
- di<<"compute of chamfer failed"<<"\n";
+ di<<"compute of chamfer failed\n";
return 1;
}
}
{
if (narg < 2) {
//cout << "Usage: computetolerance shape" << endl;
- di << "Usage: computetolerance shape" << "\n";
+ di << "Usage: computetolerance shape\n";
return 1;
}
TopoDS_Shape S = DBRep::Get(a[1]);
if (BRepAlgo::IsValid(lesArgs, resu, closedSolid, geomCtrl)) {
//cout << "Difference is Valid." << endl;
- di << "Difference is Valid." << "\n";
+ di << "Difference is Valid.\n";
} else {
//cout << "error : Difference is Not Valid !" << endl;
- di << "error : Difference is Not Valid !" << "\n";
+ di << "error : Difference is Not Valid !\n";
}
return 0;
//cout << " -- The Shape " << ShName << " has problems :"<<endl;
//cout<<" Check Count"<<endl;
//cout<<" ------------------------------------------------"<<endl;
- theCommands << " -- The Shape " << ShName << " has problems :"<<"\n";
- theCommands<<" Check Count"<<"\n";
- theCommands<<" ------------------------------------------------"<<"\n";
+ theCommands << " -- The Shape " << ShName << " has problems :\n";
+ theCommands<<" Check Count\n";
+ theCommands<<" ------------------------------------------------\n";
Handle(TColStd_HArray1OfInteger) NbProblems = new
TColStd_HArray1OfInteger(1,NumberOfStatus);
- theCommands<<" ------------------------------------------------"<<"\n";
+ theCommands<<" ------------------------------------------------\n";
theCommands<<"*** Shapes with problems : "<<sl->Length()<<"\n";
slv = new TopTools_HSequenceOfShape();
char aName[20];
Sprintf(aName,"%s_v",Pref);
DBRep::Set(aName,comp);
- //cout<<"VERTEX"<<" : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
+ //cout<<"VERTEX : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
if (nb > 9)
- theCommands<<"VERTEX"<<" : "<<""<<nb<<" Items -> compound named "<<aName<<"\n";
+ theCommands<<"VERTEX : "<<nb<<" Items -> compound named "<<aName<<"\n";
else
- theCommands<<"VERTEX"<<" : "<<" "<<nb<<" Items -> compound named "<<aName<<"\n";
+ theCommands<<"VERTEX : "<<nb<<" Items -> compound named "<<aName<<"\n";
}
if(sle->Length()>0) {
TopoDS_Compound comp;
char aName[20];
Sprintf(aName,"%s_e",Pref);
DBRep::Set(aName,comp);
- //cout<<"EDGE"<<" : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
+ //cout<<"EDGE : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
if (nb > 9)
- theCommands<<"EDGE"<<" : "<<""<<nb<<" Items -> compound named "<<aName<<"\n";
+ theCommands<<"EDGE : "<<nb<<" Items -> compound named "<<aName<<"\n";
else
- theCommands<<"EDGE"<<" : "<<" "<<nb<<" Items -> compound named "<<aName<<"\n";
+ theCommands<<"EDGE : "<<nb<<" Items -> compound named "<<aName<<"\n";
}
if(slw->Length()>0) {
TopoDS_Compound comp;
char aName[20];
Sprintf(aName,"%s_w",Pref);
DBRep::Set(aName,comp);
- //cout<<"WIRE"<<" : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
+ //cout<<"WIRE : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
if (nb > 9)
- theCommands<<"WIRE"<<" : "<<""<<nb<<" Items -> compound named "<<aName<<"\n";
+ theCommands<<"WIRE : "<<nb<<" Items -> compound named "<<aName<<"\n";
else
- theCommands<<"WIRE"<<" : "<<" "<<nb<<" Items -> compound named "<<aName<<"\n";
+ theCommands<<"WIRE : "<<nb<<" Items -> compound named "<<aName<<"\n";
}
if(slf->Length()>0) {
TopoDS_Compound comp;
char aName[20];
Sprintf(aName,"%s_f",Pref);
DBRep::Set(aName,comp);
- //cout<<"FACE"<<" : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
+ //cout<<"FACE : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
if (nb > 9)
- theCommands<<"FACE"<<" : "<<""<<nb<<" Items -> compound named "<<aName<<"\n";
+ theCommands<<"FACE : "<<nb<<" Items -> compound named "<<aName<<"\n";
else
- theCommands<<"FACE"<<" : "<<" "<<nb<<" Items -> compound named "<<aName<<"\n";
+ theCommands<<"FACE : "<<nb<<" Items -> compound named "<<aName<<"\n";
}
if(sls->Length()>0) {
TopoDS_Compound comp;
char aName[20];
Sprintf(aName,"%s_s",Pref);
DBRep::Set(aName,comp);
- //cout<<"SHELL"<<" : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
+ //cout<<"SHELL : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
if (nb > 9)
- theCommands<<"SHELL"<<" : "<<""<<nb<<" Items -> compound named "<<aName<<"\n";
+ theCommands<<"SHELL : "<<nb<<" Items -> compound named "<<aName<<"\n";
else
- theCommands<<"SHELL"<<" : "<<" "<<nb<<" Items -> compound named "<<aName<<"\n";
+ theCommands<<"SHELL : "<<nb<<" Items -> compound named "<<aName<<"\n";
}
if(slo->Length()>0) {
TopoDS_Compound comp;
char aName[20];
Sprintf(aName,"%s_o",Pref);
DBRep::Set(aName,comp);
- //cout<<"SOLID"<<" : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
+ //cout<<"SOLID : "<<(nb > 9 ? "" : " ")<<nb<<" Items -> compound named "<<aName<<endl;
if (nb > 9)
- theCommands<<"SOLID"<<" : "<<""<<nb<<" Items -> compound named "<<aName<<"\n";
+ theCommands<<"SOLID : "<<nb<<" Items -> compound named "<<aName<<"\n";
else
- theCommands<<"SOLID"<<" : "<<" "<<nb<<" Items -> compound named "<<aName<<"\n";
+ theCommands<<"SOLID : "<<nb<<" Items -> compound named "<<aName<<"\n";
}
}
//cout << " output style will be used. Otherwise - contextual one." << endl;
//cout << " -short - short description of check." << endl;
theCommands << "\n";
- theCommands << "Usage : checkshape [-top] shape [result] [-short]" << "\n";
+ theCommands << "Usage : checkshape [-top] shape [result] [-short]\n";
theCommands << "\n";
- theCommands << "Where :" << "\n";
- theCommands << " -top - check topology only." << "\n";
- theCommands << " shape - the name of the shape to test." << "\n";
- theCommands << " result - the prefix of the output shape names. If it is used, structural" << "\n";
- theCommands << " output style will be used. Otherwise - contextual one." << "\n";
- theCommands << " -short - short description of check." << "\n";
+ theCommands << "Where :\n";
+ theCommands << " -top - check topology only.\n";
+ theCommands << " shape - the name of the shape to test.\n";
+ theCommands << " result - the prefix of the output shape names. If it is used, structural\n";
+ theCommands << " output style will be used. Otherwise - contextual one.\n";
+ theCommands << " -short - short description of check.\n";
return 0;
}
if (narg > 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;
}
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;
}
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;
}
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) {
//else { cout<<" the continuity is not G1 "<<endl;}
//cout<<"MaxG0Value :"<< MaxG0Value << endl;
//cout<<"MaxG1Angle:"<< MaxG1Angle << endl;
- if (!isdone) { di<<" Problem in computation "<<"\n"; return 1;}
+ if (!isdone) { di<<" Problem in computation \n"; return 1;}
if (ISG1)
- {di<<" the continuity is G1 "<<"\n";}
- else { di<<" the continuity is not G1 "<<"\n";}
+ {di<<" the continuity is G1 \n";}
+ else { di<<" the continuity is not G1 \n";}
di<<"MaxG0Value :"<< MaxG0Value << "\n";
di<<"MaxG1Angle:"<< MaxG1Angle << "\n";
return 0;
//else { cout<<" the continuity is not G0 "<<endl;}
//cout<<"MaxG0Value :"<< MaxG0Value << endl;
- if (!isdone) { di<<" Problem in computation "<<"\n"; return 1;}
+ if (!isdone) { di<<" Problem in computation \n"; return 1;}
if (ISG0)
- {di<<" the continuity is G0 "<<"\n";}
+ {di<<" the continuity is G0 \n";}
- else { di<<" the continuity is not G0 "<<"\n";}
+ else { di<<" the continuity is not G0 \n";}
di<<"MaxG0Value :"<< MaxG0Value << "\n";
return 0;
}
//cout<<"MaxG0Value :"<< MaxG0Value << endl;
//cout<<"MaxG1Angle:"<< MaxG1Angle << endl;
//cout<<"MaxG2Curvature:"<<MaxG2Curvature<<endl;
- if (!isdone) { di<<" Problem in computation "<<"\n"; return 1;}
+ if (!isdone) { di<<" Problem in computation \n"; return 1;}
if (ISG2)
- di<<" the continuity is G2 "<<"\n";
- else di<<" the continuity is not G2 "<<"\n";
+ di<<" the continuity is G2 \n";
+ else di<<" the continuity is not G2 \n";
di<<"MaxG0Value :"<< MaxG0Value << "\n";
di<<"MaxG1Angle:"<< MaxG1Angle << "\n";
di<<"MaxG2Curvature:"<<MaxG2Curvature<<"\n";
if (narg < 2) {
//cout << "Usage: clintedge shape" << endl;
- di << "Usage: clintedge shape" << "\n";
+ di << "Usage: clintedge shape\n";
return 1;
}
TopoDS_Shape S = DBRep::Get(a[1]);
if (nbedges > 0)
{
//cout<<nbedges<<" internal (or external) edges to be removed"<<endl;
- di<<nbedges<<" internal (or external) edges to be removed"<<"\n";
+ di<<nbedges<<" internal (or external) edges to be removed\n";
Standard_Integer i = 1;
char* temp = newname;
di<<"\n";
}
else
- di << "no internal (or external) edges"<<"\n";
+ di << "no internal (or external) edges\n";
//cout << "no internal (or external) edges"<<endl;
return 0;
if (narg < 2) {
//cout << "Usage: facintedge shape" << endl;
- di << "Usage: facintedge shape" << "\n";
+ di << "Usage: facintedge shape\n";
return 1;
}
TopoDS_Shape S = DBRep::Get(a[1]);
if (narg < 2) {
//cout << "Usage: fuseedge shape" << endl;
- di << "Usage: fuseedge shape" << "\n";
+ di << "Usage: fuseedge shape\n";
return 1;
}
TopoDS_Shape S = DBRep::Get(a[1]);
if (nbvertices > 0) {
//cout<<nbvertices<<" vertices to be removed"<<endl;
- di<<nbvertices<<" vertices to be removed"<<"\n";
+ di<<nbvertices<<" vertices to be removed\n";
Standard_Integer i = 1;
char* temp = newname;
di<<"\n";
}
else
- di << "no vertices to remove"<<"\n";
+ di << "no vertices to remove\n";
//cout << "no vertices to remove"<<endl;
return 0;
if (narg < 2) {
//cout << "Usage: listfuseedge shape" << endl;
- di << "Usage: listfuseedge shape" << "\n";
+ di << "Usage: listfuseedge shape\n";
return 1;
}
TopoDS_Shape S = DBRep::Get(a[1]);
}
else {
//cout <<"Error creating edge"<<endl;
- di <<"Error creating edge"<<"\n";
+ di <<"Error creating edge\n";
}
return 0;
}
}
if (!MW.IsDone()) {
//cout << "Wire not done" << endl;
- di << "Wire not done" << "\n";
+ di << "Wire not done\n";
return 0;
}
DBRep::Set(a[1],MW);
Handle(Geom2d_Curve) C2d = DrawTrSurf::GetCurve2d(a[2]);
if (C.IsNull() && C2d.IsNull()) {
//cout << a[2] << " is not a curve" << endl;
- di << a[2] << " is not a curve" << "\n";
+ di << a[2] << " is not a curve\n";
return 1;
}
Handle(Geom_Curve) C = BRep_Tool::Curve(TopoDS::Edge(S),L,f,l);
if (C.IsNull()) {
//cout << a[2] << " has no 3d curve" << endl;
- di << a[2] << " has no 3d curve" << "\n";
+ di << a[2] << " has no 3d curve\n";
return 1;
}
C = new Geom_TrimmedCurve(C,f,l);
if ( !Paral.IsDone())
{
- di << " Error: Offset is not done." << "\n";
+ di << " Error: Offset is not done.\n";
return 1;
}
else
if ( !Paral.IsDone())
{
- di << " Error: Offset is not done." << "\n";
+ di << " Error: Offset is not done.\n";
return 1;
}
else
if (EInter.IsEmpty()) {
//cout << " No intersection found" << endl;
- di << " No intersection found" << "\n";
+ di << " No intersection found\n";
return 0;
}
di << " Orientation of vertex " << NbV << " on " << a[i+1] << ": ";
if (OO == TopAbs_FORWARD) {
//cout << "FORWARD" << endl;
- di << "FORWARD" << "\n";
+ di << "FORWARD\n";
} else {
//cout << "REVERSED" << endl;
- di << "REVERSED" << "\n";
+ di << "REVERSED\n";
}
}
}
if ( (n <2) || (n>3) ) {
//cout << " 1 or 2 arguments expected" << endl;
- di << " 1 or 2 arguments expected" << "\n";
+ di << " 1 or 2 arguments expected\n";
return 1;
}
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;
}
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);
}
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;
}
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;
}
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
}
- else di << "probleme"<< "\n";
+ else di << "probleme\n";
//else cout << "probleme"<< endl;
return 0;
}
else {
// il faudrait inverser V et appeler PerfomFromEnd...
//cout << "Not Implemented" << endl;
- theCommands << "Not Implemented" << "\n";
+ theCommands << "Not Implemented\n";
}
}
if (!thePFace.IsDone()) {
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()) {
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) {
} else {
di << "Partial";
}
- di << "\n" << " --> TheJoin : ";
+ di << "\n --> TheJoin : ";
switch (TheJoin) {
case GeomAbs_Arc: di << "Arc"; break;
break ;
}
//
- di << "\n" << " --> Internal Edges : ";
+ di << "\n --> Internal Edges : ";
if (RemoveIntEdges) {
di << "Remove";
}
di << "Keep";
}
//
- di << "\n" << " --> Invalid Faces : ";
+ di << "\n --> Invalid Faces : ";
if (RemoveInvalidFaces) {
di << "Remove";
}
switch (blend_cont) {
case GeomAbs_C0:
//cout << ""<<endl;
- di << "C0"<<"\n";
+ di << "C0\n";
break;
case GeomAbs_C1:
//cout << "C1"<<endl;
- di << "C1"<<"\n";
+ di << "C1\n";
break;
case GeomAbs_C2:
//cout << "C2"<<endl;
- di << "C2"<<"\n";
+ di << "C2\n";
break;
default:
break;
{
if(Rakk == 0) {
//cout<<"No active Builder"<<endl;
- di<<"No active Builder"<<"\n";
+ di<<"No active Builder\n";
return 1;
}
if(!Rakk->IsDone()) {
//cout<<"Active Builder Not Done"<<endl;
- di<<"Active Builder Not Done"<<"\n";
+ di<<"Active Builder Not Done\n";
return 1;
}
Standard_Integer nbc = Rakk->NbContours();
PrintHist(curshape,It,nbgen);
}
//cout<<"foreach g [lsort [dir gen*]] { wclick; puts [dname $g]; donl $g; }"<<endl;
- di<<"foreach g [lsort [dir gen*]] { wclick; puts [dname $g]; donl $g; }"<<"\n";
+ di<<"foreach g [lsort [dir gen*]] { wclick; puts [dname $g]; donl $g; }\n";
return 0;
}
{
if(Rake == 0){
//cout << "MakeFillet not initialized"<<endl;
- di << "MakeFillet not initialized"<<"\n";
+ di << "MakeFillet not initialized\n";
return 1 ;
}
if(narg%2 != 0 || narg < 4) return 1;
{
if(Rake == 0){
//cout << "MakeFillet not initialized"<<endl;
- di << "MakeFillet not initialized"<<"\n";
+ di << "MakeFillet not initialized\n";
return 1 ;
}
Rake->Build();
// if (Rakk.IsDone()==FilletSurf_IsPartial) cout <<"resultat partiel"<<endl;
if (aRakk.IsDone()==FilletSurf_IsNotOk)
{ FilletSurf_ErrorTypeStatus err=aRakk.StatusError();
- if (err==FilletSurf_EmptyList) di<< "StatusError=EmptyList"<<"\n";
- else if (err==FilletSurf_EdgeNotG1) di<< "StatusError=NotG1"<<"\n";
- else if (err==FilletSurf_FacesNotG1) di<< "StatusError=facesNotG1"<<"\n";
+ if (err==FilletSurf_EmptyList) di<< "StatusError=EmptyList\n";
+ else if (err==FilletSurf_EdgeNotG1) di<< "StatusError=NotG1\n";
+ else if (err==FilletSurf_FacesNotG1) di<< "StatusError=facesNotG1\n";
else if (err==FilletSurf_EdgeNotOnShape)
- di<< "StatusError=edgenotonshape"<<"\n";
- else if (err==FilletSurf_NotSharpEdge ) di<< "StatusError=notsharpedge"<<"\n";
- else if (err==FilletSurf_PbFilletCompute) di <<"StatusError=PBFillet"<<"\n";
+ di<< "StatusError=edgenotonshape\n";
+ else if (err==FilletSurf_NotSharpEdge ) di<< "StatusError=notsharpedge\n";
+ else if (err==FilletSurf_PbFilletCompute) di <<"StatusError=PBFillet\n";
}
else {
- if (aRakk.IsDone()==FilletSurf_IsPartial) di <<"partial result"<<"\n";
+ if (aRakk.IsDone()==FilletSurf_IsPartial) di <<"partial result\n";
nb=aRakk.NbSurface();
char localname [100];
//else if (Rakk.StartSectionStatus()==FilletSurf_TwoExtremityOnEdge)
// {cout<<" type deb conges = WLBLEND"<<endl;}
if (aRakk.StartSectionStatus()==FilletSurf_NoExtremityOnEdge)
- {di<<" type start fillets = WLBLOUT"<<"\n";}
+ {di<<" type start fillets = WLBLOUT\n";}
else if (aRakk.StartSectionStatus()==FilletSurf_OneExtremityOnEdge)
- { di<<" type start fillets = WLBLSTOP"<<"\n";}
+ { di<<" type start fillets = WLBLSTOP\n";}
else if (aRakk.StartSectionStatus()==FilletSurf_TwoExtremityOnEdge)
- {di<<" type start fillets = WLBLEND"<<"\n";}
+ {di<<" type start fillets = WLBLEND\n";}
//if (Rakk.EndSectionStatus()==FilletSurf_NoExtremityOnEdge)
// {cout<<" type fin conges = WLBLOUT"<<endl;}
//else if (Rakk.EndSectionStatus()==FilletSurf_TwoExtremityOnEdge)
// { cout<<" type fin conges = WLBLEND"<<endl;}
if (aRakk.EndSectionStatus()==FilletSurf_NoExtremityOnEdge)
- {di<<" type end fillets = WLBLOUT"<<"\n";}
+ {di<<" type end fillets = WLBLOUT\n";}
else if (aRakk.EndSectionStatus()==FilletSurf_OneExtremityOnEdge)
- {di<<" type end fillets = WLBLSTOP"<<"\n";}
+ {di<<" type end fillets = WLBLSTOP\n";}
else if (aRakk.EndSectionStatus()==FilletSurf_TwoExtremityOnEdge)
- { di<<" type end fillets = WLBLEND"<<"\n";}
+ { di<<" type end fillets = WLBLEND\n";}
Standard_Real f,l;
f = aRakk.FirstParameter();
l = aRakk.LastParameter();
// TopoDS_Face F1 = TopoDS::Face(DBRep::Get(a[i],TopAbs_FACE));
if ( F1.IsNull()) {
//cout << " Stop face not referenced." << endl;
- di << " Stop face not referenced." << "\n";
+ di << " Stop face not referenced.\n";
return 1;
}
Roll.SetStoppingFace(F1);
i++;
if ( !strcmp(a[i],"@")) {
//cout << " Even number of ball support faces is required " << endl;
- di << " Even number of ball support faces is required " << "\n";
+ di << " Even number of ball support faces is required \n";
return 1;
}
aLocalFace = DBRep::Get(a[i],TopAbs_FACE);
// TopoDS_Face F2 = TopoDS::Face(DBRep::Get(a[i],TopAbs_FACE));
if ( F1.IsNull() || F2.IsNull()) {
//cout << " Support face not referenced." << endl;
- di << " Support face not referenced." << "\n";
+ di << " Support face not referenced.\n";
return 1;
}
Roll.SetFaces(F1,F2);
// TopoDS_Edge E = TopoDS::Edge(DBRep::Get(a[i],TopAbs_EDGE));
if ( E.IsNull()) {
//cout << " Edge not referenced." << endl;
- di << " Edge not referenced." << "\n";
+ di << " Edge not referenced.\n";
return 1;
}
Roll.SetEdge(E);
if (F.IsNull())
{
//cout<<endl<<"Wrong parameters"<<endl<<endl;
- di<<"\n"<<"Wrong parameters"<<"\n"<<"\n";
+ di<<"\nWrong parameters\n\n";
return 1;
}
else
if (E.IsNull())
{
//cout<<"Wrong parameters"<<endl;
- di<<"Wrong parameters"<<"\n";
+ di<<"Wrong parameters\n";
return 1;
}
//TopoDS_Shape alocalFace(DBRep::Get( a[i], TopAbs_FACE ) );
if (F.IsNull())
{
//cout<<"Wrong parameters"<<endl;
- di<<"Wrong parameters"<<"\n";
+ di<<"Wrong parameters\n";
return 1;
}
Order = Draw::Atoi( a[i++] );
if (! MakeFilling.IsDone())
{
//cout<<"filling failed"<<endl;
- di<<"filling failed"<<"\n";
+ di<<"filling failed\n";
return 0;
}
Chrono.Show(Tps);
//cout<<"*** FIN DE FILLING ***"<<endl;
//cout<<"Temps de calcul : "<<Tps<<endl;
- di<<"*** FIN DE FILLING ***"<<"\n";
+ di<<"*** FIN DE FILLING ***\n";
di<<"Temps de calcul : "<<Tps<<"\n";
#endif
//cout << "-c t2d t3d tang tcur : to set tolerances" << endl;
//cout << "-a maxdeg maxseg : Approximation option" << endl;
di << "fillingparam : options are" <<"\n";
- di << "-l : to list current values" << "\n";
+ di << "-l : to list current values\n";
di << "-i : to set default values" << "\n";
- di << "-r deg nbPonC nbIt anis : to set filling options" <<"\n";
- di << "-c t2d t3d tang tcur : to set tolerances" << "\n";
- di << "-a maxdeg maxseg : Approximation option" << "\n";
+ di << "-r deg nbPonC nbIt anis : to set filling options\n";
+ di << "-c t2d t3d tang tcur : to set tolerances\n";
+ di << "-a maxdeg maxseg : Approximation option\n";
}
else if (n > 1)
{
di<<"Degree = "<<Degree<<"\n";
di<<"NbPtsOnCur = "<<NbPtsOnCur<<"\n";
di<<"NbIter = "<<NbIter<<"\n";
- di<<"Anisotropie = "<< (Standard_Integer) Anisotropie<<"\n"<<"\n";
+ di<<"Anisotropie = "<< (Standard_Integer) Anisotropie<<"\n\n";
di<<"Tol2d = "<<Tol2d<<"\n";
di<<"Tol3d = "<<Tol3d<<"\n";
di<<"TolAng = "<<TolAng<<"\n";
- di<<"TolCurv = "<<TolCurv<<"\n"<<"\n";
+ di<<"TolCurv = "<<TolCurv<<"\n\n";
di<<"MaxDeg = "<<MaxDeg<<"\n";
- di<<"MaxSegments = "<<MaxSegments<<"\n"<<"\n";
+ di<<"MaxSegments = "<<MaxSegments<<"\n\n";
}
else if (strcmp( flag, "-i" ) == 0 && n == 2)
{
else
{
//cout<<"Wrong parameters"<<endl;
- di<<"Wrong parameters"<<"\n";
+ di<<"Wrong parameters\n";
return 1;
}
}
Standard_Integer props(Draw_Interpretor& di, Standard_Integer n, const char** a)
{
if (n < 2) {
- di << "Use: " << a[0] << " shape [epsilon] [c[losed]] [x y z] [-full]" << "\n";
- di << "Compute properties of the shape" << "\n";
- di << "The epsilon, if given, defines relative precision of computation" << "\n";
- di << "The \"closed\" flag, if present, do computation only closed shells of the shape" << "\n";
+ di << "Use: " << a[0] << " shape [epsilon] [c[losed]] [x y z] [-full]\n";
+ di << "Compute properties of the shape\n";
+ di << "The epsilon, if given, defines relative precision of computation\n";
+ di << "The \"closed\" flag, if present, do computation only closed shells of the shape\n";
di << "The centroid coordinates will be put to DRAW variables x y z (if given)\n";
di << "All values are outputted with the full precision in the full mode.\n\n";
return 1;
{
Standard_SStream aSStream1;
aSStream1 << "\n\n";
- aSStream1 << "Mass : " << setw(15) << G.Mass() << "\n" << "\n";
- if(witheps && *a[0] != 'l') aSStream1 << "Relative error of mass computation : " << setw(15) << eps << "\n" << "\n";
+ aSStream1 << "Mass : " << setw(15) << G.Mass() << "\n\n";
+ if(witheps && *a[0] != 'l') aSStream1 << "Relative error of mass computation : " << setw(15) << eps << "\n\n";
aSStream1 << "Center of gravity : \n";
aSStream1 << "X = " << setw(15) << P.X() << "\n";
Standard_Integer vpropsgk(Draw_Interpretor& di, Standard_Integer n, const char** a)
{
if (n < 2) {
- di << "Use: " << a[0] << " shape epsilon closed span mode [x y z]" << "\n";
- di << "Compute properties of the shape" << "\n";
- di << "The epsilon defines relative precision of computation" << "\n";
- di << "The \"closed\" flag, if equal 1, causes computation only closed shells of the shape" << "\n";
- di << "The \"span\" flag, if equal 1, says that computation is performed on spans" << "\n";
- di << " This option makes effect only for BSpline surfaces." << "\n";
- di << "mode can be 0 - only volume calculations" << "\n";
- di << " 1 - volume and gravity center" << "\n";
- di << " 2 - volume, gravity center and matrix of inertia" << "\n";
- di << "The centroid coordinates will be put to DRAW variables x y z (if given)\n" << "\n";
+ di << "Use: " << a[0] << " shape epsilon closed span mode [x y z]\n";
+ di << "Compute properties of the shape\n";
+ di << "The epsilon defines relative precision of computation\n";
+ di << "The \"closed\" flag, if equal 1, causes computation only closed shells of the shape\n";
+ di << "The \"span\" flag, if equal 1, says that computation is performed on spans\n";
+ di << " This option makes effect only for BSpline surfaces.\n";
+ di << "mode can be 0 - only volume calculations\n";
+ di << " 1 - volume and gravity center\n";
+ di << " 2 - volume, gravity center and matrix of inertia\n";
+ di << "The centroid coordinates will be put to DRAW variables x y z (if given)\n\n";
return 1;
}
if ( n > 2 && n < 6) {
- di << "Wrong arguments" << "\n";
+ di << "Wrong arguments\n";
return 1;
}
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;
}
}
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
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;
}
//
}
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);
}
}
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);
}
}
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: +<parameter> <value>" << "\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: <symbol><parameter>" << "\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: +<parameter> <value>\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: <symbol><parameter>\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);
}
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);
}
{
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;
}
//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;
}
//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" <<endl;
//cout << " -G guide 0|1(ACR|Plan) 0|1(contact|no contact) : with guide"<<endl;
- di << "setsweep options [arg1 [arg2 [...]]] : options are :" << "\n";
- di << " -FR : Tangent and Normal are given by Frenet trihedron" <<"\n";
- di << " -CF : Tangente is given by Frenet," << "\n";
- di << " the Normal is computed to minimize the torsion " << "\n";
- di << " -DT : discrete trihedron" << "\n";
- di << " -DX Surf : Tangent and Normal are given by Darboux trihedron," <<"\n";
- di << " Surf have to be a shell or a face" <<"\n";
- di << " -CN dx dy dz : BiNormal is given by dx dy dz" << "\n";
- di << " -FX Tx Ty TZ [Nx Ny Nz] : Tangent and Normal are fixed" <<"\n";
- di << " -G guide 0|1(Plan|ACR) 0|1|2(no contact|contact|contact on border) : with guide"<<"\n";
+ di << "setsweep options [arg1 [arg2 [...]]] : options are :\n";
+ di << " -FR : Tangent and Normal are given by Frenet trihedron\n";
+ di << " -CF : Tangente is given by Frenet,\n";
+ di << " the Normal is computed to minimize the torsion \n";
+ di << " -DT : discrete trihedron\n";
+ di << " -DX Surf : Tangent and Normal are given by Darboux trihedron,\n";
+ di << " Surf have to be a shell or a face\n";
+ di << " -CN dx dy dz : BiNormal is given by dx dy dz\n";
+ di << " -FX Tx Ty TZ [Nx Ny Nz] : Tangent and Normal are fixed\n";
+ di << " -G guide 0|1(Plan|ACR) 0|1|2(no contact|contact|contact on border) : with guide\n";
return 0;
}
if (Sweep ==0) {
//cout << "You have forgotten the <<mksweep>> command !"<< endl;
- di << "You have forgotten the <<mksweep>> command !"<< "\n";
+ di << "You have forgotten the <<mksweep>> command !\n";
return 1;
}
if (!strcmp(a[1],"-FR")) {
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);
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]));
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]));
if (n != 5)
{
//cout << "bad arguments !" << endl;
- di << "bad arguments !" << "\n";
+ di << "bad arguments !\n";
return 1;
}
else
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;
//cout << " with the spine" <<endl;
//cout << " -R : the wire have to be rotated to assume orthogonality"<<endl;
//cout << " with the spine's tangent" << endl;
- di << "addsweep wire/vertex [Vertex] [-T] [-R] [u0 v0 u1 v1 [...[uN vN]]] : options are :" << "\n";
- di << " -T : the wire/vertex have to be translated to assume contact"<< "\n";
- di << " with the spine" <<"\n";
- di << " -R : the wire have to be rotated to assume orthogonality"<<"\n";
- di << " with the spine's tangent" << "\n";
+ di << "addsweep wire/vertex [Vertex] [-T] [-R] [u0 v0 u1 v1 [...[uN vN]]] : options are :\n";
+ di << " -T : the wire/vertex have to be translated to assume contact\n";
+ di << " with the spine\n";
+ di << " -R : the wire have to be rotated to assume orthogonality\n";
+ di << " with the spine's tangent\n";
return 0;
}
if (Sweep ==0) {
//cout << "You have forgotten the <<mksweep>> command !"<< endl;
- di << "You have forgotten the <<mksweep>> command !"<< "\n";
+ di << "You have forgotten the <<mksweep>> command !\n";
return 1;
}
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;
}
// 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;
}
//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 <<mksweep>> command !"<< endl;
- di << "You have forgotten the <<mksweep>> command !"<< "\n";
+ di << "You have forgotten the <<mksweep>> command !\n";
return 1;
}
if (!Sweep->IsReady()) {
//cout << "You have forgotten the <<addsweep>> command !"<< endl;
- di << "You have forgotten the <<addsweep>> command !"<< "\n";
+ di << "You have forgotten the <<addsweep>> command !\n";
return 1;
}
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;
}
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);
if (Sweep ==0) {
//cout << "You have forgotten the <<mksweep>> command !"<< endl;
- di << "You have forgotten the <<mksweep>> command !"<< "\n";
+ di << "You have forgotten the <<mksweep>> command !\n";
return 1;
}
if (!Sweep->IsReady()) {
//cout << "You have forgotten the <<addsweep>> command !"<< endl;
- di << "You have forgotten the <<addsweep>> command !"<< "\n";
+ di << "You have forgotten the <<addsweep>> command !\n";
return 1;
}
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 {
}
else {
//cout << " HalfSpace NotDone" << endl;
- di << " HalfSpace NotDone" << "\n";
+ di << " HalfSpace NotDone\n";
return 1;
}
}
}
else {
//cout << " HalfSpace NotDone" << endl;
- di << " HalfSpace NotDone" << "\n";
+ di << " HalfSpace NotDone\n";
return 1;
}
}
OS << " on triangulation " << myTriangulations.FindIndex(CR->Triangulation());
if (!CR->Location().IsIdentity())
OS << " location "<<Locations().Index(CR->Location());
- OS << endl;
+ OS << "\n";
}
itrc.Next();
}
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";
if (!Param.IsNull()) {
if (!Compact) {
- OS << " "<< "Parameters :";
+ OS << " Parameters :";
}
else OS << "1 " ;
if (!Compact) 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";
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";
{
Standard_Integer i, nbLoc = myMap.Extent();
- OS << "Locations "<< nbLoc <<endl;
+ OS << "Locations "<< nbLoc << "\n";
try {
OCC_CATCH_SIGNALS
for (i = 1; i <= nbLoc; i++) {
// write the copyright
if (myFormatNb == 3)
- OS << "\n" << Version_3 << endl;
+ OS << "\n" << Version_3 << "\n";
else if (myFormatNb == 2)
- OS << "\n" << Version_2 << endl;
+ OS << "\n" << Version_2 << "\n";
else
- OS << "\n" << Version_1 << endl;
+ OS << "\n" << Version_1 << "\n";
//-----------------------------------------
// write the locations
{
Standard_Integer i, j, nbpOntri = myNodes.Extent();
- OS << "PolygonOnTriangulations " << nbpOntri << endl;
+ OS << "PolygonOnTriangulations " << nbpOntri << "\n";
Handle(Poly_PolygonOnTriangulation) Poly;
Handle(TColStd_HArray1OfReal) Param;
try {
void BinTools_ShapeSet::WritePolygon3D(Standard_OStream& OS)const
{
Standard_Integer i, j, nbpol = myPolygons3D.Extent();
- OS << "Polygon3D " << nbpol << endl;
+ OS << "Polygon3D " << nbpol << "\n";
Handle(Poly_Polygon3D) P;
try {
OCC_CATCH_SIGNALS
{
Standard_Integer i, j, nbNodes, nbtri = myTriangulations.Extent();
Standard_Integer nbTriangles = 0, n1, n2, n3;
- OS << "Triangulations " << nbtri << endl;
+ OS << "Triangulations " << nbtri << "\n";
Handle(Poly_Triangulation) T;
try {
OCC_CATCH_SIGNALS
}
myResourcesAreLoaded=Standard_True;
-// cout << "resource Loaded: " << "Format: " << theFormat << ", FileExtension:" << myFileExtension << ", DataType:" << myDataType << ", VersionDataType:" << myVersionDataType << ", Description:" << myDescription << ", Domain:" << myDomain << endl;
+// cout << "resource Loaded: Format: " << theFormat << ", FileExtension:" << myFileExtension << ", DataType:" << myDataType << ", VersionDataType:" << myVersionDataType << ", Description:" << myDescription << ", Domain:" << myDomain << endl;
}
return;
}
di << "\n";
if (withHLR) {
di << "Angle of discretization : ";
- di << anglHLR * 180 / M_PI << " degrees" << "\n";
+ di << anglHLR * 180 / M_PI << " degrees\n";
}
}
else di << " wireframe";
}
else if (!strcasecmp(a[1],"ang" )) {
di << "Angle de discretisation : ";
- di << anglHLR * 180 / M_PI << " degres" << "\n";
+ di << anglHLR * 180 / M_PI << " degres\n";
}
else return 1;
}
if (anglHLR > 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) {
// 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++) {
V.Multiply(l/x);
else {
V.SetCoord(l/2.,0,0);
- di << "Null normal"<< "\n";
+ di << "Null normal\n";
}
P2 = P1;
TDF_TagSource::Set(L);
return 0;
}
- di << "DDF_SetTagger : Error" << "\n";
+ di << "DDF_SetTagger : Error\n";
return 1;
}
di << A->NewTag ();
return 0;
}
- di << "DDF_NewTag : Error" << "\n";
+ di << "DDF_NewTag : Error\n";
return 1;
}
return 0;
}
}
- di << "DDF_NewChild : Error" << "\n";
+ di << "DDF_NewChild : Error\n";
return 1;
}
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;
}
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;
}
}
}
}
- 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;
}
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 "<<a[1]<<" ***********"<<"\n";
+ di<<"*********** Dump of "<<a[1]<<" ***********\n";
//DDF->DataFramework()->Dump(cout);
Standard_SStream aSStream;
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 "<<a[1]<<" ***********"<<"\n";
+ di<<"*********** Dump of "<<a[1]<<" ***********\n";
TDF_IDFilter filter(Standard_False);
//TDF_Tool::ExtendedDeepDump(cout,DDF->DataFramework(),filter);
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);
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;
}
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;
}
return 0;
}
- di << "DDF_ChecLabel : Error" << "\n";
+ di << "DDF_ChecLabel : Error\n";
return 1;
}
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;
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;
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;
TDataStd_Integer::Set(L,Draw::Atoi(arg[3]));
return 0;
}
- di << "DDataStd_SetInteger : Error" << "\n";
+ di << "DDataStd_SetInteger : Error\n";
return 1;
}
TDataStd_Real::Set(L,Draw::Atof(arg[3]));
return 0;
}
- di << "DDataStd_SetReal : Error" << "\n";
+ di << "DDataStd_SetReal : Error\n";
return 1;
}
TDF_Reference::Set(L,LREF);
return 0;
}
- di << "DDataStd_SetReference : Error" << "\n";
+ di << "DDataStd_SetReference : Error\n";
return 1;
}
TDataStd_Comment::Set(L,TCollection_ExtendedString(arg[3],Standard_True));
return 0;
}
- di << "DDataStd_SetComment : Error" << "\n";
+ di << "DDataStd_SetComment : Error\n";
return 1;
}
di << A->Get();
return 0;
}
- di << "DDataStd_GetInteger : Error" << "\n";
+ di << "DDataStd_GetInteger : Error\n";
return 1;
}
di << A->Get();
return 0;
}
- di << "DDataStd_GetReal : Error" << "\n";
+ di << "DDataStd_GetReal : Error\n";
return 1;
}
di << entry.ToCString();
return 0;
}
- di << "DDataStd_GetReference : Error" << "\n";
+ di << "DDataStd_GetReference : Error\n";
return 1;
}
di << A->Get().ToExtString();
return 0;
}
- di << "DDataStd_GetComment : Error" << "\n";
+ di << "DDataStd_GetComment : Error\n";
return 1;
}
// }
return 0;
}
- di << "Self : Error" << "\n";
+ di << "Self : Error\n";
return 0;
}
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";
}
return 0;
}
- di << "DDataStd_ChangeIntArray: Error" << "\n";
+ di << "DDataStd_ChangeIntArray: Error\n";
return 0;
}
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";
}
return 0;
}
- di << "DDataStd_ChangeRealArray: Error" << "\n";
+ di << "DDataStd_ChangeRealArray: Error\n";
return 0;
}
return 0;
}
- di << "Wrong arguments" << "\n";
+ di << "Wrong arguments\n";
return 1;
}
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());
return 0;
}
- di << "Wrong arguments" << "\n";
+ di << "Wrong arguments\n";
return 1;
}
}
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;
}
di << ")";
return 0;
}
- di << "Usage: DumpRelation (DF, entry)" << "\n";
+ di << "Usage: DumpRelation (DF, entry)\n";
return 1;
}
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
{
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);
}
return 0;
}
- di << "DDataStd_ChangeExtStringArray: Error" << "\n";
+ di << "DDataStd_ChangeExtStringArray: Error\n";
return 0;
}
}
return 0;
}
- di << "SetUTFName : String is not kept in DF" << "\n";
+ di << "SetUTFName : String is not kept in DF\n";
return 1;
}
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;
}
}
return 0;
}
- di << "DDataStd_SetByteArray: Error" << "\n";
+ di << "DDataStd_SetByteArray: Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_SetBooleanArray: Error" << "\n";
+ di << "DDataStd_SetBooleanArray: Error\n";
return 1;
}
// 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;
}
}
return 0;
}
- di << "DDataStd_SetExtStringList: Error" << "\n";
+ di << "DDataStd_SetExtStringList: Error\n";
return 1;
}
//
return 0;
}
}
- di << "DDataStd_SetReferenceList: Error" << "\n";
+ di << "DDataStd_SetReferenceList: Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_SetBooleanList: Error" << "\n";
+ di << "DDataStd_SetBooleanList: Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_SetIntegerList: Error" << "\n";
+ di << "DDataStd_SetIntegerList: Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_SetRealList: Error" << "\n";
+ di << "DDataStd_SetRealList: Error\n";
return 1;
}
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";
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";
}
return 0;
}
- di << "DDataStd_ChangeByteArray: Error" << "\n";
+ di << "DDataStd_ChangeByteArray: Error\n";
return 1;
}
}
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;
}
}
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;
}
}
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;
}
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;
}
}
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;
}
//
cout << "Map extent = " << anAtt->Extent()<<endl;
return 0;
}
- di << "DDataStd_SetIntPackedMap : Error" << "\n";
+ di << "DDataStd_SetIntPackedMap : Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_GetIntPackedMap : Error" << "\n";
+ di << "DDataStd_GetIntPackedMap : Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_ChangeIntPackedMap_Add: Error" << "\n";
+ di << "DDataStd_ChangeIntPackedMap_Add: Error\n";
return 0;
}
}
return 0;
}
- di << "DDataStd_ChangeIntPackedMap_Rem: Error" << "\n";
+ di << "DDataStd_ChangeIntPackedMap_Rem: Error\n";
return 0;
}
}
return 0;
}
- di << "DDataStd_ChangeIntPackedMap_AddRem: Error" << "\n";
+ di << "DDataStd_ChangeIntPackedMap_AddRem: Error\n";
return 0;
}
cout << "Map extent = " << anAtt->Extent()<<endl;
return 0;
}
- di << "DDataStd_SetIntPHugeMap : Error" << "\n";
+ di << "DDataStd_SetIntPHugeMap : Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_SetNDataIntegers2 : Error" << "\n";
+ di << "DDataStd_SetNDataIntegers2 : Error\n";
return 1;
}
//================
anAtt->SetArrayOfIntegers(aKey, anArr);
return 0;
}
- di << "DDataStd_SetNDataIntArrays2 : Error" << "\n";
+ di << "DDataStd_SetNDataIntArrays2 : Error\n";
return 1;
}
cout << "String = " << anAtt->Get().ToCString() << " is kept in DF" << endl;
return 0;
}
- di << "DDataStd_SetAsciiString : Error" << "\n";
+ di << "DDataStd_SetAsciiString : Error\n";
return 1;
}
//
cout << "String = " <<anAtt->Get().ToCString() << endl;
return 0;
}
- di << "DDataStd_GetAsciiString : Error" << "\n";
+ di << "DDataStd_GetAsciiString : Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_SetNDataIntegers : Error" << "\n";
+ di << "DDataStd_SetNDataIntegers : Error\n";
return 1;
}
return 0;
}
- di << "DDataStd_GetNDIntegers : Error" << "\n";
+ di << "DDataStd_GetNDIntegers : Error\n";
return 1;
}
return 0;
}
}
- di << "DDataStd_SetNDataIntegers : Error" << "\n";
+ di << "DDataStd_SetNDataIntegers : Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_SetNDataReals : Error" << "\n";
+ di << "DDataStd_SetNDataReals : Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_GetNDReals : Error" << "\n";
+ di << "DDataStd_GetNDReals : Error\n";
return 1;
}
return 0;
}
}
- di << "DDataStd_GetNDReal : Error" << "\n";
+ di << "DDataStd_GetNDReal : Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_SetNDataStrings : Error" << "\n";
+ di << "DDataStd_SetNDataStrings : Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_GetNDStrings : Error" << "\n";
+ di << "DDataStd_GetNDStrings : Error\n";
return 1;
}
return 0;
}
}
- di << "DDataStd_GetNDString : Error" << "\n";
+ di << "DDataStd_GetNDString : Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_SetNDataBytes : Error" << "\n";
+ di << "DDataStd_SetNDataBytes : Error\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_GetNDBytes : Error" << "\n";
+ di << "DDataStd_GetNDBytes : Error\n";
return 1;
}
return 0;
}
}
- di << "DDataStd_GetNDByte : Error" << "\n";
+ di << "DDataStd_GetNDByte : Error\n";
return 1;
}
//======================== IntArrays ====================================
anAtt->SetArrayOfIntegers(aKey, anArr);
return 0;
}
- di << "DDataStd_SetNDataIntArrays : Error" << "\n";
+ di << "DDataStd_SetNDataIntArrays : Error\n";
return 1;
}
Standard_Integer upper = anArrValue->Upper();
for(Standard_Integer i = lower; i<=upper;i++) {
Standard_Integer aValue = anArrValue->Value(i);
- cout << "\tValue("<<i<<")"<<" = " <<aValue<<endl;
+ cout << "\tValue("<<i<<") = " <<aValue<<endl;
}
} else
cout << "\tthe specified array is Null "<<endl;
}
return 0;
}
- di << "DDataStd_GetNDIntArrays : Error" << "\n";
+ di << "DDataStd_GetNDIntArrays : Error\n";
return 1;
}
Standard_Integer upper = anArrValue->Upper();
for(Standard_Integer i = lower; i<=upper;i++) {
Standard_Integer aValue = anArrValue->Value(i);
- cout << "\tValue("<<i<<")"<<" = " <<aValue<<endl;
+ cout << "\tValue("<<i<<") = " <<aValue<<endl;
}
} else
cout << "\tthe specified array is Null or not found"<<endl;
return 0;
}
}
- di << "DDataStd_SetNDataIntArray : Error" << "\n";
+ di << "DDataStd_SetNDataIntArray : Error\n";
return 1;
}
//============================= RealArrays ==============================
anAtt->SetArrayOfReals(aKey, anArr);
return 0;
}
- di << "DDataStd_SetNDataRealArrays : Error" << "\n";
+ di << "DDataStd_SetNDataRealArrays : Error\n";
return 1;
}
Standard_Integer upper = anArrValue->Upper();
for(Standard_Integer i = lower; i<=upper;i++) {
Standard_Real aValue = anArrValue->Value(i);
- cout << "\tValue("<<i<<")"<<" = " <<aValue<<endl;
+ cout << "\tValue("<<i<<") = " <<aValue<<endl;
}
} else
cout << "\tthe specified array is Null "<<endl;
}
return 0;
}
- di << "DDataStd_GetNDRealArrays : Error" << "\n";
+ di << "DDataStd_GetNDRealArrays : Error\n";
return 1;
}
Standard_Integer upper = anArrValue->Upper();
for(Standard_Integer i = lower; i<=upper;i++) {
Standard_Real aValue = anArrValue->Value(i);
- cout << "\tValue("<<i<<")"<<" = " <<aValue<<endl;
+ cout << "\tValue("<<i<<") = " <<aValue<<endl;
}
} else
cout << "\tthe specified array is Null or not found"<<endl;
return 0;
}
}
- di << "DDataStd_SetNDataRealArray : Error" << "\n";
+ di << "DDataStd_SetNDataRealArray : Error\n";
return 1;
}
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 TDF_Label& value = A->Value(index);
{
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;
}
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;
}
}
return 0;
}
- di << "DDataStd_GetConstraint : Error : not done" << "\n";
+ di << "DDataStd_GetConstraint : Error : not done\n";
return 1;
}
{
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;
}
{
if (nb < 7)
{
- di<<"usage:"<<"\n";
- di<<"SetPattern (DF,entry,signature<=2,NSentry,realEntry,intEntry)"<<"\n";
- di<<"SetPattern (DF,entry,2<signature<5,NSentry,realEntry,intEntry,NSentry,realEntry,intEntry)"<<"\n";
+ di<<"usage:\n";
+ di<<"SetPattern (DF,entry,signature<=2,NSentry,realEntry,intEntry)\n";
+ di<<"SetPattern (DF,entry,2<signature<5,NSentry,realEntry,intEntry,NSentry,realEntry,intEntry)\n";
return 1;
}
{
if (nb < 10)
{
- di<<"usage:"<<"\n";
- di<<"SetPattern (DF,entry,2<signature<5,NSentry,realEntry,intEntry,NSentry,realEntry,intEntry)"<<"\n";
+ di<<"usage:\n";
+ di<<"SetPattern (DF,entry,2<signature<5,NSentry,realEntry,intEntry,NSentry,realEntry,intEntry)\n";
return 1;
}
{
if (nb > 5)
{
- di<<"usage: SetPattern (DF,entry,signature>=5,NSentry)"<<"\n";
+ di<<"usage: SetPattern (DF,entry,signature>=5,NSentry)\n";
return 1;
}
}
return 0;
}
- di << "DDataStd_DumpPattern : Error : not done" << "\n";
+ di << "DDataStd_DumpPattern : Error : not done\n";
return 1;
}
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;
}
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;
}
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;
}
TDataXtd_Point::Set (L,p);
}
else {
- di << "DDataStd_SetPoint : not a point" << "\n";
+ di << "DDataStd_SetPoint : not a point\n";
return 1;
}
}
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());
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());
{
// 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);
}
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;
}
}
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;
}
case TDataXtd_CYLINDER: di <<"cyl"; break;
default:
{
- di << "DDataStd_GetGeometry : unknown type" << "\n";
+ di << "DDataStd_GetGeometry : unknown type\n";
return 1;
}
}
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;
}
if (!D3D.IsNull()) dout.RemoveDrawable(D3D);
return 0;
}
- di << "DDataStd_Rmdraw : Error : not done" << "\n";
+ di << "DDataStd_Rmdraw : Error : not done\n";
return 1;
}
else di << 0;
return 0;
}
- di << "DDataStd_DrawOwner : Error" << "\n";
+ di << "DDataStd_DrawOwner : Error\n";
return 1;
}
DDataStd_DrawPresentation::Display(L);
return 0;
}
- di << "DDataStd_DrawDisplay : Error" << "\n";
+ di << "DDataStd_DrawDisplay : Error\n";
return 1;
}
DDataStd_DrawPresentation::Erase(L);
return 0;
}
- di << "DDataStd_DrawErase : Error" << "\n";
+ di << "DDataStd_DrawErase : Error\n";
return 1;
}
DDataStd_DrawPresentation::Update(L);
return 0;
}
- di << "DDataStd_DrawUpdate : Error" << "\n";
+ di << "DDataStd_DrawUpdate : Error\n";
return 1;
}
N = TDataStd_Name::Set(L,arg[3]);
return 0;
}
- di << "DDataStd_SetName : Error" << "\n";
+ di << "DDataStd_SetName : Error\n";
return 1;
}
di << s.ToCString();
return 0;
}
- di << "DDataStd_SetName : Error" << "\n";
+ di << "DDataStd_SetName : Error\n";
return 1;
}
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;
}
TDataStd_NoteBook::New(L);
return 0;
}
- di << "DDataStd_NewNoteBook : Error" << "\n";
+ di << "DDataStd_NewNoteBook : Error\n";
return 1;
}
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]);
DDF::ReturnLabel(di,TN->Label());
return 0;
}
- di << "DDataStd_SetNode : Error" << "\n";
+ di << "DDataStd_SetNode : Error\n";
return 1;
}
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]);
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;
}
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]);
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;
}
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]);
DDF::ReturnLabel(di,TN->Root()->Label());
return 0;
}
- di << "DDataStd_RootNode : Error" << "\n";
+ di << "DDataStd_RootNode : Error\n";
return 1;
}
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]);
if (!current->InsertBefore(TN)) return 1;
return 0;
}
- di << "DDataStd_InsertBefore : Error" << "\n";
+ di << "DDataStd_InsertBefore : Error\n";
return 1;
}
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]);
if (!current->InsertAfter(TN)) return 1;
return 0;
}
- di << "DDataStd_InsertNodeAfter : Error" << "\n";
+ di << "DDataStd_InsertNodeAfter : Error\n";
return 1;
}
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]);
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;
}
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]);
}
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();
di<<"\n";
return 0;
}
- di << "DDataStd_ChildNodeIterate : Error" << "\n";
+ di << "DDataStd_ChildNodeIterate : Error\n";
return 1;
}
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]);
cni.Initialize(TN, AllLevels);
return 0;
}
- di << "DDataStd_InitChildNodeIterator : Error" << "\n";
+ di << "DDataStd_InitChildNodeIterator : Error\n";
return 1;
}
{
if (cni.More()) {
//cout<<"TRUE"<<endl;
- di<<"TRUE"<<"\n";
+ di<<"TRUE\n";
}
else {
//cout<<"FALSE"<<endl;
- di<<"FALSE"<<"\n";
+ di<<"FALSE\n";
}
return 0;
}
}
return 0;
}
- di << "DDocStd_ListDocuments : Error" << "\n";
+ di << "DDocStd_ListDocuments : Error\n";
return 1;
}
D = new TDocStd_Document("dummy");
DD = new DDocStd_DrawDocument(D);
Draw::Set(a[1],DD);
- di << "document (not handled by application) " << a[1] << " created" << "\n";
+ di << "document (not handled by application) " << 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;
}
if (nb == 3) {
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;
}
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);
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;
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;
}
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:
return 0;
}
}
- di << "DDocStd_SaveAs : Error not enough argument" << "\n";
+ di << "DDocStd_SaveAs : Error not enough argument\n";
return 1;
}
di << A->IsInSession(a[1]);
return 0;
}
- di << "DDocStd_IsInSession : Error" << "\n";
+ di << "DDocStd_IsInSession : Error\n";
return 1;
}
di << "Extension : " << path.Extension().ToCString() << "\n";
return 0;
}
- di << "DDocStd_OSDPath : Error" << "\n";
+ di << "DDocStd_OSDPath : Error\n";
return 1;
}
di << "Path : " << PathAsciiString.ToCString() << "\n";
return 0;
}
- di << "DDocStd_Path : Error" << "\n";
+ di << "DDocStd_Path : Error\n";
return 1;
}
D->AddComment(comment);
return 0;
}
- di << "DDocStd_AddComment : Wrong arguments number" << "\n";
+ di << "DDocStd_AddComment : Wrong arguments number\n";
return 1;
}
return 0;
}
- di << "DDocStd_PrintComments : Wrong arguments number" << "\n";
+ di << "DDocStd_PrintComments : Wrong arguments number\n";
return 1;
}
DDocStd::ReturnLabel(di,DOC->Main());
return 0;
}
- di << "DDocStd_Main : Error" << "\n";
+ di << "DDocStd_Main : Error\n";
return 1;
}
D->ChangeStorageFormat(a[2]);
return 0;
}
- di << "DDocStd_Format : Error" << "\n";
+ di << "DDocStd_Format : Error\n";
return 1;
}
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;
}
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;
}
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;
}
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";
}
}
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();
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()) {
}
return 0;
}
- di << "DDocStd_DumpDocument : Error" << "\n";
+ di << "DDocStd_DumpDocument : Error\n";
return 1;
}
}
return 0;
}
- di << "DDocStd_SetModified : Error" << "\n";
+ di << "DDocStd_SetModified : Error\n";
return 1;
}
// D->PurgeModified();
// return 0;
// }
- di << "DDocStd_Propagate : not implemented" << "\n";
+ di << "DDocStd_Propagate : not implemented\n";
return 1;
}
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;
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();
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)
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();
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;
}
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();
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();
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;
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; }
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)) )
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;
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();
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() << " ";
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() << " ";
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() << " ";
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() << " ";
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() << " ";
}
return 0;
}
- di << "TDocStd_DumpCommand : Error" << "\n";
+ di << "TDocStd_DumpCommand : Error\n";
return 1;
}
TopoDS_Shape S = DBRep::Get(a[2]);
if (S.IsNull()) {
- di <<"Noone shape selected"<<"\n";
+ di <<"Noone shape selected\n";
//di << 0;
return 0;
}
else {
di <<Name.ToCString();
if (Status == 2) {
- di <<"Several shapes have the same name"<<"\n";
+ di <<"Several shapes have the same name\n";
}
}
return 0;
if (!DDF::GetDF(a[1],ND)) return 1;
TopoDS_Shape SS = DBRep::Get(a[2]);
if (SS.IsNull()) {
- di <<"Noone shape selected"<<"\n";
+ di <<"Noone shape selected\n";
//di << 0;
return 0;
}
TDF_Tool::Entry(itL.Value(),entry);
di <<" , "<< entry.ToCString();
}
- di <<"."<<"\n";
+ di <<".\n";
return 0;
}
DDF::FindLabel(ND,a[2],Lab);
Handle(TNaming_NamedShape) NS;
if (!Lab.FindAttribute(TNaming_NamedShape::GetID(),NS)) {
- di <<"No shape"<<"\n";
+ di <<"No shape\n";
return 0;
}
}
di <<"\n";
if (NbShapes == 0) {
- di <<"No shape"<<"\n";
+ di <<"No shape\n";
}
return 0;
return 0;
}
}
- di << "GetShape : Error" << "\n";
+ di << "GetShape : Error\n";
return 1;
}
return 0;
}
}
- di << "DDataStd_GetShape : Error" << "\n";
+ di << "DDataStd_GetShape : Error\n";
return 1;
}
//=======================================================================
TopoDS_Shape SS = DBRep::Get(a[2]);
if (SS.IsNull()) {
- di <<"Noone shape selected"<<"\n";
+ di <<"Noone shape selected\n";
//di << 0;
return 0;
}
else {
di <<Name.ToCString();
if (Status == 2) {
- di <<"Several shapes have the same name"<<"\n";
+ di <<"Several shapes have the same name\n";
}
}
return 0;
if(nb == 5) aNew = (Standard_Boolean) atoi(arg[4]);
if(aNew) {
TNaming_NewShapeIterator aNewShapeIter(aNameIter);
- di << "DNaming_CheckIterator : New It is OK" << "\n";
+ di << "DNaming_CheckIterator : New It is OK\n";
} else {
TNaming_OldShapeIterator oldShapeIter(aNameIter);
- di << "DNaming_CheckIterator : Old It is OK" << "\n";
+ di << "DNaming_CheckIterator : Old It is OK\n";
}
return 0;
}
- di << "DNaming_CheckIterator : Error" << "\n";
+ di << "DNaming_CheckIterator : Error\n";
return 1;
}
return 0;
}
}
- di << "DNaming_AddObject: Error" << "\n";
+ di << "DNaming_AddObject: Error\n";
return 1;
}
return 0;
}
}
- di << "DNaming_AddObject: Error" << "\n";
+ di << "DNaming_AddObject: Error\n";
return 1;
}
}
return 0;
}
- di << "DNaming_Select : Error" << "\n";
+ di << "DNaming_Select : Error\n";
return 1;
}
// #define DEB_SELN 1
}
TDF_LabelMap aValidMap;
if(!FillValidMap(L,aValidMap))
- di << "Valid map is empty" << "\n";
+ di << "Valid map is empty\n";
#ifdef OCCT_DEBUG_SELN
cout<<"== Valid Label map =="<<endl;
for (TDF_MapIteratorOfLabelMap mapItr(aValidMap);mapItr.More(); mapItr.Next()) {
TNaming_Selector SL (L);
Standard_Boolean isSolved = SL.Solve(aValidMap);
if(!isSolved)
- di << "!!! Solver is failed" <<"\n";
+ di << "!!! Solver is failed\n";
TopoDS_Shape Res = TNaming_Tool::CurrentShape(SL.NamedShape());
Sprintf (name,"%s_%s","new",a[2]);
Display (name,Res);
return 0;
}
- di << "DNaming_SolveSelection : Error" << "\n";
+ di << "DNaming_SolveSelection : Error\n";
return 1;
}
if (!DDF::FindLabel(DF,a[2],L)) return 1;
Handle(TNaming_Naming) naming;
if (!L.FindAttribute(TNaming_Naming::GetID(),naming)) {
- di <<"DNaming_DumpSelection : not a selection" << "\n";
+ di <<"DNaming_DumpSelection : not a selection\n";
return 1;
}
DumpNaming(naming, di);
}
return 0;
}
- di << "DNaming_DumpSelection : Error" << "\n";
+ di << "DNaming_DumpSelection : Error\n";
return 1;
}
if (!DDF::FindLabel(DF,a[2],L)) return 1;
Handle(TNaming_Naming) naming;
if (!L.FindAttribute(TNaming_Naming::GetID(),naming)) {
- di <<"DNaming_DumpSelection : not a selection" << "\n";
+ di <<"DNaming_DumpSelection : not a selection\n";
return 1;
}
TCollection_AsciiString Entry;
di << "\n";
return 0;
}
- di << "DNaming_ArgsSelection : Error" << "\n";
+ di << "DNaming_ArgsSelection : Error\n";
return 1;
}
di << "\n";
return 0;
}
- di << "DNaming_Attachment : Error" << "\n";
+ di << "DNaming_Attachment : Error\n";
return 1;
}
for(itr2.Initialize(M2);itr2.More();itr2.Next()) {
const TopoDS_Shape& s2 = itr2.Key();
if(s1.IsSame(s2))
- di << "Shapes " << arg[1]<< " and "<< arg[2]<< " have SAME subshapes" <<"\n";
+ di << "Shapes " << arg[1]<< " and "<< arg[2]<< " have SAME subshapes\n";
}
}
TR.Perform();
if(TR.IsDone()){
- di << "DNaming_CopyShape:: Copy is Done " << "\n";
+ di << "DNaming_CopyShape:: Copy is Done \n";
DNaming_DataMapIteratorOfDataMapOfShapeOfName itrn(aDMapOfShapeOfName);
for(;itrn.More();itrn.Next()) {
}
return 0;
}
- di << "DNaming_CopyShape : Error" << "\n";
+ di << "DNaming_CopyShape : Error\n";
return 1;
}
const char** arg)
{
if (nb < 2) {
- di << "Usage: CopyTool Shape1 [Shape2] ..." << "\n";
+ di << "Usage: CopyTool Shape1 [Shape2] ...\n";
return 1;
}
}
if (aShape.IsNull()) {
- di << arg[i] << " is neither a shape nor a BREP file. Skip it." << "\n";
+ di << arg[i] << " is neither a shape nor a BREP file. Skip it.\n";
continue;
}
TPrsStd_AISViewer::Update(L);
return 0;
}
- di << "DPrsStd_AISRedisplay : Error" << "\n";
+ di << "DPrsStd_AISRedisplay : Error\n";
return 1;
}
TPrsStd_AISViewer::Update(L);
return 0;
}
- di << "DPrsStd_AISErase : Error" << "\n";
+ di << "DPrsStd_AISErase : Error\n";
return 1;
}
TPrsStd_AISViewer::Update(L);
return 0;
}
- di << "DPrsStd_AISUpdate : Error" << "\n";
+ di << "DPrsStd_AISUpdate : Error\n";
return 1;
}
di<<resS;
return 0;
}
- di << "DPrsStd_AISSet : Error" << "\n";
+ di << "DPrsStd_AISSet : Error\n";
return 1;
}
}
}
}
- di << "DPrsStd_AISDriver : Error" << "\n";
+ di << "DPrsStd_AISDriver : Error\n";
return 1;
}
TPrsStd_AISViewer::Update(L);
return 0;
}
- di << "DPrsStd_AISDriver : Error" << "\n";
+ di << "DPrsStd_AISDriver : Error\n";
return 1;
}
di<<prs->Transparency();
}
else{
- di << "DPrsStd_AISTransparency: Warning : Transparency wasn't set" << "\n";
+ di << "DPrsStd_AISTransparency: Warning : Transparency wasn't set\n";
di<<(-1);
}
}
di<<prs->Color();
}
else{
- di << "DPrsStd_AISColor: Warning : Color wasn't set" << "\n";
+ di << "DPrsStd_AISColor: Warning : Color wasn't set\n";
di<<(-1);
}
return 0;
di<<prs->Material();
}
else{
- di << "DPrsStd_AISMaterial: Warning : Material wasn't set" << "\n";
+ di << "DPrsStd_AISMaterial: Warning : Material wasn't set\n";
di<<(-1);
}
}
{
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;
{
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;
{
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;
TPrsStd_AISViewer::Update(acces);
return 0;
}
- di << "DPrsStd_AISRepaint : Error" << "\n";
+ di << "DPrsStd_AISRepaint : Error\n";
return 1;
}
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]);
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]);
Draw_Spying = Standard_False;
if (n > 1) {
if (!Draw_Spyfile.open(a[1],ios::out)) {
- di << "Cannot open "<<a[1]<<" for writing"<<"\n";
+ di << "Cannot open "<<a[1]<<" for writing\n";
return 1;
}
Draw_Spying = Standard_True;
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)
{
aOutFile = a[2];
if (OSD_MAllocHook::GetCollectBySize()->MakeReport(aOutFile))
{
- di << "report " << aOutFile << " has been created" << "\n";
+ di << "report " << aOutFile << " has been created\n";
}
else
{
}
if (OSD_MAllocHook::LogFileHandler::MakeReport(aLogFile, aOutFile, includeAlive))
{
- di << "report " << aOutFile << " has been created" << "\n";
+ di << "report " << aOutFile << " has been created\n";
}
else
{
}
if(argc == 1)
{
- di << "Pick first corner"<<"\n";
+ di << "Pick first corner\n";
dout.Select(id,X1,Y1,b);
gp_Trsf T;
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);
{
Standard_Integer id1,X1,Y1,b;
dout.Flush();
- di << "Just click."<<"\n";
+ di << "Just click.\n";
dout.Select(id1,X1,Y1,b);
return 0;
}
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);
}
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);
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]));
}
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;
(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;
}
Units_UnitSentence aUnitSent(aStrTok.ToCString());
if(!aUnitSent.IsDone()) {
- di<<"can not create a sentence"<<"\n";
+ di<<"can not create a sentence\n";
return 1;
}
(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;
}
(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;
}
}
}
}
- di << "DrawDim_DISTANCE : error" << "\n";
+ di << "DrawDim_DISTANCE : error\n";
return 1;
}
}
}
}
- di << "DrawDim_PlanarAngle : error" << "\n";
+ di << "DrawDim_PlanarAngle : error\n";
return 1;
}
return 0;
}
}
- di << "DrawDim_PlanarRadius : error" << "\n";
+ di << "DrawDim_PlanarRadius : error\n";
return 1;
}
return 0;
}
}
- di << "DrawDim_CENTER : error" << "\n";
+ di << "DrawDim_CENTER : error\n";
return 1;
}
return 0;
}
}
- di << "DrawDim_SPlacement : error" << "\n";
+ di << "DrawDim_SPlacement : error\n";
return 1;
}
return 0;
}
}
- di << "DrawDim_Placement : error" << "\n";
+ di << "DrawDim_Placement : error\n";
return 1;
}
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;
}
}
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;
}
}
// ==================================================================
{
-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;
//======================================================================================
{
-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;
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";
}
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";
}
}
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));
}
else {
- di << "Curves are infinite and parallel" << "\n";
+ di << "Curves are infinite and parallel\n";
}
di << "Minimal distance : " << Ex.TotalLowerDistance() << "\n";
else {
// C-R-R
- di << "Curve, radius, radius ???"<<"\n";
+ di << "Curve, radius, radius ???\n";
return 1;
}
}
else {
// P-R-R
- di << "Point, radius, radius ???"<<"\n";
+ di << "Point, radius, radius ???\n";
return 1;
}
}
else {
// R-C-R
- di << "Radius - Curve - Radius ??"<<"\n";
+ di << "Radius - Curve - Radius ??\n";
return 1;
}
}
}
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;
}
}
}
}
else
- di << "Lin2dTanObl Not done" << "\n";
+ di << "Lin2dTanObl Not done\n";
}
else {
Geom2dGcc_Lin2d2Tan ct3(Geom2dGcc::Unqualified(C1),
}
}
else
- di << "Lin2d2Tan Not done" << "\n";
+ di << "Lin2d2Tan Not done\n";
}
DrawTrSurf_CurveColor(col);
//==================================================================================
{
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;
}
}
}
- 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;
}
ONE = 2;
}
else {
- di << "gproject wait 2 or 3 arguments" << "\n";
+ di << "gproject wait 2 or 3 arguments\n";
return 1;
}
Projector.GetSurface()->D0(P2d.X(), P2d.Y(), P);
DrawTrSurf::Set(temp, P);
DrawTrSurf::Set(temp1, P2d);
- di<<temp<<" is 3d projected curve"<<"\n";
- di<<temp1<<" is pcurve"<<"\n";
+ di<<temp<<" is 3d projected curve\n";
+ di<<temp1<<" is pcurve\n";
}
else {
Only2d = Only3d = Standard_False;
Handle(Geom_Curve) OutCur = new Geom_TrimmedCurve(GeomAdaptor::MakeCurve(hcur->Curve()), Ufin, Udeb);
DrawTrSurf::Set(temp, OutCur);
DrawTrSurf::Set(temp1, PCur2d);
- di<<temp<<" is 3d projected curve"<<"\n";
- di<<temp1<<" is pcurve"<<"\n";
+ di<<temp<<" is 3d projected curve\n";
+ di<<temp1<<" is pcurve\n";
return 0;
}
else {
DrawTrSurf::Set(temp, appr.Curve3d());
}
DrawTrSurf::Set(temp1, PCur2d);
- di<<temp<<" is 3d projected curve"<<"\n";
- di<<temp1<<" is pcurve"<<"\n";
+ di<<temp<<" is 3d projected curve\n";
+ di<<temp1<<" is pcurve\n";
}
}
}
{
if ( n == 1) {
- di << "project result2d c3d surf [-e p] [-v n] [-t tol]" << "\n";
- di << " -e p : extent the surface of <p>%" << "\n";
- di << " -v n : verify the projection at <n> 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 <p>%\n";
+ di << " -v n : verify the projection at <n> points.\n";
+ di << " -t tol : set the tolerance for approximation\n";
return 0;
}
GeomProjLib::Curve2d(GC, GS, U1, U2, V1, V2, tolerance);
if ( G2d.IsNull() ) {
- di << "\n" << "Projection Failed" << "\n";
+ di << "\nProjection Failed\n";
return 1;
}
else {
}
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;
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;
}
}
}
else {
- di << " Bisec has failed !!" << "\n";
+ di << " Bisec has failed !!\n";
return 1;
}
}
}
}
else {
- di << " Bisec has failed !!" << "\n";
+ di << " Bisec has failed !!\n";
return 1;
}
}
}
}
else {
- di << " Bisec has failed !!" << "\n";
+ di << " Bisec has failed !!\n";
return 1;
}
}
}
}
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;
}
}
}
}
else {
- di << " Bisec has failed !!" << "\n";
+ di << " Bisec has failed !!\n";
return 1;
}
}
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) {
}
}
else {
- di << " Bisec has failed !!" << "\n";
+ di << " Bisec has failed !!\n";
return 1;
}
}
solution(Bis.ThisSolution(),a[1],0);
}
else {
- di << " Bisec has failed !!" << "\n";
+ di << " Bisec has failed !!\n";
return 1;
}
}
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;
Draw::Repaint();
}
else {
- di << "Not enought degree of freedom increase degree please" << "\n";
+ di << "Not enought degree of freedom increase degree please\n";
}
GCPnts_QuasiUniformDeflection PntGen(GAC, defl);
if(!PntGen.IsDone()) {
- di << "Points generation failed" << "\n";
+ di << "Points generation failed\n";
return 1;
}
ellip = DrawTrSurf::GetBSplineCurve(a[1]);
if (ellip.IsNull())
{
- di << " BSpline is NULL "<<"\n";
+ di << " BSpline is NULL \n";
return 1;
}*/
ellip = DrawTrSurf::GetCurve(a[1]);
if (ellip.IsNull())
{
- di << " Curve is NULL "<<"\n";
+ di << " Curve is NULL \n";
return 1;
}
catch (Standard_Failure )
{
- di << " Standard Failure " <<"\n";
+ di << " Standard Failure \n";
}
return 0;
}
catch(Standard_Failure)
{
- di << " Standard Failure "<<"\n";
+ di << " Standard Failure \n";
}
try
catch (Standard_Failure )
{
- di << " Standard Failure " <<"\n";
+ di << " Standard Failure \n";
}
return 0;
}
}//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;
}
//
if (!Inters.IsDone())
{
- di<<"No intersections found!"<<"\n";
+ di<<"No intersections found!\n";
return 1;
}
// 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
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);
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);
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;
}
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;
//
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;
}
//
aPPS.Init(aP, aS, aTol);
bRet=aPPS.IsDone();
if (!bRet) {
- di << "Error: GeomAPI_ProjectPointOnSurf failed" << "\n";
+ di << "Error: GeomAPI_ProjectPointOnSurf failed\n";
return 0;
}
//
{
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;
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);
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);
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) {
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);
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) {
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);
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() );
Varia.Approximate();
if (! Varia.IsDone()) {
- di << " No result" << "\n";
+ di << " No result\n";
}
AppParCurves_MultiBSpCurve AnMuC = Varia.Value();
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() );
Varia.SetTolerance(Abs(Tolerance));
Varia.Approximate();
if (! Varia.IsDone()) {
- di << " No result" << "\n";
+ di << " No result\n";
}
AppParCurves_MultiBSpCurve AnMuC = Varia.Value();
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;
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;
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();
}
}
else
- di <<"Tangent undefined."<<"\n";
+ di <<"Tangent undefined.\n";
}
else {
Geom2dLProp_CLProps2d Prop (C2d,2,Precision::Confusion());
}
}
else
- di <<"Tangent undefined."<<"\n";
+ di <<"Tangent undefined.\n";
}
return 0;
}
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 ;
}
return 0;
}
- di << "Approximation failed !" << "\n";
+ di << "Approximation failed !\n";
return 1;
}
Standard_Real l = ACurve->LastParameter();
if ( Precision::IsInfinite(f) || Precision::IsInfinite(l)) {
- di << " Error: Infinite curves" << "\n";
+ di << " Error: Infinite curves\n";
return 1;
}
Standard_Real l = ACurve->LastParameter();
if ( Precision::IsInfinite(f) || Precision::IsInfinite(l)) {
- di << " Error: Infinite curves" << "\n";
+ di << " Error: Infinite curves\n";
return 1;
}
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;
}
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();
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 {
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);
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);
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 ;
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 ;
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 ;
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 ;
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++;
GeomConvert_CompBezierSurfacesToBSplineSurface Conv(BZ, Tol);
if (! Conv.IsDone()) {
- di << "Convert Not Done" << "\n";
+ di << "Convert Not Done\n";
return 1;
}
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());
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);
}
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);
{
// 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);
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;
}
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);
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;
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());
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());
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);
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;
}
}
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;
}
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);
{
hider->Debug(!hider->Debug());
if (hider->Debug())
- di << "debug" << "\n";
+ di << "debug\n";
else
- di << "no debug" << "\n";
+ di << "no debug\n";
return 0;
}
}
// if (ItemIdent(sel) == 0)
if (sel.IsNull())
- { cout << " Selection : "<<" Unknown"<<endl; return res; } //cout<<Handle
+ { cout << " Selection : Unknown"<<endl; return res; } //cout<<Handle
return EvalSelection (sel).Content();
}
{
Handle(Message_Messenger) sout = Message::DefaultMessenger();
if (ItemIdent(sel) == 0) {
- sout << "Selection : "<<" Unknown"<<endl; //sout<<Handle
+ sout << "Selection : Unknown"<<endl; //sout<<Handle
return;
}
sout << " ********** Selection";
S << " ******** Loaded File : "<<theloaded.ToCString()<<Interface_MSG::Blanks(32-theloaded.Length())<<" ********"<<endl;
else S << " ******** No name for Loaded File"<<endl;
if (level == 0) {
- S<<" ******** Short Dump of Header ********"<<"\n";
+ S<<" ******** Short Dump of Header ********\n";
S << " *****************************************************************\n\n";
themodel->DumpHeader(S); S<<endl;
}
if (!shar.IsShared(themodel->Value(i))) nbr ++;
}
S << " *****************************************************************\n";
- S << " ******** Model : "<<nbent<<" Entities, of which "<<nbr<<" Root(s)"<<"\n";
+ S << " ******** Model : "<<nbent<<" Entities, of which "<<nbr<<" Root(s)\n";
S << " *****************************************************************\n"<<endl;
if (level <= 0) return;
if (!IsLoaded())
{ sout<< " *** Data for Evaluation not available ***"<<endl; return; }
if (ItemIdent(sel) == 0)
- { sout << " Selection : "<<" Unknown"<<endl; return; } //sout<<Handle
+ { sout << " Selection : Unknown"<<endl; return; } //sout<<Handle
Interface_EntityIterator iter = EvalSelection (sel);
ListEntities (iter,1);
sout << "**** (Unique) RootResult, Selection : "
if (!IsLoaded())
{ sout<< " *** Data for List not available ***"<<endl; return; }
if (theshareout->NbDispatches() < numdisp || numdisp <= 0)
- { sout<<"Dispatch : "<<" Unknown"<<endl; return; } //sout<<Handle
+ { sout<<"Dispatch : Unknown"<<endl; return; } //sout<<Handle
if (disp->FinalSelection().IsNull())
- { sout<<"Dispatch "<<" : No Final Selection"<<endl; return; }//sout<<Handle
+ { sout<<"Dispatch : No Final Selection"<<endl; return; }//sout<<Handle
sout<<" --- Dispatch Label : "<<disp->Label()<<endl;
IFSelect_ShareOutResult eval(disp,thegraph->Graph());
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;
}
S<<" ) ****"<<endl;
// **** Entity 1234:D2467 ** Type:102 Form:56 ** CompositeCurve **
- S<<"\n"<<"**** Entity "; PrintShort (ent,S); S<<endl;
+ S<<"\n**** Entity "; PrintShort (ent,S); S<<endl;
- S<<" Directory Part"<<"\n";
+ S<<" Directory Part\n";
// ** Status : Blank:1 Subordinate:2 UseFlag:3 Hierarchy:4
if (own >= 2)
S <<"** Status Number : Blank:"<<ent->BlankStatus()
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:"<<ent->RankLineFont()<<"\n"; }
else if (ent->DefLineFont() == IGESData_DefReference)
S<<endl;
if (own > 3) {
- S<<"**** Own Data ****"<<"\n\n";
+ S<<"**** Own Data ****\n\n";
OwnDump(ent,S,own);
}
}
Standard_Integer nb = iter.NbEntities();
Standard_Boolean iasuit = (nb > 0);
if (nb > 0) {
- S<<"\n"<<"**** Properties (nb:"<<nb<<") ****"<<"\n";
+ S<<"\n**** Properties (nb:"<<nb<<") ****\n";
for (;iter.More(); iter.Next()) {
DeclareAndCast(IGESData_IGESEntity,ent2,iter.Value());
Dump (ent2,S,att,-1);
nb = iter.NbEntities();
if (nb > 0) iasuit = Standard_True;
if (nb > 0) {
- S<<"\n"<<"**** Associativities (nb:"<<nb<<") ****"<<"\n";
+ S<<"\n**** Associativities (nb:"<<nb<<") ****\n";
for (;iter.More(); iter.Next()) {
DeclareAndCast(IGESData_IGESEntity,ent2,iter.Value());
Dump(ent2,S,att,-1);
}
}
if (iasuit) { if (att <= 1) S << "\n"; }
- S<<"\n"<<"**** End of Dump ****"<<"\n"<<endl;
+ S<<"\n**** End of Dump ****\n"<<endl;
}
Standard_Integer ns = thestart->Length();
S<<"**** Dump of IGES Model , Start and Global Sections ****"<<endl;
if (ns > 0) {
- S << "**** Start Section : "<<ns<<" Line(s) ****"<<"\n";
+ S << "**** Start Section : "<<ns<<" Line(s) ****\n";
for (Standard_Integer i = 1; i <= ns; i ++)
S<<"["<<(i<10 ? " ": "")<<i<<"]:"<<thestart->Value(i)->ToCString()<<endl;
}
- S << "\n"<<"**** Global Section ****"<<"\n";
+ S << "\n**** Global Section ****\n";
char sep = theheader.Separator();
if (sep == ',') S << "[ 1] Default Separator : " << sep;
else S << "[ 1] Non Default Separator : " << sep;
S << "[19] Resolution : " << theheader.Resolution()<<"\n";
if (theheader.HasMaxCoord())
S<<"[20] Maximum Coord : " << theheader.MaxCoord() << "\n\n";
- else S<<"[20] Maximum Coord not defined"<<"\n\n";
+ else S<<"[20] Maximum Coord not defined\n\n";
str = theheader.AuthorName();
if (!str.IsNull()) S<<"[21] Author : "<<str->ToCString()<<"\n";
<< 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<<endl;
{
case 4:
S << "Types : " << endl;
- S << "Values : " << "Count = " << ent->NbTypeValuePairs() << endl;
+ S << "Values : Count = " << ent->NbTypeValuePairs() << endl;
S << " [ as level > 4 for content ]" << endl;
break;
case 5:
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;
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 <<endl<< "The V Break Points : ";
#if 0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-#define Debug(q) cout<<"IntRes2d_Intersection"<<"q ="<<q<<endl;
+#define Debug(q) cout<<"IntRes2d_Intersectionq ="<<q<<endl;
char *DebugPos(const IntRes2d_Position P);
//if (nbarg > 4) NbIterations = Draw::Atoi(argv[4]);
//MESH.NbIterations() = NbIterations;
- di<<"Starting FastDiscret with :"<<"\n";
+ di<<"Starting FastDiscret with :\n";
di<<" Deflection="<<d<<"\n";
di<<" Angle="<<0.5<<"\n";
DBRep::Set(name,aCompViolating);
}
- di<<"FastDiscret completed with :"<<"\n";
+ di<<"FastDiscret completed with :\n";
di<<" MaxDeflection="<<maxdef<<"\n";
di<<" NbNodes="<<nbnodes<<"\n";
di<<" NbTriangles="<<nbtriangles<<"\n";
Standard_Real aDeflection = Draw::Atof(argv[3]);
if (aDeflection <= 0.)
{
- di << " Incorrect value of deflection!" << "\n";
+ di << " Incorrect value of deflection!\n";
return 1;
}
Standard_Integer nbn, nbl, nbe;
MeshStats(aShape, nbe, nbl, nbn);
- di<<"(Resultat ("<<nbe<<" mailles) ("<<nbl<<" aretes) ("<<nbn<<" sommets))"<<"\n";
+ di<<"(Resultat ("<<nbe<<" mailles) ("<<nbl<<" aretes) ("<<nbn<<" sommets))\n";
// passe de verification du maillage.
/*Standard_Integer nbc;
}
di<<"\n";
- di<<"This shape contains " <<nbtriangles<<" triangles."<<"\n";
- di<<" " <<nbnodes <<" nodes."<<"\n";
+ di<<"This shape contains " <<nbtriangles<<" triangles.\n";
+ di<<" " <<nbnodes <<" nodes.\n";
di<<"Maximal deflection " <<MaxDeflection<<"\n";
di<<"\n";
#ifdef OCCT_DEBUG_MESH_CHRONO
chPointValid.Show(pointvalid); chIsos.Show(isos); chPointsOnIsos.Show(pointsisos);
if (tot > 0.00001) {
- di <<"temps total de maillage: "<<tot <<" seconds"<< "\n";
- di <<"dont: "<< "\n";
- di <<"discretisation des edges: "<<edges <<" seconds---> "<< 100*edges/tot <<" %"<<"\n";
- di <<"maillage des edges: "<<mailledges <<" seconds---> "<< 100*mailledges/tot <<" %"<<"\n";
- di <<"controle et points internes: "<<etuinter <<" seconds---> "<< 100*etuinter/tot <<" %"<<"\n";
- di <<"derniers controles: "<<lastcontrol<<" seconds---> "<< 100*lastcontrol/tot<<" %"<<"\n";
- di <<"stockage dans la S.D. "<<stock <<" seconds---> "<< 100*stock/tot <<" %"<<"\n";
+ di <<"temps total de maillage: "<<tot <<" seconds\n";
+ di <<"dont: \n";
+ di <<"discretisation des edges: "<<edges <<" seconds---> "<< 100*edges/tot <<" %\n";
+ di <<"maillage des edges: "<<mailledges <<" seconds---> "<< 100*mailledges/tot <<" %\n";
+ di <<"controle et points internes: "<<etuinter <<" seconds---> "<< 100*etuinter/tot <<" %\n";
+ di <<"derniers controles: "<<lastcontrol<<" seconds---> "<< 100*lastcontrol/tot<<" %\n";
+ di <<"stockage dans la S.D. "<<stock <<" seconds---> "<< 100*stock/tot <<" %\n";
di << "\n";
- di <<"et plus precisement: "<<"\n";
- di <<"Add 11ere partie : "<<add11 <<" seconds---> "<<100*add11/tot <<" %"<<"\n";
- di <<"Add 12ere partie : "<<add12 <<" seconds---> "<<100*add12/tot <<" %"<<"\n";
- di <<"Add 2eme partie : "<<add2 <<" seconds---> "<<100*add2/tot <<" %"<<"\n";
- di <<"Update : "<<upda <<" seconds---> "<<100*upda/tot <<" %"<<"\n";
- di <<"AddPoint : "<<addp <<" seconds---> "<<100*addp/tot <<" %"<<"\n";
- di <<"UniformDeflection "<<unif <<" seconds---> "<<100*unif/tot <<" %"<<"\n";
- di <<"Controle : "<<contr <<" seconds---> "<<100*contr/tot <<" %"<<"\n";
- di <<"Points Internes: "<<inter <<" seconds---> "<<100*inter/tot <<" %"<<"\n";
- di <<"calcul des isos et du, dv: "<<isos <<" seconds---> "<<100*isos/tot <<" %"<<"\n";
- di <<"calcul des points sur isos: "<<pointsisos<<" seconds---> "<<100*pointsisos/tot <<" %"<<"\n";
- di <<"IsPointValid: "<<pointvalid<<" seconds---> "<<100*pointvalid/tot <<" %"<<"\n";
+ di <<"et plus precisement: \n";
+ di <<"Add 11ere partie : "<<add11 <<" seconds---> "<<100*add11/tot <<" %\n";
+ di <<"Add 12ere partie : "<<add12 <<" seconds---> "<<100*add12/tot <<" %\n";
+ di <<"Add 2eme partie : "<<add2 <<" seconds---> "<<100*add2/tot <<" %\n";
+ di <<"Update : "<<upda <<" seconds---> "<<100*upda/tot <<" %\n";
+ di <<"AddPoint : "<<addp <<" seconds---> "<<100*addp/tot <<" %\n";
+ di <<"UniformDeflection "<<unif <<" seconds---> "<<100*unif/tot <<" %\n";
+ di <<"Controle : "<<contr <<" seconds---> "<<100*contr/tot <<" %\n";
+ di <<"Points Internes: "<<inter <<" seconds---> "<<100*inter/tot <<" %\n";
+ di <<"calcul des isos et du, dv: "<<isos <<" seconds---> "<<100*isos/tot <<" %\n";
+ di <<"calcul des points sur isos: "<<pointsisos<<" seconds---> "<<100*pointsisos/tot <<" %\n";
+ di <<"IsPointValid: "<<pointvalid<<" seconds---> "<<100*pointvalid/tot <<" %\n";
di << "\n";
deflemin = Min(deflemin, defle);
if (defle > defstock) {
- di <<"face "<< nbface <<" deflection = " << defle <<" pour "<<defstock <<" stockee."<<"\n";
+ di <<"face "<< nbface <<" deflection = " << defle <<" pour "<<defstock <<" stockee.\n";
}
}
}
di<< VB(i, j) << ", ";
}
}
- di << "\n" << "\n";
+ di << "\n\n";
}
}
return 0;
TopLoc_Location aLoc;
Handle(Poly_Triangulation) aT = BRep_Tool::Triangulation(aFace, aLoc);
if (aT.IsNull()) {
- di << "face " <<iF <<" has no triangulation" << "\n";
+ di << "face " <<iF <<" has no triangulation\n";
continue;
}
// dump info on cross face errors
Standard_Integer nbErr = aCheck.NbCrossFaceErrors();
if (nbErr > 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;
// 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 << " ";
// 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);
//! 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
{
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;
}
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;
}
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;
}
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;
}
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;
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();
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;
}
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;
}
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;
}
}
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;
}
}
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;
}
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;
{
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;
}
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()) {
{
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;
}
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;
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;
}
aTBox = aBuilder2.NamedShape()->Get();
if(aTBox.Orientation() != TopAbs_REVERSED) {
- di << "1" << "\n";
+ di << "1\n";
} else {
- di << "0" << "\n";
+ di << "0\n";
}
return 0;
}
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;
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
}
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);
}
//Give the mass claculation of the shpae "fuse321"
GProp_GProps G;
BRepGProp::VolumeProperties(fuse321, G);
- di<<" "<<"\n";
- di<<"Mass: "<<G.Mass()<<"\n"<<"\n";
+ di<<" \n";
+ di<<"Mass: "<<G.Mass()<<"\n\n";
- di << "Trianglating Faces ....." <<"\n";
+ di << "Trianglating Faces .....\n";
TopExp_Explorer ExpFace;
for (ExpFace.Init (fuse321,TopAbs_FACE); ExpFace.More(); ExpFace.Next())
Handle(Poly_Triangulation) facing = BRep_Tool::Triangulation(TopologicalFace, loc);
if (facing.IsNull())
{
- di << "Triangulation FAILED for this face" << "\n";
+ di << "Triangulation FAILED for this face\n";
continue;
}
di << "No of Triangles = " << facing->NbTriangles() << "\n";
}
- di<<"Triangulation of all Faces Completed. "<< "\n" << "\n";
+ di<<"Triangulation of all Faces Completed. \n\n";
TopTools_IndexedDataMapOfShapeListOfShape edgemap;
TopExp::MapShapesAndAncestors(fuse321, TopAbs_EDGE, TopAbs_SOLID, edgemap);
di << "No. of Edges: " << edgemap.Extent() << "\n";
ChFi3d_FilletShape FShape = ChFi3d_Rational;
BRepFilletAPI_MakeFillet blend(fuse321,FShape);
- di << "Adding Edges ..... " << "\n";
+ di << "Adding Edges ..... \n";
for(int i = 1; i <= edgemap.Extent(); i++)
{
// cout << "Adding Edge : " << i << endl;
TopoDS_Edge edg = TopoDS::Edge( edgemap.FindKey(i) );
if(!edg.IsNull()) blend.Add(1, edg);
}
- di << "All Edges added ! Now Building the Blend ... " << "\n";
- di<<" "<<"\n";
+ di << "All Edges added ! Now Building the Blend ... \n";
+ di<<" \n";
blend.Build();
//DBRep::Set ( argv[1], fuse321 );
//=======================================================================
static Standard_Integer OCC712 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
if (argc != 3) {
- di << "Usage : " << argv[0] << " draftAngle slabThick" << "\n";
+ di << "Usage : " << argv[0] << " draftAngle slabThick\n";
return 1;
}
//NOTE: Case:1 - draftAngle = 15, slabThick = 30 --> Fails
if (!MW.IsDone())
{
- di << "my Wire not done" << "\n";
+ di << "my Wire not done\n";
return 1;
}
TopoDS_Wire W = MW.Wire();
TopoDS_Face F = BRepBuilderAPI_MakeFace(W);
if ( F.IsNull())
{
- di << " Error in Face creation " << "\n";
+ di << " Error in Face creation \n";
return 1;
}
BRepPrimAPI_MakePrism slab(F, slabVect, Standard_True);
if ( ! slab.IsDone() )
{
- di << " Error in Slab creation " << "\n";
+ di << " Error in Slab creation \n";
return 1;
}
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();
}
catch ( Standard_Failure ) //--------------------> STEP:2
{
- di << " Error in Draft Slab " << "\n";
+ di << " Error in Draft Slab \n";
return 1;
}
return 0;
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;
}
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;
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
}
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;
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;
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
}
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);
}
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;
}
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;
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
}
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;
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;
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
}
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;
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;
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
}
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 = "<<G.Mass()<< "\n" << "\n";
+ di<<"CUT 1 Mass = "<<G.Mass()<< "\n\n";
BRepGProp::VolumeProperties(cut2, G);
- di<<"CUT 2 Mass = "<<G.Mass()<< "\n" << "\n";
+ di<<"CUT 2 Mass = "<<G.Mass()<< "\n\n";
- di << "Trianglating Faces of CUT 1 ....." << "\n";
+ di << "Trianglating Faces of CUT 1 .....\n";
performTriangulation(cut1, di);
- di << "Trianglating Faces of CUT 2 ....." << "\n";
+ di << "Trianglating Faces of CUT 2 .....\n";
performTriangulation(cut2, di);
}
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;
}
- di<<"*************************************************************"<< "\n";
- di<<" CUT 1 and CUT 2 gives entirely different results during"<< "\n";
- di<<" mass computation and face triangulation, eventhough the"<< "\n";
- di<<" two spheres are located more or less at the same position."<< "\n";
- di<<"*************************************************************"<< "\n";
+ di<<"*************************************************************\n";
+ di<<" CUT 1 and CUT 2 gives entirely different results during\n";
+ di<<" mass computation and face triangulation, eventhough the\n";
+ di<<" two spheres are located more or less at the same position.\n";
+ di<<"*************************************************************\n";
return 0;
}
static Standard_Integer OCC826 (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;
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
}
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;
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;
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
}
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;
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;
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;
if (!MW.IsDone())
{
- di << "my Wire not done" << "\n";
+ di << "my Wire not done\n";
return 1;
}
TopoDS_Face F = BRepBuilderAPI_MakeFace(W);
if ( F.IsNull())
{
- di << " Error in Face creation " << "\n";
+ di << " Error in Face creation \n";
return 1;
}
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());
}
catch ( Standard_Failure )
{
- di << " Error in Draft Slab " << "\n";
+ di << " Error in Draft Slab \n";
return 1;
}
return 0;
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;
}
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);
//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()) {
{
if (n > 2)
{
- di <<"Usage : " << a[0] << " [file]"<<"\n";
+ di <<"Usage : " << a[0] << " [file]\n";
return 1;
}
di.Eval ("axo");
{
if (argc != 2)
{
- di <<"Usage : " << argv[0] << " file"<<"\n";
+ di <<"Usage : " << argv[0] << " file\n";
return 1;
}
Standard_CString file = argv[1];
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;
}
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:
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;
}
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:
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;
}
// 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;
//#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 );
}
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();
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 = "<<aTol<<"\n";
di<<"on segment length = "<<aDistDomain<<"\n";
}
} else {
- di<<"3"<<"\n";
- di<<"Edges is not overlaped"<<"\n";
+ di<<"3\n";
+ di<<"Edges is not overlaped\n";
}
return 0;
}
di << "Reversed Wire " << i << ": point ( " << p2d.X() << ", " << p2d.Y() << " ) is " << TmpString.ToCString() << "\n";
// 4.3. Compare results (they must be same)
- if(stat1 ==stat2) di << "OCC377 OK" << "\n";
- else {di << "OCC377 FAULTY" << "\n"; return 0;}
+ if(stat1 ==stat2) di << "OCC377 OK\n";
+ else {di << "OCC377 FAULTY\n"; return 0;}
}
}
catch(Standard_Failure)
// return 1;
//}
if(argc < 4 || argc > 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;
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;
}
}
//#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);
}
//#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);
}
{
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;
}
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();
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;
}
{
if (argc != 2)
{
- di <<"Usage : " << argv[0] << " face"<<"\n";
+ di <<"Usage : " << argv[0] << " face\n";
return 1;
}
Standard_Real u1, u2, v1, v2;
{
if (argc != 2)
{
- di <<"Usage : " << argv[0] << " expression"<<"\n";
+ di <<"Usage : " << argv[0] << " expression\n";
return 1;
}
return 0;
}
}
- di << arg[0] << " : Error" << "\n";
+ di << arg[0] << " : Error\n";
return 1;
}
return 0;
}
}
- di << arg[0] << " : Error" << "\n";
+ di << arg[0] << " : Error\n";
return 1;
}
return 0;
}
}
- di << arg[0] << " : Error" << "\n";
+ di << arg[0] << " : Error\n";
return 1;
}
return 0;
}
}
- di << arg[0] << " : Error" << "\n";
+ di << arg[0] << " : Error\n";
return 1;
}
return 0;
}
}
- di << arg[0] << " : Error" << "\n";
+ di << arg[0] << " : Error\n";
return 1;
}
return 0;
}
}
- di << arg[0] << " : Error" << "\n";
+ di << arg[0] << " : Error\n";
return 1;
}
// 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;
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;
}
}
// 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 {
// 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 ());
}
}
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;
}
{
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];
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));
int res;
if (!aUni.IsDone())
{
- di << argv[0] <<" : fail"<<"\n";
+ di << argv[0] <<" : fail\n";
res = 1;
}
else
{
if (argc != 3)
{
- di << "Usage : " << argv[0] << " nb_of_vectors size" << "\n";
+ di << "Usage : " << argv[0] << " nb_of_vectors size\n";
return 1;
}
Standard_Real val = 10;
math_Vector **pv = new math_Vector *[nb];
- di<<"creating "<<nb<<" vectors "<<sz<<" elements each..."<<"\n";
+ di<<"creating "<<nb<<" vectors "<<sz<<" elements each...\n";
Standard_Integer i;
for (i=0; i < nb; i++) {
pv[i] = new math_Vector (1, sz, val);
di<<"\n";
}
}
- di<<" done"<<"\n";
- di<<"deleting them ..."<<"\n";
+ di<<" done\n";
+ di<<"deleting them ...\n";
for (i=0; i < nb; i++) {
delete pv[i];
if ((i % (nb/10)) == 0) {
di<<"\n";
}
}
- di<<" done"<<"\n";
+ di<<" done\n";
delete [] pv;
{
if (argc != 2)
{
- di << "Usage : " << argv[0] << " wire" << "\n";
+ di << "Usage : " << argv[0] << " wire\n";
return 1;
}
TopoDS_Shape shape = DBRep::Get(argv[1],TopAbs_WIRE);
if (error_dist > Precision::Confusion()) {
//cout.precision(3);
di<<"error_dist = "<<error_dist<<
- " ( "<<error_dist/need_length*100<<" %)"<<"\n";
+ " ( "<<error_dist/need_length*100<<" %)\n";
return 0;
}
- di<<"OK"<<"\n";
+ di<<"OK\n";
return 0;
}
di << "\n";
Standard_Integer res, a =4, b = 0 ;
res = a / b;
- di << " 4 / 0 = " << res << " Does not Caught... KO"<< "\n";
+ di << " 4 / 0 = " << res << " Does not Caught... KO\n";
Succes = Standard_False;
}
#if defined(SOLARIS) || defined(_WIN32)
catch(Standard_NumericError)
#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;
}
#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
}
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;
}
}
res = i + 1;
//++++ cout << " -- "<<res<<"="<<i<<"+1 Does not Caught... KO"<< endl;
//++++ Succes = Standard_False;
- di << " "<<res<<"="<<i<<"+1 Does not Caught... (But) Ok"<< "\n";
+ di << " "<<res<<"="<<i<<"+1 Does not Caught... (But) Ok\n";
}
catch(Standard_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;
}
}
(void)sin(1.); //this function tests FPU flags and raises signal (tested on LINUX).
- di << "-- "<<res<<"="<<r<<"*"<<r<<" Does not Caught... OK"<< "\n";
+ di << "-- "<<res<<"="<<r<<"*"<<r<<" Does not Caught... OK\n";
}
catch(Standard_Overflow) // 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;
}
}
//res = res + 1.;
//++++ cout<<"-- "<<res<<"="<<r<<"*"<<r<<" Does not Caught... KO"<<endl;
//++++ Succes = Standard_False;
- di<<" -- "<<res<<"="<<r<<"*"<<r<<" Does not Caught... (But) Ok"<<"\n";
+ di<<" -- "<<res<<"="<<r<<"*"<<r<<" Does not Caught... (But) Ok\n";
}
catch(Standard_Underflow) // could be on Solaris, Windows w/o SSE2
{
- di << " KO" << "\n";
+ di << " KO\n";
Succes = Standard_False;
}
catch(Standard_NumericError) // could be on 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;
}
}
di << "\n";
Standard_Real res, r=-1;
res = sqrt(r);
- di<<" "<<res<<"=sqrt("<<r<<") Does not Caught... OK"<<"\n";
+ di<<" "<<res<<"=sqrt("<<r<<") Does not Caught... OK\n";
}
catch(Standard_NumericError) {
- 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;
}
}
di << "\n";
int* pint=NULL;
*pint = 4;
- di << " Does not Caught... KO"<<"\n";
+ di << " Does not Caught... KO\n";
Succes = Standard_False;
}
#ifdef _WIN32
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;
}
}
//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;
if (argc > 3)
{
- di << "Usage : " << argv[0] << " [nCount] path" << "\n";
+ di << "Usage : " << argv[0] << " [nCount] path\n";
return 1;
}
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 {
}
}
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;
}
{
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));
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" ;
}
}
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;
{
if (argc != 3)
{
- di << "Usage : " << argv[0] << " lower upper" << "\n";
+ di << "Usage : " << argv[0] << " lower upper\n";
return 1;
}
if (argc < 3 || IsEvenArgc)
{
- di << "Usage : " << argv[0] << " index1 value1 ... [indexN valueN]" << "\n";
+ di << "Usage : " << argv[0] << " index1 value1 ... [indexN valueN]\n";
return 1;
}
{
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 (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;
progress->Show();
if (readstat != IFSelect_RetDone) {
- if (modfic) di<<"Could not read file "<<fnom.ToCString()<<" , abandon"<<"\n";
- else di<<"No model loaded"<<"\n";
+ if (modfic) di<<"Could not read file "<<fnom.ToCString()<<" , abandon\n";
+ else di<<"No model loaded\n";
return 1;
}
// Choice of treatment
}
if (modepri == 0) { //fin
- di << "Bye and good luck! " << "\n";
+ di << "Bye and good luck! \n";
break;
}
else if (modepri <= 2) { // 1 : Visible Roots, 2 : All Roots
- di << "All Geometry Transfer"<<"\n";
- di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)"<<"\n";
- di<<" To modify : command param read.iges.bspline.continuity"<<"\n";
+ di << "All Geometry Transfer\n";
+ di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)\n";
+ di<<" To modify : command param read.iges.bspline.continuity\n";
Handle(XSControl_WorkSession) thesession = Reader.WS();
thesession->ClearContext();
XSDRAW::SetTransferProcess (thesession->MapReader());
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";
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);
}
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";
catch(Standard_Failure) {
di << "** Exception : ";
di << Standard_Failure::Caught()->GetMessageString();
- di<<" ** Skip"<<"\n";
+ di<<" ** Skip\n";
}
}
}
cout << " give the number of the Entity : " << flush;
nent = XSDRAW::GetEntityNumber();
- if (!Reader.TransferOne (nent)) di<<"Transfer entity n0 "<<nent<<" : no result"<<"\n";
+ if (!Reader.TransferOne (nent)) di<<"Transfer entity n0 "<<nent<<" : no result\n";
else {
nbs = Reader.NbShapes();
char shname[30]; Sprintf (shname,"%s_%d",rnom.ToCString(),nent);
di<<"Transfer entity n0 "<<nent<<" OK -> DRAW Shape: "<<shname<<"\n";
- di<<"Now, "<<nbs<<" Shapes produced"<<"\n";
+ di<<"Now, "<<nbs<<" Shapes produced\n";
TopoDS_Shape sh = Reader.Shape(nbs);
DBRep::Set (shname,sh);
}
// *r donne xst-model-roots (TOUTES racines)
if( fromtcl && argv[3][0]=='*' && argv[3][1]=='\0' ) {
- di << "All Geometry Transfer"<<"\n";
- di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)"<<"\n";
- di<<" To modify : command param read.iges.bspline.continuity"<<"\n";
+ di << "All Geometry Transfer\n";
+ di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)\n";
+ di<<" To modify : command param read.iges.bspline.continuity\n";
Handle(XSControl_WorkSession) thesession = Reader.WS();
thesession->ClearContext();
XSDRAW::SetTransferProcess (thesession->MapReader());
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);
}
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;
}
}
nent = Reader.Model()->Number(list->Value(ill));
if (nent == 0) continue;
- if (!Reader.TransferOne(nent)) di<<"Transfer entity n0 "<<nent<<" : no result"<<"\n";
+ if (!Reader.TransferOne(nent)) di<<"Transfer entity n0 "<<nent<<" : no result\n";
else {
nbs = Reader.NbShapes();
char shname[30]; Sprintf (shname,"%s_%d",rnom.ToCString(),nbs);
di<<"Transfer entity n0 "<<nent<<" OK -> DRAW Shape: "<<shname<<"\n";
- di<<"Now, "<<nbs<<" Shapes produced"<<"\n";
+ di<<"Now, "<<nbs<<" Shapes produced\n";
TopoDS_Shape sh = Reader.Shape(nbs);
DBRep::Set (shname,sh);
nbt++;
{
if(argc!=2)
{
- di << "Usage : " << argv[0] << " MaxNbr" << "\n";
+ di << "Usage : " << argv[0] << " MaxNbr\n";
return -1;
}
Standard_Integer aMaxNbr = Draw::Atoi(argv[1]);
{
if (argc!=7)
{
- di << "Wrong number of arguments" << "\n";
+ di << "Wrong number of arguments\n";
return -1;
}
Standard_Real X1_Pnt = Draw::Atof(argv[1]);
{
if(argc!=9)
{
- di << "Usage : " << argv[0] << " shape X_Pnt Y_Pnt Z_Pnt X_Dir Y_Dir Z_Dir PInf" << "\n";
+ di << "Usage : " << argv[0] << " shape X_Pnt Y_Pnt Z_Pnt X_Dir Y_Dir Z_Dir PInf\n";
return -1;
}
for (Standard_Integer i = 0; i < 2; i++)
aPartMask.Add(i);
- di << "aFullMask = 1111" << "\n";
- di << "aPartMask = 1100" << "\n";
+ di << "aFullMask = 1111\n";
+ di << "aPartMask = 1100\n";
Standard_Boolean isAffected;
// Check the command arguments
if (argc != 2)
{
- di <<"Error: "<<argv[0]<<" - invalid number of arguments"<< "\n";
+ di <<"Error: "<<argv[0]<<" - invalid number of arguments\n";
di << "Usage : " << argv[0] << " mode(0/1)\n";
return 1; //TCL_ERROR
}
Handle(AIS_InteractiveContext) aisContext = ViewerTest::GetAISContext();
if (aisContext.IsNull())
{
- di <<"Error: call 'vinit' first"<< "\n";
+ di <<"Error: call 'vinit' first\n";
return 1; //TCL_ERROR
}
{
if (argc < 2 || argc > 5)
{
- di << "Usage : " << argv[0] << " result [angle [reverse [order]]]" << "\n";
+ di << "Usage : " << argv[0] << " result [angle [reverse [order]]]\n";
return 1;
}
//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;
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();
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;
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
}
// 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)));
// 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;
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)
//////#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());
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()));
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;
////////// 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;
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
}
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;
}
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;
}
}
}
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);
Xmax += delt;
Ymax += delt;
Zmax += delt;
- di<<"Info: Bounds\n ("<<Xmin<<","<<Ymin<<","<<Zmin<<")\n ("<<Xmax<<","<<Ymax<<","<<Zmax<<")"<<"\n";
+ di<<"Info: Bounds\n ("<<Xmin<<","<<Ymin<<","<<Zmin<<")\n ("<<Xmax<<","<<Ymax<<","<<Zmax<<")\n";
// grid the bounding box
Standard_Integer NumXsubvolumes = (Standard_Integer)((Xmax - Xmin) / mesh_delt); if (NumXsubvolumes <= 0) NumXsubvolumes = 1;
TopoDS_Shape aCommonShape;
if (IsBRepAlgoAPI) {
- di << "BRepAlgoAPI_Common common(copySolid/*cutSolid*/, SubvolumeSolid(l))" <<"\n";
+ di << "BRepAlgoAPI_Common common(copySolid/*cutSolid*/, SubvolumeSolid(l))\n";
BRepAlgoAPI_Common common(copySolid/*cutSolid*/, SubvolumeSolid(l));
if (!common.IsDone())
{
}
aCommonShape = common.Shape();
} else {
- di << "BRepAlgo_Common common(copySolid/*cutSolid*/, SubvolumeSolid(l))" <<"\n";
+ di << "BRepAlgo_Common common(copySolid/*cutSolid*/, SubvolumeSolid(l))\n";
BRepAlgo_Common common(copySolid/*cutSolid*/, SubvolumeSolid(l));
if (!common.IsDone())
{
}
if ( found_solid != 1 )
{
- di << "Info: Common operation " << l << " produced " << found_solid << " solids" << "\n";
+ di << "Info: Common operation " << l << " produced " << found_solid << " solids\n";
}
else
{
const Standard_Boolean err = (vol > 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)
{
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++)
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);
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;
}
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;
{
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]);
}
}
} else {
- di << "Faulty : found a problem"<< "\n";
+ di << "Faulty : found a problem\n";
}
return 0;
}
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();
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();
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;
}
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]);
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";
static Standard_Integer BUC60868 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
{
if (argc != 3) {
- di << "Usage : " <<argv[0] << " Result Shell" << "\n";
+ di << "Usage : " <<argv[0] << " Result Shell\n";
return 1;
}
TopoDS_Shape aShell = DBRep::Get(argv[2]);
if (aShell.IsNull()) {
- di << "Faulty : The shape is NULL" << "\n";
+ di << "Faulty : The shape is NULL\n";
return 1;
}
TopoDS_Shape aRes;
if (aListOfWires.IsEmpty())
- di << "no bound" << "\n";
+ di << "no bound\n";
else if (aListOfWires.Extent() == 1)
aRes = aListOfWires.First();
else {
static Standard_Integer BUC60924 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
{
if (argc != 5) {
- di << "Usage : " <<argv[0] << " curve X Y Z" << "\n";
+ di << "Usage : " <<argv[0] << " curve X Y Z\n";
return 1;
}
Handle(Geom_Curve) aCurve = DrawTrSurf::GetCurve(argv[1]);
if (aCurve.IsNull()) {
- di << "Faulty : the curve is NULL." << "\n";
+ di << "Faulty : the curve is NULL.\n";
return 1;
}
isPlanar=ShapeAnalysis_Curve::IsPlanar(aCurve,aVec,1e-7);
if(isPlanar)
- di << "The curve is planar !" << "\n";
+ di << "The curve is planar !\n";
else
- di << "Faulty : the curve is not planar!" << "\n";
+ di << "Faulty : the curve is not planar!\n";
return 0;
}
static Standard_Integer OCC983 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
{
if (argc != 2) {
- di << "Usage : " << argv[0] << " file" << "\n";
+ di << "Usage : " << argv[0] << " file\n";
return 1;
}
if(!aParser.parse(File)) {
myDOM=aParser.getDocument();
- di<<"Document parsed"<<"\n";
+ di<<"Document parsed\n";
} else {
- di<<"Document not parsed"<<"\n";
+ di<<"Document not parsed\n";
return 0;
}
LDOM_Element root = myDOM.getDocumentElement();
if ( root.isNull() ) {
- di<<"Root element is null"<<"\n";
+ di<<"Root element is null\n";
return 0;
}
static Standard_Integer OCC984 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
{
if (argc != 2) {
- di << "Usage : " << argv[0] << " file" << "\n";
+ di << "Usage : " << argv[0] << " file\n";
return 1;
}
if(!aParser.parse(File)) {
myDOM=aParser.getDocument();
- di<<"Document parsed"<<"\n";
+ di<<"Document parsed\n";
} else {
- di<<"Document not parsed"<<"\n";
+ di<<"Document not parsed\n";
}
return 0;
{
if( argc != 2)
{
- di << "Usage : " << argv[0] << " AutoHilight=0/1" << "\n";
+ di << "Usage : " << argv[0] << " AutoHilight=0/1\n";
return 1;
}
Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
{
if( argc != 2)
{
- di << "Usage : " << argv[0] << " LC_NUMERIC" << "\n";
+ di << "Usage : " << argv[0] << " LC_NUMERIC\n";
return 1;
}
TCollection_AsciiString aNumLocale(argv[1]);
{
if( argc != 5)
{
- di << "Usage : " << argv[0] << " (DF, entry, oldLocalID, newLocalID)" << "\n";
+ di << "Usage : " << argv[0] << " (DF, entry, oldLocalID, newLocalID)\n";
return 1;
}
Handle(TDF_Data) DF;
{
if( argc != 4)
{
- di << "Usage : " << argv[0] << " (DF, entry, Tag)" << "\n";
+ di << "Usage : " << argv[0] << " (DF, entry, Tag)\n";
return 1;
}
Handle(TDF_Data) DF;
{
if( argc != 3)
{
- di << "Usage : " << argv[0] << " (DF, entry)" << "\n";
+ di << "Usage : " << argv[0] << " (DF, entry)\n";
return 1;
}
Handle(TDF_Data) DF;
{
if( argc != 4)
{
- di << "Usage : " << argv[0] << " (DF, entry, Expression)" << "\n";
+ di << "Usage : " << argv[0] << " (DF, entry, Expression)\n";
return 1;
}
Handle(TDF_Data) DF;
{
if( argc != 4)
{
- di << "Usage : " << argv[0] << " (DF, entry, Relation)" << "\n";
+ di << "Usage : " << argv[0] << " (DF, entry, Relation)\n";
return 1;
}
Handle(TDF_Data) DF;
{
if( argc != 2)
{
- di << "Usage : " << argv[0] << " string" << "\n";
+ di << "Usage : " << argv[0] << " string\n";
return 1;
}
TCollection_ExtendedString ExtendedString;
{
if (argc > 2)
{
- di << "Usage: " << argv[0] << " [nb]" << "\n";
+ di << "Usage: " << argv[0] << " [nb]\n";
return 1;
}
}
if(argc != 2) {
- di << "Usage : " << argv[0] << " 0/1" << "\n";
+ di << "Usage : " << argv[0] << " 0/1\n";
}
if(Draw::Atoi(argv[1]) == 0) {
myAISContext->Display(theObject2);
}
} else {
- di << "Usage : " << argv[0] << " 0/1" << "\n";
+ di << "Usage : " << argv[0] << " 0/1\n";
return -1;
}
return 0;
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;
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;
}
}
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;
}
}
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;
}
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;
}
{
if ( argc != 2 ) {
- di << "Usage : " << argv[0] << " name" << "\n";
+ di << "Usage : " << argv[0] << " name\n";
return 1;
}
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;
}
*/
if ( argc != 2 ) {
- di << "Usage : " << argv[0] << " DependentName" << "\n";
+ di << "Usage : " << argv[0] << " DependentName\n";
return 1;
}
OSD_Path Path (argv[1], SysType1);
}
catch (Standard_ProgramError) {
- di << "1" << "\n";
+ di << "1\n";
return 0;
}
}
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;
}
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;
}
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;
//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;
}
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;
}
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;
//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;
}
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]);
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]);
return 1;
}
if ( argc != 3 ) {
- di << "Usage : " << argv[0] << " ArcRadius ArrowSize" << "\n";
+ di << "Usage : " << argv[0] << " ArcRadius ArrowSize\n";
return 1;
}
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]);
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;
}
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;
}
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;
}
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;
}
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;
}
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);
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;
}
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;
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 {
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;
{
if(argc!=3)
{
- di << "Usage : " << argv[0] << " shape result" <<"\n";
+ di << "Usage : " << argv[0] << " shape result\n";
return 1;
}
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;
}
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;
}
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]);
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;
}
}
catch(Standard_Failure)
{
- di << argv[0] << ": Exception in fillet"<<"\n";
+ di << argv[0] << ": Exception in fillet\n";
return 2;
}
}
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;
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);
const char **)
{
if(Rake == 0){
- di << "MakeFillet non initialise"<<"\n";
+ di << "MakeFillet non initialise\n";
return 1 ;
}
Rake->Build();
{
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]);
}
catch(Standard_Failure)
{
- di<<"ERROR: Exception in GeomFill_NSections"<<"\n";
+ di<<"ERROR: Exception in GeomFill_NSections\n";
}
}
{
if (argc < 3)
{
- di << "Usage : " << argv[0] << " U V" << "\n";
+ di << "Usage : " << argv[0] << " U V\n";
return 1;
}
{
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;
}
TopExp_Explorer exp(shape, TopAbs_EDGE);
if (!exp.More())
{
- di<<"Error: no edge found"<<"\n";
+ di<<"Error: no edge found\n";
return 1;
}
{
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;
}
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;
}
}
{
if (argc != 2)
{
- di << "Usage : " << argv[0] << " shape" << "\n";
+ di << "Usage : " << argv[0] << " shape\n";
return 1;
}
{
if (argc != 2)
{
- di << "Usage : " << argv[0] << " shape" << "\n";
+ di << "Usage : " << argv[0] << " shape\n";
return 1;
}
{
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;
}
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;
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();
}
return 1;
}
if(argc != 3) {
- di << "Usage : " << argv[0] << " nbpoles result" << "\n";
+ di << "Usage : " << argv[0] << " nbpoles result\n";
return 1;
}
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;
}
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;
}
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;
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];
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;
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;
}
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;
{
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;
}
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;
}
// 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;
}
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);
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;
}
// 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
}
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);
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);
DBRep::Set("f2", F2);
- di << "Result: f2" << "\n";
+ di << "Result: f2\n";
return 0;
}
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;
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;
}
if (!anInters.IsDone())
{
- theDI<<"No intersections found!"<<"\n";
+ theDI<<"No intersections found!\n";
return 1;
}
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);
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;
}
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;
}
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;
}
{
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;
}
};
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");;
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;
}
{
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;
}
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]);
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];
static Standard_Integer OCC7570 (Draw_Interpretor& di, Standard_Integer n, const char** a)
{
if (n != 2) {
- di<<"Usage: "<<a[0]<<" invalid number of arguments"<<"\n";
+ di<<"Usage: "<<a[0]<<" invalid number of arguments\n";
return 1;
}
TopoDS_Shape in_shape (DBRep::Get (a[1]));
TopoDS_Shape S = DBRep::Get(argv[1]);
if ( S.IsNull() )
{
- di << "Shape is empty" << "\n";
+ di << "Shape is empty\n";
return 1;
}
static Standard_Integer OCC25413 (Draw_Interpretor& di, Standard_Integer narg , const char** a)
{
if (narg != 2) {
- di << "Usage: " << a[0] << " invalid number of arguments" << "\n";
+ di << "Usage: " << a[0] << " invalid number of arguments\n";
return 1;
}
TopoDS_Shape aShape = DBRep::Get (a[1]);
static Standard_Integer OCC24881 (Draw_Interpretor& di, Standard_Integer narg , const char** a)
{
if (narg < 2) {
- di<<"Usage: "<<a[0]<<" invalid number of arguments"<<"\n";
+ di<<"Usage: "<<a[0]<<" invalid number of arguments\n";
return 1;
}
// cout <<"FileName1: " << argv[1] <<endl;
}
if (nbOk)
{
- di << "Fix_FillGaps_NothingToDo" <<"\n";
+ di << "Fix_FillGaps_NothingToDo\n";
}
TColStd_DataMapIteratorOfDataMapOfIntegerInteger aStatusItr(aStatusNbDMap);
if (aDeviation > 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;
}
const char** a)
{
if (n != 4) {
- di << "Usage: OCC26446 r c1 c2" << "\n";
+ di << "Usage: OCC26446 r c1 c2\n";
return 1;
}
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;
}
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;
}
// 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;
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
}
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();
{
if(argc!=4)
{
- di << "Usage : " << a[0] << " result Shape1 Shape2" << "\n";
+ di << "Usage : " << a[0] << " result Shape1 Shape2\n";
return -1;
}
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();
return 0;
} else di << "The first solution is Null!" << "\n";
- di << "fini" << "\n";
+ di << "fini\n";
return 0;
}
{
if(argc!=2)
{
- di << "Usage : " << argv[0] << " shape" << "\n";
+ di << "Usage : " << argv[0] << " shape\n";
return -1;
}
{
if(argc!=2)
{
- di << "Usage : "<< argv[0] << " shape" << "\n";
+ di << "Usage : "<< argv[0] << " shape\n";
return -1;
}
} 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);
}
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";
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:
// ***********************************************
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;
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);
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;
}
}
if(argc != 2) {
- di << "Usage : " << argv[0] << " 0/1" << "\n";
+ di << "Usage : " << argv[0] << " 0/1\n";
}
if(Draw::Atoi(argv[1]) == 0) {
myAISContext->OpenLocalContext();
myAISContext->ActivateStandardMode(TopAbs_FACE);
} else {
- di << "Usage : " << argv[0] << " 0/1" << "\n";
+ di << "Usage : " << argv[0] << " 0/1\n";
return -1;
}
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.
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();
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;
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
}
// 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());
}
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]);
{
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;
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
}
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();
}
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();
}
di<<"\n";
- di<<"Degenerated edges :"<<"\n";
- di<<l<<" -- "<<"Degenerated edges "<<"\n";
+ di<<"Degenerated edges :\n";
+ di<<l<<" -- Degenerated edges \n";
return 0;
static Standard_Integer BUC60841(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;
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
}
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();
}
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();
}
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;
}
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;
}
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;
}
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;
}
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;
}
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);
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;
}
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);
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;
}
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;
}
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;
}
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;
}
di<<prs->Width();
}
else{
- di << "AISWidth: Warning : Width wasn't set" << "\n";
+ di << "AISWidth: Warning : Width wasn't set\n";
di<<(-4);
}
}
// 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;
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
}
// 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();
}
{
if (argc < 4)
{
- di<<"missing parameters"<<"\n";
+ di<<"missing parameters\n";
return 1;
}
const char *name = argv[1];
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));
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;
}
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;
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;
}
const Standard_Real D = Ex.LowerDistance();
// IMPORTANT: minimal distance here means accuracy reached in intersection
di<<"Info: Minimal distance is "<<D<<"\n";
- di<<"Info: Minimal points are ("<<P1.X()<<","<<P1.Y()<<","<<P1.Z()<<"), ("<<P2.X()<<","<<P2.Y()<<","<<P2.Z()<<")"<<"\n";
- di<<"Info: Minimal parameters are ("<<U1<<"), ("<<U2<<")"<<"\n";
+ di<<"Info: Minimal points are ("<<P1.X()<<","<<P1.Y()<<","<<P1.Z()<<"), ("<<P2.X()<<","<<P2.Y()<<","<<P2.Z()<<")\n";
+ di<<"Info: Minimal parameters are ("<<U1<<"), ("<<U2<<")\n";
}
else
{
- di<<"Error: extrema not found"<<"\n";
+ di<<"Error: extrema not found\n";
}
}
static Standard_Integer OCC162 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
{
if ( argc != 2 ) {
- di << "Usage : " << argv[0] << " name" << "\n";
+ di << "Usage : " << argv[0] << " name\n";
return 1;
}
static Standard_Integer OCC204 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
{
if ( argc != 2 ) {
- di << "Usage : " << argv[0] << " updateviewer=0/1" << "\n";
+ di << "Usage : " << argv[0] << " updateviewer=0/1\n";
return 1;
}
static Standard_Integer OCC1651 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
{
if ( argc != 8 ) {
- di << "Usage : " << argv[0] << " Shape PntX PntY PntZ DirX DirY DirZ" << "\n";
+ di << "Usage : " << argv[0] << " Shape PntX PntY PntZ DirX DirY DirZ\n";
return 1;
}
{
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 || argc > 3) {
- di << "ERROR : Usage : " << argv[0] << " highlight_mode [shape]" << "\n";
+ di << "ERROR : Usage : " << argv[0] << " highlight_mode [shape]\n";
return 1;
}
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);
{
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));
TopoDS_Shape S = DBRep::Get(a[2]);
if (S.IsNull()) {
- di <<"Noone shape selected"<<"\n";
+ di <<"Noone shape selected\n";
di << 0;
return 0;
}
else {
di <<Name.ToCString();
if (Status == 2) {
- di <<"Several shapes have the same name"<<"\n";
+ di <<"Several shapes have the same name\n";
}
}
return 0;
if (!DDF::GetDF(a[1],ND)) return 1;
TopoDS_Shape SS = DBRep::Get(a[2]);
if (SS.IsNull()) {
- di <<"Noone shape selected"<<"\n";
+ di <<"Noone shape selected\n";
di << 0;
return 0;
}
TDF_Tool::Entry(itL.Value(),entry);
di <<" , "<< entry.ToCString();
}
- di <<"."<<"\n";
+ di <<".\n";
return 0;
}
DDF::FindLabel(ND,a[2],Lab);
Handle(TNaming_NamedShape) NS;
if (!Lab.FindAttribute(TNaming_NamedShape::GetID(),NS)) {
- di <<"No shape"<<"\n";
+ di <<"No shape\n";
return 0;
}
}
di <<"\n";
if (NbShapes == 0) {
- di <<"No shape"<<"\n";
+ di <<"No shape\n";
}
return 0;
return 0;
}
}
- di << "GetShape : Error" << "\n";
+ di << "GetShape : Error\n";
return 1;
}
return 0;
}
}
- di << "DDataStd_GetShape : Error" << "\n";
+ di << "DDataStd_GetShape : Error\n";
return 1;
}
TopoDS_Shape SS = DBRep::Get(a[2]);
if (SS.IsNull()) {
- di <<"Noone shape selected"<<"\n";
+ di <<"Noone shape selected\n";
di << 0;
return 0;
}
else {
di <<Name.ToCString();
if (Status == 2) {
- di <<"Several shapes have the same name"<<"\n";
+ di <<"Several shapes have the same name\n";
}
}
return 0;
aShape1 = DBRep::Get (arg[a]);
if (anInc == 2) {
if (a == nb - 1) {
- di<<"For this type of evolution number of shapes must be even"<<"\n";
+ di<<"For this type of evolution number of shapes must be even\n";
return 1;
}
aShape2 = DBRep::Get(arg[a+1]);
aBuilder.Select(aShape1,aShape2);
break;
default:
- di<<"Unknown evolution type"<<"\n";
+ di<<"Unknown evolution type\n";
return 1;
}
}
// OnlyModif = Draw::Atoi(arg[3]);
// }
} else {
- di<<"Usage: BuildName df entry evolution(P[RIMITIVE] G[ENERATED] M[ODIFY] D[ELETE] R[EPLACE] S[ELECTED]) shape1 [shape2 ...]"<<"\n";
+ di<<"Usage: BuildName df entry evolution(P[RIMITIVE] G[ENERATED] M[ODIFY] D[ELETE] R[EPLACE] S[ELECTED]) shape1 [shape2 ...]\n";
return 1;
}
return 0;
if (!QADNaming::Entry(arg, aLabel)) return 1;
Handle(TNaming_NamedShape) aNS;
if (!aLabel.FindAttribute(TNaming_NamedShape::GetID(),aNS)) {
- di<<"Label has no NamedShape"<<"\n";
+ di<<"Label has no NamedShape\n";
return 1;
}
di<<EvolutionString(aNS->Evolution());
}
di<<" "<<a-1;
} else {
- di<<"Usage: GetNewShapes df entry [res]"<<"\n";
+ di<<"Usage: GetNewShapes df entry [res]\n";
return 1;
}
return 0;
if (!QADNaming::Entry(arg, aLabel)) return 1;
Handle(TNaming_NamedShape) aNS;
if (!aLabel.FindAttribute(TNaming_NamedShape::GetID(),aNS)) {
- di<<"Label has no NamedShape"<<"\n";
+ di<<"Label has no NamedShape\n";
return 1;
}
di<<EvolutionString(aNS->Evolution());
}
di<<" "<<a-1;
} else {
- di<<"Usage: GetOldShapes df entry [res]"<<"\n";
+ di<<"Usage: GetOldShapes df entry [res]\n";
return 1;
}
return 0;
if (!QADNaming::Entry(arg, aLabel)) return 1;
Handle(TNaming_NamedShape) aNS;
if (!aLabel.FindAttribute(TNaming_NamedShape::GetID(),aNS)) {
- di<<"Label has no NamedShape"<<"\n";
+ di<<"Label has no NamedShape\n";
return 1;
}
Standard_Integer a;
} else { // shape
Handle(TDF_Data) DF;
if (!DDF::GetDF(arg[1],DF)) {
- di<<"Wrong df"<<"\n";
+ di<<"Wrong df\n";
return 1;
}
TopoDS_Shape aShape = DBRep::Get(arg[2]);
aResult=GetAllNew(aShape,DF->Root(),aName,0);
}
} else {
- di<<"Usage: GetAllNewShapes df entry/shape [res]"<<"\n";
+ di<<"Usage: GetAllNewShapes df entry/shape [res]\n";
return 1;
}
di<<aResult;
if (!QADNaming::Entry(arg, aLabel)) return 1;
Handle(TNaming_NamedShape) aNS;
if (!aLabel.FindAttribute(TNaming_NamedShape::GetID(),aNS)) {
- di<<"Label has no NamedShape"<<"\n";
+ di<<"Label has no NamedShape\n";
return 1;
}
Standard_Integer a;
} else { // shape
Handle(TDF_Data) DF;
if (!DDF::GetDF(arg[1],DF)) {
- di<<"Wrong df"<<"\n";
+ di<<"Wrong df\n";
return 1;
}
TopoDS_Shape aShape = DBRep::Get(arg[2]);
aResult=GetAllOld(aShape,DF->Root(),aName,0);
}
} else {
- di<<"Usage: GetAllNewShapes df entry/shape [res]"<<"\n";
+ di<<"Usage: GetAllNewShapes df entry/shape [res]\n";
return 1;
}
di<<aResult;
Standard_Integer aResult = 0;
Handle(TDF_Data) DF;
if (!DDF::GetDF(arg[1],DF)) {
- di<<"Wrong df"<<"\n";
+ di<<"Wrong df\n";
return 1;
}
TopoDS_Shape aShape = DBRep::Get(arg[2]);
}
}
} else {
- di<<"Usage: GetSameShapes df shape"<<"\n";
+ di<<"Usage: GetSameShapes df shape\n";
return 1;
}
di<<aRes.ToCString();
}
return 0;
}
- di << "QADNaming_Select : Error" << "\n";
+ di << "QADNaming_Select : Error\n";
return 1;
}
Standard_Integer i;
for(i=3;i<n;i++) {
TDF_Label aValidLab;
- if (!DDF::FindLabel(aLabel.Data(),a[i],aValidLab)) di<<"Warning: label "<<a[i]<<" not exists"<<"\n";
+ if (!DDF::FindLabel(aLabel.Data(),a[i],aValidLab)) di<<"Warning: label "<<a[i]<<" not exists\n";
else valid.Add(aValidLab);
}
Standard_Boolean done = SL.Solve(valid);
Display (name,Res);
return done?0:1;
}
- di << "Usage: DumpSelection DF entry [validlabel1 validlabel2 ...]" << "\n";
+ di << "Usage: DumpSelection DF entry [validlabel1 validlabel2 ...]\n";
return 1;
}
if (!DDF::FindLabel(DF,a[2],L)) return 1;
Handle(TNaming_Naming) naming;
if (!L.FindAttribute(TNaming_Naming::GetID(),naming)) {
- di <<"QADNaming_DumpSelection : not a selection" << "\n";
+ di <<"QADNaming_DumpSelection : not a selection\n";
return 1;
}
DumpNaming(naming, di);
}
return 0;
}
- di << "QADNaming_DumpSelection : Error" << "\n";
+ di << "QADNaming_DumpSelection : Error\n";
return 1;
}
if (!DDF::FindLabel(DF,a[2],L)) return 1;
Handle(TNaming_Naming) naming;
if (!L.FindAttribute(TNaming_Naming::GetID(),naming)) {
- di <<"QADNaming_DumpSelection : not a selection" << "\n";
+ di <<"QADNaming_DumpSelection : not a selection\n";
return 1;
}
TCollection_AsciiString Entry;
di << "\n";
return 0;
}
- di << "QADNaming_ArgsSelection : Error" << "\n";
+ di << "QADNaming_ArgsSelection : Error\n";
return 1;
}
di << "\n";
return 0;
}
- di << "QADNaming_Attachment : Error" << "\n";
+ di << "QADNaming_Attachment : Error\n";
return 1;
}
for(itr2.Initialize(M2);itr2.More();itr2.Next()) {
const TopoDS_Shape& s2 = itr2.Key();
if(s1.IsSame(s2))
- di << "Shapes " << arg[1]<< " and "<< arg[2]<< " have SAME subshapes" <<"\n";
+ di << "Shapes " << arg[1]<< " and "<< arg[2]<< " have SAME subshapes\n";
}
}
}
return 0;
}
- di << "QADNaming_CopyShape : Error" << "\n";
+ di << "QADNaming_CopyShape : Error\n";
return 1;
}
const char ** argv)
{
if(argc != 2){
- di <<"Usage : vtri_orig tri_name"<<"\n";
+ di <<"Usage : vtri_orig tri_name\n";
return 1;
}
if(TheAISContext().IsNull()){
- di<<"Make 'vinit' before this method call"<<"\n";
+ di<<"Make 'vinit' before this method call\n";
return 1;
}
//get trihedron from AIS map.
TCollection_AsciiString aName(argv[1]);
if(!GetMapOfAIS().IsBound2(aName)){
- di<<"No object named '"<<argv[1]<<"'"<<"\n";
+ di<<"No object named '"<<argv[1]<<"'\n";
return 1;
}
Handle(AIS_Trihedron) aTrih =
Handle(AIS_Trihedron)::DownCast(GetMapOfAIS().Find2(aName));
if(aTrih.IsNull()){
- di<<"Trihedron is not found, try another name"<<"\n";
+ di<<"Trihedron is not found, try another name\n";
return 1;
}
GetMapOfAIS().Bind(YLine,aName+"_Y");
GetMapOfAIS().Bind(ZLine,aName+"_Z");
//print names of created objects:
- di<<argv[1]<<"_X "<<argv[1]<<"_Y "<<argv[1]<<"_Z"<<"\n";
+ di<<argv[1]<<"_X "<<argv[1]<<"_Y "<<argv[1]<<"_Z\n";
//try to draw them:
TheAISContext()->Display(XLine);
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;
// 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;
// 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;
// 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;
//=======================================================================
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<NCollection_Array1<double>, std::vector<double> >(di);
- di << "\n" << "std::vector vs NCollection_Vector (sort):" << "\n\n";
+ di << "\nstd::vector vs NCollection_Vector (sort):\n\n";
TestPerformanceRandomIterator<NCollection_Vector<double>, std::vector<double> >(di);
- di << "\n" << "std::vector vs NCollection_Array1 (replace):" << "\n\n";
+ di << "\nstd::vector vs NCollection_Array1 (replace):\n\n";
TestPerformanceForwardIterator<NCollection_Array1<double>, std::vector<double> >(di);
- di << "\n" << "std::vector vs NCollection_Vector (replace):" << "\n\n";
+ di << "\nstd::vector vs NCollection_Vector (replace):\n\n";
TestPerformanceForwardIterator<NCollection_Vector<double>, std::vector<double> >(di);
- di << "\n" << "std::list vs NCollection_List (replace):" << "\n\n";
+ di << "\nstd::list vs NCollection_List (replace):\n\n";
TestPerformanceForwardIterator<NCollection_List<double>, std::list<double> >(di);
- di << "\n" << "std::list vs NCollection_Sequence (replace):" << "\n\n";
+ di << "\nstd::list vs NCollection_Sequence (replace):\n\n";
TestPerformanceForwardIterator<NCollection_Sequence<double>, std::list<double> >(di);
- di << "\n" << "std::list vs NCollection_Sequence (reverse):" << "\n\n";
+ di << "\nstd::list vs NCollection_Sequence (reverse):\n\n";
TestPerformanceBidirIterator<NCollection_Sequence<double>, std::list<double> >(di);
- di << "\n" << "std::set vs NCollection_Map (search):" << "\n\n";
+ di << "\nstd::set vs NCollection_Map (search):\n\n";
TestPerformanceMapAccess<NCollection_Map<int>, int>(di);
- di << "\n" << "std::set vs NCollection_IndexedMap (search):" << "\n\n";
+ di << "\nstd::set vs NCollection_IndexedMap (search):\n\n";
TestPerformanceMapAccess<NCollection_IndexedMap<int>, int>(di);
return 0;
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;
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]);
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;
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;
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;
}
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;
}
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<<endl;
TDF_ChildIterator Labelitr(L.Root(), Standard_False);
TDF_Label L;
DDF::AddLabel(DF, a[2], L);
- di<<"SELECT A SUB-SHAPE ..."<<"\n";
+ di<<"SELECT A SUB-SHAPE ...\n";
TopoDS_Shape aSelectedShape = ViewerTest::PickShape((TopAbs_ShapeEnum)Draw::Atoi(a[3]));
if (aSelectedShape.IsNull()) {
- di<<"QANewDBRepNaming_CheckSelectShape(): Nothing is selected ..."<<"\n";
+ di<<"QANewDBRepNaming_CheckSelectShape(): Nothing is selected ...\n";
return 1;
}
// Find the context:
break;
}
default:
- di<<"QANewDBRepNaming_NameBooleanOperation The type of operation must be 1 - fuse, 2 - cut or 3 - common"<<"\n";
+ di<<"QANewDBRepNaming_NameBooleanOperation The type of operation must be 1 - fuse, 2 - cut or 3 - common\n";
}
return 0;
static Standard_Integer LocSet (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc < 2) {
- di << argv[0] << "LocSet a [b [c]]: set location for shape \"a\":" << "\n";
- di << "- to Null if one argument is given" << "\n";
- di << "- to location of shape b if two arguments are given" << "\n";
- di << "- to difference of locations of shapes b and c if three arguments are given" << "\n";
+ di << argv[0] << "LocSet a [b [c]]: set location for shape \"a\":\n";
+ di << "- to Null if one argument is given\n";
+ di << "- to location of shape b if two arguments are given\n";
+ di << "- to difference of locations of shapes b and c if three arguments are given\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;
if ( argc >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() );
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;
<< "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);
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 : "<<arg1<<"\n"; return 1 /* Error */; }
- if (Shape.ShapeType() != TopAbs_FACE) { di<<"Not a face"<<"\n"; return 1 /* Error */; }
+ if (Shape.ShapeType() != TopAbs_FACE) { di<<"Not a face\n"; return 1 /* Error */; }
TopoDS_Face F = TopoDS::Face (Shape);
Handle(Geom_Surface) thesurf = BRep_Tool::Surface (F); // pas locface
// On y va
GeomAPI_ProjectPointOnSurf proj(P3D, thesurf, uf-du, ul+du, vf-dv, vl+dv);
Standard_Integer sol, nPSurf = proj.NbPoints();
- di<<" Found "<<nPSurf<<" Points"<<"\n";
+ di<<" Found "<<nPSurf<<" Points\n";
for (sol = 1; sol <= nPSurf; sol ++) {
di<<"n0 "<<sol<<" Distance "<<proj.Distance(sol);
proj.Parameters(sol, U,V);
(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
// admet une EDGE ou une CURVE
- if (argc < 5) { di<<"Give : EDGE X Y Z or CURVE3D X Y Z or CURVE3D first last X Y Z"<<"\n"; return 1 /* Error */; }
+ if (argc < 5) { di<<"Give : EDGE X Y Z or CURVE3D X Y Z or CURVE3D first last X Y Z\n"; return 1 /* Error */; }
const char * arg1 = argv[1];
Standard_Integer i0 = 0;
TopoDS_Shape Shape = DBRep::Get(arg1);
C = BRep_Tool::Curve (E,cf,cl);
di<<"Edge "<<arg1<<" Params from "<<cf<<" to "<<cl<<"\n";
} else {
- di<<"SHAPE "<<arg1<<" Not an EDGE"<<"\n"; return 1 /* Error */;
+ di<<"SHAPE "<<arg1<<" Not an EDGE\n"; return 1 /* Error */;
}
} else {
const char* a1 = arg1;
C = DrawTrSurf::GetCurve (a1);
if (C.IsNull())
- { di<<arg1<<" neither EDGE nor CURVE 3D"<<"\n"; return 1 /* Error */; }
+ { di<<arg1<<" neither EDGE nor CURVE 3D\n"; return 1 /* Error */; }
cf = C->FirstParameter(); cl = C->LastParameter();
if (argc >= 7) { cf = Draw::Atof (argv[2]); cl = Draw::Atof (argv[3]); i0 = 2; }
di<<"Curve 3D "<<arg1<<" Params from "<<cf<<" to "<<cl<<"\n";
dist = ShapeAnalysis_Curve().Project (C,P3D,BRepBuilderAPI::Precision(),res,param, cf,cl);
res.Coord(X,Y,Z);
- di<<"Result : "<<X<<" "<<Y<<" "<<Z<<"\n"<<"Param = "<<param<<" Gap = "<<dist<<"\n";
+ di<<"Result : "<<X<<" "<<Y<<" "<<Z<<"\nParam = "<<param<<" Gap = "<<dist<<"\n";
return 0;
}
static Standard_Integer anaface
(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
- if (argc < 2) { di<<"donner un nom de face"<<"\n"; return 1 /* Error */; }
+ if (argc < 2) { di<<"donner un nom de face\n"; return 1 /* Error */; }
Standard_CString arg1 = argv[1];
TopoDS_Shape Shape = DBRep::Get(arg1);
- if (Shape.IsNull()) { di<<arg1<<" inconnu"<<"\n"; return 1 /* Error */; }
-// if (Shape.ShapeType() != TopAbs_FACE) { di<<"Pas une FACE"<<"\n"; return 1 /* Error */; }
+ if (Shape.IsNull()) { di<<arg1<<" inconnu\n"; return 1 /* Error */; }
+// if (Shape.ShapeType() != TopAbs_FACE) { di<<"Pas une FACE\n"; return 1 /* Error */; }
// On regarde les wires, sont-ils bien fermes
Standard_Integer nbw = 0, nbe = 0;
}
di<<"\n";
}
- else { di<<"Analyse Wires, Ignore Faces"<<"\n"; }
+ else { di<<"Analyse Wires, Ignore Faces\n"; }
Standard_Boolean iasurf = !surface.IsNull();
//:sw if (!Face.IsNull()) STW.SetFace (Face);
//:sw else STW.SetPrecision (BRepBuilderAPI::Precision());
for (TopExp_Explorer exp(Shape,TopAbs_WIRE); exp.More(); exp.Next()) {
TopoDS_Wire Wire = TopoDS::Wire (exp.Current()); nbw ++; nbe = 0;
di<<"WIRE "<<nbw;
- if (Wire.Orientation() == TopAbs_FORWARD) di<<" (FWD)"<<"\n";
- else di<<" (REV)"<<"\n";
+ if (Wire.Orientation() == TopAbs_FORWARD) di<<" (FWD)\n";
+ else di<<" (REV)\n";
gp_Pnt fin,debut;
gp_Pnt2d finuv,debuv; gp_XY baseuv;
TopoDS_Vertex fv,lv;
Standard_Real u1= 0.,u2= 0.,v1= 0.,v2= 0.,umin= 0.,umax= 0.,vmin= 0.,vmax= 0., totcross= 0.;
//:sw STW.ClearWire(); STW.Load (Wire);
-// if (STW.Reorder()) di<<"Wire reordered to explore"<<"\n";
+// if (STW.Reorder()) di<<"Wire reordered to explore\n";
// for (TopExp_Explorer exe(Wire.Oriented(TopAbs_FORWARD),TopAbs_EDGE); exe.More(); exe.Next()) {
// TopoDS_Edge Edge = TopoDS::Edge (exe.Current()); nbe ++;
//:sw for (nbe = 1; nbe <= STW.NbEdges(); nbe ++) {
di<<"Wire "<<nbw<<", Edge "<<nbe;
if (Edge.Orientation() == TopAbs_FORWARD) di<<" (FWD";
else di<<" (REV";
- di<<" , Tol= "<<BRep_Tool::Tolerance (Edge)<<" )"<<"\n";
+ di<<" , Tol= "<<BRep_Tool::Tolerance (Edge)<<" )\n";
Standard_Real f3d,l3d,f2d,l2d;
Handle(Geom_Curve) curve3d = BRep_Tool::Curve (Edge,f3d,l3d);
Handle(Geom2d_Curve) curve2d;
if (iasurf) curve2d = BRep_Tool::CurveOnSurface(Edge,Face,f2d,l2d);
Standard_Boolean ia2d = !curve2d.IsNull(); iaw2d |= ia2d;
- if (!ia2d) di<<"-- No PCurve"<<"\n";
- if (curve3d.IsNull()) di<<"-- no Curve 3d"<<"\n";
+ if (!ia2d) di<<"-- No PCurve\n";
+ if (curve3d.IsNull()) di<<"-- no Curve 3d\n";
// On va tacher de calculer les positions et les comparer
gp_Pnt2d fuv,luv;
Standard_Real difu = umax - umin, difv = vmax - vmin;
GProp_GProps G;
BRepGProp::SurfaceProperties(Face,G);
- if (G.Mass() > 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 "<<nbw<<" Wire(s)"<<"\n";
+ if (ShapeAnalysis::IsOuterBound (Face)) di<<"ShapeAnalysis: Outer Bound\n";
+ else di<<"ShapeAnalysis: Not Outer Bound\n";
+ di<<" Total "<<nbw<<" Wire(s)\n";
return 0;
}
static Standard_Integer XSHAPE_statshape(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
- if (argc < 2) { di<<"ShapeName; + options : prefix for particular cases : what to get"<<"\n"; return 1 /* Error */; }
+ if (argc < 2) { di<<"ShapeName; + options : prefix for particular cases : what to get\n"; return 1 /* Error */; }
Standard_CString arg1 = argv[1];
Standard_CString arg2 = NULL;
Standard_CString arg3 = NULL;
}
analyzer.Perform(Shape);
- di<<"Count Item\n----- ----"<<"\n";
+ di<<"Count Item\n----- ----\n";
nb = analyzer.NbEdges();
- if(nb>0) di<<nb<<" "<<" EDGE (Oriented)"<<"\n";
+ if(nb>0) di<<nb<<" EDGE (Oriented)\n";
nb = analyzer.NbSharedEdges();
- if(nb>0) di<<nb<<" "<<" EDGE (Shared)"<<"\n";
+ if(nb>0) di<<nb<<" EDGE (Shared)\n";
nb = analyzer.NbFreeEdges();
- if(nb>0) di<<nb<<" "<<" EDGE (Free)"<<"\n";
+ if(nb>0) di<<nb<<" EDGE (Free)\n";
nb = analyzer.NbFaces();
- if(nb>0) di<<nb<<" "<<" FACE"<<"\n";
+ if(nb>0) di<<nb<<" FACE\n";
nb = analyzer.NbFreeFaces();
- if(nb>0) di<<nb<<" "<<" FACE (Free)"<<"\n";
+ if(nb>0) di<<nb<<" FACE (Free)\n";
nb = analyzer.NbFreeWires();
- if(nb>0) di<<nb<<" "<<" WIRE (Free)"<<"\n";
+ if(nb>0) di<<nb<<" WIRE (Free)\n";
nb = analyzer.NbShells();
- if(nb>0) di<<nb<<" "<<" SHELL"<<"\n";
+ if(nb>0) di<<nb<<" SHELL\n";
nb = analyzer.NbSolids();
- if(nb>0) di<<nb<<" "<<" SOLID"<<"\n";
+ if(nb>0) di<<nb<<" SOLID\n";
nb = analyzer.NbVertices();
- if(nb>0) di<<nb<<" "<<" VERTEX (Oriented)"<<"\n";
+ if(nb>0) di<<nb<<" VERTEX (Oriented)\n";
nb = analyzer.NbSharedVertices();
- if(nb>0) di<<nb<<" "<<" VERTEX (Shared)"<<"\n";
+ if(nb>0) di<<nb<<" VERTEX (Shared)\n";
nb = analyzer.NbWires();
- if(nb>0) di<<nb<<" "<<" WIRE"<<"\n";
+ if(nb>0) di<<nb<<" WIRE\n";
nb = analyzer.NbFaceWithSevWires();
- if(nb>0) di<<nb<<" "<<"Face with more than one wire"<<"\n";
+ if(nb>0) di<<nb<<" Face with more than one wire\n";
nb = analyzer.NbNoPCurve();
- if(nb>0) di<<nb<<" "<<"No pcurve"<<"\n";
+ if(nb>0) di<<nb<<" No pcurve\n";
nb = analyzer.NbSolidsWithVoids();
- if(nb>0) di<<nb<<" "<<"SOLID with voids"<<"\n";
+ if(nb>0) di<<nb<<" SOLID with voids\n";
nb = analyzer.NbWireWitnSeam();
- if(nb>0) di<<nb<<" "<<"Wire(s) with one seam edge"<<"\n";
+ if(nb>0) di<<nb<<" Wire(s) with one seam edge\n";
nb = analyzer.NbWireWithSevSeams();
- if(nb>0) di<<nb<<" "<<"Wire(s) with several seam edges"<<"\n";
+ if(nb>0) di<<nb<<" Wire(s) with several seam edges\n";
nb = analyzer.NbBigSplines();
- if(nb>0) di<<nb<<" "<<"bigspl : BSpline > 8192 poles"<<"\n";
+ if(nb>0) di<<nb<<" bigspl : BSpline > 8192 poles\n";
nb = analyzer.NbBezierSurf();
- if(nb>0) di<<nb<<" "<<"bezsur : BezierSurface"<<"\n";
+ if(nb>0) di<<nb<<" bezsur : BezierSurface\n";
nb = analyzer.NbBSplibeSurf();
- if(nb>0) di<<nb<<" "<<"bspsur : BSplineSurface"<<"\n";
+ if(nb>0) di<<nb<<" bspsur : BSplineSurface\n";
nb = analyzer.NbC0Curves();
- if(nb>0) di<<nb<<" "<<"c0curv : Curve Only C0"<<"\n";
+ if(nb>0) di<<nb<<" c0curv : Curve Only C0\n";
nb = analyzer.NbC0Surfaces();
- if(nb>0) di<<nb<<" "<<"c0surf : Surface Only C0"<<"\n";
+ if(nb>0) di<<nb<<" c0surf : Surface Only C0\n";
nb = analyzer.NbIndirectSurf();
- if(nb>0) di<<nb<<" "<<"indsur : Indirect Surface"<<"\n";
+ if(nb>0) di<<nb<<" indsur : Indirect Surface\n";
nb = analyzer.NbOffsetCurves();
- if(nb>0) di<<nb<<" "<<"ofcur : Offset Curve(s)"<<"\n";
+ if(nb>0) di<<nb<<" ofcur : Offset Curve(s)\n";
nb = analyzer.NbOffsetSurf();
- if(nb>0) di<<nb<<" "<<"ofsur : Offset Surface"<<"\n";
+ if(nb>0) di<<nb<<" ofsur : Offset Surface\n";
nb = analyzer.NbTrimmedCurve2d();
- if(nb>0) di<<nb<<" "<<"trc2d : Trimmed Curve2d"<<"\n";
+ if(nb>0) di<<nb<<" trc2d : Trimmed Curve2d\n";
nb = analyzer.NbTrimmedCurve3d();
- if(nb>0) di<<nb<<" "<<"trc3d : Trimmed Curve3d"<<"\n";
+ if(nb>0) di<<nb<<" trc3d : Trimmed Curve3d\n";
nb = analyzer.NbTrimSurf();
- if(nb>0) di<<nb<<" "<<"trimsu : RectangularTrimmedSurface"<<"\n";
+ if(nb>0) di<<nb<<" trimsu : RectangularTrimmedSurface\n";
if(arg3 ==NULL) return 0;
"Deviation is computed by nbpoints sample points (default is 371).\n"
"Gives the max, min and average value on all edges in the shape\n"
"If prefix is defined, edges with maximal real tolerance and\n"
- "relation (and corresponding faces) will be saved with such names\n" << "\n";
+ "relation (and corresponding faces) will be saved with such names\n\n";
return 0;
}
TopoDS_Shape shape = DBRep::Get(argv[1]);
- if (shape.IsNull()) { di << "Shape name \"" << argv[1] << "\" is invalid" << "\n"; return 1; }
+ if (shape.IsNull()) { di << "Shape name \"" << argv[1] << "\" is invalid\n"; return 1; }
Standard_Integer nbpnts = 371;
Standard_CString prefix = 0;
if ( argc >2 ) {
}
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";
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;
}
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;
}
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);
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);
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;
}
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;
}
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));
{
if (argc < 2)
{
- di<<"Call please \"checkselfintersection wire [face]\""<<"\n";
+ di<<"Call please \"checkselfintersection wire [face]\"\n";
return 1;
}
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;
}
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;
}
}
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;
}
}
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;
}
{
if (argc < 2)
{
- di<<"Call please \"checkedge edge [face]\""<<"\n";
+ di<<"Call please \"checkedge edge [face]\"\n";
return 1;
}
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;
}
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;
}
}
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 : "<<arg2<<"\n"; return 1 /* Error */; }
TopoDS_Shape result = ShapeCustom::DirectFaces (Shape);
- if (result.IsNull()) { di<<"NO RESULT"<<"\n"; return 1; }
- else if (result == Shape) { di<<"No modif"<<"\n"; return 0; }
+ if (result.IsNull()) { di<<"NO RESULT\n"; return 1; }
+ else if (result == Shape) { di<<"No modif\n"; return 0; }
di<<"DirectFaces -> Result : "<<arg1<<"\n";
DBRep::Set (arg1,result);
return 0; // Done
static Standard_Integer expshape(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc <4) {
- di << "Incorrect number of arguments. Must be 3" << "\n";
+ di << "Incorrect number of arguments. Must be 3\n";
return 1 /* Error */;
}
Standard_CString arg2 = argv[1];
else if (strcmp(argv[k],"G1") == 0) aCont3 = GeomAbs_C0;
else if (strcmp(argv[k],"G2") == 0) aCont3 = GeomAbs_C1;
else {
- di<< "Invalid argument Cont3e" << "\n"; return 1; }
+ di<< "Invalid argument Cont3e\n"; return 1; }
}
//if(NbSurf.Value(2,1) !=0)
di<< "Number of Bezier surfaces with degree more then "<< Degree << " - " <<NbSurf.Value(2,1)<<"\n";
//if(NbSurf.Value(2,3) !=0)
- di<< "Number of Rational Bezier surfaces " << " - " <<NbSurf.Value(2,3)<<"\n";
+ di<< "Number of Rational Bezier surfaces - " <<NbSurf.Value(2,3)<<"\n";
//if(NbSurf.Value(2,4) !=0)
di<< "Number of Bezier surfaces with continuity less than specified - " << NbSurf.Value(2,4)<<"\n";
//if(NbCurv.Value(2,1) !=0)
di<< "Number of Bezier curves with degree more then - "<< Degree << " - " <<NbCurv.Value(2,1)<<"\n";
//if(NbCurv.Value(2,3) !=0)
- di<< "Number of Rational Bezier curves " << " - " <<NbCurv.Value(2,3)<<"\n";
+ di<< "Number of Rational Bezier curves - " <<NbCurv.Value(2,3)<<"\n";
//if(NbCurv.Value(2,4) !=0)
di<< "Number of Bezier curves with less continuity - " << NbCurv.Value(2,4)<<"\n";
// if(NbCurv2d.Value(1,4) !=0)
di<< "Number of BSpline pcurves with less continuity - " << NbCurv2d.Value(1,4)<<"\n";
//if(NbCurv2d.Value(2,1) !=0)
- di<< "Number of Bezier pcurves with degree more then "<< Degree <<" - " <<" - " <<NbCurv2d.Value(2,1)<<"\n";
+ di<< "Number of Bezier pcurves with degree more then "<< Degree <<" - - " <<NbCurv2d.Value(2,1)<<"\n";
//if(NbCurv2d.Value(2,3) !=0)
- di<< "Number of Rational Bezier pcurves " << " - " <<NbCurv2d.Value(2,3)<<"\n";
+ di<< "Number of Rational Bezier pcurves - " <<NbCurv2d.Value(2,3)<<"\n";
//if(NbCurv2d.Value(2,4) !=0)
di<< "Number of Bezier pcurves with less continuity - " << NbCurv2d.Value(2,4)<<"\n";
static Standard_Integer scaleshape(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc !=4) {
- di << "Incorrect number of arguments. Must be 4" << "\n";
+ di << "Incorrect number of arguments. Must be 4\n";
return 1 /* Error */;
}
Standard_CString arg2 = argv[2];
if (Shape.IsNull()) { di << "Shape unknown: " << arg2 << "\n"; return 1 /* Error */; }
TopoDS_Shape result = ShapeCustom::ScaleShape (Shape, Draw::Atof(argv[3]));
- if (result.IsNull()) { di << "NO RESULT" << "\n"; return 1; }
- else if (result == Shape) { di << "NO MODIFICATIONS" << "\n"; return 0; }
+ if (result.IsNull()) { di << "NO RESULT\n"; return 1; }
+ else if (result == Shape) { di << "NO MODIFICATIONS\n"; return 0; }
DBRep::Set (argv[1],result);
return 0;
}
static Standard_Integer BSplRes(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc < 11) {
- di << "Incorrect number of arguments. Must be 10" << "\n";
+ di << "Incorrect number of arguments. Must be 10\n";
return 1 /* Error */;
}
Standard_CString arg2 = argv[2];
else if (strcmp(argv[7],"G1") == 0) aCont3 = GeomAbs_C0;
else if (strcmp(argv[7],"G2") == 0) aCont3 = GeomAbs_C1;
else {
- di<< "Invalid argument Cont3e" << "\n"; return 1; }
+ di<< "Invalid argument Cont3e\n"; return 1; }
GeomAbs_Shape aCont2;
if(strcmp(argv[8],"C0") == 0) aCont2 = GeomAbs_C0;
else if (strcmp(argv[8],"C1") == 0) aCont2 = GeomAbs_C1;
else if (strcmp(argv[8],"G1") == 0) aCont2 = GeomAbs_C0;
else if (strcmp(argv[8],"G2") == 0) aCont2 = GeomAbs_C1;
else {
- di<< "Invalid argument Cont3e" << "\n"; return 1; }
+ di<< "Invalid argument Cont3e\n"; return 1; }
Handle(ShapeCustom_RestrictionParameters) aParameters = new ShapeCustom_RestrictionParameters;
TopoDS_Shape result = ShapeCustom::BSplineRestriction (Shape, Draw::Atof(argv[3]), Draw::Atof(argv[4]), Draw::Atoi(argv[5]),Draw::Atoi(argv[6]),aCont3,aCont2,(Standard_Boolean) Draw::Atoi(argv[9]),(Standard_Boolean) Draw::Atoi(argv[10]),aParameters);
- if (result.IsNull()) { di << "NO RESULT" << "\n"; return 1; }
+ if (result.IsNull()) { di << "NO RESULT\n"; return 1; }
else if (result == Shape) {
- di << "NO MODIFICATIONS" << "\n";
+ di << "NO MODIFICATIONS\n";
DBRep::Set (argv[1],result); return 0;
}
ShapeFix::SameParameter(result,Standard_False);
static Standard_Integer convtorevol(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
- if (argc < 3) { di<<"Convert surfaces to revolution: convtorevol result shape"<<"\n"; return 1; }
+ if (argc < 3) { di<<"Convert surfaces to revolution: convtorevol result shape\n"; return 1; }
Standard_CString arg1 = argv[1];
Standard_CString arg2 = argv[2];
if (Shape.IsNull()) { di<<"Shape unknown : "<<arg2<<"\n"; return 1; }
TopoDS_Shape result = ShapeCustom::ConvertToRevolution (Shape);
- if (result.IsNull()) { di<<"NO RESULT"<<"\n"; return 1; }
- else if (result == Shape) { di<<"No modif"<<"\n"; return 0; }
+ if (result.IsNull()) { di<<"NO RESULT\n"; return 1; }
+ else if (result == Shape) { di<<"No modif\n"; return 0; }
di<<"ConvertToRevolution -> Result : "<<arg1<<"\n";
DBRep::Set (arg1,result);
return 0; // Done
{
Standard_CString arg1 = argv[1];
if (argc < 2) {
- di<<"Give shape name. As is, just displays shape type"<<"\n";
- di<<" or add result_name type [mode]"<<"\n";
- di<<" Type : v (vertex) e (edge) w (wire) f (face) s (shell) so (solid)"<<"\n";
- di<<" Mode : n (normal, by default) e (explore) c (compound) x (explore+comp)"<<"\n";
+ di<<"Give shape name. As is, just displays shape type\n";
+ di<<" or add result_name type [mode]\n";
+ di<<" Type : v (vertex) e (edge) w (wire) f (face) s (shell) so (solid)\n";
+ di<<" Mode : n (normal, by default) e (explore) c (compound) x (explore+comp)\n";
return 0;
}
TopoDS_Shape Shape = DBRep::Get(arg1);
TopAbs_ShapeEnum ts = sbx.ShapeType(Shape,i);
//cout<<" Type "<<(i ? " (via Compound) : " : "(True) : ");
if (i == 0) {
- di<<" Type "<<"(True) : ";
+ di<<" Type (True) : ";
} else {
- di<<" Type "<<" (via Compound) : ";
+ di<<" Type (via Compound) : ";
}
switch (ts) {
case TopAbs_SHAPE : di<<"SHAPE (empty)"; break;
}
ShapeExtend_Explorer sbx;
Shape = sbx.SortedCompound (Shape,tse,modexp,modcom);
- if ( Shape.IsNull()) { di<<"Empty result"<<"\n"; return 0; }
+ if ( Shape.IsNull()) { di<<"Empty result\n"; return 0; }
DBRep::Set(argv[2],Shape);
}
return 0; // Done
// const Standard_CString arg1 = argv[1];
const Standard_CString arg2 (argc > 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
}
static Standard_Integer settolerance (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc < 3) {
- di<< "myshape val : forces tolerances at <val>"<<"\n"
- << "myshape < max : sets maximum tolerance to <max>"<<"\n"
- << "myshape > min : sets minimum tolerance to <min>"<<"\n"
- << "myshape min max : bounds tolerances between <min> and <max>"<<"\n"
- <<"myshape mode=v-e-f other args : idem but only on vertex-edge-face"<<"\n";
+ di<< "myshape val : forces tolerances at <val>\n"
+ << "myshape < max : sets maximum tolerance to <max>\n"
+ << "myshape > min : sets minimum tolerance to <min>\n"
+ << "myshape min max : bounds tolerances between <min> and <max>\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];
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];
}
}
TopoDS_Shape Shape = DBRep::Get(arg1);
- if (Shape.IsNull()) { di<<arg1<<" inconnu"<<"\n"; return 1 /* Error */; }
+ if (Shape.IsNull()) { di<<arg1<<" inconnu\n"; return 1 /* Error */; }
// On y va
Handle(ShapeExtend_WireData) sbwd = new ShapeExtend_WireData;
}
if (awire.IsNull()) {
di<<"Neither FACE nor WIRE : "<<arg1<<"\n";
- di<<"Considering as list of edges ..."<<"\n";
+ di<<"Considering as list of edges ...\n";
awire = Shape;
// return 1 /* Error */;
}
else di<<" FWD";
di<<" ordered to "<<iord<<" Gap="<<WO.Gap(i)<<"\n";
}
- di<<"Reorder not yet done"<<"\n";
+ di<<"Reorder not yet done\n";
sfw->FixReorder (WO);
// Mais on n execute pas
}
Standard_Integer stat = sawv.Data (i,pos,upre,ufol);
di<<i<<" : ";
switch (stat) {
- case 0 : di<<"Same Vertex"<<"\n"; break;
- case 1 : di<<"Same Coords with recorded precisions (but not Same Vertex)"<<"\n"; break;
- case 2 : di<<"Close (with preci="<< saw->Precision()<<")"<<"\n"; break;
+ case 0 : di<<"Same Vertex\n"; break;
+ case 1 : di<<"Same Coords with recorded precisions (but not Same Vertex)\n"; break;
+ case 2 : di<<"Close (with preci="<< saw->Precision()<<")\n"; break;
case 3 : di<<"End of "<<i<<" OK, Start of "<<(i == nb ? 1 : i+1)<<" at U="<<ufol; break;
case 4 : di<<"End of "<<i<<" at U="<<upre<<", Start of "<<(i == nb ? 1 : i+1)<<" OK"; break;
case 5 : di<<"Intersection, End of "<<i<<" at U="<<upre<<", Start of "<<(i == nb ? 1 : i+1)<<" at U="<<ufol; break;
- default : di<<"Disjoined"<<"\n";
+ default : di<<"Disjoined\n";
}
if (stat >= 3 && stat <= 5) di<<"\n - Position : "<<pos.X()<<" "<<pos.Y()<<" "<<pos.Z()<<"\n";
}
}
result = CW.Wire (num);
}
- else di << "Cannot apply Correct_Wire: face not defined" << "\n";
+ else di << "Cannot apply Correct_Wire: face not defined\n";
}
*/
else if (om) result = sbwd->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);
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);
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;
}
if ( par <2 ) {
di << "Use: " << argv[0] << " result shape [tolerance [max_tolerance]] [switches]\n"
- "[-maxtaila <degrees>] [-maxtailw <width>]" << "\n";
- di << "Switches allow to tune parameters of ShapeFix" << "\n";
- di << "The following syntax is used: <symbol><parameter>" << "\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 <degrees>] [-maxtailw <width>]\n";
+ di << "Switches allow to tune parameters of ShapeFix\n";
+ di << "The following syntax is used: <symbol><parameter>\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;
}
TopoDS_Shape S = DBRep::Get(a[2]);
if (S.IsNull()) {
- di << " Shape is null" << "\n";
+ di << " Shape is null\n";
return 1;
}
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;
TopoDS_Shape S = DBRep::Get(a[2]);
if (S.IsNull()) {
- di << " Shape is null" << "\n";
+ di << " Shape is null\n";
return 1;
}
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;
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]);
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;
}
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 = "<<aTol<<"\n";
di<<"on segment length = "<<aDistDomain<<"\n";
}
}
- else di<<"Edges is not overlaped"<<"\n";
+ else di<<"Edges is not overlaped\n";
return 0;
}
static Standard_Integer checkfclass2d(Draw_Interpretor& di, Standard_Integer n, const char** a)
{
if( n < 4) {
- di<<"Invalid number of arguments"<<"\n";
+ di<<"Invalid number of arguments\n";
return 1;
}
TopoDS_Shape Sh1 = DBRep::Get(a[1]);
Standard_Real ucoord = Draw::Atof(a[2]);
Standard_Real vcoord = Draw::Atof(a[3]);
if(Sh1.IsNull() || Sh1.ShapeType()!= TopAbs_FACE) {
- di<<"Invalid arguments"<<"\n";
+ di<<"Invalid arguments\n";
return 1;
}
TopoDS_Face aFace = TopoDS::Face(Sh1);
BRepTopAdaptor_FClass2d f2d(aFace,Precision::Confusion());
TopAbs_State stat = f2d.Perform(p2d);
if(stat == TopAbs_OUT)
- di<<"Point is OUT"<<"\n";
+ di<<"Point is OUT\n";
else if(stat == TopAbs_IN)
- di<<"Point is IN"<<"\n";
+ di<<"Point is IN\n";
else if(stat == TopAbs_ON)
- di<<"Point is ON"<<"\n";
+ di<<"Point is ON\n";
else
- di<<"Point is UNKNOWN"<<"\n";
+ di<<"Point is UNKNOWN\n";
return 0;
}
static Standard_Integer connectedges(Draw_Interpretor& di, Standard_Integer n, const char** a)
{
if( n < 3) {
- di<<"Invalid number of arguments. Should be : result shape [toler shared]"<<"\n";
+ di<<"Invalid number of arguments. Should be : result shape [toler shared]\n";
return 1;
}
TopoDS_Shape aSh1 = DBRep::Get(a[2]);
if(aSh1.IsNull()) {
- di<<"Shape is null"<<"\n";
+ di<<"Shape is null\n";
return 1;
}
Standard_Real aTol = Precision::Confusion();
for( ; i <= aSeqWires->Length() ; i++)
{
TopoDS_Shape aW = aSeqWires->Value(i);
- di<<"Wire - "<<i<<" : "<<"\n";
+ di<<"Wire - "<<i<<" : \n";
TopExp_Explorer aExp1(aW, TopAbs_EDGE);
for( ; aExp1.More(); aExp1.Next())
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];
TopoDS_Shape result = context->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;
//=======================================================================
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];
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<<arg1<<" inconnu"<<"\n"; return 1 /* Error */; }
+ if (Shape.IsNull()) { di<<arg1<<" inconnu\n"; return 1 /* Error */; }
Standard_Integer nbe = 0, nbf = 0; Standard_Real f3d,l3d;
for (TopExp_Explorer exp(Shape,TopAbs_EDGE); exp.More(); exp.Next()) {
(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
char nomsh[30];
- if (argc < 2) { di<<"donner un nom de wire"<<"\n"; return 1 /* Error */; }
+ if (argc < 2) { di<<"donner un nom de wire\n"; return 1 /* Error */; }
Standard_CString arg1 = argv[1];
TopoDS_Shape Shape = DBRep::Get(arg1);
- if (Shape.IsNull()) { di<<arg1<<" inconnu"<<"\n"; return 1 /* Error */; }
- if (Shape.ShapeType() != TopAbs_WIRE) { di<<"Pas un WIRE"<<"\n"; return 1 /* Error */; }
+ if (Shape.IsNull()) { di<<arg1<<" inconnu\n"; return 1 /* Error */; }
+ if (Shape.ShapeType() != TopAbs_WIRE) { di<<"Pas un WIRE\n"; return 1 /* Error */; }
TopoDS_Wire W = TopoDS::Wire (Shape);
TopoDS_Face F;
if (argc > 2) {
}
int* nbs = new int[nbe+1]; for (i = 0; i <= nbe; i ++) nbs[i] = 0;
- di<<"TopoDS_Iterator(EDGE) donne "<<nbe<<" Edges dont "<<num<<" distinctes"<<"\n";
+ di<<"TopoDS_Iterator(EDGE) donne "<<nbe<<" Edges dont "<<num<<" distinctes\n";
nbe = num;
nbw = 0;
for (TopExp_Explorer exe(W.Oriented(TopAbs_FORWARD),TopAbs_EDGE); exe.More(); exe.Next()) nbw ++;
- di<<"TopExp_Explorer(EDGE) donne "<<nbw<<" Edges"<<"\n";
+ di<<"TopExp_Explorer(EDGE) donne "<<nbw<<" Edges\n";
nbw = 0;
BRepTools_WireExplorer bwe;
if (F.IsNull()) bwe.Init(W);
num = map.FindIndex(E);
nbs[num] ++;
}
- di<<"BRepTools_WireExplorer donne "<<nbw<<" Edges"<<"\n";
- di<<"Par rapport a la map, edges sautees par WE en NOWE_num, passees > 1 fois en MULTWE_num"<<"\n";
- if (nbs[0] > 0) di<<"NB : Edge n0 0 comptee "<<nbs[0]<<" fois"<<"\n";
+ di<<"BRepTools_WireExplorer donne "<<nbw<<" Edges\n";
+ di<<"Par rapport a la map, edges sautees par WE en NOWE_num, passees > 1 fois en MULTWE_num\n";
+ if (nbs[0] > 0) di<<"NB : Edge n0 0 comptee "<<nbs[0]<<" fois\n";
for (i = 1; i <= nbe; i ++) {
if (nbs[i] < 1) {
- di<<"Edge n0 "<<i<<" pas vue par WE"<<"\n";
+ di<<"Edge n0 "<<i<<" pas vue par WE\n";
Sprintf (nomsh,"NOWE_%d",i);
DBRep::Set (nomsh,map.FindKey(i));
} else if (nbs[i] > 1) {
- di<<"Edge n0 "<<i<<" vue par WE : "<<nbs[i]<<" fois"<<"\n";
+ di<<"Edge n0 "<<i<<" vue par WE : "<<nbs[i]<<" fois\n";
Sprintf (nomsh,"MULT_%d",i);
DBRep::Set (nomsh,map.FindKey(i));
}
static Standard_Integer XSHAPE_ssolid
(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
- if (argc < 3) { di<<"Give new solid name + shell name"<<"\n"; return 1 /* Error */; }
+ if (argc < 3) { di<<"Give new solid name + shell name\n"; return 1 /* Error */; }
Standard_CString arg1 = argv[1];
TopoDS_Shape Shape = DBRep::Get(arg1);
if (Shape.IsNull()) { di<<"Shape unknown : "<<arg1<<"\n"; return 1 /* Error */; }
TopAbs_ShapeEnum shen = Shape.ShapeType();
if (shen == TopAbs_SOLID) {
- di<<" Already a Solide ! nothing done"<<"\n";
+ di<<" Already a Solide ! nothing done\n";
return 0;
}
if (shen != TopAbs_SHELL) {
- di<<" Not a Shell"<<"\n"; return 1 /* Error */;
+ di<<" Not a Shell\n"; return 1 /* Error */;
}
if (!Shape.Free ()) {
- di<<"Shape non Free -> Freeing"<<"\n";
+ di<<"Shape non Free -> Freeing\n";
Shape.Free(Standard_True);
}
TopoDS_Shell sh = TopoDS::Shell (Shape);
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();
Standard_Real tolang = Precision::Angular(); // = Interface_Static::RVal("XSTEP.encoderegularity.angle");
// if (argc < 3) di<<"Current value for regularity angle : "<<tolang<<"\n";
if (argc < 3) {
- di<<"Donner nom de shape.\n + option : angle en radian, sinon la valeur courante est prise"<<"\n";
+ di<<"Donner nom de shape.\n + option : angle en radian, sinon la valeur courante est prise\n";
return 0;
}
Standard_CString arg1 = argv[1];
DrawTrSurf::Set(argv[1],NewC2d);
}
else {
- 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";
+ 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;
// 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:
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
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);
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
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;
}
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();
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);
// 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);
// 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;
}
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);
// 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);
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;
}
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;
}
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
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;
}
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
// a[3]= Tolerance
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;
}
//theTool.SetTolerance(Tol);
theTool.Build();
if (!theTool.IsDone()) {
- di << "Not done" << "\n";
+ di << "Not done\n";
return 1;
}
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;
}
// 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;
}
// a[2]= Tolerance
if (n < 3) {
- di << "bad number of arguments" <<"\n";
+ di << "bad number of arguments\n";
return 1;
}
// a[2]= Tolerance
if (n < 3) {
- di << "bad number of arguments" <<"\n";
+ di << "bad number of arguments\n";
return 1;
}
{
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;
}
{
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;
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
// a[4+nbU*nbV]= Tolerance
if (n <4) {
- di << "bad number of arguments" <<"\n";
+ di << "bad number of arguments\n";
return 1;
}
/*
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;
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;
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();
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++) {
(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 */;
}
(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 */;
}
(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;
}
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 ) {
}
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;
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 );
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);
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;
}
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]);
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;
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;
}
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<<aRemovedWires.Length()<<" internal wires were removed"<<"\n";
+ di<<aRemovedWires.Length()<<" internal wires were removed\n";
}
if(aTool->Status(ShapeExtend_DONE2)) {
const TopTools_SequenceOfShape& aRemovedFaces =aTool->RemovedFaces();
- di<<aRemovedFaces.Length()<<" small faces were removed"<<"\n";
+ di<<aRemovedFaces.Length()<<" small faces were removed\n";
}
TopoDS_Shape res = aTool->GetResult();
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;
}
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]);
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"<<endl;
+// if (ShapeUpgrade::Debug()) cout<<". Surface is not a Bspline"<<endl;
return;
}
if(mySurface->Continuity() >= myCriterion) {
CS = FindSubShapeInAncestor(aShape, AS);
// <=== end 21.10.2009
#ifdef OCCT_DEBUG_OR
- cout << "ORIENTATION: Selection" <<" TShape = " <<CS.TShape() <<" Orientation = " << CS.Orientation() <<endl;
- cout << "ORIENTATION: Context " << "ShapeType = "<<AS.ShapeType() << " TShape = " <<AS.TShape() <<endl;
+ cout << "ORIENTATION: Selection TShape = " <<CS.TShape() <<" Orientation = " << CS.Orientation() <<endl;
+ cout << "ORIENTATION: Context ShapeType = "<<AS.ShapeType() << " TShape = " <<AS.TShape() <<endl;
DbgTools_Write(AS, "Orientation_Cnt.brep");
#endif
if(!CS.IsNull()) {
}
#ifdef OCCT_DEBUG_WIN
- cout <<"WIREIN: " << " Internal Map ext = " << aSet.Map().Extent()<<endl;
+ cout <<"WIREIN: Internal Map ext = " << aSet.Map().Extent()<<endl;
TopTools_MapIteratorOfMapOfShape it1 (aSet.Map());
for (int i=1;it1.More();it1.Next(),i++) {
cout << "Map("<<i<<"): TShape = " << it1.Key().TShape() << " Orient = " << it1.Key().Orientation() <<" Type = " <<
}
#ifdef OCCT_DEBUG_SHELL
- cout <<"SHELLIN: " << " Internal Map ext = " << aSet.Map().Extent()<<endl;
+ cout <<"SHELLIN: Internal Map ext = " << aSet.Map().Extent()<<endl;
TopTools_MapIteratorOfMapOfShape it1 (aSet.Map());
for (int i=1;it1.More();it1.Next(),i++) {
cout << "Map("<<i<<"): TShape = " << it1.Key().TShape() << " Orient = " << it1.Key().Orientation() <<" Type = " <<
if(!Selection.IsSame(aSelection) && Selection.ShapeType() != TopAbs_COMPOUND) {
TCollection_AsciiString entry;
TDF_Tool::Entry(NS->Label(), entry);
- cout << "Selection is Not Same (NSLabel = " <<entry<<"): " << "TShape1 = " <<
+ cout << "Selection is Not Same (NSLabel = " <<entry<<"): TShape1 = " <<
Selection.TShape()->This() << " TShape2 = " <<aSelection.TShape()->This() <<endl;
}
#endif
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";
}
- else di << argv[1] << " is already a document" << "\n";
+ else di << argv[1] << " is already a document\n";
return 0;
}
isSaved = aModel->Save();
if (!isSaved) {
- di << "Error: Document not saved" << "\n";
+ di << "Error: Document not saved\n";
return 1;
}
return 0;
if (!isLoaded) {
- di << "Error: Document not loaded" << "\n";
+ di << "Error: Document not loaded\n";
return 1;
}
return 0;
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] );
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") )
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") )
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 );
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();
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] ) );
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();
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
}
}
}
if ( !eca && !esa ) {
- interpretor<<"edge "<<ie<<" has no ancestors"<<"\n";
+ interpretor<<"edge "<<ie<<" has no ancestors\n";
}
}
}
{
switch(na) {
case 1:
- di<<"toposet <kind> <index> <tol>"<<"\n";
- di<<"toposet <kind = Point> <index> <x> <y> <z>"<<"\n";
- di<<"kind = p | c | s | v | e | f | w "<<"\n";
+ di<<"toposet <kind> <index> <tol>\n";
+ di<<"toposet <kind = Point> <index> <x> <y> <z>\n";
+ di<<"kind = p | c | s | v | e | f | w \n";
return 1;
case 4:
if(!strcasecmp(a[1],"p"))
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<PT.Tnb();ic++) di<<PT.Tkeys(ic).ToCString()<<" : "<<PT.Thelp(ic).ToCString()<<"\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 <name> 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 <name> 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";
}
// -------------------------------------------------------
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 "<<nfa<<" newfaces"<<"\n";
+ di<<"face gives "<<nfa<<" newfaces\n";
Standard_Integer i = 0;
TopTools_ListIteratorOfListOfShape itlof(lof) ;
BRep_Builder BB;
TopoDS_Compound CC; BB.MakeCompound(CC);
for (itlof.Initialize(lof); itlof.More(); itlof.Next()) BB.Add(CC, itlof.Value());
- di<<"resulting compound is cmp"<<"\n";
+ di<<"resulting compound is cmp\n";
TCollection_AsciiString aa = TCollection_AsciiString("cmp");
FUN_draw(aa,CC);
TopoDS_Shape aLocalShape = DBRep::Get(a[1]);
const TopoDS_Face& fa = TopoDS::Face(aLocalShape);
// const 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_ListOfShape fsplits;
// Standard_Boolean splitok = FUN_tool_SplitF(fa,fsplits);
Standard_Boolean splitok = TopOpeBRepTool_REGUS::SplitF(fa,fsplits);
- if (!splitok) {di<<"no splits"<<"\n"; return 0;}
- di<<"fa gives "<<fsplits.Extent()<<" splits"<<"\n";
+ if (!splitok) {di<<"no splits\n"; return 0;}
+ di<<"fa gives "<<fsplits.Extent()<<" splits\n";
BRep_Builder BB;
TopoDS_Compound CC; BB.MakeCompound(CC);
for (TopTools_ListIteratorOfListOfShape it(fsplits); it.More(); it.Next()) BB.Add(CC, it.Value());
- di<<"resulting compound is cmp"<<"\n";
+ di<<"resulting compound is cmp\n";
TCollection_AsciiString aa = TCollection_AsciiString("cmp");
FUN_draw(aa,CC);
return 0;
{
if (n < 2) return 1;
const TopoDS_Shape& sha = DBRep::Get(a[1]);
- if (sha.IsNull()) {di<<"null shape"<<"\n"; return 1;}
+ if (sha.IsNull()) {di<<"null shape\n"; return 1;}
TopExp_Explorer ex(sha, TopAbs_SOLID);
const TopoDS_Solid& so = TopoDS::Solid(ex.Current());
- if (so.IsNull()) {di<<"no solid"<<"\n"; return 1;}
+ if (so.IsNull()) {di<<"no solid\n"; return 1;}
TopTools_DataMapOfShapeListOfShape FSplits;
TopTools_DataMapOfShapeListOfShape OldSheNewShe;
TopoDS_Compound CC; BB.MakeCompound(CC);
Standard_Integer nshe = 0;
Standard_Boolean regu = TopOpeBRepTool::RegularizeShells(so,OldSheNewShe,FSplits);
- if (!regu) {di<<"solid gives no new shell"<<"\n";}
+ if (!regu) {di<<"solid gives no new shell\n";}
else {
Standard_Integer noldshe = OldSheNewShe.Extent();
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape ite(OldSheNewShe);
}
} // i = 1..noldshe
di <<"noldshe = "<<noldshe<<" gives nshe = "<<nshe<<"\n";
- di<<"resulting compound is cmp"<<"\n";
+ di<<"resulting compound is cmp\n";
TCollection_AsciiString aa = TCollection_AsciiString("cmp");
FUN_draw(aa,CC);
}
{
if (n < 2) return 1;
const TopoDS_Shape& sha = DBRep::Get(a[1]);
- if (sha.IsNull()) {di<<"null shape"<<"\n"; return 1;}
+ if (sha.IsNull()) {di<<"null shape\n"; return 1;}
TopExp_Explorer ex(sha, TopAbs_SOLID);
const TopoDS_Solid& so = TopoDS::Solid(ex.Current());
- if (so.IsNull()) {di<<"no solid"<<"\n"; return 1;}
+ if (so.IsNull()) {di<<"no solid\n"; return 1;}
TopTools_DataMapOfShapeListOfShape FSplits;
TopTools_DataMapOfShapeListOfShape OldSheNewShe;
TopoDS_Compound CC; BB.MakeCompound(CC);
// Standard_Integer nshe = 0;
Standard_Boolean regu = TopOpeBRepTool::RegularizeShells(so,OldSheNewShe,FSplits);
- if (!regu) {di<<"solid gives no new shell"<<"\n";}
+ if (!regu) {di<<"solid gives no new shell\n";}
else {
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(OldSheNewShe);
aBBuilder.Add(aCompound,spli);
nSo++;
}
- di<<"so gives "<<nSo<<" new solids"<<"\n";
- di<<"resulting compound is cmp"<<"\n";
+ di<<"so gives "<<nSo<<" new solids\n";
+ di<<"resulting compound is cmp\n";
TCollection_AsciiString aa = TCollection_AsciiString("cmp");
FUN_draw(aa, aCompound);
}
TopTools_ListIteratorOfListOfShape itw(lWs);
for (; itw.More(); itw.Next()) BB.Add(newF, TopoDS::Wire(itw.Value()));
- di <<"New face built is newF"<<"\n";
+ di <<"New face built is newF\n";
TCollection_AsciiString aa("newF");
FUN_draw(aa, newF);
return 0;
FC2D_Prepare(F,F);
- if (F.IsNull() || Fsp.IsNull()) {di<<"NULL shape(s)"<<"\n";return 1;}
+ if (F.IsNull() || Fsp.IsNull()) {di<<"NULL shape(s)\n";return 1;}
TopOpeBRepTool::CorrectONUVISO(F,Fsp);
TCollection_AsciiString aa("newFsp");
FUN_draw(aa,Fsp);
- di<<"-> newFsp"<<"\n";
+ di<<"-> newFsp\n";
return 0;
}
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;
}
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)
// 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;
}
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);
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;
}
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 "<<x<<" =("<<p.X()<<",";
- di<<p.Y()<<","<<p.Z()<<")"<<"\n";
+ di<<p.Y()<<","<<p.Z()<<")\n";
return 0;
}
if (n < 4) return 1;
Standard_Real x = Draw::Atof(a[1]);
Handle(Geom2d_Curve) C2d = DrawTrSurf::GetCurve2d(a[2]);
- if (C2d.IsNull()) {di<<"null curve"<<"\n"; return 1;}
+ if (C2d.IsNull()) {di<<"null curve\n"; return 1;}
Handle(Geom_Surface) S = DrawTrSurf::GetSurface(a[3]);
- if (S.IsNull()) {di<<"null surface"<<"\n"; return 1;}
+ if (S.IsNull()) {di<<"null surface\n"; return 1;}
gp_Pnt2d p2d = C2d->Value(x);
- di<<"point on curve of parameter "<<x<<" =("<<p2d.X()<<","<<p2d.Y()<<")"<<"\n";
+ di<<"point on curve of parameter "<<x<<" =("<<p2d.X()<<","<<p2d.Y()<<")\n";
gp_Pnt p = S->Value(p2d.X(),p2d.Y());
di<<"point on curve of parameter "<<x<<" =("<<p.X()<<",";
- di<<p.Y()<<","<<p.Z()<<")"<<"\n";
+ di<<p.Y()<<","<<p.Z()<<")\n";
return 0;
}
TopoDS_Face f = TopoDS::Face(aLocalShape);
//
if (f.IsNull()) {
- di<<"null shape"<<"\n";
+ di<<"null shape\n";
return 1;
}
//
ok = FUN_tool_projPonF(p, f, uv, dist, anExtFlag, anExtAlgo);
//
if (!ok) {
- di<<"projection failed"<<"\n";
+ di<<"projection failed\n";
return 1;
}
//
ok = FUN_tool_value(uv,f,pproj);
if (!ok) {
- di<<"projection failed"<<"\n";
+ di<<"projection failed\n";
return 1;
}
//
di<<"proj dist = "<<dist<<" uvproj = ("<<uv.X()<<" "<<uv.Y();
- di<<"); pproj = ("<<pproj.X()<<" "<<pproj.Y()<<" "<<pproj.Z()<<")"<<"\n";
+ di<<"); pproj = ("<<pproj.X()<<" "<<pproj.Y()<<" "<<pproj.Z()<<")\n";
return 0;
}
{
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]);
TopAbs_State sta = TopAbs_UNKNOWN;
if (s.ShapeType() == TopAbs_SOLID) soclassi.Classify(TopoDS::Solid(s),p,tol);
else if (s.ShapeType() == TopAbs_SHELL) soclassi.Classify(TopoDS::Shell(s),p,tol);
- else {di<<"shape is not a solid nor a shell => KO"<<"\n"; return 1;}
+ else {di<<"shape is not a solid nor a shell => KO\n"; return 1;}
sta = soclassi.State();
di<<"point is ";
Standard_SStream aSStream;
TopAbs::Print(sta,aSStream);
di << aSStream;
- di<<" shape s"<<"\n";
+ di<<" shape s\n";
return 0;
}
{
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]);
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);
}
}
Standard_SStream aSStream;
TopAbs::Print(sta,aSStream);
di << aSStream;
- di<<" shape ref"<<"\n";
+ di<<" shape ref\n";
return 0;
}
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]);
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);
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("<<i<<") = { ("<<p.X()<<" "<<p.Y()<<" "<<p.Z()<<"), ("<<u<<" "<<v<<") }"<<"\n";
+ di<<"point("<<i<<") = { ("<<p.X()<<" "<<p.Y()<<" "<<p.Z()<<"), ("<<u<<" "<<v<<") }\n";
props.SetParameters(u,v);
Standard_Boolean curdef = props.IsCurvatureDefined();
- if (!curdef) {di<<"!IsCurvatureDefined"<<"\n"; continue;}
+ if (!curdef) {di<<"!IsCurvatureDefined\n"; continue;}
Standard_Boolean umbilic = props.IsUmbilic();
if (umbilic) {
D1 = gp_Dir(0,0,1);
props.CurvatureDirections(D1,D2);
}
Norm = gp_Dir(D1^D2);
- di<<"D1 = ("<<D1.X()<<" "<<D1.Y()<<" "<<D1.Z()<<" "<<")"<<"\n";
- di<<"D2 = ("<<D2.X()<<" "<<D2.Y()<<" "<<D2.Z()<<" "<<")"<<"\n";
- di<<"Norm = ("<<Norm.X()<<" "<<Norm.Y()<<" "<<Norm.Z()<<" "<<")"<<"\n";
+ di<<"D1 = ("<<D1.X()<<" "<<D1.Y()<<" "<<D1.Z()<<" )\n";
+ di<<"D2 = ("<<D2.X()<<" "<<D2.Y()<<" "<<D2.Z()<<" )\n";
+ di<<"Norm = ("<<Norm.X()<<" "<<Norm.Y()<<" "<<Norm.Z()<<" )\n";
} // i
return 0;
}
//-----------------------------------------------------------------------
static void tsee_help(const char* CommandName, Draw_Interpretor& di)
{
- 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 <type> and an <index>."<<"\n";
- di<<"basic usage :"<<"\n";
- di<<" tsee <type> <index1 index2 ...>"<<"\n";
- di<<"<type> = 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<<"<index> = 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 <t> <i>' creates the drawable object named <t>_<i>."<<"\n";
- di<<"This name is displayed near the entity in one if the forms : "<<"\n";
- di<<" *<t>_<i> meaning entity belongs to the first shape of current operation."<<"\n";
- di<<" <t>_<i>* meaning entity belongs to the second shape of current operation."<<"\n";
- di<<""<<"\n";
- di<<"Same Domain shapes : "<<"\n";
- di<<"'tsee <type> sd' to display all shapes of <type> 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 <type> and an <index>.\n";
+ di<<"basic usage :\n";
+ di<<" tsee <type> <index1 index2 ...>\n";
+ di<<"<type> = 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<<"<index> = 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 <t> <i>' creates the drawable object named <t>_<i>.\n";
+ di<<"This name is displayed near the entity in one if the forms : \n";
+ di<<" *<t>_<i> meaning entity belongs to the first shape of current operation.\n";
+ di<<" <t>_<i>* meaning entity belongs to the second shape of current operation.\n";
+ di<<"\n";
+ di<<"Same Domain shapes : \n";
+ di<<"'tsee <type> sd' to display all shapes of <type> 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 <i>' displays edge described as section edge <i>."<<"\n";
- di<<" The name of a section edge likes t_i<j>,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 <i>' displays edge described as section edge <i>.\n";
+ di<<" The name of a section edge likes t_i<j>,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 <index1 index2 ...>"<<"\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 <index1 index2 ...>."<<"\n";
+ di<<"tds : dump current DS (loaded by CurrentDS())\n";
+ di<<"basic usage : tds <-arg> type <index1 index2 ...>\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 <index1 index2 ...>.\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"))) {
// 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()) {
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;
}
ok = Standard_True;
ok = ok && (ip <= HDS->NbPoints());
if (ok) pds = HDS->Point(ip).Point();
- if (!ok) di<<" geometry "<<ip<<" is not a point"<<"\n";
+ if (!ok) di<<" geometry "<<ip<<" is not a point\n";
}
if (!strcmp("v",a[1])){
ok = Standard_True;
ok = ok && (sh.ShapeType() == TopAbs_VERTEX);
if (ok) pds =BRep_Tool::Pnt(TopoDS::Vertex(sh));
}
- if (!ok) di<<" shape "<<ip<<" is not a vertex"<<"\n";
+ if (!ok) di<<" shape "<<ip<<" is not a vertex\n";
}
if (!strcmp("e",a[3])){
ok = ok && (ie <= HDS->NbShapes());
ok = ok && (sh.ShapeType() == TopAbs_EDGE);
if (ok) ed = TopoDS::Edge(sh);
}
- if (!ok) di<<" shape "<<ie<<" is not an edge"<<"\n";
+ if (!ok) di<<" shape "<<ie<<" is not an edge\n";
} else ok = Standard_False;
char* ppp = (char *)pp.ToCString();
DrawTrSurf::Set(ppp,pproj);
di<<"dist point "<<ip<<" on edge "<<ie<<" = "<<dmin<<"\n";
- } else di<<"projection failed"<<"\n";
+ } else di<<"projection failed\n";
return ok;
} // TPPE
{
if ( PHDSD == NULL ) return;
PHDSD->CurrentHDS()->ChkIntg();
- di<<"Check interference integrity completed"<<"\n";
+ di<<"Check interference integrity completed\n";
}
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
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";
}
//---------------------------------------------------------
}
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;
static void tcx_help(Draw_Interpretor& di)
{
- di<<"tcx : function not documented"<<"\n";
+ di<<"tcx : function not documented\n";
}
//-----------------------------------------------------------------------
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 <i> 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 <i> 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";
}
// ----------------------------------------------------------------------
}
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;
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<xmax; x+=dx) {
for(Standard_Real y=ymin; y<ymax; y+=dx) {
//-- cout<<x<<" "<<y<<" "<<zmin<<" "<<x<<" "<<y<<" "<<zmax<<"\n";
di<<"line l "<<x<<" "<<y<<" "<<zmin<<" 0 0 1;mkedge e l 0 ";
- di<<zmax-zmin<<" ;orient e EXTERNAL; add e CE"<<"\n";
+ di<<zmax-zmin<<" ;orient e EXTERNAL; add e CE\n";
if(dy==0) y=ymax;
}
if(dx==0) x=xmax;
{
TopoDS_Shape V = DBRep::Get(a[1]);
if (V.IsNull()) {
- di<<"null shape"<<"\n";
+ di<<"null shape\n";
return 1;
}
gp_Pnt pV = BRep_Tool::Pnt(TopoDS::Vertex(V));
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]);
void VarsTopo::DumpOCT(Standard_OStream& OS) const
{
if (myOCT == TopOpeBRepTool_APPROX)
- OS<<"section curves approximated"<<"\n";
+ OS<<"section curves approximated\n";
if (myOCT == TopOpeBRepTool_BSPLINE1)
- OS<<"section curves discretizated"<<"\n";
+ OS<<"section curves discretizated\n";
}
void VarsTopo::DumpC2D(Standard_OStream& OS) const
void VarsTopo::DumpTolx(Standard_OStream& OS) const
{
OS<<"approximation tolerances : ";
- OS<<"(3d "<<mytol3x<<"), (2d "<<mytol2x<<")"<<"\n";
+ OS<<"(3d "<<mytol3x<<"), (2d "<<mytol2x<<")\n";
}
void VarsTopo::DumpToli(Standard_OStream& OS) const
{
if (myforcetoli) {
OS<<"intersection tolerances : ";
- OS<<"(tolarc "<<mytolarc<<"), (toltan "<<mytoltan<<")"<<"\n";
+ OS<<"(tolarc "<<mytolarc<<"), (toltan "<<mytoltan<<")\n";
}
else {
- OS<<"intersection with shape tolerances"<<"\n";
+ OS<<"intersection with shape tolerances\n";
}
}
void VarsTopo::DumpClear(Standard_OStream& OS) const
{
- if (myclear) OS<<"clear ON"<<"\n";
- else OS<<"clear OFF"<<"\n";
+ if (myclear) OS<<"clear ON\n";
+ else OS<<"clear OFF\n";
}
void VarsTopo::DumpMode(Standard_OStream& OS) const
#ifdef OCCT_DEBUG
Standard_Integer iS; Standard_Boolean tSPS = GtraceSPS(S,iS);
if (tSPS) {
- cout<<"tosplit "<<tosplit<<" : "<<"!issplit "<<(!issplit);
+ cout<<"tosplit "<<tosplit<<" : !issplit "<<(!issplit);
cout<<" && (hasgeom || hassame) ("<<hasgeom<<" || "<<hassame<<")"<<endl;
}
#endif
Standard_Integer iS; Standard_Boolean tSPS = GtraceSPS(S,iS);
if (tSPS) {
cout<<"GToSplit ";GdumpSHA(S);cout<<" ";TopAbs::Print(TB,cout);
- cout<<" "<<tosplit<<" : "<<"!issplit "<<(!issplit);
+ cout<<" "<<tosplit<<" : !issplit "<<(!issplit);
cout<<" && (facshap || hasgeom || hassame) ";
cout<<"("<<facshap<<" || "<<hasgeom<<" || "<<hassame<<")"<<endl;
cout.flush();
} //CONTEXT
Standard_Boolean tosplitH = tosplit || hasON; //CONTEXT
if(tSPS){cout<<"GToSplit context SPEON";} //CONTEXT
- if(tSPS){cout<<" "<<tosplitH<<" : "<<"tosplit "<<tosplit;} //CONTEXT
+ if(tSPS){cout<<" "<<tosplitH<<" : tosplit "<<tosplit;} //CONTEXT
if(tSPS){cout<<" || hasON "<<hasON<<endl;} //CONTEXT
} //CONTEXT
#endif
cout<<" parEE "<<parEE<<endl;
cout<<" puEE,pvEE "<<pEE.X()<<" "<<pEE.Y();
cout<<" d1uEE,d1vEE "<<d1EE.X()<<" "<<d1EE.Y()<<endl;
- cout<<" --> cross "<<" "<<cross<<endl;
+ cout<<" --> cross "<<cross<<endl;
if ( t2 ) cout<<" t2 --> on garde EE"<<endl<<endl;
else cout<<" t2 --> on vire EE"<<endl<<endl;
DMI.Initialize(MapStat);
if(DMI.More()) {
Standard_Boolean b = Standard_True;
- OS<<" "<<eltstr<<"\t"<<"(/"<<MapStat.Extent()<<")\tnumber ";
+ OS<<" "<<eltstr<<"\t(/"<<MapStat.Extent()<<")\tnumber ";
PrintElts(MapStat, TopOpeBRepDS_OK, b, OS);
if(!b) OS<<" = OK"<<endl;
OS<<endl;
TCollection_AsciiString s = "---- ";
- OS<<s<<"Section Edges"<<" : "<<nse<<" edges"<<endl;
+ OS<<s<<"Section Edges : "<<nse<<" edges"<<endl;
for(Standard_Integer i = 1; i <= nse; i++) {
DumpSectionEdge(K,i,OS);
}
(Standard_OStream& OS) const
{
#ifdef OCCT_DEBUG
- OS<<"EVI"<<" ";
+ OS<<"EVI ";
TopOpeBRepDS_ShapeShapeInterference::Dump(OS);
OS<<" "<<myParam<<" ";
#endif
(Standard_OStream& OS) const
{
#ifdef OCCT_DEBUG
- OS<<"("; TopOpeBRepDS::Print(myC,OS); OS<<")"<<" ";
+ OS<<"("; TopOpeBRepDS::Print(myC,OS); OS<<") ";
if (myGBound) OS<<"(Gb 1) ";
else OS<<"(Gb 0) ";
TopOpeBRepDS_Interference::Dump(OS);
if (!ok) {FUN_Raise(); return Standard_False;}
}
#ifdef OCCT_DEBUG
- if (trc) cout<<" ang("<<"f"<<FUN_adds(fref)<<",f"<<FUN_adds(ffound)<<")="<<angfound<<endl;
+ if (trc) cout<<" ang(f"<<FUN_adds(fref)<<",f"<<FUN_adds(ffound)<<")="<<angfound<<endl;
#endif
break;
}
if (!ok) {FUN_Raise(); return Standard_False;}
}
#ifdef OCCT_DEBUG
- if (trc) cout<<" ang("<<"f"<<FUN_adds(fref)<<",f"<<FUN_adds(fi)<<")="<<angi<<endl;
+ if (trc) cout<<" ang(f"<<FUN_adds(fref)<<",f"<<FUN_adds(fi)<<")="<<angi<<endl;
#endif
if (angi > angfound) continue;
angfound = angi;
Standard_Boolean trc = TopOpeBRepTool_GettraceREGUFA();
if (trc)
{cout<<"** setting new connexity : v"<<FUN_adds(v)<<" is ";FUN_tro(OriKey);
- cout<<" in "<<" e"<<FUN_adds(e);FUN_tool_tori(e.Orientation());
+ cout<<" in e"<<FUN_adds(e);FUN_tool_tori(e.Orientation());
TopoDS_Vertex vclo; Standard_Boolean cloE = TopOpeBRepTool_TOOL::ClosedE(e,vclo); if (cloE) cout<<" closed";
Standard_Boolean dgE = BRep_Tool::Degenerated(e); if (dgE) cout<<" degenerated";cout<<endl;}
#endif
myLocations.Dump(OS);
- OS << endl;
+ OS << "\n";
}
// write the copyright
if (myFormatNb == 2)
- OS << "\n" << Version2 << endl;
+ OS << "\n" << Version2 << "\n";
else
- OS << "\n" << Version << endl;
+ OS << "\n" << Version << "\n";
//-----------------------------------------
// write the locations
}
if (!myProgress.IsNull() && myProgress->UserBreak()) {
- OS << "Interrupted by the user"<<endl;
+ OS << "Interrupted by the user\n";
OS.imbue (anOldLocale);
return;
}
OS << "\n";
}
- OS << endl;
+ OS << "\n";
OS.precision(prec);
OS.imbue (anOldLocale);
myProgress->EndScope();
myProgress->Show();
if (myProgress->UserBreak())
- OS << "Interrupted by the user"<<endl;
+ OS << "Interrupted by the user\n";
}
}
{
if (theArgsNb < 2)
{
- std::cout << theArgv[0] << ": " << " invalid arguments.\n";
+ std::cout << theArgv[0] << ": invalid arguments.\n";
std::cout << "Type help for more information.\n";
return 1;
}
// equal to -scale, -origin, -repeat options of vtexture command
if (theArgsNb < 2 || theArgsNb > 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;
}
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;
}
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)
{
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;
}
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;
}
}
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);
}
a3DView() -> Redraw();
myTimer.Stop();
- di<<" Temps ecoule "<<"\n";
+ di<<" Temps ecoule \n";
myTimer.Show();
return 0;
}
//==================================================================================
static int VAnimation (Draw_Interpretor& di, Standard_Integer argc, const char** argv) {
if (argc != 5) {
- di<<"Use: "<<argv[0]<<" CrankArmFile CylinderHeadFile PropellerFile EngineBlockFile"<<"\n";
+ di<<"Use: "<<argv[0]<<" CrankArmFile CylinderHeadFile PropellerFile EngineBlockFile\n";
return 1;
}
BRepTools::Read(Propeller,argv[3],B);
BRepTools::Read(EngineBlock,argv[4],B);
- if (CrankArm.IsNull() || CylinderHead.IsNull() || Propeller.IsNull() || EngineBlock.IsNull()) {di<<" Syntaxe error:loading failure."<<"\n";}
+ if (CrankArm.IsNull() || CylinderHead.IsNull() || Propeller.IsNull() || EngineBlock.IsNull()) {di<<" Syntaxe error:loading failure.\n";}
OSD_Timer myTimer;
const Standard_Boolean HaveToSet = (strcasecmp(argv[0],"vsetam") == 0);
// verification des arguments
if (HaveToSet) {
- if (argc<2||argc>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();
}
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();
Colum[i].Center(20,' ');
for(i=0;i<=2;i++)
di<<"|"<<Colum[i].ToCString();
- di<<"|"<<"\n";
+ di<<"|\n";
di<<BlankLine.ToCString()<<"\n";
curcolum[j].Center(20,' ');
di<<"|"<<curcolum[j].ToCString();
}
- di<<"|"<<"\n";
+ di<<"|\n";
}
di<<BlankLine.ToCString()<<"\n";
curcolum[j].Center(20,' ');
di<<"|"<<curcolum[j].ToCString();
}
- di<<"|"<<"\n";
+ di<<"|\n";
}
di<<BlankLine.ToCString()<<"\n";
// les IO de type objet...
curcolum[j].Center(20,' ');
di<<"|"<<curcolum[j].ToCString();
}
- di<<"|"<<"\n";
+ di<<"|\n";
}
di<<BlankLine.ToCString()<<"\n";
// les contraintes et dimensions.
curcolum[j].Center(20,' ');
di<<"|"<<curcolum[j].ToCString();
}
- di<<"|"<<"\n";
+ di<<"|\n";
}
di<<BlankLine.ToCString()<<"\n";
ViewerTest_DoubleMapOfInteractiveAndName& aMap = GetMapOfAIS();
if (!aMap.IsBound2 (aName) )
{
- std::cerr << "Use 'vdisplay' before" << "\n";
+ std::cerr << "Use 'vdisplay' before\n";
return 1;
}
}
} else {
#ifdef OCCT_DEBUG
- cout <<"DONT_SWITCH_IS_VALID non positionne"<<"\n";
+ cout <<"DONT_SWITCH_IS_VALID non positionne\n";
#endif
}
Standard_Boolean IsValid = Standard_True;
TopoDS_Face Face = TopoDS::Face(face);
TopoDS_Shape Plane = GetShapeFromName(argv[3]);
if (Plane.IsNull ()) {
- di << "TEST : Plane is NULL" << "\n";
+ di << "TEST : Plane is NULL\n";
return 1;
}
anAngle = Draw::Atof(argv[4]);
TopoDS_Face face2 = TopoDS::Face(Plane);
if(!AIS::GetPlaneFromFace(face2, aPln, aSurf, aSurfType, Offset))
{
- di << "TEST : Can't find plane" << "\n";
+ di << "TEST : Can't find plane\n";
return 1;
}
BRepOffsetAPI_DraftAngle Draft (Solid);
if(Abs(anAngle)< Precision::Angular()) {
- di << "TEST : NULL angle" << "\n";
+ di << "TEST : NULL angle\n";
return 1;}
if(Rev) anAngle = - anAngle;
Draft.Add (Face, aDir, anAngle, aPln);
Draft.Build ();
if (!Draft.IsDone()) {
- di << "TEST : Draft Not DONE " << "\n";
+ di << "TEST : Draft Not DONE \n";
return 1;
}
TopTools_ListOfShape Larg;
Larg.Append(Solid);
if (!IsValid(Larg,Draft.Shape(),Standard_True,Standard_False)) {
- di << "TEST : DesignAlgo returns Not valid" << "\n";
+ di << "TEST : DesignAlgo returns Not valid\n";
return 1;
}
ViewerTest::AviCommands(theDI);
#ifdef OCCT_DEBUG
- theDI << "Draw Plugin : OCC V2d & V3d commands are loaded" << "\n";
+ theDI << "Draw Plugin : OCC V2d & V3d commands are loaded\n";
#endif
}
{
// Verification des arguments
- if ( argc!=2) {di<<argv[0]<<" error"<<"\n"; return 1;}
+ if ( argc!=2) {di<<argv[0]<<" error\n"; return 1;}
// Declarations
Standard_Integer myCurrentIndex;
myCurrentIndex=TheAISContext()->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;
Quantity_NameOfColor col = Quantity_NOC_BLACK ;
// Verification des arguments
- if ( argc>3 ) {di<<argv[0]<<" Syntaxe error"<<"\n"; return 1;}
+ if ( argc>3 ) {di<<argv[0]<<" Syntaxe error\n"; return 1;}
// Verification du nombre d'arguments
if (argc==1) {ThereIsName=Standard_False;value=100;}
{
// Verification des arguments
- if ( argc!=2) {di<<argv[0]<<" error"<<"\n"; return 1;}
+ if ( argc!=2) {di<<argv[0]<<" error\n"; return 1;}
// Declarations
Standard_Integer myCurrentIndex;
it.Next();
}
- di<<" Select a plane."<<"\n";
+ di<<" Select a plane.\n";
// Boucle d'attente waitpick.
Standard_Integer argccc = 5;
const char *bufff[] = { "VPick", "X", "VPickY","VPickZ", "VPickShape" };
Standard_Integer MyCurrentIndex;
// Verification
- if (argc<2 || argc>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;
// 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;
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 {
// 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;
// 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;
// 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;
// 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;
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;
// 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;
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();
}
else
{
- std::cout<<" vplanepara: error"<<"\n";return 1;
+ std::cout<<" vplanepara: error\n";return 1;
}
}
}
{
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();
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);
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 );
// 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;
// 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 {
}
else {
- di<<"vline error."<<"\n";
+ di<<"vline error.\n";
}
}
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"
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;
}
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;
}
}
else
{
- std::cout << "Use 'vdisplay' before" << "\n";
+ std::cout << "Use 'vdisplay' before\n";
return 1;
}
}
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;
}
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;
}
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;
}
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;
}
ViewerTest_DoubleMapOfInteractiveAndName& aMap = GetMapOfAIS();
if (!aMap.IsBound2 (aName))
{
- di << "Use 'vdisplay' before" << "\n";
+ di << "Use 'vdisplay' before\n";
return 1;
}
// Verification
if (argc != 2)
{
- di<<" vdiameterdim error"<<"\n";
+ di<<" vdiameterdim error\n";
return 1;
}
// 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;
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;
}
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;
}
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.
// 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;
// ==================
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;
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.
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;
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();
// 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;
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" };
// 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" };
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" };
// 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; }
}
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();
// 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;
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" };
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();
// 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;
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();
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;
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" };
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" };
}
// 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" };
if (!myDeltaEdge.IsParallel())
{
- di << argv[0] << " error: non parallel edges." << "\n";
+ di << argv[0] << " error: non parallel edges.\n";
return 1;
}
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;
}
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;
}
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;
}
// Verification
if (argc != 2)
{
- di << argv[0] << " error: wrong number of parameters." << "\n";
+ di << argv[0] << " error: wrong number of parameters.\n";
return 1;
}
// 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;
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;
}
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
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();
// 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;
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" };
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.;
}
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;
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();
// 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;
// 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" };
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.
// 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" };
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);
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();
// 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;
// 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" };
// 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" };
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();
// 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;
// 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" };
// 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" };
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();
// 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;
// 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;
// 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" };
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 );
// 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" };
}
if (!isPicked)
{
- theDi << theArgVec[0] << ": no dimension or relation is selected." << "\n";
+ theDi << theArgVec[0] << ": no dimension or relation is selected.\n";
return 1;
}
}
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 =
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 <TCollection_AsciiString, Handle(V3d_View)>::Iterator
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";
}
{
if ( ViewerTest::CurrentView().IsNull() )
{
- di<<"Call vinit before this command, please"<<"\n";
+ di<<"Call vinit before this command, please\n";
return 1;
}
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;
}
{ 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;
}
{
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;
}
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;
}
}
{
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;
}
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();
{
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;
}
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;
}
{
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;
}
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;
}
{
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;
}
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]) );
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;
}
}
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;
}
}
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;
}
{
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;
}
{
if(argc != 3)
{
- di << "Usage : " << argv[0] << " x y" << "\n";
+ di << "Usage : " << argv[0] << " x y\n";
return 1;
}
{
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();
}
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);
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;
}
{
if(argc > 2)
{
- di << "Usage : " << argv[0] << " [1|0]" << "\n";
+ di << "Usage : " << argv[0] << " [1|0]\n";
return 1;
}
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;
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;
}
Handle(AIS_InteractiveObject) anIObj;
if (!aMap.IsBound2 (aName) )
{
- di << "Use 'vdisplay' before" << "\n";
+ di << "Use 'vdisplay' before\n";
return 1;
}
else
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;
}
{
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;
}
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;
}
{
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;
}
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;
}
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;
}
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 ||
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;
}
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;
}
{
if ( myFlagPrint == 0 )
{
- anOStream << "Group {" << endl;
+ anOStream << "Group {\n";
myFlagPrint = 1;
} //End of if
else
{
- anOStream << '}' << endl;
+ anOStream << "}\n";
myFlagPrint = 0;
}
return anOStream;
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;
}
{
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);
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);
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);
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;
}
Standard_OStream& Vrml_Info::Print(Standard_OStream& anOStream) const
{
- anOStream << "Info {" << endl;
+ anOStream << "Info {\n";
if ( !(myString.IsEqual( "<Undefined info>") ) )
{
- anOStream << " string" << '\t';
- anOStream << '"' << myString << '"' << endl;
+ anOStream << " string\t";
+ anOStream << '"' << myString << '"' << "\n";
}
- anOStream << '}' << endl;
+ anOStream << "}\n";
return anOStream;
}
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;
}
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;
}
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 ||
{
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 ||
{
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 ||
{
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 ||
{
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 )
if ( i < myShininess->Length() )
anOStream << ", ";
}
- anOStream << " ]" << endl;
+ anOStream << " ]\n";
}
if ( myTransparency->Length() != 1 || Abs(myTransparency->Value(myTransparency->Lower()) - 0) > 0.0001 )
if ( i < myTransparency->Length() )
anOStream << ", ";
}
- anOStream << " ]" << endl;
+ anOStream << " ]\n";
}
- anOStream << '}' << endl;
+ anOStream << "}\n";
return anOStream;
}
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;
}
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++ )
{
}
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;
}
{
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
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;
}
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;
}
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 ||
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;
}
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 ||
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;
}
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;
}
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;
}
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;
}
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;
}
{
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;
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;
}
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;
}
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;
}
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;
}
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() )
{
{
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;
}
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;
}
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;
}
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 ||
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 ||
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;
}
{
if ( myFlagPrint == 0 )
{
- anOStream << "TransformSeparator {" << endl;
+ anOStream << "TransformSeparator {\n";
myFlagPrint = 1;
}
else
{
- anOStream << '}' << endl;
+ anOStream << "}\n";
myFlagPrint = 0;
}
return anOStream;
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;
}
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;
}
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;
}
aScene.myOutput = &theOutput;
aScene.myNamedNodesOut.Clear();
- theOutput << "#VRML V2.0 utf8" << endl << endl;
+ theOutput << "#VRML V2.0 utf8\n\n";
// Real write
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)
void VrmlData_Scene::Dump (Standard_OStream& theStream) const
{
theStream << " ===== Diagnostic Dump of a Scene (" << myAllNodes.Extent()
- << " nodes)" << endl;
+ << " nodes)\n";
/*
Iterator anIterA(myAllNodes);
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";
}
//=======================================================================
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;
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;
}
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);
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;
}
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;
}
TDataStd_Name::Set(D->GetData()->Root(), DocName);
Draw::Set(DocName, DD);
- di << "document " << DocName << " opened" << "\n";
+ di << "document " << DocName << " opened\n";
return 0;
}
static Standard_Integer dump (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<2) {
- di<<"Use: "<<argv[0]<<" Doc [int deep (0/1)]"<<"\n";
+ di<<"Use: "<<argv[0]<<" Doc [int deep (0/1)]\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());
Standard_Boolean deep = Standard_False;
if(i==1)
di<<"\""<<Entry2.ToCString()<<"\"";
else
- di<<" "<<"\""<<Entry2.ToCString()<<"\"";
+ di<<" \""<<Entry2.ToCString()<<"\"";
}
di<<") ";
}
static Standard_Integer statdoc (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<2) {
- di<<"Use: "<<argv[0]<<" Doc "<<"\n";
+ di<<"Use: "<<argv[0]<<" Doc \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; }
Standard_Boolean PrintStructMode = (argc==3);
Handle(XCAFDoc_ShapeTool) aTool = XCAFDoc_DocumentTool::ShapeTool(Doc->Main());
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;
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 "<<i<<" : number of labels with shape = "<<HAI->Value(i)<<"\n";
di<<"Number of labels with color link = "<<NbShapesWithColor<<"\n";
di<<"Number of labels with layer link = "<<NbShapesWithLayer<<"\n";
- di<<"\n"<<"Statistis of Props in the document:"<<"\n";
+ di<<"\nStatistis of Props in the document:\n";
di<<"Number of Centroid Props = "<<NbCentroidProp<<"\n";
di<<"Number of Volume Props = "<<NbVolumeProp<<"\n";
di<<"Number of Area Props = "<<NbAreaProp<<"\n";
Handle(XCAFDoc_ColorTool) CTool = XCAFDoc_DocumentTool::ColorTool(Doc->Main());
TDF_LabelSequence CLabels;
CTool->GetColors(CLabels);
- di<<"\n"<<"Number of colors = "<<CLabels.Length()<<"\n";
+ di<<"\nNumber of colors = "<<CLabels.Length()<<"\n";
if(CLabels.Length()>0) {
for(i=1; i<=CLabels.Length(); i++) {
TDF_Label aLabel = CLabels.Value(i);
Handle(XCAFDoc_LayerTool) LTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TDF_LabelSequence LLabels;
LTool->GetLayerLabels(LLabels);
- di<<"\n"<<"Number of layers = "<<LLabels.Length()<<"\n";
+ di<<"\nNumber of layers = "<<LLabels.Length()<<"\n";
if(LLabels.Length()>0) {
for(i=1; i<=LLabels.Length(); i++) {
TDF_Label aLabel = LLabels.Value(i);
static Standard_Integer setPrs (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc <2) {
- di<<"Use: "<<argv[0]<<" DocName [label1 label2 ...] "<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName [label1 label2 ...] \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; }
// collect sequence of labels to set presentation
Handle(XCAFDoc_ShapeTool) shapes = XCAFDoc_DocumentTool::ShapeTool(Doc->Main());
static Standard_Integer show (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc <2) {
- di<<"Use: "<<argv[0]<<" DocName [label1 label2 ...] "<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName [label1 label2 ...] \n";
return 1;
}
static Standard_Integer xwd (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc <3) {
- di<<"Use: "<<argv[0]<<" DocName filename.{xwd|gif|bmp}"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName filename.{xwd|gif|bmp}\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(AIS_InteractiveContext) IC;
if ( ! TPrsStd_AISViewer::Find ( Doc->GetData()->Root(), IC ) ) {
//=======================================================================
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; }
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)) ) {
static Standard_Integer setviewName (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc <2) {
- di<<"Use: "<<argv[0]<<" (1/0)"<<"\n";
+ di<<"Use: "<<argv[0]<<" (1/0)\n";
return 1;
}
Standard_Boolean mode = Standard_False;
static Standard_Integer getviewName (Draw_Interpretor& di, Standard_Integer /*argc*/, const char** /*argv*/)
{
- if ( XCAFPrs::GetViewNameMode() ) di << "Display names ON"<< "\n";
- else di << "Display names OFF"<< "\n";
+ if ( XCAFPrs::GetViewNameMode() ) di << "Display names ON\n";
+ else di << "Display names OFF\n";
return 0;
}
static Standard_Integer XSetTransparency (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc < 3) {
- di<<"Use: "<<argv[0]<<" Doc Transparency [label1 label2 ...] "<<"\n";
+ di<<"Use: "<<argv[0]<<" Doc Transparency [label1 label2 ...] \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; }
const Standard_Real aTransparency = Draw::Atof(argv[2]);
DDocStd::GetDocument (argv[1], aDoc);
if (aDoc.IsNull())
{
- di << argv[1] << " is not a document" << "\n";
+ di << argv[1] << " is not a document\n";
return 1;
}
XDEDRAW::Init(theDI);
#ifdef OCCT_DEBUG
- theDI << "Draw Plugin : All TKXDEDRAW commands are loaded" << "\n";
+ theDI << "Draw Plugin : All TKXDEDRAW commands are loaded\n";
#endif
}
static Standard_Integer setColor (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc < 6) {
- di<<"Use: "<<argv[0]<<" Doc {Label|Shape} R G B [curve|surf]"<<"\n";
+ di<<"Use: "<<argv[0]<<" Doc {Label|Shape} R G B [curve|surf]\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 aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
static Standard_Integer getColor (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
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"; return 1; }
+ if ( Doc.IsNull() ) { di << argv[1] << " is not a document\n"; return 1; }
TDF_Label aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
static Standard_Integer getShapeColor (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc < 3) {
- di<<"Use: "<<argv[0]<<" Doc Label [curve|surf]"<<"\n";
+ di<<"Use: "<<argv[0]<<" Doc Label [curve|surf]\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 aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
static Standard_Integer getAllColors (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=2) {
- di<<"Use: "<<argv[0]<<" Doc "<<"\n";
+ di<<"Use: "<<argv[0]<<" Doc \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 aLabel;
Handle(XCAFDoc_ColorTool) myColors = XCAFDoc_DocumentTool::ColorTool(Doc->Main());
static Standard_Integer addColor (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=5) {
- di<<"Use: "<<argv[0]<<" DocName R G B"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName R G B\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 aLabel;
Handle(XCAFDoc_ColorTool) myColors = XCAFDoc_DocumentTool::ColorTool(Doc->Main());
static Standard_Integer removeColor (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName Label"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName 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 aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
static Standard_Integer findColor (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=5) {
- di<<"Use: "<<argv[0]<<" DocName R G B"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName R G B\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_ColorTool) myColors = XCAFDoc_DocumentTool::ColorTool(Doc->Main());
static Standard_Integer unsetColor (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=4) {
- di<<"Use: "<<argv[0]<<" DocName {Label|Shape} ColorType"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {Label|Shape} ColorType\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 aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
static Standard_Integer setVisibility (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<3) {
- di<<"Use: "<<argv[0]<<"DocName {Lable|Shape} [isvisible(1/0)]"<<"\n";
+ di<<"Use: "<<argv[0]<<"DocName {Lable|Shape} [isvisible(1/0)]\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_ColorTool) localTool = XCAFDoc_DocumentTool::ColorTool(Doc->Main());
Standard_Boolean isvisible = Standard_False;
if ( (argc==4) && (Draw::Atoi(argv[3])==1) ) isvisible = Standard_True;
}
}
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 );
static Standard_Integer getVisibility (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<3) {
- di<<"Use: "<<argv[0]<<"DocName {Lable|Shape}"<<"\n";
+ di<<"Use: "<<argv[0]<<"DocName {Lable|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_ColorTool) localTool = XCAFDoc_DocumentTool::ColorTool(Doc->Main());
TDF_Label aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
}
}
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;
static Standard_Integer getStyledVisibility (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<3) {
- di<<"Use: "<<argv[0]<<"DocName Shape"<<"\n";
+ di<<"Use: "<<argv[0]<<"DocName 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_ColorTool) localTool = XCAFDoc_DocumentTool::ColorTool(Doc->Main());
TopoDS_Shape aShape;
aShape = DBRep::Get(argv[2]);
static Standard_Integer getStyledcolor (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<3) {
- di<<"Use: "<<argv[0]<<" Doc shape colortype(s/c)"<<"\n";
+ di<<"Use: "<<argv[0]<<" Doc shape colortype(s/c)\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; }
TopoDS_Shape aShape;
aShape = DBRep::Get(argv[2]);
static Standard_Integer setStyledcolor (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<6) {
- di<<"Use: "<<argv[0]<<" Doc shape R G B type(s/c)"<<"\n";
+ di<<"Use: "<<argv[0]<<" Doc shape R G B type(s/c)\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; }
TopoDS_Shape aShape;
aShape = DBRep::Get(argv[2]);
Handle(XCAFDoc_ColorTool) localTool = XCAFDoc_DocumentTool::ColorTool(Doc->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;
static Standard_Integer SetCurWS (Draw_Interpretor& di , Standard_Integer argc, const char** argv)
{
if (argc <2) {
- di<<"Use: "<<argv[0]<<" filename "<<"\n";
+ di<<"Use: "<<argv[0]<<" filename \n";
return 1;
}
TCollection_AsciiString filename (argv[1]);
Handle(Dico_DictionaryOfTransient) DictWS = thedictws;
if ( DictWS->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() );
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;
}
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 =
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;
}
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 "<<fnom.ToCString()<<" , abandon"<<"\n";
- else di<<"No model loaded"<<"\n";
+ if (modfic) di<<"Could not read file "<<fnom.ToCString()<<" , abandon\n";
+ else di<<"No model loaded\n";
return 1;
}
Handle(TDocStd_Document) doc;
if (!DDocStd::GetDocument(argv[1],doc,Standard_False)) {
Handle(TDocStd_Application) A;
- if (!DDocStd::Find(A)) {di<<"No application found"<<"\n";return 1;}
+ if (!DDocStd::Find(A)) {di<<"No application found\n";return 1;}
A->NewDocument("BinXCAF",doc);
TDataStd_Name::Set(doc->GetData()->Root(),argv[1]);
Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc);
// 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;
}
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;
}
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;
}
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;
}
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 "<<fnom.ToCString()<<" , abandon"<<"\n";
- else di<<"No model loaded"<<"\n";
+ if (modfic) di<<"Could not read file "<<fnom.ToCString()<<" , abandon\n";
+ else di<<"No model loaded\n";
return 1;
}
Handle(TDocStd_Document) doc;
if (!DDocStd::GetDocument(argv[1],doc,Standard_False)) {
Handle(TDocStd_Application) A;
- if (!DDocStd::Find(A)) {di<<"No application found"<<"\n";return 1;}
+ if (!DDocStd::Find(A)) {di<<"No application found\n";return 1;}
A->NewDocument("BinXCAF",doc);
TDataStd_Name::Set(doc->GetData()->Root(),argv[1]);
Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc);
// 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;
}
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";
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;
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++ )
}
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";
}
}
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 "<<argv[2]<<" written"<<"\n";
+ di<<"File "<<argv[2]<<" written\n";
Handle(STEPCAFControl_DictionaryOfExternFile) DicFile = writer.ExternFiles();
FillDicWS( DicFile );
AddWS( argv[2], XSDRAW::Session() );
break;
}
- default : di<<"Error on writing file"<<"\n"; break;
+ default : di<<"Error on writing file\n"; break;
}
return 0;
}
static Standard_Integer Expand (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc < 3) {
- di<<"Use: "<<argv[0]<<" Doc recurs(0/1) or Doc recurs(0/1) label1 label2 ... or Doc recurs(0/1 shape1 shape2 ..."<<"\n";
+ di<<"Use: "<<argv[0]<<" Doc recurs(0/1) or Doc recurs(0/1) label1 label2 ... or Doc recurs(0/1 shape1 shape2 ...\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) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(Doc->Main());
Standard_Boolean recurs = Standard_False;
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;
}
}
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;
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());
{
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;
di << "\n \t " << Entry;
flag = Standard_False;
- di << " Dimension" << "."<< i << "."<< j;
+ di << " Dimension."<< i << "."<< j;
if (argc > 3)
{
di <<" (";
{
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;
di << "\n \t " << Entry;
flag = Standard_False;
- di << " GeomTolerance" << "."<< i << "."<< j;
+ di << " GeomTolerance."<< i << "."<< j;
if (argc > 3)
{
di <<" (";
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 <<" (";
{
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;
di << "\n \t " << Entry;
flag = Standard_False;
- di << " Datum target" << "."<< i << "."<< j;
+ di << " Datum target."<< i << "."<< j;
if (argc > 3)
{
di <<" (";
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
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());
static Standard_Integer addLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName StringLayer "<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName StringLayer \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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TCollection_ExtendedString aLayer = argv[2];
static Standard_Integer findLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName StringLayer "<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName StringLayer \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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TCollection_ExtendedString aLayer = argv[2];
static Standard_Integer removeLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName {Label|string}"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {Label|string}\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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TDF_Label aLabel;
static Standard_Integer setLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<4) {
- di<<"Use: "<<argv[0]<<" DocName {Shape|Label} StringLayer [shapeInOneLayer(0/1)]"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {Shape|Label} StringLayer [shapeInOneLayer(0/1)]\n";
return 1;
}
Standard_Boolean shapeInOneLayer = Standard_False;
if ( (argc==5) && (Draw::Atoi(argv[4])==1) ) shapeInOneLayer = Standard_True;
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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TDF_Label aLabel;
TCollection_ExtendedString aLayer = argv[3];
static Standard_Integer getLayers (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName {Shape|Label} "<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TDF_Label aLabel;
Handle(TColStd_HSequenceOfExtendedString) aLayerS;
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;
}
static Standard_Integer getLayerLabels (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=2) {
- di<<"Use: "<<argv[0]<<" DocName"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName\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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TDF_LabelSequence aLabs;
localLayerTool->GetLayerLabels(aLabs);
static Standard_Integer getOneLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName LayerLabel"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName LayerLabel\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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TDF_Label aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
static Standard_Integer setLinkLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<4) {
- di<<"Use: "<<argv[0]<<" DocName {Shape|Label} LayerL [shapeInOneLayer(0/1)]"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {Shape|Label} LayerL [shapeInOneLayer(0/1)]\n";
return 1;
}
Standard_Boolean shapeInOneLayer = Standard_False;
if ( (argc==5) && (Draw::Atoi(argv[4])==1) ) shapeInOneLayer = Standard_True;
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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TDF_Label aLabel, layerLabel;
TDF_Tool::Label(Doc->GetData(), argv[3], layerLabel);
static Standard_Integer getAllLayers (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=2) {
- di<<"Use: "<<argv[0]<<" DocName"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName\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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TDF_LabelSequence aLabs;
localLayerTool->GetLayerLabels(aLabs);
static Standard_Integer unSetLayer (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=4) {
- di<<"Use: "<<argv[0]<<" DocName {Shape|Label} stringL"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {Shape|Label} stringL\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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TDF_Label aLabel;
TCollection_ExtendedString aLayer = argv[3];
static Standard_Integer unSetAllLayers (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName {Shape|Label}"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TDF_Label aLabel;
static Standard_Integer removeAllLayers (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=2) {
- di<<"Use: "<<argv[0]<<" DocName"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName\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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TDF_LabelSequence aLabs;
static Standard_Integer setVisibility (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<3) {
- di<<"Use: "<<argv[0]<<"DocName {layerLable|StringLayer} [isvisible(1/0)]"<<"\n";
+ di<<"Use: "<<argv[0]<<"DocName {layerLable|StringLayer} [isvisible(1/0)]\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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
Standard_Boolean isvisible = Standard_False;
if ( (argc==4) && (Draw::Atoi(argv[3])==1) ) isvisible = Standard_True;
static Standard_Integer isVisible (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName {layerLable|StringLayer}"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {layerLable|StringLayer}\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_LayerTool) localLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc->Main());
TDF_Label aLabel;
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";
static Standard_Integer SetProps (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc < 3) {
- di<<"Use: "<<argv[0]<<" DocName {Shape|Label} [epsilon = 0.001]"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {Shape|Label} [epsilon = 0.001]\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; }
Standard_Real Vres, Ares;
static Standard_Integer SetVolume (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=4) {
- di<<"Use: "<<argv[0]<<" DocName {Label|Shape} volume"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {Label|Shape} volume\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; }
Standard_Real res=0.;
static Standard_Integer SetArea (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=4) {
- di<<"Use: "<<argv[0]<<" DocName {Label|Shape} area"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {Label|Shape} area\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; }
Standard_Real res=0.;
static Standard_Integer SetCentroid (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=6) {
- di<<"Use: "<<argv[0]<<" DocName {Label|Shape} x y z"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {Label|Shape} 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; }
gp_Pnt aPoint;
static Standard_Integer GetVolume (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName {Shape|Label}"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {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; }
TDF_Label aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
static Standard_Integer GetArea (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName {Shape|Label}"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {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; }
TDF_Label aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
static Standard_Integer GetCentroid (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName {Shape|Label} "<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName {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; }
gp_Pnt aPoint;
static Standard_Integer CheckProps (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc <2) {
- di << "Use: "<<argv[0]<<" DocName [ 0|deflection [Shape|Label] ]"<<"\n";
- di << " If second argument is 0, standard CADCADE tool is used for" << "\n";
- di << " computation of volume and CG." << "\n";
- di << " If second argument is not 0, it is treated as deflection" << "\n";
- di << " and computation is done by triangulations" << "\n";
- di << " If the second argument is negative, meshing is forced" << "\n";
+ di << "Use: "<<argv[0]<<" DocName [ 0|deflection [Shape|Label] ]\n";
+ di << " If second argument is 0, standard CADCADE tool is used for\n";
+ di << " computation of volume and CG.\n";
+ di << " If second argument is not 0, it is treated as deflection\n";
+ di << " and computation is done by triangulations\n";
+ di << " If the second argument is negative, meshing is forced\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; }
Standard_Boolean withVolFix = Standard_False;
if ( argc >2 && Draw::Atof(argv[2]) != 0 ) withVolFix = Standard_True;
Standard_Boolean wholeDoc = ( argc <4 );
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);
//fflush ( stdout );
di << ": ";
di << Standard_Failure::Caught()->GetMessageString();
- di<<" ** Skip"<<"\n";
+ di<<" ** Skip\n";
#endif
}
}
static Standard_Integer ShapeVolume (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" Shape deflection "<<"\n";
+ di<<"Use: "<<argv[0]<<" Shape deflection \n";
return 1;
}
TopoDS_Shape aShape = DBRep::Get(argv[1]);
{
if (argc <2) {
- di << "Use: "<<argv[0]<<" DocName [deflection [Shape|Label] ]"<<"\n";
- di << " If second argument is 0, standard CADCADE tool is used for" << "\n";
- di << " computation of volume and CG." << "\n";
- di << " If second argument is not 0, it is treated as deflection" << "\n";
- di << " and computation is done by triangulations" << "\n";
- di << " If the second argument is negative, meshing is forced" << "\n";
+ di << "Use: "<<argv[0]<<" DocName [deflection [Shape|Label] ]\n";
+ di << " If second argument is 0, standard CADCADE tool is used for\n";
+ di << " computation of volume and CG.\n";
+ di << " If second argument is not 0, it is treated as deflection\n";
+ di << " and computation is done by triangulations\n";
+ di << " If the second argument is negative, meshing is forced\n";
return 1;
}
Handle(TDocStd_Document) Doc;
Standard_Real atol = Precision::Confusion();
if(argc >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 ) {
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;
di<<"\n";
}
else {
-// di<<"For one component density is absent"<<"\n";
- di<<"Shape from label : "<<str.ToCString()<<" not have a mass"<<"\n";
+// di<<"For one component density is absent\n";
+ di<<"Shape from label : "<<str.ToCString()<<" not have a mass\n";
}
}
return 0;
static Standard_Integer SetMaterial (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<5) {
- di<<"Use: "<<argv[0]<<" Doc {Label|Shape} name density(g/cu sm) "<<"\n";
+ di<<"Use: "<<argv[0]<<" Doc {Label|Shape} name density(g/cu sm) \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 aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
static Standard_Integer addShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<3) {
- di<<"Use: "<<argv[0]<<" DocName Shape [int makeAssembly (1/0)]"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName Shape [int makeAssembly (1/0)]\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; }
TopoDS_Shape aShape;
aShape = DBRep::Get(argv[2]);
if ( argc==4 && Draw::Atoi(argv[3]) == 0 ) makeAssembly = Standard_False;
TDF_Label aLabel;
aLabel = myAssembly->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();
static Standard_Integer newShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=2) {
- di<<"Use: "<<argv[0]<<" DocName "<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName \n";
return 1;
}
Handle(TDocStd_Document) Doc;
TDF_Label aLabel;
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());
//XCAFDoc_ShapeTool myAssembly;
static Standard_Integer setShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=4) {
- di<<"Use: "<<argv[0]<<" DocName Label Shape "<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName Label 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; }
TDF_Label aLabel;
TDF_Tool::Label(Doc->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);
static Standard_Integer getShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=4) {
- di<<"Use: "<<argv[0]<<" Result DocName Label"<<"\n";
+ di<<"Use: "<<argv[0]<<" Result DocName Label\n";
return 1;
}
Handle(TDocStd_Document) Doc;
DDocStd::GetDocument(argv[2], Doc);
- if ( Doc.IsNull() ) { di << argv[2] << " is not a document" << "\n"; return 1; }
+ if ( Doc.IsNull() ) { di << argv[2] << " is not a document\n"; return 1; }
TDF_Label aLabel;
TDF_Tool::Label(Doc->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);
{
if (argc != 3 && argc != 4)
{
- di<<"Use: "<<argv[0]<<" DocName Label [int removeCompletely (1/0)]"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName Label [int removeCompletely (1/0)]\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 aLabel;
TDF_Tool::Label(Doc->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);
static Standard_Integer findShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName Shape"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName 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; }
TDF_Label aLabel;
TopoDS_Shape aShape;
static Standard_Integer labelInfo (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName Label "<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName 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 aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
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();
}
static Standard_Integer getUsers (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc<3) {
- di<<"Use: "<<argv[0]<<" Doc Label [withSubChilds(int)]"<<"\n";
+ di<<"Use: "<<argv[0]<<" Doc Label [withSubChilds(int)]\n";
return 1;
}
Standard_Boolean getsubchilds = Standard_False;
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 aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
TCollection_AsciiString Entry;
Entry=myAssembly->GetUsers(aLabel, labseq, getsubchilds);
di << Entry.ToCString();
- //di<<myAssembly->GetUsers(aLabel, labseq, getsubchilds)<<" assemblies use this component"<<"\n";
+ //di<<myAssembly->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: "<<argv[0]<<" Doc Label [withSubChilds(int)]"<<"\n";
+ di<<"Use: "<<argv[0]<<" Doc Label [withSubChilds(int)]\n";
return 1;
}
Standard_Boolean getsubchilds = Standard_False;
if ( (argc==4) && ( Draw::Atoi(argv[3])==1 ) ) getsubchilds = Standard_True;
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 aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
TCollection_AsciiString Entry;
Entry=myAssembly->NbComponents( aLabel, getsubchilds);
di << Entry.ToCString();
- //di<<" components"<<"\n";
- //di<<"This assembly has "<<myAssembly->NbComponents( aLabel, getsubchilds )<<" components"<<"\n";
+ //di<<" components\n";
+ //di<<"This assembly has "<<myAssembly->NbComponents( aLabel, getsubchilds )<<" components\n";
return 0;
}
static Standard_Integer addComponent (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=4) {
- di<<"Use: "<<argv[0]<<" DocName Label Shape "<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName Label 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; }
TDF_Label aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
static Standard_Integer removeComponent (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName Label "<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName 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 aLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
static Standard_Integer getReferredShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" DocName Label "<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName 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 aLabel, RootLabel;
TDF_Tool::Label(Doc->GetData(), argv[2], aLabel);
static Standard_Integer getTopLevelShapes (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=2) {
- di<<"Use: "<<argv[0]<<" DocName "<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName \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 aLabel;
TDF_LabelSequence Labels;
static Standard_Integer getFreeShapes (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc <2) {
- di<<"Use: "<<argv[0]<<" DocName [shape_prefix]"<<"\n";
+ di<<"Use: "<<argv[0]<<" DocName [shape_prefix]\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 Labels;
Handle(XCAFDoc_ShapeTool) STool = XCAFDoc_DocumentTool::ShapeTool(Doc->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;
}
static Standard_Integer getOneShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
if (argc!=3) {
- di<<"Use: "<<argv[0]<<" shape DocName "<<"\n";
+ di<<"Use: "<<argv[0]<<" shape DocName \n";
return 1;
}
Handle(TDocStd_Document) Doc;
DDocStd::GetDocument(argv[2], Doc);
- if ( Doc.IsNull() ) { di << argv[2] << " is not a document" << "\n"; return 1; }
+ if ( Doc.IsNull() ) { di << argv[2] << " is not a document\n"; return 1; }
TDF_LabelSequence Labels;
Handle(XCAFDoc_ShapeTool) STool = XCAFDoc_DocumentTool::ShapeTool(Doc->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;
}
{
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;
}
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;
}
{
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++) {
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;
}
{
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()) {
{
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()) {
{
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()) {
{
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()) {
{
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);
{
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 (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;
aShape = myAssembly->GetSHUOInstance( SHUO );
if (aShape.IsNull()) {
- di << "cannot get component" << "\n";
+ di << "cannot get component\n";
return 1;
}
DBRep::Set ( argv[2], aShape );
{
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;
{
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++) {
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;
{
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;
if (mod1 < -1) sout<<"Unknown Mode"<<endl;
if (mod1 < 0) {
sout<<"Modes available :\n"
- <<"g : general c : checks (count) C (list)"<<"\n"
- <<" f : fails (count) F (list)"<<"\n"
- <<" n : numbers of transferred entities (on TRANSFER ROOTS)"<<"\n"
- <<" s : their status (type entity-result , presence checks)"<<"\n"
- <<" b : detail of binders"<<"\n"
- <<" t : count per entity type r : per type/status result"<<"\n"
- <<" l : count per couple type entity/result"<<"\n"
- <<" L : list per couple type entity/result"<<"\n"
- <<" *n *s *b *t *r *l *L : idem on ALL recorded items"<<"\n"
- <<" ?n ?s ?b ?t ... : idem on abnormal items"<<"\n"
+ <<"g : general c : checks (count) C (list)\n"
+ <<" f : fails (count) F (list)\n"
+ <<" n : numbers of transferred entities (on TRANSFER ROOTS)\n"
+ <<" s : their status (type entity-result , presence checks)\n"
+ <<" b : detail of binders\n"
+ <<" t : count per entity type r : per type/status result\n"
+ <<" l : count per couple type entity/result\n"
+ <<" L : list per couple type entity/result\n"
+ <<" *n *s *b *t *r *l *L : idem on ALL recorded items\n"
+ <<" ?n ?s ?b ?t ... : idem on abnormal items\n"
<<" n select : n applied on a selection idem for s b t r l"<<endl;
if (mod1 < -1) return IFSelect_RetError;
return IFSelect_RetVoid;
progress->Show();
if (readstat != IFSelect_RetDone) {
- if (modfic) di<<"Could not read file "<<fnom.ToCString()<<" , abandon"<<"\n";
- else di<<"No model loaded"<<"\n";
+ if (modfic) di<<"Could not read file "<<fnom.ToCString()<<" , abandon\n";
+ else di<<"No model loaded\n";
return 1;
}
// Choice of treatment
}
if (modepri == 0) { //fin
- di << "Bye and good luck! " << "\n";
+ di << "Bye and good luck! \n";
break;
}
else if (modepri <= 2) { // 1 : Visible Roots, 2 : All Roots
- di << "All Geometry Transfer"<<"\n";
- di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)"<<"\n";
- di<<" To modify : command param read.iges.bspline.continuity"<<"\n";
+ di << "All Geometry Transfer\n";
+ di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)\n";
+ di<<" To modify : command param read.iges.bspline.continuity\n";
Handle(XSControl_WorkSession) thesession = Reader.WS();
thesession->ClearContext();
XSDRAW::SetTransferProcess (thesession->MapReader());
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";
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);
}
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";
catch(Standard_Failure) {
di << "** Exception : ";
di << Standard_Failure::Caught()->GetMessageString();
- di<<" ** Skip"<<"\n";
+ di<<" ** Skip\n";
}
}
}
cout << " give the number of the Entity : " << flush;
nent = XSDRAW::GetEntityNumber();
- if (!Reader.TransferOne (nent)) di<<"Transfer entity n0 "<<nent<<" : no result"<<"\n";
+ if (!Reader.TransferOne (nent)) di<<"Transfer entity n0 "<<nent<<" : no result\n";
else {
nbs = Reader.NbShapes();
char shname[30]; Sprintf (shname,"%s_%d",rnom.ToCString(),nent);
di<<"Transfer entity n0 "<<nent<<" OK -> DRAW Shape: "<<shname<<"\n";
- di<<"Now, "<<nbs<<" Shapes produced"<<"\n";
+ di<<"Now, "<<nbs<<" Shapes produced\n";
TopoDS_Shape sh = Reader.Shape(nbs);
DBRep::Set (shname,sh);
}
// *r donne xst-model-roots (TOUTES racines)
if( fromtcl && argv[3][0]=='*' && argv[3][1]=='\0' ) {
- di << "All Geometry Transfer"<<"\n";
- di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)"<<"\n";
- di<<" To modify : command param read.iges.bspline.continuity"<<"\n";
+ di << "All Geometry Transfer\n";
+ di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)\n";
+ di<<" To modify : command param read.iges.bspline.continuity\n";
Handle(XSControl_WorkSession) thesession = Reader.WS();
thesession->ClearContext();
XSDRAW::SetTransferProcess (thesession->MapReader());
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);
}
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;
}
}
nent = Reader.Model()->Number(list->Value(ill));
if (nent == 0) continue;
- if (!Reader.TransferOne(nent)) di<<"Transfer entity n0 "<<nent<<" : no result"<<"\n";
+ if (!Reader.TransferOne(nent)) di<<"Transfer entity n0 "<<nent<<" : no result\n";
else {
nbs = Reader.NbShapes();
char shname[30]; Sprintf (shname,"%s_%d",rnom.ToCString(),nbs);
di<<"Transfer entity n0 "<<nent<<" OK -> DRAW Shape: "<<shname<<"\n";
- di<<"Now, "<<nbs<<" Shapes produced"<<"\n";
+ di<<"Now, "<<nbs<<" Shapes produced\n";
TopoDS_Shape sh = Reader.Shape(nbs);
DBRep::Set (shname,sh);
nbt++;
{
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;
}
IGESControl_Reader Reader;
IFSelect_ReturnStatus readstat = Reader.ReadFile(filename);
di<<"Status from reading IGES file "<<filename<<" : ";
switch(readstat) {
- case IFSelect_RetVoid : { di<<"empty file"<<"\n"; return 1; }
- case IFSelect_RetDone : { di<<"file read"<<"\n"; break; }
- case IFSelect_RetError : { di<<"file not found"<<"\n"; return 1; }
- case IFSelect_RetFail : { di<<"error during read"<<"\n"; return 1; }
- default : { di<<"failure"<<"\n"; return 1; }
+ case IFSelect_RetVoid : { di<<"empty file\n"; return 1; }
+ case IFSelect_RetDone : { di<<"file read\n"; break; }
+ case IFSelect_RetError : { di<<"file not found\n"; return 1; }
+ case IFSelect_RetFail : { di<<"error during read\n"; return 1; }
+ default : { di<<"failure\n"; return 1; }
}
Reader.TransferRoots();
TopoDS_Shape shape = Reader.OneShape();
Interface_Static::IVal("write.iges.brep.mode"));
di<<"unit (write) : "<<Interface_Static::CVal("write.iges.unit")<<"\n";
di<<"mode write : "<<Interface_Static::CVal("write.iges.brep.mode")<<"\n";
- di<<" To modifiy : command param"<<"\n";
+ di<<" To modifiy : command param\n";
// Mode d emploi (K4B ->) : brepiges shape [+shape][ +shape] nomfic
// c a d tant qu il y a des + on ajoute ce qui suit
progress->NewScope(10,"Writing");
progress->Show();
- di<<npris<<" Shapes written, giving "<<XSDRAW::Model()->NbEntities()<<" Entities"<<"\n";
+ di<<npris<<" Shapes written, giving "<<XSDRAW::Model()->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;
}
{
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;
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;
}
//--------------------------------------------------------------
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) : "<<Interface_Static::CVal("write.iges.unit")<<"\n";
di<<"mode write : "<<Interface_Static::CVal("write.iges.brep.mode")<<"\n";
- di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)"<<"\n";
- di<<"\n"<<" To modifier, param nom_param new_val"<<"\n";
+ di<<"spline_continuity (read) : "<<Interface_Static::IVal("read.iges.bspline.continuity")<<" (0 : no modif, 1 : C1, 2 : C2)\n";
+ di<<"\n To modifier, param nom_param new_val\n";
return 0;
}
typarg.SetValue(1,"IGESGeom_TrimmedSurface");
typarg.SetValue(2,"IGESGeom_BoundedSurface");
typarg.SetValue(3,"IGESSolid_Face");
- if (TP.IsNull()) { di<<"No Transfer Read"<<"\n"; return 1; }
+ if (TP.IsNull()) { di<<"No Transfer Read\n"; return 1; }
Standard_Integer nbFaces = 0, totFaces = 0 ;
Handle(IFSelect_WorkSession) WS = pilot->Session();
Transfer_IteratorOfProcessForTransient itrp = TP->AbnormalResult();
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()) {
}
}
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;
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;
}
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();
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;
}
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;
progress->Show();
if (readstat != IFSelect_RetDone) {
- if (modfic) di<<"Could not read file "<<fnom.ToCString()<<" , abandon"<<"\n";
- else di<<"No model loaded"<<"\n";
+ if (modfic) di<<"Could not read file "<<fnom.ToCString()<<" , abandon\n";
+ else di<<"No model loaded\n";
return 1;
}
cin>>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) {
progress->Show();
sr.WS()->MapReader()->SetProgress ( progress );
- if (!sr.TransferRoot (num)) di<<"Transfer root n0 "<<num<<" : no result"<<"\n";
+ if (!sr.TransferRoot (num)) di<<"Transfer root n0 "<<num<<" : no result\n";
else {
nbs = sr.NbShapes();
char shname[30]; Sprintf (shname,"%s_%d",rnom.ToCString(),nbs);
di<<"Transfer root n0 "<<num<<" OK -> DRAW Shape: "<<shname<<"\n";
- di<<"Now, "<<nbs<<" Shapes produced"<<"\n";
+ di<<"Now, "<<nbs<<" Shapes produced\n";
TopoDS_Shape sh = sr.Shape(nbs);
DBRep::Set (shname,sh);
}
}
else if (modepri == 3) {
cout<<"Entity : "<<flush; num = XSDRAW::GetEntityNumber();
- if (!sr.TransferOne (num)) di<<"Transfer entity n0 "<<num<<" : no result"<<"\n";
+ if (!sr.TransferOne (num)) di<<"Transfer entity n0 "<<num<<" : no result\n";
else {
nbs = sr.NbShapes();
char shname[30]; Sprintf (shname,"%s_%d",rnom.ToCString(),num);
di<<"Transfer entity n0 "<<num<<" OK -> DRAW Shape: "<<shname<<"\n";
- di<<"Now, "<<nbs<<" Shapes produced"<<"\n";
+ di<<"Now, "<<nbs<<" Shapes produced\n";
TopoDS_Shape sh = sr.Shape(nbs);
DBRep::Set (shname,sh);
}
di<<" : ";
list = XSDRAW::GetList (argv[k], ( argc > (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 :"<<flush;
list = XSDRAW::GetList();
- if (list.IsNull()) { di<<"No list defined"<<"\n"; continue; }
+ if (list.IsNull()) { di<<"No list defined\n"; continue; }
}
Standard_Integer ill, nbl = list->Length();
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 "<<num<<" : no result"<<"\n";
+ if (!sr.TransferOne(num)) di<<"Transfer entity n0 "<<num<<" : no result\n";
else {
nbs = sr.NbShapes();
char shname[30]; Sprintf (shname,"%s_%d",rnom.ToCString(),nbs);
di<<"Transfer entity n0 "<<num<<" OK -> DRAW Shape: "<<shname<<"\n";
- di<<"Now, "<<nbs<<" Shapes produced"<<"\n";
+ di<<"Now, "<<nbs<<" Shapes produced\n";
TopoDS_Shape sh = sr.Shape(nbs);
DBRep::Set (shname,sh);
}
{
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_Reader Reader;
IFSelect_ReturnStatus readstat = Reader.ReadFile(filename);
di<<"Status from reading STEP file "<<filename<<" : ";
switch(readstat) {
- case IFSelect_RetVoid : { di<<"empty file"<<"\n"; return 1; }
- case IFSelect_RetDone : { di<<"file read"<<"\n"; break; }
- case IFSelect_RetError : { di<<"file not found"<<"\n"; return 1; }
- case IFSelect_RetFail : { di<<"error during read"<<"\n"; return 1; }
- default : { di<<"failure"<<"\n"; return 1; }
+ case IFSelect_RetVoid : { di<<"empty file\n"; return 1; }
+ case IFSelect_RetDone : { di<<"file read\n"; break; }
+ case IFSelect_RetError : { di<<"file not found\n"; return 1; }
+ case IFSelect_RetFail : { di<<"error during read\n"; return 1; }
+ default : { di<<"failure\n"; return 1; }
}
Reader.TransferRoots();
TopoDS_Shape shape = Reader.OneShape();
static Standard_Integer steptrans (Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
- if (argc < 5) { di<<"give shape-name new-shape + entity-n0 entity-n0: AXIS2"<<"\n";
+ if (argc < 5) { di<<"give shape-name new-shape + entity-n0 entity-n0: AXIS2\n";
return 1; }
TopoDS_Shape shape = DBRep::Get(argv[1]);
if (shape.IsNull()) { di<<"Not a shape : "<<argv[1]<<"\n"; return 1; }
DBRep::Set (argv[2],shape);
di<<"Transformed Shape as "<<argv[2]<<"\n";
}
- else di<<"No transformation computed"<<"\n";
+ else di<<"No transformation computed\n";
return 0;
}
}
if (argc < 3) {
- di<<"Give mode[1-4] and Shape name + optional file. Mode possible"<<"\n";
+ di<<"Give mode[1-4] and Shape name + optional file. Mode possible\n";
di<<"f ou 1 : FacettedBRep s ou 2 : ShellBasedSurfaceModel\n"
- <<"m ou 3 : ManifoldSolidBrep w ou 4 : GeometricCurveSet/WireFrame"<<"\n";
+ <<"m ou 3 : ManifoldSolidBrep w ou 4 : GeometricCurveSet/WireFrame\n";
return 1; }
char modeshape = argv[1][0];
STEPControl_StepModelType mode;
case '3' : mode = STEPControl_ManifoldSolidBrep; break;
case 'w' :
case '4' : mode = STEPControl_GeometricCurveSet; break;
- default : di<<"1st arg = mode, incorrect [give fsmw]"<<"\n"; return 1;
+ default : di<<"1st arg = mode, incorrect [give fsmw]\n"; return 1;
}
//:k8 abv 6 Jan 98: using parameter for writing mode (assemblies/shapes)
// Que s est-il passe
stepmodel = sw.Model();
Standard_Integer nbapres = (stepmodel.IsNull() ? 0 : stepmodel->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 "<<nomfic<<" written"<<"\n"; break;
- case IFSelect_RetStop : di<<"Error on writing file: no space on disk or destination is write protected"<<"\n"; break;
- default : di<<"Error: File "<<nomfic<<" written with fail messages"<<"\n"; break;
+ case IFSelect_RetVoid : di<<"Error: No file written\n"; break;
+ case IFSelect_RetDone : di<<"File "<<nomfic<<" written\n"; break;
+ case IFSelect_RetStop : di<<"Error on writing file: no space on disk or destination is write protected\n"; break;
+ default : di<<"Error: File "<<nomfic<<" written with fail messages\n"; break;
}
progress->EndScope();
{
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;
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;
}
if (readstat != IFSelect_RetDone) {
- di<<"No model loaded"<<"\n";
+ di<<"No model loaded\n";
return 1;
}
Standard_Integer i =1;
di<<"=====================================================\n";
- di<<"LENTH Unit"<<"\n";
+ di<<"LENTH Unit\n";
for( ; i <= anUnitLengthNames.Length() ; i++)
di<<anUnitLengthNames(i).ToCString()<<"\n";
di<<"=====================================================\n";
- di<<"Angle Unit"<<"\n";
+ di<<"Angle Unit\n";
for( i =1 ; i <= anUnitAngleNames.Length() ; i++)
di<<anUnitAngleNames(i).ToCString()<<"\n";
di<<"=====================================================\n";
- di<<"Solid Angle Unit"<<"\n";
+ di<<"Solid Angle Unit\n";
for( i =1 ; i <= anUnitSolidAngleNames.Length() ; i++)
di<<anUnitSolidAngleNames(i).ToCString()<<"\n";
{
if (argc < 3 || argc > 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;
{
if (argc < 3 || argc > 5)
{
- di << "wrong number of parameters" << "\n";
+ di << "wrong number of parameters\n";
return 0;
}
}
}
else {
- di << "cannot open file" << "\n";
+ di << "cannot open file\n";
}
{
if (argc<3)
{
- di << "Wrong number of parameters" << "\n";
- di << "Use: " << argv[0] << " <mesh name> <stl file>" << "\n";
+ di << "Wrong number of parameters\n";
+ di << "Use: " << argv[0] << " <mesh name> <stl file>\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(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 );
{
if (argc<2)
{
- di << "Wrong number of parameters" << "\n";
- di << "Use: " << argv[0] << " <mesh name>" << "\n";
+ di << "Wrong number of parameters\n";
+ di << "Use: " << argv[0] << " <mesh name>\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 );
if( aDrawMesh.IsNull() )
{
- di << "There is no such object" << "\n";
+ di << "There is no such object\n";
return NULL;
}
else
Handle( MeshVS_Mesh ) aMesh = aDrawMesh->GetMesh();
if( aMesh.IsNull() )
{
- di << "There is invalid mesh" << "\n";
+ di << "There is invalid mesh\n";
return NULL;
}
else
(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 );
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 );
}
(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 );
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 );
}
(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 );
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 );
}
{
if (theArgc < 3)
{
- theDI << "Wrong number of parameters." << "\n";
+ theDI << "Wrong number of parameters.\n";
}
else
{
Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext();
if (aContext.IsNull())
{
- theDI << "The context is null" << "\n";
+ theDI << "The context is null\n";
}
else
{
(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 );
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() )
(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 );
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() )
}
}
else
- di << "Mesh is null" << "\n";
+ di << "Mesh is null\n";
}
return 0;
}
{
if (argc<2)
{
- di << "Wrong number of parameters" << "\n";
- di << "Use: " << argv[0] << " <mesh name>" << "\n";
+ di << "Wrong number of parameters\n";
+ di << "Use: " << argv[0] << " <mesh name>\n";
return 0;
}
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();
{
if (argc<2)
{
- di << "Wrong number of parameters" << "\n";
- di << "Use: " << argv[0] << " <mesh name>" << "\n";
+ di << "Wrong number of parameters\n";
+ di << "Use: " << argv[0] << " <mesh name>\n";
return 0;
}
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 =
{
if (argc<2)
{
- di << "Wrong number of parameters" << "\n";
- di << "Use: " << argv[0] << " <mesh name>" << "\n";
+ di << "Wrong number of parameters\n";
+ di << "Use: " << argv[0] << " <mesh name>\n";
return 0;
}
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() );
OCC_CATCH_SIGNALS
if ( argc < 4 )
{
- di << "Wrong number of parameters" << "\n";
- di << "Use : meshcolors <mesh name> <mode> <isreflect>" << "\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 <mesh name> <mode> <isreflect>\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;
}
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() )
}
else
{
- di << "Wrong mode name" << "\n";
+ di << "Wrong mode name\n";
return 0;
}
}
}
catch ( Standard_Failure )
{
- di << "Error" << "\n";
+ di << "Error\n";
}
return 0;
{
if ( argc < 3 )
{
- di << "Wrong number of parameters" << "\n";
- di << "Use : meshvectors <mesh name> < -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 <mesh name> < -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;
}
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( !aMode.IsEqual("elem") && !aMode.IsEqual("nodal") && !aMode.IsEqual("none") )
{
- di << "Wrong mode name" << "\n";
+ di << "Wrong mode name\n";
return 0;
}
{
if ( argc < 2 )
{
- di << "Wrong number of parameters" << "\n";
- di << "Use : meshtext <mesh name>" << "\n";
+ di << "Wrong number of parameters\n";
+ di << "Use : meshtext <mesh name>\n";
return 0;
}
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 ( argc < 3 )
{
- di << "Wrong number of parameters" << "\n";
- di << "Use : meshdeform <mesh name> < -mode {on|off} > [-scale scalefactor]" << "\n";
+ di << "Wrong number of parameters\n";
+ di << "Use : meshdeform <mesh name> < -mode {on|off} > [-scale scalefactor]\n";
return 0;
}
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(!aMode.IsEqual("on") && !aMode.IsEqual("off"))
{
- di << "Wrong mode name" << "\n";
+ di << "Wrong mode name\n";
return 0;
}
OCC_CATCH_SIGNALS
if ( argc < 3 )
{
- di << "Wrong number of parameters" << "\n";
- di << "Use : mesh_edge_width <mesh name> <width>" << "\n";
+ di << "Wrong number of parameters\n";
+ di << "Use : mesh_edge_width <mesh name> <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;
}
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;
}
}
catch ( Standard_Failure )
{
- di << "Error" << "\n";
+ di << "Error\n";
}
return 0;
{
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;
}
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
}
--- /dev/null
+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"
+}