mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-28 11:22:59 +01:00
add loops to the extrude
This commit is contained in:
parent
c364ce70a5
commit
e44d39547b
1 changed files with 15 additions and 0 deletions
|
|
@ -5,12 +5,14 @@ import {EntityKind} from "cad/model/entities";
|
|||
import {BooleanDefinition} from "cad/craft/schema/common/BooleanDefinition";
|
||||
import {UnitVector} from "math/vector";
|
||||
import {OperationDescriptor} from "cad/craft/operationPlugin";
|
||||
import {MLoop} from "cad/model/mloop";
|
||||
|
||||
|
||||
interface ExtrudeParams {
|
||||
length: number;
|
||||
doubleSided:boolean,
|
||||
face: MFace;
|
||||
loops: MLoop[];
|
||||
direction?: UnitVector,
|
||||
boolean: BooleanDefinition
|
||||
}
|
||||
|
|
@ -31,6 +33,12 @@ export const ExtrudeOperation: OperationDescriptor<ExtrudeParams> = {
|
|||
|
||||
let occFaces = [];
|
||||
|
||||
if (params.loops?.length > 0) {
|
||||
|
||||
params.loops
|
||||
|
||||
}
|
||||
|
||||
let sketch = ctx.sketchStorageService.readSketch(face.id);
|
||||
if (!sketch) {
|
||||
occFaces.push(params.face);
|
||||
|
|
@ -114,6 +122,13 @@ export const ExtrudeOperation: OperationDescriptor<ExtrudeParams> = {
|
|||
preselectionIndex: 0
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'selection',
|
||||
name: 'loops',
|
||||
capture: [EntityKind.LOOP],
|
||||
label: 'loops',
|
||||
multi: true
|
||||
},
|
||||
{
|
||||
type: 'direction',
|
||||
name: 'direction',
|
||||
|
|
|
|||
Loading…
Reference in a new issue