ghpythonlib.components.TrimwithBreps returns empty tuple in Python3

ghpythonlib.components.TrimwithBrep and ghpythonlib.components.TrimwithBreps returns empty tuple in Python3, but works in IronPython2.7.
I guess there’s a bug here?

Rhino version: Version 8 (8.6.24101.05002, 2024-04-10), running on Mac (11.7 KB)

@Petingo_Yang Thanks for testing and sending the example. I am on 8.7 and it is working ok for me. I can see in your script that you are getting result.myattributes and result.myvalues in Python 3 script but printing the result by itself in the python 2 script.

I updated the scripts to match: (18.2 KB)

Would you mind checking this in latest 8.7 RC?

Hi @eirannejad,

Thanks for your inspection. I printed result.myattributes & result.myvalues because printing result will just show the type of it, i.e. ...namedtuple, and myattributes and myvalues were the only attributes in result.__dict__.

I tried to check for updates, but it says my Rhino is the latest version :thinking:.
Anyway if it’s working on your side, it’s probably something wrong with my computer / version. I can just work with IronPython for this part.

I’m more curious if there’s an API in RhinoCommon that performs the same as this component, where it takes some curves and breps as parameters and output the trimmed curves labeled inside/outside?

@Petingo_Yang Does the grasshoppe file that I shared above work on your machine?

tested in 8.6. py3 returns null. ipy works as expected

@adel.albloushi Would you mind testing in 8.7 Release Candidate?

i don’t mind, but is there a way to install it alongside the stable release?

No it overrides the stable install.

alright, i’ll bite the bullet this one time. let’s see what happens

tested, works

1 Like

Thank you @adel.albloushi !

1 Like