22.11.2024 • C3D Modeler

Direct Modeling: Face Replacement and Fillet Resizing

Evgeny Kondratyuk, Direct Modeling Team Leader, C3D Labs, talks about the direct modeling tool updates over the last year and new capabilities now available for the users.

Let us take a look at the new direct modeling functionality and recent updates.

There is a new face replacement function. The primary scenario for this function is replacing one face with another while maintaining the body topology. Another option is replacing multiple faces with a single face. Moreover, we can replace a face with another face shifted equidistantly. When multiple replacement options are available, the user makes a choice.

The second update is the fillet resizing functionality. It was possible to change the radius by a specified amount. Now you can specify a new radius for a selected chain of fillets with tangency continuity.

The images show some use cases of these new functions.

Fig. 1. Face replacement
Fig. 1. Face replacement

The first example demonstrates the face replacement function. Suppose we have a box with brackets. We want to make the orange faces smoother. For this, the user would select the purple surface and replace a fragment of the part with the purple face. Note that this is a history-free model. Still, the fillets highlighted in blue are adapted. There is face trimming on one side and face extension on the other. The overall topology is preserved like in all other direct modeling operations.

Fig. 2. Face replacement
Fig. 2. Face replacement

Here is another example with the same model. If we want to modify the green faces to match the new shape of the supports, we can replace the top faces with another trapezoid-shaped, green face. Note that simple (elementary or ruled) surfaces are extended as required to reach the new face. Complex surfaces (spline, lofted surfaces, etc.) must completely overlap the new face. Reason: extending such surfaces may produce unexpected loops, self-intersections, etc. Besides, there are performance issues.

Fig. 3. Face replacement
Fig. 3. Face replacement

Let us consider how to use this function for trimming. The gear shown at the top is to be trimmed to a certain size. It is not necessary to construct an auxiliary plane. We can use the existing purple plane and pass the equidistant offset upward as an argument. The part will be trimmed. The fillets highlighted in blue will be adapted.

The bottom image shows an analog of extrusion to the surface. The orange faces are replaced by the purple surface, and the fillets are adapted. The extrusion here is natural, and all the side edge shapes are preserved. As we see, the tapered shape of the part feature is also maintained.

Fig. 4. Face replacement
Fig. 4. Face replacement

In some face replacement scenarios, the model topology may be changed. Now we can replace multiple surfaces with a single one. The image shows the replacement of the crystal’s two faces with a single face. This operation results in the loss of the middle edge that connects the orange and yellow faces. Another edge at the front is also removed. The attributes of the new face are borrowed from the face passed as the first argument. The image indicates that the orange face is passed first. Therefore, its attributes and names are inherited. If the yellow face was passed first, all attributes would be inherited from it. Similarly, when edges are merged, the attributes are inherited from the edges of the first face, if possible. In this case, there is no 100% guarantee: it is not always clear which geometry elements have been merged and which edges have been joined.

Fig. 5. Face replacement
Fig. 5. Face replacement

This function supports several replacement options. If the surface is periodic, such as cylindrical or more complex, with multiple overlaps, the C3D kernel provides the user choose the replacement option. The image shows two user-selected options: the top and bottom of the cylinder.

The operation approximately estimates the number of possible options. Note that we say “approximately” since the exact number of possible replacement options can be found only after running all the algorithms. It may be quite long and usually not required, while the approximate estimation is relatively fast. Note that in some cases the operation may fail depending on both the model and the arguments passed. For example, some of the options will fail with certain argument values. Still, the estimation should help the user to choose the replacement option.

We have updated the fillet radius changing operation (refer to the image).

Fig. 6. Fillet radius changing operation
Fig. 6. Fillet radius changing operation

The primary update is that fillets on which other fillets are built are now editable. For example, the green fillet has been built on the inner blue fillets. Nevertheless, we can change the radius of these blue fillets.

The algorithm that joins chains of fillets with tangency continuity has also been refined. Particularly, corner transitions have been improved. The outer blue fillet chain (see the image) can be modified just by selecting any of these fillets, while all the others will be affected as well.

We have improved the detection of spline surfaces as fillets in imported models. It has resulted in a better adaptation of such fillets in all face modification operations.

There are other internal kernel refinements.

The C3D Labs team has created a new API since the legacy API could no longer accommodate the expanding functionality. Following the kernel functions access policy, the direct editing domain has received a new ModifiedSolid function with the MbModifiedSolidParams parameter class. The type of operation is now governed by MbeModifyingMode, a new enum parameter. One enum describes one behavior. We are going to make the overall concept of creating these parameters more intuitive. As to face modification, the user passes a list of faces and the specific operation parameters to the MbModifiedSolidParams constructor. For fillet resizing, it is the new radius; for an offset, it is the offset value; for face replacement, it is a list of new faces and offsets, etc.

Fig. 7. Hot points
Fig. 7. Hot points

We have also added a kernel-side analysis of hot point coordinates. It applies to face replacement, fillet resizing, and offsets. In this way, the user can implement control over the operation parameters using these characteristic points. The image shows the coordinates of these points are calculated even when the operation is not completed. We focused on getting hot point positions in all cases. Small changes in the input parameters, even if the operation fails, should not result in these points being outside the screen, but should stay in the view. These objects (points and vectors) are different for each operation. Generally, if the operation succeeds, it returns the center of the modified face, and if it fails, some estimated position of the face center. There is also the axis of the new fillet for the fillet resizing operation.

Our plans include several items. The testing of the face replacement functionality revealed that there were many more use scenarios than we had expected. We will continue to add more scenarios to the face replacement operation. A large chunk of this work is the replacement of a face group with another face group. The merging of faces with tangency continuity into a single surface will also be enhanced. The fillet adaptation functionality will be improved in all operations. We will refine the spline surface recognition feature to include more scenarios. Perhaps, a dedicated accuracy parameter will be introduced. Finally, we will update the documentation to match the new, expanded functionality, and provide more detailed error codes.

Evgeny Kondratyuk, Direct Modeling Team Leader, C3D Labs
Evgeny Kondratyuk,
Direct Modeling Team Leader,
C3D Labs
Share
Up