symbolic package

get_cmd_mapper()

Submodules

symbolic.base_symbolic module

class GLExpr(expr: Expr, lookup_table: Dict | None = None)

Bases: object

property args
to()
class GLFunction(*args, **kwargs)

Bases: Function

GLFunction is a class that extends the functionality of a symbolic function, allowing it to work seamlessly with both symbolic expressions and PyTorch tensors. It serves as a bridge between symbolic computation (using Sympy) and tensor computation, enabling operations that combine these two domains.

cpu()
cuda()
default_assumptions = {}
property device

return the device of the first tensor in the expression

doit(**hints)

Executes reference operators. Can be extended to other operators as well. Used for simplifying expressions with PointReference Functions.

classmethod eval(*args, **kwargs)

TODO: To be used for type checking.

gather_tensor_list(type_annotate=False)

Gathers a list of tensors present in the expression. Used for Parameter optimizing without converting form.

inject_tensor_list(tensor_list)

Injects a list of tensors into the expression, using tensor occurence order to match the tensors. Used for Parameter optimizing without converting form.

numpy()
pretty_print(tabs=0, tab_str='\t')

Returns a formatted string representation of the function and its arguments for pretty printing.

sympy()
to(device)

convert the expression to cuda or cpu

to_tensor(dtype=torch.float32, device='cuda')
GLSymbol(tensor: Tensor) GLExpr
class PrimitiveSpec(prim_type: type, shift: int)

Bases: GLFunction

Base Class nodes (or expression) in the compiled expressions.

default_assumptions = {}
classmethod eval(prim_type: type, shift: int)

TODO: To be used for type checking.

magic_method_decorator(cls)
magic_method_decorator_for_function(cls)

symbolic.color module

class ApplyColor2D(*args, **kwargs)

Bases: ColorModifier2D

This class is mapped to the following evaluator function(s): - torch_compute.color_functions.apply_color Read evaluator specific documentation for more.

default_assumptions = {}
class ColorModifier2D(*args, **kwargs)

Bases: GLFunction

This class is a base for color modifier functions in torch_compute. Read evaluator specific documentation for more.

default_assumptions = {}
class DestinationAtop(*args, **kwargs)

Bases: SVGCombinator

This class is mapped to the following evaluator function(s): - torch_compute.color_functions.destination_atop Read evaluator specific documentation for more.

default_assumptions = {}
class DestinationIn(*args, **kwargs)

Bases: SVGCombinator

This class is mapped to the following evaluator function(s): - torch_compute.color_functions.destination_in Read evaluator specific documentation for more.

default_assumptions = {}
class DestinationOut(*args, **kwargs)

Bases: SVGCombinator

This class is mapped to the following evaluator function(s): - torch_compute.color_functions.destination_out Read evaluator specific documentation for more.

default_assumptions = {}
class DestinationOver(*args, **kwargs)

Bases: SVGCombinator

This class is mapped to the following evaluator function(s): - torch_compute.color_functions.destination_over Read evaluator specific documentation for more.

default_assumptions = {}
class ModifyColor2D(*args, **kwargs)

Bases: ColorModifier2D

This class is mapped to the following evaluator function(s): - torch_compute.color_functions.modify_color Read evaluator specific documentation for more.

default_assumptions = {}
class ModifyOpacity2D(*args, **kwargs)

Bases: ColorModifier2D

This class is mapped to the following evaluator function(s): - torch_compute.color_functions.modify_opacity Read evaluator specific documentation for more.

default_assumptions = {}
class SVGCombinator(*args, **kwargs)

Bases: GLFunction

Base class for all SVG combinators.

default_assumptions = {}
class SVGXOR(*args, **kwargs)

Bases: SVGCombinator

This class is mapped to the following evaluator function(s): - torch_compute.color_functions.svg_xor Read evaluator specific documentation for more.

default_assumptions = {}
class SourceAtop(*args, **kwargs)

Bases: SVGCombinator

This class is mapped to the following evaluator function(s): - torch_compute.color_functions.source_atop Read evaluator specific documentation for more.

default_assumptions = {}
class SourceIn(*args, **kwargs)

Bases: SVGCombinator

This class is mapped to the following evaluator function(s): - torch_compute.color_functions.source_in Read evaluator specific documentation for more.

default_assumptions = {}
class SourceOut(*args, **kwargs)

Bases: SVGCombinator

This class is mapped to the following evaluator function(s): - torch_compute.color_functions.source_out Read evaluator specific documentation for more.

default_assumptions = {}
class SourceOver(*args, **kwargs)

Bases: SVGCombinator

This class is mapped to the following evaluator function(s): - torch_compute.color_functions.source_over Read evaluator specific documentation for more.

default_assumptions = {}
class SourceOverSequence(*args, **kwargs)

Bases: SVGCombinator

This class is mapped to the following evaluator function(s): - torch_compute.color_functions.source_over_seq Read evaluator specific documentation for more.

default_assumptions = {}

symbolic.combinators module

class Combinator(*args, **kwargs)

Bases: GLFunction

This class is a base for combinator functions in torch_compute. Read evaluator specific documentation for more.

default_assumptions = {}
class Complement(*args, **kwargs)

Bases: Combinator

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_complement Read evaluator specific documentation for more.

default_assumptions = {}
class Difference(*args, **kwargs)

Bases: Combinator

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_difference - torch_compute.sdf_operators.create_boolean_difference_node_seq Read evaluator specific documentation for more.

default_assumptions = {}
class Intersection(*args, **kwargs)

Bases: Combinator

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_intersection - geometry_nodes.geonodes.create_boolean_intersection_node_seq Read evaluator specific documentation for more.

default_assumptions = {}
class JoinUnion(*args, **kwargs)

Bases: Union

This class is specifically for Blender evaluator. In torch_compute, it is the same as Union. This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_union - geometry_nodes.geonodes.create_boolean_join_node_seq Read Blender evaluator specific documentation for more.

default_assumptions = {}
class SmoothDifference(*args, **kwargs)

Bases: Combinator

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_smooth_difference Read evaluator specific documentation for more.

default_assumptions = {}
class SmoothIntersection(*args, **kwargs)

Bases: Combinator

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_smooth_intersection Read evaluator specific documentation for more.

default_assumptions = {}
class SmoothUnion(*args, **kwargs)

Bases: Combinator

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_smooth_union Read evaluator specific documentation for more.

default_assumptions = {}
class SwitchedDifference(*args, **kwargs)

Bases: Combinator

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_switched_difference Read evaluator specific documentation for more.

default_assumptions = {}
class Union(*args, **kwargs)

Bases: Combinator

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_union - geometry_nodes.geonodes.create_boolean_union_node_seq Read evaluator specific documentation for more.

default_assumptions = {}

symbolic.common module

sig_check(sig_tuple_list)

symbolic.primitives_2d module

class Arc2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_arc Read evaluator specific documentation for more.

default_assumptions = {}
class BlobbyCross2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_blobby_cross Read evaluator specific documentation for more.

default_assumptions = {}
class Box2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_box Read evaluator specific documentation for more.

default_assumptions = {}
class Circle2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_circle Read evaluator specific documentation for more.

default_assumptions = {}
class CircleWave2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_circle_wave Read evaluator specific documentation for more.

default_assumptions = {}
class CoolS2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_cool_s Read evaluator specific documentation for more.

default_assumptions = {}
class Cross2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_cross Read evaluator specific documentation for more.

default_assumptions = {}
class CutDisk2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_cut_disk Read evaluator specific documentation for more.

default_assumptions = {}
class Egg2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_egg Read evaluator specific documentation for more.

default_assumptions = {}
class Ellipse2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_ellipse Read evaluator specific documentation for more.

default_assumptions = {}
class EquilateralTriangle2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_equilateral_triangle Read evaluator specific documentation for more.

default_assumptions = {}
class Heart2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_heart Read evaluator specific documentation for more.

default_assumptions = {}
class Hexagram2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_hexagram Read evaluator specific documentation for more.

default_assumptions = {}
class HorseShoe2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_horse_shoe Read evaluator specific documentation for more.

default_assumptions = {}
class Hyperbola2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_hyperbola Read evaluator specific documentation for more.

default_assumptions = {}
class IsoscelesTriangle2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_isosceles_triangle Read evaluator specific documentation for more.

default_assumptions = {}
class Moon2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_moon Read evaluator specific documentation for more.

default_assumptions = {}
class NoParamCircle2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_no_param_circle Read evaluator specific documentation for more.

default_assumptions = {}
class NoParamRectangle2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_no_param_rectangle Read evaluator specific documentation for more.

default_assumptions = {}
class NoParamTriangle2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_no_param_triangle Read evaluator specific documentation for more.

default_assumptions = {}
class NullExpression2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf_null_op Read evaluator specific documentation for more.

default_assumptions = {}
class OrientedBox2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_oriented_box Read evaluator specific documentation for more.

default_assumptions = {}
class OrientedVesica2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_oriented_vesica Read evaluator specific documentation for more.

default_assumptions = {}
class Parabola2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_parabola Read evaluator specific documentation for more.

default_assumptions = {}
class ParabolaSegment2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_parabola_segment Read evaluator specific documentation for more.

default_assumptions = {}
class Parallelogram2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_parallelogram Read evaluator specific documentation for more.

default_assumptions = {}
class Pie2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_pie Read evaluator specific documentation for more.

default_assumptions = {}
class Polygon2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_polygon Read evaluator specific documentation for more.

default_assumptions = {}
class Primitive2D(*args, **kwargs)

Bases: GLFunction

Functions for declaring 2D primitives.

default_assumptions = {}
pretty_print(tabs=0, tab_str='\t')

Returns a formatted string representation of the function and its arguments for pretty printing.

class QuadraticBezierCurve2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_quadratic_bezier_curve Read evaluator specific documentation for more.

default_assumptions = {}
class QuadraticCircle2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_quadratic_circle Read evaluator specific documentation for more.

default_assumptions = {}
class Rectangle2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_box Read evaluator specific documentation for more.

default_assumptions = {}
class RegularHexagon2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_regular_hexagon Read evaluator specific documentation for more.

default_assumptions = {}
class RegularPentagon2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_regular_pentagon Read evaluator specific documentation for more.

default_assumptions = {}
class RegularStar2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_regular_star Read evaluator specific documentation for more.

default_assumptions = {}
class Rhombus2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_rhombus Read evaluator specific documentation for more.

default_assumptions = {}
class RoundedBox2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_rounded_box Read evaluator specific documentation for more.

default_assumptions = {}
class RoundedCross2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_rounded_cross Read evaluator specific documentation for more.

default_assumptions = {}
class RoundedX2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_rounded_x Read evaluator specific documentation for more.

default_assumptions = {}
class Segment2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_segment Read evaluator specific documentation for more.

default_assumptions = {}
class Stairs2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_stairs Read evaluator specific documentation for more.

default_assumptions = {}
class Star2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_star_5 Read evaluator specific documentation for more.

default_assumptions = {}
class Trapezoid2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_trapezoid Read evaluator specific documentation for more.

default_assumptions = {}
class Triangle2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_circle Read evaluator specific documentation for more.

default_assumptions = {}
class Tunnel2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_tunnel Read evaluator specific documentation for more.

default_assumptions = {}
class UnevenCapsule2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_uneven_capsule Read evaluator specific documentation for more.

default_assumptions = {}
class Vesica2D(*args, **kwargs)

Bases: Primitive2D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_2d.sdf2d_vesica Read evaluator specific documentation for more.

default_assumptions = {}

symbolic.primitives_3d module

