gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
GModelIO_OCC.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #ifndef GMODELIO_OCC_H
7 #define GMODELIO_OCC_H
8 
9 #include <vector>
10 #include <map>
11 #include "GmshConfig.h"
12 #include "GmshMessage.h"
13 #include "GModel.h"
14 
15 class ExtrudeParams;
16 
17 #if defined(HAVE_OCC)
18 
19 #include <TopoDS_Shape.hxx>
20 #include <TopoDS_Vertex.hxx>
21 #include <TopoDS_Edge.hxx>
22 #include <TopoDS_Wire.hxx>
23 #include <TopoDS_Face.hxx>
24 #include <TopoDS_Shell.hxx>
25 #include <TopoDS_Solid.hxx>
26 #include <TopoDS_Compound.hxx>
27 #include <TopTools_IndexedMapOfShape.hxx>
28 #include <TopTools_DataMapOfShapeInteger.hxx>
29 #include <TopTools_DataMapOfIntegerShape.hxx>
30 
31 class BRepSweep_Prism;
32 class BRepSweep_Revol;
33 class BRepBuilderAPI_Transform;
34 class BRepBuilderAPI_GTransform;
35 class OCCAttributesRTree;
36 
37 class OCC_Internals {
38 public:
40 
41 private:
42  // have the internals changed since the last synchronisation?
43  bool _changed;
44 
45  // maximum tags for each bound entity (shell, wire, vertex, edge, face, solid)
46  int _maxTag[6];
47 
48  // all the (sub)shapes, updated dynamically when shapes need to be imported
49  // into a GModel
50  TopTools_IndexedMapOfShape _vmap, _emap, _wmap, _fmap, _shmap, _somap;
51 
52  // cache mapping TopoDS_Shapes to their corresponding (future) GEntity tags
53  TopTools_DataMapOfShapeInteger _vertexTag, _edgeTag, _faceTag, _solidTag;
54  TopTools_DataMapOfIntegerShape _tagVertex, _tagEdge, _tagFace, _tagSolid;
55 
56  // cache mapping TopoDS_Shapes to tags for internal use during geometry
57  // construction
58  TopTools_DataMapOfShapeInteger _wireTag, _shellTag;
59  TopTools_DataMapOfIntegerShape _tagWire, _tagShell;
60 
61  // cache of <dim,tag> pairs corresponding to entities that will need to be
62  // removed from the model at the next synchronization
63  std::set<std::pair<int, int> > _toRemove;
64 
65  // cache of <dim,tag> pairs corresponding to entities that should not be
66  // unbound during boolean operations
67  std::set<std::pair<int, int> > _toPreserve;
68 
69  // mesh attributes
70  OCCAttributesRTree *_attributes;
71 
72  // get tag of shape, but search for other candidates at the same location if
73  // the actual shape is not found
74  int _getFuzzyTag(int dim, const TopoDS_Shape &s);
75 
76  // iterate on all bound entities and recompute the maximum tag
77  void _recomputeMaxTag(int dim);
78 
79  // bind and unbind OpenCASCADE shapes to tags
80  void _bind(const TopoDS_Vertex &vertex, int tag, bool recursive = false);
81  void _bind(const TopoDS_Edge &edge, int tag, bool recursive = false);
82  void _bind(const TopoDS_Wire &wire, int tag, bool recursive = false);
83  void _bind(const TopoDS_Face &face, int tag, bool recursive = false);
84  void _bind(const TopoDS_Shell &shell, int tag, bool recursive = false);
85  void _bind(const TopoDS_Solid &solid, int tag, bool recursive = false);
86  void _bind(TopoDS_Shape shape, int dim, int tag, bool recursive = false);
87  void _unbind(const TopoDS_Vertex &vertex, int tag, bool recursive = false);
88  void _unbind(const TopoDS_Edge &edge, int tag, bool recursive = false);
89  void _unbind(const TopoDS_Wire &wire, int tag, bool recursive = false);
90  void _unbind(const TopoDS_Face &face, int tag, bool recursive = false);
91  void _unbind(const TopoDS_Shell &shell, int tag, bool recursive = false);
92  void _unbind(const TopoDS_Solid &solid, int tag, bool recursive = false);
93  void _unbind(TopoDS_Shape shape, int dim, int tag, bool recursive = false);
94  void _unbindWithoutChecks(TopoDS_Shape shape);
95  void _unbind();
96 
97  // bind (potentially) mutliple entities in shape and return the tags in
98  // outTags. If tag > 0 and a single entity if found, use that; if
99  // highestDimOnly is true, only bind the entities (and sub-entities, if
100  // recursive is set) of the highest dimension; if returnNewOnly is set, only
101  // return newly bound entities in outDimTags.
102  void _multiBind(const TopoDS_Shape &shape, int tag,
103  std::vector<std::pair<int, int> > &outDimTags,
104  bool returnHighestDimOnly, bool recursive = false,
105  bool returnNewOnly = false);
106 
107  // is the entity of a given dimension and tag bound?
108  bool _isBound(int dim, int tag);
109 
110  // is the entity of a given dimension and shape bound?
111  bool _isBound(int dim, const TopoDS_Shape &shape);
112 
113  // get the entity of a given dimension and tag
114  TopoDS_Shape _find(int dim, int tag);
115 
116  // get the tag of a shape of a given dimension
117  int _find(int dim, const TopoDS_Shape &shape);
118 
119  // get maximum dimension of shapes bound to tags
120  int _getMaxDim();
121 
122  // get (dim,tag) of all shapes (that will be) bound to tags
123  void _getAllDimTags(std::vector<std::pair<int, int> > &dimTags, int dim = 99);
124 
125  // add a shape and all its subshapes to _vmap, _emap, ..., _somap
126  void _addShapeToMaps(const TopoDS_Shape &shape);
127 
128  // apply various healing algorithms to try to fix the shape
129  void _healShape(TopoDS_Shape &myshape, double tolerance, bool fixDegenerated,
130  bool fixSmallEdges, bool fixSmallFaces, bool sewFaces,
131  bool makeSolids, double scaling = 0.0);
132 
133  // apply a geometrical transformation
134  bool _transform(const std::vector<std::pair<int, int> > &inDimTags,
135  BRepBuilderAPI_Transform *tfo,
136  BRepBuilderAPI_GTransform *gtfo);
137 
138  // add bspline
139  bool _addBSpline(int &tag, const std::vector<int> &pointTags, int mode,
140  const int degree = -1,
141  const std::vector<double> &weights = std::vector<double>(),
142  const std::vector<double> &knots = std::vector<double>(),
143  const std::vector<int> &multiplicities = std::vector<int>(),
144  const std::vector<SVector3> &tangents = std::vector<SVector3>());
145 
146  // apply extrusion-like operations
147  bool _extrudePerDim(int mode, int inDim, const std::vector<int> &inTags,
148  double x, double y, double z, double dx, double dy,
149  double dz, double ax, double ay, double az, double angle,
150  int wireTag,
151  std::vector<std::pair<int, int> > &outDimTags,
152  ExtrudeParams *e, const std::string &trihedron);
153  bool _extrude(int mode, const std::vector<std::pair<int, int> > &inDimTags,
154  double x, double y, double z, double dx, double dy, double dz,
155  double ax, double ay, double az, double angle, int wireTag,
156  std::vector<std::pair<int, int> > &outDimTags,
157  ExtrudeParams *e = nullptr, const std::string &trihedron = "");
158 
159  // apply fillet-like operations
160  bool _fillet(int mode, const std::vector<int> &volumeTags,
161  const std::vector<int> &curveTags,
162  const std::vector<int> &surfaceTags,
163  const std::vector<double> &param,
164  std::vector<std::pair<int, int> > &outDimTags,
165  bool removeVolume);
166 
167  // set extruded mesh attributes
168  void _setExtrudedAttributes(const TopoDS_Compound &c, BRepSweep_Prism *p,
169  BRepSweep_Revol *r, ExtrudeParams *e, double x,
170  double y, double z, double dx, double dy,
171  double dz, double ax, double ay, double az,
172  double angle);
173  void _copyExtrudedAttributes(TopoDS_Edge edge, GEdge *ge);
174  void _copyExtrudedAttributes(TopoDS_Face face, GFace *gf);
175  void _copyExtrudedAttributes(TopoDS_Solid solid, GRegion *gr);
176 
177  // bounding box
178  bool _getBoundingBox(const TopoDS_Shape &s, double &xmin, double &ymin,
179  double &zmin, double &xmax, double &ymax, double &zmax);
180 
181  // STL
182  bool _makeSTL(const TopoDS_Shape &s, std::vector<SPoint3> &vertices,
183  std::vector<SVector3> &normals, std::vector<int> &triangles);
184 
185 public:
186  OCC_Internals();
187  ~OCC_Internals();
188 
189  // have the internals changed since the last synchronisation?
190  bool getChanged() const { return _changed; }
191 
192  // reset all maps
193  void reset();
194 
195  // set/get max tag of entity for each dimension (0, 1, 2, 3), as well as
196  // -2 for shells and -1 for wires
197  void setMaxTag(int dim, int val);
198  int getMaxTag(int dim) const;
199 
200  // add shapes (if tag is < 0, a new tag is automatically created and returned)
201  bool addVertex(int &tag, double x, double y, double z,
202  double meshSize = MAX_LC);
203  bool addLine(int &tag, int startTag, int endTag);
204  bool addLine(int &tag, const std::vector<int> &pointTags);
205  bool addCircleArc(int &tag, int startTag, int centerTag, int endTag);
206  bool addCircle(int &tag, double x, double y, double z, double r,
207  double angle1, double angle2,
208  const std::vector<double> &N = std::vector<double>(),
209  const std::vector<double> &V = std::vector<double>());
210  bool addEllipseArc(int &tag, int startTag, int centerTag, int majorTag,
211  int endTag);
212  bool addEllipse(int &tag, double x, double y, double z, double r1, double r2,
213  double angle1, double angle2,
214  const std::vector<double> &N = std::vector<double>(),
215  const std::vector<double> &V = std::vector<double>());
216  bool addSpline(int &tag, const std::vector<int> &pointTags,
217  const std::vector<SVector3> &tangents = std::vector<SVector3>());
218  bool addBezier(int &tag, const std::vector<int> &pointTags);
219  bool addBSpline(int &tag, const std::vector<int> &pointTags,
220  const int degree = -1,
221  const std::vector<double> &weights = std::vector<double>(),
222  const std::vector<double> &knots = std::vector<double>(),
223  const std::vector<int> &multiplicities = std::vector<int>());
224  bool addWire(int &tag, const std::vector<int> &curveTags, bool checkClosed);
225  bool addCurveLoop(int &tag, const std::vector<int> &curveTags);
226  bool addRectangle(int &tag, double x, double y, double z, double dx,
227  double dy, double roundedRadius = 0.);
228  bool addDisk(int &tag, double xc, double yc, double zc, double rx, double ry,
229  const std::vector<double> &N = std::vector<double>(),
230  const std::vector<double> &V = std::vector<double>());
231  bool addPlaneSurface(int &tag, const std::vector<int> &wireTags);
232  bool addSurfaceFilling(
233  int &tag, int wireTag,
234  const std::vector<int> &pointTags = std::vector<int>(),
235  const std::vector<int> &surfaceTags = std::vector<int>(),
236  const std::vector<int> &surfaceContinuity = std::vector<int>(),
237  const int degree = 2, const int numPointsOnCurves = 15,
238  const int numIter = 2, const bool anisotropic = false,
239  const double tol2d = 0.00001, const double tol3d = 0.0001,
240  const double tolAng = 0.01, const double tolCurv = 0.1,
241  const int maxDegree = 8, const int maxSegments = 9);
242  bool addBSplineFilling(int &tag, int wireTag, const std::string &type = "");
243  bool addBezierFilling(int &tag, int wireTag, const std::string &type = "");
244  bool addBSplineSurface(int &tag, const std::vector<int> &pointTags,
245  const int numPointsU, const int degreeU,
246  const int degreeV, const std::vector<double> &weights,
247  const std::vector<double> &knotsU,
248  const std::vector<double> &knotsV,
249  const std::vector<int> &multiplicitiesU,
250  const std::vector<int> &multiplicitiesV,
251  const std::vector<int> &wireTags = std::vector<int>(),
252  bool wire3D = true);
253  bool addBezierSurface(int &tag, const std::vector<int> &pointTags,
254  const int numPointsU,
255  const std::vector<int> &wireTags = std::vector<int>(),
256  bool wire3D = true);
257  bool addTrimmedSurface(int &tag, int surfaceTag,
258  const std::vector<int> &wireTags, bool wire3D);
259  bool addSurfaceLoop(int &tag, const std::vector<int> &surfaceTags,
260  bool sewing);
261  bool addVolume(int &tag, const std::vector<int> &shellTags);
262  bool addSphere(int &tag, double xc, double yc, double zc, double radius,
263  double angle1, double angle2, double angle3);
264  bool addBox(int &tag, double x, double y, double z, double dx, double dy,
265  double dz);
266  bool addCylinder(int &tag, double x, double y, double z, double dx, double dy,
267  double dz, double r, double angle);
268  bool addCone(int &tag, double x, double y, double z, double dx, double dy,
269  double dz, double r1, double r2, double angle);
270  bool addWedge(int &tag, double x, double y, double z, double dx, double dy,
271  double dz, double ltx,
272  const std::vector<double> &N = std::vector<double>());
273  bool addTorus(int &tag, double x, double y, double z, double r1, double r2,
274  double angle,
275  const std::vector<double> &N = std::vector<double>());
276 
277  // thrusections and thick solids (can create multiple entities)
278  bool addThruSections(int tag, const std::vector<int> &wireTags,
279  bool makeSolid, bool makeRuled,
280  std::vector<std::pair<int, int> > &outDimTags,
281  int maxDegree = -1, const std::string &continuity = "",
282  const std::string &parametrization = "",
283  bool smoothing = false);
284  bool addThickSolid(int tag, int solidTag,
285  const std::vector<int> &excludeFaceTags, double offset,
286  std::vector<std::pair<int, int> > &outDimTags);
287 
288  // extrude and revolve
289  bool extrude(const std::vector<std::pair<int, int> > &inDimTags, double dx,
290  double dy, double dz,
291  std::vector<std::pair<int, int> > &outDimTags,
292  ExtrudeParams *e = nullptr);
293  bool revolve(const std::vector<std::pair<int, int> > &inDimTags, double x,
294  double y, double z, double ax, double ay, double az,
295  double angle, std::vector<std::pair<int, int> > &outDimTags,
296  ExtrudeParams *e = nullptr);
297  bool addPipe(const std::vector<std::pair<int, int> > &inDimTags, int wireTag,
298  std::vector<std::pair<int, int> > &outDimTags,
299  const std::string &trihedron = "");
300 
301  // fillet
302  bool fillet(const std::vector<int> &volumeTags,
303  const std::vector<int> &curveTags,
304  const std::vector<double> &radii,
305  std::vector<std::pair<int, int> > &outDimTags, bool removeVolume);
306 
307  // chamfer
308  bool chamfer(const std::vector<int> &volumeTags,
309  const std::vector<int> &curveTags,
310  const std::vector<int> &surfaceTags,
311  const std::vector<double> &distances,
312  std::vector<std::pair<int, int> > &outDimTags,
313  bool removeVolume);
314 
315  // apply boolean operator
316  bool booleanOperator(
317  int tag, BooleanOperator op,
318  const std::vector<std::pair<int, int> > &objectDimTags,
319  const std::vector<std::pair<int, int> > &toolDimTags,
320  std::vector<std::pair<int, int> > &outDimTags,
321  std::vector<std::vector<std::pair<int, int> > > &outDimTagsMap,
322  bool removeObject, bool removeTool);
323  bool
324  booleanUnion(int tag, const std::vector<std::pair<int, int> > &objectDimTags,
325  const std::vector<std::pair<int, int> > &toolDimTags,
326  std::vector<std::pair<int, int> > &outDimTags,
327  std::vector<std::vector<std::pair<int, int> > > &outDimTagsMap,
328  bool removeObject, bool removeTool);
329  bool booleanIntersection(
330  int tag, const std::vector<std::pair<int, int> > &objectDimTags,
331  const std::vector<std::pair<int, int> > &toolDimTags,
332  std::vector<std::pair<int, int> > &outDimTags,
333  std::vector<std::vector<std::pair<int, int> > > &outDimTagsMap,
334  bool removeObject, bool removeTool);
335  bool booleanDifference(
336  int tag, const std::vector<std::pair<int, int> > &objectDimTags,
337  const std::vector<std::pair<int, int> > &toolDimTags,
338  std::vector<std::pair<int, int> > &outDimTags,
339  std::vector<std::vector<std::pair<int, int> > > &outDimTagsMap,
340  bool removeObject, bool removeTool);
341  bool booleanFragments(
342  int tag, const std::vector<std::pair<int, int> > &objectDimTags,
343  const std::vector<std::pair<int, int> > &toolDimTags,
344  std::vector<std::pair<int, int> > &outDimTags,
345  std::vector<std::vector<std::pair<int, int> > > &outDimTagsMap,
346  bool removeObject, bool removeTool);
347 
348  // coherence (shortcut for booleanFragments)
349  void removeAllDuplicates();
350  bool mergeVertices(const std::vector<int> &tags);
351 
352  // apply transformations
353  bool translate(const std::vector<std::pair<int, int> > &inDimTags, double dx,
354  double dy, double dz);
355  bool rotate(const std::vector<std::pair<int, int> > &inDimTags, double x,
356  double y, double z, double ax, double ay, double az,
357  double angle);
358  bool dilate(const std::vector<std::pair<int, int> > &inDimTags, double x,
359  double y, double z, double a, double b, double c);
360  bool symmetry(const std::vector<std::pair<int, int> > &inDimTags, double a,
361  double b, double c, double d);
362  bool affine(const std::vector<std::pair<int, int> > &inDimTags,
363  const std::vector<double> &mat);
364 
365  // copy and remove
366  bool copy(const std::vector<std::pair<int, int> > &inDimTags,
367  std::vector<std::pair<int, int> > &outDimTags);
368  bool remove(int dim, int tag, bool recursive = false);
369  bool remove(const std::vector<std::pair<int, int> > &dimTags,
370  bool recursive = false);
371 
372  // import shapes from file
373  bool importShapes(const std::string &fileName, bool highestDimOnly,
374  std::vector<std::pair<int, int> > &outDimTags,
375  const std::string &format = "");
376 
377  // import shapes from TopoDS_Shape
378  bool importShapes(const TopoDS_Shape *shape, bool highestDimOnly,
379  std::vector<std::pair<int, int> > &outDimTags);
380 
381  // apply various healing algorithms to try to fix the shapes
382  bool healShapes(const std::vector<std::pair<int, int> > &inDimTags,
383  std::vector<std::pair<int, int> > &outDimTags,
384  double tolerance, bool fixDegenerated, bool fixSmallEdges,
385  bool fixSmallFaces, bool sewFaces, bool makeSolids);
386 
387  // convert shapes to NURBS
388  bool convertToNURBS(const std::vector<std::pair<int, int> > &dimTags);
389 
390  // set meshing constraints
391  void setMeshSize(int dim, int tag, double size);
392 
393  // synchronize internal CAD data with the given GModel
394  void synchronize(GModel *model);
395 
396  // export all bound shapes to file
397  bool exportShapes(GModel *model, const std::string &fileName,
398  const std::string &format = "", bool onlyVisible = false);
399 
400  // queries
401  bool getEntities(std::vector<std::pair<int, int> > &dimTags, int dim);
402  bool getVertex(int tag, double &x, double &y, double &z);
403  bool getBoundingBox(int dim, int tag, double &xmin, double &ymin,
404  double &zmin, double &xmax, double &ymax, double &zmax);
405  bool getEntitiesInBoundingBox(double xmin, double ymin, double zmin,
406  double xmax, double ymax, double zmax,
407  std::vector<std::pair<int, int> > &dimTags,
408  int dim);
409  bool getCurveLoops(int surfaceTag, std::vector<int> &curveLoopTags,
410  std::vector<std::vector<int> > &curveTags);
411  bool getSurfaceLoops(int volumeTag, std::vector<int> &surfaceLoopTags,
412  std::vector<std::vector<int> > &surfaceTags);
413  bool getMass(int dim, int tag, double &mass);
414  bool getCenterOfMass(int dim, int tag, double &x, double &y, double &z);
415  bool getMatrixOfInertia(int dim, int tag, std::vector<double> &mat);
416  double getDistance(int dim1, int tag1,
417  int dim2, int tag2,
418  double &x1, double &y1, double &z1,
419  double &x2, double &y2, double &z2);
420  GVertex *getVertexForOCCShape(GModel *model, const TopoDS_Vertex &toFind);
421  GEdge *getEdgeForOCCShape(GModel *model, const TopoDS_Edge &toFind);
422  GFace *getFaceForOCCShape(GModel *model, const TopoDS_Face &toFind);
423  GRegion *getRegionForOCCShape(GModel *model, const TopoDS_Solid &toFind);
424 
425  // STL utilities
426  bool makeFaceSTL(const TopoDS_Face &s, std::vector<SPoint2> &vertices_uv,
427  std::vector<int> &triangles);
428  bool makeFaceSTL(const TopoDS_Face &s, std::vector<SPoint2> &vertices_uv,
429  std::vector<SPoint3> &vertices,
430  std::vector<SVector3> &normals, std::vector<int> &triangles);
431  bool makeFaceSTL(const TopoDS_Face &s, std::vector<SPoint3> &vertices,
432  std::vector<SVector3> &normals, std::vector<int> &triangles);
433  bool makeEdgeSTLFromFace(const TopoDS_Edge &c, const TopoDS_Face &s,
434  std::vector<SPoint3> *vertices);
435  bool makeRectangleSTL(double x, double y, double z, double dx, double dy,
436  double roundedRadius, std::vector<SPoint3> &vertices,
437  std::vector<SVector3> &normals,
438  std::vector<int> &triangles);
439  bool makeDiskSTL(double xc, double yc, double zc, double rx, double ry,
440  std::vector<SPoint3> &vertices,
441  std::vector<SVector3> &normals, std::vector<int> &triangles);
442  bool makeSphereSTL(double xc, double yc, double zc, double radius,
443  double angle1, double angle2, double angle3,
444  std::vector<SPoint3> &vertices,
445  std::vector<SVector3> &normals,
446  std::vector<int> &triangles);
447  bool makeBoxSTL(double x, double y, double z, double dx, double dy, double dz,
448  std::vector<SPoint3> &vertices,
449  std::vector<SVector3> &normals, std::vector<int> &triangles);
450  bool makeCylinderSTL(double x, double y, double z, double dx, double dy,
451  double dz, double r, double angle,
452  std::vector<SPoint3> &vertices,
453  std::vector<SVector3> &normals,
454  std::vector<int> &triangles);
455  bool makeConeSTL(double x, double y, double z, double dx, double dy,
456  double dz, double r1, double r2, double angle,
457  std::vector<SPoint3> &vertices,
458  std::vector<SVector3> &normals, std::vector<int> &triangles);
459  bool makeWedgeSTL(double x, double y, double z, double dx, double dy,
460  double dz, double ltx, std::vector<SPoint3> &vertices,
461  std::vector<SVector3> &normals,
462  std::vector<int> &triangles);
463  bool makeTorusSTL(double x, double y, double z, double r1, double r2,
464  double angle, std::vector<SPoint3> &vertices,
465  std::vector<SVector3> &normals,
466  std::vector<int> &triangles);
467 };
468 
469 #else
470 
472 private:
473  bool _error(std::string what)
474  {
475  Msg::Error("Gmsh requires OpenCASCADE to %s", what.c_str());
476  return false;
477  }
478 
479 public:
482  bool getChanged() const { return false; }
483  void reset() {}
484  void setMaxTag(int dim, int val) {}
485  int getMaxTag(int dim) const { return 0; }
486  bool addVertex(int &tag, double x, double y, double z,
487  double meshSize = MAX_LC)
488  {
489  return _error("add vertex");
490  }
491  bool addLine(int &tag, int startTag, int endTag)
492  {
493  return _error("add line");
494  }
495  bool addLine(int &tag, const std::vector<int> &pointTags)
496  {
497  return _error("add line");
498  }
499  bool addCircleArc(int &tag, int startTag, int centerTag, int endTag)
500  {
501  return _error("add circle arc");
502  }
503  bool addCircle(int &tag, double x, double y, double z, double r,
504  double angle1, double angle2,
505  const std::vector<double> &N = std::vector<double>(),
506  const std::vector<double> &V = std::vector<double>())
507  {
508  return _error("add circle");
509  }
510  bool addEllipseArc(int &tag, int startTag, int centerTag, int majorTag,
511  int endTag)
512  {
513  return _error("add ellipse arc");
514  }
515  bool addEllipse(int &tag, double x, double y, double z, double r1, double r2,
516  double angle1, double angle2,
517  const std::vector<double> &N = std::vector<double>(),
518  const std::vector<double> &V = std::vector<double>())
519  {
520  return _error("add ellipse");
521  }
522  bool addSpline(int &tag, const std::vector<int> &pointTags,
523  const std::vector<SVector3> &tangents = std::vector<SVector3>())
524  {
525  return _error("add spline");
526  }
527  bool addBezier(int &tag, const std::vector<int> &pointTags)
528  {
529  return _error("add Bezier");
530  }
531  bool addBSpline(int &tag, const std::vector<int> &pointTags,
532  const int degree = -1,
533  const std::vector<double> &weights = std::vector<double>(),
534  const std::vector<double> &knots = std::vector<double>(),
535  const std::vector<int> &multiplicities = std::vector<int>())
536  {
537  return _error("add BSpline");
538  }
539  bool addWire(int &tag, const std::vector<int> &curveTags, bool closed)
540  {
541  return _error("add wire");
542  }
543  bool addCurveLoop(int &tag, const std::vector<int> &curveTags)
544  {
545  return _error("add curve loop");
546  }
547  bool addRectangle(int &tag, double x, double y, double z, double dx,
548  double dy, double roundedRadius = 0.)
549  {
550  return _error("add rectangle");
551  }
552  bool addDisk(int &tag, double xc, double yc, double zc, double rx, double ry,
553  const std::vector<double> &N = std::vector<double>(),
554  const std::vector<double> &V = std::vector<double>())
555  {
556  return _error("add disk");
557  }
558  bool addPlaneSurface(int &tag, const std::vector<int> &wireTags)
559  {
560  return _error("add plane surface");
561  }
563  int &tag, int wireTag,
564  const std::vector<int> &pointTags = std::vector<int>(),
565  const std::vector<int> &surfaceTags = std::vector<int>(),
566  const std::vector<int> &surfaceContinuity = std::vector<int>(),
567  const int degree = 2, const int numPointsOnCurves = 15,
568  const int numIter = 2, const bool anisotropic = false,
569  const double tol2d = 0.00001, const double tol3d = 0.0001,
570  const double tolAng = 0.01, const double tolCurv = 0.1,
571  const int maxDegree = 8, const int maxSegments = 9)
572  {
573  return _error("add surface filling");
574  }
575  bool addBSplineFilling(int &tag, int wireTag, const std::string &type = "")
576  {
577  return _error("add BSpline filling");
578  }
579  bool addBezierFilling(int &tag, int wireTag, const std::string &type = "")
580  {
581  return _error("add Bezier filling");
582  }
583  bool addBSplineSurface(int &tag, const std::vector<int> &pointTags,
584  const int numPointsU, const int degreeU,
585  const int degreeV, const std::vector<double> &weights,
586  const std::vector<double> &knotsU,
587  const std::vector<double> &knotsV,
588  const std::vector<int> &multiplicitiesU,
589  const std::vector<int> &multiplicitiesV,
590  const std::vector<int> &wireTags = std::vector<int>(),
591  bool wire3D = true)
592  {
593  return _error("add BSpline surface");
594  }
595  bool addBezierSurface(int &tag, const std::vector<int> &pointTags,
596  const int numPointsU,
597  const std::vector<int> &wireTags = std::vector<int>(),
598  bool wire3D = true)
599  {
600  return _error("add Bezier surface");
601  }
602  bool addTrimmedSurface(int &tag, int surfaceTag,
603  const std::vector<int> &wireTags, bool wire3D)
604  {
605  return _error("add trimmed surface");
606  }
607  bool addSurfaceLoop(int &tag, const std::vector<int> &surfaceTags,
608  bool sewing)
609  {
610  return _error("add surface loop");
611  }
612  bool addVolume(int &tag, const std::vector<int> &shellTags)
613  {
614  return _error("add volume");
615  }
616  bool addSphere(int &tag, double xc, double yc, double zc, double radius,
617  double angle1, double angle2, double angle3)
618  {
619  return _error("add sphere");
620  }
621  bool addBox(int &tag, double x, double y, double z, double dx, double dy,
622  double dz)
623  {
624  return _error("add box");
625  }
626  bool addCylinder(int &tag, double x, double y, double z, double dx, double dy,
627  double dz, double r, double angle)
628  {
629  return _error("add cylinder");
630  }
631  bool addCone(int &tag, double x, double y, double z, double dx, double dy,
632  double dz, double r1, double r2, double angle)
633  {
634  return _error("add cone");
635  }
636  bool addWedge(int &tag, double x, double y, double z, double dx, double dy,
637  double dz, double ltx,
638  const std::vector<double> &N = std::vector<double>())
639  {
640  return _error("add wedge");
641  }
642  bool addTorus(int &tag, double x, double y, double z, double r1, double r2,
643  double angle,
644  const std::vector<double> &N = std::vector<double>())
645  {
646  return _error("add torus");
647  }
648  bool addThruSections(int tag, const std::vector<int> &wireTags,
649  bool makeSolid, bool makeRuled,
650  std::vector<std::pair<int, int> > &outDimTags,
651  int maxDegree = -1, const std::string &continuity = "",
652  const std::string &parametrization = "",
653  bool smoothing = false)
654  {
655  return _error("add thrusection");
656  }
657  bool addThickSolid(int tag, int solidTag,
658  const std::vector<int> &excludeFaceTags, double offset,
659  std::vector<std::pair<int, int> > &outDimTags)
660  {
661  return _error("add thick solid");
662  }
663  bool extrude(const std::vector<std::pair<int, int> > &inDimTags, double dx,
664  double dy, double dz,
665  std::vector<std::pair<int, int> > &outDimTags,
666  ExtrudeParams *e = 0)
667  {
668  return _error("extrude");
669  }
670  bool revolve(const std::vector<std::pair<int, int> > &inDimTags, double x,
671  double y, double z, double ax, double ay, double az,
672  double angle, std::vector<std::pair<int, int> > &outDimTags,
673  ExtrudeParams *e = 0)
674  {
675  return _error("revolve");
676  }
677  bool addPipe(const std::vector<std::pair<int, int> > &inDimTags, int wireTag,
678  std::vector<std::pair<int, int> > &outDimTags,
679  const std::string &trihedron = "")
680  {
681  return _error("add pipe");
682  }
683  bool fillet(const std::vector<int> &volumeTags,
684  const std::vector<int> &curveTags,
685  const std::vector<double> &radii,
686  std::vector<std::pair<int, int> > &outDimTags, bool removeVolume)
687  {
688  return _error("create fillet");
689  }
690  bool chamfer(const std::vector<int> &volumeTags,
691  const std::vector<int> &curveTags,
692  const std::vector<int> &surfaceTags,
693  const std::vector<double> &distances,
694  std::vector<std::pair<int, int> > &outDimTags, bool removeVolume)
695  {
696  return _error("create chamfer");
697  }
699  int tag, BooleanOperator op,
700  const std::vector<std::pair<int, int> > &objectDimTags,
701  const std::vector<std::pair<int, int> > &toolDimTags,
702  std::vector<std::pair<int, int> > &outDimTags,
703  std::vector<std::vector<std::pair<int, int> > > &outDimTagsMap,
704  bool removeObject, bool removeTool)
705  {
706  return _error("apply boolean operator");
707  }
708  bool
709  booleanUnion(int tag, const std::vector<std::pair<int, int> > &objectDimTags,
710  const std::vector<std::pair<int, int> > &toolDimTags,
711  std::vector<std::pair<int, int> > &outDimTags,
712  std::vector<std::vector<std::pair<int, int> > > &outDimTagsMap,
713  bool removeObject, bool removeTool)
714  {
715  return _error("apply boolean union");
716  }
718  int tag, const std::vector<std::pair<int, int> > &objectDimTags,
719  const std::vector<std::pair<int, int> > &toolDimTags,
720  std::vector<std::pair<int, int> > &outDimTags,
721  std::vector<std::vector<std::pair<int, int> > > &outDimTagsMap,
722  bool removeObject, bool removeTool)
723  {
724  return _error("apply boolean intersection");
725  }
727  int tag, const std::vector<std::pair<int, int> > &objectDimTags,
728  const std::vector<std::pair<int, int> > &toolDimTags,
729  std::vector<std::pair<int, int> > &outDimTags,
730  std::vector<std::vector<std::pair<int, int> > > &outDimTagsMap,
731  bool removeObject, bool removeTool)
732  {
733  return _error("apply boolean difference");
734  }
736  int tag, const std::vector<std::pair<int, int> > &objectDimTags,
737  const std::vector<std::pair<int, int> > &toolDimTags,
738  std::vector<std::pair<int, int> > &outDimTags,
739  std::vector<std::vector<std::pair<int, int> > > &outDimTagsMap,
740  bool removeObject, bool removeTool)
741  {
742  return _error("apply boolean fragments");
743  }
744  void removeAllDuplicates() { _error("remove all duplicates"); }
745  bool mergeVertices(const std::vector<int> &tags)
746  {
747  return _error("merge vertices");
748  }
749  bool translate(const std::vector<std::pair<int, int> > &inDimTags, double dx,
750  double dy, double dz)
751  {
752  return _error("apply translation");
753  }
754  bool rotate(const std::vector<std::pair<int, int> > &inDimTags, double x,
755  double y, double z, double ax, double ay, double az, double angle)
756  {
757  return _error("apply rotation");
758  }
759  bool dilate(const std::vector<std::pair<int, int> > &inDimTags, double x,
760  double y, double z, double a, double b, double c)
761  {
762  return _error("apply dilatation");
763  }
764  bool symmetry(const std::vector<std::pair<int, int> > &inDimTags, double a,
765  double b, double c, double d)
766  {
767  return _error("apply symmetry");
768  }
769  bool affine(const std::vector<std::pair<int, int> > &inDimTags,
770  const std::vector<double> &mat)
771  {
772  return _error("apply affine transform");
773  }
774  bool copy(const std::vector<std::pair<int, int> > &inDimTags,
775  std::vector<std::pair<int, int> > &outDimTags)
776  {
777  return _error("copy shape");
778  }
779  bool remove(int dim, int tag, bool recursive = false) { return false; }
780  bool remove(const std::vector<std::pair<int, int> > &dimTags,
781  bool recursive = false)
782  {
783  return false;
784  }
785  bool importShapes(const std::string &fileName, bool highestDimOnly,
786  std::vector<std::pair<int, int> > &outDimTags,
787  const std::string &format = "")
788  {
789  return _error("import shape");
790  }
791  bool healShapes(const std::vector<std::pair<int, int> > &inDimTags,
792  std::vector<std::pair<int, int> > &outDimTags,
793  double tolerance, bool fixDegenerated, bool fixSmallEdges,
794  bool fixSmallFaces, bool sewFaces, bool makeSolids)
795  {
796  return _error("heal shapes");
797  }
798  bool convertToNURBS(const std::vector<std::pair<int, int> > &dimTags)
799  {
800  return _error("convert to NURBS");
801  }
802  void setMeshSize(int dim, int tag, double size) {}
803  void synchronize(GModel *model) {}
804  bool exportShapes(GModel *model, const std::string &fileName,
805  const std::string &format = "", bool onlyVisible = false)
806  {
807  return _error("export shape");
808  }
809  bool getEntities(std::vector<std::pair<int, int> > &dimTags, int dim)
810  {
811  return false;
812  }
813  bool getVertex(int tag, double &x, double &y, double &z) { return false; }
814  bool getBoundingBox(int dim, int tag, double &xmin, double &ymin,
815  double &zmin, double &xmax, double &ymax, double &zmax)
816  {
817  return false;
818  }
819  bool getEntitiesInBoundingBox(double xmin, double ymin, double zmin,
820  double xmax, double ymax, double zmax,
821  std::vector<std::pair<int, int> > &dimTags,
822  int dim)
823  {
824  return false;
825  }
826  bool getCurveLoops(int surfaceTag, std::vector<int> &curveLoopTags,
827  std::vector<std::vector<int> > &curveTags)
828  {
829  return false;
830  }
831  bool getSurfaceLoops(int volumeTag, std::vector<int> &surfaceLoopTags,
832  std::vector<std::vector<int> > &surfaceTags)
833  {
834  return false;
835  }
836  bool getMass(int dim, int tag, double &mass) { return false; }
837  bool getCenterOfMass(int dim, int tag, double &x, double &y, double &z)
838  {
839  return false;
840  }
841  bool getMatrixOfInertia(int dim, int tag, std::vector<double> &mat)
842  {
843  return false;
844  }
845  double getDistance(int dim1, int tag1,
846  int dim2, int tag2,
847  double &x1, double &y1, double &z1,
848  double &x2, double &y2, double &z2)
849  {
850  return -1;
851  }
852  bool makeRectangleSTL(double x, double y, double z, double dx, double dy,
853  double roundedRadius, std::vector<SPoint3> &vertices,
854  std::vector<SVector3> &normals,
855  std::vector<int> &triangles)
856  {
857  return false;
858  }
859  bool makeDiskSTL(double xc, double yc, double zc, double rx, double ry,
860  std::vector<SPoint3> &vertices,
861  std::vector<SVector3> &normals, std::vector<int> &triangles)
862  {
863  return false;
864  }
865  bool makeSphereSTL(double xc, double yc, double zc, double radius,
866  double angle1, double angle2, double angle3,
867  std::vector<SPoint3> &vertices,
868  std::vector<SVector3> &normals,
869  std::vector<int> &triangles)
870  {
871  return false;
872  }
873  bool makeBoxSTL(double x, double y, double z, double dx, double dy, double dz,
874  std::vector<SPoint3> &vertices,
875  std::vector<SVector3> &normals, std::vector<int> &triangles)
876  {
877  return false;
878  }
879  bool makeCylinderSTL(double x, double y, double z, double dx, double dy,
880  double dz, double r, double angle,
881  std::vector<SPoint3> &vertices,
882  std::vector<SVector3> &normals,
883  std::vector<int> &triangles)
884  {
885  return false;
886  }
887  bool makeConeSTL(double x, double y, double z, double dx, double dy,
888  double dz, double r1, double r2, double angle,
889  std::vector<SPoint3> &vertices,
890  std::vector<SVector3> &normals, std::vector<int> &triangles)
891  {
892  return false;
893  }
894  bool makeWedgeSTL(double x, double y, double z, double dx, double dy,
895  double dz, double ltx, std::vector<SPoint3> &vertices,
896  std::vector<SVector3> &normals, std::vector<int> &triangles)
897  {
898  return false;
899  }
900  bool makeTorusSTL(double x, double y, double z, double r1, double r2,
901  double angle, std::vector<SPoint3> &vertices,
902  std::vector<SVector3> &normals, std::vector<int> &triangles)
903  {
904  return false;
905  }
906 };
907 
908 #endif
909 #endif
OCC_Internals::setMaxTag
void setMaxTag(int dim, int val)
Definition: GModelIO_OCC.h:484
OCC_Internals::Fragments
@ Fragments
Definition: GModelIO_OCC.h:480
OCC_Internals::Intersection
@ Intersection
Definition: GModelIO_OCC.h:480
OCC_Internals::addVertex
bool addVertex(int &tag, double x, double y, double z, double meshSize=MAX_LC)
Definition: GModelIO_OCC.h:486
OCC_Internals::Section
@ Section
Definition: GModelIO_OCC.h:480
OCC_Internals::symmetry
bool symmetry(const std::vector< std::pair< int, int > > &inDimTags, double a, double b, double c, double d)
Definition: GModelIO_OCC.h:764
tags
static std::map< SPoint2, unsigned int > tags
Definition: drawGraph2d.cpp:400
OCC_Internals::addCircleArc
bool addCircleArc(int &tag, int startTag, int centerTag, int endTag)
Definition: GModelIO_OCC.h:499
OCC_Internals::setMeshSize
void setMeshSize(int dim, int tag, double size)
Definition: GModelIO_OCC.h:802
OCC_Internals::booleanIntersection
bool booleanIntersection(int tag, const std::vector< std::pair< int, int > > &objectDimTags, const std::vector< std::pair< int, int > > &toolDimTags, std::vector< std::pair< int, int > > &outDimTags, std::vector< std::vector< std::pair< int, int > > > &outDimTagsMap, bool removeObject, bool removeTool)
Definition: GModelIO_OCC.h:717
OCC_Internals::addTorus
bool addTorus(int &tag, double x, double y, double z, double r1, double r2, double angle, const std::vector< double > &N=std::vector< double >())
Definition: GModelIO_OCC.h:642
OCC_Internals::addLine
bool addLine(int &tag, int startTag, int endTag)
Definition: GModelIO_OCC.h:491
OCC_Internals::addVolume
bool addVolume(int &tag, const std::vector< int > &shellTags)
Definition: GModelIO_OCC.h:612
OCC_Internals::makeTorusSTL
bool makeTorusSTL(double x, double y, double z, double r1, double r2, double angle, std::vector< SPoint3 > &vertices, std::vector< SVector3 > &normals, std::vector< int > &triangles)
Definition: GModelIO_OCC.h:900
OCC_Internals::makeSphereSTL
bool makeSphereSTL(double xc, double yc, double zc, double radius, double angle1, double angle2, double angle3, std::vector< SPoint3 > &vertices, std::vector< SVector3 > &normals, std::vector< int > &triangles)
Definition: GModelIO_OCC.h:865
OCC_Internals::revolve
bool revolve(const std::vector< std::pair< int, int > > &inDimTags, double x, double y, double z, double ax, double ay, double az, double angle, std::vector< std::pair< int, int > > &outDimTags, ExtrudeParams *e=0)
Definition: GModelIO_OCC.h:670
OCC_Internals::copy
bool copy(const std::vector< std::pair< int, int > > &inDimTags, std::vector< std::pair< int, int > > &outDimTags)
Definition: GModelIO_OCC.h:774
OCC_Internals::addSurfaceLoop
bool addSurfaceLoop(int &tag, const std::vector< int > &surfaceTags, bool sewing)
Definition: GModelIO_OCC.h:607
GFace
Definition: GFace.h:33
angle
double angle(const SVector3 &a, const SVector3 &b)
Definition: SVector3.h:157
c
static double c(int i, int j, fullMatrix< double > &CA, const std::vector< SPoint3 > &P, const std::vector< SPoint3 > &Q)
Definition: discreteFrechetDistance.cpp:15
OCC_Internals::getMass
bool getMass(int dim, int tag, double &mass)
Definition: GModelIO_OCC.h:836
Msg::Error
static void Error(const char *fmt,...)
Definition: GmshMessage.cpp:482
OCC_Internals::addSphere
bool addSphere(int &tag, double xc, double yc, double zc, double radius, double angle1, double angle2, double angle3)
Definition: GModelIO_OCC.h:616
OCC_Internals::booleanDifference
bool booleanDifference(int tag, const std::vector< std::pair< int, int > > &objectDimTags, const std::vector< std::pair< int, int > > &toolDimTags, std::vector< std::pair< int, int > > &outDimTags, std::vector< std::vector< std::pair< int, int > > > &outDimTagsMap, bool removeObject, bool removeTool)
Definition: GModelIO_OCC.h:726
OCC_Internals::addSpline
bool addSpline(int &tag, const std::vector< int > &pointTags, const std::vector< SVector3 > &tangents=std::vector< SVector3 >())
Definition: GModelIO_OCC.h:522
OCC_Internals::getDistance
double getDistance(int dim1, int tag1, int dim2, int tag2, double &x1, double &y1, double &z1, double &x2, double &y2, double &z2)
Definition: GModelIO_OCC.h:845
OCC_Internals::addCurveLoop
bool addCurveLoop(int &tag, const std::vector< int > &curveTags)
Definition: GModelIO_OCC.h:543
OCC_Internals::dilate
bool dilate(const std::vector< std::pair< int, int > > &inDimTags, double x, double y, double z, double a, double b, double c)
Definition: GModelIO_OCC.h:759
OCC_Internals::addBezierFilling
bool addBezierFilling(int &tag, int wireTag, const std::string &type="")
Definition: GModelIO_OCC.h:579
GmshMessage.h
MAX_LC
#define MAX_LC
Definition: GEntity.h:19
OCC_Internals::addWedge
bool addWedge(int &tag, double x, double y, double z, double dx, double dy, double dz, double ltx, const std::vector< double > &N=std::vector< double >())
Definition: GModelIO_OCC.h:636
OCC_Internals::addPipe
bool addPipe(const std::vector< std::pair< int, int > > &inDimTags, int wireTag, std::vector< std::pair< int, int > > &outDimTags, const std::string &trihedron="")
Definition: GModelIO_OCC.h:677
OCC_Internals::addBSplineSurface
bool addBSplineSurface(int &tag, const std::vector< int > &pointTags, const int numPointsU, const int degreeU, const int degreeV, const std::vector< double > &weights, const std::vector< double > &knotsU, const std::vector< double > &knotsV, const std::vector< int > &multiplicitiesU, const std::vector< int > &multiplicitiesV, const std::vector< int > &wireTags=std::vector< int >(), bool wire3D=true)
Definition: GModelIO_OCC.h:583
OCC_Internals::convertToNURBS
bool convertToNURBS(const std::vector< std::pair< int, int > > &dimTags)
Definition: GModelIO_OCC.h:798
OCC_Internals::addRectangle
bool addRectangle(int &tag, double x, double y, double z, double dx, double dy, double roundedRadius=0.)
Definition: GModelIO_OCC.h:547
OCC_Internals::addBSplineFilling
bool addBSplineFilling(int &tag, int wireTag, const std::string &type="")
Definition: GModelIO_OCC.h:575
OCC_Internals::booleanFragments
bool booleanFragments(int tag, const std::vector< std::pair< int, int > > &objectDimTags, const std::vector< std::pair< int, int > > &toolDimTags, std::vector< std::pair< int, int > > &outDimTags, std::vector< std::vector< std::pair< int, int > > > &outDimTagsMap, bool removeObject, bool removeTool)
Definition: GModelIO_OCC.h:735
OCC_Internals::booleanOperator
bool booleanOperator(int tag, BooleanOperator op, const std::vector< std::pair< int, int > > &objectDimTags, const std::vector< std::pair< int, int > > &toolDimTags, std::vector< std::pair< int, int > > &outDimTags, std::vector< std::vector< std::pair< int, int > > > &outDimTagsMap, bool removeObject, bool removeTool)
Definition: GModelIO_OCC.h:698
OCC_Internals::Difference
@ Difference
Definition: GModelIO_OCC.h:480
OCC_Internals::makeConeSTL
bool makeConeSTL(double x, double y, double z, double dx, double dy, double dz, double r1, double r2, double angle, std::vector< SPoint3 > &vertices, std::vector< SVector3 > &normals, std::vector< int > &triangles)
Definition: GModelIO_OCC.h:887
OCC_Internals::addDisk
bool addDisk(int &tag, double xc, double yc, double zc, double rx, double ry, const std::vector< double > &N=std::vector< double >(), const std::vector< double > &V=std::vector< double >())
Definition: GModelIO_OCC.h:552
OCC_Internals::addEllipseArc
bool addEllipseArc(int &tag, int startTag, int centerTag, int majorTag, int endTag)
Definition: GModelIO_OCC.h:510
OCC_Internals::BooleanOperator
BooleanOperator
Definition: GModelIO_OCC.h:480
OCC_Internals::extrude
bool extrude(const std::vector< std::pair< int, int > > &inDimTags, double dx, double dy, double dz, std::vector< std::pair< int, int > > &outDimTags, ExtrudeParams *e=0)
Definition: GModelIO_OCC.h:663
OCC_Internals::_error
bool _error(std::string what)
Definition: GModelIO_OCC.h:473
GVertex
Definition: GVertex.h:23
OCC_Internals::addBezierSurface
bool addBezierSurface(int &tag, const std::vector< int > &pointTags, const int numPointsU, const std::vector< int > &wireTags=std::vector< int >(), bool wire3D=true)
Definition: GModelIO_OCC.h:595
OCC_Internals::makeBoxSTL
bool makeBoxSTL(double x, double y, double z, double dx, double dy, double dz, std::vector< SPoint3 > &vertices, std::vector< SVector3 > &normals, std::vector< int > &triangles)
Definition: GModelIO_OCC.h:873
tolerance
#define tolerance
Definition: curvature.cpp:11
OCC_Internals::getEntitiesInBoundingBox
bool getEntitiesInBoundingBox(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax, std::vector< std::pair< int, int > > &dimTags, int dim)
Definition: GModelIO_OCC.h:819
OCC_Internals::getMaxTag
int getMaxTag(int dim) const
Definition: GModelIO_OCC.h:485
OCC_Internals::addSurfaceFilling
bool addSurfaceFilling(int &tag, int wireTag, const std::vector< int > &pointTags=std::vector< int >(), const std::vector< int > &surfaceTags=std::vector< int >(), const std::vector< int > &surfaceContinuity=std::vector< int >(), const int degree=2, const int numPointsOnCurves=15, const int numIter=2, const bool anisotropic=false, const double tol2d=0.00001, const double tol3d=0.0001, const double tolAng=0.01, const double tolCurv=0.1, const int maxDegree=8, const int maxSegments=9)
Definition: GModelIO_OCC.h:562
GModel
Definition: GModel.h:44
OCC_Internals::remove
bool remove(const std::vector< std::pair< int, int > > &dimTags, bool recursive=false)
Definition: GModelIO_OCC.h:780
OCC_Internals::makeCylinderSTL
bool makeCylinderSTL(double x, double y, double z, double dx, double dy, double dz, double r, double angle, std::vector< SPoint3 > &vertices, std::vector< SVector3 > &normals, std::vector< int > &triangles)
Definition: GModelIO_OCC.h:879
OCC_Internals::translate
bool translate(const std::vector< std::pair< int, int > > &inDimTags, double dx, double dy, double dz)
Definition: GModelIO_OCC.h:749
OCC_Internals::makeRectangleSTL
bool makeRectangleSTL(double x, double y, double z, double dx, double dy, double roundedRadius, std::vector< SPoint3 > &vertices, std::vector< SVector3 > &normals, std::vector< int > &triangles)
Definition: GModelIO_OCC.h:852
OCC_Internals
Definition: GModelIO_OCC.h:471
OCC_Internals::makeDiskSTL
bool makeDiskSTL(double xc, double yc, double zc, double rx, double ry, std::vector< SPoint3 > &vertices, std::vector< SVector3 > &normals, std::vector< int > &triangles)
Definition: GModelIO_OCC.h:859
OCC_Internals::getSurfaceLoops
bool getSurfaceLoops(int volumeTag, std::vector< int > &surfaceLoopTags, std::vector< std::vector< int > > &surfaceTags)
Definition: GModelIO_OCC.h:831
OCC_Internals::addThickSolid
bool addThickSolid(int tag, int solidTag, const std::vector< int > &excludeFaceTags, double offset, std::vector< std::pair< int, int > > &outDimTags)
Definition: GModelIO_OCC.h:657
OCC_Internals::fillet
bool fillet(const std::vector< int > &volumeTags, const std::vector< int > &curveTags, const std::vector< double > &radii, std::vector< std::pair< int, int > > &outDimTags, bool removeVolume)
Definition: GModelIO_OCC.h:683
OCC_Internals::removeAllDuplicates
void removeAllDuplicates()
Definition: GModelIO_OCC.h:744
OCC_Internals::addEllipse
bool addEllipse(int &tag, double x, double y, double z, double r1, double r2, double angle1, double angle2, const std::vector< double > &N=std::vector< double >(), const std::vector< double > &V=std::vector< double >())
Definition: GModelIO_OCC.h:515
OCC_Internals::getEntities
bool getEntities(std::vector< std::pair< int, int > > &dimTags, int dim)
Definition: GModelIO_OCC.h:809
OCC_Internals::importShapes
bool importShapes(const std::string &fileName, bool highestDimOnly, std::vector< std::pair< int, int > > &outDimTags, const std::string &format="")
Definition: GModelIO_OCC.h:785
OCC_Internals::addBox
bool addBox(int &tag, double x, double y, double z, double dx, double dy, double dz)
Definition: GModelIO_OCC.h:621
OCC_Internals::getBoundingBox
bool getBoundingBox(int dim, int tag, double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
Definition: GModelIO_OCC.h:814
OCC_Internals::addLine
bool addLine(int &tag, const std::vector< int > &pointTags)
Definition: GModelIO_OCC.h:495
GRegion
Definition: GRegion.h:28
OCC_Internals::rotate
bool rotate(const std::vector< std::pair< int, int > > &inDimTags, double x, double y, double z, double ax, double ay, double az, double angle)
Definition: GModelIO_OCC.h:754
OCC_Internals::exportShapes
bool exportShapes(GModel *model, const std::string &fileName, const std::string &format="", bool onlyVisible=false)
Definition: GModelIO_OCC.h:804
OCC_Internals::makeWedgeSTL
bool makeWedgeSTL(double x, double y, double z, double dx, double dy, double dz, double ltx, std::vector< SPoint3 > &vertices, std::vector< SVector3 > &normals, std::vector< int > &triangles)
Definition: GModelIO_OCC.h:894
OCC_Internals::addCircle
bool addCircle(int &tag, double x, double y, double z, double r, double angle1, double angle2, const std::vector< double > &N=std::vector< double >(), const std::vector< double > &V=std::vector< double >())
Definition: GModelIO_OCC.h:503
OCC_Internals::getVertex
bool getVertex(int tag, double &x, double &y, double &z)
Definition: GModelIO_OCC.h:813
z
const double z
Definition: GaussQuadratureQuad.cpp:56
OCC_Internals::addBezier
bool addBezier(int &tag, const std::vector< int > &pointTags)
Definition: GModelIO_OCC.h:527
OCC_Internals::addCone
bool addCone(int &tag, double x, double y, double z, double dx, double dy, double dz, double r1, double r2, double angle)
Definition: GModelIO_OCC.h:631
OCC_Internals::addWire
bool addWire(int &tag, const std::vector< int > &curveTags, bool closed)
Definition: GModelIO_OCC.h:539
OCC_Internals::getCenterOfMass
bool getCenterOfMass(int dim, int tag, double &x, double &y, double &z)
Definition: GModelIO_OCC.h:837
GEdge
Definition: GEdge.h:26
OCC_Internals::synchronize
void synchronize(GModel *model)
Definition: GModelIO_OCC.h:803
OCC_Internals::getCurveLoops
bool getCurveLoops(int surfaceTag, std::vector< int > &curveLoopTags, std::vector< std::vector< int > > &curveTags)
Definition: GModelIO_OCC.h:826
OCC_Internals::addBSpline
bool addBSpline(int &tag, const std::vector< int > &pointTags, const int degree=-1, const std::vector< double > &weights=std::vector< double >(), const std::vector< double > &knots=std::vector< double >(), const std::vector< int > &multiplicities=std::vector< int >())
Definition: GModelIO_OCC.h:531
OCC_Internals::affine
bool affine(const std::vector< std::pair< int, int > > &inDimTags, const std::vector< double > &mat)
Definition: GModelIO_OCC.h:769
OCC_Internals::OCC_Internals
OCC_Internals()
Definition: GModelIO_OCC.h:481
GModel.h
OCC_Internals::addPlaneSurface
bool addPlaneSurface(int &tag, const std::vector< int > &wireTags)
Definition: GModelIO_OCC.h:558
OCC_Internals::booleanUnion
bool booleanUnion(int tag, const std::vector< std::pair< int, int > > &objectDimTags, const std::vector< std::pair< int, int > > &toolDimTags, std::vector< std::pair< int, int > > &outDimTags, std::vector< std::vector< std::pair< int, int > > > &outDimTagsMap, bool removeObject, bool removeTool)
Definition: GModelIO_OCC.h:709
OCC_Internals::Union
@ Union
Definition: GModelIO_OCC.h:480
OCC_Internals::mergeVertices
bool mergeVertices(const std::vector< int > &tags)
Definition: GModelIO_OCC.h:745
ExtrudeParams
Definition: ExtrudeParams.h:26
OCC_Internals::healShapes
bool healShapes(const std::vector< std::pair< int, int > > &inDimTags, std::vector< std::pair< int, int > > &outDimTags, double tolerance, bool fixDegenerated, bool fixSmallEdges, bool fixSmallFaces, bool sewFaces, bool makeSolids)
Definition: GModelIO_OCC.h:791
OCC_Internals::remove
bool remove(int dim, int tag, bool recursive=false)
Definition: GModelIO_OCC.h:779
OCC_Internals::addCylinder
bool addCylinder(int &tag, double x, double y, double z, double dx, double dy, double dz, double r, double angle)
Definition: GModelIO_OCC.h:626
OCC_Internals::getChanged
bool getChanged() const
Definition: GModelIO_OCC.h:482
OCC_Internals::chamfer
bool chamfer(const std::vector< int > &volumeTags, const std::vector< int > &curveTags, const std::vector< int > &surfaceTags, const std::vector< double > &distances, std::vector< std::pair< int, int > > &outDimTags, bool removeVolume)
Definition: GModelIO_OCC.h:690
OCC_Internals::reset
void reset()
Definition: GModelIO_OCC.h:483
OCC_Internals::getMatrixOfInertia
bool getMatrixOfInertia(int dim, int tag, std::vector< double > &mat)
Definition: GModelIO_OCC.h:841
OCC_Internals::addTrimmedSurface
bool addTrimmedSurface(int &tag, int surfaceTag, const std::vector< int > &wireTags, bool wire3D)
Definition: GModelIO_OCC.h:602
OCC_Internals::addThruSections
bool addThruSections(int tag, const std::vector< int > &wireTags, bool makeSolid, bool makeRuled, std::vector< std::pair< int, int > > &outDimTags, int maxDegree=-1, const std::string &continuity="", const std::string &parametrization="", bool smoothing=false)
Definition: GModelIO_OCC.h:648