gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
scriptStringInterface.cpp File Reference
#include <string.h>
#include <sstream>
#include "GmshConfig.h"
#include "GmshMessage.h"
#include "GModel.h"
#include "GModelIO_GEO.h"
#include "GModelIO_OCC.h"
#include "Numeric.h"
#include "StringUtils.h"
#include "Geo.h"
#include "scriptStringInterface.h"
#include "OpenFile.h"
#include "Context.h"
#include "OS.h"
#include "Parser.h"
Include dependency graph for scriptStringInterface.cpp:

Go to the source code of this file.

Functions

static void scriptAddCommand (const std::string &text, const std::string &fileNameOrEmpty, const std::string &lang)
 
void scriptRemoveLastCommand (const std::string &fileName)
 
static std::string list2String (List_T *list, const std::string &lang)
 
static std::string vector2String (const std::vector< int > &v, const std::string &lang)
 
static std::string dimTags2String (const std::vector< std::pair< int, int > > &l, const std::string &lang)
 
static void checkOCC (std::ostringstream &sstream, const std::string &lang)
 
void scriptSetFactory (const std::string &factory, const std::string &fileName)
 
static std::string api (const std::string &name, const std::string &args, const std::string &lang)
 
void scriptSetMeshSize (const std::string &fileName, const std::vector< int > &l, const std::string &lc)
 
void scriptRecombineSurface (const std::string &fileName, const std::vector< int > &l)
 
void scriptSetTransfiniteLine (std::vector< int > &l, const std::string &fileName, const std::string &type, const std::string &typearg, const std::string &pts)
 
void scriptSetTransfiniteSurface (std::vector< int > &l, const std::string &fileName, const std::string &dir)
 
void scriptSetTransfiniteVolume (std::vector< int > &l, const std::string &fileName)
 
void scriptEmbed (const std::string &fileName, const std::string &what, std::vector< int > &l, int dim, int tag)
 
void scriptAddParameter (const std::string &par, const std::string &value, const std::string &label, const std::string &path, const std::string &fileName)
 
void scriptAddPoint (const std::string &fileName, const std::string &x, const std::string &y, const std::string &z, const std::string &lc)
 
void scriptAddFieldOption (int field_id, const std::string &option_name, const std::string &option_value, int option_type, const std::string &fileName)
 
void scriptAddField (int field_id, const std::string &type_name, const std::string &fileName)
 
void scriptDeleteField (int field_id, const std::string &fileName)
 
void scriptSetBackgroundField (int field_id, const std::string &fileName)
 
void scriptAddCurve (const std::string &type, std::vector< int > &p, const std::string &fileName)
 
void scriptAddCircleArc (int p1, int p2, int p3, const std::string &fileName)
 
void scriptAddEllipseArc (int p1, int p2, int p3, int p4, const std::string &fileName)
 
void scriptAddCurveLoop (List_T *list, const std::string &fileName, int *numloop)
 
void scriptAddSurface (const std::string &type, List_T *list, const std::string &fileName)
 
void scriptAddSurfaceLoop (List_T *list, const std::string &fileName, int *numloop)
 
void scriptAddVolume (List_T *list, const std::string &fileName)
 
void scriptAddRemovePhysicalGroup (const std::string &fileName, const std::string &what, const std::vector< int > &l, const std::string &name, int forceTag, bool append, const std::string &mode)
 
void scriptSetCompound (const std::string &fileName, const std::string &type, const std::vector< int > &l)
 
void scriptAddCircle (const std::string &fileName, const std::string &x, const std::string &y, const std::string &z, const std::string &r, const std::string &alpha1, const std::string &alpha2)
 
void scriptAddEllipse (const std::string &fileName, const std::string &x, const std::string &y, const std::string &z, const std::string &rx, const std::string &ry, const std::string &alpha1, const std::string &alpha2)
 
void scriptAddDisk (const std::string &fileName, const std::string &x, const std::string &y, const std::string &z, const std::string &rx, const std::string &ry)
 
void scriptAddRectangle (const std::string &fileName, const std::string &x, const std::string &y, const std::string &z, const std::string &dx, const std::string &dy, const std::string &roundedRadius)
 
void scriptAddSphere (const std::string &fileName, const std::string &x, const std::string &y, const std::string &z, const std::string &r, const std::string &alpha1, const std::string &alpha2, const std::string &alpha3)
 
void scriptAddCylinder (const std::string &fileName, const std::string &x, const std::string &y, const std::string &z, const std::string &dx, const std::string &dy, const std::string &dz, const std::string &r, const std::string &alpha)
 
void scriptAddBox (const std::string &fileName, const std::string &x, const std::string &y, const std::string &z, const std::string &dx, const std::string &dy, const std::string &dz)
 
void scriptAddTorus (const std::string &fileName, const std::string &x, const std::string &y, const std::string &z, const std::string &r1, const std::string &r2, const std::string &alpha)
 
void scriptAddCone (const std::string &fileName, const std::string &x, const std::string &y, const std::string &z, const std::string &dx, const std::string &dy, const std::string &dz, const std::string &r1, const std::string &r2, const std::string &alpha)
 
void scriptAddWedge (const std::string &fileName, const std::string &x, const std::string &y, const std::string &z, const std::string &dx, const std::string &dy, const std::string &dz, const std::string &ltx)
 
void scriptTranslate (const std::string &fileName, const std::vector< std::pair< int, int > > &l, const std::string &tx, const std::string &ty, const std::string &tz, bool duplicata)
 
void scriptRotate (const std::string &fileName, const std::vector< std::pair< int, int > > &l, const std::string &ax, const std::string &ay, const std::string &az, const std::string &px, const std::string &py, const std::string &pz, const std::string &angle, bool duplicata)
 
void scriptDilate (const std::string &fileName, const std::vector< std::pair< int, int > > &l, const std::string &cx, const std::string &cy, const std::string &cz, const std::string &sx, const std::string &sy, const std::string &sz, bool duplicata)
 
void scriptMirror (const std::string &fileName, const std::vector< std::pair< int, int > > &l, const std::string &sa, const std::string &sb, const std::string &sc, const std::string &sd, bool duplicata)
 
void scriptExtrude (const std::string &fileName, const std::vector< std::pair< int, int > > &l, const std::string &tx, const std::string &ty, const std::string &tz, bool extrudeMesh, const std::string &layers, bool recombineMesh)
 
void scriptProtude (const std::string &fileName, const std::vector< std::pair< int, int > > &l, const std::string &ax, const std::string &ay, const std::string &az, const std::string &px, const std::string &py, const std::string &pz, const std::string &angle, bool extrudeMesh, const std::string &layers, bool recombineMesh)
 
void scriptAddPipe (const std::string &fileName, const std::vector< std::pair< int, int > > &l, const std::vector< int > &l2)
 
void scriptSplitCurve (int edge_id, List_T *vertices, const std::string &fileName)
 
void scriptBoolean (const std::string &fileName, const std::string &op, const std::vector< std::pair< int, int > > &object, const std::vector< std::pair< int, int > > &tool, int deleteObject, int deleteTool)
 
void scriptFillet (const std::string &fileName, const std::vector< int > &regions, const std::vector< int > &edges, const std::string &radius)
 
void scriptCoherence (const std::string &fileName)
 
void scriptDeleteEntities (const std::string &fileName, const std::vector< std::pair< int, int > > &l, bool recursive)
 
void scriptSetVisibilityAll (int mode, const std::string &fileName)
 
void scriptSetVisibility (int mode, const std::vector< std::pair< int, int > > &l, const std::string &fileName)
 

Variables

static std::string currentFactory = "geo"
 

Function Documentation

◆ api()

static std::string api ( const std::string &  name,
const std::string &  args,
const std::string &  lang 
)
static

Definition at line 274 of file scriptStringInterface.cpp.

Referenced by scriptAddField(), scriptAddFieldOption(), scriptAddPoint(), scriptDeleteField(), scriptRecombineSurface(), scriptSetBackgroundField(), and scriptSetMeshSize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkOCC()

static void checkOCC ( std::ostringstream &  sstream,
const std::string &  lang 
)
static

◆ dimTags2String()

static std::string dimTags2String ( const std::vector< std::pair< int, int > > &  l,
const std::string &  lang 
)
static

Definition at line 208 of file scriptStringInterface.cpp.

Referenced by scriptAddPipe(), scriptBoolean(), scriptDeleteEntities(), scriptDilate(), scriptExtrude(), scriptMirror(), scriptProtude(), scriptRotate(), scriptSetMeshSize(), scriptSetVisibility(), and scriptTranslate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ list2String()

static std::string list2String ( List_T list,
const std::string &  lang 
)
static

Definition at line 169 of file scriptStringInterface.cpp.

Referenced by scriptAddCurveLoop(), scriptAddSurface(), scriptAddSurfaceLoop(), scriptAddVolume(), and scriptSplitCurve().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scriptAddBox()

void scriptAddBox ( const std::string &  fileName,
const std::string &  x,
const std::string &  y,
const std::string &  z,
const std::string &  dx,
const std::string &  dy,
const std::string &  dz 
)

Definition at line 859 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddCircle()

void scriptAddCircle ( const std::string &  fileName,
const std::string &  x,
const std::string &  y,
const std::string &  z,
const std::string &  r,
const std::string &  alpha1,
const std::string &  alpha2 
)

Definition at line 726 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddCircleArc()

void scriptAddCircleArc ( int  p1,
int  p2,
int  p3,
const std::string &  fileName 
)

Definition at line 571 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddCommand()

◆ scriptAddCone()

void scriptAddCone ( const std::string &  fileName,
const std::string &  x,
const std::string &  y,
const std::string &  z,
const std::string &  dx,
const std::string &  dy,
const std::string &  dz,
const std::string &  r1,
const std::string &  r2,
const std::string &  alpha 
)

Definition at line 901 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddCurve()

void scriptAddCurve ( const std::string &  type,
std::vector< int > &  p,
const std::string &  fileName 
)

Definition at line 550 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddCurveLoop()

void scriptAddCurveLoop ( List_T list,
const std::string &  fileName,
int *  numloop 
)

Definition at line 603 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddCylinder()

void scriptAddCylinder ( const std::string &  fileName,
const std::string &  x,
const std::string &  y,
const std::string &  z,
const std::string &  dx,
const std::string &  dy,
const std::string &  dz,
const std::string &  r,
const std::string &  alpha 
)

Definition at line 836 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddDisk()

void scriptAddDisk ( const std::string &  fileName,
const std::string &  x,
const std::string &  y,
const std::string &  z,
const std::string &  rx,
const std::string &  ry 
)

Definition at line 771 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddEllipse()

void scriptAddEllipse ( const std::string &  fileName,
const std::string &  x,
const std::string &  y,
const std::string &  z,
const std::string &  rx,
const std::string &  ry,
const std::string &  alpha1,
const std::string &  alpha2 
)

Definition at line 748 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddEllipseArc()

void scriptAddEllipseArc ( int  p1,
int  p2,
int  p3,
int  p4,
const std::string &  fileName 
)

Definition at line 586 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddField()

void scriptAddField ( int  field_id,
const std::string &  type_name,
const std::string &  fileName 
)

Definition at line 507 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddFieldOption()

void scriptAddFieldOption ( int  field_id,
const std::string &  option_name,
const std::string &  option_value,
int  option_type,
const std::string &  fileName 
)

Definition at line 465 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddParameter()

void scriptAddParameter ( const std::string &  par,
const std::string &  value,
const std::string &  label,
const std::string &  path,
const std::string &  fileName 
)

Definition at line 416 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddPipe()

void scriptAddPipe ( const std::string &  fileName,
const std::vector< std::pair< int, int > > &  l,
const std::vector< int > &  l2 
)

Definition at line 1085 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddPoint()

void scriptAddPoint ( const std::string &  fileName,
const std::string &  x,
const std::string &  y,
const std::string &  z,
const std::string &  lc 
)

Definition at line 442 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddRectangle()

void scriptAddRectangle ( const std::string &  fileName,
const std::string &  x,
const std::string &  y,
const std::string &  z,
const std::string &  dx,
const std::string &  dy,
const std::string &  roundedRadius 
)

Definition at line 790 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddRemovePhysicalGroup()

void scriptAddRemovePhysicalGroup ( const std::string &  fileName,
const std::string &  what,
const std::vector< int > &  l,
const std::string &  name,
int  forceTag,
bool  append,
const std::string &  mode 
)

Definition at line 677 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddSphere()

void scriptAddSphere ( const std::string &  fileName,
const std::string &  x,
const std::string &  y,
const std::string &  z,
const std::string &  r,
const std::string &  alpha1,
const std::string &  alpha2,
const std::string &  alpha3 
)

Definition at line 812 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddSurface()

void scriptAddSurface ( const std::string &  type,
List_T list,
const std::string &  fileName 
)

Definition at line 624 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddSurfaceLoop()

void scriptAddSurfaceLoop ( List_T list,
const std::string &  fileName,
int *  numloop 
)

Definition at line 640 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddTorus()

void scriptAddTorus ( const std::string &  fileName,
const std::string &  x,
const std::string &  y,
const std::string &  z,
const std::string &  r1,
const std::string &  r2,
const std::string &  alpha 
)

Definition at line 879 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddVolume()

void scriptAddVolume ( List_T list,
const std::string &  fileName 
)

Definition at line 662 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptAddWedge()

void scriptAddWedge ( const std::string &  fileName,
const std::string &  x,
const std::string &  y,
const std::string &  z,
const std::string &  dx,
const std::string &  dy,
const std::string &  dz,
const std::string &  ltx 
)

Definition at line 924 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptBoolean()

void scriptBoolean ( const std::string &  fileName,
const std::string &  op,
const std::vector< std::pair< int, int > > &  object,
const std::vector< std::pair< int, int > > &  tool,
int  deleteObject,
int  deleteTool 
)

Definition at line 1124 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptCoherence()

void scriptCoherence ( const std::string &  fileName)

Definition at line 1163 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptDeleteEntities()

