[Sidefx-houdini-list] Group and cap connected lines

David Johnson daveinengland at gmail.com
Tue Sep 24 21:19:39 EDT 2013


I have a feeling that there is something still not 100% right with my
solution. I think there are some polys being created that have no area. But
you could easily find those and delete them. Glad to help.

Dave


On Tue, Sep 24, 2013 at 11:10 AM, Vincent Fortin <vfortin at gmail.com> wrote:

> David, this is absolutely brilliant! Triangulate2d and Group Tansfer make a
> great combo there.
>
> Thanks for looking into it guys, your solutions are always insightful!
>
> cheers :)
>
>
> On Tue, Sep 24, 2013 at 12:48 PM, David Johnson <daveinengland at gmail.com
> >wrote:
>
> > I can't attach a solution, so I put this in the forum, but here's an
> idea.
> >
> >
> >
> http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&p=136320#136320
> >
> > On 9/24/13, Jerry <jerry at axyzfx.com> wrote:
> > > To group you can use the measure sop to measure primitive area. Edges
> > will
> > > have zero area and ploys greater than zero.
> > >
> > >
> > >
> > > On Sep 24, 2013, at 7:02 AM, François Duchesneau <sidefx at trinix.ca>
> > wrote:
> > >
> > > Correct me if I'm wrong but what about point 15 for example where it
> has
> > > only two connected points but should be part of a polygon too?
> > >
> > > David Johnson wrote:
> > >> Make a SOP VOP that uses the neighbor count VOP. Any point that has
> more
> > >> than 2 neighbors gets added to a group. Then you can use the add SOP
> to
> > >> make the polys from there.
> > >>
> > >> Dave
> > >>
> > >>
> > >> On Mon, Sep 23, 2013 at 8:05 PM, François Duchesneau
> > >> <sidefx at trinix.ca>wrote:
> > >>
> > >>
> > >>> Yeah, it's not an easy one. Of course the hardest part is to identify
> > >>> those points but even then you'll have to find an order the proper
> > order
> > >>> to
> > >>> connect them.
> > >>>
> > >>> Maybe you can have a look at a loop based on connected points, that
> > >>> continues to query next connected points until you figure out one of
> > them
> > >>> is reaching back the first point. I'm sure there's a cleaner way
> > though.
> > >>> Must be the kind of trick you can find in a book like "Graphics Gems"
> > or
> > >>> something like that.
> > >>>
> > >>> Who knows, maybe I'll have a better idea after a night of sleep.
> > >>>
> > >>> Good luck.
> > >>>
> > >>>
> > >>> François
> > >>>
> > >>> Vincent Fortin wrote:
> > >>>
> > >>>
> > >>>> Hi François!
> > >>>>
> > >>>> Thanks for the heads up! Here's a pic of the shape whose triangles
> I'm
> > >>>> trying to fill and the hip file if anyone wants to give it a try:
> > >>>> www.vincentfortin.com/share/**shape.gif<
> > http://www.vincentfortin.com/share/shape.gif>
> > >>>> www.vincentfortin.com/share/**cap_this2.hipnc<
> > http://www.vincentfortin.com/share/cap_this2.hipnc>
> > >>>>
> > >>>> One method I've found is to use the Join SOP with "only connected"
> > >>>> turned
> > >>>> on. It works on some of the closed shapes but disconnects others at
> > the
> > >
> > >>>> same time. Not quite reliable.
> > >>>>
> > >>>> You're right, Add SOP is probably the way to go. Only thing I'm
> > missing
> > >>>> is
> > >>>> how to group those closed shapes!
> > >>>> As I said this is no typical geometry, it's multiple poly lines
> merged
> > >>>> together so it's got multiple primitives. Otherwise I'd bet good old
> > >>>> PolyCap would do the work.
> > >>>>
> > >>>> Cheers,
> > >>>> Vincent
> > >>>>
> > >>>>
> > >>>> On Mon, Sep 23, 2013 at 9:30 PM, François Duchesneau <
> > sidefx at trinix.ca
> > >>>>
> > >>>>> wrote:
> > >>>>
> > >>>>
> > >>>>> Hey Vincent,
> > >>>>>
> > >>>>> How are you? You cannot attach a file on the mailing list.
> > >>>>>
> > >>>>> The only thing I can think of regarding creating a polygon
> > procedurally
> > >>>>> out of points is using the Add Sop with the tab "Polygons - By
> > group".
> > >>>>> You'll probably have to figure how to isolate those points and set
> > the
> > >>>>> order of them so the polygon can be created properly.
> > >>>>>
> > >>>>> Hope this helps.
> > >>>>>
> > >>>>> François
> > >>>>>
> > >>>>> Vincent Fortin wrote:
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>> Hi there, I'm sure this is simple to achieve but I can't wrap my
> > head
> > >>>>>> around it!
> > >>>>>>
> > >>>>>> See attached picture...
> > >>>>>>
> > >>>>>> I have 6 lines merged together and I'd like to create polygons in
> > the
> > >>>>>> parts
> > >>>>>> that are "closed".
> > >>>>>> PolyCap doesn't work here as if the method used to create this
> > >>>>>> geometry
> > >>>>>> is
> > >>>>>> incompatible.
> > >>>>>> There are 12 points, 6 primitives, 12 vertices and 6 polygons.
> > >>>>>>
> > >>>>>> So my goal is to use PolyLoft but I still need to group the edges
> > that
> > >>>>>> form
> > >>>>>> the closed shape.
> > >>>>>>
> > >>>>>> Any pointer would be appreciated!
> > >>>>>>
> > >>>>>> Thanks!
> > >>>>>>
> > >>>>>> P/S: sending a very simple scene in attachment.
> > >>>>>>
> > >>>>>> [image: Inline image 1]
> > >>>>>>
> > >>>>>>
> >  ------------------------------****----------------------------**--**
> > >>>>>> ------------
> > >>>>>>
> > >>>>>> ______________________________****_________________
> > >>>>>> Sidefx-houdini-list mailing list
> > >>>>>> Sidefx-houdini-list at sidefx.com
> > >>>>>> https://lists.sidefx.com:443/****mailman/listinfo/sidefx-****
> > >>>>>> houdini-list<
> > https://lists.sidefx.com:443/**mailman/listinfo/sidefx-**houdini-list>
> > >>>>>> <https://lists.**
> > sidefx.com:443/mailman/**listinfo/sidefx-houdini-list<
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list>
> > >>>>> ______________________________****_________________
> > >>>>> Sidefx-houdini-list mailing list
> > >>>>> Sidefx-houdini-list at sidefx.com
> > >>>>> https://lists.sidefx.com:443/****mailman/listinfo/sidefx-****
> > >>>>> houdini-list<
> > https://lists.sidefx.com:443/**mailman/listinfo/sidefx-**houdini-list>
> > >>>>> <https://lists.**
> > sidefx.com:443/mailman/**listinfo/sidefx-houdini-list<
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list>
> > >>>> ______________________________**_________________
> > >>>> Sidefx-houdini-list mailing list
> > >>>> Sidefx-houdini-list at sidefx.com
> > >>>>
> https://lists.sidefx.com:443/**mailman/listinfo/sidefx-**houdini-list
> > <https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list>
> > >>> ______________________________**_________________
> > >>> Sidefx-houdini-list mailing list
> > >>> Sidefx-houdini-list at sidefx.com
> > >>>
> https://lists.sidefx.com:443/**mailman/listinfo/sidefx-**houdini-list<
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list>
> > >> _______________________________________________
> > >> Sidefx-houdini-list mailing list
> > >> Sidefx-houdini-list at sidefx.com
> > >> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > > _______________________________________________
> > > Sidefx-houdini-list mailing list
> > > Sidefx-houdini-list at sidefx.com
> > > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >
> > > _______________________________________________
> > > Sidefx-houdini-list mailing list
> > > Sidefx-houdini-list at sidefx.com
> > > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >
> > _______________________________________________
> > Sidefx-houdini-list mailing list
> > Sidefx-houdini-list at sidefx.com
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> >
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



More information about the Sidefx-houdini-list mailing list