fix imported function syntax
This commit is contained in:
parent
d83a2fafbc
commit
a5e0a0a48e
1 changed files with 20 additions and 18 deletions
|
|
@ -514,7 +514,7 @@ export async function traces(settings, widget, single) {
|
||||||
* @param {object} opts - options object
|
* @param {object} opts - options object
|
||||||
* @return {array} - array of arrays of triangle data
|
* @return {array} - array of arrays of triangle data
|
||||||
*/
|
*/
|
||||||
CAM.cylinders = async (settings, widget, opts) => {
|
export async function cylinders(settings, widget, opts){
|
||||||
|
|
||||||
let {} = opts ?? {}
|
let {} = opts ?? {}
|
||||||
|
|
||||||
|
|
@ -556,19 +556,21 @@ CAM.cylinders = async (settings, widget, opts) => {
|
||||||
return Array.from(cylinderTriangles.values())
|
return Array.from(cylinderTriangles.values())
|
||||||
}
|
}
|
||||||
|
|
||||||
CAM.surface_find = function(widget, faces, radians) {
|
|
||||||
CAM.surface_prep(widget);
|
|
||||||
return widget.tool.findConnectedSurface(faces, radians || 0, 0.0);
|
|
||||||
};
|
|
||||||
|
|
||||||
CAM.cylinder_find = (widget, face)=>{
|
/**
|
||||||
|
* Find all triangles that are part of the same cylinder as the given triangle
|
||||||
|
* @param {Widget} widget - widget object
|
||||||
|
* @param {number} face - index of face in triangle vertex data
|
||||||
|
* @return {array} - array of all triangle data that belong to the same cylinder
|
||||||
|
*/
|
||||||
|
export async function cylinder_find (widget, face){
|
||||||
CAM.surface_prep(widget);
|
CAM.surface_prep(widget);
|
||||||
return widget.tool.findCylinderSurface(face);
|
return widget.tool.findCylinderSurface(face);
|
||||||
}
|
}
|
||||||
|
|
||||||
CAM.cylinder_poly_find = (widget, face)=>{
|
export async function cylinder_poly_find(widget, face){
|
||||||
CAM.surface_prep(widget);
|
CAM.surface_prep(widget);
|
||||||
let faces = CAM.cylinder_find(widget, face);
|
let faces = cylinder_find(widget, face);
|
||||||
|
|
||||||
let vert = widget.getGeoVertices({ unroll: true, translate: true }).map(v => v.round(4));
|
let vert = widget.getGeoVertices({ unroll: true, translate: true }).map(v => v.round(4));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue