Class: Geometry

Class representing a geometric shape.

The Geometry class is the base class for all geometric shapes in BeeGraphy's plugin system. Every curve, surface, and solid you work with inherits from this class.

Think of it as the foundation - it provides the common operations that all shapes share: getting the underlying shape, setting planes, copying, and cleanup.

When to use Geometry

You typically won't create Geometry instances directly. Instead, you'll work with its subclasses:

  • Curve - lines, arcs, circles, splines
  • Surface - faces, skins, lofts
  • Solid - boxes, spheres, boolean results

However, many methods accept Geometry as a parameter type, so understanding this base class helps you work with any shape.

Ask AI about this page
ChatGPT

Quick start

// Geometry is usually obtained from other operations
const solid = SolidBuilder.box(new Vector(0, 0, 0), 10, 10, 10);

// Common operations available on all geometry
const shapeCopy = solid.getShape();
solid.setPlane(myPlane);
solid.changePlane(sourcePlane, targetPlane);

// Always clean up when done
solid.delete();

Extended by

Method: constructor

Creates an instance of Geometry.

Parameters

  • shape (TopoDS_Shape): The geometric shape.

Example

const shape = /* specify a shape */;
const instance = new ();
instance.constructor(shape);

Method: shape

Gets the geometric shape.

Example

const instance = new ();
instance.shape();

Method: shape

Sets the geometric shape.

Parameters

  • shape (TopoDS_Shape): The new geometric shape.

Example

const shape = /* specify a shape */;
const instance = new ();
instance.shape(shape);

Method: setPlane

Sets the plane for the geometric shape.

Parameters

  • plane (IPlane): The plane to set.

Returns

The updated geometry.

Example

const plane = /* specify a plane */;
const instance = new ();
instance.setPlane(plane);

Method: changePlane

Changes the plane of the geometric shape.

Parameters

  • source (IPlane): The source plane.
  • target (IPlane): The target plane.

Returns

The geometry with the changed plane.

Example

const source = /* specify a source */;
const target = /* specify a target */;
const instance = new ();
instance.changePlane(source, target);

Method: getShape

Gets a copy of the geometric shape.

Returns

The copied shape.

Example

const instance = new ();
instance.getShape();

Method: delete

Deletes the geometric shape.

Example

const instance = new ();
instance.delete();