FilletSrf Multiple

Hi, is there a youtrack / wish that exists for filletsrf to accept multiple picks in the second stage of the command (i.e. from multiple surfaces, to a surface). In the case of for instance some complex geometry that intersects a plane, you would have to run filletsrf on each surface of the complex geometry you want to fillet from, clicking the same “target” or “to” surface for the fillet.

I’ve started making a script but it’s early in its life still but happy to share. there will be those here who would be more capable to do this quickly.

caveat - the tool wouldn’t need to do the trims, just to build a bunch of fillets quickly that I can then chop up, join up, blend between, and then bridge between the two ‘things’.

Example attached - click the surfaces to fillet from, and then the plane which is the constant being filleted to.

exampleFilletSrfMultiple.3dm (413.0 KB)

Here’s my script so far:
FilletSrf Multiple.py (2.4 KB)

filletsrfmultiple (1)

2 Likes
import rhinoscriptsyntax as rs
import scriptcontext as sc

#FILLET SRF MULTIPLE 1.02

def getSurface():
    go = Rhino.Input.Custom.GetObject()
    go.SetCommandPrompt("Select surfaces to fillet from")
    go.GeometryFilter = Rhino.DocObjects.ObjectType.Surface
    go.SubObjectSelect = True
    go.GetMultiple(1,0)
    if go.CommandResult()!= Rhino.Commands.Result.Success:
        return
    
    surfaceSelection = []
    for i in go.Objects():
        surfaceSelection.append(i.Surface().ToNurbsSurface())
        #returns surfaces
    return surfaceSelection

def FilletSrfMultiple(surfaces):
    
    pickedSurfaces = [ rs.coercegeometry(guid) for guid in surfaces ]
    referenceGUID = rs.GetObject("Pick surface to fillet to", filter=8)
    reference = ( rs.coercegeometry( referenceGUID ) ).Surfaces [ 0 ]
    
    radius = rs.GetReal("Enter radius value")
    
    filletSrfArrays = []
    for srf in pickedSurfaces:
        #expected Surface, got Brep
        createFilletSrf = Rhino.Geometry.Surface.CreateRollingBallFillet(srf, reference, radius, 0.01)
        filletSrfArrays.append(createFilletSrf)
    
    for array in filletSrfArrays:
        for srf in array:
            sc.doc.Objects.AddSurface(srf)

surfaces = getSurface()
FilletSrfMultiple(surfaces)

#this tool should have a preview option, enabling a flip to be done there.
# Surface.CreateRollingBallFillet(Surface, Point2d, Surface, Point2d, Double, Double)

#use a pick, bounce the point off the surface pick direction, then pull to the 'reference'

# surfaces_to_fillet( surface, point )
# for srf in surfaces_to_fillet:
#    Rhino.Geometry.Surface.CreateRollingBallFillet(refSurface, refPoint2d, surface, point, Double, Double)

Here is my latest change to the script. Still lacking anything advanced. I got recommended to use the brep version of filletsurface though.

I think it would be really good if you could have the visual like in fillet edge with the ability to change the radius value per surface clicked. And maybe the setting of whether to extend for each.

Is there anybody else that thinks this would be handy? Even if it was just a test command?

filletsrfmultiple2

Today, I added a MultiPickB option to
https://github.com/CADacombs/rhinopython/blob/master/xBrepFaces_createFilletSurface.py

One problem I’m seeing is that the fillets will all be made based on the pick point of the first face. The script may work well on a model like that shown in your videos but not in the .3dm you had provided.
Some solutions will require more clicks and/or picks, thus reducing efficiency.

1 Like

In terms of a user experience (from my perspective), a typical model consists of many individual surfaces on both sides of the edge to be filleted. It makes sense to be able to pick all the adjacent surfaces on one side, then all the adjacent surfaces on the other side… a little like how Solid Tools-Fillet Edge handles it; you can pick the whole edge across multiple adjacent surfaces. But, I don’t always wish to join everything up to be able to quickly test fillets during the modelling process.

Also, the Fillet Surface and Variable Radius Surface Fillet/Blend seem to have slightly differing options. The ‘Extend’ option in Fillet Surface is great as you can end the fillet for each piece and have it continue unbroken into the next fillet. VRSF/B doesn’t have this, but has the (great) ability to make variable fillets! The ‘Extend’ option would be very welcome in the VRSF/B tool!

Thanks

