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
Make 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
Offset Shape to create a new version parallel to original with a given distance and by corners of given type (arc, intersection)
Optional
amount: numberOptional
type: stringOptional
onPlaneNormal: PointLikeProject 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
Unions 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
Get 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: booleanTest if given entity has equivalent geometry as current Vertex We use the basic tolerance by using Vertex.rounded()
Rest
...args: any[]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
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
Optional
solid: booleanOptional
solid: booleanAlias for union
Alias for unioned
Offset Shape to create a new version parallel to original with a given distance and by corners of given type (arc, intersection)
Optional
amount: numberOptional
type: stringOptional
onPlaneNormal: PointLikePopulate 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
Same as shelled but with replacing the original
Optional
excludeFaces: AnyShapeOrCollectionOrSelectionStringOptional
type: stringThicken Face, Shell or Solid to create a hollow Solid (private)
Optional
excludeFaces: AnyShapeOrCollectionOrSelectionStringOptional
type: stringGet 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: stringOutput 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
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