opMoveCurveBoundary is simply not working right

joshtargo
joshtargo Member Posts: 695 EDU

I have this code which literally makes a point on the curve i want to trim:

image.png

but I get this error:

image.png

Unless … the parameter for the point is more than 0.5.

Debug shows the point is where I think it is, at the base of the arrow.

parameter 0.28:

image.png

Parameter 0.68:

image.png

in addition, helpPoint has absolutely no effect on which side of the curve is removed, nor does flipHeuristics … some of the time.

I am using either one of the endpoints of the curve for helpPoint during testing.

is there any reliable, rational way to simply trim the end off of a curve, which actually behaves the way it should?

Comments

  • GregBrown
    GregBrown Member, Onshape Employees, csevp, pcbaevp Posts: 412 image
    edited September 2025

    Not sure what you've go going in the rest of your code but this https://cad.onshape.com/documents/5584072770c128de9993fa51/w/086ef47d24fc743b535b55de/e/6fad78c66bcee37c2743aad1 is stable. The help point is a bit moot but is included as it does work. The flipper also works…

  • joshtargo
    joshtargo Member Posts: 695 EDU

    @GregBrown, thank you. I rewrote that potion from scratch and now it does work. This is for my EZWire that I've been obsessing over for a few weeks now. Almost 1000 lines of code is big for me. Your "definition.whichPoint" is in there. A different approach from RoutingCurve.

    image.png