I make four box with code
box a
box b
box c
box d
then i transform them to components
I want to trim a and c with a ,then trim b and c with d
so I try code like this
a.trim(b)
a.trim(c)
d.trim(b)
d.trim(c)
but when “a.trim(b)” and “a.trim(c)” finished, “d.trim(b)” and “d.trim(c)” failed。
I guess that after “a.trim(b)” and “a.trim(c)”,component b has been changed uid
So the question is ,how can i solve it
I think the API documentation is misleading or at best confusing. When you do a.trim(b), it is b that is modified, not a. The method should perhaps read “tell a to trim b”. That corresponds to the selection order in the GUI solid tools trim. When b is trimmed, the original is erased and a new group is created. If the method succeeded, that new group is returned. If you wanted to then trim (the modified) b using d, you need to use that new return instead of the original b.