OK ... I backed way way off on this to use the core version of the weld (not my new code) ... just to keep debugging simple ...
I do a tetgen tet substitution into a dodecahedron and then ... save / load (to pack) and then I try
weld ... which mostly works on simpler things ... and I get ....
All I did here is add erlang:display( ) just before call to weld_error() so that I might see what Erlang and WINGS is imagining to go wrong. And what I get is the case_clause issue shown above.
So then I come back into the code wings_vertex:fold and add some debug like ...
(see extra just in case clause ... match anything)
And I know now that seems like at least VERTEX is not a match at all ... so maybe the iterator things got messed up in the welding code.
I do a tetgen tet substitution into a dodecahedron and then ... save / load (to pack) and then I try
weld ... which mostly works on simpler things ... and I get ....
Code:
1> --------------=---------------------
Using GPU shaders.
1> {'EXIT',{{case_clause,{edge,9288,6122,9683,8173,6462,9684,5128,4379}},[{wings_vertex,fold,7,[{file,"wings_vertex.erl"},{line,
59}]},{wings_face,from_vs_1,4,[{file,"wings_face.erl"},{line,60}]},{wings_collapse,collapse_edge_1,5,[{file,"wings_collapse.erl"
},{line,269}]},{lists,foldl,3,[{file,"lists.erl"},{line,1261}]},{wings_body,try_weld,5,[{file,"wings_body.erl"},{line,981}]},{wi
ngs_body,weld_part_2,6,[{file,"wings_body.erl"},{line,957}]},{wings_body,weld_part,4,[{file,"wings_body.erl"},{line,948}]},{wing
s_body,weld_1,3,[{file,"wings_body.erl"},{line,928}]}]}}
All I did here is add erlang:display( ) just before call to weld_error() so that I might see what Erlang and WINGS is imagining to go wrong. And what I get is the case_clause issue shown above.
So then I come back into the code wings_vertex:fold and add some debug like ...
(see extra just in case clause ... match anything)
Code:
fold(F, Acc0, V, Face, Edge, LastEdge, Etab) ->
Acc = case array:get(Edge, Etab) of
#edge{vs=V,lf=Face,rf=Other,rtpr=NextEdge}=E ->
F(Edge, Face, E, Acc0);
#edge{ve=V,lf=Face,rf=Other,rtsu=NextEdge}=E ->
F(Edge, Face, E, Acc0);
#edge{vs=V,rf=Face,lf=Other,ltsu=NextEdge}=E ->
F(Edge, Face, E, Acc0);
#edge{ve=V,rf=Face,lf=Other,ltpr=NextEdge}=E ->
F(Edge, Face, E, Acc0);
#edge{}=E ->
erlang:display('{vs, ve, lf, rf, ltpr, ltsu, rtpr, rtsu}'),
erlang:display(E),
io:format("V = ~p , Face = ~p , Edge = ~p\n", [ V, Face, Edge ]),
NextEdge = nil,
Other = nill,
wings_u:error_msg("YIKES !")
end,
fold(F, Acc, V, Other, NextEdge, LastEdge, Etab).
And I know now that seems like at least VERTEX is not a match at all ... so maybe the iterator things got messed up in the welding code.