Split polycurve with another polycurve

Hi everyone, I’m working on a topography script to be able to make sub-regions with earthworks, etc.
I’m getting stuck on one step: after making my earthwork (see screenshot), I import the curves of the sub-regions from a DWG (ok). I manage to have the surface (and polycurve) of my topography which is impacted by my earthwork and the curves which compose the various sub-regions but I do not know how to modify the curves of the sub-regions compared to the curves of my earthwork.
In resume, I would like to have the red and blue curves to create sub-regions around the earthworks.

I hope someone can help me

image


It would probably be easier to convert the polycurves to surfaces and trim the surfaces.

I agree with you but when I try to create surfaces with the curves, I don’t obtain the result :

The surfaces created are out the polycurves

You could try grouping the curves after you’ve trimmed all of them. Do you have duplicate lines for the overlaps though? You’ll have to have enough curves for each group before you even worry about trimming.

I finally found a way to obtain the surfaces of the subregions. But now, the problem is to trim/split the surfaces with the earthworks surface (polysurface from mesh)
For each surface to split I have :

  • Perimeter points
  • Curves
  • Surface

And for the subregion from the earthwork I have :

  • Mesh from the topography element
  • Curves but not on the good right order so when I try to split with the polycurve made byt Polycurve.ByJoinedCurves, I have the messaye “error : Polycurve may be branching”

This is where Group Curves usually comes into play. You should be able to find it in the package manager. You can also convert to solids and difference the solid geometries.

Thanks, it works !
I also try to split the surfaces with a solid created by topography mesh extrusion and it works too.