Any Suggestions for Chamfering Sharp Angles

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
chrisb
Veteran
Posts: 54273
Joined: Tue Mar 17, 2015 9:14 am

Re: Any Suggestions for Chamfering Sharp Angles

Post by chrisb »

I was confused by the slightly cumbersome selection and radius change mechanism of the Part fillet.

I made a test with a separate object and found that a chamfer between two edges is automatically extended if the angle is between 174.2705° and 180°. This means that the tesselation above can well be chamfered by simply selecting one segment:
SnipScreenshot-984bcb.png
SnipScreenshot-984bcb.png (9.02 KiB) Viewed 208 times
This should lead to such a chamfered upper "arc":
SnipScreenshot-0866ee.png
SnipScreenshot-0866ee.png (22.27 KiB) Viewed 208 times
Alas, this works only if the fillet radius is below 1mm, because a 1mm fillet would consume all of the adjacent edge, which is not allowed. Here we see it with a 0.9mm fillet, which still works but it gets already near the border.
SnipScreenshot-767cf2.png
SnipScreenshot-767cf2.png (25.8 KiB) Viewed 208 times
Adding the other side of the sharp angle leads to a similar issue. If the fillet radius is above 0.42mm then the fillets from both sides of the sharp edge get in each others way:
SnipScreenshot-c68553.png
SnipScreenshot-c68553.png (16.38 KiB) Viewed 208 times
Filleting with 0.4mm works around the object:
SnipScreenshot-18cf78.png
SnipScreenshot-18cf78.png (19.53 KiB) Viewed 208 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
NilDesperandum
Posts: 27
Joined: Tue Sep 29, 2020 12:26 am

Re: Any Suggestions for Chamfering Sharp Angles

Post by NilDesperandum »

chrisb wrote: Thu Apr 15, 2021 4:01 pm I haven't tested, but I don't think so. You will get closer to being tangent, but not get there. Very often the time invested to fix such models is down the drain and would have been invested better in remodeling things directly in FreeCAD.
I tested some of it, and the corner is still two "straight" lines connecting instead of a curved line and a straight line, and so it might not be fixable by increasing number of points (unless it increases by a lot). One problem is that this object is one of many that is auto-generated from a gds2 file, and so fixing the models by hand is less than desirable.
chrisb wrote: Thu Apr 15, 2021 5:16 pm I was confused by the slightly cumbersome selection and radius change mechanism of the Part fillet.
Thanks for checking the fillet, I have not tried it yet. Straight edges are preferred here as the models deal with etched substrate layers, but having slightly curved edges could still give a good overview of the model. Should there be no solution with chamfer I will try this out.


Is there any way to chamfer just one edge of an object at a time inside of a try-except statement? Something like this pseudo code:

Code: Select all

edges = [1, 2, 3, 4, 5]
chamferObject = FreeCAD.Object("Chamfer") 
try:
	chamferObject.Edges = [edges[0], angle, height]
else:
	Use a small chamfered box to subtract from the failed edge
recompute
for edgeNum in edges[1:]:
	try:
		chamferObject.Edges = chamferObject.Edges + [edgeNum, angle, height]
		recompute
	else:
		Use a small chamfered box to subtract from the failed edge
		recompute
I tried something similar to the code above, but could not get the try-except to work. The statement always ends on the first failed edge (which is at that corner) and then returns the object with just the chamfered edges up until the failed edge.
Post Reply