Copy Shape a number of times by spacing by a certain offset Vector
Calculate the closest distance between two Shapes: returns one or more straight Link Object, where start is from the first Shape NOTE: If two Shapes are the same and parallel ( for example two Edges ) two links for each Vertex are returned
Generate elevation from a given side without adding to Scene
Optional
side: SideOptional
all: booleanSometimes (for example in intersections) OCE returns a Compound Shape: Try to get real singular Shape
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
Optional
amount: numberOptional
direction: PointLikeMake Shape from OC Shape if given, otherwise update properties based on current _ocShape
Get all geometries in this shape, you can specify the types (Vertex, Edge, Wire etc)
Get all subshapes of given type and those of lower types
Get 'side view' Edges, Wire or (TODO) Shells and Solid: !!!! REFACTOR NEEDED - WORKS ONLY FOR 2D !!!! NOTE: Sides really only make sense with closed Shapes: but we keep it in also for Wires
Returns the shared Shape between two Shapes (private)
Calculate intersection between Shapes ( from Face onward ) based on Common algoritm
Calculate intersection with Section algorithm: This works for all Shape types but only returns Vertices or Edges
Generate isometric view from Side or corner of ViewCube ('frontlefttop') or PointLike coordinate Use showHidden=true to output with hidden lines
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
Optional
planeNormal: PointLikeOptional
all: booleanMake a new Shape by revolving a non-solid Shape around an axis given by two Points (Private)
Select Shapes that have all vertices at a specific coordinate within a certain tolerance NOTE: we might introduce a selector later where we select Shapes that intersect a certain coordinate plane
Sort and select Shapes based on distance to a Point - this method combines closest or furthest
Selector: BiggestAlongAxis Selects the Shape(s) that has the biggest coordinate along a certain axis - we use center and max
Select Shapes of which all the Vertices fit inside the given Bbox coordinates: We use Bbox.contains
Select SubShapes by index or indices
Selects all Shapes that have negative coordinates along given axis
Selects shapes of a certain subtype
Selector: ParallelTo
string with axis name (X|Y|Z) or Array with coords [X,Y,Z]
Selects all Shapes that have positive coordinates along given axis
Selects Shapes that intersect with the sides of the Bbox example: "V||fronttop"
Thicken Shell or Solid to create a hollow Solid (private)
Optional
excludeFaces: AnyShapeOrCollectionOrSelectionStringOptional
type: stringCutting in OC with two Faces does not work We hack a little by giving a slight height to the operants
Split current Shape into multiple ones using the given other Shapes (Private method: without adding to Scene) The other Shapes are removed after the operation
Thicken the Face a given amount and direction to create a Solid
Optional
amount: numberOptional
direction: ThickenDirectionUnions one with another Shape (Private method without adding to Scene)
Alias for union
Alias for unioned
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 !!!!
Move, rotate and (later) scale a Shape based on given points on the Shape and destination points NOTE: you need two points for 2D alignment, 3 points for 3D alignment with rotation TODO: Add scaling
Copy current Shape a number of times along X,Y,Z axis with a given spacing
Copies a Shape along a linear path
Alias for array along x-axis
Optional
size: numberOptional
offset: numberAlias for array along y-axis
Optional
size: numberOptional
offset: numberAlias for array along z-axis
Optional
size: numberOptional
offset: numberGet attributes of Shape
Limit a Shape by others: Always returns a single Shape of the same type
If not given we get all intersecting Shapes
Chamfer two connected Edges at given Vertex and with and angle of given Edge
Optional
distance: numberOptional
angle: numberOptional
vertices: PointLikeOrVertexCollectionOptional
edges: ShapeCollectionGet closest Point on the other Shape
Alias for union
Alias for unioned
Test if a one Shape completely contains the other. If other is ShapeCollection test if all its Shapes are contained by current Shape
Optional
dim: DimensionOptionsSorts objects by distance in a certain axis (X,Y,Z) and direcion (- or +)
string with axis, direction and count: X, -Z - TODO num (unique results)[2]
Calculate the distance between this Shape and other
Rest
...args: any[]Returns a Link that is the shortest path from current Shape to the other
Returns the Vector of closest path from current Shape to the other
Get all Edges of this Shape
Generate elevation from a given side and add to Scene
Optional
side: SideOptional
all: booleanIs exactly the same Shape based on its topology/geometry IMPORTANT: this will not always work!
Extrude this Shape towards a given Point or other Shape - we do keep the normal of the Shape if available
Rest
...args: any[]Get all Faces of this Shape
Round corners of Wire with given radius, at given Vertex (same or equals) or VertexCollection or all if given none
Optional
radius: numberOptional
vertices: PointLikeOrAnyShapeOrCollectionOrSelectionStringCreate Face from all kinds of inputs
Rest
...args: any[]Rest
...args: any[]Create a Face from Vertices
Rest
...args: any[]Alias for union
Alias for unioned
Return first Shape of intersections and replace current Shape
Return first Shape of intersections as copy
Get all Shapes in Scene that are intersecting with this Shape
Returns the shared Shape between two Shapes
Alias for isometry()
Generate isometric view from Side or corner of ViewCube ('frontlefttop') or PointLike coordinate Use showHidden=true to output with hidden lines
Get the shortest lines from Shape to the other
Loft current Face
Optional
solid: booleanMake a Shell or Solid by lofting outerWire of Face to other Wire Shapes
Optional
solid: booleanAlias for union
Alias for unioned
Check if a given Point or Shape can be considered parallel to current Face
Populate Shape (linear: Edge/Wire, planar: Face, Shell and solid) with Vertices Resulting Vertices include start and end Vertices
Optional
num: numberProject 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
Optional
planeNormal: PointLikeOptional
all: booleanSome operations on Shape actually create new Shape types: For example Shape.intersections(other) To Updating those in place we use the Obj container of the Shape
Make a new Shape by revolving a non-solid Shape around an axis given by two Points
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
Optional
degY: numberOptional
degZ: numberOptional
pivot: PivotSelect parts of this Shape
examples: cube.select('Edges|Z') cube.select('F>|front and F>|back) - multiple
Get all Shells of this Shape
Get all Solids of this Shape
Split current Shape into multiple ones using the given other Shapes
Create a new Shape by sweeping a the Shape's Wire representation through a Wire Path
Optional
solid: booleanOptional
autoRotate: booleanOptional
alignToPath: stringThicken current Face
Optional
amount: numberOptional
direction: ThickenDirectionThicken a Shape depending on its type
Optional
amount: numberOptional
direction: ThickenDirectionall (grow from center), bottom, left, right, top
Output triangulated Mesh of Faces of this Shape
Exports OC data to verbose mesh data for Three JS. To avoid clear seperation between AY Geom library and Three we output here raw data There are interfaces defined in ExportModels.ts for clarity
Output all Vertices of this Shape into an Array for further processing
Same as unioned but replacing current Shape in Obj
Unions one with another Shape
Get all Vertices of this Shape
Get all Wires of this Shape
Static
fromStatic
isGenerated using TypeDoc
Take Dimensions associated with current Shape to the projected 2D shape NOTE: We can not yet associate dimensions with ShapeCollections, so we link it to the specific Shape within this collection