Skip to content

New plugin: wpc_sel_fill#630

Open
elblake wants to merge 1 commit into
dgud:masterfrom
elblake:eb/sel_fill
Open

New plugin: wpc_sel_fill#630
elblake wants to merge 1 commit into
dgud:masterfrom
elblake:eb/sel_fill

Conversation

@elblake
Copy link
Copy Markdown
Collaborator

@elblake elblake commented Dec 28, 2025

Implements new selection tools in the "Fill" and "Grow selection" menu.

  • Smoothing Group: Fills all faces enclosed inside hard edges.

  • Inside Sharp Edges: Fills all faces enclosed inside sharp edges set by the inputted angle.

  • Inside Color Range: Fills all adjacent faces with a color within tolerance of the originally selected faces.

  • Inside Connected Color Edges: Fills all color faces that have continuous color values across edges from one face to another.

  • Inside Unassigned Color: Fills adjacent faces that don't have any color assigned.

  • Inside Unassigned UV: Fills adjacent faces that don't have any UV assigned.

  • Inside Connected UV Edges: Fills adjacent faces that have continuous UV values across edges from one face to another.

  • Same Number of Edges: Fills adjacent faces with the same number of edges, if the original selected face has 6 edges, only adjacent faces with 6 edges are selected.

  • Adjacent Triangles: Only fill adjacent triangles.

  • Adjacent Quads: Only fill adjacent quads.

  • Adjacent NGons: Only fill adjacent faces with more than 4 edges.

wpc_sel_fill

NOTE: Added "Fill" and "Grow selection" commands.

Copy link
Copy Markdown
Owner

@dgud dgud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and useful.

Comment thread plugins_src/commands/wpc_sel_fill.erl Outdated
%% Select the rest of the faces enclosed in sharp edges
wings_sel:update_sel(
fun (Fs0, #we{vp=_Vtab}=We0) ->
Edges = get_sharp_edges(Ang*math:pi()/360.0, We0),
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Edges = get_sharp_edges(Ang*math:pi()/360.0, We0),
Edges = get_sharp_edges(Ang*math:pi()/180.0, We0),

Or was this intentional ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dgud, I think I forgot to multiply pi, I'll make the change.

sel_fill_crease_angle_1(Args, #st{selmode=_Mode}=St0, FillOrGrow) ->
St1=wings_sel_conv:mode(face, St0),
sel_fill_crease_angle_1(Args, St1, FillOrGrow).
get_sharp_edges(Ang_0, #we{fs=Fs0}=We) ->
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NITPICK: Prefer an empty line before new functions

Suggested change
get_sharp_edges(Ang_0, #we{fs=Fs0}=We) ->
get_sharp_edges(Ang_0, #we{fs=Fs0}=We) ->

Implements new selection tools in the "Fill" and "Grow selection" menu.

- Smoothing Group
  Fills all faces enclosed inside hard edges.

- Inside Sharp Edges
  Fills all faces enclosed inside sharp edges set by the inputted angle.

- Inside Color Range
  Fills all adjacent faces with a color within tolerance of the originally
  selected faces.

- Inside Connected Color Edges
  Fills all color faces that have continuous color values across edges
  from one face to another.

- Inside Unassigned Color
  Fills adjacent faces that don't have any color assigned.

- Inside Unassigned UV
  Fills adjacent faces that don't have any UV assigned.

- Inside Connected UV Edges
  Fills adjacent faces that have continuous UV values across edges from one
  face to another.

- Same Number of Edges
  Fills adjacent faces with the same number of edges, if the original
  selected face has 6 edges, only adjacent faces with 6 edges are selected.

- Adjacent Triangles
  Only fill adjacent triangles.

- Adjacent Quads
  Only fill adjacent quads.

- Adjacent NGons
  Only fill adjacent faces with more than 4 edges.

NOTE: Added "Fill" and "Grow selection" commands.
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.

2 participants