Complex surface creation with the help of a mesh model

A place to share learning material: written tutorials, videos, etc.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
pafurijaz
Posts: 66
Joined: Sun Dec 18, 2016 6:04 pm

Complex surface creation with the help of a mesh model

Post by pafurijaz »

Surfacing Tips:

Surface creation with the help of a mesh model in OBJ format

Introduction

This is a workflow that simplifies the creation of surfaces with FreeCAD with the help of a 3D model created with Blender to be used as a guide for generating curves using the vertices of the polygons.

With this workflow you can easily draw curves in 3D space without constraining them to planes.

The structure of the mesh if done well can give excellent results in the final result.

I use Blender for convenience to make these models with Subdivision Surfaces, but you can also use other programs that export meshes as an OBJ.

For ease of use I do not apply the subdivision modifier in Blender because it would generate models with too many vertices and it would be very difficult to locate the vertices to generate the B-Spline curves.

I recommend to keep a low number of vertices for the mesh, because these will then be the control vertices of the curves and a rule to always keep in mind because the surfaces will be better and homogeneous.

Export model from Blender

I usually use the default settings of Blender and I never change the measurement units, and these in Blender are in meters; this must be taken into consideration when exporting the model for FreeCAD from Blender, once the 3D object to be used with FreeCAD has been selected, choose Export to OBJ from the file menu.

Image

In this image it is also visible export to IGES, this is an add-on that allows you to export the subdivision surfaces directly in IGES format readable by FreeCAD without any conversion, this component is very useful and simplifies a lot, however this to be used correctly requires a basic understanding of how subdivision surfaces work in Blender and their use with all limits. to download this add-or this is page Digital-Sculptors Export IGES Add-On.

Now in Export dialog set the scale transformation export options from 1 to 1000, and our object will be in from meters to millimeters in FreeCAD, moreover the Blender axes orientation are different and to obtain the model in FreeCAD with the right alignment they must be selected for Forward Y Forward and for Up Z U Below is the image of the export options I use, if you do this regularly you can add this in the Presets on the top pressing the plus icon and whenever necessary you can use your Preset by selecting Operator Presets from the menu.

Image

Now I open FreeCAD and open the OBJ file just exported from Blender.

Then a dialog form will appear and you have to select Alias ​​Mesh (Mesh) and press select

Image

After you have opened the model you need to activate the Workbench Mesh Remodel. , which can be installed from the Tools menu by selecting the Add-on Manger item below and install the Workbench you need for this tutorial.

Image

With the Workbench Mesh Remodel. tool for vertices, generate the vertices from the mesh as shown in the image below with the tool visible under the mouse pointer.

Image

Select the MR_Points object in the Tree view alongside and if you want to change the size of the vertices, I set this value from 4 to 8, useful for selecting the vertices, which is sometimes difficult to do.

Image

Another important thing is to disable the ability to select the mesh during the process of generating curves from these points. there are various possibilities of displaying the mesh and sometimes I use the Display Mode from Shaded to flat lines,this makes it easier to locate points around the mesh.

Image

Now you can start with the generation of the curves through the selected points in order, the curves must be generated with the selection of the vertices always with the same direction and all go in the same direction from the start to the end, if not this can generate surfaces twisted on themselves, when the direction of the generated curves is reversed.

Image

Whenever at least 3 vertices are selected, it is possible to use the command create a Spline from 3 or more vertices and holding down the shift key it is possible to prevent the curve from being closed, therefore shift must always be kept pressed because you need to create the curves useful for generate the patches of surface from the model, If two vertices are selected, you can use the command alongside which to create straight segments.

Image

Once you have generated all the necessary curves for the surfaces you can hide the objects you no longer need in the view.

Here I have also made the curves on the opposite side but it is enough only to make one half of them and then with the Workbench Part use the mirror command.

Image

Most of the surfaces can be built with the Surface Workbench., but some more complex ones need to use the Curve Workbench which can be downloaded and installed with the additional components manager as done before for the Workbench Mesh Remodel

Here I have used the Gordon command in the Curves Workbench to create this curved surface which is constrained by a grid of straight lines, this is a very useful command for generating curved surfaces based on a grid.

Here the FreeCAD window is reduced to have smaller images to insert in the document and it is not possible to see all the icons that are hidden.

Image

And here the Gordon surface obtained from the BSpline grid created earlier, I would say that it is a good result and it was all in all simple

Image

With the Curves Workbench I have made all the more complex surfaces now I can move on to the Workbench Surfaces, which is complete and can often be used to do everything.

Image

The Workbench surface must have the curves always in the right direction and must be selected in order for the generation of the surfaces, and has an interface with the management of the options.

When the command from the menu is selected, you can go to the Dialog Box and add the curves, however I recommend viewing the documentation of both Workbenches available by clicking on the following links. Surface Workbench. and for Curves Workbench.

Before changing the Workbench I need a curve divided from those generated for the surfaces I do not create a half curve because I only have two vertices in the bow half and I need a curved line to do this the Curves Workbench has some useful tools to manipulate and create curves and works similar to the Workbench Mesh Remodel but has some differences I recommend you explore these tools.

This command in this case is convenient because it divides the selected curve in two and for me this is excellent and allows me to have tangent curvatures.

Image

Here is the split curve that I can use to generate the top of this model with a new surface. I hid the previously generated surfaces for convenience because it simplifies the selection of the necessary curves for the surfaces creation.

Image

Now I activate the Surface Workbench for the rest of the missing surfaces.

With this Workbench you must first select the command to use and in this case I will use the command for the surfaces, from the edges, and then in the dialog box I select the add button and then I will select the lines in sequence.

Image

This is the Dialog box

Image

Here is the surface generated by the 4 edges at the top, one of which is part of the previous division

Image

In this case I can create the other surfaces with this command but for straight parts you can use the command a to create surfaces from sections useful for creating lofted parts even from only two curves. this command also has the same workflow as the previous one

And this is the result of this process that makes things simple with surfaces.

You can create a compound from the generated surfaces and then you can export them to IGES so that you can use them with other CAD programs such as PolyCAD, Rhinoceros or continue with FreeCAD to create the rest.

Image

Image

Naturally this process is only an indication on how to start in a practical way with FreeCAD, some surfaces must surely be rebuilt to eliminate errors, in fact from what I have done for now it is not possible to obtain a perfect solid, I have to rebuild the curves and the surfaces in a different way.

With FreeCAD it is possible to draw curves directly and obtain probably better results

The Surfaces generate and opened in Moi3D with Control Vertex activated

Image

And this is the hull imported in PolyCAD

Image
Post Reply