本文整理汇总了C++中TCollection_AsciiString::IsEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ TCollection_AsciiString::IsEmpty方法的具体用法?C++ TCollection_AsciiString::IsEmpty怎么用?C++ TCollection_AsciiString::IsEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCollection_AsciiString
的用法示例。
在下文中一共展示了TCollection_AsciiString::IsEmpty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
cout << "\nMcCad_Exploder\n====================\n\n";
Handle_TopTools_HSequenceOfShape inputShapes = readFile( inName );
McCadIOHelper_Expander expander(inputShapes);
Handle_TopTools_HSequenceOfShape expandedFiles = expander.GetExplodedShapes();
if(expandedFiles->Length() < 2){
TCollection_AsciiString message("Failed to expand file : ");
message.AssignCat(inName);
msgr->Message(message.ToCString());
exit(0);
}
TCollection_AsciiString tmpName(inName);
TCollection_AsciiString fileFilter = tmpName.Split( tmpName.SearchFromEnd(".") -1 );
for(int i=1; i<=expandedFiles->Length(); i++){
TCollection_AsciiString outName(tmpName);
outName.Prepend("ExOut");
outName.AssignCat("_");
outName.AssignCat(i);
outName.AssignCat(fileFilter);
Handle_TopTools_HSequenceOfShape singleShape = new TopTools_HSequenceOfShape;
singleShape->Append(expandedFiles->Value(i));
writeFile(outName, singleShape);
}
}
// Convertor
else if(inParameter.IsEqual("-d") || inParameter.IsEqual("--decompose")) {
cout << "\nMcCad_Decomposer\n====================\n\n";
// read file
Handle_TopTools_HSequenceOfShape inputShapes = readFile( inName );
// decompose geometry
McCadConvertTools_Convertor convertor(inputShapes);
convertor.Convert();
if (argc == 4 && !outputName.IsEmpty())
convertor.SetFileName(outputName);
if(!convertor.IsConverted()){
cout << "Conversion failed!!!\n";
return -1;
}
// export decomposed geometry to stp file
TCollection_AsciiString exportName("converted");
exportName += inName;
inName = exportName.Split(exportName.SearchFromEnd("."));
exportName += "stp";
writeFile( exportName, convertor.GetConvertedModel());
}
// export decomposed geometry to stp file
// Lei Lu 20150501
// TCollection_AsciiString exportName("converted");
// exportName += inName;
// inName = exportName.Split(exportName.SearchFromEnd("."));
// exportName += "stp";
// writeFile( exportName, convertor.GetConvertedModel());
// }
// Fuse
else if(inParameter.IsEqual("-f") || inParameter.IsEqual("--fuse")) {
cout << "\nMcCad_Fusioner\n====================\n\n";
McCadIOHelper_Merger myMerger(inName);
if(argc == 4 && !outputName.IsEmpty())
myMerger.MergeToFile(outputName);
else
myMerger.Merge();