/
counterbugtech
/
KontrBugCAD
Обзор
Документация
Войти
/
counterbugtech
/
KontrBugCAD
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
js/core/parametric/executors/ThreadExecutor.js
1 строка
748 B
counterbugtech
версия 0.9.37
17 май 2026, 13:43
Верифицирован
17 май 2026, 13:43
31de57b
Код
Авторство
О чём код?
import{ParametricExecutor}from"./ParametricExecutor.js";import{ThreadGenerator}from"generators/thread-generator.js";export class ThreadExecutor extends ParametricExecutor{constructor(r){super(),this.editor=r,this.threadGenerator=new ThreadGenerator(this.editor.manifoldWrapper)}execute(r,t){const o=r.parameters,e=this.threadGenerator.createThread(o);if(!e)throw new Error("ThreadExecutor: не удалось создать резьбу");return o.position&&Array.isArray(o.position)&&3===o.position.length&&e.position.set(o.position[0],o.position[1],o.position[2]),o.rotation&&Array.isArray(o.rotation)&&3===o.rotation.length&&e.rotation.set(o.rotation[0],o.rotation[1],o.rotation[2]),r.outputs.length>0?e.uuid=r.outputs[0]:r.outputs=[e.uuid],e}}