gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
gmshEdge.cpp
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 #include "gmshEdge.h"
7 #include "Context.h"
8 #include "GFace.h"
9 #include "GModel.h"
10 #include "Geo.h"
11 #include "GeoInterpolation.h"
12 #include "GmshMessage.h"
13 #include "decasteljau.h"
14 #include <sstream>
15 
16 static void setMeshSizeFromCurvePoints(GEdge &edge, const Curve &curve)
17 {
18  if (!CTX::instance()->mesh.lcFromParametricPoints)
19  return;
20  switch (curve.Typ)
21  {
22  case MSH_SEGM_LINE:
23  case MSH_SEGM_SPLN:
24  case MSH_SEGM_BSPLN:
25  case MSH_SEGM_NURBS:
26  case MSH_SEGM_BEZIER:
27  {
28  int n = List_Nbr(curve.Control_Points);
29  std::vector<double> lc(n), u_lc(n);
30  for (int i = 0; i < n; ++i)
31  {
32  Vertex *v;
33  List_Read(curve.Control_Points, i, &v);
34  u_lc[i] = i * 1. / (n - 1);
35  lc[i] = v->lc;
36  }
37  edge.setMeshSizeParametric(u_lc, lc);
38  break;
39  }
40  default:
41  break;
42  }
43 }
44 
45 gmshEdge::gmshEdge(GModel *m, Curve *c, GVertex *v1, GVertex *v2) : GEdge(m, c->Num, v1, v2), _c(c)
46 {
49 }
50 
52 {
53  _c = c;
54  _v0 = v1;
55  _v1 = v2;
56  if (_v0)
57  _v0->addEdge(this);
58  if (_v1 && _v1 != _v0)
59  _v1->addEdge(this);
61 }
62 
63 bool gmshEdge::degenerate(int dim) const
64 {
65  return _c->degenerate();
66 }
67 
69 {
70  meshAttributes.method = _c->Method;
71  meshAttributes.nbPointsTransfinite = _c->nbPointsTransfinite;
72  meshAttributes.typeTransfinite = _c->typeTransfinite;
73  meshAttributes.coeffTransfinite = _c->coeffTransfinite;
74  meshAttributes.extrude = _c->Extrude;
75  meshAttributes.reverseMesh = _c->ReverseMesh;
76 }
77 
79 {
80  return Range<double>(_c->ubeg, _c->uend);
81 }
82 
83 GPoint gmshEdge::point(double par) const
84 {
85  Vertex a = InterpolateCurve(_c, par, 0);
86  return GPoint(a.Pos.X, a.Pos.Y, a.Pos.Z, this, par);
87 }
88 
89 SVector3 gmshEdge::firstDer(double par) const
90 {
91  Vertex a = InterpolateCurve(_c, par, 1);
92  return SVector3(a.Pos.X, a.Pos.Y, a.Pos.Z);
93 }
94 
95 SVector3 gmshEdge::secondDer(double par) const
96 {
97  Vertex a = InterpolateCurve(_c, par, 2);
98  return SVector3(a.Pos.X, a.Pos.Y, a.Pos.Z);
99 }
100 
102 {
103  switch (_c->Typ)
104  {
105  case MSH_SEGM_LINE:
106  return Line;
107  case MSH_SEGM_CIRC:
108  case MSH_SEGM_CIRC_INV:
109  return Circle;
110  case MSH_SEGM_ELLI:
111  case MSH_SEGM_ELLI_INV:
112  return Ellipse;
113  case MSH_SEGM_BSPLN:
114  case MSH_SEGM_BEZIER:
115  case MSH_SEGM_NURBS:
116  case MSH_SEGM_SPLN:
117  return Nurb;
118  case MSH_SEGM_BND_LAYER:
119  return BoundaryLayerCurve;
120  case MSH_SEGM_DISCRETE:
121  return DiscreteCurve;
122  default:
123  return Unknown;
124  }
125 }
126 
128 {
129  return geomType() != BoundaryLayerCurve;
130 }
131 
132 std::string gmshEdge::getAdditionalInfoString(bool multline)
133 {
134  std::string info = GEdge::getAdditionalInfoString(multline);
135 
136  if (List_Nbr(_c->Control_Points) > 2)
137  {
138  std::ostringstream sstream;
139  if (multline)
140  sstream << "\n";
141  else
142  sstream << " ";
143  sstream << "Control points: ";
144  for (int i = 0; i < List_Nbr(_c->Control_Points); i++)
145  {
146  if (i)
147  sstream << ", ";
148  Vertex *v;
149  List_Read(_c->Control_Points, i, &v);
150  sstream << v->Num;
151  }
152  info += sstream.str();
153  }
154 
155  return info;
156 }
157 
159 {
160  int np;
161  if (geomType() == Line)
162  {
163  np = CTX::instance()->mesh.minLineNodes - 1;
164  }
165  else if (geomType() == Circle || geomType() == Ellipse)
166  {
167  double a = fabs(_c->Circle.t1 - _c->Circle.t2);
168  double n = CTX::instance()->mesh.minCircleNodes;
169  if (a > 6.28)
170  np = n;
171  else
172  np = (int)(0.99 + (n - 1) * a / (2 * M_PI));
173  }
174  else
175  {
176  np = CTX::instance()->mesh.minCurveNodes - 1;
177  }
178  return std::max(np, meshAttributes.minimumMeshSegments);
179 }
180 
182 {
183  int n = List_Nbr(_c->Control_Points) - 1;
184  if (n <= 0)
186 
187  if (geomType() == Line && !_c->geometry)
188  return n;
189  else
190  return CTX::instance()->geom.numSubEdges * n;
191 }
192 
193 SPoint2 gmshEdge::reparamOnFace(const GFace *face, double epar, int dir) const
194 {
195  Surface *s = (Surface *)face->getNativePtr();
196 
197  bool periodic = (_c->end == _c->beg);
198  if (s->geometry)
199  {
200  switch (_c->Typ)
201  {
202  case MSH_SEGM_LINE:
203  {
204  Vertex *v[3];
205  List_Read(_c->Control_Points, 0, &v[1]);
206  List_Read(_c->Control_Points, 1, &v[2]);
207  SPoint2 p = v[1]->pntOnGeometry + (v[2]->pntOnGeometry - v[1]->pntOnGeometry) * epar;
208  return p;
209  }
210  case MSH_SEGM_BSPLN:
211  case MSH_SEGM_BEZIER:
212  {
213  int NbControlPoints = List_Nbr(_c->Control_Points);
214  int NbCurves = NbControlPoints + (periodic ? -1 : 1);
215  int iCurve = (int)floor(epar * (double)NbCurves);
216  if (iCurve >= NbCurves)
217  iCurve = NbCurves - 1;
218  else if (iCurve < 0) // ? does it happen ?
219  iCurve = 0;
220  double t1 = (double)(iCurve) / (double)(NbCurves);
221  double t2 = (double)(iCurve + 1) / (double)(NbCurves);
222  double t = (epar - t1) / (t2 - t1);
223  Vertex *v[4];
224  for (int j = 0; j < 4; j++)
225  {
226  int k = iCurve - (periodic ? 1 : 2) + j;
227  if (k < 0)
228  k = periodic ? k + NbControlPoints - 1 : 0;
229  if (k >= NbControlPoints)
230  k = periodic ? k - NbControlPoints + 1 : NbControlPoints - 1;
231  List_Read(_c->Control_Points, k, &v[j]);
232  }
233  return InterpolateCubicSpline(v, t, _c->mat, t1, t2, _c->geometry, 0);
234  }
235  case MSH_SEGM_SPLN:
236  {
237  Vertex temp1, temp2;
238  int N = List_Nbr(_c->Control_Points);
239  int i = (int)((double)(N - 1) * epar);
240  if (i < 0)
241  i = 0;
242  if (i >= N - 1)
243  i = N - 2;
244  double t1 = (double)(i) / (double)(N - 1);
245  double t2 = (double)(i + 1) / (double)(N - 1);
246  double t = (epar - t1) / (t2 - t1);
247  Vertex *v[4];
248  List_Read(_c->Control_Points, i, &v[1]);
249  List_Read(_c->Control_Points, i + 1, &v[2]);
250  if (!i)
251  {
252  if (_c->beg == _c->end)
253  {
254  List_Read(_c->Control_Points, N - 2, &v[0]);
255  }
256  else
257  {
258  v[0] = &temp1;
259  v[0]->pntOnGeometry = v[1]->pntOnGeometry * 2. - v[2]->pntOnGeometry;
260  }
261  }
262  else
263  {
264  List_Read(_c->Control_Points, i - 1, &v[0]);
265  }
266  if (i == N - 2)
267  {
268  if (_c->beg == _c->end)
269  {
270  List_Read(_c->Control_Points, 1, &v[3]);
271  }
272  else
273  {
274  v[3] = &temp2;
275  v[3]->pntOnGeometry = v[2]->pntOnGeometry * 2. - v[1]->pntOnGeometry;
276  }
277  }
278  else
279  {
280  List_Read(_c->Control_Points, i + 2, &v[3]);
281  }
282  return InterpolateCubicSpline(v, t, _c->mat, t1, t2, _c->geometry, 0);
283  }
284  default:
285  Msg::Error("Unknown curve type in reparamOnFace");
286  return SPoint2();
287  }
288  }
289 
290  if (s->Typ == MSH_SURF_REGL)
291  {
292  Curve *C[4];
293  for (int i = 0; i < 4; i++)
294  List_Read(s->Generatrices, i, &C[i]);
295 
296  double U, V;
297  if (C[0]->Num == _c->Num)
298  {
299  U = (epar - C[0]->ubeg) / (C[0]->uend - C[0]->ubeg);
300  V = 0;
301  }
302  else if (C[0]->Num == -_c->Num)
303  {
304  U = (C[0]->uend - epar - C[0]->ubeg) / (C[0]->uend - C[0]->ubeg);
305  V = 0;
306  }
307  else if (C[1]->Num == _c->Num)
308  {
309  V = (epar - C[1]->ubeg) / (C[1]->uend - C[1]->ubeg);
310  U = 1;
311  }
312  else if (C[1]->Num == -_c->Num)
313  {
314  V = (C[1]->uend - epar - C[1]->ubeg) / (C[1]->uend - C[1]->ubeg);
315  U = 1;
316  }
317  else if (C[2]->Num == _c->Num)
318  {
319  U = 1 - (epar - C[2]->ubeg) / (C[2]->uend - C[2]->ubeg);
320  V = 1;
321  }
322  else if (C[2]->Num == -_c->Num)
323  {
324  U = 1 - (C[2]->uend - epar - C[2]->ubeg) / (C[2]->uend - C[2]->ubeg);
325  V = 1;
326  }
327  else if (C[3]->Num == _c->Num)
328  {
329  V = 1 - (epar - C[3]->ubeg) / (C[3]->uend - C[3]->ubeg);
330  U = 0;
331  }
332  else if (C[3]->Num == -_c->Num)
333  {
334  V = 1 - (C[3]->uend - epar - C[3]->ubeg) / (C[3]->uend - C[3]->ubeg);
335  U = 0;
336  }
337  else
338  {
339  Msg::Info("Reparameterizing curve %d on surface %d", _c->Num, s->Num);
340  return GEdge::reparamOnFace(face, epar, dir);
341  }
342  return SPoint2(U, V);
343  }
344  else if (s->Typ == MSH_SURF_TRIC)
345  {
346  Curve *C[3];
347  for (int i = 0; i < 3; i++)
348  List_Read(s->Generatrices, i, &C[i]);
349  double U, V;
350  if (CTX::instance()->geom.oldRuledSurface)
351  {
352  if (C[0]->Num == _c->Num)
353  {
354  U = (epar - C[0]->ubeg) / (C[0]->uend - C[0]->ubeg);
355  V = 0;
356  }
357  else if (C[0]->Num == -_c->Num)
358  {
359  U = (C[0]->uend - epar - C[0]->ubeg) / (C[0]->uend - C[0]->ubeg);
360  V = 0;
361  }
362  else if (C[1]->Num == _c->Num)
363  {
364  V = (epar - C[1]->ubeg) / (C[1]->uend - C[1]->ubeg);
365  U = 1;
366  }
367  else if (C[1]->Num == -_c->Num)
368  {
369  V = (C[1]->uend - epar - C[1]->ubeg) / (C[1]->uend - C[1]->ubeg);
370  U = 1;
371  }
372  else if (C[2]->Num == _c->Num)
373  {
374  U = 1 - (epar - C[2]->ubeg) / (C[2]->uend - C[2]->ubeg);
375  V = 1;
376  }
377  else if (C[2]->Num == -_c->Num)
378  {
379  U = 1 - (C[2]->uend - epar - C[2]->ubeg) / (C[2]->uend - C[2]->ubeg);
380  V = 1;
381  }
382  else
383  {
384  Msg::Info("Reparameterizing curve %d on surface %d", _c->Num, s->Num);
385  return GEdge::reparamOnFace(face, epar, dir);
386  }
387  }
388  else
389  {
390  // FIXME: workaround for exact extrusions
391  bool hack = false;
392  if (CTX::instance()->geom.exactExtrusion && s->Extrude && s->Extrude->geo.Mode == EXTRUDED_ENTITY &&
393  s->Typ != MSH_SURF_PLAN)
394  hack = true;
395  if (C[0]->Num == _c->Num)
396  {
397  U = (epar - C[0]->ubeg) / (C[0]->uend - C[0]->ubeg);
398  V = 0;
399  }
400  else if (C[0]->Num == -_c->Num)
401  {
402  U = (C[0]->uend - epar - C[0]->ubeg) / (C[0]->uend - C[0]->ubeg);
403  V = 0;
404  }
405  else if (C[1]->Num == _c->Num)
406  {
407  V = (epar - C[1]->ubeg) / (C[1]->uend - C[1]->ubeg);
408  U = 1;
409  }
410  else if (C[1]->Num == -_c->Num)
411  {
412  V = (C[1]->uend - epar - C[1]->ubeg) / (C[1]->uend - C[1]->ubeg);
413  U = 1;
414  }
415  else if (C[2]->Num == _c->Num)
416  {
417  U = 1 - (epar - C[2]->ubeg) / (C[2]->uend - C[2]->ubeg);
418  V = hack ? 1 : U;
419  }
420  else if (C[2]->Num == -_c->Num)
421  {
422  U = 1 - (C[2]->uend - epar - C[2]->ubeg) / (C[2]->uend - C[2]->ubeg);
423  V = hack ? 1 : U;
424  }
425  else
426  {
427  Msg::Info("Reparameterizing curve %d on surface %d", _c->Num, s->Num);
428  return GEdge::reparamOnFace(face, epar, dir);
429  }
430  }
431  return SPoint2(U, V);
432  }
433  else
434  {
435  return GEdge::reparamOnFace(face, epar, dir);
436  }
437 }
438 
439 void gmshEdge::writeGEO(FILE *fp)
440 {
441  if (!_c || _c->Num < 0 || _c->Typ == MSH_SEGM_DISCRETE)
442  return;
443  switch (_c->Typ)
444  {
445  case MSH_SEGM_LINE:
446  fprintf(fp, "Line(%d) = ", _c->Num);
447  break;
448  case MSH_SEGM_CIRC:
449  case MSH_SEGM_CIRC_INV:
450  fprintf(fp, "Circle(%d) = ", _c->Num);
451  break;
452  case MSH_SEGM_ELLI:
453  case MSH_SEGM_ELLI_INV:
454  fprintf(fp, "Ellipse(%d) = ", _c->Num);
455  break;
456  case MSH_SEGM_NURBS:
457  fprintf(fp, "Nurbs(%d) = {", _c->Num);
458  for (int i = 0; i < List_Nbr(_c->Control_Points); i++)
459  {
460  Vertex *v;
461  List_Read(_c->Control_Points, i, &v);
462  if (!i)
463  fprintf(fp, "%d", v->Num);
464  else
465  fprintf(fp, ", %d", v->Num);
466  if (i % 8 == 7 && i != List_Nbr(_c->Control_Points) - 1)
467  fprintf(fp, "\n");
468  }
469  fprintf(fp, "}\n");
470  fprintf(fp, " Knots {");
471  for (int j = 0; j < List_Nbr(_c->Control_Points) + _c->degre + 1; j++)
472  {
473  if (!j)
474  fprintf(fp, "%.16g", _c->k[j]);
475  else
476  fprintf(fp, ", %.16g", _c->k[j]);
477  if (j % 5 == 4 && j != List_Nbr(_c->Control_Points) + _c->degre)
478  fprintf(fp, "\n ");
479  }
480  fprintf(fp, "}\n");
481  fprintf(fp, " Order %d;\n", _c->degre);
482  return;
483  case MSH_SEGM_SPLN:
484  fprintf(fp, "Spline(%d) = ", _c->Num);
485  break;
486  case MSH_SEGM_BSPLN:
487  fprintf(fp, "BSpline(%d) = ", _c->Num);
488  break;
489  case MSH_SEGM_BEZIER:
490  fprintf(fp, "Bezier(%d) = ", _c->Num);
491  break;
492  default:
493  Msg::Error("Unknown curve type %d", _c->Typ);
494  return;
495  }
496  for (int i = 0; i < List_Nbr(_c->Control_Points); i++)
497  {
498  Vertex *v;
499  List_Read(_c->Control_Points, i, &v);
500  if (i)
501  fprintf(fp, ", %d", v->Num);
502  else
503  fprintf(fp, "{%d", v->Num);
504  if (i % 8 == 7)
505  fprintf(fp, "\n");
506  }
507  fprintf(fp, "};\n");
508 
509  if (meshAttributes.method == MESH_TRANSFINITE)
510  {
511  fprintf(fp, "Transfinite Line {%d} = %d", tag() * (meshAttributes.typeTransfinite > 0 ? 1 : -1),
512  meshAttributes.nbPointsTransfinite);
513  if (meshAttributes.typeTransfinite)
514  {
515  if (std::abs(meshAttributes.typeTransfinite) == 1)
516  fprintf(fp, " Using Progression ");
517  else if (std::abs(meshAttributes.typeTransfinite) == 2)
518  fprintf(fp, " Using Bump ");
519  else if (std::abs(meshAttributes.typeTransfinite) == 3)
520  fprintf(fp, " Using Beta ");
521  else if (std::abs(meshAttributes.typeTransfinite) == 4)
522  fprintf(fp, " Using Sizemap ");
523  fprintf(fp, "%g", meshAttributes.coeffTransfinite);
524  }
525  fprintf(fp, ";\n");
526  }
527 
528  if (meshAttributes.reverseMesh)
529  fprintf(fp, "Reverse Line {%d};\n", tag());
530 }
531 
532 static inline SPoint3 curveGetPoint(Curve *c, int i)
533 {
534  Vertex *v;
535  List_Read(c->Control_Points, i, &v);
536  return SPoint3(v->Pos.X, v->Pos.Y, v->Pos.Z);
537 }
538 
539 void gmshEdge::discretize(double tol, std::vector<SPoint3> &pts, std::vector<double> &ts)
540 {
541  switch (_c->Typ)
542  {
543  case MSH_SEGM_LINE:
544  {
545  int NPt = List_Nbr(_c->Control_Points);
546  pts.resize(NPt);
547  ts.resize(NPt);
548  for (int i = 0; i < NPt; ++i)
549  {
550  pts[i] = curveGetPoint(_c, i);
551  ts[i] = i / (double)(NPt - 1);
552  }
553  return;
554  }
555  case MSH_SEGM_BEZIER:
556  {
557  int NbCurves = (List_Nbr(_c->Control_Points) - 1) / 3;
558  for (int iCurve = 0; iCurve < NbCurves; ++iCurve)
559  {
560  double t1 = (iCurve) / (double)(NbCurves);
561  double t2 = (iCurve + 1) / (double)(NbCurves);
562  SPoint3 pt[4];
563  for (int i = 0; i < 4; i++)
564  {
565  pt[i] = curveGetPoint(_c, iCurve * 3 + i);
566  }
567  std::vector<double> lts;
568  std::vector<SPoint3> lpts;
569  decasteljau(tol, pt[0], pt[1], pt[2], pt[3], lpts, lts);
570  for (size_t i = (iCurve == 0 ? 0 : 1); i < lpts.size(); ++i)
571  {
572  pts.push_back(lpts[i]);
573  ts.push_back(t1 + lts[i] * (t2 - t1));
574  }
575  }
576  break;
577  }
578  case MSH_SEGM_BSPLN:
579  {
580  bool periodic = (_c->end == _c->beg);
581  int NbControlPoints = List_Nbr(_c->Control_Points);
582  int NbCurves = NbControlPoints + (periodic ? -1 : 1);
583  SPoint3 pt[4];
584  for (int iCurve = 0; iCurve < NbCurves; ++iCurve)
585  {
586  double t1 = (iCurve) / (double)(NbCurves);
587  double t2 = (iCurve + 1) / (double)(NbCurves);
588  for (int i = 0; i < 4; i++)
589  {
590  int k;
591  if (periodic)
592  {
593  k = (iCurve - 1 + i) % (NbControlPoints - 1);
594  if (k < 0)
595  k += NbControlPoints - 1;
596  }
597  else
598  {
599  k = std::max(0, std::min(iCurve - 2 + i, NbControlPoints - 1));
600  }
601  pt[i] = curveGetPoint(_c, k);
602  }
603  SPoint3 bpt[4] = {(pt[0] + pt[1] * 4 + pt[2]) * (1. / 6.), (pt[1] * 2 + pt[2]) * (1. / 3.),
604  (pt[1] + pt[2] * 2) * (1. / 3.), (pt[1] + pt[2] * 4 + pt[3]) * (1. / 6.)};
605  std::vector<double> lts;
606  std::vector<SPoint3> lpts;
607  decasteljau(tol, bpt[0], bpt[1], bpt[2], bpt[3], lpts, lts);
608  for (size_t i = (iCurve == 0 ? 0 : 1); i < lpts.size(); ++i)
609  {
610  pts.push_back(lpts[i]);
611  ts.push_back(t1 + lts[i] * (t2 - t1));
612  }
613  }
614  break;
615  }
616  case MSH_SEGM_SPLN:
617  {
618  int NbCurves = List_Nbr(_c->Control_Points) - 1;
619  SPoint3 pt[4];
620  for (int iCurve = 0; iCurve < NbCurves; ++iCurve)
621  {
622  double t1 = (iCurve) / (double)(NbCurves);
623  double t2 = (iCurve + 1) / (double)(NbCurves);
624  pt[1] = curveGetPoint(_c, iCurve);
625  pt[2] = curveGetPoint(_c, iCurve + 1);
626  if (iCurve == 0)
627  {
628  if (_c->beg == _c->end)
629  pt[0] = curveGetPoint(_c, NbCurves - 1);
630  else
631  pt[0] = SPoint3(pt[1] * 2 - pt[2]);
632  }
633  else
634  pt[0] = curveGetPoint(_c, iCurve - 1);
635  if (iCurve == NbCurves - 1)
636  {
637  if (_c->beg == _c->end)
638  pt[3] = curveGetPoint(_c, 1);
639  else
640  pt[3] = SPoint3(2 * pt[2] - pt[1]);
641  }
642  else
643  pt[3] = curveGetPoint(_c, iCurve + 2);
644  SPoint3 bpt[4] = {pt[1], (pt[1] * 6 + pt[2] - pt[0]) * (1. / 6.), (pt[2] * 6 - pt[3] + pt[1]) * (1. / 6.),
645  pt[2]};
646  std::vector<double> lts;
647  std::vector<SPoint3> lpts;
648  decasteljau(tol, bpt[0], bpt[1], bpt[2], bpt[3], lpts, lts);
649  for (size_t i = (iCurve == 0 ? 0 : 1); i < lpts.size(); ++i)
650  {
651  pts.push_back(lpts[i]);
652  ts.push_back(t1 + lts[i] * (t2 - t1));
653  }
654  }
655  break;
656  }
657  default:
658  GEdge::discretize(tol, pts, ts);
659  }
660 }
GVertex::addEdge
void addEdge(GEdge *e)
Definition: GVertex.cpp:37
MSH_SEGM_DISCRETE
#define MSH_SEGM_DISCRETE
Definition: GeoDefines.h:31
Surface::Num
int Num
Definition: Geo.h:113
GEdge::periodic
virtual bool periodic(int dim) const
Definition: GEdge.h:219
gmshEdge::writeGEO
virtual void writeGEO(FILE *fp)
Definition: gmshEdge.cpp:439
Geo.h
GeoInterpolation.h
MSH_SEGM_BEZIER
#define MSH_SEGM_BEZIER
Definition: GeoDefines.h:29
Vertex::pntOnGeometry
SPoint2 pntOnGeometry
Definition: Geo.h:40
GEdge::reparamOnFace
virtual SPoint2 reparamOnFace(const GFace *face, double epar, int dir) const
Definition: GEdge.cpp:482
GFace.h
contextGeometryOptions::numSubEdges
int numSubEdges
Definition: Context.h:117
gmshEdge.h
Curve::nbPointsTransfinite
int nbPointsTransfinite
Definition: Geo.h:80
Curve
Definition: Geo.h:74
GEdge::setMeshSizeParametric
void setMeshSizeParametric(const std::vector< double > u, const std::vector< double > lc)
Definition: GEdge.cpp:998
Curve::degenerate
bool degenerate() const
Definition: Geo.h:97
Surface::Typ
int Typ
Definition: Geo.h:114
GFace
Definition: GFace.h:33
GEntity::Nurb
@ Nurb
Definition: GEntity.h:106
Msg::Info
static void Info(const char *fmt,...)
Definition: GmshMessage.cpp:587
SPoint2
Definition: SPoint2.h:12
GEdge::minimumDrawSegments
virtual int minimumDrawSegments() const
Definition: GEdge.h:151
MSH_SURF_PLAN
#define MSH_SURF_PLAN
Definition: GeoDefines.h:33
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
MESH_TRANSFINITE
#define MESH_TRANSFINITE
Definition: GmshDefines.h:259
decasteljau
static void decasteljau(double tol, discreteList &discrete, int pos, const SPoint3 &p0, const SPoint3 &p1, const SPoint3 &p2, const SPoint3 &p3, double t0, double t3)
Definition: gmshEdgeDiscretize.cpp:41
Curve::end
Vertex * end
Definition: Geo.h:85
Msg::Error
static void Error(const char *fmt,...)
Definition: GmshMessage.cpp:482
InterpolateCubicSpline
static Vertex InterpolateCubicSpline(Vertex *v[4], double t, double mat[4][4], int derivee, double t1, double t2)
Definition: GeoInterpolation.cpp:30
GEntity::Unknown
@ Unknown
Definition: GEntity.h:89
SPoint3
Definition: SPoint3.h:14
List_Nbr
int List_Nbr(List_T *liste)
Definition: ListUtils.cpp:106
Vertex
Definition: Geo.h:29
SVector3
Definition: SVector3.h:16
gmshEdge::minimumMeshSegments
virtual int minimumMeshSegments() const
Definition: gmshEdge.cpp:158
GmshMessage.h
ExtrudeParams::geo
struct ExtrudeParams::@15 geo
GPoint
Definition: GPoint.h:13
MSH_SEGM_SPLN
#define MSH_SEGM_SPLN
Definition: GeoDefines.h:21
InterpolateCurve
Vertex InterpolateCurve(Curve *c, double u, int const derivee)
Definition: GeoInterpolation.cpp:441
GEdge::discretize
virtual void discretize(double tol, std::vector< SPoint3 > &dpts, std::vector< double > &ts)
Definition: GEdge.cpp:806
GEntity::DiscreteCurve
@ DiscreteCurve
Definition: GEntity.h:104
gmshEdge::discretize
virtual void discretize(double tol, std::vector< SPoint3 > &dpts, std::vector< double > &ts)
Definition: gmshEdge.cpp:539
contextMeshOptions::minLineNodes
int minLineNodes
Definition: Context.h:37
Vertex::Num
int Num
Definition: Geo.h:31
GEntity::getNativePtr
virtual void * getNativePtr() const
Definition: GEntity.h:271
GEdge::getAdditionalInfoString
virtual std::string getAdditionalInfoString(bool multline=false)
Definition: GEdge.cpp:295
CTX::instance
static CTX * instance()
Definition: Context.cpp:122
gmshEdge::minimumDrawSegments
virtual int minimumDrawSegments() const
Definition: gmshEdge.cpp:181
Curve::Control_Points
List_T * Control_Points
Definition: Geo.h:88
gmshEdge::firstDer
virtual SVector3 firstDer(double par) const
Definition: gmshEdge.cpp:89
Curve::uend
double uend
Definition: Geo.h:87
gmshEdge::parBounds
virtual Range< double > parBounds(int i) const
Definition: gmshEdge.cpp:78
Range
Definition: Range.h:10
Curve::ubeg
double ubeg
Definition: Geo.h:87
Surface::Extrude
ExtrudeParams * Extrude
Definition: Geo.h:124
Curve::Method
int Method
Definition: Geo.h:79
gmshEdge::_c
Curve * _c
Definition: gmshEdge.h:15
EXTRUDED_ENTITY
#define EXTRUDED_ENTITY
Definition: ExtrudeParams.h:17
GVertex
Definition: GVertex.h:23
gmshEdge::gmshEdge
gmshEdge(GModel *model, Curve *c, GVertex *v1, GVertex *v2)
Definition: gmshEdge.cpp:45
MSH_SEGM_CIRC_INV
#define MSH_SEGM_CIRC_INV
Definition: GeoDefines.h:23
MSH_SEGM_BND_LAYER
#define MSH_SEGM_BND_LAYER
Definition: GeoDefines.h:30
Curve::typeTransfinite
int typeTransfinite
Definition: Geo.h:81
curveGetPoint
static SPoint3 curveGetPoint(Curve *c, int i)
Definition: gmshEdge.cpp:532
gmshEdge::reparamOnFace
virtual SPoint2 reparamOnFace(const GFace *face, double epar, int dir) const
Definition: gmshEdge.cpp:193
Curve::k
float * k
Definition: Geo.h:90
GModel
Definition: GModel.h:44
Curve::beg
Vertex * beg
Definition: Geo.h:85
MSH_SEGM_NURBS
#define MSH_SEGM_NURBS
Definition: GeoDefines.h:28
GEntity::Line
@ Line
Definition: GEntity.h:92
Surface
Definition: Geo.h:111
gmshEdge::resetNativePtr
void resetNativePtr(Curve *edge, GVertex *v1, GVertex *v2)
Definition: gmshEdge.cpp:51
GEdge::meshAttributes
struct GEdge::@16 meshAttributes
contextMeshOptions::minCurveNodes
int minCurveNodes
Definition: Context.h:37
CTX::mesh
contextMeshOptions mesh
Definition: Context.h:313
ExtrudeParams::Mode
int Mode
Definition: ExtrudeParams.h:49
Vertex::lc
double lc
Definition: Geo.h:33
MSH_SURF_REGL
#define MSH_SURF_REGL
Definition: GeoDefines.h:34
gmshEdge::point
virtual GPoint point(double p) const
Definition: gmshEdge.cpp:83
Curve::mat
double mat[4][4]
Definition: Geo.h:84
GEntity::tag
int tag() const
Definition: GEntity.h:280
GEntity::BoundaryLayerCurve
@ BoundaryLayerCurve
Definition: GEntity.h:103
MSH_SEGM_ELLI_INV
#define MSH_SEGM_ELLI_INV
Definition: GeoDefines.h:25
gmshEdge::secondDer
virtual SVector3 secondDer(double par) const
Definition: gmshEdge.cpp:95
CTX::geom
contextGeometryOptions geom
Definition: Context.h:311
GEntity::GeomType
GeomType
Definition: GEntity.h:88
Curve::geometry
gmshSurface * geometry
Definition: Geo.h:93
MSH_SEGM_CIRC
#define MSH_SEGM_CIRC
Definition: GeoDefines.h:22
contextMeshOptions::minCircleNodes
int minCircleNodes
Definition: Context.h:37
MSH_SURF_TRIC
#define MSH_SURF_TRIC
Definition: GeoDefines.h:35
Curve::Extrude
ExtrudeParams * Extrude
Definition: Geo.h:89
gmshEdge::degenerate
virtual bool degenerate(int dim) const
Definition: gmshEdge.cpp:63
Coord::X
double X
Definition: Geo.h:26
gmshEdge::geomType
virtual GeomType geomType() const
Definition: gmshEdge.cpp:101
Context.h
gmshEdge::haveParametrization
virtual bool haveParametrization()
Definition: gmshEdge.cpp:127
GEdge::_v0
GVertex * _v0
Definition: GEdge.h:35
Curve::Num
int Num
Definition: Geo.h:76
CircParam::t2
double t2
Definition: Geo.h:69
GEdge::_v1
GVertex * _v1
Definition: GEdge.h:35
Coord::Z
double Z
Definition: Geo.h:26
GEdge
Definition: GEdge.h:26
MSH_SEGM_BSPLN
#define MSH_SEGM_BSPLN
Definition: GeoDefines.h:27
Curve::ReverseMesh
int ReverseMesh
Definition: Geo.h:94
setMeshSizeFromCurvePoints
static void setMeshSizeFromCurvePoints(GEdge &edge, const Curve &curve)
Definition: gmshEdge.cpp:16
gmshEdge::resetMeshAttributes
virtual void resetMeshAttributes()
Definition: gmshEdge.cpp:68
Coord::Y
double Y
Definition: Geo.h:26
GEntity::Circle
@ Circle
Definition: GEntity.h:93
Vertex::Pos
Coord Pos
Definition: Geo.h:34
Surface::Generatrices
List_T * Generatrices
Definition: Geo.h:120
GModel.h
Surface::geometry
gmshSurface * geometry
Definition: Geo.h:129
MSH_SEGM_ELLI
#define MSH_SEGM_ELLI
Definition: GeoDefines.h:24
gmshEdge::getAdditionalInfoString
virtual std::string getAdditionalInfoString(bool multline=false)
Definition: gmshEdge.cpp:132
Curve::degre
int degre
Definition: Geo.h:91
Curve::Typ
int Typ
Definition: Geo.h:77
Curve::coeffTransfinite
double coeffTransfinite
Definition: Geo.h:82
GEntity::Ellipse
@ Ellipse
Definition: GEntity.h:94
CircParam::t1
double t1
Definition: Geo.h:69
List_Read
void List_Read(List_T *liste, int index, void *data)
Definition: ListUtils.cpp:111
decasteljau.h
MSH_SEGM_LINE
#define MSH_SEGM_LINE
Definition: GeoDefines.h:20
Curve::Circle
CircParam Circle
Definition: Geo.h:92