NGL@1.0.0-beta.7 Home Manual Reference Source Gallery
import StlWriter from 'ngl/src/writer/stl-writer.js'
public class | source

StlWriter

Extends:

Writer → StlWriter

Create an STL File from a surface Object (e.g. for 3D printing)

Example:

molsurf = new MolecularSurface(structure)
surf = molsurf.getSurface({type: 'av', probeRadius: 1.4})
stl = new StlWriter(surf)
stl.download('myFileName')

Constructor Summary

Public Constructor
public

constructor(surface: Surface)

Member Summary

Public Members
public get
public get
public get
public
Private Members
private

Method Summary

Public Methods
public

Inherited Summary

From class Writer
public get abstract
public get abstract
public get abstract
public

download(name: [type], ext: [type]): [type]

Trigger a download of the

public

getBlob(): Blob

Get a blob with the written data

public abstract

getData(): Anything

Public Constructors

public constructor(surface: Surface) source

Params:

NameTypeAttributeDescription
surface Surface

the surface to write out

Public Members

public get defaultExt source

Override:

Writer#defaultExt

public get defaultName source

Override:

Writer#defaultName

public get mimeType source

Override:

Writer#mimeType

public surface source

Private Members

private _records source

Public Methods

public getData() source

Override:

Writer#getData