class ArbitraryCappedCone(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_arbitrary_capped_cone Read evaluator specific documentation for more.

default_assumptions = {}
class ArbitraryCappedCylinder3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_arbitrary_capped_cylinder Read evaluator specific documentation for more.

default_assumptions = {}
class ArbitraryRoundCone3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_arbitrary_round_cone Read evaluator specific documentation for more.

default_assumptions = {}
class Box3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_box Read evaluator specific documentation for more.

default_assumptions = {}
class BoxFrame3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_box_frame Read evaluator specific documentation for more.

default_assumptions = {}
class CappedCone3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_capped_cone Read evaluator specific documentation for more.

default_assumptions = {}
class CappedCylinder3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_capped_cylinder Read evaluator specific documentation for more.

default_assumptions = {}
class CappedTorus3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_capped_torus Read evaluator specific documentation for more.

default_assumptions = {}
class Capsule3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_capsule Read evaluator specific documentation for more.

default_assumptions = {}
class Cone3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_cone Read evaluator specific documentation for more.

default_assumptions = {}
class Cuboid3D(*args, **kwargs)

Bases: Box3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_box Read evaluator specific documentation for more.

default_assumptions = {}
class CutHollowSphere(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_cut_hollow_sphere Read evaluator specific documentation for more.

default_assumptions = {}
class CutSphere3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_cut_sphere Read evaluator specific documentation for more.

default_assumptions = {}
class Cylinder3D(*args, **kwargs)

Bases: CappedCylinder3D

This class is mapped to the following evaluator function(s): # TODO: No Mapping yet. Read evaluator specific documentation for more.

default_assumptions = {}
class DeathStar3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_death_star Read evaluator specific documentation for more.

default_assumptions = {}
class HexPrism3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_hex_prism Read evaluator specific documentation for more.

default_assumptions = {}
class InexactAnisotropicGaussian3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_inexact_anisotropic_gaussian Read evaluator specific documentation for more.

default_assumptions = {}
class InexactCone3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_inexact_cone Read evaluator specific documentation for more.

default_assumptions = {}
class InexactEllipsoid3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_inexact_ellipsoid Read evaluator specific documentation for more.

default_assumptions = {}
class InexactOctahedron3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_inexact_octahedron Read evaluator specific documentation for more.

default_assumptions = {}
class InexactSuperQuadrics3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_inexact_super_quadrics Read evaluator specific documentation for more.

default_assumptions = {}
class InfiniteCone3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_plane # TODO: Add support (Used in CSGStump) Read evaluator specific documentation for more.

default_assumptions = {}
class InfiniteCylinder3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_infinite_cylinder Read evaluator specific documentation for more.

default_assumptions = {}
class Link3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_link Read evaluator specific documentation for more.

default_assumptions = {}
class NoParamCuboid3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_no_param_cuboid - geometry_nodes.geonodes.create_cuboid_node_seq Read evaluator specific documentation for more.

default_assumptions = {}
class NoParamCylinder3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_no_param_cylinder - geometry_nodes.geonodes.create_cylinder_node_seq Read evaluator specific documentation for more.

default_assumptions = {}
class NoParamSphere3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_no_param_sphere - geometry_nodes.geonodes.create_sphere_node_seq Read evaluator specific documentation for more.

default_assumptions = {}
class NullExpression3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf_null_op Read evaluator specific documentation for more.

default_assumptions = {}
class Octahedron3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_octahedron Read evaluator specific documentation for more.

default_assumptions = {}
class Plane3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_plane Read evaluator specific documentation for more.

default_assumptions = {}
class PreBakedPrimitive3D(*args, **kwargs)

Bases: Primitive3D

Only for Geometry Nodes. This class is mapped to the following evaluator function(s): - geometry_nodes.geonodes.create_prebaked_primitive_node_seq Read evaluator specific documentation for more.

default_assumptions = {}
class Primitive3D(*args, **kwargs)

Bases: GLFunction

Functions for declaring 3D primitives.

default_assumptions = {}
pretty_print(tabs=0, tab_str='\t')

Returns a formatted string representation of the function and its arguments for pretty printing.

class Pyramid3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_pyramid Read evaluator specific documentation for more.

default_assumptions = {}
class Quadrilateral3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_quadrilateral Read evaluator specific documentation for more.

default_assumptions = {}
class RevolvedVesica3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_revolved_vesica Read evaluator specific documentation for more.

default_assumptions = {}
class Rhombus3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_rhombus Read evaluator specific documentation for more.

default_assumptions = {}
class RoundCone3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_round_cone Read evaluator specific documentation for more.

default_assumptions = {}
class RoundedBox3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_rounded_box Read evaluator specific documentation for more.

default_assumptions = {}
class RoundedCylinder3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_rounded_cylinder Read evaluator specific documentation for more.

default_assumptions = {}
class SolidAngle3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_solid_angle Read evaluator specific documentation for more.

default_assumptions = {}
class Sphere3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_sphere Read evaluator specific documentation for more.

default_assumptions = {}
class Torus3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_torus Read evaluator specific documentation for more.

default_assumptions = {}
class TriPrism3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_tri_prism Read evaluator specific documentation for more.

default_assumptions = {}
class Triangle3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_triangle Read evaluator specific documentation for more.

default_assumptions = {}
class VerticalCappedCylinder3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_capped_cylinder Read evaluator specific documentation for more.

default_assumptions = {}
class VerticalCapsule3D(*args, **kwargs)

Bases: Primitive3D

This class is mapped to the following evaluator function(s): - torch_compute.primitives_3d.sdf3d_vertical_capsule Read evaluator specific documentation for more.

default_assumptions = {}

symbolic.primitives_higher module

class CubicBezierExtrude3D(*args, **kwargs)

Bases: CurvePrimitive3D

# Ref: https://www.shadertoy.com/view/4sKyzW # https://www.shadertoy.com/view/llyXDV This class is mapped to the following evaluator function(s): # TODO: Implement this Read evaluator specific documentation for more.

default_assumptions = {}
class CurvePrimitive3D(*args, **kwargs)

Bases: HigherOrderPrimitives3D

Base class for Curve Extrusion based 3D primitives.

default_assumptions = {}
class HigherOrderPrimitives3D(*args, **kwargs)

Bases: GLFunction

Functions for declaring higher order Primitives.

default_assumptions = {}
class LinearCurve1D(*args, **kwargs)

Bases: Primitive1D

This class is mapped to the following evaluator function(s): # TODO: Implement this Read evaluator specific documentation for more.

default_assumptions = {}
class LinearExtrude3D(*args, **kwargs)

Bases: CurvePrimitive3D

This class is mapped to the following evaluator function(s): - torch_compute.sdf_functions_higher.sdf3d_linear_extrude Read evaluator specific documentation for more.

default_assumptions = {}
class PolyQuadBezierExtrude3D(*args, **kwargs)

Bases: CurvePrimitive3D

This class is mapped to the following evaluator function(s): # TODO: Implement this Read evaluator specific documentation for more.

default_assumptions = {}
class PolyStraightLineCurve1D(*args, **kwargs)

Bases: Primitive1D

This class is mapped to the following evaluator function(s): # TODO: Implement this Read evaluator specific documentation for more.

default_assumptions = {}
class Primitive1D(*args, **kwargs)

Bases: GLFunction

This class is mapped to the following evaluator function(s): # TODO: Implement this Read evaluator specific documentation for more.

default_assumptions = {}
class QuadraticBezierExtrude3D(*args, **kwargs)

Bases: CurvePrimitive3D

This class is mapped to the following evaluator function(s): - torch_compute.sdf_functions_higher.sdf3d_quadratic_bezier_extrude Read evaluator specific documentation for more.

default_assumptions = {}
class QuadraticCurve1D(*args, **kwargs)

Bases: Primitive1D

This class is mapped to the following evaluator function(s): # TODO: Implement this Read evaluator specific documentation for more.

default_assumptions = {}
class Revolution3D(*args, **kwargs)

Bases: HigherOrderPrimitives3D

This class is mapped to the following evaluator function(s): - torch_compute.sdf_functions_higher.sdf3d_revolution Read evaluator specific documentation for more.

default_assumptions = {}
class SimpleExtrusion3D(*args, **kwargs)

Bases: CurvePrimitive3D

This class is mapped to the following evaluator function(s): - torch_compute.sdf_functions_higher.sdf3d_simple_extrusion Read evaluator specific documentation for more.

default_assumptions = {}

symbolic.reference module

class Point3D(*args, **kwargs)

Bases: GLFunction

Class for defining 3D points. Used for attachment operators.

default_assumptions = {}
class PointRef(*args, **kwargs)

Bases: GLFunction

This function is used to create reference to parameterized attachment points. Used for GeoCODE primitives.

default_assumptions = {}
doit(deep=True, **hints)

Executes reference operators. Can be extended to other operators as well. Used for simplifying expressions with PointReference Functions.

pretty_print(tabs=0, tab_str='\t')

Returns a formatted string representation of the function and its arguments for pretty printing.

symbolic.resolve module

load_expr_from_str(expr_str: str, mapper, device)

To load GLExprs from string.

resolve_macros(expr: GLFunction, device)

Extends macros in GeoLIPI.

symbolic.transforms_2d module

class AxialReflect2D(*args, **kwargs)

Bases: Macro2D

Macro for reflecting about a specified axis.

default_assumptions = {}
class AxialScaleSymmetry2D(*args, **kwargs)

Bases: ScaleSymmetry2D

Performs union of canvas and its scaling by param along a specified axis.

default_assumptions = {}
class AxialTranslationSymmetry2D(*args, **kwargs)

Bases: TranslationSymmetry2D

Performs union of canvas and its translation by param along a specified axis.

default_assumptions = {}
class Dilate2D(*args, **kwargs)

Bases: SDFModifier2D

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_dilate Read evaluator specific documentation for more.

default_assumptions = {}
class Distort2D(*args, **kwargs)

Bases: PositionalTransform2D

This class is mapped to the following evaluator function(s): - torch_compute.transforms.position_distort Read evaluator specific documentation for more.

default_assumptions = {}
class Erode2D(*args, **kwargs)

Bases: SDFModifier2D

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_erode Read evaluator specific documentation for more.

default_assumptions = {}
class EulerRotate2D(*args, **kwargs)

Bases: Transform2D

This class is mapped to the following evaluator function(s): - torch_compute.transforms.get_affine_rotate_2D Read evaluator specific documentation for more.

default_assumptions = {}
class Macro2D(*args, **kwargs)

Bases: Modifier2D

Base Class for all 2D macros.

default_assumptions = {}
class Modifier2D(*args, **kwargs)

Bases: GLFunction

Base Class for all 2D modifiers.

default_assumptions = {}
class Onion2D(*args, **kwargs)

Bases: SDFModifier2D

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_onion Read evaluator specific documentation for more.

default_assumptions = {}
class PositionalTransform2D(*args, **kwargs)

Bases: Modifier2D

Base Class for all 2D positional transforms.

default_assumptions = {}
class Reflect2D(*args, **kwargs)

Bases: Macro2D

Performs union of canvas and its reflection about the origin, with the reflection plane’s normal vector specified by param.

default_assumptions = {}
class ReflectCoords2D(*args, **kwargs)

Bases: Transform2D

Simply reflects the coordinates about the origin, w.r.t. the normal vector specified by param. This class is mapped to the following evaluator function(s): - torch_compute.transforms.get_affine_reflection_2D Read evaluator specific documentation for more.

default_assumptions = {}
class ReflectX2D(*args, **kwargs)

Bases: Reflect2D

Macro for reflecting about X axis.

default_assumptions = {}
class ReflectY2D(*args, **kwargs)

Bases: ReflectX2D

Macro for reflecting about Y axis.

default_assumptions = {}
class RotationSymmetry2D(*args, **kwargs)

Bases: Macro2D

Performs union of canvas and its rotation by param.

default_assumptions = {}
class SDFModifier2D(*args, **kwargs)

Bases: Modifier2D

Base Class for all 2D SDF modifiers.

default_assumptions = {}
class Scale2D(*args, **kwargs)

Bases: Transform2D

This class is mapped to the following evaluator function(s): - torch_compute.transforms.get_affine_scale_2D Read evaluator specific documentation for more.

default_assumptions = {}
class ScaleSymmetry2D(*args, **kwargs)

Bases: Macro2D

Performs union of canvas and its scaling by param.

default_assumptions = {}
class Shear2D(*args, **kwargs)

Bases: Transform2D

This class is mapped to the following evaluator function(s): - torch_compute.transforms.get_affine_shear_2D Read evaluator specific documentation for more.

default_assumptions = {}
class Transform2D(*args, **kwargs)

Bases: Modifier2D

Base Class for all 2D transforms.

default_assumptions = {}
class Translate2D(*args, **kwargs)

Bases: Transform2D

This class is mapped to the following evaluator function(s): - torch_compute.transforms.get_affine_translate_2D Read evaluator specific documentation for more.

default_assumptions = {}
class TranslationSymmetry2D(*args, **kwargs)

Bases: Macro2D

Performs union of canvas and its translation by param.

default_assumptions = {}
class TranslationSymmetryX2D(*args, **kwargs)

Bases: TranslationSymmetry2D

Performs union of canvas and its translation by param along X axis.

default_assumptions = {}
class TranslationSymmetryY2D(*args, **kwargs)

Bases: TranslationSymmetryX2D

Performs union of canvas and its translation by param along Y axis.

default_assumptions = {}

symbolic.transforms_3d module

class AxialReflect3D(*args, **kwargs)

Bases: Reflect3D

Macro for reflecting about a specified axis.

default_assumptions = {}
class AxialRotationSymmetry3D(*args, **kwargs)

Bases: RotationSymmetry3D

Performs union of canvas and its rotation by param around a specified axis.

default_assumptions = {}
class AxialScaleSymmetry3D(*args, **kwargs)

Bases: ScaleSymmetry3D

Performs union of canvas and its scaling by param along a specified axis.

default_assumptions = {}
class AxialTranslationSymmetry3D(*args, **kwargs)

Bases: TranslationSymmetry3D

Performs union of canvas and its translation by param along a specified axis.

default_assumptions = {}
class Bend3D(*args, **kwargs)

Bases: PositionalTransform3D

This class is mapped to the following evaluator function(s): - torch_compute.transforms.position_bend Read evaluator specific documentation for more.

default_assumptions = {}
class Dilate3D(*args, **kwargs)

Bases: SDFModifier3D

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_dilate Read evaluator specific documentation for more.

default_assumptions = {}
class Distort3D(*args, **kwargs)

Bases: PositionalTransform3D

This class is mapped to the following evaluator function(s): - torch_compute.transforms.position_distort Read evaluator specific documentation for more.

default_assumptions = {}
class Erode3D(*args, **kwargs)

Bases: SDFModifier3D

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_erode Read evaluator specific documentation for more.

default_assumptions = {}
class EulerRotate3D(*args, **kwargs)

Bases: Transform3D

This class is mapped to the following evaluator function(s): - torch_compute.transforms.get_affine_rotate_euler_3D Read evaluator specific documentation for more.

default_assumptions = {}
class Macro3D(*args, **kwargs)

Bases: Modifier3D

Base Class for all 3D macros.

default_assumptions = {}
class Modifier3D(*args, **kwargs)

Bases: GLFunction

Base Class for all 3D modifiers.

default_assumptions = {}
class Onion3D(*args, **kwargs)

Bases: SDFModifier3D

This class is mapped to the following evaluator function(s): - torch_compute.sdf_operators.sdf_onion Read evaluator specific documentation for more.

default_assumptions = {}
class PositionalTransform3D(*args, **kwargs)

Bases: Modifier3D

Base Class for all 3D positional transforms.

default_assumptions = {}
class QuaternionRotate3D(*args, **kwargs)

Bases: Transform3D

This class is mapped to the following evaluator function(s): #TODO: Implement this Read evaluator specific documentation for more.

default_assumptions = {}
class Reflect3D(*args, **kwargs)

Bases: Macro3D

Performs union of canvas and its reflection about the origin, with the reflection plane’s normal vector specified by param.

default_assumptions = {}
class ReflectCoords3D(*args, **kwargs)

Bases: Transform3D

Simply reflects the coordinates about the origin, w.r.t. the normal vector specified by param. This class is mapped to the following evaluator function(s): - torch_compute.transforms.get_affine_reflection_3D Read evaluator specific documentation for more.

default_assumptions = {}
class ReflectX3D(*args, **kwargs)

Bases: Reflect3D

Macro for reflecting about X axis.

default_assumptions = {}
class ReflectY3D(*args, **kwargs)

Bases: ReflectX3D

Macro for reflecting about Y axis.

default_assumptions = {}
class ReflectZ3D(*args, **kwargs)

Bases: ReflectY3D

Macro for reflecting about Z axis.

default_assumptions = {}
class Rotate5D(*args, **kwargs)

Bases: Transform3D

# For Continuous optimization of rotation # Higher order for differentiable optimization of rotation # Ref: https://arxiv.org/abs/1812.07035 This class is mapped to the following evaluator function(s): #TODO: Implement this Read evaluator specific documentation for more.

default_assumptions = {}
class Rotate6D(*args, **kwargs)

Bases: Transform3D

# For Continuous optimization of rotation # Higher order for differentiable optimization of rotation # Ref: https://arxiv.org/abs/1812.07035 This class is mapped to the following evaluator function(s): #TODO: Implement this Read evaluator specific documentation for more.

default_assumptions = {}
class Rotate9D(*args, **kwargs)

Bases: Transform3D

# For Continuous optimization of rotation # Higher order for differentiable optimization of rotation # Ref: https://arxiv.org/abs/1812.07035 This class is mapped to the following evaluator function(s): #TODO: Implement this Read evaluator specific documentation for more.

default_assumptions = {}
class RotationSymmetry3D(*args, **kwargs)

Bases: Macro3D

Performs union of canvas and its rotation by param.

default_assumptions = {}
class RotationSymmetryX3D(*args, **kwargs)

Bases: RotationSymmetry3D

Performs union of canvas and its rotation by param around X axis.

default_assumptions = {}
class RotationSymmetryY3D(*args, **kwargs)

Bases: RotationSymmetryX3D

Performs union of canvas and its rotation by param around Y axis.

default_assumptions = {}
class RotationSymmetryZ3D(*args, **kwargs)

Bases: RotationSymmetryY3D

Performs union of canvas and its rotation by param around Z axis.

default_assumptions = {}
class SDFModifier3D(*args, **kwargs)

Bases: Modifier3D

Base Class for all 3D SDF modifiers.

default_assumptions = {}
class Scale3D(*args, **kwargs)

Bases: Transform3D

This class is mapped to the following evaluator function(s): - torch_compute.transforms.get_affine_scale_3D Read evaluator specific documentation for more.

default_assumptions = {}
class ScaleSymmetry3D(*args, **kwargs)

Bases: Macro3D

Performs union of canvas and its scaling by param.

default_assumptions = {}
class Shear3D(*args, **kwargs)

Bases: Transform3D

This class is mapped to the following evaluator function(s): - torch_compute.transforms.get_affine_shear_3D Read evaluator specific documentation for more.

default_assumptions = {}
class Transform3D(*args, **kwargs)

Bases: Modifier3D

Base Class for all 3D transforms.

default_assumptions = {}
class Translate3D(*args, **kwargs)

Bases: Transform3D

This class is mapped to the following evaluator function(s): - torch_compute.transforms.get_affine_translate_3D Read evaluator specific documentation for more.

default_assumptions = {}
class TranslationSymmetry3D(*args, **kwargs)

Bases: Macro3D

Performs union of canvas and its translation by param.

default_assumptions = {}
class TranslationSymmetryX3D(*args, **kwargs)

Bases: TranslationSymmetry3D

Performs union of canvas and its translation by param along X axis.

default_assumptions = {}
class TranslationSymmetryY3D(*args, **kwargs)

Bases: TranslationSymmetryX3D

Performs union of canvas and its translation by param along Y axis.

default_assumptions = {}
class TranslationSymmetryZ3D(*args, **kwargs)

Bases: TranslationSymmetryY3D

Performs union of canvas and its translation by param along Z axis.

default_assumptions = {}
class Twist3D(*args, **kwargs)

Bases: PositionalTransform3D

This class is mapped to the following evaluator function(s): - torch_compute.transforms.position_twist Read evaluator specific documentation for more.

default_assumptions = {}

symbolic.types module