• Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Social Media
    •   @Wings3dOfficial
    •   @Wings3dOfficial
    •   Wings3dOfficial
    •   Wings3dOfficial
  • Register
  • Login
  • Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Register
  • Login
Wings 3D Development Forum Wings 3D ManifoldLab Plug-ins Collection v
« Previous 1 2 3 4 5 … 7 Next »
The Connect surface tool by Dimitri.

 
  • 1 Vote(s) - 1 Average
The Connect surface tool by Dimitri.

ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#26
03-23-2016, 12:22 PM (This post was last modified: 03-23-2016, 02:39 PM by ggaliens.)
Code:
%% Connect vertices (which must share a face).
connect(Vs, #we{}=We) when not(is_list(Vs)) ->
    connect(gb_sets:to_list(Vs),We);
connect([], #we{}=We) -> We;
connect(Vs, #we{}=We) when is_list(Vs) ->
    Fs = wings_face:from_vs(Vs, We),
    connect(Fs,Vs,We).
%% connect verts on all faces as possible
connect([],_,          #we{}=We) -> We;
connect([Fi|FsMore],Vs,#we{}=We) when is_list(Vs) ->
    VsFace = wings_face:to_vertices([Fi],We),
    case I = gb_sets:intersection(gb_sets:from_list(VsFace),gb_sets:from_list(Vs)) of
        [_,_|_]=I ->
            We2 = connect(Fi,I,We),
            connect(FsMore,Vs,We2);
        _ -> connect(FsMore,Vs,We)
    end;
    
connect(_Face, [_], We) -> We;
connect(Face, Vs, #we{} = We0) ->
    case polygon_pairs(Face, Vs, We0) of
      no -> min_distance_pairs(Face, Vs, We0);
      #we{} = We -> We
    end.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Messages In This Thread
The Connect surface tool by Dimitri. - by ggaliens - 02-01-2016, 02:55 AM
RE: The Connect surface tool by Dimitri. - by Dimitri - 02-01-2016, 02:28 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 02-01-2016, 04:07 PM
RE: The Connect surface tool by Dimitri. - by Dimitri - 02-01-2016, 09:02 PM
RE: The Connect surface tool by Dimitri. - by Dimitri - 02-07-2016, 01:12 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 02-07-2016, 01:49 PM
RE: The Connect surface tool by Dimitri. - by Dimitri - 02-07-2016, 04:37 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 02-07-2016, 06:25 PM
RE: The Connect surface tool by Dimitri. - by Dimitri - 02-07-2016, 08:39 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 02-08-2016, 04:48 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 03-12-2016, 03:03 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 03-13-2016, 02:44 AM
RE: The Connect surface tool by Dimitri. - by Dimitri - 03-13-2016, 03:55 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 03-14-2016, 02:21 PM
RE: The Connect surface tool by Dimitri. - by Dimitri - 03-15-2016, 05:05 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 03-15-2016, 11:50 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 03-16-2016, 03:42 AM
RE: The Connect surface tool by Dimitri. - by ggaliens - 03-17-2016, 04:23 AM
RE: The Connect surface tool by Dimitri. - by ggaliens - 03-17-2016, 09:04 PM
RE: The Connect surface tool by Dimitri. - by dgud - 03-20-2016, 03:43 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 03-20-2016, 06:42 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 03-20-2016, 11:59 PM
RE: The Connect surface tool by Dimitri. - by dgud - 03-21-2016, 03:39 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 03-21-2016, 05:20 PM
RE: The Connect surface tool by Dimitri. - by dgud - 03-22-2016, 07:37 AM
RE: The Connect surface tool by Dimitri. - by ggaliens - 03-23-2016, 12:22 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 03-23-2016, 02:38 PM
RE: The Connect surface tool by Dimitri. - by Dimitri - 03-27-2016, 06:08 PM
A few more changes to support polygon connects ... - by ggaliens - 04-04-2016, 03:38 PM
RE: The Connect surface tool by Dimitri. - by Dimitri - 04-07-2016, 04:26 PM
RE: The Connect surface tool by Dimitri. - by dgud - 04-08-2016, 09:50 AM
RE: The Connect surface tool by Dimitri. - by Dimitri - 04-08-2016, 01:19 PM
RE: The Connect surface tool by Dimitri. - by ggaliens - 04-08-2016, 01:53 PM

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode