Documentation ¶
Index ¶
- Constants
- Variables
- func Input3Float(header string, prefix, postfix [3]string, defaultValue [3]float64) (w vl.Widget, gettext func() (_ [3]float64, ok bool), initialization func())
- func InputFloat(prefix, postfix string, defaultValue float64) (w vl.Widget, gettext func() (_ float64, ok bool), initialization func())
- func InputUnsigned(prefix, postfix string, defaultValue uint) (w vl.Widget, gettext func() (_ uint, ok bool), initialization func())
- func NewTui(mesh Mesh, closedApp *bool, actions *chan ds.Action) (tui vl.Widget, initialization func(), err error)
- func Run() (err error)
- func Select(name string, single bool, selector func(single bool) []uint) (w vl.Widget, gettext func() []uint, initialization func())
- func SelectAll(m Mesh) (w vl.Widget, getCoords func() []uint, getElements func() []uint, ...)
- type AddRemovable
- type Checkable
- type Coordinate
- type Direction
- type Editable
- type ElType
- type Element
- type Filable
- type GroupID
- type Hidable
- type LeftCursor
- type Measurementable
- type Mesh
- type Model
- func (mm *Model) AddConvexLines(nodes, elements []uint)
- func (mm *Model) AddLeftCursor(lc LeftCursor)
- func (mm *Model) AddLineByNodeNumber(n1, n2 uint) (id uint)
- func (mm *Model) AddModel(m Model)
- func (mm *Model) AddNode(X, Y, Z float64) (id uint)
- func (mm *Model) AddQuadr4ByNodeNumber(n1, n2, n3, n4 uint) (id uint, ok bool)
- func (mm *Model) AddTriangle3ByNodeNumber(n1, n2, n3 uint) (id uint, ok bool)
- func (mm *Model) Check() error
- func (mm *Model) ColorEdge(isColor bool)
- func (mm *Model) Copy(nodes, elements []uint, basePoint [3]float64, paths []diffCoordinate, ...)
- func (mm *Model) DemoSpiral(n uint)
- func (mm *Model) DeselectAll()
- func (mm *Model) GetCoordByID(id uint) (c gog.Point3d, ok bool)
- func (mm *Model) GetCoords() []Coordinate
- func (mm *Model) GetElements() []Element
- func (mm *Model) GetPresentFilename() (name string)
- func (mm *Model) GetRootGroup() groups.Group
- func (mm *Model) GetSelectElements(single bool, filter func(_ ElType) (acceptable bool)) (ids []uint)
- func (mm *Model) GetSelectNodes(single bool) (ids []uint)
- func (mm *Model) Hide(nodes, elements []uint)
- func (mm *Model) Intersection(nodes, elements []uint)
- func (mm *Model) InvertSelect(nodes bool, elements []bool)
- func (mm *Model) MergeLines(lines []uint)
- func (mm *Model) MergeNodes(minDistance float64)
- func (mm *Model) Mirror(nodes, elements []uint, basePoint [3]gog.Point3d, copyModel bool, ...)
- func (mm *Model) Move(nodes, elements []uint, basePoint [3]float64, path diffCoordinate)
- func (mm *Model) Open(mesh groups.Mesh, filename string) (err error)
- func (mm *Model) Redo()
- func (mm *Model) Remove(nodes, elements []uint)
- func (mm *Model) RemoveNodesWithoutElements()
- func (mm *Model) RemoveSameCoordinates()
- func (mm *Model) RemoveZeroLines()
- func (mm *Model) RemoveZeroTriangles()
- func (mm *Model) Save() (err error)
- func (mm *Model) SaveAs(filename string) (err error)
- func (mm *Model) ScaleOrtho(basePoint gog.Point3d, scale [3]float64, nodes, elements []uint)
- func (mm *Model) Select(nodes, elements []uint)
- func (mm *Model) SelectAll(nodes bool, elements []bool)
- func (mm *Model) SelectElementsOnPlane(xoy, yoz, xoz bool, elements []bool)
- func (mm *Model) SelectLeftCursor(nodes bool, elements []bool)
- func (mm *Model) SelectLinesByLenght(more bool, lenght float64)
- func (mm *Model) SelectLinesCylindrical(node uint, radiant, conc bool, axe Direction)
- func (mm *Model) SelectLinesOrtho(x, y, z bool)
- func (mm *Model) SelectLinesParallel(lines []uint)
- func (mm *Model) SelectScreen(from, to [2]int32)
- func (mm *Model) SplitLinesByDistance(lines []uint, distance float64, atBegin bool)
- func (mm *Model) SplitLinesByEqualParts(lines []uint, parts uint)
- func (mm *Model) SplitLinesByRatio(lines []uint, proportional float64, atBegin bool)
- func (mm *Model) SplitTri3To3Tri3(elements []uint)
- func (mm *Model) StandardView(view SView)
- func (mm *Model) Undo()
- func (mm *Model) UnhideAll()
- func (mm *Model) Update(nodes, elements *uint)
- type Mouse
- type Mouse2P
- type MouseAdd
- type MouseMove
- type MouseRoll
- type MouseRotate
- type MouseSelect
- type MouseZoom
- type MoveCopyble
- type Opengl
- func (op *Opengl) AddLeftCursor(lc LeftCursor)
- func (op *Opengl) ColorEdge(isColor bool)
- func (op *Opengl) Draw(x, y, w, h int32)
- func (op *Opengl) Init()
- func (op *Opengl) MouseDefault()
- func (op *Opengl) SelectLeftCursor(nodes bool, elements []bool)
- func (op *Opengl) SelectScreen(from, to [2]int32)
- func (op *Opengl) SetCharCallback(r rune)
- func (op *Opengl) SetCursorPosCallback(xpos float64, ypos float64)
- func (op *Opengl) SetFont(f *glsymbol.Font)
- func (op *Opengl) SetKeyCallback(key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey)
- func (op *Opengl) SetMouseButtonCallback(button glfw.MouseButton, action glfw.Action, mods glfw.ModifierKey, ...)
- func (op *Opengl) SetScrollCallback(xcursor, ycursor float64, xoffset, yoffset float64)
- func (op *Opengl) StandardView(view SView)
- func (op *Opengl) UpdateModel()
- func (op *Opengl) ViewAll()
- type Operation
- type Plane
- type Pluginable
- type SView
- type Selectable
- type Undo
- func (u *Undo) AddConvexLines(nodes, elements []uint)
- func (u *Undo) AddLeftCursor(lc LeftCursor)
- func (u *Undo) AddLineByNodeNumber(n1, n2 uint) (id uint)
- func (u *Undo) AddModel(m Model)
- func (u *Undo) AddNode(X, Y, Z float64) (id uint)
- func (u *Undo) AddQuadr4ByNodeNumber(n1, n2, n3, n4 uint) (id uint, ok bool)
- func (u *Undo) AddTriangle3ByNodeNumber(n1, n2, n3 uint) (id uint, ok bool)
- func (u *Undo) Check() error
- func (u *Undo) Close()
- func (u *Undo) ColorEdge(isColor bool)
- func (u *Undo) Copy(nodes, elements []uint, basePoint [3]float64, paths []diffCoordinate, ...)
- func (u *Undo) DemoSpiral(n uint)
- func (u *Undo) DeselectAll()
- func (u *Undo) GetCoordByID(id uint) (_ gog.Point3d, ok bool)
- func (u *Undo) GetCoords() []Coordinate
- func (u *Undo) GetElements() []Element
- func (u *Undo) GetPresentFilename() (name string)
- func (u *Undo) GetRootGroup() groups.Group
- func (u *Undo) GetSelectElements(single bool, filter func(_ ElType) (acceptable bool)) (ids []uint)
- func (u *Undo) GetSelectNodes(single bool) (ids []uint)
- func (u *Undo) GetSelected() (nodes, elements []uint)
- func (u *Undo) Hide(coordinates, elements []uint)
- func (u *Undo) Intersection(nodes, elements []uint)
- func (u *Undo) InvertSelect(nodes bool, elements []bool)
- func (u *Undo) IsChangedModel() bool
- func (u *Undo) MergeLines(lines []uint)
- func (u *Undo) MergeNodes(minDistance float64)
- func (u *Undo) Mirror(nodes, elements []uint, basePoint [3]gog.Point3d, copy bool, ...)
- func (u *Undo) Move(nodes, elements []uint, basePoint [3]float64, path diffCoordinate)
- func (u *Undo) Open(name string) (err error)
- func (u *Undo) Remove(nodes, elements []uint)
- func (u *Undo) RemoveNodesWithoutElements()
- func (u *Undo) RemoveSameCoordinates()
- func (u *Undo) RemoveZeroLines()
- func (u *Undo) RemoveZeroTriangles()
- func (u *Undo) Save() error
- func (u *Undo) SaveAs(filename string) error
- func (u *Undo) ScaleOrtho(basePoint gog.Point3d, scale [3]float64, nodes, elements []uint)
- func (u *Undo) Select(nodes, elements []uint)
- func (u *Undo) SelectAll(nodes bool, elements []bool)
- func (u *Undo) SelectElementsOnPlane(xoy, xoz, yoz bool, elements []bool)
- func (u *Undo) SelectLeftCursor(nodes bool, elements []bool)
- func (u *Undo) SelectLinesByLenght(more bool, lenght float64)
- func (u *Undo) SelectLinesCylindrical(node uint, radiant, conc bool, axe Direction)
- func (u *Undo) SelectLinesOrtho(x, y, z bool)
- func (u *Undo) SelectLinesParallel(lines []uint)
- func (u *Undo) SelectScreen(from, to [2]int32)
- func (u *Undo) SplitLinesByDistance(lines []uint, distance float64, atBegin bool)
- func (u *Undo) SplitLinesByEqualParts(lines []uint, parts uint)
- func (u *Undo) SplitLinesByRatio(lines []uint, proportional float64, atBegin bool)
- func (u *Undo) SplitTri3To3Tri3(tris []uint)
- func (u *Undo) StandardView(view SView)
- func (u *Undo) Undo()
- func (u *Undo) UnhideAll()
- func (u *Undo) Update(nodes, elements *uint)
- func (u *Undo) ViewAll()
- type Viewable
Constants ¶
View Source
const ( Single = true Many = false )
View Source
const FileExtension = "ms"
Variables ¶
View Source
var Operations []Operation
View Source
var WindowRatio float64 = 0.4
Functions ¶
func Input3Float ¶
func InputFloat ¶
func InputUnsigned ¶
Types ¶
type AddRemovable ¶
type AddRemovable interface { AddNode(X, Y, Z float64) (id uint) AddLineByNodeNumber(n1, n2 uint) (id uint) AddTriangle3ByNodeNumber(n1, n2, n3 uint) (id uint, ok bool) AddQuadr4ByNodeNumber(n1, n2, n3, n4 uint) (id uint, ok bool) AddModel(m Model) AddLeftCursor(lc LeftCursor) // Add lines by convex points on one plane AddConvexLines(nodes, elements []uint) // split elements SplitLinesByDistance(lines []uint, distance float64, atBegin bool) SplitLinesByRatio(lines []uint, proportional float64, atBegin bool) SplitLinesByEqualParts(lines []uint, parts uint) SplitTri3To3Tri3(tris []uint) Intersection(nodes, elements []uint) // Engineering change coordinates with precision 0.5 mm = 0.0005 meter MergeNodes(minDistance float64) // merge lines into one only if have same point MergeLines(lines []uint) // Scale by ratio [sX,sY,sZ] and node ScaleOrtho( basePoint gog.Point3d, scale [3]float64, nodes, elements []uint, ) // remove Remove(nodes, elements []uint) RemoveNodesWithoutElements() RemoveSameCoordinates() RemoveZeroLines() RemoveZeroTriangles() GetCoordByID(id uint) (c gog.Point3d, ok bool) GetCoords() []Coordinate GetElements() []Element }
type Coordinate ¶
Coordinate store coordinate of points
func (Coordinate) Check ¶
func (c Coordinate) Check() error
type Element ¶
type Element struct { ElementType ElType Indexes []int // index of coordinate // contains filtered or unexported fields }
Element is typical element for FEM. Examples:
Line o======o ElType : 1 Indexes: 2 (amount indexes of coordinates) Triangle o======o \ / \ / o ElType : 2 Indexes: 3 (amount indexes of coordinates) Quadr4 o======o | | | | o======o ElType : 3 Indexes: 4 (amount indexes of coordinates)
type LeftCursor ¶
type LeftCursor uint8
const ( AddLinesLC LeftCursor = iota AddTrianglesLC AddQuardsLC )
type Measurementable ¶
type Measurementable interface { }
type Mesh ¶
type Mesh interface { Filable Viewable // Partable AddRemovable Editable // Ignorable Hidable Selectable MoveCopyble Checkable Pluginable Measurementable groups.Mesh }
type Model ¶
type Model struct { Elements []Element Coords []Coordinate Groups struct { Data string // contains filtered or unexported fields } // contains filtered or unexported fields }
func (*Model) AddConvexLines ¶
func (*Model) AddLeftCursor ¶
func (mm *Model) AddLeftCursor(lc LeftCursor)
func (*Model) AddLineByNodeNumber ¶
func (*Model) AddQuadr4ByNodeNumber ¶
func (*Model) AddTriangle3ByNodeNumber ¶
func (*Model) DemoSpiral ¶
func (*Model) DeselectAll ¶
func (mm *Model) DeselectAll()
func (*Model) GetCoords ¶
func (mm *Model) GetCoords() []Coordinate
func (*Model) GetElements ¶
func (*Model) GetPresentFilename ¶
func (*Model) GetRootGroup ¶
func (*Model) GetSelectElements ¶
func (*Model) GetSelectNodes ¶
func (*Model) Intersection ¶
func (*Model) InvertSelect ¶
func (*Model) MergeLines ¶
func (*Model) MergeNodes ¶
func (*Model) RemoveNodesWithoutElements ¶
func (mm *Model) RemoveNodesWithoutElements()
func (*Model) RemoveZeroLines ¶
func (mm *Model) RemoveZeroLines()
func (*Model) RemoveZeroTriangles ¶
func (mm *Model) RemoveZeroTriangles()
func (*Model) ScaleOrtho ¶
func (*Model) SelectElementsOnPlane ¶
func (*Model) SelectLeftCursor ¶
func (*Model) SelectLinesByLenght ¶
func (*Model) SelectLinesCylindrical ¶
func (*Model) SelectLinesOrtho ¶
func (*Model) SelectLinesParallel ¶
func (*Model) SelectScreen ¶
func (*Model) SplitLinesByDistance ¶
func (*Model) SplitLinesByEqualParts ¶
func (*Model) SplitLinesByRatio ¶
func (*Model) SplitTri3To3Tri3 ¶
func (*Model) StandardView ¶
type Mouse2P ¶
type Mouse2P struct {
// contains filtered or unexported fields
}
func (*Mouse2P) ReadyAction ¶
func (*Mouse2P) ReadyPreview ¶
func (*Mouse2P) WithShiftKey ¶
type MouseAdd ¶
type MouseAdd struct { MouseSelect LC LeftCursor // contains filtered or unexported fields }
type MouseRotate ¶
type MouseRotate struct {
Mouse2P
}
func (*MouseRotate) Action ¶
func (mr *MouseRotate) Action(op *Opengl)
func (*MouseRotate) Preview ¶
func (mr *MouseRotate) Preview(xinit, yinit int32)
type MouseSelect ¶
func (*MouseSelect) Action ¶
func (ms *MouseSelect) Action(op *Opengl)
func (*MouseSelect) Preview ¶
func (ms *MouseSelect) Preview(xinit, yinit int32)
func (*MouseSelect) WithShiftKey ¶
func (ms *MouseSelect) WithShiftKey(key bool)
type MoveCopyble ¶
type Opengl ¶
type Opengl struct {
// contains filtered or unexported fields
}
func (*Opengl) AddLeftCursor ¶
func (op *Opengl) AddLeftCursor(lc LeftCursor)
func (*Opengl) MouseDefault ¶
func (op *Opengl) MouseDefault()
func (*Opengl) SelectLeftCursor ¶
func (*Opengl) SelectScreen ¶
func (*Opengl) SetCharCallback ¶
func (*Opengl) SetCursorPosCallback ¶
func (*Opengl) SetKeyCallback ¶
func (*Opengl) SetMouseButtonCallback ¶
func (op *Opengl) SetMouseButtonCallback( button glfw.MouseButton, action glfw.Action, mods glfw.ModifierKey, xcursor, ycursor float64, )
func (*Opengl) SetScrollCallback ¶
func (*Opengl) StandardView ¶
func (*Opengl) UpdateModel ¶
func (op *Opengl) UpdateModel()
type Pluginable ¶
type Pluginable interface {
DemoSpiral(levels uint)
}
type Selectable ¶
type Selectable interface { SelectLeftCursor(nodes bool, elements []bool) Select(nodes, elements []uint) GetSelectNodes(single bool) (ids []uint) GetSelectElements(single bool, filter func(_ ElType) (acceptable bool)) (ids []uint) InvertSelect(nodes bool, elements []bool) SelectLinesOrtho(x, y, z bool) SelectLinesParallel(lines []uint) SelectLinesByLenght(more bool, lenght float64) SelectElementsOnPlane(xoy, xoz, yoz bool, elements []bool) // TODO rename to SelectElementsCylindrical SelectLinesCylindrical(node uint, radiant, conc bool, axe Direction) SelectAll(nodes bool, elements []bool) DeselectAll() SelectScreen(from, to [2]int32) }
type Undo ¶
type Undo struct {
// contains filtered or unexported fields
}
func (*Undo) AddConvexLines ¶
func (*Undo) AddLeftCursor ¶
func (u *Undo) AddLeftCursor(lc LeftCursor)
func (*Undo) AddLineByNodeNumber ¶
func (*Undo) AddQuadr4ByNodeNumber ¶
func (*Undo) AddTriangle3ByNodeNumber ¶
func (*Undo) DemoSpiral ¶
func (*Undo) DeselectAll ¶
func (u *Undo) DeselectAll()
func (*Undo) GetCoords ¶
func (u *Undo) GetCoords() []Coordinate
func (*Undo) GetElements ¶
func (*Undo) GetPresentFilename ¶
func (*Undo) GetRootGroup ¶
func (*Undo) GetSelectElements ¶
func (*Undo) GetSelectNodes ¶
func (*Undo) GetSelected ¶
func (*Undo) Intersection ¶
func (*Undo) InvertSelect ¶
func (*Undo) IsChangedModel ¶
func (*Undo) MergeLines ¶
func (*Undo) MergeNodes ¶
func (*Undo) RemoveNodesWithoutElements ¶
func (u *Undo) RemoveNodesWithoutElements()
func (*Undo) RemoveSameCoordinates ¶
func (u *Undo) RemoveSameCoordinates()
func (*Undo) RemoveZeroLines ¶
func (u *Undo) RemoveZeroLines()
func (*Undo) RemoveZeroTriangles ¶
func (u *Undo) RemoveZeroTriangles()
func (*Undo) ScaleOrtho ¶
func (*Undo) SelectElementsOnPlane ¶
func (*Undo) SelectLeftCursor ¶
func (*Undo) SelectLinesByLenght ¶
func (*Undo) SelectLinesCylindrical ¶
func (*Undo) SelectLinesOrtho ¶
func (*Undo) SelectLinesParallel ¶
func (*Undo) SelectScreen ¶
func (*Undo) SplitLinesByDistance ¶
func (*Undo) SplitLinesByEqualParts ¶
func (*Undo) SplitLinesByRatio ¶
func (*Undo) SplitTri3To3Tri3 ¶
func (*Undo) StandardView ¶
Click to show internal directories.
Click to hide internal directories.