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?
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.
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)
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.
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?
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?
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?).
This code works only with the stack of breps though could be easily modified to work on the stack of meshes instead.