Commit Graph

12 Commits

Author SHA1 Message Date
22c356a841 Add intersect constraint UI (#71)
* Add intersect constraint UI

* add more combos for intersect constraint
2023-03-19 18:46:39 +11:00
0995780abb add Equal angle constraint + more cases for existing constraints (#69)
* add more setLength and horz vert distance constraints

* rename equal to equalLength

* Add equalAngle constraint
2023-03-17 21:15:46 +11:00
f7c78db92b Creating new sketch calling sketch fns with dumby default values (#67) 2023-03-17 15:53:20 +11:00
c11e7e7fd3 Give startSketchAt a 3D artifact (#65)
* Give startSketchAt a 3D artifact

* fix tests

* refactor start geo to be in the start property

* small tweak
2023-03-17 08:27:40 +11:00
eebddb0ce2 more transform functions for various line combos (#56) 2023-03-10 14:55:16 +11:00
c3ead3b074 Add Angle & Length constraint/value, and modal for the details (#54)
* setup UI for getting length and Angle values from user

* enable setLength-angle for angledLines with an exisiting constraining value
2023-03-10 08:48:50 +11:00
2ac24bcd95 Horz/Vert distance constraint with modal workflow (#43)
* button style tweak

* Remove duplication constraint ast transforms

* giveSketchFnCallTag to return if line already had a tag

* remove duplication

* update tag name to referenceSegName

* Update transform shape to return key details about the transform

* add modal to hor vert distance workflow

* fix browser env stuff from breaking tests

* fmt
2023-03-07 15:45:59 +11:00
4c554b6549 initial set horz-vert distance constraint (#42)
inital set horz-vert distance constraint
2023-03-05 07:34:56 +11:00
433c29217e tidy up (#37) 2023-03-03 20:35:48 +11:00
6446601a67 Add equal-length constraints & implement UnaryExpressions (#35)
* add segLen help to lang std

* adding helpers functions to sketchConstraints

* update tokeniser tests because they were annoying me not being 100%

* compare async lexer with sync lexer instead

* add helper functions

* remove unneeded nesting

* update add ast modifier function for angledLine

* initial equal ast modification

It adds a tag to the primary line, and converts any secondary lines to angledLine, but doesn't reference the taged/primary line yet

* Update fn call with refernce to previous line using segLen

* add test for giveSketchFnCallTag

* fix excutor bug, executing call expression in array expression

* fix small issue in executor

* add CallExpressions to BinaryExpressions

* add unary Expressions

* tweaks to unaryExpression logic

* add recasting for unaryExpressions and CallExpressions in BinaryExpressions

* ensure pipe substitution info is passed down to unary expressions and others

* allow binary expressions in function argumentns

* inital setup, new way of organising sketch fn transforms

Starting with equal length

* overhaul equalLength button

* add equal length support for angledLine

* line with one variable supports signed legLength

* fix indentation when recasting long arrayExpressions in a pipeExpression

* improve modifyAst consision

* further modify ast tidy

* equalLength transfroms far angledLineOfXLength

* add transforms for line-yRelative

* add equal constraint for angledLineOfYLength

* quick test fix

* add equal length constrain transforms for lineTo

* add equal length constraints for angledLineToX

* add equalLength constraints for angledLineToY

* test tidy

* setup new vertical-horizontal constraints

* Add equal Length constraints for vertical/horizontal lines

* migrate old tests, and refactor callback tag

* tweaks and refactor horzVert component

* fix leg len with small negative leg length
2023-03-02 21:19:11 +11:00
4ec0401118 Constraint setup + Horizontal & Vertical implementation (#33)
* start of horizontal/vert constraint

* horz vert constraint working with variable

* quick fix

* add tests for horz constraint

* clean up
2023-02-21 10:50:45 +11:00
594d55576a functional sketch working (#26)
* functional sketch working

With old sketch block still there

* get all version of lines working with add line and update line

* remove old ui state types

* some clean up

* rename some things

* add todo for multi cursor

* shorten useStore repitition

* small type improvement

* big overhaul to group sketch function and they ast modifying helpers together

* unneeded tweak

* ruthlessly rip out sketch logic

* clean up path keyword

* getting sketch on face working again with all the new sketch line types

* add a bunch of tests and re-arrage file structure
2023-02-12 10:56:45 +11:00