Grasshopper

algorithmic modeling for Rhino

Just a simple question .... if I have a surface and I have many points on it..... how can I keep only the points inside the surface and remove the ones close to the border ?

For example ... if I want to make some holes on the surface .... I just need to create some circles but only inside the surface .. because I don't want to cut out the edge of the surface.

Any Idea ?

Thanks 

Views: 3243

Replies to This Discussion

Hello,

Here's how I would do it.

could you please just send me the same pictures but with the name of the modules ? 

I'm quite new and I don't know the icons :D

thanks

Sure, here it goes.

I give you the definition as well. Just replace the internalized points and surface with your own!

Attachments:

Hi FRiou, here's a little hack: to get the edge loop of an untrimmed surface you can just treat it as if it were a curve :) :

I did it ...and it work pretty well .... but ... silly question !! 

If I highlight the Cull module I have the external point which i want to remove ... how can I have the inside points ? ..

Attached you can see the picture

Attachments:

You need to connect the L input of Cull Pattern to the P output of the SDivide (with flatten), not the Crv CP.

I solved in another way ... subtracting the point list with the point culled .. and It work :)

That sounds like what I did using sets.  Our methods are very similar, though it appears to me that FRiou's code might be returning points with "clearance" that are outside the surface as well as inside?

P.S.  MAJOR (faulty?) assumption in my code, using 'Project' Z... perhaps skip that component?  But that was also selecting the points that were actually on the surface...

Attachments:

Here's another way - limited to rectangular surfaces:

Attachments:

Here's a better one that works with a variety of shapes:

Note that I set all my random points at Z=-1 and used 'Project' to make sure I get the points on the surface.

Attachments:

This one removes the faulty 'Project' assumption.  It has a two step filter to eliminate random points off the surface:

  1. Step 1 selects points very close to being on the surface; using 'Surface Closest Point (SrfCP)', only points where 'D<0.001' are passed along to step two.
  2. Step 2 selects points using 'Curve Closest Point (CrvCP)', finding points where D<'edge gap' and subtracting them from the set of points that passed step one, leaving the circled points.

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service