Extend / Trim Curve CAD Tools for Bezier Splines

inspired by zeffii’s work I’ve tried to adapt the Extend and Trim functions for Bezier Curves.

You may take a look at the limitations before testing:

  • we’re talking about Bezier Spline, not Poly, neither NURBS
  • even if applicable to 2D and 3D Shapes, these functions work within a 2D space
  • all concerned splines must be in the same curve object

Also note that 100% precision can never be achieved, since Bezier Splines themselves are just an approximation of a mathematical paradigm. I hope it will be close enough for most purposes, though.

Extend Tool has two modes, one selected endpoint:


The selected point is extended to the next line in space blocking its way.

Two selected endpoints:


Both splines are projected in space to their meeting point.

For the Trim function, simply select a point on a segment you want to trim:

http://i.imgur.com/r6Byfvq.png

And voilà !

Script is here: extend_trim.zip (6.09 KB)
Happy testing, feel free to comment, contribute
jimflim

4 Likes

Thanks a lot @jimflim,

For your efforts and sharing! I think to it since a long time…
Congratulations.

wow, good job. Make me happy to see some love given to the curves :slight_smile:

Wow this is by far the best addon I’ve seen in recent times. YAY! now I can finally trim extend and fillet curves in Blender too, great for architecture and archiz CAD junkies like me.

Thank you very much for this, a very much needed improvement, has been on the top of my Blender wish list for a very very long time.
I can’t thank you enough, here have a cookie!

http://hotheadburritos.com/data/_uploaded/image/menu/Hot-Head-Burritos-Chocolate-Chip-Cookie.png

I found one small problem with the extend addon, as it doesn’t seem to work well on scaled bezier curves. If you try to use it under a curve object with a scale different from 1 it will give wrong results and vertex appear to be extended in a seemingly random direction.

Trimming seems to be working fine under the same conditions

BigPlus! THX

Can you create a rip curve at point function?
This would be very useful, too!

trim-extend not working on latest Blender version :frowning:

TypeError: ‘NoneType’ object is not iterable

Hey everyone.
Sorry to necro this old post, but though you’d like to know.

@jimflim I hope you don’t mind, I took the liberty to combine both your scripts into a single addon, and update them to run on Blender 2.8+.

1 Like