Chapter 18. Editing 3DSolids

For creating a complex 3DSolid we use a series of operations that allow us to:
  • Slice an object by an intersecting plane, retaining both parts or only one.
  • Create a flat region from the intersection of a plane with a 3DSolid.
  • Remove from a 3DSolid the volume occupied by other 3DSolid.
  • Add the volumes of two 3DSolids.
  • Create a 3DSolid that occupies the common volume of two overlapping 3DSolids, replacing the two original objects.
  • Create a new 3DSolid that occupies the common volume of two overlapping 3DSolids without deleting the original objects.
The sample programs included in this Chapter show how these operations may be applied to create complex parts. An aspect that should be highlighted is the procedure for applying these transformations, usually referring to the WCS origin and later translating the object to the position and UCS defined by the user.

3DSolid Methods.

3DSolid objects expose four methods, Boolean, CheckInterference, SectionSolid and SliceSolid (Table 17.12). Using the Boolean method they can be combined and edited to form new complex 3DSolids. The same Boolean operations we studied with reference to Regions can be applied to 3DSolids. Two 3DSolids can be joined, subtracted from each other or used to find the volume common to both. The other methods allow creating sections or slicing them.


The SliceSolid method cuts a 3DSolid objects by an arbitrary slicing plane defined from three points. The part of the 3DSolid in the negative half-space is discarded by default. Optionally it can be specify that both parts are kept, creating then a new 3DSolid.


SectionSolid is very much alike the SliceSolid method. This method shouldn’t be confused with the creation of SECTION objects of the kind created with the _SECTIONPLANE command. Because of its relation to 3DSolids we will study these SECTION objects in this same Chapter (Section 18.10).


The information on Boolean operations regarding Regions is also valid in the case of 3DSolids. The added complexity when programming the construction of a complex 3DSolid has to do with the position and spatial orientation of its components. The Boolean method for 3DSolid objects takes three arguments: the object whose Boolean method is invoked, the acBooleanType enum constant  that defines the type of operation and the second object to be used in that operation. As a result, the object received as the first argument is modified.


When modeling mechanical assemblies using 3DSolids it is often necessary to verify if a part interferes with other and if so, we can need data on the interference’s physical characteristics. To meet this need we have the CheckInterference method that operates like the Boolean INTERSECTION operation, but retains the two objects it receives as arguments creating a new object with the intersection volume. This new object can be preserved to retrieve its physical properties or for any other use. This functionality is the same which on which the _INTERFERE command is based.
3D Solids splitting program.
New 3DSolid TRIM and SPLIT commands.
The CheckInterference method can have many uses besides that of checking for possible  interferences. The tutorial in section 18.9 adds two new 3DSolid editing commands to AutoCAD. These will reproduce the functionality of the Solid modeling tools TRIM and SPLIT introduced in Sketchup PRO version 8.
The TRIM tool allows picking a 3DSolid as the trimming object and a selection set of overlapping 3DSolids from which the overlapping portion will be removed without deleting the trimming solid as would be the case if a SUBTRACTION operation was performed.
The SPLIT command is more elaborate, as it will create separate 3DSolids wherever the solids overlap.
In both cases the trick will be to use the Interference solid, as this way none of the Solids on which the command operates will be lost, they will be modified applying Boolean operations using the Interference solid.

Section objects.

Section objects act as cutting planes through 3D objects. These section planes can be used to analyze models by activating live sectioning and to create section drawings. The definition of section objects is exposed as DXF group codes in the classical AutoLISP fashion, so it is possible to create and modify them using entmake/entmod. Although, fine tuning their properties will require using the ActiveX interface.
Section objects automatically created throug programming.

This Chapter includes the following sections:

18.1. Slicing Solids.
18.2. Sample Program: Polyhedra obtained by slicing 3DSolids.
18.3. Sectioning 3DSolids.
18.4. Sample Program: Sections of a Sphere.
18.5. Boolean operations on 3DSolids.
18.6. Sample Program: UNION and SUBTRACTION operations.
18.7. Sample Program: Part created by INTERSECTION..
18.8. CheckInterference: Interference operations.
18.9. Sample programs: 3DSolid TRIM and SPLIT commands.
18.10. Section objects.

18.11. Sample program C:SOL-SECT.
18.12. Summary.
Your questions or comments about this Chapter's contents are welcome!

Buy this book from CreateSpace eStore

No comments:

Post a Comment