Rhino trouble with radius

Composite surfaces should not be handled at all if you want your script to be robust . Very tiny internal tangency errors will cause filletsrf to produce a garbage fillet.

Each individual surface within the composite surface should be treated as a standalone surface if you want it to be robust.

If you want to avoid failures, you should be making only one fillet at a time - always.

The problems you are running into would disappear if the algorithm was correctly implemented. There is no need to do anything with singularities. Generally you will find one mew surface that is tangent to both sides. That means end of the line. Occasionally you will find no new surfaces. That’s also a stop. If you understood the topology that results in a singularity you would understand this.

For detecting fillets that reverse direction testing the center curve would be best but testing one edge on the new and old should work as well. But you could just do nothing. The worst that will happen is there will be one extra fillet that the user can delete.

You didn’t understand what I suggested.

If the fillet radius is smaller than 8 mm then all of those fillets would have passed the normal test that I suggested.

Don’t constantly try to blame your errors on me. Look at the example I posted do you see the 2 cyan surface normal lines that I made. Do you understand that if there was only one side that had a new surface with .01 angle deviation then the fillet ends would have been about half as far apart as they are if both sides have .01 deviation? A robust normal test would take that into account.

If the abs tolerance is .0001 then the normal tolerance should be .012/R. If abs_tol is .001 then it would be .12/R. What I suggested before was easy to implement but too complicated for you to understand. So just do what you can understand and once in a blue moon 2 fillets that don’t join will be created

Your script should never make that tiny sliver. If the closest point and normal tolerances are sized correctly and everything else done correctly , it would never happen.

BTW if you zoom in at the point -214,404 you will find a tiny version of the same thing that has a 1mm fillet. At 1mm the .01 tangent discontinuities don’t prevent the fillets from joining.

I don’t know why you think it matters . Filletsrf allows you to make fillets that use surfaces from the same brep or from different breps.

.

I’ve tried to explain why just keeping one of the resulting (multiple) fillets returned from _FilletSrf does not work even when choosing one which is closest to the point pair.

I’ll see how i can detect. Reason why i wrote above that if i get a return of 2 connected fillets (joined), internally they seem to count as a brep with 1 face. I’ve been surprised that this condition was handled by itself, eg. it did not generate coincident new (a,b) points from the mated edge, only the ones which where at the open ends of the fillet.

Nope ! You always get the one(s) which you already had to generate the fillet at the start also at the end. I am filtering this one out, but only if 2 or more where found matching the position and normal of the fillet corner. After this you have indeed the state you imagine but only if no fillet has been found too which is blocking the loop. Up to this state everything is robust. (including singularity cases)

After re-reading i think i did. But sorry, i see something different from what you say. If i set my maximum normal deviation to a tolerance of 0.01 degree, it tries to run over the problematic edges in your example. If it is 0.009 degree, it stops there. I see the same behaviour with a radius of 8 or 100,. also if i use 0.012/R.

What i was trying to say is that with the tolerances you suggest, it would stop looping at edges which are usable from my point of view. See the file of the OP, there is a normal deviation of 0.13 degree i’ve marked in red. Extract the fillet borders and trim, seems to join OK.

Apple Watch_original.3dm (408.2 KB)

No, it is simply far off from real world examples. If you use a document angle tolerance of 0.01 degree and create a G2 blend on some very simple surfaces, the normal deviation is higher than that, actually 0.0338. See and measure the G2 blend in this file:

G2_Blend.3dm (171.4 KB)

LOL, i thought you’ve forgotten to remove a point from the file. Nice.

Because i use all surfaces in the doc atm. If it is limited to the 1 or 2 breps picked for the initial fillet(s), other floating surfaces or breps wouldn`t be part of the search for new candidates.
_
c.

@jim, it’s easier said than done. Try _FilletSrf with 4mm: FilletSrf16.3dm (109.5 KB)

@pascal, is this a bug ? Only happens with that radius, which is the half of the srf width.
_
c.

So far this looks buggy to me… If the radius is not half the width of the surfaces (different number or ExtendSrf) the result is clean…

https://mcneel.myjetbrains.com/youtrack/issue/RH-44714

thanks.

-Pascal

The Rhino code for Composite surfaces is buggy. You should just run split at tangents and avoid them if you don’t want to be tripped up by bugs.

Your response makes it clear you have failed to implement the algorithm correctly. If you don’t comprehend the difference between ‘new’ and ‘old’ you are not going to get this right.

Would it be possible to lock the surfaces that are used to generate the fillet and the fillet itself before running closest_point?
If you did that and then closest_point only returned new surfaces that would guarantee you can’t screw that part up.

Its not a state I imagine. Its a necessary condition to make the process work. Its a very simple process to determine if there are new surfaces at each corner.

Also You don’t need to check for blocking fillets if all your script does is make fillets that are tangent and join end to end. The only thing required is remove from consideration any new surfaces that appear at both corners a and b. You don’t even have to run the normal test ion that surface f you are not planning to make any fillets that are not tangent.

The blue normal lines that you created where the fillet crosses that brep edge have angle deviation of 0. There is no place that I see where the normal test would report a deviation anywhere close to .13 degrees.

The blue line where you have marked with a dot that says “.0132979” is a single normal line. There is no good reason for you to be computing a normal at that point. There is only one surface there. There are no angles to compute from just one normal.

You don’t need to tell me that G2 blends are not anywhere near as accurate as rolling ball fillets. I am well aware of that fact. The accuracy and predictability of rolling ball fillets is what makes it possible to create complex fillet solutions with very simple algorithms.

You would hope that the Rhino developers have already dealt with that. If the bounding box of any brep is not close then one would hope that closest point function does not bother searching the individual surfaces inside that brep.

BTW what are you using for the closest_point tolerance?

If you want to analyze fillet(s), you can offset the 2 surfaces by 4mm in the direction of the center of the fillet and then run intersect command on the offsets. The intersect curve is the center curve of the fillet. It appears that the intersection is screwed up because it lands right on a knot.

You could build the correct single fillet manually by using the isourve of one of the offset surfaces as the center curve.
FilletSrf4mm.3dm (157.4 KB)

Jim there is no need to be insultive with every of your replies.

The search for the “old” surface is required and there because if no new surface is found for that side on the fillet corner and the old surface continues, it is used again. I need 2 things to compare with.

No, did you ever try to lock a subsurface of a brep ? Read above why you cannot lock them.

ClosestPoint does not return multiple surfaces. It returns ONE point and, depending on the method used one brepface, brepedge or brepvertex as i already wrote…

This is getting exhaustive. You would probably implement some on “the fly” joining and analysis.

Please look again, the blue line pointing out is the normal of the cutter, the green line pointing in is the one of the fillet at that corner. If i run GCon it prints:

Tangent difference in degrees = 0.0132979

If you look closer in that second file of my previous post, you’ll see that for every surface a blue normal is created at a fillet corner. Measure between them (blue / blue) then compare with (green / blue) at that point. The blue normals in that second file are only created when the normal angle to the fillet is below tolerance for that surface. I’ve created a red normal (at point a) where it is not. You say that G2 blend normals are not accurate, measure where the blend meets the planar surface, they are 0. Then compare one of the blend normals (the red one at point a) with the rolling ball fillet normal (the green one at point a). GCon reports: Tangent difference in degrees = 0.0338

You may also create a new fillet with _FilletSrf there and compare. It gives the same result.

Tried to investigate what happens: My fillets are created with doc tolerance value of 0.001, most of the time the result is equivalent with the _FilletSrf result (_SelDup). With smaller fillet tolerance, i get slightly better normals and less normal deviation. But: If you look in the last bug report above where _FilletSrf somehow creates 16 surfaces, 5 of them overlapping on the left, those cases are appearing more often. I can prevent them with coarser tolerance which then would give worser normals.

doc unit tolerance (0.001) in my examples.

_
c.

OK Now I understand what angles you are measuring.

You are going to find this insulting but what you are doing there is completely wrong. There is no reason for your script to be creating normals at that location nor is there any reason for it to be comparing those normals. There are no new surfaces at that corner and therefore there is never a need to do a normal check at that corner and you certainly should not be using the results of any normal test at that point to do anything .

Only corners with new surfaces need to be run through the normal check.

I thought you said you were using just exploded surfaces.
My point was you need to do something to prevent doing the normal test (or any test) when there are no new surfaces found at a corner

I guess I don’t really know what functions you are using to find new surfaces at the corners. I just assumed that since most of the time you were correctly finding them you must be doing something right.

That is what is i do, after finding “new” surfaces at that corner. Maybe you misunderstood that.

When there is nothing, no normal test is done. After i’ve created some kind of conceptual script working with single floating surfaces i’ve moved to make it work with all sub-faces of 1 or 2 polysurfaces. If the initial fillet is done using the same subsurfaces of 1 polysurface, only the faces of this polysurface are involved. Otherwise i use the sub-faces of 2 polysurfaces.

I’m searching closest surfaces (or now sub-surfaces of a polysurface) by comparing their minimum distance to a fillet’s corner points (a,b). This involves a closest point search.

Afterwards the found 1-2 surfaces are filtered depending on the normal of the fillet corners, if a search result is not not tangent at the corner, it would not be filletable. This works OK if you look at the videos.
_
c.

I understand that. What I don’t understand is why your file ( Apple Watch_original.3dm) contained surface normals at corners that did not have any new surfaces and why you were asking about those normals.

That would certainly be useful for situations like the original model where you have 2 intersecting breps that you want to connect with fillets.

OK now I think I get it
You have been testing every surface in the document to find the surfaces closest to each corner.

This whole discussion started when I said there needs to be a SDK function that gives you the surface ID of every surface that is within tolerance of a 3d point. You jumped in and said there was such an SDK function, but now it turns out that you are coding that function yourself. It is admirable that you are writing the function, but this would be far easier and more efficient and fast if the SDK provided the function.

Yes the videos you posted above have been impressive.

In that example the loop would only be a closed loop if the cutter is one joined polysurface and the watch is one joined polysurface.

Yes. Now i only need to test the subsurfaces of the 1 or 2 picked polysurfaces.

The brep.ClosestPoint() function i’ve linked in that post can potentially give you 1 brepface back, together with the closest point near your test point (eg. a fillet corner point). But if the closest point falls on an edge, you won’t get all faces connected to this edge. Therefore the search (using a tolerance for the distance).

Thank you.
_
c.

I cannot see a video posted, could you please tell me were it is? Is there a switch in the site settings, that I do not see it?
Thanks!

Hi @steff, i have no idea why this could fail and did not enable a special setting for it on discourse to view videos. If you cannot see one at post 116 and 121 it may be your browser. What do you use ?

_
c.

In a way morally they do. If the bigger dogs bark, there must be something. Well, Rhino has established itself in an amazing selfpromoting way, and that usually only works with good things. We all know, that one can sell shit to the masses, with a big enough amount of words and eyes rolling for a certain time, and that then must come the next hipe is the way these people make a living. But not in this genre. And. Sigh. What I don’t know yet about Rhino might be quite achievedly be the bigger part, GH. Which is from a distant view a hypnotising wealth of possibililies, that pragmatic packages like SolidWorks can only dream of;-)
I must tell you, I do not use SolidWorks in the real world. I am sorry, if I gave you that impression. I had a look into it, when it was still possible, that’s a loong time ago, I never owned it, need’nt. My nephew got a topnotch education, Cornell, Pixar, is German, then with BMW, one time he asked steff, you really was with the first Rhino?..:wink: Tons of people know it by now. So just tell your clients quite agnostical: Buy it, learn it, it’s the hot shit!:wink: Honestly, äh, earnestly, there is one thing one tends to fall into with most software: Going one’ gone paths, and not exploring really all there is. I have had quite some moments with Rhino where I knew: There’s no soft in this world faster getting it. These other progs, they are like houses, I have to enter, and use stairs to get there, you know? And they might offer wonderfully featured compartments, where every special wish will be granted, and if one wasn’t granted this wish beforehand from Rhino, not without having met and tried it at different times of the day, then one might go over to that house, and seek relieve!:wink: Oh fuck, it’s springtime.
Another example: The gumball. There is exactly nothing in Rhino that you can’t do without it, but one had to do it kind of in the air, juggling with a cplane, a scale was always two clicks or so, a helping line drawn so fast, yep, that’s junk, you throw it out afterwards, it’s like juggling, it’s improvising too. With the gumball, it’s manufacturing. It’s an highly methodical approach, that centers my attention in a way, that let’s my dreaming sleep off. I do not use anymore the whole space there is, there are these little Sony fiddling switches. Yeah, well, I overstate. The gumball has advantages. But I wouldn’t need it. The first POVray was without gui. And worked relatively flawless. It’s: Why are you doing something. We all know by now, how, hm, simpleminded the idea is to produce more and more should be the fullfilling. And the you have the industry-designer that gets queer looks, if he isn’t up to what: Speed? The bosses idea of making more money? And his bosses idea, of even deceiving his customers, in order to keep the losses low. Automotive scandals. It’s got to do with Rhino. If it’s the way we go, and if there is anyway only one final destination, Rhino is about to bring ideas on the way.
Not productive maximation. Oh, the oldtimers here still cry, Rhino is faster. Not, if you want to have a car purzel out at the other side of the plant. Of course not without the help of the profaniteers;-) There was a schisma. No, not really. But Michael Gibson created a smaller bunch of functional flowers, his Moment of Inspiration, MOI Of course, you know it. There, it’s even clearer. It’s about ideas. The fucking money does not make my world go round. Surely not.

steff

Thanks, clement. I don’t know, I just oversaw them. The numbers were helpful. Actually, I loved the old usenet groups, and I also have here , I don’t know, ten years or so archived, never had a problem finding stuff and so forth. And in the beginning here, uhh, it was so artifical and strange, but these endless threads have their charme, and the tools are sufficient. I think, efficiency has gone up. And OT a lot down. Said and went.

1 Like

where can i download it?
cant find that plug in for rhino 5 :frowning:

@clement

What happened to the fillet stuff?
The scripting solution was quite promising.
Or did McNeel adopt it?

Just curious…

You cannot buy VSR (Visual Shape Research aka Autodesk Shape Modelling) anymore.

Hi @Charles,

i currently do not have the resources to develop it further but will do once i have more time.
_
c.

Start a crowd fund.:grinning:

1 Like