Looking to cull points along edge of a subdivided surface

Hey everyone,

I’m working on a project where I’m adding geometry to many subdivided surfaces, and I’m struggling to remove the points along the edges. I’m looking to have only the full subdivision “squares” on the surface, to apply the egg geometry to. I’ve tried using “Point in Brep” after the centroid in my area node, but it didn’t work. Any ideas on efficiently removing points along the surface edges?



3. Attach minimal versions of all the relevant files

Hey Joseph,

Thanks for reminding me!

Files:
cull edge points.3dm (1.9 MB)
cull edge points.gh (11.3 KB)

There are several ways to do this. I measured both distance to the edge and distance to the surface to eliminate points outside the edge on the untrimmed surface.


cull edge points_2024Jan7a.gh (20.5 KB)

You might want to consider alternatives to SubSrf (Isotrim) since UV curves can get wonky, as you can see. Projecting a grid of points, for example, could be more consistent.

P.S. Experimenting with fewer UV points to prevent overlap required an larger ‘Tolerance’ value to prevent missing some points.
cull edge points_2024Jan7b.gh (13.4 KB)

1 Like

also Point In Curve on the XY projected points and boundary curve might work in this particular case

cull edge points_Re.gh (88.5 KB)

2 Likes

This version projects a SqGrid of points onto the surface which, as you can see, results in more evenly spaced points controlled by the ‘PtSep’ slider, independent from UV lines.


cull edge points_2024Jan7c.gh (21.2 KB)

1 Like

Here is a simpler variation of the projected point grid that calculates ‘Ex’ (Extent X) and ‘Ey’ (Extent Y) based on the 'PtSep; slider (blue group).


cull edge points_2024Jan7d.gh (20.0 KB)

1 Like

This takes it one step further… All surfaces are internalized, no need for Rhino file.

The purple group aligns a plane to the surface. Two copies of the surface are included:

  • Srf (original) (as before) and

  • Srf (skewed), which is arbitrarily rotated on two axes.

Switch wires from one to the other to see how it works. Not sure it will adapt to all surfaces, but it tries.


cull edge points_2024Jan7e.gh (161.4 KB)

P.S. Hah :exclamation: The real test - both surfaces at the same time :exclamation: :exclamation: :sunglasses:


cull edge points_2024Jan7eee.gh (165.3 KB) UPDATED to fix flatten error.

I created a test apparatus (teal group) to generate randomly oriented surfaces, Would be better if they were randomly “wavy” instead of flat but that would likely require more code in the teal group than all the rest of the code that does the work.

This was enough to discover some mysterious anomalies and modify code in the white group to overcome them. If you have more wavy test surfaces to test this, I’d like to see them?



cull edge points_2024Jan8a.gh (175.9 KB)

1 Like

Thanks Joseph, these renditions are great!

Actually, I ran into a different issue and was hoping you might have a solution for. I also want to add these geometries (in the same manner) to a few polysurfaces, but the evalsurf is stopping me from doing so.

Any ideas how to get the same result as this script but for a polysurface, mesh, or subd?

3. Attach minimal versions of all the relevant files

Again :exclamation: :man_facepalming:

Thanks for reminding me again! :man_facepalming:

I have three sets of the same geometry here, just trying everything at this point

Files:
new.3dm (7.4 MB)
new.gh (21.7 KB)

The GH file is not connected to the Rhino file. This isn’t fun.

I hacked something together that appears to work with one of the three “stacks” (all the same?), though I haven’t looked closely to see anomalies? Before it would work, I had to “explode” two of the surfaces (breps or meshes) that were welded together in all three cases. Explode (in the ‘Curve Tools (3 tabs)’ toolbar) works on the mesh and brep stacks but not the middle one (SubD?).

toolbar

This code works only with the stack of breps though could be easily modified to work on the stack of meshes instead.



cull edge points_2024Jan8b.gh (41.5 KB)

cull_edges.3dm (4.6 MB)

P.S. Here is a hasty hack (version ‘c’) to work with the stack of meshes.



cull edge points_2024Jan8c.gh (40.6 KB)

1 Like