Optional
entities: MakeWireInputRest
...args: any[]Sequentually build a Wire
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
Process Shapes sequentially and combine them into a Wire
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
We get unconnected Edges a lot ( because OC is somewhat loose with Edges in Wires ) This algorithm reconstructs a Collection of Array of Edges into a ordered (by number of Edges) Array of Wires
Optional
radius: numberReturns 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
Make a Solid by lofting from one Wire through section Wires (private: without adding to Scene)
Optional
solid: booleanOffset Wire to create a new parallel Wire at given distance (private) IMPORTANT: -amount means the Wire becomes smaller. We will check for that!
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
Sweep a profile Wire or Face ( see Face.ts implementation: splitting inner and outerwires) along a path to create a Shell or Solid
TODO: holes in profile from Face
Optional
solid: booleanOptional
autoRotate: booleanOptional
alignToPath: AlignmentThicken (2D) Wire to create a thick Face (private: without adding to Scene) Compared to offset thickening creates a higher order Shape while offset keeps original Shape type
The total thickness added
Optional
direction: ThickenDirectionPointLike or Side (top,bottom,left,right,front,back)
Optional
onPlaneNormal: PointLikeForce the resulting Face to be on a specific plane given by its normal
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
Aligning linear Shapes to each other so they form a connected Line
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
Fillet Wire at given Vertices or all
Optional
distance: numberOptional
angle: numberOptional
vertices: PointLikeOrVertexCollectionGet closest Point on the other Shape
Alias for union
Extra algorithm to combine Edges into Wire - The OC WireBuilder does this mostly too - but this is triggered as last resort
Optional
radius: numberTest 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!
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
Optional
amount: numberOptional
direction: PointLikeExtrude 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
Fillet Wire at given Vertices or all
Optional
radius: numberOptional
vertices: PointLikeOrVertexCollectionTry to convert something into a Wire
Rest
...args: any[]Create Wire from Points (Vertices or an Array or coords)
Create Wire with Line Edges 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
Make a Solid by lofting a flat Shape through a number of sections
Optional
solid: booleanMake a new Solid by lofting from a flat Shape through a number of sections
Optional
solid: booleanCreate a (righthand or lefthand) Helix with a radius, height and angle. Advanced coneSemiAngle (angle at top) for making a changing Helix radius (- for smaller to top)
Alias for union
Alias for unioned
Generate a Collection of a given number of Vertices equally spaces over this Wire including the start and end IMPORTANT: Parameters on a Wire are not homogenous with length units: We need a bit more advanced solution
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
Sweep a profile Wire or Face ( see Face.ts implementation: splitting inner and outerwires) along a path to create a Shell or Solid
Optional
solid: booleanOptional
autoRotate: booleanOptional
alignToPath: AlignmentSweep a profile Wire or Face ( see Face.ts implementation: splitting inner and outerwires) along a path to create a Shell or Solid
Optional
solid: booleanOptional
autoRotate: booleanOptional
alignToPath: AlignmentThicken (2D) Wire to create a thick Face
Optional
direction: ThickenDirectionPointLike or Side (top,bottom,left,right,front,back)
Optional
onPlaneNormal: PointLikeThicken a Shape depending on its type
Optional
direction: ThickenDirectionall (grow from center), bottom, left, right, top
Optional
onPlaneNormal: PointLikeOutput 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