当前位置: 首页>>代码示例>>C++>>正文


C++ TCollection_AsciiString类代码示例

本文整理汇总了C++中TCollection_AsciiString的典型用法代码示例。如果您正苦于以下问题:C++ TCollection_AsciiString类的具体用法?C++ TCollection_AsciiString怎么用?C++ TCollection_AsciiString使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TCollection_AsciiString类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: aTitle

//================================================================
// Function : Convert_Presentation::drawSurfaceAndItsBSpline
// Purpose  : 
//================================================================
void Convert_Presentation::drawSurfaceAndItsBSpline(Handle_Geom_Surface theSurface, 
                                                    const Standard_CString theName, 
                                                    TCollection_AsciiString& theText)
{
  TCollection_AsciiString aTitle ("Converting ");
  aTitle += theName;
  aTitle += " to BSpline surface";

  theText += EOL
    "  Handle_Geom_BSplineSurface aBSplineSurface = " EOL
    "    GeomConvert::SurfaceToBSplineSurface(aSurface);" EOL;

  setResultTitle (aTitle.ToCString());
  setResultText (theText.ToCString());

  drawSurface (theSurface, SurfaceColor);

  if (WAIT_A_LITTLE) return;

  Handle_Geom_BSplineSurface aBSplineSurface = GeomConvert::SurfaceToBSplineSurface(theSurface);

  _ASSERTE(!aBSplineSurface.IsNull());

  drawSurface (aBSplineSurface, BSplineSurfaceColor);
}
开发者ID:jilott,项目名称:occsamplemfc,代码行数:29,代码来源:Convert_Presentation.cpp

示例2: ExportSTEP

SALOME_WNT_EXPORT
  int ExportSTEP( const TopoDS_Shape& theShape,
              const TCollection_AsciiString& theFileName,
              const TCollection_AsciiString& theFormatName)
  {
    MESSAGE("Export STEP into file " << theFileName.ToCString());

  try 
    {
      IFSelect_ReturnStatus status ;
      //VRV: OCC 4.0 migration
      STEPControl_Writer aWriter;
      //VSR: 16/09/09: Convert to METERS
      Interface_Static::SetCVal("xstep.cascade.unit","M");
      Interface_Static::SetIVal("write.step.nonmanifold", 1);
      //JFA: PAL6162      status = aWriter.Transfer( theShape, STEPControl_ManifoldSolidBrep );
      status = aWriter.Transfer( theShape, STEPControl_AsIs );
      //VRV: OCC 4.0 migration
      if ( status == IFSelect_RetDone ) 
        status = aWriter.Write( theFileName.ToCString() ) ;

      // Return previous locale
      if ( status == IFSelect_RetDone )
        return 1;
    }
    catch(Standard_Failure) {
      Standard_Failure::Raise("Could not export in STEP format");
    }
    return 0;
  }
开发者ID:dbarbier,项目名称:pythonocc,代码行数:30,代码来源:ExchangeSTEP_Export.cpp

示例3: AIS_TexturedShape

//////////////////////////////////////////////////////////////////////
// Sample functions
//////////////////////////////////////////////////////////////////////
//================================================================
// Function : TexturesExt_Presentation::Texturize
// display an AIS_TexturedShape based on a given shape with texture with given filename
// filename can also be an integer value ("2", "5", etc.), in this case
// a predefined texture from Graphic3d_NameOfTexture2D with number = this value
// is loaded.
//================================================================
Handle_AIS_TexturedShape TexturesExt_Presentation::Texturize(const TopoDS_Shape& aShape,
                                                        TCollection_AsciiString aTFileName,
                                                        Standard_Real toScaleU,
                                                        Standard_Real toScaleV,
                                                        Standard_Real toRepeatU,
                                                        Standard_Real toRepeatV,
                                                        Standard_Real originU,
                                                        Standard_Real originV)
{
  // create a textured presentation object for aShape
  Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);
  TCollection_AsciiString TFileName;
  // load texture from file if it is not an integer value
  // integer value indicates a number of texture in predefined TexturesExt enumeration
  CString initfile(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir());
  initfile += "\\Data\\";
  if (!aTFileName.IsIntegerValue())
  {
	initfile += aTFileName.ToCString();
  }

  aTShape->SetTextureFileName((Standard_CString)(LPCTSTR)initfile);

  // do other initialization of AIS_TexturedShape
  aTShape->SetTextureMapOn();
  aTShape->SetTextureScale(Standard_True, toScaleU, toScaleV);
  aTShape->SetTextureRepeat(Standard_True, toRepeatU, toRepeatV);
  aTShape->SetTextureOrigin(Standard_True, originU, originV);
  
  aTShape->SetDisplayMode(3); // mode 3 is "textured" mode

  return aTShape;
}
开发者ID:jilott,项目名称:occsamplemfc,代码行数:43,代码来源:TexturesExt_Presentation.cpp

