Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A minor error in smoother.cpp isCusp function? #58

Open
JaimeParker opened this issue Apr 26, 2023 · 0 comments
Open

A minor error in smoother.cpp isCusp function? #58

JaimeParker opened this issue Apr 26, 2023 · 0 comments

Comments

@JaimeParker
Copy link

inline bool isCusp(const std::vector<Node3D>& path, int i) {
    // the author 
    bool revim2 = path[i - 2].getPrim() > 3 ;
    bool revim1 = path[i - 1].getPrim() > 3 ;
    bool revi   = path[i].getPrim() > 3 ;
    bool revip1 = path[i + 1].getPrim() > 3 ;
    //  bool revip2 = path[i + 2].getPrim() > 3 ;

    return (revim2 != revim1 || revim1 != revi || revi != revip1);
}

considering change >3 to >=3 to refer a reverse motion, which is called a cusp point?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant