Using the viewport

How to's for using NCPlot

Using the viewport

Postby scottmartinez » Sun Oct 08, 2006 12:14 pm

The Viewport

The graphics viewport in NCPlot displays the graphical representation of the programmed G-Code tool path. The viewport not only shows you if your program will work as expected, but it also provides help when the results are not what you expected. Using the dynamic pan, zoom and rotate you can quickly spot parts of the tool path that are not correct. The plot controls such as animate, step forward and step backward can then help you locate the trouble spots in the program.

In addition to the tool path graphics, there are four other useful items in the viewport. The first is the View Name, which appears in the top left corner of the viewport and describes the active view orientation. This gives a reminder of which way the view is looking at the part. The second item is the Orientation Icon, which, like the View Name serves to show you which way the part is oriented on the viewport. The icon appears in the lower left corner of the viewport and indicates the positive direction for each axis. The third item are the Axis Lines which are drawn to indicate where the active zero point is. The zero point can represent the machine zero or any of six programmable work zero locations. The last item is the Marker Icon. This icon is an arrow shaped pointer that appears on the viewport and shows the location of the active block endpoint. In addition to marking the location on the viewport, the marker also displays the coordinates of the active point.

Panning, Rotating and Zooming

The viewport can easily be manipulated using just the mouse or keyboard, no buttons or commands are required to activate these functions. The controls vary slightly between the 2D and 3D views. The 3D view refers to the Isometric view. This view mode is only available for Mill machine configurations. All other view modes are 2D views.

3D (Isometric)
Rotate - Press and hold the right mouse button while moving the mouse.
Pan - Press and hold the "Shift" key and the right mouse button while moving the mouse.

2D (All others)
Pan - Press and hold the right mouse button while moving the mouse.

There are several zoom tools which apply to all view modes. The keyboard shortcut keys require that the viewport be active, which means that you should click it before using them.

Mouse Wheel - The view zooms in or out as the mouse wheel is rolled.
Zoom Window - "Z" Key - Allows dragging a box around an area to fit into the viewport.
Zoom Extents - "X" Key - Fits the part drawing into the viewport, including rapid motions.
Zoom All - "A" Key - Fits the part drawing into the viewport, disregarding the rapid motions.
Zoom Selected - "F" Key - Fits only the selected entities into the viewport.
Zoom In - "C" Key - Increases the zoom magnification, making the part appear larger.
Zoom Out - "V" Key - Decreases the zoom magnification, making the part appear smaller.

Adjusting the size of the viewport

The size of the program edit window and the viewport may be adjusted by clicking and dragging the vertical bar that divides the program editor and the viewport. When the mouse pointer is moved over this bar, the pointer changes to an arrow that points left and right. Click and hold the mouse button, move the mouse to the new location for the bar and release the button.

Double-clicking the viewport will hide the program edit window to allow this area to be used by the viewport. This is quick and easy and will remember the size of the edit window when it is restored. Simply double-click it again to restore it.

Setting up viewport colors

Most of the viewport colors may be customized including the background, selected entities, marker icon and the part display. All of the color settings are defined by the machine configuration. To open, click the menu "Setup" then click "Machine Configuration". On the machine setup dialog click the "Viewport Colors" tab.

There are two part coloring methods to select from, called "Color by G-Code" and "Color by Tool". The first method, "Color by G-Code" will draw the part using colors to represent the type of motion that each entity represents. There are four colors, one each for G00 Rapid, G01 Feed, G02 Clockwise arc and G03 Counterclockwise arc. The second method, "Color by Tool" will change color each time a tool change is encountered in the program. A tool change can be indicated by an "M06" tool change code or by any commanded "T" code. This method allows you to quickly see which areas of the part are being cut by each tool in the program. A list of colors are defined and each time a tool change occurs in the program, the viewport switches to the next color in the list.

The other selectable colors are the viewport background color, the color used for selected entities and the color used for the viewport marker icon. Only the axis lines, the axis orientation icon and the viewport title colors are not definable. The color of the axis lines and viewport title will either be black or white, depending on the background color of the viewport. Dark background colors will cause these items to display in white, and bright background colors will cause them to display in black.

Selecting entities on the viewport

The ability to select the entities that make up the backplot of your part is an extremely useful feature of NCPlot. When an entity is selected its color changes to the selection color, and a small square is drawn around its endpoint. The marked endpoint then gives a visual indication of the direction that the entity will machine in. There are three selection methods:

Clicking - Left clicking any of the entities on the viewport will do three things. (1) It will select the entity. (2) The block in the program that created it will be highlighted. (3) The entity info window will show the properties of the selected entity. Multiple entities may be selected by holding the Shift key while left clicking additional entities. Entities may also be unselected by holding the Ctrl key while left clicking selected entities.

Window selecting - Groups of entities can be selected by simply dragging a box around them. Click and hold the left mouse button at one corner of a box and drag the mouse and release the button at the opposite corner. A box will be drawn as the mouse is moved to indicate the area containing the entities to be selected. The box will have either a solid line border or a dashed line border depending on which direction you drag the box. A solid line border appears when you drag to the right and will select everything that is completely inside the box when the mouse button is released. A dashed line border appears when you drag to the left and will select everything that is inside of or touching the borders of the box when the mouse button is released. Holding the Shift key while window selecting will add the selected entities to the current selection set.

Calc tools - The "Calc" menu contains additional tools that make it easier to select groups of entities. For example, the "Select Chain" tool is useful for selecting an entire 2D profile. Just select one entity that is part of the profile, then select this tool. All entities that are connected to the selected one and at the same Z depth are selected automatically. The "Select by Z" tool will go through the entire backplot and select all entities that are at the same Z depth as the currently selected entity. This makes it easy to select all profiles that are at a given depth. The "Select Arc by Radius" tool will select only arc entities that are the same radius as the currently selected arc. You could then create points at the center of each selected arc and use these points to create a drill program.

After a group of entities has been selected, there are a few things that you can do with them:

Export as DXF file - The "File" menu has an option called "Export Selected as DXF File" that will enable you save a DXF file that contains only the entities that you have selected. This can save a lot of work deleting unnecessary geometry from a drawing that contains the entire backplot.

Calc Tools - The Calc tools such as offset and blend radius require that one or more entities be selected. These tools are applied only to the selected entities.

Convert to G-Code - This tool will use the selected entities to create new G-Code snippets. This might not seem very useful at first, after all the selected entities were created from G-Code in the first place, right? Not necessarily, the Calc tools can be used to create new geometry which you can then turn into new G-Code with this tool. You could also take a backplot from a simple 2D profile and use it to create multiple Z passes.
User avatar
Site Admin
Posts: 215
Joined: Sat Mar 11, 2006 8:49 pm

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest