Skip to content

Degree increase/reduction should accept parameter times = 0, which does nothing #6

Description

@carlos-adir

At the version v1.0.8, calling degree_increase or degree_decrease raises a ValueError when the parameter times = 0 is given.
It should do nothing in that case.

Steps to reproduce:

from compmec.nurbs import Curve

knotvector = (0, 0, 0, 1, 1, 1)  # degree 2, npts 3
curve = Curve(knotvector)
curve.degree_increase(0)  # Raises ValueError
curve.degree_decrease(0)  # Raises ValueError
curve.degree = 2  # Does nothing since degree is already 2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions