Script: Split Surfaces at their intersections?

Is there a splitting script to split at the intersection on to surfaces.

So the script would work like this:

  1. selecting 2 or 3 surfaces
  2. generating intersection lines that extend it over the edges of all surface to make splitting possible
  3. split surface
  4. delete the intersection line

would help me a lot in my complicated foam subtraction process of my wooden frame. So I get rid of the thickness of the foam thickness that will be added on top. Thank you!

Will attach a picture of my Cozy Chair which was created in the same process unless this sofa is a bit more complicated.

Thank you so much for your help!
Hannes

Hi Hannes - if a volume is enclosed by all the planes, CreateSolid ought to help.

-Pascal

1 Like

Sounds like the CutPlane command.

1 Like

I’m working very free as surface offset is resulting in kind of messy results as CreateSolid seems sometimes buggy as well I probably need this rather manual “sculpting” approach. Let’s see. Thank you @pascal

@Rickson cut plane is interesting but I need a way to autogenerate intersections and split crossing surfaces along these.

@pascal it’s like a command “Split/Trim Surfaces” so you just split or trim 2 or many surfaces as in the trim command but the intersection will virtually extent so the trim command wouldn’t break with bigger surfaces that would not intersect fully. Just an updated, extended Trim/Split command.

http://recordit.co/epFwum09Bf

Found out it will trim both surface if intersection is created even the intersection line is as long as the previous not working bigger surface.

http://recordit.co/PrKiRIXlW2

This solution is a big time saver! Thank you for always being there. Hannes

you could script IntersectTwoSets then create a CutPlane from the results.

@Rickson I probably don’t understand your solution. The upper solution works quickly but ‘Trim’ only.
So would be great to have this also working with split as I have to go Ghosted View if invisible portions shall be trimmed :frowning:

http://recordit.co/lQ7MjfW3qo

@hannesgrebin - this is a hack that may do what you want… give it a try and I’ll try to make more properly tomorrow.

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

IntersplitPlanes.py (1.8 KB)

-Pascal

1 Like

@pascal holy!
this is impressive. But currently fires continuously so can’t escape the script running once fired on 3 planes for testing. Also pops up an error dialog at starting to split. Thank you!!!

image

Hm - ok, I’ll take another look - it seemed to behave ok last night…

I cannot get it to do what you’re describing - it seems clunky and slow but it does not do anything wrong so far - can you send an example?

-Pascal

@pascal, no this script is creating a long intersection line and seems to run infinitely. So my approach above to just create an intersecton and then trim the parts you need to get rid off works fine (split doesnt work on the bigger surface with a smaller intersection line resulting at the intersection with the smaller surface)