Filleting Tangent Surfaces

Thanks so much Jim, I got it working!

Hello bobi, please help me, I can’t get it to work. Rhino say: Selnone unknown

Hi José -

To run English commands in a localized version of Rhino, you will need to prefix all commands with an underscore - e.g. _SelNone.
-wim

Hello Wim, thank you, now is correct?

image

Hi José -

It’s only correct if it works (:

I see you removed the hyphen in front of the SelName command. Doing that will make a dialog box appear, which is something that you don’t want to happen in macros. You’ll need to use _-SelName to prevent the dialog box. Pause and Delete are also commands that are in English.

Also, “my directory FilsrfEX.py” is unlikely to work. As jim wrote, you’ll have to put that script in the correct folder or use the entire path.
-wim

“my directory” was only a example hehe. Now say this:

it is necesary place in internal folder rhino?

Now yes it work!

Was problem of that directory, I placed it in folder scripts on rhino and works! Thank you wim.

sorry Wim, I have another question, ¿how can I change the radius? by default is 1.
@Rhino_Bulgaria @jim

Before picking the first surface, type a new radius on the command line.
-wim

Having a problem to run the script in V8 (8.3.23360.13001, 2023-12-26):

invalid syntax (Error CPYC01) file:///T:/Rhino etc/Filsrf_crvs2.py:[55:1]

And couldn’t find out what CPYC01 means.
I need a hint…

How are you running the script? Are you using RunPythonScript or are you running it out of the Rhino Python Editor?

I have never seen a “invalid syntax” message. The message implies the error is at the first character of line 55. When I intentionally create invalid syntax at that spot in the script I get this error message:

File "Filsrf_crvs2x.py", line 55
    ?f forward and (npts[0].DistanceTo(firstptA)< tol) and (npts[1].DistanceTo(firstptB)< tol): print "closed loop"; return 0  # loop completed
    ^
SyntaxError: unexpected token '?'

I assume since its an error in syntax the error pops up immediately any time you try to run that script?

Tried both ways.

In the meantime, I thought it could be a codepage problem (Error CP…).
But the file looks as it should even in Notepad.

Also I tried with FilsrfEX.py.
FilsrfEX.py (40.1 KB)

Same error in the same line 55.


Don’t know how to proceed now.

Just guessing …

Maybe a locale/encoding problem ?

What about starting the script by this line ?

# -*- coding: utf-8 -*-

:neutral_face:

Have you tried running the scripts in Rhino7 or Rhino8.2?
They run For me on those versions. I can’t test on ver 8.3.
I had Ver. 8.3 installed but due to another bug with filletsrf I uninstalled and went back to ver. 8.2

Yes they run w/o issues.

No, I run the most recent RC and can’t go back.


Seems it has to do with V8 SR3 RC.
Perhaps please @pascal could check?

Hi Charles - in Python 3 (V8’s Python) print statements need to be enclosed in parentheses.

print ("closed loop")

heh - the bad news is how many print statements are in that file.

-Pascal

Do you want to run this script as a python 3 script?

I’m pretty sure you can run it as a IronPython 2.7 script in Rhino8 if that is what you want.

If you want to modify the script to run on python 3 changing the print statements shouldn’t be that big a deal. I personally can see no advantage in doing that. The print statements are purely informational - they could all be deleted and the geometry would still be created or not created (you just would have no clue why not).

If you want to modify the Python 2.7 code in Rhino8 you can use the EditPythonScript command to bring up the editor that will do that. From what I have seen (which is not that much) the new script editor is not as good as the one you get when you run EditPythonScript.

The rather cryptic error message you got with Python 3 is just one example of how the old script editor is better. The old script editor tells you where and what the error is - the new one does not.

No, I only want to run it, I’m not interested in a certain Python version :wink:

Aha!
I was not aware of the difference.

Your scripts do run now for me when started from the EditPythonScript editor.
Many thanks for your help!

I just wanted to say that this is amazing! Thanks for sharing. I usually spend a lot of time doing these operations by “hand”.

Hi @jim

Thanks so much for this script! I’d like to request/suggest a couple options (or alternative versions) that I don’t think anyone’s asked for yet – and apologies, because while I’m capable of some scripting, I don’t know how big a thing I’m asking here :upside_down_face:

  1. AutoJoin - The resulting Fillet/FilletCrv automatically trims the original srfs, and Joins. (with option to DeleteFilletCrvs)

  2. Set Max/Min radii so, for instance, a Minimum Radius could keep edges from terminating in a singularity.

Again, such a great script, and hopes these suggestions are helpful.

-Alan