I am in need of a lisp routine to automatically generate compound miter angles to create a 90 degree bend with an angled panel like the one attached. The red circles in the dwg file are the miter angles that need to be automatically generated. The green circles in dwg file are good miter angles.
If happy with this drag over solution it will then fillet and add the mitre line. This allows for select sequence of entities. Others may have a solution already this would be my approach.
@mwynnHEUS9 wrote:
... generate compound miter angles to create a 90 degree bend with an angled panel like the one attached. ....
Are you talking about bending the perimeter strip parts of a piece of sheet material up 90° to make a "tray" situation, with the edges of the bent-up strips meeting to form corners, like this?
[The green is the original, the blue solid are the folded-up strips.]
If so, at the internal corner you won't be able to have them meet at what I assume is the intended corner [yellow], because the sheet needs to be cut at the dotted red line, and folding the adjacent pieces up results in the blue. More material would need to be added to fill in the triangular areas and close the corner.
Is your intent something different from my assumptions?
The intent is to be able to have a tray situation like you are talking about be able to go around a 90 degree corner at an angle.
If I understand correctly, at your lower red-circled corner, all you need is to add these magenta lines:
and it's the same as at your green-circled corners -- those edges will meet when folded up 90°.
At the upper red-circled corner, illustrated in 3D view in my previous Reply, here's the plan view showing the same dotted red line where the sheet material would have to be cut, if that helps illustrate why bending the edges up is not going to be able to make the corner I think you want.
Or am I misunderstanding?
You are understanding correctly partially. The white line that goes through the center of the part is also a 90 degree bend. So the two sides have to fold up to make a 90 degree connection but also have to be able to be a corner.
Something is going to have to bend to meet something else. Here, the blue are the "base" or "main" surfaces, with the 90° bend between the two, and the green the edges bent 90° from the blue. At the outer corner:
And at the inner corner:
Are you looking to have a program that calculates the miter and bevel angle for two board (e.g., crown molding) that come together at a corner?
For example, here are two boards tilted back by 30° for a 90°corner.
After trimming the pieces (I used Boolean subtracts) we have:
As noted below, the miter angle is 40.89° and the bevel angle is 26.57° for the 30° tilt.
For a tilt angle of 30° and a wall angle of 90° the miter angle agrees with the result from the formula found here.
miter angle = atan (cos(tilt angle) * tan (wall angle /2)
However, the bevel angle is not the same using the formula from the same reference.
bevel angle = asin(sin(tilt angle) * sin(wall angle)
Perhaps I'm misinterpreting something!
Is this the calculation you want to automate. Do you just need the miter angle?
It's not clear what you want to input and what you want for output.
Looking at your drawing should it be assumed that Panel A and Panel B are rectangular and will form an angle alpha (measure in a plane perpendicular to the fold axis) and you want to know the angle for the tabs cuts circled in red? Or, is panel A a parallelogram and will be folded by 90° or ???
It would help to have detailed example of what you are given and what results you would like.
Took a bit of cardboard and possibly worked it out for a 90 bend.
The mitre angle is 1/2 bend angle. Not complicated just draw line at correct angle.
Yes. This is what I am looking for but for all angles not just a 90 degree angle. I also attached an example of what would be given and what would be produced.
@mwynnHEUS9 wrote:
... an example of what would be given and what would be produced.
That's a much better example than the first one, but I think some things are incorrect. If the right-most part is a side elevation with bends bent, then if the 70° bend is as shown, then what is labeled as a 30° bend should be like this:
Should the 30° bend really be called 110° as it is drawn in your side view?
And if that's the configuration, the notches for the bent-up edges along the side need to be corrected:
In any case, for the angle of the longer diagonal edge:
Exactly. I just wrote the wrong number in there when I made the mach up.
With help from some of @Kent1Cooper 's comments I've come up with the following that I think does what you want.
Example, wall angle = 60°, bend angle 110°
Calculate cut angle
(defun c:CutAngle (/ WallAng BendAng andRad angDeg)
; calculates cut angle given wall angle and bend angle
(setq WallAng (getreal "\nEnter wall angle.")
BendAng (getreal "\nEnter bend angle.")
angRad (atan (*
(/ 1. (sin (d2r BendAng)))
(tan (/ (d2r WallAng) 2.))
)
)
angDeg (/ (* angRad 180.) pi)
)
(princ "\nThe cut angle is: ")
(princ angDeg) (princ)
)
(defun d2r (d) (/ (* d pi) 180.))
(defun tan (a) (/ (sin a) (cos a)))
While this is helpful this isn't exactly what I am needing. I need it to do this but draw the part.
Can't find what you're looking for? Ask the community or share your knowledge.