GSoC 2016 - Improvements to Bezier Curves

After some playing around, I managed to fix the “infinity extension”.

I think I also fixed the problem with calling the Extend operator out of edit mode.

I am currently working on Trim. I had expected to have it done by today, but I came across the weirdest bug and I still haven’t managed to fix it. Nevertheless, I am confident the trim operator will be fully usable by next weekend.

By the way, I would appreciate if you all could give suggestions on the Extend operator. I had a pretty good one from dphantom which I am thinking of implementing when I have time.

Hi want ask one question.Is it possible to impliment boolean modificator for 2d curves and based on result extrude shape. with option of presicion of boolean operation.

Fresh build up on GA = GSoC-2016-improved_extrusion_Win7.x64-a68c51d

cheers

Thank you tungerz!

A friendly warning for regular users: Whatever you do, DO NOT run the trim operator. It will start a countdown till Blender crashes. I am working on that right now.

Can’t help but… Makes me think of NASA count down… T- 30, 29, 28 :stuck_out_tongue:
No lift off tho (ô¿ô)

Haha too late could help but scavange for new stuff. No crashes for me though, actually it kinda-sorta starts to work.

It doesn’t really trim yet, but it does correctly detect the intersection point of any two curves and places a new vertex where they meet, only it still doesn’t actually trim the curve, it erases the original one and doesn’t yet create the new trimmed segments.

I’m sure you’ll get there. looking forward to this and the bevel operator, those will be the most useful.

GENIO84 superb work until now. Please add rounding corners too :smiley:

genio84 Would it be possible to have an option for curve to have no twist. At the moment, the best option is “minimal”, but it still gives huge twist in some cases.

Edit: solved with Z-up

Would it be possible to get the vertex slide operator available for curves? It would allow to move vertices without modifying the curve shape.

New build is up = GSoC-2016-improved_extrusion_Win7.x64-66c2520

Hell yeah! Curve trimming is finally working, this is very very useful.
Overall this build seems a lot more unstable, lots of crashes while trimming and extended (which worked fine in previous builds), but it is to be expected, as João said he is still fighting bugs and memory leaks.

Only problem I found so far is a small glitch when ‘double trimming’ a vertex. If you successfully trim a certain vertex, and afterwards trim it again, it will jump to the curve’s center or point of origin.

http://www.duarteramos.pt/media/share/GSOC_BezierCurve_Bug6.gif

Other than that its starting to work great, looking forward to that curve beveling :).

Whoa! That took an unexpected turn. I thought I had fixed it all. Clearly I haven’t :wink: I will have a look into trimming. Extending should be working fine though. Could you please elaborate on what is going wrong?

By the way, I have been adding buttons to the interface to call the operators. However, I am not sure if I am placing them in a very appropriate place. Do you have any suggestions on where I should put them?


Nothing in particular about extending that I could point out, I just noticed that it crashed a few times, but could not recreate it reliably.

To be frank I was trying again right now and could not make it crash any more, maybe it was just bad luck the first time.
If I happen to find any reliably reproducible way to make it crash I’ll be sure to let you know.

In the meantime I’ve found another reproducible way that trim fails without the previously mentioned ‘double-trim’ if it helps.

http://www.duarteramos.pt/media/share/GSOC_BezierCurve_Bug7.gif

Button placement seems quite fine to me, that is exactly where I would expect it to be.

I am more of a hotkey user though, I didn’t even notice it in the first place there, in the long run if this ever makes it to trunk I will have to assign some keyboard shortcuts to use them regularly as these will certainly be among my frequent commands.

People who use buttons more often may have a better opinion than me, but it might also be usefull to add an entry in the Curve Specials menu too (W key)

I guess the bugs you saw in the Trim operator were all the result of an unfinished implementation. I cannot reproduce that bug with my version of the code, so I guess that it is fixed.

I have also implemented the offset operator. It turned out quite nice. I am currently trying to connect the offset distance to mouse displacement.

I am currently implementing the Batch Extend operator. Should be done in a couple of hours.

Good to know the bugs were just due to an unfinished build, and looking forward to any new features so I can play around some more!

Batch extend will definitely be very handy; similarly, batch trimming would also a very desirable feature if you have any extra time at the end.

Anyway I am really praying this makes it to an official release some time in the future, very useful features being developed.
Looking forward to that offset and bevel operator too.

New build is up = GSoC-2016-improved_extrusion_Win7.x64-26cdda9

Hum, this sounds really silly, I’m not even sure this makes any sense but remember when I complained that the last build was more unstable, even extend was crashing, but then I could not recreate it reliably?

Well it happened again, then I tried to screen capture it and was no longer capable of recreating it again. It seems like the first time this Blender build runs it always crashes using any of the new operators (weather it is trim/extend/batch extend), but after a few runs (maybe 4 or 5) it starts working as expected. Again just saying it makes me feel stupid, this doesn’t even make sense, but that what seemed to be happening.

This time around, after running fine for a few sessions it started crashing again for any operation (trim/extend/batch extend). I tried capturing an example of batch extend running to post here, but after one successful test run it started crashing every time and I could no longer run any of the operators.

I’ll try again tomorrow after rebooting to see if there’s any change but right now nothing seems to work. Maybe it’s those memory leaks? I don’t know.

Anyway, the only reliably reproducible crash I encountered was when trying to Batch Extend a Poly type curve, or even trying to batch extend a curve where a poly Spline was present in that curve, even if the one selected was not poly type. Batch extend would always fail in that case.

That sound really weird. I admit I was a little careless with the batch extend tool (those bugs you just described were present in the original Extend tool), but I haven’t had a crash for ages. On the other hand, I only open Blender to test the features, run them a few times, and then close it. Working with more complex scenes may have an effect that I am not expecting. Could you please run Blender from the command line with the argument “–debug-memory”? That would give me somewhere to look for bugs.

I have just finished implementing the chamfer operator. The only thing left is to handle keyboard input (the offset operator is also lacking it).

I am also planning on doing a video showcasing the features I have been implementing until now. Once it is done I’ll put it in here.

Ok after further testing I have been getting again very inconsistent behavior.
I deleted last night’s installation, cleared preferences and ran again and it would crash every time, same as before. Always wth very simple files created on the spot for testing purposes, like a simple square or circle, nothing too fancy nor big files.

After running with your –debug-memory argument it started operating again… go figure… It looks like a joke, couldn’t even get a debug log from the command line for you.

Could it be something with the build itself or the build environment, and not with you coding?

Some times the same exact file works fine some times it just crashes for no apparent reason (I copy pasted the objects so thei are exactly the same).

http://www.duarteramos.pt/media/share/GSOC_BezierCurve_Bug8.gif

http://www.duarteramos.pt/media/share/GSOC_BezierCurve_Bug9.gif

http://www.duarteramos.pt/media/share/GSOC_BezierCurve_Bug10.gif

http://www.duarteramos.pt/media/share/GSOC_BezierCurve_Bug11.gif

Anyway, I’ll keep trying and I’ll post any memory debugging if I can get one.

One other thing I found now that it isn’t crashing. It seems that trim some times changes handle types of points elsewhere in the curve.

http://www.duarteramos.pt/media/share/GSOC_BezierCurve_Bug12.gif