Skip to content

Commit

Permalink
1.3.3
Browse files Browse the repository at this point in the history
ensure that small distributed loads will be plotted with at least 3 legs.
  • Loading branch information
cslotboom committed Feb 18, 2024
1 parent c1d4732 commit 7c53640
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 12 deletions.
Binary file added doc/img/Beam-Image-2-SFD - POI labeled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion doc/readthedocs/planesections/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ def getDOF(self):
"""
return self._ndf


def _initArrays(self):
self.nodeLabels = {}
self.nodes:list[Node] = []
Expand Down
7 changes: 5 additions & 2 deletions doc/readthedocs/planesections/diagram/components/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ def __init__(self, loadBox, diagramOptions:DistLoadOptions,
# self.pointUp = loadBox.pointUp
self.options = diagramOptions
self.plOptions = plOptions
self.minNbar = 3

def plot(self, ax):

Expand All @@ -547,7 +548,7 @@ def plot(self, ax):
x1, x2 = self.loadBox.x
y1, y2 = self.loadBox.y

N = int((x2 - x1) / spacing) + 1
N = max(int((x2 - x1) / spacing) + 1, self.minNbar)
xVals = np.linspace(x1, x2, N)

ystart = self.loadBox.fout[0]
Expand All @@ -574,6 +575,7 @@ def __init__(self, loadBox, diagramOptions:LinLoadOptions,
self.loadBox = loadBox
self.options = diagramOptions
self.plOptions = plOptions
self.minNbar = 3

def plot(self, ax):

Expand All @@ -592,7 +594,8 @@ def plot(self, ax):

# baseLineWidth = 0.015

Nlines = int((x2 - x1) / spacing) + 1
Nlines = max(int((x2 - x1) / spacing) + 1, self.minNbar)

xVals = np.linspace(x1, x2, Nlines)

q1, q2 = self.loadBox.fout
Expand Down
2 changes: 0 additions & 2 deletions doc/readthedocs/planesections/postprocess/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,6 @@ def plotRotation2D(beam:Beam, scale=1000, yunit = 'mRad', **kwargs):

return plotDisp2D(beam, ind, scale, yunit= yunit, **kwargs)



def plotPOI(fig, ax, xcoords, force, labels, filteredPoiInd):

labelX = []
Expand Down
4 changes: 2 additions & 2 deletions example/1. Demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
analysis.runAnalysis()

# Plot the SFD and BMD
ps.plotShear(beam, scale = 0.001, yunit = 'kN')
ps.plotMoment(beam, scale = 0.001, yunit = 'kNm')
ps.plotShear(beam, scale = 0.001, yunit = 'kN',labelPOI=True)
ps.plotMoment(beam, scale = 0.001, yunit = 'kNm',labelPOI=True)
4 changes: 4 additions & 0 deletions example/2. Analysis/Ex2a-Basic Beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,8 @@
ps.plotDisp(beam, scale=1000, yunit = 'mm')
ps.plotRotation(beam, scale=1000, yunit = 'mrad')

"""
Plot the shear force, and show labeling.
"""
ps.plotVertDisp(beam)
ps.plotShear(beam,labelPOI=True)
1 change: 0 additions & 1 deletion src/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ def getDOF(self):
"""
return self._ndf


def _initArrays(self):
self.nodeLabels = {}
self.nodes:list[Node] = []
Expand Down
7 changes: 5 additions & 2 deletions src/diagram/components/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ def __init__(self, loadBox, diagramOptions:DistLoadOptions,
# self.pointUp = loadBox.pointUp
self.options = diagramOptions
self.plOptions = plOptions
self.minNbar = 3

def plot(self, ax):

Expand All @@ -547,7 +548,7 @@ def plot(self, ax):
x1, x2 = self.loadBox.x
y1, y2 = self.loadBox.y

N = int((x2 - x1) / spacing) + 1
N = max(int((x2 - x1) / spacing) + 1, self.minNbar)
xVals = np.linspace(x1, x2, N)

ystart = self.loadBox.fout[0]
Expand All @@ -574,6 +575,7 @@ def __init__(self, loadBox, diagramOptions:LinLoadOptions,
self.loadBox = loadBox
self.options = diagramOptions
self.plOptions = plOptions
self.minNbar = 3

def plot(self, ax):

Expand All @@ -592,7 +594,8 @@ def plot(self, ax):

# baseLineWidth = 0.015

Nlines = int((x2 - x1) / spacing) + 1
Nlines = max(int((x2 - x1) / spacing) + 1, self.minNbar)

xVals = np.linspace(x1, x2, Nlines)

q1, q2 = self.loadBox.fout
Expand Down
2 changes: 0 additions & 2 deletions src/postprocess/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,6 @@ def plotRotation2D(beam:Beam, scale=1000, yunit = 'mRad', **kwargs):

return plotDisp2D(beam, ind, scale, yunit= yunit, **kwargs)



def plotPOI(fig, ax, xcoords, force, labels, filteredPoiInd):

labelX = []
Expand Down

0 comments on commit 7c53640

Please sign in to comment.