Ends -> polyCut = duplicate lines?

   1942   5   1
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Hi!

I'm trying to have each edge of a house roof to become lines (one per edge). When I use ends(unroll) and polyCut to cut at every points, I get duplicate lines.

Any way to fix that? Why would the polycut result in duplicate lines anyways…?

-Olivier

Attachments:
ends_polyCut_duplicate_lines.jpg (175.6 KB)

User Avatar
Member
670 posts
Joined: Sept. 2013
Offline
use convertline node instead of the others.
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Ah! nice. Another node I didn't know about!

…and using a Facet sop with the “unique points” setting is better than the polyCut sop I was using.

Thanks!

-Olivier
User Avatar
Member
670 posts
Joined: Sept. 2013
Offline
Do you create your houses with polyexpand?

Attachments:
house.jpg (27.3 KB)
house.hiplc (85.7 KB)

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Hi Konstantin Magnus!

Very interesting example. Thanks for sharing. That “edgedist” trick is good to know!

I went with simple extrudes on boxes and booleaned the result. In my case, I wanted each roofs to be vertical at the ends and to have a 90 degrees peeks. I managed to make a wrangle that figures out what is the width axis and use that to keep the ends vertical.

// find bbox dimensions
vector max = getbbox_max(0);
vector min = getbbox_min(0);

vector dif = max-min;

// find longest axis length
float biggest = max(dif.x, dif.y, dif.z);

// find what axis is width (X, Y or Z). If 0 -> Z. If 1 -> X.
float axis = 0;

if(dif.z == biggest){
axis = 1; //error: Declaration of variable ‘axis’ shadows a previous declaration at line 11.
}

f@checkTest = axis;



// Use width value
if(axis == 0){
f@width = dif.z/2;
}


if(axis == 1){
f@width = dif.x/2;
}



…I used the resulting @width to drive the extrude distance. That way, no matter how big or small the base is, the peaks are always 90 degrees. I will also use the @width to drive the fuse “snap distance”. …and I learned that I could have simplified the “// find bbox dimensions” by using a “getbbox_size”!

If you want to see the file just tell me. I'll make a cleanup!

-Olivier
User Avatar
Member
670 posts
Joined: Sept. 2013
Offline
olivierth
If you want to see the file just tell me. I'll make a cleanup!

Oh, for me you don´t have to. But in general it´s a good idea to share files, because HIPs oftentimes explain workflows/issues much better than words or screenshots.
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
  • Quick Links