Creating an Editable Surface in Rhino3d

Simply Rhino White Paper - Creating an Editable Surface from Laser Scan Input in Rhino3d

Creating an editable NURBS surface from complex scan data can be a challenging proposition, especially when the original scanned surface is irregular and not smooth in the conventional sense. This Rhino3d white paper shows one workflow that allows an editable surface to be produced whilst maintaining the irregular qualities of the target surface.

Typically, a hand held laser scanner produces a very complex mesh of the irregular target surface whereas to promote good NURBS topology we need a regular four sided structure to the new surface. The workflow as described attempts to find a balance between the irregular target and the well structured Rhino surface.

The example shown in this document was an orthopaedic seat and the challenge was to create a surface that was very close to the scanned target but was capable of being adjusted in certain areas in order to increase support and improve posture. The resulting model needed to be a watertight solid to facilitate the easy translation to CAM. The workflow as described is suitable for a variety of scenarios including terrain modelling, architectural heritage detailing, furniture, medical etc.

 

To download the full white paper PDF click here.

 

Bringing the STL Data into Rhino

Open a new Rhino file - choose Small Objects Millimetres from the template options.

Import the STL data into Rhino - File > Import (choose STL from the Files of Type dropdown menu) and navigate to your STL file.

If the scanned data needs to be reoriented in 3D space this can be done with the Transform tools for instance Transform > Move or Transform>Rotate. It is important to carry out any reorientation of the model before work begins.

The scanned data should come into Rhino’s Default Layer - Rename this layer 01 Original Scan.

Create a new layer and name it 00 Foam Volume. Move this layer above 01 Original Scan in the layer palette - you can move layers up and down in the list by using the up/down arrows in the layer palette.

Make 00 Foam Volume the Active layer.

Create the foam block using Solid>Box>Corner to Corner, Height. Use a standard foam block size. The aim in creating the foam block now is to create a boundary for any subsequent curve or surface extensions to intersect with.

 

Creating the Contour Curves

Hide the layer 00 Foam Volume and Show the layer 01 Original Scan. (Lightbulb in Layer Palette).

Create a new layer and name it 02 Contours. Make this layer Active.

Working in the Top Viewport and with Ortho constraint On, Run Curve > Curve from Objects > Contour to create the contour curves. At the Contour Plane Base Point prompt click on the left hand side of the scanned object and at the Direction Perpendicular to Contour Planes prompt drag the cursor to the right (X axis) and click. Finally at the Distance Between Contours prompt type in 20. The contours will now build.

In some circumstances it may be beneficial to produce contours further apart than 20mm.

The resulting contours are Polylines and will need to be Rebuilt to create smooth splines from which an editable surface can be created.

If any of the polylines have gaps in them then create a new ‘repair’ curve using either a straight line segment or a blend curve (continuity = tangent) to fill in the gap.

Join the polyline segments and repair curve together to form one polyline.

The completed contours should look similar to this:

Creating Surface from Laser Scan with Rhino3d
 

The small outer ‘orphan’ curves from the perimeter of the scan can be removed along with some of the rear contour curves which are not needed.

Before rebuilding these remaining curves the edges of the contours can be trimmed. As the ultimate aim is to extend the edges of the scanned surfaces vertically, any of the contour curves that double back on themselves can be trimmed at this stage.

On the example file most of the contours on the left hand side of the seat can be trimmed. This can be done approximately by working in Front Viewport and trimming with a horizontal line placed roughly at the high point of the curves.

White Paper Creating Surface with Rhino3d Image
 

Rebuilding the Contour Curves 

Hide the layer 01 Original Scan.

Create a new layer and name it 03 Rebuilt Curves make this layer Active.

The curves do not need to be rebuilt individually.

Pick a representative curve and run the Edit > Rebuild command. The Rebuild dialog box will appear.  The bracket figures refer to the points and degree of the existing polyline (the point count will likely be around 500 and the degree will be 1) and the figures to the right refer to the new rebuilt curves. Change the Degree from 1 to 3 and set the number of points to around 18 to 24. A rebuilt curve will deviate from the original polyline - you can check this deviation by using the Preview button. Aim for a deviation of around 3mm. As a general rule the more points in the rebuilt curve the closer it will be to the existing polyline but the more complex any surfaces created from it will be - the aim is to reduce complexity whilst getting close to the original polyline.

Do not complete the command!

Pick another curve and repeat the above process to get a good idea of the number of points to use.

Finally pick all the original curves and rebuild them in one go using a degree of 3 and the number of points obtained from the above try-out. The example file uses 18 points.

Important! Use the following options:

Delete Input = Unchecked   -   Create New Curves on Current Layer = Checked

The rebuilt curves should look similar to this:

Creating Surface from Laser Scan with Rhino3d
 

Extending the Rebuilt Curve

The Rebuilt curves now need to be extended so that when a surface is created from them the surface will intersect with the foam block.

Hide the layer 03 Rebuilt Curves

Create a New Layer and name this 04 Extended Curves. Make it Active.

Copy the Rebuilt Curves onto this new Layer. The easiest way to do this is to select the curves on layer 03 Rebuilt Curves and then in the Layer Palette, Right Click on the 04 Extended Curves layer and select Copy Objects to Layer.

Hide the Layer 03 Rebuilt Curves.

The curves are best extended in the orthographic viewports and in the sample file the best view is the Front View.

Depending on the curve type there are two methodologies for extending the curves as shown in the following illustration:

White Paper Image
 

Perpendicular Extension Method

Working in the Front View, draw a line in the Z axis as shown.

Working on one side only create a perpendicular line between the Z axis line and each of the curve ends.

Use the command Curve > Line > Perpendicular to 2 Curves to do this.

It is possibly easiest to do about four or five of these perpendicular lines and then move on to the trimming operation.

Next, working on a curve at a time, Trim the end of the curve with the appropriate perpendicular line using Edit > Trim.

Delete the perpendicular lines after they have been used to trim with.

Repeat the process until all of the curves have been trimmed on one side and then use the same process on the other side.

Turn on the layer 00 Foam Volume and Lock it (padlock symbol in layer palette).

Switch to the Perspective Viewport.

Now working on a curve at a time use Curve > Extend Curve > By Line to extend each curve beyond the perimeter of the foam volume.

Because the curves have been trimmed with a perpendicular line the extension will be tangent continuous and also vertical.

Straight Line Extension Method

Working in Perspective Viewport, draw a vertical line by using Curve > Line > Vertical to C Plane making sure that the start of the line is snapped to the top of the curve by using the End Object Snap. Make sure the end of the vertical line extends past the perimeter of the foam volume.

Repeat this process for all curve ends that need extending in this manner.

Currently the junction between the vertical line and the rebuilt contour curve will be sharp and if we build a surface from this condition the surface will have a crease in it. To smooth out this sharp corner condition we can use a fillet curve. The dimension of the fillet curve will depend on the job in hand but in the case of the example file about 50mm works well.

Still working in Perspective Viewport run Curve > Fillet Curves and set the following options: 

( Radius=50  Join=Yes  Trim=Yes  ExtendArcsBy=Arc ):

First pick the end of the rebuilt contour curve and then the start of the vertical line (pick both entities near the sharp corner) and the fillet curve will build and join.

Repeat this process as necessary.

Working in Front View, Trim the top of all the extended curves so that they are of uniform height about 5mm or 10mm above the foam volume.

Finally, if the first curve (pommel end) is inside the foam volume then make a Copy of this curve positioned further along the Y axis so that it is outside the foam volume. If this distance is significant you may need to position an interim curve (again copied).

The result should look like this:

Creating Surface from Laser Scan with Rhino3d
 

Creating the Y Axis Curves

We could create a valid surface by lofting our new extended rebuilt curves together but the result could be quite torturous and difficult to edit subsequently. A better methodology is to create a final surface with a clear rectangular isocurve structure and we can do this by creating interpolated Y axis curves.

Note that in comparison to the previous process on the Back Foam we will have less input curves here due to the shape of the scan.

Create a New Layer and name it 05 Y Axis Curves. Make it Active.

Working in Top Viewport create an array of lines in the X axis that are 20mm apart.

To do this turn on the Project Constraint and draw a Line in the Y axis that is snapped to the X axis centre of the foam block. Make sure this line extends past each side of the foam block.

Move the line upwards in the X Axis by 10mm.

Using Transform > Array > Rectangular array copies of this line upwards in the X axis at 20mm.
In the attached file the number of items would be as follows:

X=6, Y=1, Z=1.

Accept the result of the Array by pressing Enter.

Now, still working in top view, Mirror the 6 arrayed lines about the X axis centre of the foam block. We should now have 12 Lines at 20mm apart.

Working in Front Viewport Move these 12 lines either above or below the Foam Block.

Next, Create a New Layer and name it 06 Y Axis Surfaces. Make it Active.

Select the 12 lines and switch to Perspective Viewport.

Extrude these lines in the Z axis making sure the resultant surfaces are slightly taller than the foam block.

To extrude the lines use Surface > Extrude Curve > Straight.

Creating Surface from Laser Scan with Rhino3d
 

Create a New Layer and name it 07 Intersection Points make it Active.

Turn off Layer 05 Y Axis Curves and 00 Foam Volume.

Create a set of points where the surfaces intersect with the Extended X Axis Curves. To do this run Curve > Curve from Objects > Intersection. This command may take a few minutes to complete.

When the points have been created turn off layer 06 Y Axis Surfaces.

Create points on the ends of the extended rebuilt curves by running these two commands:

Curve > Point Object > Mark Curve Start

Curve Point Object > Mark Curve End

The result should look like this:

Creating Surface from Laser Scan with Rhino3d
 

Create a New Layer and name it 08 Interpolated Curves Y. Make it Active.

Turn Off Layer 04 Extended Rebuilt.

Working in Top Viewport, run Curve > Free Form > Fit to Points and marquee select a row of points - use the following command line options to create a smooth curve through the points:

Degree=3  CurveType=Interpolated  Knots=Uniform  Closed=No

Repeat this for each row of points until all the curves have been built.

Turn Off Layer 07 Intersection Points and Turn On Layer 04 Extended Curves X. There is now a network of Curves from which the editable surface can be created.

Creating Surface from Laser Scan with Rhino3d
 

Creating the Surface

In this instance we need to create a surface that can be edited easily so, for example, we can raise the pommel area. Surfaces can be directly edited by their control points; however in this instance the surface we will create will be relatively complex and have too many control points to edit it smoothly.

The answer in this case is to use Rhino’s Modelling History. In this case this can be seen as an association between the curves and the surface that is built from them. If the surface is built with History On then the surface will update if the curves are subsequently edited. Since editing the control points on the curves is much simpler than editing the control points on the surface this represents good practise.

We will also create a reference surface without history.

Create a New Layer and name it 09 Reference Surface. Make it the Active Layer.

Select all the curves and run Surface > Curve Network to create the surface.

In the dialog box that pops up select the following options.

Edge Curves = 1

Interior Curves = 1

Preview = On

If the surface looks okay in preview Select OK to accept the surface.

Create a New Layer and name it 10 Adjusted Surface. Make it the Active Layer.

Hide the layer 09 Reference Surface

Turn History On - Note that History will turn itself off after the surface has been created.

Select all the curves and run Surface > Curve Network to create the surface.

In the dialog box that pops up select the following options:

Edge Curves = 1

Interior Curves = 1

Preview = On

Select OK to accept the surface. This surface has a history connection with the curves that created it.

Turn Off  Layer 10 Adjusted Surface.

Select the Extended Rebuilt Curves and the Y Axis Curves and Turn Control Points On.

Select the three centre points of each of the curves around the pommel area. Do this in Top View and to verify that you have selected the correct points you can temporarily Hide each curve layer.

The selected points should look like this:

White Paper Creating Surface with Rhino3d Image
 


 White Paper Creating Surfaces with Rhino3d Image
 


 White Paper Creating Surface with Rhino3d Image
 

Turn On  Layer 10 Adjusted Surface.

Working in either Front or Right Viewport turn the Project constraint On.

Run the Set Points Command Transform > Set Points.

Check Set Z’ only and use the Align to World’ Option and snap the control points so that they are in line with the end of the curves thus raising the surface.

White Paper Creating Surface with Rhino3d Image
 

Note that the surface has now been modified smoothly around the pommel and it can continue to be adjusted by using the control points of the curves that created it.

Compare with the reference surface to check that the leg troughs have not been altered.

Creating Surface from Laser Scan with Rhino3d
 

With the adjustment of the surface complete, the back can be closed off.

Turn Control Points Off and Hide the Layers 04 Extended Rebuilt and 08 Y Axis Curves.

Turn the Project constraint Off.

Draw a straight line between the two back corners of the seat surface.

Run Surface > Planar Curves and build a planar surface using the straight line and the back surface edge.

Join this surface to the seat surface. Note that any remaining history will now be lost.

Creating Surface from Laser Scan with Rhino3d
 

Create a New Layer and name it 11 Trimmed Model. Make it the Active Layer.

Unlock the Layer 00 Foam Volume.

Copy the foam block and extended surface onto this new layer.

Hide the layers 00 Foam Volume and 10 Extended Surface.

Trim the foam block with the surface and then the surface with the remainder of the foam block.

Sometimes it is better to first create an intersection curve and trim both the block and the surface with the curve.

Join the foam block and trimmed surface together - the command line should report that the result is a Closed Polysurface.

Creating Surface from Laser Scan with Rhino3d
 


 Creating Surface from Laser Scan with Rhino3d
 

© Simply Rhino Limited 2010 - 2016

 

  • 6779
  • Last modified on Monday, 25 July 2016 11:07
Request Call Back