Grasshopper

algorithmic modeling for Rhino

Hi. I have been playing around with a simple definition from another thread on morphing planar curves/patterns on to a surface. In this definition the planar pattern has to be placed in the XY plane, if they are not the morphed surface is wrong. I have been trying a bit with changing the u,v intervals. The XForm.Surfmorph has i w mapping input, but i am not sure how to get this?
I don't think that I completely understands what is going on with the bounding box....

Best regards Rasmus

Views: 30847

Attachments:

Replies to This Discussion

The w input is to specify an extrusion height when you are dealing with 3d components. It would translate the bounding box of your source objects to the height interval you specify in 'w'. For a 2d pattern, just use a default 0-1 interval and you should be fine.

And yes, the problem indeed is with patterns that are not in x-y. The surface morph basically takes the cartesian space coordinates (XYZ) of a geometry and transposes them into surface space coordinates(UVW). To work around this, you would have to avoid using the bounding box of the source object. Let me see if I can cook something up quickly.
Here it is.. this one asks for 8 points as the defining extents of the patterns.. so this makes it possible to go from any plane to any surface.. the points you specify make the bounding box of the source.

Funny enough, this time round the generated pattern does not follow the curvature of the surface, but is jagged and polyline like... I am wondering if this is a component malfunction.. Maybe David can provide some insight into this...

Attachments:
I just thought that since it takes something from the (xyz) to the (uvw) it would be an easy job to translate it. your definition seems to be working fine for me though, I am using surfaces instead of curves. So basically what you need is just a box covering your pattern/planar surface? Why is it that the bounding box isn't doing that?
Thanks for you help....
The box in the definition is covering all the source objects (turn on the preview for the B.Box), only change being that the box is no more aligned to the world coordinates.. its a custom box on a custom plane. It should work for surfaces/polysurfaces/meshes too, only that you will have to replace the input curve component to 'geometry' or brep or mesh.

Perhaps I didn't get your question well. You have an image to explain better?
Yes okay.... i see. I think you got it. I have uploaded a picture. It is just a matter of transforming a planar pattern on to space surface. But I just realised that this might be the wrong aproach after all. I a volume with voronoi cells, and i want to make the curves on the surface of the twisted volume, but as in the other thread the will not stick since there are only 4 controlpoint. This is why i wanted to take the pattern for a simple box of the same volume and then morph it.

But then offcourse my cells on the twisted volume is not the same as in the simple volume.

Thanks again.
Attachments:
Theoretically, they should stick to the surface (as they do when your source is X-Y space). But I am starting to think that its probably a bug. That apart, there's still a work around you could look at if you want them to stick:

1. Divide your source curves into 50-100-500 whatever suits best.

2. Get the closest point for each of these points to your source surface. This would give you UV coordinates for each point instead of XYZ.

3. Divide all these UV values with the max domain of your source surface (maxU for U of points, maxV for V of points).

4. Multiply all these UV values with the U & V max domains of your target surface.

5. Use Interpolate curve on surface and provide your target surface along with these new divided+multiplied UV values.

Since these curves will be built on the surface itself, they will absolutely stick.
Its a bit trickier for surfaces, but it seems to me like your surface is a loft between the polyline voronoi cells and its degree 3 curve. You could interpolate your curves first, and the loft them to get your surface.
Hi...
I am going to try that later today... You're too cool man, taking your time for this. This forum is great. My project deadline is really closing, so if this works, you are a hero. I'll get back when I try this.

Rasmus
Hi. I just realise that, even if the curves do stick to the curved surface. I will not be able to make a "region diff." or something to make an extrusion of the area around the cut out curves. Is it possible to make the opposite translation? The curved surface pattern to the planar surface? Then i could make my surface and the translate it bake to the curved surface.
or is there another way to make physical material of the curved surface? Thickness. I wanted to have the surface with holes and the offset it and somehow blend it.
You can use the offset surface component. If you want to "solidify" it, extract the edges of both surfaces (original and offseted surface) and loft them together.

If you are morphing a planar surface onto a curved surface, you can extrude the planar surface first and then morph it.
I don't think it's a bug. The object type stays the same after being morphed, so if the voronoi cells are polylines before the morph, they'll still be polylines after the morph (hence the straight lines). Best solution is to convert them to 1-degree nurbs curves first. Same applies to meshes, for example. If you morph a mesh that represents a box made out of 6 faces, the bottom face won't follow the surface curvature.
Vincente

I think its a bug because it does indeed change object type from polyline to a degree 3 nurbs curve when the interpolation is between XY and UV coordinates. See this. This takes the output of the voronoi component and puts it on a surface.

And aren't polylines degree1 nurbs curves anyway? Inside a scripting node they aren't, but the data casting of native GH components is quite robust I think? I know Meshes will always return straight edged geometry because they only work with points and interpolating faces between them, but nurbs surfaces/polysurfaces theoretically shouldn't work that way.

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service