Using Scripts

─ 1.1. Geometry creation

For starting with this example, the default Units and Reference Plane are valid.

In a first project, we will build two boxes with different dimensions. A translation and a rotation movement will be assigned.

First of all, define the parameters that are required for the geometry movement, click on Geometry - Parameters - Define Parameters menu.

Define Parameters

A brief description of this parameters are shown in the table below:

Parameter Description Value
inc_x Center X of box1 2.5
Xo1 X corner base of box1 -0.5
Yo1 Y corner base of box1 -0.75
Zo1 Z corner base of box1 -0.5
w1 Width of box1 -2.0*Xo1
d1 Depth of box1 -2.0*Yo1
h1 Height of box1 -2.0*Zo1
Xo2 X corner base of box2 -0.15
Yo2 Y corner base of box2 -0.35
Zo2 Z corner base of box2 -1.5
w2 Width of box2 -2.0*Xo2
d2 Depth of box2 -2.0*Yo2
h2 Height of box2 -2.0*Zo2
rot_box2 Rotation on the z-axis of the box 2 {0.0,45.0,90.0}
move_box1_2 Movement on the y-axis  of the box1 and 2 {0.0,0.5,1.0}

Create the two boxes geometry using the existing primitives, and then use the previously defined parameter to move and rotate the geometry with the move command and with the rotate command.

The geometry creation is detailed in the figure below, where the command line sequence is shown.

Command Line

Once, the geometry has been built, then you can export all executed commands and all defined parameters with Tools - Script - Save menu and the script file will be saved with a .nfs extension file and written in ASCII. Note: you can find more information about scripts on Script Guide.

In this case, we build a new project where we can analyze the ISAR image of a geometry composed by the satellite and the geometry defined in the previous step.

So, the user has to import the satellite geometry, satellite.igs, click on Geometry - Import menu.

Now, the user has to load the script, .nfs file, where a list of console commands are imported. Click on Tools - Scripts - Load menuNote: Every command has its own script specifications which are listed in Command Line User Guide. Script information is also available in commands help by keying commandName -h in the command line.

After that, the user has imported the geometry composed of the two boxes and also the rotation that has been parametrized in the previous step.

Note: if the user wants to change the rotation angles or the positions or the size of the boxes, the user can do that easily changing the parameters on the scripts.

We use cookies on this website to improve your navigation experience on this site. By using this site, you agree to our cookie policy.

I agree