Class JXG.Polyhedron3D
JXG.GeometryElement3D,JXG.GeometryElement
↳ JXG.Polyhedron3D
Creates a new 3D point object. Do not use this constructor to create a 3D point. Use JXG.View3D#create with
type Polyhedron3D instead.
Defined in: polyhedron3d.js.
Extends
JXG.GeometryElement, JXG.GeometryElement3D.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
JXG.Polyhedron3D(view, polyhedron, faces, attributes)
A 3D polyhedron is a basic geometric element.
|
- Fields borrowed from class JXG.GeometryElement3D:
- element2D, is3D, view
- Fields borrowed from class JXG.GeometryElement:
- _org_type, _pos, ancestors, aria, baseElement, board, childElements, cssClass, dash, dashScale, descendants, draft, dragToTopOfLayer, dump, element3D, elementClass, elType, fillColor, fillOpacity, fixed, frozen, gradient, gradientAngle, gradientCX, gradientCY, gradientEndOffset, gradientFR, gradientFX, gradientFY, gradientR, gradientSecondColor, gradientSecondOpacity, gradientStartOffset, hasLabel, highlight, highlightCssClass, highlighted, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, ignoreForLabelAutoposition, inherits, isDraggable, isLabel, isReal, lastDragTime, layer, lineCap, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, nonnegativeOnly, notExistingParents, numTraces, parents, precision, priv, quadraticform, rendNode, rotatable, scalable, shadow, snapToGrid, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, tabindex, trace, traceAttributes, traces, transformations, transitionDuration, transitionProperties, type, visible, visProp, visPropCalc, withLabel
- Fields borrowed from class JXG.GeometryElement3D:
- element2D, is3D, view
- Fields borrowed from class JXG.GeometryElement:
- _org_type, _pos, ancestors, aria, baseElement, board, childElements, cssClass, dash, dashScale, descendants, draft, dragToTopOfLayer, dump, element3D, elementClass, elType, fillColor, fillOpacity, fixed, frozen, gradient, gradientAngle, gradientCX, gradientCY, gradientEndOffset, gradientFR, gradientFX, gradientFY, gradientR, gradientSecondColor, gradientSecondOpacity, gradientStartOffset, hasLabel, highlight, highlightCssClass, highlighted, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, ignoreForLabelAutoposition, inherits, isDraggable, isLabel, isReal, lastDragTime, layer, lineCap, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, nonnegativeOnly, notExistingParents, numTraces, parents, precision, priv, quadraticform, rendNode, rotatable, scalable, shadow, snapToGrid, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, tabindex, trace, traceAttributes, traces, transformations, transitionDuration, transitionProperties, type, visible, visProp, visPropCalc, withLabel
| Method Attributes | Method Name and Description |
|---|---|
|
toSTL(name)
Output polyhedron in ASCII STL format.
|
- Methods borrowed from class JXG.GeometryElement:
- _set, addChild, addDescendants, addParents, addParentsFromJCFunctions, addRotation, addTicks, addTransform, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, eval, evalVisProp, formatNumberLocale, fullUpdate, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getProperty, getSnapSizes, getTextAnchor, getType, handleSnapToGrid, hasPoint, hide, hideElement, noHighlight, normalize, prepareUpdate, remove, removeAllTicks, removeChild, removeDescendants, removeTicks, resolveShortcuts, setArrow, setAttribute, setDash, setDisplayRendNode, setLabel, setLabelText, setName, setParents, setPosition, setPositionDirectly, setProperty, show, showElement, snapToPoints, toTopOfLayer, update, updateRenderer, updateVisibility, useLocale
- Events borrowed from class JXG.GeometryElement:
- attribute, attribute:key, down, drag, keydrag, mousedown, mousedrag, mousemove, mouseout, mouseover, mouseup, move, out, over, pendown, pendrag, penup, touchdown, touchdrag, touchup, up
Class Detail
JXG.Polyhedron3D(view, polyhedron, faces, attributes)
A 3D polyhedron is a basic geometric element.
- Parameters:
- {JXG.View3D} view
- The 3D view the polyhedron is drawn on.
- {Object} polyhedron
- Defining data for the polyhedron, i.e. vertice coordinates and faces, which are lists of vertex numbers or keys. The structure of this object is
polyhedron = { view: view, vertices: {}, coords: {}, coords2D: {}, zIndex: {}, faces: [] }; - {Array} faces
- List of face3d objects. These have been already generated in `createPolyhedron3D`.
- {Object} attributes
- An object containing visual properties like in JXG.Options#polyhedron3d and JXG.Options#elements, and optionally a name and an id.
Method Detail
toSTL(name)
Output polyhedron in ASCII STL format.
Normals are ignored and output as 0 0 0.
- Parameters:
- {String} name
- Set name of the model, overwrites property name
- Returns:
- String