Skip to content

Commit

Permalink
fix call error in SynchronousBeltTable
Browse files Browse the repository at this point in the history
  • Loading branch information
bc0n committed Nov 2, 2023
1 parent c852855 commit 2abd7e5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
desktop.ini

#inventor
**/OldVersions
*.lck
Expand Down
7 changes: 0 additions & 7 deletions BeltTransmission.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@
// Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
},
{
"name": "JuliaCurrentFile",
"type": "julia",
Expand Down
30 changes: 20 additions & 10 deletions src/SynchronousBeltTable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module SynchronousBeltTable
Converts a DataFrame row to a SynchronousBelt struct.
"""
function dfRow2SyncBelt( row::DataFrames.DataFrameRow ) #how to make this an AbstOB
return sb = SynchronousBelt( pitch=row.pitch,
return SynchronousBelt( pitch=row.pitch,
length=row.length,
nTeeth=row.nTeeth,
width=row.width,
Expand Down Expand Up @@ -112,15 +112,25 @@ module SynchronousBeltTable

df = DataFrame()
for row in eachrow(cread)
sb = SynchronousBelt( pitch=row[1].pitchMM*mm,
length=row[1].lengthMM*mm,
nTeeth=row[1].nTeeth,
width=row[1].widthMM*mm,
profile=string(row[1].profile),
partNumber=string(row[1].partNumber),
supplier=string(row[1].supplier),
url=string(row[1].url),
id=tryparse(UUID, row[1].id) )
sb = SynchronousBelt(
string(row[1].profile),
row[1].pitchMM*mm,
row[1].lengthMM*mm,
row[1].nTeeth,
row[1].widthMM*mm,
string(row[1].partNumber),
string(row[1].supplier),
string(row[1].url),
tryparse(UUID, row[1].id) )
# sb = SynchronousBelt( pitch=row[1].pitchMM*mm,
# length=row[1].lengthMM*mm,
# nTeeth=row[1].nTeeth,
# width=row[1].widthMM*mm,
# profile=string(row[1].profile),
# partNumber=string(row[1].partNumber),
# supplier=string(row[1].supplier),
# url=string(row[1].url),
# id=tryparse(UUID, row[1].id) )
append!(df, dfRow(sb) )
end
return df
Expand Down
3 changes: 2 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ close("all")

import Geometry2D
using BeltTransmission
println("\n testing BeltTransmission")

# println(Main.varinfo(@__MODULE__, r"^((?!\#).)*$"; all=true, imported=true, recursive=true)) #regex to remove #eval, #addA entities, not sure what the #

Expand All @@ -21,7 +22,7 @@ include("testPulleyPlain.jl")

include("testSynchronous.jl")

# include("testSynchronousBeltTable.jl")
include("testSynchronousBeltTable.jl")

include("testPlotsRecipes.jl")

Expand Down

0 comments on commit 2abd7e5

Please sign in to comment.