示例4: myOperations

ShHealOper_ShapeProcess::ShHealOper_ShapeProcess (const TCollection_AsciiString& theNameResource,
                                                  const TCollection_AsciiString& thePrefix ) :
       myOperations(theNameResource.ToCString(),thePrefix.ToCString())
{
  //myResource = new Resource_Manager(theNameResource);
  myPrefix = thePrefix;
  mySaveHistoryMode = Standard_False;
  myLevel = TopAbs_FACE;
  myDone = Standard_False;
}
开发者ID:triggerfish1,项目名称:pythonocc,代码行数:10,代码来源:ShHealOper_ShapeProcess.cpp

示例5: writeFile

// write geometry
//////////////////
void writeFile( TCollection_AsciiString outFileName, Handle_TopTools_HSequenceOfShape shapes){
    //get writer plugin
    TCollection_AsciiString fileExtension = outFileName;
    fileExtension = fileExtension.Split(fileExtension.SearchFromEnd(".")-1);
    McCadEXPlug_PluginManager* pluginManager = McCadEXPlug_PluginManager::Instance();
    McCadEXPlug_ExchangePlugin* writerPlugin = pluginManager->GetPlugin(fileExtension);
    // write file
    writerPlugin->SetFilename(outFileName);
    writerPlugin->Export(shapes);
}
开发者ID:NLxjtu,项目名称:McCad,代码行数:12,代码来源:main.cpp

示例6: ExportBREP

SALOME_WNT_EXPORT
  int ExportBREP( const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName)
  {
    MESSAGE("Export BREP into file " << theFileName.ToCString());

    if ( !BRepTools::Write( theShape, theFileName.ToCString() ) )
      return 0;

    return 1;
  }
开发者ID:dbarbier,项目名称:pythonocc,代码行数:10,代码来源:ExchangeBREP_Export.cpp

示例7: readFile

// read file, return geometry
///////////////////////////////
Handle_TopTools_HSequenceOfShape readFile( TCollection_AsciiString fileName){
    // get reader plugin
    TCollection_AsciiString fileExtension = fileName;
    fileExtension = fileExtension.Split(fileExtension.SearchFromEnd(".")-1);
    McCadEXPlug_PluginManager* pluginManager = McCadEXPlug_PluginManager::Instance();
    McCadEXPlug_ExchangePlugin* readerPlugin = pluginManager->GetPlugin(fileExtension);
    // read file
    readerPlugin->SetFilename(fileName);
    Handle_TopTools_HSequenceOfShape shapes = new TopTools_HSequenceOfShape;
    shapes = readerPlugin->Import();
    return shapes;
}
开发者ID:NLxjtu,项目名称:McCad,代码行数:14,代码来源:main.cpp

示例8: anameParam

void ShHealOper_ShapeProcess::SetOperators(const TColStd_SequenceOfAsciiString& theSeqOperators)
{
  
  TCollection_AsciiString anameParam(myPrefix);
  anameParam += ".";
  anameParam += "exec.op";
  TCollection_AsciiString aseq;
  Standard_Integer i =1;
  for( ; i <= theSeqOperators.Length(); i++) {
    aseq += theSeqOperators.Value(i);
    aseq += " ";
  }
    
  myOperations.Context()->ResourceManager()->SetResource(anameParam.ToCString(),aseq.ToCString());
}
开发者ID:triggerfish1,项目名称:pythonocc,代码行数:15,代码来源:ShHealOper_ShapeProcess.cpp

示例9: initfile

