Documentation ¶
Overview ¶
Example ¶
package main import ( "fmt" "os" "github.com/Konstantin8105/Shell_generator/gmsh" ) func main() { filename := "testModel.geo" var gh gmsh.Format gh.Points = append(gh.Points, gmsh.Point{ Index: 1, X: 0., Y: 0., Z: 0., Precision: 0.1, }) gh.Points = append(gh.Points, gmsh.Point{ Index: 2, X: 1., Y: 0., Z: 0., Precision: 0.1, }) gh.Points = append(gh.Points, gmsh.Point{ Index: 3, X: 0., Y: 1., Z: 0., Precision: 0.5, }) gh.Points = append(gh.Points, gmsh.Point{ Index: 4, X: 1., Y: -1., Z: 0., Precision: 0.3, }) gh.Lines = append(gh.Lines, gmsh.Line{ Index: 5, BeginPointIndex: 2, EndPointIndex: 4, }) gh.Arcs = append(gh.Arcs, gmsh.Arc{ Index: 6, BeginPointIndex: 2, CenterPointIndex: 1, EndPointIndex: 3, }) gh.Extrudes = append(gh.Extrudes, gmsh.Extrude{ Xextrude: 0, Yextrude: 0, Zextrude: 3, IndexElement: 5, }) gh.Extrudes = append(gh.Extrudes, gmsh.Extrude{ Xextrude: 0, Yextrude: 0, Zextrude: 3, IndexElement: 6, }) err := gh.WriteGEO(filename) if err != nil { fmt.Println("Error in Gmsh format: ", err) return } _ = os.Remove(filename) }
Output:
Index ¶
- type Arc
- type Extrude
- type Format
- func (f *Format) AddArc(arch Arc)
- func (f *Format) AddExtrude(e Extrude)
- func (f *Format) AddLine(line Line)
- func (f *Format) AddPoint(point Point)
- func (f *Format) ExtrudeAll(Xextrude float64, Yextrude float64, Zextrude float64)
- func (f Format) WriteGEO(filename string) (err error)
- func (f Format) WriteINP(filename string) (err error)
- type Line
- type Point
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extrude ¶
type Extrude struct { Xextrude float64 Yextrude float64 Zextrude float64 IndexElement int // index of line or circle arc }
Extrude - extrude element in Gmsh format
type Format ¶
Format - complete Gmsh format
func (*Format) ExtrudeAll ¶
ExtrudeAll - extrude all line and arc
Click to show internal directories.
Click to hide internal directories.