CloseOpens is a script that will draw lines between open line segments. Open lines segments keep faces from being created.
This script is a huge timesaver for correcting poorly drawn CAD imports.
CloseOpens analyzes your whole model (or only your selection) and locates the two closest open line segments endpoints. It then draws a line between these two points, and then repeats this process until no more open segments can be closed.
Starting with release 1.1 (Nov 2006), CloseOpens no longer draws lines that cross other lines. This may cause CloseOpens to
not resolve some open segments, but in the end, it produces better results because of this new behavior. Also, CloseOpens now requires ProgressBar to report its progress while it runs.
To use the script:
While this script is designed to run against architectural-type drawings, it might "lop off corners", so to speak. For instance, if four lines are supposed to make a rectangle and one corner is not closed, this script will close off the rectangle, but you will be left with a 5-sided polygon. There is still a benefit here, and that is you can now create a face where you could not before.
- Select nothing, your whole model or a portion of your model
- Activate CloseOpens from the Plugins Menu
- You will be prompted with an option to save your model before the script runs. The full path and name of the saved file will be reported to you. If your model does not have a Title, a unique backup name will be generated based on the date and time.
- The script will start and find all open ended line segments in your selection. Watch the status bar on the bottom left of your screen to see how long it expects to run.
- The two closest open segments will be joined with a new line segment. Then, the next two closest lines will be joined with a line segment, and so on until no more open segments can be joined.
- When the script finishes, it will report its success via a popup Messagebox.
This script can be used on contour/site drawings and on other models with random 3D lines. However these types of drawings are much more complicated and running this script against, for example, a contour/site drawing, might resolve some issues, it is likely to draw line segments that do not make sense and are invalid. You can control this behavior via your selection of lines that is is allowed to inspect.
CloseOpens has a "twin" script called ExtendCloseLines. There are a few difference between the two:
This script is one is a series of scripts that can be used to clean up imported .DXF and .DWG files. Also see:
- CloseOpens works with two lines at a time and will draw a new line in any direction in 3D space with the goal of connecting the two open ended lines. CloseOpens, when successful, increases the number of line segments in your model.
- ExtendCloseLines works with only one line at a time, and will only make the line longer if it "appears" to the script that the line needs to be extended in order to connect it with another line. See ExtendCloseLines for visuals describing the difference. When successful, no new lines are created, but rather existing lines are simply made longer.