Hierarchy

Constructors

Properties

Methods

_addAnnotation _addDimensionsToProj _alignPerc _alignStringToAlignPerc _array1D _axisAndPlanesToVector _checkAxis _closestLinks _copy _copyAttributes _distanceAxis _distanceToShape _elevation _extractShapesFromOcCompound _fix _fixReversedFaces _flattened _fromOcShape _fromOcSolid _getColorRGBA _getEntities _getEntitiesDownFromType _getOBbox _getObjStyle _getOcShapesByType _getShapeTypeFromOcShape _getSide _getSideReal _hashcode _intersections _intersectionsCommon _intersectionsSection _isometry _makeSpecificOcShape _mirrored _mirroredX _mirroredY _mirroredZ _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 _thickened _toWire _unifyDomain _unioned _updateAnnotations _updateFromOcShape _updateOcShape add addToScene added align alignByPoints alignedByPoints area array arrayAlong arrayX arrayY arrayZ attribute attrs bbox bevel beveled capped center chamfer chamfered 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 faces fillet filleted fromAll fromShell fromShells fuse fused getColor getCursor getId getName getSubShapes hide intersect intersected intersecting intersection intersections intersects is2D is2DXY isEmpty isShape isShapeCollection iso isometry length links loft lofted makeBox makeBoxBetween makeCone makeCylinder makeSphere max merge merged min mirrorX mirrorY mirrorZ mirrored mirroredX mirroredY mirroredZ move moveTo moveToOrigin moveX moveY moveZ moved movedTo name normalAt obbox object ocGeom offset offsetted overlapping overlaps parallel pointAtSide populated position project raycast removeFromScene replaceShape revolved rotate rotateAround rotateEuler rotateToAxesBbox rotateToLayFlat rotateVecToVec rotateX rotateY rotateZ rotatedEuler round same scale scaled select shell shelled shells solidType solids specific split splitted strokeWidth style subType subtract subtracted surface sweeped thicken thickened toData toMeshEdges toMeshFaces toMeshShape toMeshVertices toString toSvg toTableData toWire type union unioned 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

  • Parameters

    • ocSolid: any
    • fix: boolean = true

    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

  • 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

  • Thicken a Shape depending on its type

    Parameters

    • amount: number
    • direction: string = 'all'

      all (grow from center), bottom, left, right, top

    Returns AnyShape

  • 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

  • The top surface area of Shape - for example the area of a Box is the top part

    Returns number

  • Parameters

    • Optional key: string
    • Optional value: any

    Returns any

  • 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 Solid

  • For compatibility with ShapeCollection

    Returns number

  • Generic Shape extrude: basically meaning pulling a shape along a Vector for a distance to create a new Shape with higher dimensions For example: Extrude a straight Line along a the z-axis to create a Rectangular Face
    TODO: solid flag

    Parameters

    • Optional amount: number
    • Optional direction: PointLike

    Returns Edge | Face | Shell | Solid

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

    Returns number

  • 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

  • Creates a box of size given by width, depth and height and position

    Parameters

    • Optional width: number
    • Optional depth: number
    • Optional height: number
    • Optional position: PointLike

    Returns Solid

  • Creates a Cone Solid

    Parameters

    • Optional bottomRadius: number
    • Optional topRadius: number
    • Optional height: number
    • Optional position: PointLike
    • Optional angle: number

    Returns Solid

  • Creates a Cylinder with a given radius, height and position

    Parameters

    • Optional radius: number
    • Optional height: number
    • Optional position: PointLike
    • Optional angle: number

    Returns Solid

  • Creates a Sphere Solid

    Parameters

    • Optional radius: number
    • Optional position: PointLike
    • Optional angle: number

    Returns Solid

  • 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

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

    Parameters

    • forceNew: boolean = false

    Returns Obj

  • Offset Shape to create a new version parallel to original with a given distance and by corners of given type (arc, intersection)

    Parameters

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

    Returns AnyShape

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

    Parameters

    Returns boolean

  • Check if this Shape is parallel with the other - the specific meaning of this is different for each Shape Type

    Parameters

    • other: any

    Returns boolean

  • 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

  • Determine if Solid is a primitive type

    Returns string

  • 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

  • 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