Skip to main content

Geometry creation in FreeCAD

For geometry manipulations CENOS Antenna Design uses a very strong geometry editor - FreeCAD. This editor is used with both Import CAD and Geometry Editor, so it is important for us to understand how to work with FreeCAD.

Watch a short video on how to use FreeCAD for CENOS Antenna Design app:

FreeCAD video


Geometry import#

Sometimes when building an antenna simulation, you will already have a pre-made geometry, which you will want to use.


DXF/STEP#

You can easily import your CAD in DXF or STEP file formats.

To import such files, open Geometry Editor and simply drag & drop your geometry in FreeCAD!

drag n drop


.NEC#

If you have a .NEC (or other format) file, you can import it from the Part module.

NEC

NEC import


Unit scaling#

CAD files which are imported in FreeCAD must be in the correct units - milimeters. If your geometry is scaled incorrectly, you need to rescale it, otherwise meshing problems will occur.

To scale your geometry:

  1. Switch to Draft workbench.

NEC import

  1. In Tree View select your geometry and click Clone (this function will create a scalable copy of your geometry).

NEC import

  1. Once the clone object is created, scale your geometry in Properties. Make sure that the scale factor is the same in every direction to avoid distorting your geometry!

NEC import

note

As an alternative to geometry scaling you can use Scale function, but it will not work on every geometry, as opposed to Clone approach.

NEC import


CAD compound check#

If you have imported one or more CAD files and stumble into a problem either at meshing or anywhere else, it might be an indicator that the CAD file is actually not a solid, but compound of surfaces, which can cause problems for FreeCAD.

To check if your CAD is a solid:

  1. Click on the object in Tree View and open Python console (right-click on the icon toolbar and select Python console)

  2. On the lower right corner Python console will open. Write len(obj.Shape.Solids) and click enter.

  3. Take a look of the output.

assets/quickstart/Untitled23.png

The number of solids indicate how many volumes are there. If this number is high, evaluate the quality of your CAD file!

note

If you get an error message an cannot display the number of solids, click Edit โ†’ Send to python console, and redo the previous steps!


Component Library#

You can use CENOS Component Library templates to build patch or connector geometries.

assets/quickstart/Untitled23.png

Patch antenna#

Select the patch you want to build and click Create. Fill out the template parameters and click OK to build your geometry!

assets/quickstart/Untitled23.png


Coaxial edge connector#

Select Coaxial edge connector and click Create.

assets/quickstart/Untitled23.png

Connector will be automatically placed in your workbench, so you can position it by left-clicking on it in the tree view and selecting Transform.

assets/quickstart/Untitled7.png

To change the size of the connector, select it in tree view and edit the Property tab to suit your application.

assets/quickstart/Untitled23.png


Sketches#

A sketch is the base for almost all geometrical objects you can create, including geometries for antennas, which is why we need to know how to create one.


From scratch#

In FreeCAD you can create sketches in Sketcher workbench, which you can access directly through the shortcut icon:

Sketcher

Once in the workbench, click Create a new sketch.

Sketch new

Select the plane where you want to create you sketch, and you can start to draw the actual geometry.

Sketch plane

FreeCAD offers a large variety of tools designed to easily and precisely create any geometry.

assets/quickstart/Untitled27.png

assets/quickstart/Untitled27.png

tip

Hold down Alt to rotate the camera in sketch view

Draw your antenna geometry, and, once you are done, click Close.

Close sketch


On volumes#

In some cases it is beneficial to create a sketch on an already created volume, for example, for PCB antennas. Once you have created a 3D volume, for example, a box, you can select one surface on which to create you sketch.

note

The geometry you create will be partitioned upon sending it to CENOS, which means that sketches created on top of volumes will appear as separate surfaces in CENOS!

For example, you don't need to create an extrusion for patch, as it is enough to create only a sketch for it.

In the Part workbench select the face on which you want to draw.

assets/quickstart/Untitled27.png

Click Sketcher workbench.

Sketcher

Then click Create a new sketch.

Sketch new

Click OK to FlatFace definition, and start to draw.

FlatFace

tip

Hold down Alt to rotate the camera in sketch view

Once you have finished drawing your sketch, simply Close it and you are done!

assets/quickstart/Untitled27.png


3D volumes#

For a lot of times it will be necessary to create 3D geometries, not only 2D sketches. Fortunately 3D modeling in FreeCAD is very straightforward!

important

When creating volumes, make sure that they do not overlap with each other. Overlapping volume objects are forbidden!


Primitives#

For the simplest volume objects like cubes, spheres or cylinders, FreeCAD offers an easy way of creating such geometries. As you open FreeCAD, you will be automatically put in Part workbench. There you can simply select any geometry you want and build it.

Primitives

As you select an object, it will be built with pre-defined size. To change the size of your geometry, select your object and change its properties.

Properties


Extrusion#

For more complicated geometries it is possible to draw a sketch and create a 3D volume object from that sketch. There are multiple functions for this procedure, but the most commonly used one is Extrusion.

To use Extrusion, you need to first create a sketch you need.

assets/quickstart/Untitled27.png

Then switch to Part workbench

Part workbench

and click Extrude a selected sketch.

Extrude icon

In Extrude properties window define the extrusion lenght, check Create solid and select Sketch as a shape to extrude. Once done, click apply.

Extrude properties

Now you have succesfully created a complex 3D object!

assets/quickstart/Untitled27.png


Wire thickness#

To create a wire antenna from scratch, you need to create a sketch of your antenna, and then define the thickness of your wire:

  1. CREATE A SKETCH

    1. For 2D sketches you can set sketch position in its properties (In sketch properties Base โ†’ Placement โ†’ Position)

    Placement

    1. To build 3D sketches, use Draft Workbench โ†’ Drafting โ†’ Line. There you will need to build lines one by one and adjust the Start and End points to match your design.

    Placement

    1. For helixes or spirals use Create Primitives function in Part workbench.

    Placement

    In Geometric Primitives properties select Helix shape, and define your wire.

    Placement

  2. Create a wire with volume from the edges, select your shape, click Wire thickness tool in Part Workbench and define the wire thickness.

NEC

assets/quickstart/Untitled23.png

caution

Sometimes when building wires, the visualization will appear like this:

assets/quickstart/Untitled23.png

This is a visualization problem, which does not affect the geometry itself. You can continue and use this geometry in your setup!


Geometry parameters#

A very useful thing to have is parameterized geometry. This way you can create your geometry and dynamically change it through parameters without the need to rebuild everything.

You can define parameters in the Cenos Parameters spreadsheet where you can use various units and/or mathematical equations for the values.

Parameters

tip

To navigate between Cenos Parameters and geometry preview, use the tabs below the spreadsheet. assets/quickstart/Untitled28.png

To use these parameters, click the Formula Editor button in the value field and then enter CenosParameters.name

assets/quickstart/Untitled28.png

note

For now, to update the parameters, you will have to open FreeCAD and re-send the geometry to CENOS. In the next CENOS Antenna Design versions parameters will be accessable directly from CENOS interface.


Getting the geometry to CENOS#

Once you have finished the geometry, you need to send the mesh to CENOS. To do that:

  1. Select all final objects in the tree view.

  2. Click Geometry to CENOS.

Send geom to CENOS

As geometry is being sent to CENOS, FreeCAD study will be automatically saved in the simulation folder, so you can close it.