HI @Jonathan_Hutchinson1 Jonathan. This looks like it does what I’m thinking!

I see that you can mutiple pick the first set. Can you do the same if you have more than 1 surface in the 2nd set?

I will test this out

Thanks

Yes there are a few cases of ‘a bit of this’ and ‘a bit of that’ in some of these tools. The classic case of this, is that FilletSrf only does rolling ball. There is the pipe trick of course, but personally I would rather place that fillet in as a surface ans be done with, then join up, than create all that construction geometry and a blend (or draw the fillet arc curve in to boot if you want a constant rad).

I mean, yeah you could have multiples in the second set too. But I’m guessing you would get a lot more stuff that you may not need. Logically I’m not sure how it would work. Maybe show an exampe?

Kinda need to get it working one way first - then we can run! I would have hoped more of the surfacing community would have pitched in here, perhaps.

1 Like

Yes, it is! That’s fine, but when you are using one tool for it’s key strength (eg. variable rad) but you don’t get the control of the other version (extend=no) then it’s a bit of a missed opportunity…

I’ve attached an example file with more than one surface on both sides of the edge to fillet. The first set (green) has 2 surfaces; the second set (cyan) has 2 also. The intersections of each set also don’t coincide!

Hope this helps!

SachFillet workflow.3dm (81.4 KB)

To clarify, this example requires running the command 3 times to make each individual fillet surface.

Better UX, is to pick each set; green then blue, in one run of the command.

It would be nice…because the reason these requests exist is that the workflow of using FilletSrf blows the doors off of FilletEdge. The idea of having to trim and join up a complex model just to run FilletEdge on it–which will inevitably fail at some point on any complex model–is, once you get the hang of things, idiotic. So anything to make FilletSrf quicker to use is a huge help.

2 Likes

Exactly my thoughts! As a direct modeller, it’s nice to (as I would describe) hang fillets are in a way similar to how a designer might sketch with over extended lines and such. Of course you can do fillet edge with trim as no too, but as you say for that to be the case you have to join stuff up too.

I don’t see why they wouldn’t want to improve such a tool. The whole cliche that Rhino isn’t good at filleting is a little tired for me, when you cna plant any geometry in that you like when you adapt your mindset.

Powerful, I like it. I couldn’t agree more, it was a revelation for me.

Ah, I see what you’re saying.

Yep I bet that could be done too. Maybe there would be some strange exceptions. It would be really good for someone more senior or McNeel related to weigh in their thoughts and what can/can’t be done.

@theoutside / @pascal maybe? Does a YouTrack or wish exist already?

It was a relevation yes…the first project I used this on had a bunch of channels and flanges and offsets and draft angles and minimum allover fillets, I’m looking at it wondering what rounds do I do in FilletEdge and what do I “model” up front? It was hard to grasp where to even start. With FilletSrf I just had my main surfaces and started adding in fillet surfaces and it all just fell into place. It was a bit monotonous but far easier and cleaner than how I would have done it previously.

Falling into place is exactly the term. I appreciate fillet edge gives you a result when it fails too, but as you say with FilletSrf you just need some main surfaces and then you drop apparent transitions in.

Would my ‘proposed’ answer achieve that do you think?

Yes, during the exporative phases to sketch out ideas in 3D, you just want to drop on fillets without much commitment…

As you say, when direct modelling/surfacing out ideas, it’s much better to be able to quickly mock-up fillets- the Surface Tools are great for this- I just think they can be somewhat refined/have some feature consolidation for the options, to make them easier to use.

Exactly, make them more useful, and increase their adoption.

All of the conversation here seems useful- I’ve gone thru the bug track items that had been previously filed on this subject and bumped them back onto the dev teams items to look at for v8.

Thanks Kyle. I’m sure we could all dream up some more advanced solutions, but even just a simple FilletSrf command line option for ‘multiple’ could be a good start.

Something more complex/obtuse would be along the lines of being able to go in and edit handles of some of the ‘multiple’ fillets ala FilletEdge. And having the logic of a group of surfaces (fillet from) married to a surface to ‘fillet to’. I think for now it would be good to have just the correct side filleted (at the moment my script can get the filleted side wrong).

agreed, I’ll start sniffing around the appropriate devs and see if I can garner some support- These discussions from users are way more valuable than my input, so keep adding ideas here-

Cool! I’ve just brute forced something, someone with an ounce of python skill will be able to improve it I’m sure!

@Trav may be interested in looking at what you’ve done-