Cadfil Help Contents Page

Cadfil - Advanced filament Winding software for program generation for all type of filament winding machine.

Payout Path Viewing - Cadfil Advanced Graphics Window

Note these features are relevant to Cadfil Version 9.00 on onwards and some of the earlier beta versions (8.5x)

Introduction

The Advanced graphics functions allow many aspects of the fibre path and payout path to be viewed and analysed in a 3D graphical environment with dynamic zoom, pan and rotate using the mouse (ZPR mode). 3D animations of the machine and mandrel motions can be seen both in dynamic and step by step modes. Is is also possible to make 3D movie files(.avi) to share with others. Other function include advanced clash detection and self intersection detection. Self intersection can occur on complex geometries such as T's where there is no machine clash but the fibre between mandrel and payout eye interferes or snags on some other part of the mandrel. These 3D graphics display options use the OpenGL graphics systems. To use OpenGL graphics the Windows PC must have a graphics card with OpenGL (OGL) support. Even very basic 'integrated' graphics systems on modern PC's have basic OpenGL support via emulation. For best performance however (speed of redraw) with dynamic graphics a "3D Graphics" card is the best option. Nearly all modern 3D graphics cards will have OGL support however the speed and capabilities can vary enormously. The advanced graphics options are switched on or off using the "OpenGL" menu option on the Utilities menu. The current default is to be off. The advanced viewing functions currently all relate top the "View Payout Path" options. When these options are entered the graphics capability is displayed the Cadfil text window, as exampled below.

  OpenGL Vendor: NVIDIA Corporation
  OpenGL Renderer: GeForce GT 525M/PCI/SSE2
  OpenGL Version: 4.1.0

It is also possible to add static parts of the machine for example the headstock by adding a 3D external STL file for information on this follow this link on "Cadfil Simulation with Static Scene added".

Cadfil OpenGL Graphics Window
Cadfil Advanced Graphics Window Appearance

Hotkeys: H,Q,Z,P

Options for controlling the Graphics Window output can be set using the options dialog shown below. there are also a number of 'hot-keys' which if pressed when the mouse cursor is over the Graphics window perform certain actions. Please note when viewing a 3D animation that is running in the continuous mode the only way to stop this is to hover the mouse over the graphics window and hit one of the Z, P or Q hot-keys, Z being the best choice.
Key press H or h > Opens the help system
Key press Q or q > Closes the advanced graphics window
Key press Z or z > changes into the ZPR - Zoom/Pan/Rotate mode (see below)
Key press P or p > changes into the Pick Mode (see below)

In ZPR (Zoom Pan Rotate mode ) holding the Left Mouse button down whilst moving the mouse causes rotation of the scene, vertical, horizontal and circular mouse motions rotate about different axes. Holding the middle mouse (or scroll) button down whist having the mouse up or down the screen zooms the scene in and out. Holding the Right Mouse button down whilst moving the mouse repositions (pans) the scene.

Cadfil 3D Graphics dialog options
Cadfil 3D Graphics dialog options

3D Option Dialog

The choices on the 3D Options Dialog are shown the the picture above and are described here.

The Tick Boxes

The Tick boxes determine what will be part of the displayed in the next redraw. The options that you see in your might be slightly different to those shown as items can be added or removed from the list by using different Cadfil functions. The tick box items shown are briefly described below:

Mandrel - Includes the shaded mandrel mesh in the view.
PayoutHead0 and PayoutHead1 - Are included to allow verification of the machine head definition that is being used. The payout head is a collection of cylindrical solid objects that defines some key aspects of the machine head geometry. The group PayoutHead0 are objects that are subject to both Yaw and Roll axis rotations (Cadfil axes 2 and 3). The group PayoutHead1 are objects that are subject to only Roll axis rotations. These options draw the head geometry in the position and orientation that it has been defined. You might not be able to see it if it is inside the mandrel! Try turning the mandrel off. Normally these tick boxes would be un-ticked (off).
Payout Path - The path in 3d space the payout eye will travel.
Payout Markers - This puts a small coloured solid sphere at all the actual points that make up the Payout path.
Fib Pay Lines - This drays lines that connect to fibre position on the mandrel surface to the corresponding payout path position.
Fibre Path - The path of the fibre on the mandrel surface.
Bands - This shows the structure of the final winding on the surface of the mandrel using the actual programmed width of the fibre band. Please note that for technical reasons the old "Bands views" in the non-OpenGL payout viewing can often 'look better'.
Payout Intersections - This shows "Fib-Pay lines" and "Payout Markers" for any positions that generate a path intersection with some other part of the mandrel. The markers are a little larger and in a different colour but it will often be advisable to switch off the standard path and markers so you can see these clearly if there are any.
Origin/Axes Shows some 3D arrows that denote the XYZ axes and the Origin (zero position) of the mandrel and payout head definition. Note that the axes may be obscured by the mandrel if they are inside it!
Clash Zones These are the purple spheres shown in the picture above. To make clash detection more effectiveness Cadfil creates a number of spherical zones that contain a sub-set of the mandrel vertices and then applies the principal that if there is no clash with the sphere then there is no need to look at a clash with any of the objects contained within it. Normally there is no need/reason to have these entities visible other than a quick check to see if the zones make sense.

3D Option Dialog Buttons

There are a number of buttons on the dialog that are briefly described in this section. There are 4 pre-set view icon buttons top/side/left/right that change the view direction and redraw the display. The set delay allows a pause to be set (in milliseconds) between screen updates during animation if it is too fast. The Redraw button causes the display to be updated, useful after changing the tick box selection. The Capture Win button causes the graphics window to be saved a a Bitmap file, click this button and then the redraw button to capture the window, the 'Capture' is switched off after the bitmap is created. The bitmap is created in the current working folder and is called "img000001.bmp". If the animate (Play) button is pressed then each frame of the animation is saved as mov000001.bmp, mov000002.bmp etc. This continues until the animation is stopped by pressing the Z key. Please refer to the section on Creating a Movie file for more detail on this. The "Step Back", "Play" and "Step forward" icon buttons are used to animate the movement of mandrel and payout head in continuous and step mode and are discussed in the 3D Animation section.

3D Options Dialog Menu

Cadfil 3D Graphics dialog Menu
Cadfil 3D Graphics dialog Menu

As can be seen in the screen-shot above, the 3D Dialog Box has an "Options Menu". These items are briefly described below.

Delete movie bmp files This deletes all files of the pattern movxxxxxx.bmp in the current working folder where xxxxxx is a six digit number e.g. mov000001.bmp, mov000002.bmp etc. Manually selecting and deleting these image files can be quite tedious if there are a large number of them.

Make avi movie When the "Capture window" button is pressed and then an animation is started with the "play" button each frame of the animation is saved in the working folder as a bitmap file, the bitmap (.bmp) files are named movxxxxxx.bmp where xxxxxx is the current point number. Non-asymmetric payout paths may have several thousand data points so a complete animation could generate a large number of files and can be slow. File creation starts at the current payout point number so to start at the begging position the slider on the right of the dialog to the top before selecting play. After sufficient files have been created stop the animation with the 'Z' key, and then select this option. Cadfil does not have a movie encoding software this is done with an external software tool. The tool that may be installed in the Cadfil install folder is ffmpeg.exe. This software is available at https://www.ffmpeg.org/ and is subject to GNU general public licence Version 2.0 which can be found in the following link. GNU general public licence Version 2.0. The dialog below is shown which has the frames/second, folder (for the input and output files) and the name of the move (AVI) file to create. When OK is pressed and assuming the example data in the dialog below the command "ffmpeg.exe -f image 2 - framerate 6 - i \user\Andrew\Desktop\180elbow\mov%6d.bmp -y sg1.avi" would be issued. If you want to use other options read the ffmpeg documentation at the web site referenced above and run it manually from the command line with your own options, or indeed use some other encoding software of your choice. After encoding (and checking!) the movie the bmp files can be deleted as they take up a lot of disk space.

Cadfil Create Movie Dialog
Cadfil Create Movie Dialog


Calculate Head Clash Points This option is most useful with more complex shapes particularly with 6 axis or robot winding to check if there are any clash (crash) problems between machine and mandrel. There are a couple of things you need to do before you can use this option. Firstly you need to have defined a payout head definition that is representative of the machine geometry. This is discussed in a latter section. Secondly you need to select the post process option that is to be used from the drop down combo-box. The axes used and the control strategy of each option is discussed in the post-process sections. Remember just because there is no clash predicted using one post-process option it does not mean things will be OK with some other post-process option. Clash detection involves quite a lot of computation but the methods used are very efficient so even with large numbers of payout points, large numbers of mandrel points and a complex head geometry it should usually take a handful of seconds to complete. The button of the 3d options dialog has a progress bar that charts the progress. The longest time for calculation is where there is no clash as everything gets checked. An example of clash detection is shown below

Cadfil Clash Detection
Cadfil Clash Detection


Calculate Self Intersection
With some more complicated geometries it is possible to get self intersections these option creates a new entity of this list of tick boxes that shows "Fib-Pay lines" and "Payout Markers" for any positions that generate a path self-intersection with some other part of the mandrel. The markers are a little larger and in a different colour but it will often be advisable to switch off the standard path and path markers so you can see these clearly if there are any. An example with a tee winding is shown below, in this example the points shown caused the fibre to snag on the top of the T leg. To be able to wind these paths successfully some adjustment is needed.

Self Intersections
Self Intersections

List Selected Points This option currently works in conjunction with the "Calculate self intersections" and prints a table in the Cadfil text window that contains the point number, the mandrel surface coordinate of the path and the corresponding payout path coordinate for all the intersection points. If the "adjust payout points" function has been used it also lists the new (adjusted) payout path coordinate.

Adjust Payout Points This allows a new position for a specified payout point number from the 'list of select points' to be calculated. The new coordinate is at 90 degrees to the direction to the next payout point in a direction normal to the plane containing the two payout positions and the fibre point position. The user can specify the distance for the adjustment, noting that positive and negative values have opposite directions. The new and old payout positions are disparaged in the graphics window and the values can be shown using 'list selected points'. At present this feature does NOT change the payout path file if you need to change this then cut and paste from the text window using a text editor is one way. Automatic update of the payout file will occur in a later version.

Payout Range Selection The Payout Path, Payout Markers & Fib Pay Lines for more complex parts e.g. elbows can often have too much information to be able to see things clearly. it is possible to enter a start and end point number so that points from say point number 100 to point number 300 only are displayed. To reset to displaying all points set the start and end to zero. The presence or not of these items can be added or removed using the tick boxes.

Select / Change Static Scene STL. This option can be used to select a 3D solid model in STL format. STL files can be exported from many 3D CAD systems. Both Binary and ASCII format stl files are supported but the file should be given a name ending in .stl. The model is used as 'background' or "STATIC SCENE' to the animation and if the Static Scene is visible (by use of the tick box associated with it) then it will be used in the head clash detection where there is a possibility of the payout head hitting part of the winding machine. A default static scene can be set in the .SM file by using $VISU-STATIC-SCENE-STL-FILE=winder_bed_type.stl The file "winder_bed_type.stl" is one of a number of example files in the Cadfil installation folder. The origin of the STL model should be such that the model X axis is in-line with the mandrel rotation axis. When this feature is used the user is asked for an XDAT value to position the mandrel origin relative to the static scene origin. Using a complex static scene can considerably slow the 3D graphics and clash detection.

Change Payout Head. This menu option can be used to select a different payout head model for use in 3D animation and clash detection. The definition of payout head models is discussed later in this help topic. Any payout head files should be named in the pattern "*payhead_def.txt" where "*" represents some unique name and these files should be saved in the Cadfil installation folder as this is where the system will first look. The payouts head file name can also be defined using the command line variable /head for example "/head myfile_payhead_def.txt". To use this command line feature edit the command line on the Cadfil short-cut on the Windows desktop or start menu.

