fillet ui follow up (#3035)
This commit is contained in:
@ -3,6 +3,7 @@ import { useCommandsContext } from 'hooks/useCommandsContext'
|
|||||||
import { useKclContext } from 'lang/KclProvider'
|
import { useKclContext } from 'lang/KclProvider'
|
||||||
import { CommandArgument } from 'lib/commandTypes'
|
import { CommandArgument } from 'lib/commandTypes'
|
||||||
import {
|
import {
|
||||||
|
Selection,
|
||||||
canSubmitSelectionArg,
|
canSubmitSelectionArg,
|
||||||
getSelectionType,
|
getSelectionType,
|
||||||
getSelectionTypeDisplayText,
|
getSelectionTypeDisplayText,
|
||||||
@ -11,13 +12,13 @@ import { modelingMachine } from 'machines/modelingMachine'
|
|||||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||||
import { StateFrom } from 'xstate'
|
import { StateFrom } from 'xstate'
|
||||||
|
|
||||||
const semanticEntityNames = {
|
const semanticEntityNames: { [key: string]: Array<Selection['type']> } = {
|
||||||
face: ['extrude-wall', 'start-cap', 'end-cap'],
|
face: ['extrude-wall', 'start-cap', 'end-cap'],
|
||||||
edge: ['edge', 'line', 'arc'],
|
edge: ['edge', 'line', 'arc'],
|
||||||
point: ['point', 'line-end', 'line-mid'],
|
point: ['point', 'line-end', 'line-mid'],
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSemanticSelectionType(selectionType: string[]) {
|
function getSemanticSelectionType(selectionType: Array<Selection['type']>) {
|
||||||
const semanticSelectionType = new Set()
|
const semanticSelectionType = new Set()
|
||||||
selectionType.forEach((type) => {
|
selectionType.forEach((type) => {
|
||||||
Object.entries(semanticEntityNames).forEach(([entity, entityTypes]) => {
|
Object.entries(semanticEntityNames).forEach(([entity, entityTypes]) => {
|
||||||
|
@ -33,7 +33,6 @@ import { applyConstraintAngleLength } from './Toolbar/setAngleLength'
|
|||||||
import {
|
import {
|
||||||
Selections,
|
Selections,
|
||||||
canExtrudeSelection,
|
canExtrudeSelection,
|
||||||
canFilletSelection,
|
|
||||||
handleSelectionBatch,
|
handleSelectionBatch,
|
||||||
isSelectionLastLine,
|
isSelectionLastLine,
|
||||||
isRangeInbetweenCharacters,
|
isRangeInbetweenCharacters,
|
||||||
|
@ -30,7 +30,6 @@ import {
|
|||||||
} from '../std/sketch'
|
} from '../std/sketch'
|
||||||
import { err } from 'lib/trap'
|
import { err } from 'lib/trap'
|
||||||
import { Selections, canFilletSelection } from 'lib/selections'
|
import { Selections, canFilletSelection } from 'lib/selections'
|
||||||
// import { forEach } from 'jszip'
|
|
||||||
|
|
||||||
export function addFillet(
|
export function addFillet(
|
||||||
node: Program,
|
node: Program,
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user