The Optimize command in BricsCAD v22 makes it easy to correct common drawing errors without requiring you to edit your drawings manually. This command will automatically recognize lines that are not quite vertical, horizontal, or at a 45-degree angle and realigns them. It will also find gaps, close them, and round measurements to the tolerance value you set.
Optimize works with both 2D and 3D drawings, and in this article, we will look at how to apply it to 3D models. In 3D, optimize supports correcting solids and will make corrections like making faces that are near parallel to orthogonal planes being coplanar to these planes and making faces that belong to different solids to be coplanar to one another.
For an example of how to use Optimize on 3D entities, we will use the 3D drawing below. As you can see in the image, there are two 3D entities that have gaps in their alignment on three sets of their faces.
Accessing the Optimize Command
To optimize entities, first, you have to access the Optimize command. There are a couple of ways you can do this. One way is to click on the Optimize tool in the Drawing Optimizations panel. You can find this in the Manage tab of BricsCAD. The other way is to invoke the Optimize command in BricsCAD’s command line by typing it. You can see this in action below.
This action will open the optimization panel, which will be active the whole time you use the Optimize command.
At the top of the optimization panel, you will find the Mode toggle. In our example, we can’t change the mode because we only have 3D entities in the drawing. But if there we both 2D and 3D objects in the drawing, we could choose between the two modes.
In the Entities section of the optimization panel, you can find how many entities are selected in the drawing, and the option Optimize is using to select the entities. In the example, all the entities in the drawing are selected. The other option will allow you to specify which entities will be optimized by manually selecting them.
Below the Entities section, you will see the Options section. Here you can select what you want Optimize to fix in your 3D drawing. There are four optimizations you can apply:
Make almost coplanar faces coplanar
Rectify faces parallel to reference planes
Rectify faces perpendicular to reference planes
Since the rectify faces parallel to the reference plane option is active in our example, only the faces that are parallel to the reference plane we have selected (the XY-plane only) will be selected for optimization.
But if we click on the rectify faces perpendicular to the reference plane option, more faces will be selected in the example because they are perpendicular to the XY reference plane.
Below Options is the Reference Planes section. Here you can choose the reference planes that optimizations will be applied to based on the existing coordinate setup of your drawing, and there are three you can choose:
In our example, we only have the XY-plane selected because we optimize the top face of the 3D entities.
If we choose the XZ-plane in the example instead, the front face of the two entities will be selected. And then, if we preview the optimizations, we can see the front faces of the two entities are lined up.
In the Tolerances section of the optimization panel, you can set the measurement tolerance that BricsCAD will use when applying optimizations. There are three tolerances you can set:
Angle tolerance: Sets the angle tolerance in degrees for the relative position of faces and planes
Distance tolerance: The faces within the tolerance will be made coplanar, parallel, or perpendicular
Rounding precision: Rounds the coordinates to the specified number of digits following the decimal
You should adjust these tolerances based on the measurements in your drawing and what optimizations you want to apply. The slope of the top face in the example drawing is 7 degrees, and the Angle tolerance is set to 8 degrees, so the top slope is within the tolerance and will be optimized.
The Distance tolerance in the example is currently set to 24.997. In the example, the least distance value is 5 centimeters, so we set it to a value that is less than that.
In the next example, you can see that we have both the XY-plane and the XZ-plane reference planes selected in the optimizations panel, but the top faces of the two entities in the drawing are not selected. This is because the distance tolerance value is not large enough. After increasing it so that the difference between the top two faces is within it, it will be selected, and in preview, these faces are coplanar.
Previewing and Applying Optimizations
Now that the tolerances are set in the example, we can preview the result by clicking the Preview button at the bottom of the optimizations panel.
When you preview the image, you can find information about the applied optimizations in the Feedback section of the panel. In our example, one face was rectified. If you click on the Ok button, the optimizations will apply to the drawing.
Optimizing Complex Drawings
In the next example, we have a drawing that is much more complex, with uneven gaps between each of the solids.
We want to close all these gaps. To do this, we select all the options for optimization and make sure that every reference plane is selected.
Then we set the distance tolerance to a larger value to cover all the gaps in the drawing and preview the results. All the gaps in the drawing are closed, and all the faces are coplanar.
Selecting Specific Entities to Optimize
In the next example, we have the same drawing, but this time, we only want to optimize two of the entities in it. To do that, we choose Select entities in drawing in the Options section of the optimization panel and then choose the two entities we want to optimize.
In the example, we only want to optimize the end faces of the two solids that are selected, so we have to make adjustments to the settings. We disable the two planes that we don’t want to optimize and uncheck the Rectify faces perpendicular to reference planes option.
Now only the end faces of the two solids are selected, and when we preview, those faces get optimized.
Now, if we want to make the top and bottom faces of the entities coplanar, we just have to check XZ-plane, and when we preview, those faces also get optimized.
Optimizing can save you a lot of time when you are trying to clean up your 3D drawings. Instead of manually editing the drawing, you can set a few options and tolerances, click a button, and have BricsCAD do the work for you automatically. To see this feature in action, check out the full video this article is based on here.