diff --git a/form3/obj3/thread/acme.go b/form3/obj3/thread/acme.go index 0c9e044..3c5e6ed 100644 --- a/form3/obj3/thread/acme.go +++ b/form3/obj3/thread/acme.go @@ -17,8 +17,8 @@ type Acme struct { var _ Threader = Acme{} // Compile time check of interface implementation. -func (acme Acme) Parameters() Parameters { - return basic{D: acme.D, P: acme.P}.Parameters() +func (acme Acme) ThreadParams() Parameters { + return basic{D: acme.D, P: acme.P}.ThreadParams() } // AcmeThread returns the 2d profile for an acme thread. diff --git a/form3/obj3/thread/ansibuttress.go b/form3/obj3/thread/ansibuttress.go index 5cecc24..f889a36 100644 --- a/form3/obj3/thread/ansibuttress.go +++ b/form3/obj3/thread/ansibuttress.go @@ -16,8 +16,8 @@ type ANSIButtress struct { var _ Threader = ANSIButtress{} // Compile time check of interface implementation. -func (butt ANSIButtress) Parameters() Parameters { - return basic{D: butt.D, P: butt.P}.Parameters() +func (butt ANSIButtress) ThreadParams() Parameters { + return basic{D: butt.D, P: butt.P}.ThreadParams() } // ANSIButtressThread returns the 2d profile for an ANSI 45/7 buttress thread. diff --git a/form3/obj3/thread/basic.go b/form3/obj3/thread/basic.go index 2c06ebc..cc65ad0 100644 --- a/form3/obj3/thread/basic.go +++ b/form3/obj3/thread/basic.go @@ -10,7 +10,7 @@ type basic struct { P float64 } -func (b basic) Parameters() Parameters { +func (b basic) ThreadParams() Parameters { radius := b.D / 2 return Parameters{ Name: "basic", diff --git a/form3/obj3/thread/bolt.go b/form3/obj3/thread/bolt.go index e6a8459..38058a0 100644 --- a/form3/obj3/thread/bolt.go +++ b/form3/obj3/thread/bolt.go @@ -31,7 +31,7 @@ func Bolt(k BoltParms) (s sdf.SDF3, err error) { case k.Tolerance < 0: err = errors.New("tolerance < 0") } - param := k.Thread.Parameters() + param := k.Thread.ThreadParams() // head var head sdf.SDF3 diff --git a/form3/obj3/thread/iso.go b/form3/obj3/thread/iso.go index 44fc9ed..e7c52cd 100644 --- a/form3/obj3/thread/iso.go +++ b/form3/obj3/thread/iso.go @@ -21,9 +21,9 @@ type ISO struct { var _ Threader = ISO{} // Compile time check of interface implementation. -func (iso ISO) Parameters() Parameters { +func (iso ISO) ThreadParams() Parameters { b := basic{D: iso.D, P: iso.P} - return b.Parameters() + return b.ThreadParams() } func (iso ISO) Thread() (sdf.SDF2, error) { diff --git a/form3/obj3/thread/knurl.go b/form3/obj3/thread/knurl.go index f9603f9..94365d6 100644 --- a/form3/obj3/thread/knurl.go +++ b/form3/obj3/thread/knurl.go @@ -36,8 +36,8 @@ func (k KnurlParams) Thread() (sdf.SDF2, error) { } // Parameters implements the Threader interface. -func (k KnurlParams) Parameters() Parameters { - p := ISO{D: k.Radius * 2, P: k.Pitch, Ext: true}.Parameters() +func (k KnurlParams) ThreadParams() Parameters { + p := ISO{D: k.Radius * 2, P: k.Pitch, Ext: true}.ThreadParams() p.Starts = k.starts return p } diff --git a/form3/obj3/thread/npt.go b/form3/obj3/thread/npt.go index b01f270..a9345cf 100644 --- a/form3/obj3/thread/npt.go +++ b/form3/obj3/thread/npt.go @@ -19,8 +19,8 @@ type NPT struct { var _ Threader = NPT{} // Compile time check of interface implementation. -func (npt NPT) Parameters() Parameters { - p := ISO{D: npt.D, P: 1.0 / npt.TPI}.Parameters() +func (npt NPT) ThreadParams() Parameters { + p := ISO{D: npt.D, P: 1.0 / npt.TPI}.ThreadParams() p.Name = "NPT" p.Taper = math.Atan(1.0 / 32.0) // standard NPT taper. if npt.F2F > 0 { diff --git a/form3/obj3/thread/nut.go b/form3/obj3/thread/nut.go index 94da430..a364f9f 100644 --- a/form3/obj3/thread/nut.go +++ b/form3/obj3/thread/nut.go @@ -49,7 +49,7 @@ func Nut(k NutParms) (s sdf.SDF3, err error) { return nil, err } - params := k.Thread.Parameters() + params := k.Thread.ThreadParams() // nut body var nut sdf.SDF3 nr := params.HexRadius() diff --git a/form3/obj3/thread/plasticbuttress.go b/form3/obj3/thread/plasticbuttress.go index 70cd084..b324989 100644 --- a/form3/obj3/thread/plasticbuttress.go +++ b/form3/obj3/thread/plasticbuttress.go @@ -16,8 +16,8 @@ type PlasticButtress struct { var _ Threader = PlasticButtress{} // Compile time check of interface implementation. -func (butt PlasticButtress) Parameters() Parameters { - return basic{D: butt.D, P: butt.P}.Parameters() +func (butt PlasticButtress) ThreadParams() Parameters { + return basic{D: butt.D, P: butt.P}.ThreadParams() } // Thread returns the 2d profile for a screw top style plastic buttress thread. diff --git a/form3/obj3/thread/thread.go b/form3/obj3/thread/thread.go index e72f1cf..61a7ae9 100644 --- a/form3/obj3/thread/thread.go +++ b/form3/obj3/thread/thread.go @@ -24,7 +24,7 @@ import ( type Threader interface { Thread() (sdf.SDF2, error) - Parameters() Parameters + ThreadParams() Parameters } type ScrewParameters struct { @@ -59,7 +59,7 @@ func Screw(length float64, thread Threader) (sdf.SDF3, error) { if err != nil { return nil, err } - params := thread.Parameters() + params := thread.ThreadParams() s := screw{} s.thread = tsdf s.pitch = params.Pitch diff --git a/form3/obj3/thread/uts.go b/form3/obj3/thread/uts.go index fb671bc..d6beb0e 100644 --- a/form3/obj3/thread/uts.go +++ b/form3/obj3/thread/uts.go @@ -14,8 +14,8 @@ type UTS struct { var _ Threader = UTS{} // Interface implementation. -func (uts UTS) Parameters() Parameters { - p := basic{D: uts.D, P: 1.0 / uts.TPI}.Parameters() +func (uts UTS) ThreadParams() Parameters { + p := basic{D: uts.D, P: 1.0 / uts.TPI}.ThreadParams() // TODO(soypat) add imperial hex flat-to-flat. See NPT for what that could look like. return p }