.net equivalent of INTERSECT command

Hi,
I'm looking for an equivalent to the INTERSECT command to extract from a model every entity / piece of entity intersecting or included with a Box. (like a box trimming)
How should I do this?

I've tried to look into the function IntersectWith() but it only returns intersection points, and I need the whole entities, trimmed if needed by the box.

I also posted a support request at BOA, but if anyone has an idea i'm interrested.

Best regards

Comments

  • Terry Dotson
    edited June 2022
    Sometimes you need to use GetClosestPointTo to get the best coordinates as opposed to those returned by IntersectWith. You can use Curve.GetSplitCurves() to break objects into several parts at the coordinates. Keep in mind the results are dbObjects that need to be added to the drawing (model) space.
  • I know its not .net but a nice box trimmer is Cookiecutter.lsp it may give you some clues how to approach.