Skip to content

Commit

Permalink
Fix module and package name to really be usable as lib
Browse files Browse the repository at this point in the history
  • Loading branch information
aligator committed Apr 2, 2021
1 parent ba2282a commit eadd414
Show file tree
Hide file tree
Showing 37 changed files with 92 additions and 93 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ Here some brief explanation of the interfaces. For more detailed information jus

* Optimizer handler.ModelOptimizer
Is responsible for
1. checking the model
2. optimizing it by e.g. removing doubles
3. calculating some additional information,
like the touching vertices etc. which is needed for the next step.
The implementation of GoSlice is very currently basic and may have problems with some models.
1. checking the model
2. optimizing it by e.g. removing doubles
3. calculating some additional information, like the touching vertices etc. which is needed for the next step. The
implementation of GoSlice is currently very basic and may have problems with some models.

* Slicer handler.ModelSlicer
Creates the slices (e.g. layers) out of the model.
Expand Down
6 changes: 3 additions & 3 deletions clip/clip.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
package clip

import (
"GoSlice/data"
"github.com/aligator/goslice/data"

clipper "github.com/aligator/go.clipper"
go_convex_hull_2d "github.com/furstenheim/go-convex-hull-2d"
goconvexhull2d "github.com/furstenheim/go-convex-hull-2d"
)

// Pattern is an interface for all infill types which can be used to fill layer parts.
Expand Down Expand Up @@ -352,7 +352,7 @@ func (c clipperClipper) Hull(parts []data.LayerPart) (hull data.Path, ok bool) {
allPoints = append(allPoints, part.Outline()...)
}

convexHull := go_convex_hull_2d.New(allPoints)
convexHull := goconvexhull2d.New(allPoints)

