Shrink trimmed srf reloaded

 From:  mkdm
7983.11 In reply to 7983.10 
Hi Michael, Karsten and bemfarmer,

Thank you all for your help!!
Thank you very much Karsten for your code!

> The way shrinktrimmedsrf works is that it deletes the input objects and inserts new objects that have been shrunk.
> The original input objects are no longer in the geometry database after the factory has run, that's why you are not getting them selected.

I didn't know this behavior!

> Or did you mean you wanted to select the _output_ objects, not the input objects like you wrote?

Yes, you're right...i meant to say ...the output objects.

Here's my version of the script.

It differs from Karsten's version, only for the code that select the output objects.


I used :

code:
shrunkObj.setProperty("selected", 1);


The .3dm file contains a unjoined solid made by trimmed surfaces.

If you want to make a test, select all the surfaces and run ShrinkTrimmedSrfAutoSel command.

Now i want to write a version of the script that automatically should do the following steps :

1) unjoin all the selected objects
2) do the same job of ShrinkTrimmedSrfAutoSel
3) join back all the selected surfaces

So, if you select some solid that is made by trimmed surfaces, running this command, you will otbtain a shrunked version of the input solids.

At least, i hope to do so....

Nice night!

Marco (mkdm).