Question about punching and bending #1193
Unanswered
WhereMyRPI
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Here is an experiment to start the discussion. Perhaps a higher level procedure could be built around something like this to automatically rotate the faces as in the following. s = cq.Sketch().rect(20, 60).push([(0, 24), (0, -24)]).circle(2, mode="s")
f = s.reset().faces().val()
f0 = f.split(cq.Face.makePlane(None, None, cq.Vector(0, 10, 0), cq.Vector(0, -1, 0)))
w0 = (
cq.Workplane(f0)
.faces("<<Y")
.tag("f1")
.end(1)
.faces(">>Y")
.tag("f2") # keep
.faces(tag="f1")
.rotate(cq.Vector(0, 10, 0), cq.Vector(1, 10, 0), 90)
.faces()
.tag("f3")
)
f1 = w0.faces(tag="f1")
f2 = w0.faces(tag="f2")
f3 = w0.faces(tag="f3")
f4 = w0.val().split(
cq.Face.makePlane(None, None, cq.Vector(0, 0, -20), cq.Vector(0, 0, 1))
)
w1 = (
cq.Workplane(f4)
.faces("<<Z")
.tag("f5")
.end(1)
.faces(">>Z")
.tag("f6") # keep
.faces(tag="f5")
.rotate(cq.Vector(0, 10, -20), cq.Vector(1, 10, -20), -90)
.faces()
.tag("f7") # keep
)
f5 = w1.faces(tag="f5")
f6 = w1.faces(tag="f6")
f7 = w1.faces(tag="f7")
face = cq.Face(f2.val().fuse(f6.val(), f7.val()).wrapped)
result = face.thicken(2).fuse(face.thicken(-2)) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm stuck trying to automatically create busbars that are firstly punched and secondly bended.
Creating such a busbar with the appropriate punchings is easy, as one of the examples in the documentation (link) shows:
This punching should be done first, because the coordinates of the punchings that are available are expressed in terms of the flat busbar.
The next step is to bend this busbar. The result should look something like this:
My problem is that is can't figure out how to do this bending.
I could bend the busbar first by creating and extruding a sketch, but placing the punchings would be very difficult with this approach, right?
Best regards.
Beta Was this translation helpful? Give feedback.
All reactions