Skip to content

Error in show_options, colors are ignored for some reason #315

@jzwar

Description

@jzwar

If colors are set differently for the knots and control points via keyword arguments, these will be ignored if the color c is stated. Here is an example:

import splinepy as sp

# Options
options = {
    "control_points": True,
    "control_point_ids": False,
    "control_mesh_c": "k",  # Will be ignored
    "control_point_r": 20,
    "control_point_c": "k",  # Will be ignored
    "c": (0, 240, 156),  # Uses this instead : why?
    "lighting": "off",
}

deformation_function = sp.BSpline(
    degrees=[2, 1],
    knot_vectors=[[0, 0, 0, 0.5, 1, 1, 1], [0, 0, 1, 1]],
    control_points=[
        [0.0, 0.0],
        [0.5, 0.2],
        [1.0, 0.],
        [1.5, 0.2],
        [0.0, 1.0],
        [0.5, 1.2],
        [1.0, 1.0],
        [1.5, 1.2],

    ]
)
deformation_function.show(**options)

Results in:
image

Metadata

Metadata

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions