imagico.de
imagico.de

imagico.de

IsoCSG Library

previous: IsoCSG Library Documentation - part 3 current: IsoCSG Library Documentation - part 4 next: IsoCSG Library Documentation - part 5 Navigation

'iso_bcsg.inc' - Combination of functions and native CSG

This file contains the same macros as the in iso_csg.inc include file, they just generate both the IsoCSG function and the native POV-Ray shape.

Because of this you can't assign the result of those macros to an identifier but have to use nested macros for the whole CSG construction.

There are macros for either extracting the function or the shape as well as for automatic calculation of the container object from the extents of the shape.



Description of the macros

The macros in this file correspond to those in iso_csg.inc but they return both a function and a conventional shape.

For extracting the function or the shape from the macro return value, you need one of the following helper macros:

The CSG macros

IC_BMerge2()

Creates a merge of two functions. Corresponds to the IC_Merge2() macro from iso_csg.inc.

parameters:

fn_A, ob_A, fn_B, ob_B:

IC_BMerge3()

Creates a merge of three functions. Corresponds to the IC_Merge3() macro from iso_csg.inc.

parameters:

fn_A, ob_A, fn_B, ob_B, fn_C, ob_C:

IC_BMerge4()

Creates a merge of four functions. Corresponds to the IC_Merge4() macro from iso_csg.inc.

parameters:

fn_A, ob_A, fn_B, ob_B, fn_C, ob_C, fn_D, ob_D:

IC_BMerge5()

Creates a merge of five functions. Corresponds to the IC_Merge5() macro from iso_csg.inc.

parameters:

fn_A, ob_A, fn_B, ob_B, fn_C, ob_C, fn_D, ob_D, fn_E, ob_E:

IC_BMerge_Array()

Creates a merge of an array of functions. Corresponds to the IC_Merge_Array() macro from iso_csg.inc.

parameters:

Array, Common_Container:

IC_BIntersection2()

Creates an intersection of two functions. Corresponds to the IC_Intersection2() macro from iso_csg.inc.

parameters:

fn_A, ob_A, fn_B, ob_B:

IC_BIntersection3()

Creates an intersection of three functions. Corresponds to the IC_Intersection3() macro from iso_csg.inc.

parameters:

fn_A, ob_A, fn_B, ob_B, fn_C, ob_C:

IC_BIntersection4()

Creates an intersection of four functions. Corresponds to the IC_Intersection4() macro from iso_csg.inc.

parameters:

fn_A, ob_A, fn_B, ob_B, fn_C, ob_C, fn_D, ob_D:

IC_BIntersection5()

Creates an intersection of five functions. Corresponds to the IC_Intersection5() macro from iso_csg.inc.

parameters:

fn_A, ob_A, fn_B, ob_B, fn_C, ob_C, fn_D, ob_D, fn_E, ob_E:

IC_BIntersection_Array()

Creates an intersection of an array of functions. Corresponds to the IC_Intersection_Array() macro from iso_csg.inc.

parameters:

Array, Common_Container:

IC_BDifference2()

Creates an difference of two functions. Corresponds to the IC_Difference2() macro from iso_csg.inc.

parameters:

fn_A, ob_A, fn_B, ob_B:

IC_BDifference3()

Creates an difference of two functions. Corresponds to the IC_Difference3() macro from iso_csg.inc.

parameters:

fn_A, ob_A, fn_B, ob_B, fn_C, ob_C:

IC_BDifference4()

Creates an difference of two functions. Corresponds to the IC_Difference4() macro from iso_csg.inc.

parameters:

fn_A, ob_A, fn_B, ob_B, fn_C, ob_C, fn_D, ob_D:

IC_BDifference5()

Creates an difference of two functions. Corresponds to the IC_Difference5() macro from iso_csg.inc.

parameters:

fn_A, ob_A, fn_B, ob_B, fn_C, ob_C, fn_D, ob_D, fn_E, ob_E:

IC_BDifference_Array()

Creates a difference of an array of functions. Corresponds to the IC_Difference_Array() macro from iso_csg.inc.

parameters:

Array, Common_Container:

IC_BInverse()

Inverts a function. Corresponds to the IC_Inverse() macro from iso_csg.inc.

parameters:

The shape macros

IC_BPlane()

Creates a plane shape in form of an isosurface function. Corresponds to the IC_Plane() macro from iso_csg.inc.

IC_BSphere()

Creates a sphere shape in form of an isosurface function. Corresponds to the IC_Sphere() macro from iso_csg.inc.

IC_BBox()

Creates a box shape in form of an isosurface function. Corresponds to the IC_Box() macro from iso_csg.inc.

IC_BTorus()

Creates a torus shape in form of an isosurface function. Corresponds to the IC_Torus() macro from iso_csg.inc.

IC_BCylinder()

Creates a cylinder shape in form of an isosurface function. Corresponds to the IC_Cylinder() macro from iso_csg.inc.

IC_BCylinder_Hole()

Creates a cylinder shape with hole in form of an isosurface function. Corresponds to the IC_Cylinder_Hole() macro from iso_csg.inc.

IC_BCone()

Creates a cone shape in form of an isosurface function. Corresponds to the IC_Cone() macro from iso_csg.inc.

IC_BSuperellipsoid()

Creates a superellipsoid shape in form of an isosurface function. Corresponds to the IC_Superellipsoid() macro from iso_csg.inc.

The transform macros

IC_BSor()

Creates a sor shape in form of an isosurface function. Corresponds to the IC_Sor() macro from iso_csg.inc.

IC_BRound_Box()

Creates a rounded box shape in form of an isosurface function. Corresponds to the IC_Round_Box() macro from iso_csg.inc.

IC_BTriangle()

Creates a triangle shape in form of an isosurface function. Corresponds to the IC_Triangle() macro from iso_csg.inc.

The transform macros

IC_BTransform()

Transforms a given isosurface function with a transform and returns the resulting function. Corresponds to the IC_Transform() macro from iso_csg.inc.

IC_BTranslate()

Translates a given isosurface function by a vector and returns the resulting function. Corresponds to the IC_Translate() macro from iso_csg.inc.

IC_BScale()

Scales a given isosurface function by a vector and returns the resulting function. Corresponds to the IC_Scale() macro from iso_csg.inc.

IC_BScaleC()

Range corrected version of the scale macro. With asymmetric scaling the values are corrected with the mean of the scale vector. Corresponds to the IC_ScaleC() macro from iso_csg.inc.

IC_BRotateR()

Rotates a given isosurface function and returns the resulting function. Angles given in radians. Corresponds to the IC_RotateR() macro from iso_csg.inc.

IC_BRotate()

Rotates a given isosurface function and returns the resulting function. Angles given in degrees. Corresponds to the IC_Rotate() macro from iso_csg.inc.

IC_BReorient()

Applies a Reorient() transform to a given isosurface function. Corresponds to the IC_Reorient() macro from iso_csg.inc.

IC_BAxisRotate()

Applies a AxisRotate() transform to a given isosurface function. Corresponds to the IC_AxisRotate() macro from iso_csg.inc.

Extraction macros

IC_Extents()

Extracts the function from a iso_bcsg.inc macro return value. The extents of the object representation are written to the global variables IC_Min and IC_Max.

parameters:

example:

#declare fn_1=
  IC_Extents (
    IC_BCone (<0,0,0>0<0,1,0>0.5)
  )

isosurface {
  function {
    fn_1 (xyz)
  }
  contained_by {
    box { IC_Min, IC_Max }
  }
}

IC_Container()

Calculates a container box from the extents of the object representation.

parameters:

example:

isosurface {
  function { ... }
  contained_by {
    IC_Container (
      IC_BCone (<0,0,0>0<0,1,0>0.5)
    )
  }
}

IC_Function()

Extracts the function from a iso_bcsg.inc macro return value.

parameters:

example:

#declare fn_1=
  IC_Function (
    IC_BCone (<0,0,0>0<0,1,0>0.5)
  )

isosurface {
  function {
    fn_1 (xyz)
  }
}

IC_Object()

Extracts the object from a iso_bcsg.inc macro return value.

parameters:

example:

object {
  IC_Object (
    IC_BCone (<0,0,0>0<0,1,0>0.5)
  )
}