File: fragment_surfaces.cpp

package info (click to toggle)
gmsh 4.15.1%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 52,880 kB
  • sloc: cpp: 440,657; ansic: 114,930; f90: 15,611; python: 13,907; yacc: 7,438; java: 3,491; lisp: 3,206; lex: 633; perl: 571; makefile: 500; xml: 414; sh: 407; javascript: 113; modula3: 32
file content (17 lines) | stat: -rw-r--r-- 576 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <gmsh.h>
#include <set>

int main(int argc, char **argv)
{
  gmsh::initialize();
  int s1 = gmsh::model::occ::addRectangle(0, 0, 0, 1, 1);
  int s2 = gmsh::model::occ::addRectangle(-0.5, 0, 0, 1, 1);
  gmsh::model::occ::rotate({{2, s2}}, 0, 0.5, 0, 1, 0, 0, M_PI/2);
  std::vector<std::pair<int, int> > out;
  std::vector<std::vector<std::pair<int, int> > > outmap;
  gmsh::model::occ::fragment({{2, s1}}, {{2, s2}}, out, outmap);
  gmsh::model::occ::synchronize();

  std::set<std::string> args(argv, argv + argc);
  if(!args.count("-nopopup")) gmsh::fltk::run();
}