The presently preferred embodiment of the innovations described herein relate generally to software applications. More specifically, the presently preferred embodiment relates to calculating the internal volume of a solid model.
Volume calculation is known in the 3D CAD industry. To do so, a 3D CAD application extracts all internal faces from a solid model representing an assembly. The extracted faces are then “sewn” together to form another solid model that represents the internal empty volume of the assembly. The volume of that new solid body is then calculated to determine the internal volume of the original solid model.
This industry technique is time consuming and not robust given the following obstacles: (1) it is a manual process that includes hundreds or thousands of faces for extracting; (2) any defect in a sub-assembly can result in failure of the volume estimation process; and (3) when designs are changed the process needs to be re-run leading to decreased efficiencies.
What is needed is a system and method for calculating the internal volume of a solid model that improves upon and corrects the noted obstacles.
To achieve the foregoing, and in accordance with the purpose of the presently preferred embodiment as described herein, the present application provides a computer implemented method for calculating internal volume of a solid model, comprising selecting a seed cube that is internal to a solid model; determining a plurality of surrounding cubes surrounding said seed cube; and calculating a boundary volume from said plurality of surrounding cubes. The method, further comprising generating an internal volume solid model from said boundary volume. The method, further comprising orienting said boundary volume to coincide with an orientation of said solid body to formulate a volume height map. The method, further comprising generating a volume height graph from said volume height map. The method, further comprising determining whether a height value on said volume height map is at a sample point. The method, wherein said seed cube is determined by a selection mechanism. The method, wherein said seed cube is determined based upon a predefined property. The method, wherein said predefined property is a fluid reservoir. The method, further comprising refining to reduce said plurality of boundary cubes. The method, further comprising generating a facet model for said volume. The method, wherein said facet model is created from a plurality of inner boundary faces.
An advantage of the presently preferred embodiment is to provide a computer-program product tangibly embodied in a machine readable medium to perform a method for calculating internal volume of a solid model, comprising instructions operable to cause a computer to select a seed cube that is internal to a solid model; determine a plurality of surrounding cubes surrounding said seed cube; and calculate a boundary volume from said plurality of surrounding cubes. The computer-program product, further comprising instructions to generate an internal volume solid model from said boundary volume. The computer-program product, further comprising instructions for orient said boundary volume to coincide with an orientation of said solid body to formulate a volume height map. The computer-program product, further comprising instructions to generate a volume height graph from said volume height map. The computer-program product, further comprising instructions to determine whether a height value on said volume height map is at a sample point. The computer-program product, wherein said seed cube is determined by a selection mechanism. The computer-program product, wherein said seed cube is determined based upon a predefined property. The computer-program product, wherein said predefined property is a fluid reservoir. The computer-program product, further comprising refining to reduce said plurality of boundary cubes. The computer-program product, further comprising generating a facet model for said volume. The computer-program product, wherein said facet model is created from a plurality of inner boundary faces.
Another advantage of the presently preferred embodiment is to provide a computer implemented method for calculating internal volume of a solid model, comprising generating a voxel model of a space internal to a solid model; traversing said voxel model to determine a boundary volume having a plurality of boundary cubes; calculating a volume of said boundary volume; whereby said calculated volume is a depiction of said space internal.
And another advantage of the presently preferred embodiment is to provide a data processing system having at least a processor and accessible memory to implement a method for calculating internal volume of a solid model, comprising means for selecting a seed cube that is internal to a solid model; means for determining a plurality of surrounding cubes surrounding said seed cube; and means for calculating a boundary volume from said plurality of surrounding cubes.
Other advantages of the presently preferred embodiment will be set forth in part in the description and in the drawings that follow, and, in part will be learned by practice of the presently preferred embodiment. The presently preferred embodiment will now be described with reference made to the following Figures that form a part hereof. It is understood that other embodiments may be utilized and changes may be made without departing from the scope of the presently preferred embodiment.
A presently preferred embodiment will hereinafter be described in conjunction with the appended drawings, wherein like designations denote like elements, and:
a and 5b illustrate a seed cube selection;
The numerous innovative teachings of the present application will be described with particular reference to the presently preferred embodiments. It should be understood, however, that this class of embodiments provides only a few examples of the many advantageous uses of the innovative teachings herein. The presently preferred embodiment provides, among other things, a system and method for calculating the internal volume of a solid model using voxels. Now therefore, in accordance with the presently preferred embodiment, an operating system executes on a computer, such as a general-purpose personal computer.
Referring to
The computer 800 further includes a drive interface 850 that couples at least one storage device 855 and/or at least one optical drive 860 to the bus. The storage device 855 can include a hard disk drive, not shown, for reading and writing to a disk, a magnetic disk drive, not shown, for reading from or writing to a removable magnetic disk drive. Likewise the optical drive 860 can include an optical disk drive, not shown, for reading from or writing to a removable optical disk such as a CD ROM or other optical media. The aforementioned drives and associated computer-readable media provide non-volatile storage of computer readable instructions, data structures, program modules, and other data for the computer 800.
The computer 800 can communicate via a communications channel 865 with other computers or networks of computers. The computer 800 may be associated with such other computers in a local area network (LAN) or a wide area network (WAN), or it can be a client in a client/server arrangement with another computer, etc. Furthermore, the presently preferred embodiment may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices. All of these configurations, as well as the appropriate communications hardware and software, are known in the art.
Software programming code that embodies the presently preferred embodiment is typically stored in the memory 845 of the computer 800. In the client/server arrangement, such software programming code may be stored with memory associated with a server. The software programming code may also be embodied on any of a variety of non-volatile data storage device, such as a hard-drive, a diskette or a CD-ROM. The code may be distributed on such media, or may be distributed to users from the memory of one computer system over a network of some type to other computer systems for use by users of such other systems. The techniques and methods for embodying software program code on physical media and/or distributing software code via networks are well known and will not be further discussed herein.
i=INT(x/L);
j=INT(y/L);
k=INT(z/L), where the cube size for a voxel is L×L×L. This process is repeated for all vertices 215 to produce a collection of cubes, or a boundary set, as a voxel model for a boundary representation of the interested internal space, where the boundary is defined by the solid model.
Si=INT(Px/L);
Sj=INT(Py/L);
Sk=INT(Pz/L), where the user-determined voxel cube has the coordinates [Px, Py, Pz].
The start voxel cube 300, as with any voxel, has 6 faces, 8 corners, and 12 edges, which translates to 26 (=6+8+12) cubes surrounding the start voxel cube, according to the following coordinates: [(Si−1,Sj,Sk], [(Si+1),Sj, Sk], [(Si−1), (Sj−1), Sk], [Si, (Sj−1), Sk], [(Si+1), (Sj−1), Sk], [(Si−1), (Sj+1), Sk], [Si, (Sj+1),Sk], [(Si+1), (Sj+1), Sk], [(Si−1), Sj, (Sk−1)], [Si, Sj, Sk−1)], [(Si+1), Sj, (Sk−1)], [(Si−1), (Sj−1), (Sk−1)], [Si, (Sj−1), (Sk−1)], [(Si+1), (Sj−1), (Sk−1)], [(Si+1), (Sj+1), (Sk−1)], [Si, (Sj+1), (Sk−1)], [(Si+1), (Sj+1), (Sk−1)], [(Si−1), Sj, (Sk+1)], [Si, Sj, (Sk+1)], [(Si+1),Sj, (Sk+1)], [(Si−1), (Sj−1), (Sk+1)], [Si, (Sj−1), (Sk+1)], [(Si+1), (Sj−1), (Sk+1)], [(Si−1), (Sj+1), (Sk+1)], [(Si, (Sj+1), (Sk+1)], and [(Si+1), (Sj+1), (Sk+1)].
Next, calculate a volume of the internal space as determined from the VolumeBoundarySet, according to the following equations:
V_inner=V_cube*N_VolumeSet (Eq. 1)
V_boundary=V_cube*N_VolumeBoundarySet (Eq. 2)
where V_cube=L * L * L N_VolumeSet is the total number of cubes in VolumeSet, and N_VolumeBoudarySet is the total number of cubes in VolumeBoundarySet, so that the total volume of internal space, V, is:
V=V_inner+(V_boundary*50%) (Eq. 3)
Optionally, the user can decide to further refine the boundary by reducing the size of the boundary cubes in half or quarter to gain more precision, if necessary. From the prior steps, inner cubes and boundary cubes were the same size, that is to say, they were the same volume. This step results in the creation of a RefinedBoundarySet.
The user may need to analyze the inner volume while the solid model assembly is in a different orientation. When a different orientation is specified, the highest and lowest point of the voxels in the new direction is calculated. The highest and lowest points then become part of a new volume boundary cubes set. In the presently preferred embodiment, the user sets-up a sample point to gauge the volume. The number of the sample points depends upon the cube size. A data structure, VolumeHeightMap, traverses a loop to store any volume information at each sample point to the VolumeBoudarySet and the VolumeSet. Based on the VolumeHeightMap a Volume-Height graph can be generated by any graph program that has charting capabilities, as illustrated in
From Step 1 through Step 7, the presently preferred embodiment has disclosed a complete solution for calculating the internal volume of a solid model. The presently preferred embodiment may be implemented in digital electronic circuitry, or in computer hardware, firmware, software, or in combinations thereof. An apparatus of the presently preferred embodiment may be implemented in a computer program product tangibly embodied in a machine-readable storage device for execution by a programmable processor; and method steps of the presently preferred embodiment may be performed by a programmable processor executing a program of instructions to perform functions of the presently preferred embodiment by operating on input data and generating output.
The presently preferred embodiment may advantageously be implemented in one or more computer programs that are executable on a programmable system including at least one programmable processor coupled to receive data and instructions from, and to transmit data and instructions to, a data storage system, at least one input device, and at least one output device. The application program may be implemented in a high-level procedural or object-oriented programming language, or in assembly or machine language if desired; and in any case, the language may be a compiled or interpreted language.
Generally, a processor will receive instructions and data from a read-only memory and/or a random access memory. Storage devices suitable for tangibly embodying computer program instructions and data include all forms of nonvolatile memory, including by way of example semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM disks. Any of the foregoing may be supplemented by, or incorporated in, specially-designed ASICs (application2-specific integrated circuits).
A number of embodiments have been described. It will be understood that various modifications may be made without departing from the spirit and scope of the presently preferred embodiment. It is contemplated that the user may define a solid model to hold a fluid reservoir such as oil or gasoline or water. The volume of the fluid reservoir may be determined or selected based upon its characteristics. Further, the volume space to be modeled can be selected by other characteristics such as fluid flow for example by a vacuum cleaner or other wind-tunnel. Therefore, other implementations are within the scope of the following claims.
This Application claims priority to pending Provisional U.S. Application Ser. No. 60/896,702, filed on Mar. 23, 2007, which application is incorporated herein by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
60896702 | Mar 2007 | US |