//================================================================
// Function : TexturesExt_Presentation::loadShape
// loads a shape from a given brep file from data dir into a given TopoDS_Shape object
//================================================================
Standard_Boolean TexturesExt_Presentation::loadShape(TopoDS_Shape& aShape, 
                                         TCollection_AsciiString aFileName)
{
  // create a TopoDS_Shape -> read from a brep file
  CString initfile(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir());
  initfile += "\\Data\\";
  initfile += aFileName.ToCString();

  TCollection_AsciiString Path((Standard_CString)(LPCTSTR)initfile);


  BRep_Builder aBld;
  //Standard_Boolean isRead = BRepTools::Read (aShape, aPath.ToCString(), aBld);
  //if (!isRead)
	//  isRead = BRepTools::Read (aShape, bPath.ToCString(), aBld);
  Standard_Boolean isRead = BRepTools::Read (aShape, Path.ToCString(), aBld);
  if (!isRead)
  {
    Path += " was not found.  The sample can not be shown.";
    getDocument()->UpdateResultMessageDlg("Textured Shape", Path.ToCString());
    return Standard_False;
  }

  return Standard_True;
}
开发者ID:jilott,项目名称:occsamplemfc,代码行数:29,代码来源:TexturesExt_Presentation.cpp

示例10: nameSeq

Standard_Boolean ShHealOper_ShapeProcess::GetOperators(TColStd_SequenceOfAsciiString& theSeqOperators)
{
  TCollection_AsciiString nameSeq(myPrefix);
  nameSeq +=".exec.op";
  if(!myOperations.Context()->ResourceManager()->Find(nameSeq.ToCString()))
    return Standard_False;
  
  TCollection_AsciiString seqoper = myOperations.Context()->ResourceManager()->Value(nameSeq.ToCString());
  Standard_Integer i;
  for ( i=1; ; i++ ) {
    TCollection_AsciiString anOper = seqoper.Token ( " \t,;", i );
    if ( anOper.Length() <=0 ) break;
    theSeqOperators.Append(anOper);
  }
  return (theSeqOperators.Length());
}
开发者ID:triggerfish1,项目名称:pythonocc,代码行数:16,代码来源:ShHealOper_ShapeProcess.cpp

示例11: text

void CViewer3dDoc::UpdateResultMessageDlg(CString Title, TCollection_AsciiString aMessage)
{
    CString text(aMessage.ToCString());
    myCResultDialog.SetText(text);

    myCResultDialog.SetTitle(Title);
}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:7,代码来源:Viewer3dDoc.cpp

示例12: text

void OCC_3dDoc::PocessTextInDialog(char* aTitle, TCollection_AsciiString& aMessage)
{
//    aMessage+= "-------------------------------- END ----------------------------------------\n";
	CString text(aMessage.ToCString());
    myCResultDialog.SetTitle(CString(aTitle));
    myCResultDialog.SetText(text);
    SetTitle(CString(aTitle));

}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:9,代码来源:OCC_3dDoc.cpp

示例13: removeFile

static void removeFile( const TCollection_AsciiString& fileName )
{
  try {
    OSD_File( fileName ).Remove();
  }
  catch ( Standard_ProgramError ) {
    MESSAGE("Can't remove file: " << fileName.ToCString() << " ; file does not exist or permission denied");
  }
}
开发者ID:Daedalus12,项目名称:FreeCAD_sf_master,代码行数:9,代码来源:NETGENPlugin_Mesher.cpp

示例14: TextToAdd

void OCC_3dDoc::AddTextInDialog(TCollection_AsciiString& aMessage)
{
	CString TextToAdd(aMessage.ToCString());
	CString CurrentText;
	myCResultDialog.GetText(CurrentText);

	CString Text;
	Text = TextToAdd + CurrentText;

    myCResultDialog.SetText(Text);

}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:12,代码来源:OCC_3dDoc.cpp

示例15: Export

  STLEXPORT_EXPORT
  int Export(const TopoDS_Shape& theShape,
             const TCollection_AsciiString& theFileName,
             const TCollection_AsciiString& theFormatName)
  {
    MESSAGE("Export STL into file " << theFileName.ToCString());

    try
    {
      StlAPI_Writer aWriter;
      bool aIsASCIIMode;
      aIsASCIIMode = (theFormatName.IsEqual("STL_ASCII")) ? true : false;
      aWriter.ASCIIMode() = aIsASCIIMode;
      aWriter.Write(theShape, theFileName.ToCString()) ;
      return 1;
    }
    catch(Standard_Failure)
    {
      //THROW_SALOME_CORBA_EXCEPTION("Exception catched in STLExport", SALOME::BAD_PARAM);
    }
    return 0;
  }
开发者ID:triggerfish1,项目名称:pythonocc,代码行数:22,代码来源:ExchangeSTL_Export.cpp


注:本文中的TCollection_AsciiString类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。