Jump to content


EDIT: A way to merge coincident line primitives


  • Please log in to reply
4 replies to this topic

#1 hyperforce

hyperforce

    Peon

  • Members
  • Pip
  • 34 posts
  • Joined: 07-November 10
  • Location:Heeze, Netherlands
  • Name:Erwin Heyms

Posted 06 April 2012 - 07:06 AM

I'm creating a grid of lines that interconnect based on a grid. However, at certain points there are lines that have 2 or more primitives stacked on top of one another. I need to solve this.

Is there a way to merge these primitives, or clean them up somehow?


EDIT:

I found a way, see my second post

Attached Thumbnails

  • coincidentLines.jpg

Edited by hyperforce, 07 April 2012 - 06:54 AM.

My Procedural FPS level generator:
http://forums.odforc...vel-generation/

Email: erwinheyms@gmail.com

#2 zarti

zarti

    Illusionist

  • Members
  • PipPipPip
  • 304 posts
  • Joined: 21-February 10
  • Location:39th parallel
  • Name:CTRL-C CTRL-V

Posted 06 April 2012 - 12:48 PM

hi ,

the situation pictured up here looks a bit 'unusual' to me . two points , defining two prims ( !! )

i dont know how the network resulted in that situation , but if you could upload a small part of that geometry .. that could help here into trying to resolve your problem .


.cheers
keep walking .

#3 hyperforce

hyperforce

    Peon

  • Members
  • Pip
  • 34 posts
  • Joined: 07-November 10
  • Location:Heeze, Netherlands
  • Name:Erwin Heyms

Posted 07 April 2012 - 05:41 AM

With some help from Kim Goossens and some trail and error I found a way.

- I basically separate each segment of the line and store their center location and the segments normal direction as attributes.

- I then run those through a partition sop so it groups together line segments that occupy the same space and have the same normal direction.

- Then use a foreach node per group and remove all but primitive 0 from each group.

- All thats left then is to Fuse and clean up the groups and attributes.

An example and the OTL are included in the attachment.

Attached Thumbnails

  • coincidentLines2.jpg

Attached Files


Edited by hyperforce, 08 April 2012 - 04:57 AM.

My Procedural FPS level generator:
http://forums.odforc...vel-generation/

Email: erwinheyms@gmail.com

#4 dennis.weil

dennis.weil

    Peon

  • Members
  • Pip
  • 87 posts
  • Joined: 11-May 11
  • Location:Wiesbaden, Germany
  • Name:Dennis Weil

Posted 20 April 2012 - 03:18 AM

Nice that you found your own solution.
A built in solution would have been the Clean SOP which can do exactly that and is a lot faster.

-dennis

#5 dennis.weil

dennis.weil

    Peon

  • Members
  • Pip
  • 87 posts
  • Joined: 11-May 11
  • Location:Wiesbaden, Germany
  • Name:Dennis Weil

Posted 20 April 2012 - 03:21 AM

Forgot the file.

Attached Files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users