Skip to content
Snippets Groups Projects
Commit 54365079 authored by mehtank's avatar mehtank
Browse files

Bugfix edge labels (todo: check RectBeam for similar bug)

parent 6279937c
No related merge requests found
from rocolib.api.components import FoldedComponent
from rocolib.api.composables.graph.Face import Rectangle
import rocolib.utils.numsym as np
class SimpleRectBeam(FoldedComponent):
def define(self):
......@@ -14,8 +13,8 @@ class SimpleRectBeam(FoldedComponent):
self.addEdgeInterface("topedge%d" % i, "r%d.e0" % i, ["width", "depth"][i % 2])
self.addEdgeInterface("botedge%d" % i, "r%d.e2" % i, ["width", "depth"][i % 2])
self.addFaceInterface("face%d" % i, "r%d" % i)
self.addEdgeInterface("tabedge", "r3.e1", "length")
self.addEdgeInterface("slotedge", "r0.e3", "length")
self.addEdgeInterface("slotedge", "r3.e1", "length")
self.addEdgeInterface("tabedge", "r0.e3", "length")
def assemble(self):
length = self.getParameter("length")
......@@ -34,11 +33,10 @@ class SimpleRectBeam(FoldedComponent):
fromEdge = 'r%d.e1' % i
self.setFaceInterface("face%d" % i, "r%d" % i)
slotEdge = "r0.e3"
tabEdge = "r3.e1"
tabEdge, slotEdge = "r0.e3", "r3.e1"
if self.getParameter("addTabs"):
self.addTab(slotEdge, tabEdge, angle= 90, width=min(10, depth))
self.addTab(tabEdge, slotEdge, angle= 90, width=min(10, depth))
if __name__ == "__main__":
SimpleRectBeam.test()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment