Need to automatically generate compound miter angles.

Need to automatically generate compound miter angles.

mwynnHEUS9
Participant Participant
1,342 Views
17 Replies
Message 1 of 18

Need to automatically generate compound miter angles.

mwynnHEUS9
Participant
Participant

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.

0 Likes
1,343 Views
17 Replies
Replies (17)
Message 2 of 18

Sea-Haven
Mentor
Mentor

 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.

0 Likes
Message 3 of 18

mwynnHEUS9
Participant
Participant

I don't exactly understand what you are trying to say.

0 Likes
Message 4 of 18

Kent1Cooper
Consultant
Consultant

@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?

Kent1Cooper_1-1675701855753.png

[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.

Kent1Cooper_2-1675702026632.png

Is your intent something different from my assumptions?

Kent Cooper, AIA
0 Likes
Message 5 of 18

mwynnHEUS9
Participant
Participant

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.

0 Likes
Message 6 of 18

Kent1Cooper
Consultant
Consultant

If I understand correctly, at your lower red-circled corner, all you need is to add these magenta lines:

Kent1Cooper_0-1675710471809.png

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.

Kent1Cooper_1-1675710677941.png

 

Or am I misunderstanding?

Kent Cooper, AIA
0 Likes
Message 7 of 18

mwynnHEUS9
Participant
Participant

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.

 

0 Likes
Message 8 of 18

Kent1Cooper
Consultant
Consultant

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:

PlateBend-OuterCorner.gif

And at the inner corner:

PlateBend-InnerCorner.gif

Kent Cooper, AIA
0 Likes
Message 9 of 18

leeminardi
Mentor
Mentor

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.

leeminardi_0-1675712618773.png

After trimming the pieces (I used Boolean subtracts) we have:

leeminardi_1-1675712686039.png

As noted below, the miter angle is 40.89° and the bevel angle is 26.57° for the 30° tilt.

 

leeminardi_2-1675712952156.png

 

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? 

lee.minardi
0 Likes
Message 10 of 18

mwynnHEUS9
Participant
Participant

Exactly

0 Likes
Message 11 of 18

mwynnHEUS9
Participant
Participant

But, it's for flat pieces of metal to get bent in multiple directions

0 Likes
Message 12 of 18

leeminardi
Mentor
Mentor

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.  

leeminardi_0-1675722710787.png

 

lee.minardi
0 Likes
Message 13 of 18

Sea-Haven
Mentor
Mentor

Took a bit of cardboard and possibly worked it out for a 90 bend.

 

SeaHaven_0-1675729630210.pngSeaHaven_1-1675729662844.png

The mitre angle is 1/2 bend angle. Not complicated just draw line at correct angle.

0 Likes
Message 14 of 18

mwynnHEUS9
Participant
Participant

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.

0 Likes
Message 15 of 18

Kent1Cooper
Consultant
Consultant

@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:

Kent1Cooper_0-1675779482428.png  

Should the 30° bend really be called 110° as it is drawn in your side view?

Kent1Cooper_3-1675780134066.png

And if that's the configuration, the notches for the bent-up edges along the side need to be corrected:

Kent1Cooper_4-1675780346439.png

In any case, for the angle of the longer diagonal edge:

Kent1Cooper_5-1675782194406.png

 

 

 

 

Kent Cooper, AIA
0 Likes
Message 16 of 18

mwynnHEUS9
Participant
Participant

Exactly. I just wrote the wrong number in there when I made the mach up.

0 Likes
Message 17 of 18

leeminardi
Mentor
Mentor

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°

leeminardi_0-1675809017544.png

Calculate cut angle

leeminardi_1-1675809134397.png

 

(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)))

 

lee.minardi
0 Likes
Message 18 of 18

mwynnHEUS9
Participant
Participant

While this is helpful this isn't exactly what I am needing. I need it to do this but draw the part.

0 Likes