Grasshopper Curves and Surface

From TOI-Pedia

Introduction

Placement of section plane

Extracting a curve from a surface is similar to extracting a point from a surface. Rather than extracting a certain spot on the surface, the curve is always a 2D section of the surface. So not only the edges of a surface can be extracted, also curves within the surface could be used. This is not only useful for making sections, but can also be very helpful when one is building geometry with a surface as a start.


Two Dimensional space of a surface

Locations of curves on a surface can be defined in two ways. The curve can be a location on the surface defined by a plane in world coordinates, in an x, y and z coordinate. The other method is the definition of the curve in the object space. In this case they are defined by 2 dimensional space coordinates U and V. A position on a surface thereby can be defined by the location in world space or is related to the length and width of the surface.

However the location on a surface can also be defined by its relative position on the surface. The start point will have the value 0,0 and the end point the value 1,1. An extracted curve of the surfacewill have a value between 0 and 1. The surface is in this case reparametrized.


Extracting curves from a surface

There are multiple methods of extracting a curve from a surface. As mentioned above, this can be done with both a surface of the dimensions in world coordinates (x,y,z) and a reparametrized surface (relative coordinates of u,v). There are several kinds of curves which can be extracted.

  • Edges of the bounding box of the surface
  • Curves from the surface


Extracting curves from a bounding box

bounding box

The bounding box is a rectangular minimal box shape enveloping the whole surface. The box has edges which can be extracted. Its simple volumetric description of the surface by the bounding box makes for example the calculations for intersection of surfaces much simpler. First the bounding boxes are checked on intersection and if so the surfaces are checked for intersection. The rest of non intersecting bounding boxes will be ignored. Other uses are simplifying collision detection ( dynamics ) and Ray tracing ( light calculations ).


bouding box points

To extract curves from a the bounding box of a surface we can use the box options in the Surface Analysis tab. There is multiple options of extracting the curves from the bounding box.

  • Brep Edges of bounding box.
  • Brep Wireframe of bounding box.


Extracting curves from a surface

Points on a surface (click on image to enlarge)

There are two definitions of 3 dimensional objects in Grasshopper. One is the surface, this is a single NURBS surface. The other is the Brep, this can be a composition of multiple surfaces. Hence the term Brep, or boundary representation. The access of the components of the Brep focusses on the definition of the separate surfaces and its boundaries. The evaluation of the surface focusses on the components of the surface, like points on the surface , the normals and frames at these locations.

  • Brep Edges
  • Deconstructing the Brep
  • Iso curve of surface


Selecting multiple curves on a surface by division

Surface division (click on image to enlarge)

In some cases like the construction of a steel space frame or the even distribution of objects over a surface it can be useful to divide a surface in evenly spaced parts. This is the simplest form of division.


Selecting a region on a surface and extract its curves

Domain surface
Surface division (click on image to enlarge)

The other option is to define a part or multiple parts of the surface. This part or these parts can be generated by defining the location and size of the part. To define the size and location a domain has to be generated which is defined by a range of U and V coordinates. As a result the corners from that segment of the surface can be extracted.

Personal tools
Actions
Navigation
Tools