Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change wings_align to use centroid by Vol.

  • Loading branch information...
commit 988438d4f1ef70b92556ef9fe8f3e5cc581355ff 1 parent 2779a51
Dan Gudmundsson dgud authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/wings_align.erl
4 src/wings_align.erl
View
@@ -26,8 +26,8 @@ align(Axis, St) ->
move_to(Center, Cs, Axis, St).
center(_Axis, #st{sel=[]}=St) -> St;
-center(Axis, St) ->
- Cs0 = wings_sel:bounding_boxes(St),
+center(Axis, #st{shapes=Shapes,sel=SelAny}=St) ->
+ Cs0 = [wings_we:centroid(gb_trees:get(WeID, Shapes)) || {WeID,_} <- SelAny ],
CommonCenter = e3d_vec:average(Cs0),
Cs = lists:duplicate(length(Cs0), CommonCenter),
Center = e3d_vec:zero(),
Please sign in to comment.
Something went wrong with that request. Please try again.