Hierarchy

Constructors

Properties

Methods

_addAnnotation _addDimensionsToProj _alignPerc _alignStringToAlignPerc _array1D _axisAndPlanesToVector _checkAxis _closestLinks _copy _copyAttributes _distanceAxis _distanceToShape _elevation _extractShapesFromOcCompound _extruded _flattened _fromOcFace _fromOcShape _getColorRGBA _getEntities _getEntitiesDownFromType _getOBbox _getObjStyle _getOcShapesByType _getShapeTypeFromOcShape _getSide _getSideReal _hashcode _intersections _intersectionsCommon _intersectionsSection _intersectionsWithFace _isometry _makeSpecificOcShape _mirrored _mirroredX _mirroredY _mirroredZ _ocGeom _offsetted _pointAtPerc _project _revolved _selectorAtAxisCoord _selectorClosestOrFurtherstTo _selectorClosestTo _selectorDistanceAlongAxis _selectorFurthestTo _selectorInBbox _selectorIndex _selectorNegativeOnAxis _selectorOfSubType _selectorOuterAlongAxis _selectorParallelTo _selectorPositiveOnAxis _selectorSide _selectorSmallestAlongAxis _selectorWithinRange _setShapeEnumToClassName _setToOc _shapeCollectionFromOcCompound _shapeTypeEnumLookup _shelled _solidifyOperantFaces _splitted _subtracted _testUvToBounds _thickened _toOcSurface _toShellWhenOcShell _toWire _twistExtruded _unifyDomain _unioned _updateAnnotations _updateFromOcShape _updateOcShape add addToScene added align alignByPoints alignedByPoints area array arrayAlong arrayX arrayY arrayZ attribute attrs bbox capped center chamfer checkAndFix checkDowngrade checkObj closest closestVertex color combine combined contains copy count dashed dimension directionMinMaxSelector distance distanceLink distanceVec distanceX distanceY distanceZ edges elevation equals extrude extruded extrudedTo faceType faces fillet fromAll fromEdges fromVertices fromWire fuse fused getColor getCursor getId getName getSubShapes hide innerWires intersect intersected intersecting intersection intersections intersects is2D is2DXY isEmpty isPlanar isShape isShapeCollection iso isometry length links loft lofted makeBasePlane makeCircle makePlane makePlaneBetween makeRectBetween max merge merged min mirrorX mirrorY mirrorZ mirrored mirroredX mirroredY mirroredZ move moveTo moveToOrigin moveX moveY moveZ moved movedTo name normal normalAt normalAtUv normalEdge obbox object ocGeom offset offsetted orthogonal outerWire overlapping overlaps parallel planar pointAtSide pointAtUv populated position project raycast removeFromScene replaceShape reverse revolved rotate rotateAround rotateEuler rotateTo rotateToAxesBbox rotateToLayFlat rotateVecToVec rotateX rotateY rotateZ rotatedEuler round same scale scaled select shell shelled shells solids specific split splitted strokeWidth style subType subtract subtracted surface surfaceCenter sweeped thicken thickened toData toMeshEdges toMeshFaces toMeshShape toMeshVertices toShell toString toSvg toTableData toWire twistExtrude twistExtruded type union unioned uvAt uvBounds uvCenter valid vertices visible volume wires workPlaneNormal fromAll isShape

Constructors

Properties

CLASSNAME_TO_SHAPE_ENUM: {
    [key: string]: any;
} = {}

Type declaration

  • [key: string]: any
CLASSNAME_TO_SHAPE_ENUM_STATIC: {
    [key: string]: string;
} = ...

Type declaration

  • [key: string]: string
OC_SHAPE_ENUM_TO_CLASSNAME: {
    [key: string]: string;
} = {}

Type declaration

  • [key: string]: string
_geom: any
_isTmp: boolean = false
_obj: Obj
_oc: any
_ocId: string = null
_ocShape: any = null
_parent: Shape
annotations: DimensionLine[] = []
attributes: ShapeAttributes = {}

Methods

  • Check is a given string is a axis

    Parameters

    • axis: string

    Returns boolean

  • Extrude a Face a certain amount into a given direction. (private: not added to Scene) This always creates a different type of Shape ( from Face to Solid ) to use extruded instead of extrude for now

    Parameters

    • Optional amount: number
    • Optional direction: PointLike

    Returns Solid

  • Returns [number, number, number, number]

  • Parameters

    • ocShape: any
    • Optional type: string

    Returns any[]

  • Create hash for this Shape: can be used to check if an Shape is the same instance (NOTE: not that is has equal geometry!)

    Returns string

  • Generate isometric view from Side or corner of ViewCube ('frontlefttop') or PointLike coordinate Use showHidden=true to output with hidden lines

    Parameters

    • viewpoint: PointLike
    • showHidden: boolean = false
    • transferDimensions: boolean = true

    Returns AnyShapeCollection

  • Make specific from general Shape

    Parameters

    • ocShape: any
    • type: string = null

    Returns any

  • Create mirrored copy relative to XZ plane with its center as pivot or given offset y-coord

    Parameters

    • Optional offset: number

    Returns AnyShape

  • Create mirrored copy relative to the YZ plane with its center as pivot or given offset x-coord

    Parameters

    • Optional offset: number

    Returns AnyShape

  • Make a bigger (+amount) or smaller (-amount) Face (private) NOTE: onPlaneNormal is for consistency and does nothing

    Parameters

    • Optional amount: number
    • Optional type: string
    • Optional onPlaneNormal: PointLike

    Returns Face

  • Project this 3D Shape onto the XY Plane given by a normal Vector (up is the z-axis) It groups the different Edge types in the returning Collection for easy extractions Include flag all=true to include hidden Edges

    IMPORTANT: Projection of a Solid that contains a certain Edge results in different alignment when projecting that Edge individually

    TODO: find a way to identify edges/vertices from before and after projection for example to preserve dimensions

    Parameters

    • Optional planeNormal: PointLike
    • Optional all: boolean

    Returns AnyShapeCollection

  • Returns type of Shape in Archiyou class name: Vertex, Edge, Wire, Face, Shell etc

    Parameters

    • i: any

    Returns any

  • Parameters

    • u: number
    • v: number

    Returns boolean

  • Returns any

  • Extrude and twist a given amount of angles (private, without adding to scene )

    Parameters

    • Optional amount: number
    • Optional angle: number
    • Optional pivot: PointLike
    • Optional direction: PointLike
    • Optional lefthand: boolean

    Returns Solid

  • Update properties from current OC Shape

    Parameters

    • Optional ocShape: any

    Returns void

  • Adds current Shape by wrapping it into an object and adding it either to root Obj (=scene) or adding

    Parameters

    • force: boolean = false

    Returns Shape

  • Align a given Shape to another by supplying a pivot for current Shape, another Shape and the alignment For the pivot and alignment you can supply either a string with the combinations of sides (left,right,front,back,bottom,top) or a array of percentage offsets to [left,front,bottom] corner or Shape and for linear Shapes (Edge,Wire) also start and end !!!! TODO !!!!

    Parameters

    Returns AnyShape

  • Calculate the area of this Face

    Returns number

  • Parameters

    • Optional key: string
    • Optional value: any

    Returns any

  • Center of this surface (not its center of mass!) - Override center() of Shape because it results in weird results

    Returns Point

  • Sometimes we get a certain Shape with only one subshape: like a Shell with only one Face, - A Wire with only one Edge - An Edge with only one Vertex Then downgrade and return a new Shape

    Returns AnyShape

  • Set color on the Object of this Shape

    Parameters

    • value: string | number

    Returns Face

  • For compatibility with ShapeCollection

    Returns number

  • Extrude a Face a certain amount into a given direction. (private: not added to Scene)

    Parameters

    • Optional amount: number
    • Optional direction: PointLike

    Returns Solid

  • Get subtype of Face - used in Selectors

    Returns string

  • Get the color of this Shape as defined in its Obj container

    Returns number

  • is this Shape 2D on XY plane (used for SVG export for example)

    Returns boolean

  • Check if this Face is planar

    Returns boolean

  • To have consistent API between Shape and ShapeCollection instances

    Parameters

    • obj: any

    Returns boolean

  • To have consistent API between Shape and ShapeCollection instances

    Returns boolean

  • Length of a Shape (depending on specific class)

    Returns number

  • Make the base planes of the coordinate system

    Parameters

    • Optional axis: Axis

      can be 'z' for 'xy' plane, or directly 'xy'

    • Optional size: number

    Returns any

  • Get max coordinate of Bbox of this Shape

    Parameters

    • axis: string

    Returns number

  • Get min coordinate of Bbox of this Shape

    Parameters

    • axis: string

    Returns number

  • Mirror Shape relative to XZ plane with its center as pivot or given offset y-coord

    Parameters

    • Optional offset: number

    Returns AnyShape

  • Mirror Shape relative to YZ plane with its center as pivot or given offset x-coord

    Parameters

    • Optional offset: number

    Returns AnyShape

  • Mirror Shape relative to XY plane with its center as pivot or given offset z-coord

    Parameters

    • Optional offset: number

    Returns AnyShape

  • Create mirrored copy relative to XY plane with its center as pivot and add to Scene

    Parameters

    • Optional offset: number

    Returns AnyShape

  • Aliass for move along x-direction

    Parameters

    • distance: number

    Returns Face

  • Aliass for move along x-direction

    Parameters

    • distance: number

    Returns Face

  • Aliass for move along x-direction

    Parameters

    • distance: number

    Returns Face

  • Get normal of Plane Face - use normalAt for curved surfaces

    Returns Vector

  • Get normal at given uv coordinates

    Parameters

    • u: number
    • v: number

    Returns Vector

  • Create a Edge for Planar Face Normal

    Parameters

    • Optional size: number

    Returns Edge

  • Return this Shape wrapped with a Obj instance for adding it to the scene

    Parameters

    • forceNew: boolean = false

    Returns Obj

  • Make the Face bigger (+amount) or smaller (-amount)

    Parameters

    • Optional amount: number
    • Optional type: string
    • Optional onPlaneNormal: PointLike

    Returns Face

  • Make a bigger (+amount) or smaller (-amount) Face (private)

    Parameters

    • Optional amount: number
    • Optional type: string
    • Optional onPlaneNormal: PointLike

    Returns Face

  • Check if this Face is orthogonal (parallel with one of the base planes)

    Returns boolean

  • Tests if two Shape overlap: meaning the two Shapes have at least on Vertex in common

    Parameters

    Returns boolean

  • Alias for isPlanar

    Returns boolean

  • Get position Vector at UV coords

    Parameters

    • u: number
    • v: number

    Returns Point

  • For now we don't have a sense of a pivot and thus clear position of an object, we calculate its center We can override this in the individual subclasses. TODO: For example an position of a Wire is probably more intuitive as its start Vertex

    Returns Point

  • Cast a 'Ray' (infinite Line) towards the Shape and Link information ( the hit point and support topography: Vertex, Edge, Face)

    Parameters

    Returns Link

  • We can delete a Shape from the Scene by removing it's Obj container

    Returns void

  • Rotate sequencely around the x,y and z axis. !!!! IMPORTANT: this is not the same as supplying the independant angles around the axis!

    Parameters

    Returns AnyShape

  • Rotation around X,Y,Z axis with a given pivot (default: center) NOTE: because the order of these rotations if very important we don't call it just rotate. Use rotateX, rotateY and rotateZ to rotate around the main axis

    Parameters

    • degX: number
    • Optional degY: number
    • Optional degZ: number
    • Optional pivot: Pivot

    Returns AnyShape

  • Rotate Shape to place flat on XY plane. Keeps x,y position

    Parameters

    • Optional direction: "vertical" | "horizontal"
    • Optional autoRotate: boolean

    Returns AnyShape

  • For consistency: Refer shell() to extrude() on Faces

    Parameters

    • Optional amount: number

    Returns Solid

  • Thicken Face, Shell or Solid to create a hollow Solid (private)

    Parameters

    • Optional amount: number

    Returns Solid

  • Returns subType of current Shape: For example Edge::Line

    Returns string

  • The total surface Area of a Shape - for example the total surface area of Sphere is 4Ï€r2

    Returns number

  • Create a new Shape by sweeping a the Shape's Wire representation through a Wire Path

    Parameters

    • path: LinearShape
    • Optional solid: boolean
    • Optional autoRotate: boolean
    • Optional alignToPath: string

    Returns Face | Shell | Solid

  • Export entity and minimal data as string (used for outputting on console and hashing )

    Returns string

  • Output all properties of this Obj including that of its Shapes into a { key value } row. This is where Calc gets its main data from

    Returns Object

  • Extrude Face and rotate a given angle

    Parameters

    • Optional amount: number
    • Optional angle: number
    • Optional pivot: PointLike
    • Optional direction: PointLike
    • Optional lefthand: boolean

    Returns Solid

  • Extrude and twist a given amount of angles (public )

    Parameters

    • Optional amount: number
    • Optional angle: number
    • Optional pivot: PointLike
    • Optional direction: PointLike
    • Optional lefthand: boolean

    Returns Solid

  • Get min U, max U, min V and max V parameters of current Face

    Returns number[]

  • Get uv paramaters at center of Face

    Returns number[]

  • Test if a Shape is valid

    Parameters

    • Optional ocShape: any

    Returns any

  • Return if the Shape Obj is set visible or not

    Returns boolean

  • Calculate the volume of this Shape

    Returns number

Generated using TypeDoc