HOME

TheInfoList



OR:

Constructive solid geometry (CSG; formerly called computational binary solid geometry) is a technique used in solid modeling. Constructive solid geometry allows a modeler to create a complex surface or object by using
Boolean Any kind of logic, function, expression, or theory based on the work of George Boole is considered Boolean. Related to this, "Boolean" may refer to: * Boolean data type, a form of data with only two possible values (usually "true" and "false" ...
operator Operator may refer to: Mathematics * A symbol indicating a mathematical operation * Logical operator or logical connective in mathematical logic * Operator (mathematics), mapping that acts on elements of a space to produce elements of another ...
s to combine simpler objects,, potentially generating visually complex objects by combining a few primitive ones.. In
3D computer graphics 3D computer graphics, or “3D graphics,” sometimes called CGI, 3D-CGI or three-dimensional computer graphics are graphics that use a three-dimensional representation of geometric data (often Cartesian) that is stored in the computer for t ...
and CAD, CSG is often used in procedural modeling. CSG can also be performed on polygonal meshes, and may or may not be procedural and/or parametric. Contrast CSG with
polygon mesh In 3D computer graphics and solid modeling, a polygon mesh is a collection of , s and s that defines the shape of a polyhedral object. The faces usually consist of triangles ( triangle mesh), quadrilaterals (quads), or other simple convex ...
modeling and
box modeling Box modeling is a technique in 3D modeling where a primitive shape (such as a box, cylinder, sphere, etc.) is used to make the basic shape of the final model. This basic shape is then used to sculpt out the final model. The process uses a number ...
.


Workings

The simplest solid objects used for the representation are called ''
geometric primitive In vector computer graphics, CAD systems, and geographic information systems, geometric primitive (or prim) is the simplest (i.e. 'atomic' or irreducible) geometric shape that the system can handle (draw, store). Sometimes the subroutines tha ...
s''. Typically they are the objects of simple shape: cuboids, cylinders, prisms,
pyramids A pyramid (from el, πυραμίς ') is a structure whose outer surfaces are triangular and converge to a single step at the top, making the shape roughly a pyramid in the geometric sense. The base of a pyramid can be trilateral, quadrilat ...
,
sphere A sphere () is a Geometry, geometrical object that is a solid geometry, three-dimensional analogue to a two-dimensional circle. A sphere is the Locus (mathematics), set of points that are all at the same distance from a given point in three ...
s, cones. The set of allowable primitives is limited by each software package. Some software packages allow CSG on curved objects while other packages do not. An object is ''constructed'' from primitives by means of allowable ''operations'', which are typically
Boolean Any kind of logic, function, expression, or theory based on the work of George Boole is considered Boolean. Related to this, "Boolean" may refer to: * Boolean data type, a form of data with only two possible values (usually "true" and "false" ...
operations Operation or Operations may refer to: Arts, entertainment and media * ''Operation'' (game), a battery-operated board game that challenges dexterity * Operation (music), a term used in musical set theory * ''Operations'' (magazine), Multi-Man ...
on sets: union, intersection and difference, as well as geometric transformations of those sets. A primitive can typically be described by a
procedure Procedure may refer to: * Medical procedure * Instructions or recipes, a set of commands that show how to achieve some result, such as to prepare or make something * Procedure (business), specifying parts of a business process * Standard operat ...
which accepts some number of
parameter A parameter (), generally, is any characteristic that can help in defining or classifying a particular system (meaning an event, project, object, situation, etc.). That is, a parameter is an element of a system that is useful, or critical, when ...
s; for example, a sphere may be described by the coordinates of its center point, along with a radius value. These primitives can be combined into compound objects using operations like these: File:Boolean union.PNG, Union
Merger of two objects into one File:Boolean difference.PNG, Difference
Subtraction of one object from another File:Boolean intersect.PNG, Intersection
Portion common to both objects
Combining these elementary operations, it is possible to build up objects with high complexity starting from simple ones.


Ray tracing

Rendering of constructive solid geometry is particularly simple when ray tracing. Ray tracers intersect a ray with both primitives that are being operated on, apply the operator to the intersection intervals along the 1D ray, and then take the point closest to the camera along the ray as being the result.


Applications

Constructive solid geometry has a number of practical uses. It is used in cases where simple geometric objects are desired, or where mathematical accuracy is important. Nearly all engineering CAD packages use CSG (where it may be useful for representing tool cuts, and features where parts must fit together). The Quake engine and Unreal engine both use this system, as does Hammer (the native Source engine level editor), and Torque Game Engine/
Torque Game Engine Advanced Torque Game Engine, or TGE, is an open-source cross-platform 3D computer game engine, developed by GarageGames and actively maintained under the current versions Torque 3D as well as Torque 2D. It was originally developed by Dynamix for the 2001 ...
. CSG is popular because a modeler can use a set of relatively simple objects to create very complicated geometry. When CSG is procedural or parametric, the user can revise their complex geometry by changing the position of objects or by changing the Boolean operation used to combine those objects. One of the advantages of CSG is that it can easily assure that objects are "solid" or water-tight if all of the primitive shapes are water-tight. This can be important for some manufacturing or engineering computation applications. By comparison, when creating geometry based upon boundary representations, additional topological data is required, or consistency checks must be performed to assure that the given boundary description specifies a valid solid object. A convenient property of CSG shapes is that it is easy to classify arbitrary points as being either inside or outside the shape created by CSG. The point is simply classified against all the underlying primitives and the resulting boolean expression is evaluated.. This is a desirable quality for some applications such as ray tracing.


Conversion from meshes to CSG

With CSG models being parameterized by construction, they are often favorable over usual meshes when it comes to applications where the goal is to fabricate customized models. For such applications it can be interesting to convert already existing meshes to CSG trees. This problem of automatically converting meshes to CSG trees is called inverse CSG. A resulting CSG tree is required to occupy the same volume in 3D space as the input mesh while having a minimal number of nodes. Simple solutions are preferred to ensure that the resulting model is easy to edit. Solving this problem is a challenge because of the large search space that has to be explored. It combines continuous parameters such as dimension and size of the primitive shapes, and discrete parameters such as the Boolean operators used to build the final CSG tree. Deductive methods solve this problem by building a set of half-spaces that describe the interior of the geometry. These half-spaces are used to describe primitives that can be combined to get the final model. Another approach decouples the detection of primitive shapes and the computation of the CSG tree that defines the final model. This approach exploits the ability of modern program synthesis tools to find a CSG tree with minimal complexity. There are also approaches that use genetic algorithms to iteratively optimize an initial shape towards the shape of the desired mesh.


Notable applications with CSG support


Generic modelling languages and software

* HyperFun * PLaSM


Ray tracing and particle transport

* PhotoRealistic RenderMan *
POV-Ray The Persistence of Vision Ray Tracer, most commonly acronymed as POV-Ray, is a cross-platform ray-tracing program that generates images from a text-based scene description. It was originally based on DKBTrace, written by David Kirk Buck and Aaro ...


Computer-aided design

*
AutoCAD AutoCAD is a commercial computer-aided design (CAD) and drafting software application. Developed and marketed by Autodesk, AutoCAD was first released in December 1982 as a desktop app running on microcomputers with internal graphics controllers. ...
* Autodesk Inventor *
Autodesk Fusion 360 Fusion 360 is a commercial computer-aided design (CAD), computer-aided manufacturing (CAM), computer-aided engineering (CAE) and printed circuit board (PCB) design software application, developed by Autodesk. It is available for Windows an ...
* BRL-CAD * CATIA * FreeCAD * NX CAD * SolveSpace * Onshape * OpenSCAD * PTC Creo Parametric (formerly known as Pro/Engineer) * Realsoft 3D *
Rhino A rhinoceros (; ; ), commonly abbreviated to rhino, is a member of any of the five extant species (or numerous extinct species) of odd-toed ungulates in the family Rhinocerotidae. (It can also refer to a member of any of the extinct species ...
*
SelfCAD SelfCAD is an online computer-aided design software for 3D modeling and 3D printing, released in 2016. It is browser-based and cloud-based. SelfCAD is a polygon mesh based design program. While SelfCAD is suitable for the everyday user, of all age ...
* Solid Edge *
SolidWorks SolidWorks is a solid modeling computer-aided design (CAD) and computer-aided engineering (CAE) application published by Dassault Systèmes. According to the publisher, over two million engineers and designers at more than 165,000 companies wer ...
* Tinkercad * Vectorworks


Gaming

* Dreams * Godot * GtkRadiant * Unity, via free or paid plug-ins from the Unity Asset Store. * UnrealEd * Valve Hammer Editor * Roblox


Others

*
3Delight 3Delight, also known as 3DelightNSI, is 3D computer graphics software that runs on Microsoft Windows, MacOS and Linux. It is developed by Illumination Research. It is both a photorealistic and NPR path tracing offline renderer based on its ...
* Aqsis (as of version 0.6.0) *
Blender A blender (sometimes called a mixer or liquidiser in British English) is a kitchen and laboratory appliance used to mix, crush, purée or emulsify food and other substances. A stationary blender consists of a blender container with a rotating me ...
– primarily a surface mesh editor, but capable of simple CSG using meta objects and using the Boolean modifier on mesh objects. *
Clara.io Clara.io is web-based freemium 3D computer graphics software developed by Exocortex, a Canadian software company. The free or "Basic" component of their freemium offering, however, places severe restrictions, such as on saving models and importing ...
* Geant4 * MCNP *
SketchUp SketchUp is a suite of subscription products that include SketchUp Pro Desktop, a 3D modeling Computer-Aided Design (CAD) program for a broad range of drawing and design applications — including architectural, interior design, industrial an ...


References

{{reflist Computer-aided design 3D computer graphics Euclidean solid geometry