Grasshopper

algorithmic modeling for Rhino

Hi all!

 

Having some problems pointing my surfaces normal in one uniform direction. I'm trying to generate an inner surface for this folded geometry (similar to a 'shell' operation) to eventually be left with separate panels. I'm starting with the intersection  points at each of the surfaces corners. I'm thinking if i can find the  'average' vector direction at each intersection point I can use this to generate the intersection points for the inner surface (or outer)... 

 

 

The problem is once I start to evaluate the surfaces that share each intersection point, their normal's appear to be pointing in different directions.. I have been through many discussions on the forum which have raised similar issues (including flipping curves and surfaces using guides) but having no luck resolving the problem. I have attached a definition showing my approach... Is there another way? can anyone help?

 

Thanks

 

Dean  

 

Views: 10005

Attachments:

Replies to This Discussion

Hi Dean,
Can't you offset on both sides ?
Have you tried mesh offset (might have to write a VB component looking at the mesh classes) ?
Works better than surface offset as it shells everything instead of several solids...
cheers,
Arthur
Hey,

I'm trying to avoid offsetting the surfaces. I only need the face normals so I can perform a vector mass addition at each of the intersections, the one or two faces pointing in the wrong direction are throwing the calc :(
is there a flip vector command ?
vector*-1
Thanks Alpha,

I am asking if there is a flip vector command such as the flip line command as you can also plug as input one line which all the lines will use as guide.

This actualy might just work with vectors using the flip line command have you tried Dean?
There's certainly a reverse vector...? only it doesn't give you a guide input? The Flip conponent will only take a curve or surface not vectors from what I understand.

It could be something to do with controling the orientation of the planes when the surfaces are generated but I'm not 100 percent certain how to control this. It looks as though the flip conponent isn't working because some surface are in a positive x,y orientation whereas other surfaces are in negative x,y orientation which is flipping the z direction? Does this make sense to anyone?
In the flip surface component there is an optionnal guide input, you could just use one curve to guide all the surfaces direction...
Hi Arthur,

I think there is not a direct way .But you can do this:

1.Use these vector info to get curves(Line SDL component,use any point as start point);
2.Use a guid line to flip part of these curves ;
3.Just input these lines into Vector param component ,they will be translated into vectors automatically.

Hope this helps.
Hey Alpha,

Thanks for your input. Unfortunately its still not working. Can you check out the screen grab below and tell me if this is what you had in mind?

Perhaps I need to find a different approach - is there another way of finding the average vector direction of an intersection of curves rather than surfaces?

Here's the screen grab jpeg - not sure how I make the image open in a new window?
Attachments:
Try joining them into a brep. If the surfaces have only 3 or 4 vertices, you can try using meshes (easier to calculate normals, offset, etc).
Actually, even after joining them as a brep in Rhino, in grasshopper the direction is not flipped because it's looking only at the uv orientation. In this case you can use the following code to reverse the U direction when the surface is flipped:


Dim srfl As New list(Of surface)
For i As Integer = 0 To x.Faces.Count - 1
If x.Faces(i).OrientationIsReversed Then
srfl.add(x.Faces(i).Reverse(0))
Else
srfl.add(x.Faces(i))
End If
Next
a = srfl


Plug the brep into the x input . It assumes there are no trimmed surfaces.

But again, since you are using 3 and 4 sided faces, meshes already compute the average normals at the vertices, so it has the work done for you.

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