3D Animation

There are numerous animation option where a simulation of the machine motion can be made. Referring to the figure above, there is a combination (drop down) box where you can pick all the same post-process options you can find on the NC-Post Process menu so you can simulate specific options. The speed of the animation depends on the complexity of the mandrel and payout head definitions the number and spacing of the payout points and of course the performance of the computer and graphics card. In many cases the animation may be too fast. Suspend the animation by hitting the 'Z' key with the mouse over the graphics window. Then click the "Set Delay" button. This allows the entry of a delay (in milliseconds) between position updates. A value of 200 is 0.2seconds, the default is 0. Resume the animation by clicking the "Play" button. Use the Pre-set view buttons to view from standard view (top, side etc) or use the dynamic Zoom, Pan, Rotate by moving the mouse over the graphics window with left, middle/wheel or right buttons held down. You might note the 'slider' on the side which shows the progress of the winding (it wraps back to the start when the end is reached). When the animation is cause you can drag this position to set where the animation will restart on Play. The step forward/backwards icon button allow you step forward and backwards in the animation to view particular positions in ZPR mode.

Defining the Payout Head geometry for 3D Animation

Making a payout eye/head that mimics the size of that used on the machine gives a more useful simulation. On the 3D Option dialog set "Payout head" on. It may help to switch "Mandrel" off as the payout head display position is with its origin [0,0,0] coordinate at the origin [0,0,0] of the mandrel. It is entirely likely this position is inside the mandrel so the payout head will be hidden. The standard (default) payout is shown below in the figures below. There are two payout eye definitions supplied with the Cadfil installation, these are found in the C:\Cadfil\Cadfilxxx folder and are named custom_payhead_def.txt and standard_payhead_def.txt. When Cadfil is installed it created short-cuts on the start menu and on the desktop. You can use windows create additional short-cuts wherever you want. If you right click on a short-cut and look at the properties you can find in the command line box that there is a command line option /head standard_payhead_def.txt, this indicated that the this file will be used as the definition. You can create other definition files and point the short-cuts to use them. If the file is not found or as errors there is an internal default payout heat definition that gets used. In the later case some error messages may be output to the Cadfil text window. Some description of the two files is shown below.

Cadfil Standard Payout Head Parameters
Cadfil Standard Payout Head Parameters

Cadfil Standard Payout Head 3D View
Cadfil Standard Payout Head 3D View

standard_payhead_def.txt Definition sample

; this files defines a payout 'head' for use in Cadfil animation
; there are two types, a "STANDARD"  and a "CUSTOM" definition
; this file is an example of a STANDARD definition.
; read Cadfil help topic ??????? for further information
; all lines not starting with the $ character are ignored
; only the first 40 character per line (or up the the first blank
; space if this is less than position 40) are processed you can safely make
; notes after this length. If there is any problem processing this file
; and internal default definition will be used.
; all 8 values must be defined with values > 0 (or STANDARD in the TYPE case)
; the tokens can be in any order.
;
; scale multiplies all the values so to change from mm to inch
; change scale from 1 to 0.039370079, scale is also useful if you want to
; make it a bit bigger or smaller and can't be bothered thinking too much!
;--------------------------------------<40;
$PAYHEAD-DEF-TYPE=STANDARD                ! definition type
$PAYHEAD-DEF-W=100.0                      ! front roller_length (width W)
$PAYHEAD-DEF-R1=24.0                      ! roller_radius (R1)
$PAYHEAD-DEF-L=350.0                      ! arm_length (L)
$PAYHEAD-DEF-R2=8.0                       ! arm_radius (R2)
$PAYHEAD-DEF-T=36.0                       ! backdisc_thickness (T)
$PAYHEAD-DEF-R3=75.0                      ! backdisc_radius (R3)
$PAYHEAD-DEF-SCALE=1.0                    ! scale

custom_payhead_def.txt Definition sample

