Add edge with specific angle like Bevel segments ?

Hi

I’m trying to find a way to add edges to a face , but with specific angle like in Bevel : if you bevel an edge with two segments the edge’s angle would be 45 degree , if three segments it would 30 degree …

I tried to search about how the bevel work to see if I can apply the same thing but without beveling an edge , but i didn’t find about it . :frowning:

any help would be appreciated .

can you add some image about what do you want please?




the first two photos show what happen when you bevel an edge with 2 segments , if I have a face like in the third photo and added an edge to it , I want to achieve the same result (angle) like when I beveled the edge in the first two photos .

thank you in advance .:o

Interesting issue… I will check that

I think you are talking about something similar to “Set flow” in 3ds Max. The difference is only that ‘set flow’ applies to a selected edge. where you want to add an edge and make sure the now divided faces has an angle between them to form a smoother surface.

If I’m understanding it correctly…

If I get it apSubdivide smooth to your 2 short edges (edge selection mode), should be what you are looking for.

Edit:
Almost there: it doesn’t achieve the same angle :frowning:

Yes exactly .

if I give it a smoothness of 3.628 it will give me 45 degree even if I tried it on a face with different lengths :eek:,but it makes the edge stretch :spin:



I will try to search the source code for a formula that use the profile value that result in these angles , will update once i find something. :eyebrowlift:

This is essentially easy on 90 degree angles. First you need to create the edge in the middle. Once you have the edge, you can see that there are 2 faces sharing this edge. And in those 2 faces, there are 1 edge in each face that does not share any vertices with the initial 1 edge.

Let’s focus on those 2 edges. These 2 edges also are the shared edge in 2 pairs of faces. There are total of 4 faces in question, but you can exclude the faces associated with the initial edge.

So now you have the 2 faces of the cube that was originally perpendicular to each other. You can now calculate their normal angle difference. Once know, it’s easy to calculate the X,Y position of the initial edge. Since it’s 90degree, you can just grab a Z position from the original points.

If you want this to work properly on all kinds of geometry, and also work with Subsurface Division, you’ll have to find out how 3DsMax did the math.


you can calc the angle as the image and add the vertex and faces that you want… :smiley:


good idea :),but difficult to be applied on deformed cube .

I opened the source code and found something about ‘Superellipse’ which I think is the formula or calculation that produce the desired angles , unfortunately I have very little experience with code and couldn’t find the exact method or part of code that perform the calculation :(, if anyone can help the code is attached. thanks

bmesh_bevel.zip (37.1 KB)

Okay I think I found a way that will give close enough result :

1 - you have a face or faces that you want to smooth .


2 - cut the face(s) in the middle


3 - sum the angles of the two edges next to the the edge we added earlier ( sum_angle = e1_angle + e2_angle) (expected_angle = sum_angle/2)


see next post .

4 - select the middle edge and create a transform orientation and move it along this orientation with offset = 0.1

[ATTACH=CONFIG]487029[/ATTACH]

5 - take the angle of the edge after the transformation (temp_angle) , now calculate the offset = (expected_angle * 0.1)/temp_angle

6 - revert the edge back to its original position : move it along its orientation with -0.1 offset , then move it with the offset we calculated above .


as you can see it give close result to what bevel with 2 segments with profile of 0.5 would give ( 45 degree angle ) , with iteration of small increments to the offset the edge can reach the expected angle.

I hope someone can implement it into add-on if it proves to be valid .

I’m working in some addon … but steal need more time in order to adjust many issues

Nice , waiting patiently :slight_smile:

almost ready

Very excited to test it , well done ! :yes:

I’m interested to see how it’s done and in what situations it will break. Haha

test it : https://github.com/YHOYO/Blender_tools/blob/master/rebevel.py