Outside Loop

  AVC_OSL plugin for AutoCAD and BricsCAD
 Join segments to closed polyline. Convert any curves to polylines. 
Approximation of splines with a given tolerance. Contour optimization.





This command is useful to optimize splines, convert them to polylines. Also very useful to call this program before extrude a contours into a solid. It combines commands _Join, _Boundary, _Overkill, _Splinedit and many additions.
If CNC milling machines are used in your production, then you probably have to prepare the contours of the parts before exporting to the CAM program. It's not enough to take flat images with 3D solids. You need to remove the overlays and intersections of the lines, convert the splines to arcs, close the contours in the polyline, assign the correct layers according to the type of processing. All this work can be done with the regular means of AutoCAD. But it's long and you can not notice many mistakes.

Features of the program

  • Searches for the largest outside loop in a set of intersecting lines and curves.
  • Allows the lines to intersect. All the tails will be cut off.
  • Closes the contours inside the outer, nested into each other. And distributes them on layers - for external and internal milling.
  • It can create several contours at once by one command call.
  • It connects small breaks in the contour.
  • Correct slightly squinting horizontal and vertical.
  • Converts splines and ellipses in a line and an arc with a given tolerance (the maximum deviation from the original curve).
  • Projects 3d splines and 2d and 3d polylines onto the XY plane to convert to normal polylines.
  • Works with the object 2d-polylines, which occurs when the text is exploded using the TXTEXP command.
  • Restores the circles from ellipses and splines when the cylinder was projected crookedly (hole in the solid).
  • Cleans rubbish: small pieces, dots, layers of lines on each other or located too close (similar to the cleaning command Overkill).
  • Gluing tiny trimming lines into full lines and arcs.
  • Is able to replace the chain of small lines with arcs, and vice versa, too straight arcs - by straight lines.
  • Combines a line, broken into segments into one whole. This optimizes the number of segments.
  • Turns the arcs with NormalZ = -1. These are the same arcs that FlatShot leaves and because of which it is impossible to extrude solid, nor to process it on the CNC.
  • Spreads the resulting contours by layers. If inside contours are detected, the program can write the milling depth in the layer name.
  • Identifies the contours of pockets that can not be traversed by a given cutter at a time and placed in a separate layer.
  • Calls the Inside Corner command to form the milling cutter into the corner. This option can be enabled separately for external and for internal loops.
  • It filters the selected lines, ignoring the invisible and auxiliary layers and the type of lines.
  • Works in the UCS. All objects will be projected onto the XY plane of the current UCS.
  • Works within specified, configurable tolerance.
  • You can enable and disable layer management.
  • You can use layers from a template file.
This command is called inside the NC_Prepare (NCP) and Overall Dimensions (DimOverall) commands.
The OSL command is a part of the A>V>C> Pro package. Previously published in the CNC_Prepare plugin.

Download the plugin in the AVC_OSL_nnnn_nn.7z archive. You can use the program for free, but from time to time the activation window will appear. If you donate at least $15, you can disable this window.

 

Commands

 OSL - Join segments to closed polyline. Convert any curves to polylines. Approximation of splines with a given tolerance. Contour optimization.
  • OSLOptions - Open options dialog

Instructions

Select all the curves and call the OSL command. If the objects are not selected in advance, the command will ask them to choose. In the query will be the option Settings - it opens the settings dialog.
The extended optimization process can be interrupted with the Esc key.

Watch the command line - there are displayed all the messages of the program.

Settings

You can bring up the settings dialog by selecting the TUNE option. In addition, the AVC_Pro AutoCAD plugin will connect additional settings tabs to the AutoCAD settings dialog. See CNC tab. In BricsCAD settings can be called with the command +Options. 
All options have a tooltip.
There are many settings and for your convenience, you can use ready-made sets of settings, which I call CNC-Style. You can create up to 9 styles. You can switch the current style in the header of the settings window. And during the work of the command, you can call the SwitchStyle option and select the style by its number.
Attention! The current CNC-style affects all contour commands. Switching the style in one command you will work with this style in all other command too.


The operation of the command is affected by all options from this window, except for the Detailing section. A layer management and a layer template can be set on the A>V>C> tab in the Common Options section.

Known Issues

  • The command places all inside contours in the NC_Inside layer. But this is not always true. There are protrusions on the parts inside the pocket. And they must be milled outside the contour. The program can not understand this from flat pictures. Be careful.
  • The program can leave small stubs of arcs, add unnecessary circles to the contours and make other errors if you incorrectly adjust the Tolerance and Permissible Variation. Be careful when changing the tolerance settings. Return the default settings if you notice strangeness.
  • It may seem that the program is frozen. In fact, too many curves are processed very long. Press Esc and process the contours in groups of 20-30 curves.

Special thanks: This program is based on the source code writed by Sergey Donskov.

Versions

2019.4
    Save NC_ layers

2019.3.4
    AutoCAD 2020 compatibility
    New Activation method

2019.next
Fixed: Error LongOperationManager must exist

2019.2.1
Fixed errors in the search for intersections of arcs and straight lines
Accelerated splines input in BricsCAD

2019.2
Added CNC-styles. Made 5 built-in presets.
Added many new settings. Old features have become optional and customizable.
Added the ability to make corners fillet.
Added ability to write milling depth to Thickness property

2018.12
- The code is rewritten almost completely. A separate miscalculation of unrelated nodes, R-trees, multi-threaded calculations was used. Acceleration of work reaches 100 or more times.

2018.11
- Added bottom panel into the CNC Options Dialog 
- Fixed: in some cases the tolerance settings not saved in CNC Options Dialog
- Fixed: unnecessary arc on tiny gap
CNC options dialog fixed: input numbers error with decimal comma instead of point.
Comments