Skip to content
Snippets Groups Projects
Commit 53283e6c authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

use occ

parent f43c4b26
No related branches found
No related tags found
No related merge requests found
...@@ -6,25 +6,11 @@ import gmsh ...@@ -6,25 +6,11 @@ import gmsh
import math import math
import os import os
model = gmsh.model
factory = model.geo
gmsh.initialize() gmsh.initialize()
gmsh.option.setNumber("General.Terminal", 1) gmsh.option.setNumber("General.Terminal", 1)
factory.addPoint(-1, -1, 0) gmsh.model.occ.addRectangle(-1, -1, 0, 2, 2)
factory.addPoint(1, -1, 0) gmsh.model.occ.synchronize()
factory.addPoint(1, 1, 0)
factory.addPoint(-1, 1, 0)
factory.addLine(1, 2, 1)
factory.addLine(2, 3, 2)
factory.addLine(3, 4, 3)
factory.addLine(4, 1, 4)
factory.addCurveLoop([1, 2, 3, 4], 1)
factory.addPlaneSurface([1], 1)
factory.synchronize()
# add a post-processing view to use as a size field # add a post-processing view to use as a size field
path = os.path.dirname(os.path.abspath(__file__)) path = os.path.dirname(os.path.abspath(__file__))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment