getSketchSegmentIndexFromSourceRange bug fix (#75)

* getSketchSegmentIndexFromSourceRange bug fix

* test was verbose

* rename function
This commit is contained in:
Kurt Hutten
2023-03-20 07:09:19 +11:00
committed by GitHub
parent 1ac3713a79
commit 37ebfd072c
4 changed files with 49 additions and 10 deletions

View File

@ -41,7 +41,7 @@ import {
findUniqueName,
} from '../modifyAst'
import { roundOff, getLength, getAngle } from '../../lib/utils'
import { getSketchSegmentIndexFromSourceRange } from './sketchConstraints'
import { getSketchSegmentFromSourceRange } from './sketchConstraints'
import {
intersectionWithParallelLine,
perpendicularDistance,
@ -1317,7 +1317,7 @@ export function addNewSketchLn({
node,
defaultLinePath
).node
const { from } = getSketchSegmentIndexFromSourceRange(sketch, [
const { from } = getSketchSegmentFromSourceRange(sketch, [
defaultLine.start,
defaultLine.end,
])