Wish: Fillet to automatically inherit properties from input curves

It would be helpful to have a Command line option for ! _Fillet to automatically inherit the same object colour, name and layer as the input curves, in case that both of them share the same properties. Currently, when I make a new fillet curve between two input curves with a custom colour, custom name and placed in a dedicated layer, the output curve requires extra mouse clicks and time to manually apply the desired properties via ! _MatchProperties. When I repeat that process 100 or 200 times per modeling session, it gets really repetitive and adds up a lot of time. :slight_smile: My request is to literally include a Command line option “Match properties” inside “Fillet”.

1 Like

Is the issue that you don’t want the output curves joined or trimmed?
The way it always has worked is that if you have the options join and trim turned on then the result ( joined curves) inherits all the properties of the first input curve you pick.

I want them to stay not joined, because that lets me delete or edit certain elements easier. Also, exporting joined curves of different types (true arcs, lines and freeform curves) leads to errors in some programs for laser cutting. This is why I group the curves together and keep them separate.

I want input curves that have different properties to not affect the newly created fillet. Only two input curves with identical properties should affect the fillet. The existing “Join” option can’t do that.

Would it simplify (at least slightly) if you allow the fillet to Join and pick “Extract Surface” afterwards (instead of doing all the matching stuff)?

At least it would be a “dirty trick” for the programmers to achieve what you asked for (the “Match properties”, without adding much extra code) - just join and Extract Srf and be done with the new option… :wink:

//Rolf

It’s not lovely, but this might help some for now:
! _Fillet _Pause _Pause _-MatchProperties _Pause _Pause _MatchAll _Enter

-Pascal

1 Like

Hi @pascal , thank you for the proposed macro. I just tried it and seems like it requires 5 mouse clicks (4 with the LMB and 1 with the RMB), whereas a basic ! _Fillet followed by ! _MatchProperties requires 6 mouse clicks with the LMB. I noticed that the '_SelLast will not select just the fillet, but also the input curves that were trimmed down by the former, so it’s a bit tricky to use it to automate the process and reduce the amount of mouse clicks.

I modified your macro and was able to reduce the mouse clicks to just 3 with the LMB. However, it acts as two consecutive commands, hence it requires two clicks on the Undo button in case that it’s needed. Not a big deal, just an observation:
! _Fillet _Multipause _SelLast _-MatchProperties _Pause _Pause _MatchAll _Enter _Cancel

The idea is to join only input curves that share the same properties. Also, ! _ExtractSrf is meant to work with polysurfaces only. :slight_smile:

Hi Bobi

For Fillet Trim=Yes, this short Python script seems to work here (on Rhino 6).
It is meant to replace the Fillet command, when you want the new fillet on the curves’ layer.

import rhinoscriptsyntax as rs

def main():
  rs.Command( '_Fillet' )
  cus = rs.LastCreatedObjects()
  fil = rs.FirstObject()
  for  cu in cus:
    if cu != fil:
      lay = rs.ObjectLayer( cu )
      break
  rs.ObjectLayer( fil, lay )
  
main()

HTH, Cheers

Hi @emilio , I still can’t figure out how to run those text scripts. :slight_smile: Trying Tools > PythonScript > Run… opens a pop-up windows asking for an existing *.py file. Any suggestions?

Ah, sure ! :slight_smile:

There are a few ways to run a Python script.

You can copy&paste it into the EditPythonScript IDE. Generally useful to test the script.
( Command: EditPythonScript - Run the script by clicking the green triangle )


Otherwise, to run it from a button there are two ways:

  1. Simple and straight: just past the following text into the button’s Command:
_-RunPythonScript
(
import rhinoscriptsyntax as rs
def main():
  rs.Command( '_Fillet' )
  cus = rs.LastCreatedObjects()
  fil = rs.FirstObject()
  for  cu in cus:
    if cu != fil:
      lay = rs.ObjectLayer( cu )
      break
  rs.ObjectLayer( fil, lay )
main()
)
  1. Preferable IMO if you are going to edit the script later … and/or you like to save it into a file.
    Save the script into a file with a .py extension
    The button’s command now has to be:
_-RunPythonScript THE-FILE-NAME.py

But the folder where you save the file has to be listed here:
( you can add the folders you like )
immagine

To get there:
EditPythonScript command, then from the menu: Tools → Options… → Files

1 Like

Thank you! I will try to follow your tutorial later. :slight_smile:

1 Like