---
name: "sc_Shape"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_Shape"
---

# sc\_Shape(3)

A Shape is a Volume represents an 3D solid.

## NAME

sc::Shape - A **Shape** is a **Volume** represents an 3D solid.

## SYNOPSIS

`#include <shape.h>`

Inherits **sc::Volume**.

Inherited by **sc::ConnollyShape**, **sc::SphereShape**, **sc::Uncapped5SphereExclusionShape**, **sc::UncappedTorusHoleShape**, and **sc::UnionShape**.

### Public Member Functions

**Shape** (const **Ref**\< **KeyVal** \> &keyval)\
 virtual double **distance\_to\_surface** (const **SCVector3** &r, **SCVector3** \*grad=0) const =0\
 virtual int **is\_outside** (const **SCVector3** &r) const\
 void **compute** ()\
 Recompute at least the results that have compute true and are not already computed.  void **interpolate** (const **SCVector3** &p1, const **SCVector3** &p2, double val, **SCVector3** &result)\
 int **value\_implemented** () const\
 Information about the availability of values, gradients, and hessians.

### Additional Inherited Members

## Detailed Description

A **Shape** is a **Volume** represents an 3D solid.

The value of the **Shape** at each point in space is the distance to the surface. The distance is negative if the point is inside the solid. For **Shape** specializations that cannot compute the distance to the surface, the value will be 1.0 outside and -1.0 inside the solid.

## Member Function Documentation

### void sc::Shape::compute ()` [virtual]`

Recompute at least the results that have compute true and are not already computed. This should only be called by **Result**'s members.

Implements **sc::Volume**.

### void sc::Shape::interpolate (const SCVector3 & p1, const SCVector3 & p2, double val, SCVector3 & result)` [virtual]`

Reimplemented from **sc::Volume**.

### int sc::Shape::value\_implemented () const` [virtual]`

Information about the availability of values, gradients, and hessians.

Reimplemented from **sc::Function**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
