Troubleshooting SmartCAM Graphics

Technote 229
Date: April 2009
Product: All SmartCAM Applications
Version: v14 and up

The problem I am having is:

Jagged edges on lines at angle

If layer or step lines appear to be jagged or stair-stepped, when they are viewed from a non-parallel or perpendicular angle, it usually means the video card anti-aliasing has been disabled in your display driver.

Anti-aliasing is the display feature that smooths out lines drawn on angles.

This functionality is built into your display card driver and hardware and needs to be enabled in same. The process for doing so varies between Windows versions and display driver manufacturers and versions. In general, you open the Display Properties control panel or check Control Panel list for a panel by your video card manufacturer. From there, modify the 3D or OpenGL settings and enable Anti-aliasing.

Anti-aliasing often has a scale to adjust how much to use; for example 2X, 4X, 6X, etc. Try to use as low a value as possible, 2X if you can. Higher values do not smooth out the image that much more, but they do increase the workload for the video processor, which slows down performance.

Show Path flickers or graphics disappear when Show Path is finished.

If the Show Path graphics flicker while running, or if all the temporary graphics disappear immediately after Show Path finishes (but the Show Path dialog is still open), then try adjusting the buffer handling.

Your SmartCAMcnc.INI contains a [Setup] section, with a variable named ShowPathDblBuf. This INI setting can be set to 0 or 1. 0 means turn off double-buffering, while 1 says to enable it.

Initially, set the value to 1, then try Show Path. If it exhibits the same issues, try setting the value to 0.

Then double buffering is enabled (1), there will be a slight performance degradation due to the required buffer swapping.

SmartCAM reads all INI settings on startup, so you will need to close your SmartCAM applications, make your INI changes, and restart to see the results of the INI change. If you do not know where your INI files reside, see Technical Bulletin 244: How Do I Find My INI Files.

The Snap and Free-Coordinate icons are missing.

The separate snap and free-coordinate icons have been removed from the SmartCAM user interface. However, the related functionality still exists. It is now in a simpler combination mode. This change is documented in your application's help file. Select Help > What's New. From the What's New help topic, select 'Issues to Note.'

The large Free-Coordinate cursor is jumpy or flashes when moved.

This is due to the Linear Increment being set too coarsely. Set this value to a smaller number, such as 0.0001.

Open Utility > Increment, then set Linear Increment to a small value. Use File > Keep Defaults to save this value between SmartCAM sessions.

When not needed, you can also turn off unnecessary snap modes. The snap modes icons allow you to select whether to snap to End Points, Mid-Point, Center-point, Intersections, and Spline/Polyline control points. If any of these snap modes are not currently needed, turn them off.

The small Snap cursor is not a small "cross" shape.

This is a Window's controlled setting, configured by your Theme or by the Mouse Properties control panel. Open the Mouse Properties control panel and select the Pointers tab. SmartCAM is using the 'Precision Select' cursor. Whatever cursor you have configured to be used, for this selection, will be used by SmartCAM.

The cursor is leaving trails on the screen as it is moved.

This is an issue with your display driver's OpenGL settings. OpenGL graphics are affected by a number of factors, including the display driver, video chip set, Windows version and service pack, and even DirectX settings. It may take a little experimentation to find which display driver setting is causing the cursor trails and how to resolve the issue.

Additionally, by default the SmartCAM free coordinate cursor uses a technique called XOR to draw the lines directly to the screen and then erase them by drawing over them. This means that the cursor does not have to be added to OpenGL's display list and the entire screen re-rendered each time the cursor moves. XOR drawing was introduced in OpenGL version 1.2. If your system is using an older version of OpenGL, it will not support XOR lines and a different approach will be required to resolve the cursor trails.

