From BlenderWiki

Jump to: navigation, search

All reports of my work will eventually find their way to this page.

Final reports

All the code that I have written currently lives on this branch. You can test all the features I implemented in the GraphicAll build (Windows,Mac).

I wrote some notes about curves in Blender's source code here.

For git statistics, check my page at MiikahWeb

For a general overview over each tool, check the final report page. For the code documentation, check the code docs page.

I managed to implement the following

  1. Improved curve extrusion.
  2. Extend tool
  3. Batch extend tool
  4. Trim tool
  5. Offset tool
  6. Chamfer tool
  7. Fillet tool

The objectives I didn't manage to attain were

  • Uniform UV calculation
  • Multiple material slots
  • Batch Trim (bonus, requested by a user)

though I intend to implement these after the end of GSoC. There are some ToDo's left, for the operators I implemented, but no showstoppers. These can all be consulted on the code docs page.

I did some experimentation on Uniform UV calculation, though I reached nowhere. For future reference, and following advice from my mentor, the code is in here.


Next steps

  1. Finish the implementation of the Trim tool (bugs, unwanted behaviour and memory leaks)
  2. Implement the "Batch Extend" tool
  3. Bezier curve offset
  4. Bezier curve fillet
  5. Uniform UV calculations

The story so far

I am currently searching for users who are willing to work with me (in testing and giving feedback). I am also going through Blender's code.

I have finished implementing the "Extend curve" feature. Some details on the implementation can be found here:

Some users at BA have been giving suggestions. For future reference, I have collected them here

You can see my midterm report (with pictures :-) ) here:


All the curve editing tools are implemented! I just concluded the fillet tool.

However, there are a few things I would like to have done but I couldn't. I am listing them here for when I have time or in case someone knows how to do them and gives me a few hints.

  • Handle keyboard input for the offset, fillet and chamfer operators.
  • Copy the behavior when using the rotate tool for when selecting the chamfer angle (with behavior I mean that dotted line and handle that appear, and also the angle being specified by the rotation of the mouse).
  • Make the chamfer and fillet operator the same, with an option that allows the user to pick which one he is interested in.


I have concluded the offset operator.

Ideally, I would have wanted the offset distance specified by mouse movement, but I haven't been able to get that working. I am leaving prototypes for invoke and modal functions in my code, in case I figure out how to get it working some day.

On to the Fillet and Chamfer operators!


I am almost finished with the Trim operator.

I started thinking on how to implement an operator a user suggested me. The idea is very simple. Currently, the Extend Operator only works with either one or two selected vertices. If one vertex is selected, it extends it to the nearest intersection. If two are selected, then it intersects them both. The idea would be to duplicate the behavior with one vertex selected to arbitrarily many vertices selected. This would simplify a lot tasks as the one seen on this gif

24 June

This week I kept working on the Trim tool. I am currently implementing some helper functions.

I have also received some feedback regarding the features I have implemented until now. The Improved Extrusion is working pretty well, but the Extend tool has some serious bugs.

To address some of the Extend bugs, I decided to modify the Extend tool to only work with 2D curves. I will discuss with my mentor the possibility of leaving the 3D extend tool for bonus goals.


I have completed the implementation of the Extend operator. Only a few bugs are left, and then I will release a build for users to test it and give feedback.


This week:

  • I finished my "Improved Extrusion" patch, which was one of the deliverables from my proposal. I submitted it to Differential [1] in order to receive some feedback. After some modifications, I realized that the implementation has some flaws. I will move away from it for a while to clear my ideas and then get back to it.
  • I started to implement the "Extend" tool. I am documenting my progress in [2]. That page is written in a stream-of-consciousness Virginia Wolf style, more like a blog entry, which I am not sure is very appropriate for a wiki.
  • As part of the "Extend" tool implementation, I have been reading a lot of Blender curves' source code, trying to understand it, and trying to determine the connection between bpy and the C code.

For the next week I am planning to

  • Continue (and possibly finish) the implementation of the "Extend" tool.
  • Collect the ideas users have been giving on BA and place them on my wiki page.
  • Put a definite end to the "Improved Extrusion" patch, and start a discussion with the community regarding its interface.


Today I finally concluded the "Improved extrusion" patch. Now it also works with non-zero bevel. The new patch is submitted for revision at differential. It can be found here

Also, I have submitted a branch to Blender's git repository. The branch can be found here

Sleep deprivation does wonders! I just realized I named my branch under the feature I am currently working in. Some developers are probably scratching their head as to why commit privileges are being wasted on me :)

Over the next weeks (until the mid-term evaluation) I will be focusing on the trim, extend, intersect, fillet, chamfer and offset functionality, not necessarily by this order.

There are already some add-ons that cover some of those.

For trim, extend and intersect, user jimflim at BA created two python scripts which can be found at

For fillet and offset there already exist some commercial add-ons

On a first phase I will try to mimic the exact same behavior of these add-ons in Blender's source code. Then I shall proceed with bug fixing and further extensions.


I spent my last week participating at Intel ISEF. Due to having forgotten a socket adapter, I wasn't able to work on GSoC.

Since the beginning of GSoC I have been collaborating closely with the writer of the original Bezier curves improvements proposal, Duarte Ramos.

I am currently trying to get the Improved Extrusion patch working with non-zero bevel. It is being harder than I thought, and currently is involving a lot of guessing. I hope to have it all sorted out by the weekend.


This week I have been preparing my trip to Intel ISEF, so I have nothing new to report (code related).

Following a suggestion from my mentor, I have been going through the bug tracker, trying to find curve related bugs, and checking them.


I proposed to implement 4 features:

  • Multiple material slots. The user would be able to assign materials to the edges of the curve, and when making a shell using, for example, the screw modifier these would be inherited by the resulting mesh.
  • Improve curve editing tools by adding trim, extend, intersect, fillet, chamfer and offset functionality.
  • Improved curve extrude functionality (an example can already be seen in my patch
  • Add an option for uniform UV calculation (that is, no stretching on longer segments and shrinking on shorter ones)

The improved extrude functionality is almost complete. My biggest concerns with it are to maintain backwards compatibility and avoid making the interface too heavy with new options. I believe the process could be sped up if more developers participated in the discussion of my patch (currently only Campbell Barton is participating). I think I will make an announcement in the usual channels of communication, and see what happens.

There has already been some work done on the "trim, extend, intersect, fillet, chamfer and offset" functionality by other developers before this project. Some add-ons can be found searching the web. Those add-ons are a good starting point for this part of the project. I will make a more detailed update on them later.

The remaining two functionalities are more complex, and I am planning on leaving aside until I am more familiar with the Blender code base.

For the multiple material slots, I need to study how materials are handled by Blender, and think of how I could make the bevel object inherit the materials assigned to the curve.

For the uniform UV calculations, it should be pretty straightforward once I find the code responsible for the calculation of UV coordinates.