hullPath, ok := convexHull.(data.Path)
if !ok {
Expand Down
2 changes: 1 addition & 1 deletion clip/linear.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package clip

import (
"GoSlice/data"
"fmt"
"github.com/aligator/goslice/data"

clipper "github.com/aligator/go.clipper"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/goslice/main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package main

import (
"GoSlice"
"GoSlice/data"
"fmt"
"github.com/aligator/goslice"
"github.com/aligator/goslice/data"
"io"
"os"

Expand All @@ -26,7 +26,7 @@ func main() {
os.Exit(1)
}

p := GoSlice.NewGoSlice(o)
p := goslice.NewGoSlice(o)
err := p.Process()

if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions data/2d_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package data_test

import (
"GoSlice/data"
"GoSlice/util/test"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/util/test"
"math"
"testing"
)
Expand Down
4 changes: 2 additions & 2 deletions data/data_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package data_test

import (
"GoSlice/data"
"GoSlice/util/test"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/util/test"
"testing"
)

Expand Down
4 changes: 2 additions & 2 deletions data/layer_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package data_test

import (
"GoSlice/data"
"GoSlice/util/test"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/util/test"
"github.com/google/go-cmp/cmp"
"testing"
)
Expand Down
4 changes: 2 additions & 2 deletions data/micrometer_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package data_test

import (
"GoSlice/data"
"GoSlice/util/test"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/util/test"
"github.com/google/go-cmp/cmp"
"testing"
)
Expand Down
4 changes: 2 additions & 2 deletions data/option_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package data_test

import (
"GoSlice/data"
"GoSlice/util/test"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/util/test"
"github.com/google/go-cmp/cmp"
"strings"
"testing"
Expand Down
4 changes: 2 additions & 2 deletions gcode/builder.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package gcode

import (
"GoSlice/clip"
"GoSlice/data"
"bytes"
"errors"
"fmt"
"github.com/aligator/goslice/clip"
"github.com/aligator/goslice/data"
"math"
)

Expand Down
6 changes: 3 additions & 3 deletions gcode/builder_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package gcode_test

import (
"GoSlice/data"
"GoSlice/gcode"
"GoSlice/util/test"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/gcode"
"github.com/aligator/goslice/util/test"
"testing"
)

Expand Down
4 changes: 2 additions & 2 deletions gcode/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
package gcode

import (
"GoSlice/data"
"GoSlice/handler"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/handler"
)

// Renderer can be used to add GCodes based on the current layer and layer data.
Expand Down
6 changes: 3 additions & 3 deletions gcode/generator_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package gcode_test

import (
"GoSlice/data"
"GoSlice/gcode"
"GoSlice/util/test"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/gcode"
"github.com/aligator/goslice/util/test"
"testing"
)

Expand Down
6 changes: 3 additions & 3 deletions gcode/renderer/brim.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
package renderer

import (
"GoSlice/data"
"GoSlice/gcode"
"GoSlice/modifier"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/gcode"
"github.com/aligator/goslice/modifier"
)

// Brim just draws the brim lines generated by the brim modifier.
Expand Down
8 changes: 4 additions & 4 deletions gcode/renderer/infill.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
package renderer

import (
"GoSlice/clip"
"GoSlice/data"
"GoSlice/gcode"
"GoSlice/modifier"
"github.com/aligator/goslice/clip"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/gcode"
"github.com/aligator/goslice/modifier"
)

// Infill is a renderer which can fill parts which are defined by a layer part attribute of a specific name.
Expand Down
4 changes: 2 additions & 2 deletions gcode/renderer/layer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package renderer

import (
"GoSlice/data"
"GoSlice/gcode"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/gcode"
)

// PreLayer adds starting gcode, resets the extrude speeds on each layer and enables the fan above a specific layer.
Expand Down
6 changes: 3 additions & 3 deletions gcode/renderer/perimeter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
package renderer

import (
"GoSlice/data"
"GoSlice/gcode"
"GoSlice/modifier"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/gcode"
"github.com/aligator/goslice/modifier"
)

// Perimeter is a renderer which generates the gcode for the attribute "perimeters".
Expand Down
8 changes: 4 additions & 4 deletions gcode/renderer/skirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
package renderer

import (
"GoSlice/clip"
"GoSlice/data"
"GoSlice/gcode"
"GoSlice/modifier"
"errors"
"github.com/aligator/goslice/clip"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/gcode"
"github.com/aligator/goslice/modifier"
)

// Skirt generates the skirt lines.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module GoSlice
module github.com/aligator/goslice

go 1.14

Expand Down
22 changes: 11 additions & 11 deletions goslice.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package GoSlice
package goslice

import (
"GoSlice/clip"
"GoSlice/data"
"GoSlice/gcode"
"GoSlice/gcode/renderer"
"GoSlice/handler"
"GoSlice/modifier"
"GoSlice/optimizer"
"GoSlice/reader"
"GoSlice/slicer"
"GoSlice/writer"
"fmt"
"github.com/aligator/goslice/clip"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/gcode"
"github.com/aligator/goslice/gcode/renderer"
"github.com/aligator/goslice/handler"
"github.com/aligator/goslice/modifier"
"github.com/aligator/goslice/optimizer"
"github.com/aligator/goslice/reader"
"github.com/aligator/goslice/slicer"
"github.com/aligator/goslice/writer"
"time"
)

Expand Down
6 changes: 3 additions & 3 deletions goslice_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package GoSlice
package goslice

import (
"GoSlice/data"
"GoSlice/util/test"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/util/test"
"testing"
)

Expand Down
2 changes: 1 addition & 1 deletion handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

package handler

import "GoSlice/data"
import "github.com/aligator/goslice/data"

// ModelReader reads a model from a file.
type ModelReader interface {
Expand Down
6 changes: 3 additions & 3 deletions modifier/brim.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package modifier

import (
"GoSlice/clip"
"GoSlice/data"
"GoSlice/handler"
"fmt"
"github.com/aligator/goslice/clip"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/handler"
)

type brimModifier struct {
Expand Down
6 changes: 3 additions & 3 deletions modifier/infill.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package modifier

import (
"GoSlice/clip"
"GoSlice/data"
"GoSlice/handler"
"errors"
"github.com/aligator/goslice/clip"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/handler"
)

type infillModifier struct {
Expand Down
6 changes: 3 additions & 3 deletions modifier/internal_infill.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package modifier

import (
"GoSlice/clip"
"GoSlice/data"
"GoSlice/handler"
"errors"
"github.com/aligator/goslice/clip"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/handler"
)

type internalInfillModifier struct {
Expand Down
2 changes: 1 addition & 1 deletion modifier/modifier.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package modifier

import (
"GoSlice/data"
"fmt"
"github.com/aligator/goslice/data"
)

// extendedLayer is a partitioned layer which supports types
Expand Down
6 changes: 3 additions & 3 deletions modifier/perimeter.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package modifier

import (
"GoSlice/clip"
"GoSlice/data"
"GoSlice/handler"
"errors"
"github.com/aligator/goslice/clip"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/handler"
)

type perimeterModifier struct {
Expand Down
6 changes: 3 additions & 3 deletions modifier/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
package modifier

import (
"GoSlice/clip"
"GoSlice/data"
"GoSlice/handler"
"errors"
"fmt"
"github.com/aligator/goslice/clip"
"github.com/aligator/goslice/data"
"github.com/aligator/goslice/handler"
"math"
)

Expand Down
2 changes: 1 addition & 1 deletion optimizer/face.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package optimizer

import (
"GoSlice/data"
"github.com/aligator/goslice/data"
)

type optimizedFace struct {
Expand Down
2 changes: 1 addition & 1 deletion optimizer/model.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package optimizer

import (
"GoSlice/data"
"github.com/aligator/goslice/data"

"github.com/hschendel/stl"
)
Expand Down
Loading

0 comments on commit eadd414

Please sign in to comment.