Note: You will need to close and restart SmartCAM after each change to see the effects. OpenGL display settings are fixed when the window is opened, so changes made while SmartCAM is running will not be seen nor used. Exit SmartCAM before making any changes and restart to see the results.

  • Update your Video Card Driver

    Make sure you are running with the most recent drivers for your video card. Updating to current drivers often resolves a number of display problems. Download the drivers directly from the video card manufacturer's website; Windows Update should not be relied upon to handle this properly.

  • Modify UseGLXorDraw INI Setting

    Starting with SmartCAM v19.5, this change can be made from within SmartCAM. Use Utility - Options, set the Category to General Options, and adjust the OpenGL XOR Drawing Mode property. If currently set to Front-buffer, change to Back-buffer. If set to Back-buffer, change to Front-buffer.

    For SmartCAM versions older then v19.5, use the manual method described below.

    Your SmartCAMcnc.ini file contains an INI setting, in the [Gui] section, named UseGLXorDraw. By default the value for this INI setting is 1. If you are getting cursor trails, change the value to 2. If it is set to 2, try setting it to 1.

    If you do not know where your INI files reside, see Technical Bulletin 244: How Do I Find My INI Files.

    This INI setting selects which OpenGL buffer will be used for drawing the cursor.

    If you are using an ATI graphics card, setting the value to 2 often resolves the problem.

    There is a third setting for this INI option. Setting the value to 0 disables the XOR cursor. If after experimenting and finding no combination of settings or drivers that will address the cursor trails, you can set this value to 0. This turns off the XOR logic used for the cursor, instead drawing the cursor like all other geometry. This will have performance considerations, since without using XOR drawing, each time the cursor is moved the entire graphics view will need to be redrawn. Use the value 0 only as a last resort.

    This INI setting is documented in the SmartCAM Customization Guide.

  • Change your Active Profile

    Some video card drivers, many NVidia cards for example, include pre-configured settings for various applications. These are often referred to as Profiles. Experiment by changing the active profile to get a different set of display settings. Profiles related to CAD or CAM applications are generally successful. The "AutoCAD" profile most often works, but user's have reported success with the Inventor, SOLIDWORKS, Remote View, Think Design, and UGS Teamcentre Engineering options as well.

    Open your display card's Control Panel; which is also sometimes available under the Display Properties control panel, Settings tab, Advanced button. Sometimes the video card's display settings are in accessed using an applet installed in the Windows Quick Start section of the Start Menu bar. Refer to your video card's documentation for information on how to locate the driver's settings.

    Note: The instructions refer to the display driver settings; settings used to control the display properties. They are not referring to the hardware settings accessed using the Device Manager.

  • Global Video Card Display Properties

    Most video card display drivers offer control over the individual display driver properties. The parameters vary widely and there is no common set, so you will need to review your video card's documentation to see what options are available. These options generally include such features as anti-aliasing, buffer management, vertical sync control, among others.

    Review your video card documentation for information on how to access these controls. In many cases, the display driver includes its own Control Panel; accessed from the Control Panel menu or from the Start menu quick launch area. Another common access method is through the Display Properties control panel, under Settings, then Advanced, then a video card specific tab.

    Under the 3D Settings or OpenGL settings, is generally a high level control option. For ATI's Catalyst Control Panel, this control can often be found by clicking on the 3D node on the settings tree view. For NVidia's control panel, try "Adjust 3D Settings" followed by Adjust Image Settings with Preview. As mentioned, this locations are example, the actual location and name varies widely between video cards, chip sets, operating systems versions, and driver versions.

    The adjustment usually lets you globally adjust the parameters to select whether you want top performance or high quality. Try adjusting this control; try performance first then increment towards Quality. There is also normally an option to "let the application decide", if this exists, try it.

  • Manual Display Properties

    If experimenting with the single "global" setting does not give you the results you need, the next step will be to experiment with the individual settings. These settings are generally accessed in the same manner as the above global setting. The difference is that the global setting adjusts all the other settings en mass, while this step requires adjusting each setting manually.

    Not all settings in the display driver affect OpenGL graphics, some are used for DVD or video display, windows GUI, or games. Refer to your video card documentation to see which settings you should modify.

    Some common setting to experiment with include:

    Anti-Aliasing: SmartCAM usually works better with Anti-Aliasing enabled. If there is an application controlled option, try it first. If not, enable anti-aliasing and set to the lowest aliasing factor - usually 2X. Increase the aliasing factor as needed, not that anti-aliasing is not part of OpenGL and is handled completely by the video card so the larger the value the more work the video card has to perform and the slower the performance.

    Nvidia Graphics Cards
    User's have reported the following steps work well for NVidia video cards:

    • Open NVidia's control panel.
    • Go to Manage 3D Settings.
    • Click on the Program Settings tab.
    • Add your application executable to the program list; for example: ffm.exe.
    • Go to Antialiasing and select override any application settings. Under that, set the value to 2X and click apply.

    Anisotropic Filtering: This is primarily for display of bitmapped textures and usually has no effect on SmartCAM graphics. So user's have reported that setting this option to application controlled has helped. Since this setting generally should not affect SmartCAM, leave it as one of the last changes you might make while configuring your video.

    Triple Buffering: Customers have reported that enabling Triple Buffering can cause cursor trails. Turn Triple Buffering off.

    Buffer Flipping: Customers have reported that the Buffer Flipping mode needs to be in "Use Block Transfer", not "Auto Select".

    General: There may be a number of other settings on the display properties. Where possible, set these to application controlled. Then individually, enable them to the lowest setting and increment from there. Another method is to turn everything off. Then enable each feature one by one, until you find which settings are affecting the cursor trails. Then, for these settings, try adjusting the parameters until you find one that works. If none are working, leave it turned off.

    Note: Through in-house testing and conversations with customers, we have found that most modern video cards can be configured to work. It may take a little experimentation to find which settings are causing problems, but so far, it has been possible to get all video cards working. The exceptions, so far, are motherboard embedded video based on the Intel graphics chip sets. The Intel graphics appears to be using an older OpenGL specification that pre-dates the addition of XOR graphics logic and these cannot be made to work without disabling the XOR cursor.

    If you are using an older video card, that does not support OpenGL 1.2 or better, or motherboard embedded video please consider upgrading to a newer, more capable video adapter. Not only will SmartCAM work better, but it will work faster with faster video processing.

  • Reduce the level of hardware acceleration being used.

    It has been found that the cursor trails can sometimes be eliminated by stepping down Windows video hardware acceleration. This should be a last resort change, as stepping down the hardware acceleration also slows down the video processing.

    Open your Display Properties control panel and select the Settings tab. Pick the Advanced button. When the new dialog opens, select the Troubleshoot tab. There is a slider that controls the level of hardware acceleration used. Reduce this value one notch from Full.

    Continue to reduce by one notch at a time. Checking SmartCAM after each application.

    If this does not resolve the problem, you can increase the support back to Full.

Print Graphics prints SmartCAM windows floating above the Graphics View

If a SmartCAM window, such as the Group Palette or the Print Graphics dialog is above the graphics view, it is captured and printed along with the SmartCAM graphics.

This appears to be related to the NVidia Quadro video card driver settings. There is a setting for a Unified Depth Buffer, or Unified Back Buffer, or Unified Depth/Back Buffer (it varies). When enabled, the video driver takes over Windows depth management and causes this issue.

Open the NVidia control panel and turn this option off.