void scriptDeleteEntities ( const std::string &  fileName,
const std::vector< std::pair< int, int > > &  l,
bool  recursive 
)

Definition at line 1173 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptDeleteField()

void scriptDeleteField ( int  field_id,
const std::string &  fileName 
)

Definition at line 524 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptDilate()

void scriptDilate ( const std::string &  fileName,
const std::vector< std::pair< int, int > > &  l,
const std::string &  cx,
const std::string &  cy,
const std::string &  cz,
const std::string &  sx,
const std::string &  sy,
const std::string &  sz,
bool  duplicata 
)

Definition at line 989 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptEmbed()

void scriptEmbed ( const std::string &  fileName,
const std::string &  what,
std::vector< int > &  l,
int  dim,
int  tag 
)

Definition at line 396 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptExtrude()

void scriptExtrude ( const std::string &  fileName,
const std::vector< std::pair< int, int > > &  l,
const std::string &  tx,
const std::string &  ty,
const std::string &  tz,
bool  extrudeMesh,
const std::string &  layers,
bool  recombineMesh 
)

Definition at line 1034 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptFillet()

void scriptFillet ( const std::string &  fileName,
const std::vector< int > &  regions,
const std::vector< int > &  edges,
const std::string &  radius 
)

Definition at line 1146 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptMirror()

void scriptMirror ( const std::string &  fileName,
const std::vector< std::pair< int, int > > &  l,
const std::string &  sa,
const std::string &  sb,
const std::string &  sc,
const std::string &  sd,
bool  duplicata 
)

Definition at line 1012 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptProtude()

void scriptProtude ( const std::string &  fileName,
const std::vector< std::pair< int, int > > &  l,
const std::string &  ax,
const std::string &  ay,
const std::string &  az,
const std::string &  px,
const std::string &  py,
const std::string &  pz,
const std::string &  angle,
bool  extrudeMesh,
const std::string &  layers,
bool  recombineMesh 
)

Definition at line 1058 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptRecombineSurface()

void scriptRecombineSurface ( const std::string &  fileName,
const std::vector< int > &  l 
)

Definition at line 304 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptRemoveLastCommand()

void scriptRemoveLastCommand ( const std::string &  fileName)

Definition at line 142 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptRotate()

void scriptRotate ( const std::string &  fileName,
const std::vector< std::pair< int, int > > &  l,
const std::string &  ax,
const std::string &  ay,
const std::string &  az,
const std::string &  px,
const std::string &  py,
const std::string &  pz,
const std::string &  angle,
bool  duplicata 
)

Definition at line 965 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptSetBackgroundField()

void scriptSetBackgroundField ( int  field_id,
const std::string &  fileName 
)

Definition at line 537 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptSetCompound()

void scriptSetCompound ( const std::string &  fileName,
const std::string &  type,
const std::vector< int > &  l 
)

Definition at line 711 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptSetFactory()

void scriptSetFactory ( const std::string &  factory,
const std::string &  fileName 
)

Definition at line 259 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptSetMeshSize()

void scriptSetMeshSize ( const std::string &  fileName,
const std::vector< int > &  l,
const std::string &  lc 
)

Definition at line 286 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptSetTransfiniteLine()

void scriptSetTransfiniteLine ( std::vector< int > &  l,
const std::string &  fileName,
const std::string &  type,
const std::string &  typearg,
const std::string &  pts 
)

Definition at line 322 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptSetTransfiniteSurface()

void scriptSetTransfiniteSurface ( std::vector< int > &  l,
const std::string &  fileName,
const std::string &  dir 
)

Definition at line 346 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptSetTransfiniteVolume()

void scriptSetTransfiniteVolume ( std::vector< int > &  l,
const std::string &  fileName 
)

Definition at line 372 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptSetVisibility()

void scriptSetVisibility ( int  mode,
const std::vector< std::pair< int, int > > &  l,
const std::string &  fileName 
)

Definition at line 1205 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptSetVisibilityAll()

void scriptSetVisibilityAll ( int  mode,
const std::string &  fileName 
)

Definition at line 1190 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptSplitCurve()

void scriptSplitCurve ( int  edge_id,
List_T vertices,
const std::string &  fileName 
)

Definition at line 1108 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ scriptTranslate()

void scriptTranslate ( const std::string &  fileName,
const std::vector< std::pair< int, int > > &  l,
const std::string &  tx,
const std::string &  ty,
const std::string &  tz,
bool  duplicata 
)

Definition at line 944 of file scriptStringInterface.cpp.

Here is the call graph for this function:

◆ vector2String()

static std::string vector2String ( const std::vector< int > &  v,
const std::string &  lang 
)
static

Variable Documentation

◆ currentFactory

std::string currentFactory = "geo"
static