Skip to content

add optional angle radius parameter in curbeBezier curveStep curves #209

@njourdane

Description

@njourdane

Following #177, as suggested in #177 (comment), it could be useful to have a curve similar to curveStep but with smooth angles:

image

An important note is that the curve angle should be identical whatever its length. This way we don't see curves duplication on nodes with many child of various link length:

image

Those curves could be named curbeBezierX and curbeBezierY as suggested in this example.

In fact, I think those curves could be included in curveStep, by adding an extra optional parameter allowing to define the angle radius, which is 0 by default.

This will also allow some customization. This is for instance large angle (ie curveStep(15)) and small angle (ie curveStep(5)) stepCurves, respectively:

image image

Some other visuals to get the idea:

curveStep(10)

image image

curveStepBefore(10)

image image

curveStepAfter(10)

image image

Edit: as pointed out by @Fil, the curve horizontal and vertical distance might be lower than twice the angle radius. In that case the radius remains the same, but angles stops before 90° in order to share the same tangential line. Example with several curves formed with curveStep(20), tangential line in red:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions