File: CutBox.h

package info (click to toggle)
gmsh 4.8.4%2Bds2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 87,812 kB
  • sloc: cpp: 378,014; ansic: 99,669; yacc: 7,216; python: 6,680; java: 3,486; lisp: 659; lex: 621; perl: 571; makefile: 470; sh: 440; xml: 415; javascript: 113; pascal: 35; modula3: 32
file content (62 lines) | stat: -rw-r--r-- 2,143 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Gmsh - Copyright (C) 1997-2021 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// issues on https://gitlab.onelab.info/gmsh/gmsh/issues.

#ifndef CUT_BOX_H
#define CUT_BOX_H

#include "Plugin.h"

extern "C" {
GMSH_Plugin *GMSH_RegisterCutBoxPlugin();
}

class GMSH_CutBoxPlugin : public GMSH_PostPlugin {
  static double callback(int num, int action, double value, double *opt,
                         double step, double min, double max);
  void addInView(int connect, int boundary, int numsteps, int nbcomp,
                 double ****pnts, double ****vals, std::vector<double> &P,
                 int *nP, std::vector<double> &L, int *nL,
                 std::vector<double> &Q, int *nQ, std::vector<double> &H,
                 int *nH);
  PView *GenerateView(PView *v, int connectPoints, int boundary);

public:
  GMSH_CutBoxPlugin() {}
  std::string getName() const { return "CutBox"; }
  std::string getShortHelp() const
  {
    return "Cut with a regular box defined by 4 points";
  }
  std::string getHelp() const;
  int getNbOptions() const;
  StringXNumber *getOption(int iopt);
  PView *execute(PView *);

  static int getNbU();
  static int getNbV();
  static int getNbW();
  static void getPoint(int iU, int iV, int iW, double *X);

  static double callbackX0(int, int, double);
  static double callbackY0(int, int, double);
  static double callbackZ0(int, int, double);
  static double callbackX1(int, int, double);
  static double callbackY1(int, int, double);
  static double callbackZ1(int, int, double);
  static double callbackX2(int, int, double);
  static double callbackY2(int, int, double);
  static double callbackZ2(int, int, double);
  static double callbackX3(int, int, double);
  static double callbackY3(int, int, double);
  static double callbackZ3(int, int, double);
  static double callbackU(int, int, double);
  static double callbackV(int, int, double);
  static double callbackW(int, int, double);
  static double callbackConnect(int, int, double);
  static double callbackBoundary(int, int, double);
  static void draw(void *context);
};

#endif