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

Smooth splines node #2290

Merged
merged 11 commits into from
Oct 24, 2018
Merged

Smooth splines node #2290

merged 11 commits into from
Oct 24, 2018

Conversation

zeffii
Copy link
Collaborator

@zeffii zeffii commented Oct 16, 2018

adds a "filleted polyline" Node. I call it smoothed line

        b  .                                     ..y..
       .        .                          .        . 
      .              .            .                  .
     .                    c                           .
    a                                                ..z..

in individual weight mode you pass a location and weight for all points ( when weights is connected )
in homogeneous weight mode all weights are the value of the slider. (currently not smart)

progress

  • relative mode ( weight is relative to the distance between the a-b b-c
  • absolute mode ( weight is real world value dependant)
  • clamping, automatically constrict values that are not possible in absolute mode
  • cyclic open / closed
  • generate edges
  • drop consecutive doubles (optional, and with epsilon)
  • forgetting other modes...

image

image

@zeffii
Copy link
Collaborator Author

zeffii commented Oct 22, 2018

finding it hard to concentrate on this, but it's a nice distraction anyway

image

undecided about how cyclic mode should work, whether it should

  • auto drop the last vert
  • auto drop the last vert if it is identical to the first vert (within epsilon)

image

@zeffii
Copy link
Collaborator Author

zeffii commented Oct 23, 2018

image
cyclic mode added,

@zeffii
Copy link
Collaborator Author

zeffii commented Oct 23, 2018

i may push this as is without implementing the clamping. clamping will introduce extra processing time per update because each weight/radius would need to be checked against available free "line" to fillet from.

it's not the prettiest node code, but the user doesn't have to know that :)

@zeffii
Copy link
Collaborator Author

zeffii commented Oct 23, 2018

this is the kind of node where you can get desired results if you feed it "non garbage" input, and you might get some interesting / unexpected (but cool) results if you throw exaggerated values at the weight socket

@zeffii zeffii merged commit 458cd31 into master Oct 24, 2018
@zeffii
Copy link
Collaborator Author

zeffii commented Oct 24, 2018

let me know what you lot think.

@Durman
Copy link
Collaborator

Durman commented Oct 24, 2018

For what is attributes socket need?

@zeffii
Copy link
Collaborator Author

zeffii commented Oct 24, 2018

not implemented yet, i could hide it.. but if I don't it's likely i will implement it sooner :)

eventually....

attributes should accept a list(dict), where the dict contains something like

{
0: [weights, mode (for each corner), num_verts per corner, type: closed/open]
1: [weights, mode (for each corner), num_verts per corner, type: closed/open]
...
n: [weights, mode (for each corner), num_verts per corner, type: closed/open]
}

can be passed by execnode mod, i think.

@zeffii
Copy link
Collaborator Author

zeffii commented Oct 25, 2018

maybe I should add a proper fillet too, not just bezier

@zeffii
Copy link
Collaborator Author

zeffii commented Oct 26, 2018

note to self :
image

@zeffii
Copy link
Collaborator Author

zeffii commented Oct 29, 2018

got arcs ! pushed already

image

@zeffii
Copy link
Collaborator Author

zeffii commented Oct 29, 2018

now.. clamping isn't yet implemented, and is also not essential for productive use of this node. so might be a while

@Durman
Copy link
Collaborator

Durman commented Oct 29, 2018

It also can be interesting to have option to prevent to set radius of circle more than distance to closest neighbour point.

2018-10-29_18-05-46

@zeffii
Copy link
Collaborator Author

zeffii commented Oct 29, 2018

yeah, that's "clamping", it will be optional because slightly slower

@zeffii zeffii deleted the smooth_splines_node branch December 12, 2018 13:52
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

Successfully merging this pull request may close these issues.

None yet

2 participants