Unioning the Model

Union all geometry in the model (Feedline and Patch) and set its label to Union1.

myUnion = myProject.Contents.Geometry:Union()
myUnion.Label = "Union1"


Figure 1. The model tree showing the union of Feedline and Patch with label Union1.
  1. The union operation is a geometry object and since there may be multiple geometry objects in the model, it is part of the GeometryCollection.
  2. Search for GeometryCollection in the Help1.
  3. In the Help, under GeometryCollection > Method List, search for methods that are applicable to the union operation:
    • Union (geometrylist List of Geometry)
    • Union ()
    To union all geometry in the model, we will use the method:
    Union()
  4. Determine the syntax to prepend to Union():
    1. Since Union is a method, it is indicated by prepending a “:” (colon).
      :Union
    2. In the Help, under GeometryCollection > Usage locations, note the following:
      ModelContents object has collection Geometry.2
    3. Click ModelContents.
    4. In the Help, under ModelContents > Usage locations, note the following:
      Model object has property Contents3
      Since we know that Model is the one of the top levels in the model tree, the result is then:
      Contents.Geometry:Union()
    5. Since the project is the highest level, we prepend our reference to the project:
      myProject.Contents.Geometry:Union()
  5. Add a reference to the newly created union:
    myUnion = myProject.Contents.Geometry:Union()
  6. Set the union label to Union1:
    myUnion.Label = "Union1"
    Tip: View the Union (object) in the Help for a short example.
1 The API is available in the Feko Scripting and API Reference Guide (PDF) or Feko WebHelp.
2 The part that is prepended to the method, maps to the CADFEKO model tree structure.
3 The part that is prepended to the method, maps to the CADFEKO model tree structure.