A 'custom' head can be constructed from any number of cylinder that can be of any size position and orientation. These are specified by the radius and the coordinates on the ends of the axis. An example with three cylinders is show below. The origin an axis orientation is important. The Fibre dispensing point is deemed to be the [0,0,0] position of the eye definition. The Roll (B) axis is about Y and the Yaw (C) axis is about Z. The X axis is aligned (parallel) to the positive carriage direction of the winder. Y is the radial (cross-feed) direction and + is away from the mandrel. Z perpendicular to X and Y (normal vertical). Please note that for a roller type eye the zero rotation position (for the definition is with the axis of the roller in the Z direction).

; this files defines a payout 'head' for use in Cadfil animation
; there are two types, a "STANDARD"  and a "CUSTOM" definition
; this file is an example of a CUSTOM definition.
; read Cadfil help topic ??????? for further information
; all lines not starting with the $ character are ignored
; only the first 40 character per line (or up the the first blank
; space if this is less than position 40) are processed you can safely make
; notes after this length. If there is any problem processing this file
; and internal default definition will be used.
; for each cylinder defined all 8 values must be specified with valid values
; the tokens can be in any order. $PAYHEAD-DEF-TYPE=CUSTOM  must be present
;
; scale (optional defaults to 1) multiplies all the values so to change from mm to inch
; change scale from 1 to 0.039370079, scale is also useful if you want to
; make it a bit bigger or smaller and can't be bothered thinking too much!
; if $PAYHEAD-DEF-START=1 is specified before all 8 values have been specified those
; values will be discarded and a new cylinder started.
; copy this file and Use the copy as a template.
; there is no limit to the number of cylinders but remember more will slow the graphics down
;--------------------------------------<40;
;
$PAYHEAD-DEF-TYPE=CUSTOM                   ! definition type
$PAYHEAD-DEF-SCALE=1.0
;
$PAYHEAD-DEF-START=1                       ! start of new cylinder
$PAYHEAD-DEF-TRN=0                         ! 0 cyl has yaw and roll, 1 just has roll
$PAYHEAD-DEF-R1=30.0                       ! cylinder radius
$PAYHEAD-DEF-P1X=20.0                      ! cylinder end 1, centre coordinate x
$PAYHEAD-DEF-P1Y=0.0                       ! cylinder end 1, centre coordinate y
$PAYHEAD-DEF-P1Z=0.0                       ! cylinder end 1, centre coordinate z
$PAYHEAD-DEF-P2X=20.0                      ! cylinder end 2, centre coordinate x
$PAYHEAD-DEF-P2Y=10.0                      ! cylinder end 2, centre coordinate y
$PAYHEAD-DEF-P2Z=0.0                       ! cylinder end 2, centre coordinate z
;
$PAYHEAD-DEF-START=1                       ! start of new cylinder
$PAYHEAD-DEF-TRN=0                         ! 0 cyl has yaw and roll, 1 just has roll
$PAYHEAD-DEF-R1=5.0                        ! cylinder radius
$PAYHEAD-DEF-P1X=45.0
$PAYHEAD-DEF-P1Y=5.0
$PAYHEAD-DEF-P1Z=0.0
$PAYHEAD-DEF-P2X=45.0
$PAYHEAD-DEF-P2Y=210.0
$PAYHEAD-DEF-P2Z=0.0
;
$PAYHEAD-DEF-START=1                       ! start of new cylinder
$PAYHEAD-DEF-TRN=0                         ! 0 cyl has yaw and roll, 1 just has roll
$PAYHEAD-DEF-R1=70.0                       ! cylinder radius
$PAYHEAD-DEF-P1X=0.0
$PAYHEAD-DEF-P1Y=200.0
$PAYHEAD-DEF-P1Z=0.0
$PAYHEAD-DEF-P2X=0.0
$PAYHEAD-DEF-P2Y=220.0
$PAYHEAD-DEF-P2Z=0.0
Cadfil Custom Payout Head 3D View
Cadfil Custom Payout Head 3D View