Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

void #173

Closed
wants to merge 2 commits into from
Closed

void #173

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Playwright Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
timeout-minutes: 5
runs-on: ${{ matrix.os }}
steps:
- name: boost
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install -yq libboost-dev
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
ShaMan123 marked this conversation as resolved.
Show resolved Hide resolved
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright tests
run: xvfb-run npm test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 7
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml
.DS_Store
Expand All @@ -8,8 +7,13 @@
/bin
/minkowski
/deepnest-*win32-x64
package-lock.json
/output
git_token.rtf
.idea
*.zip
.python-version
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
44 changes: 44 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
export type DeepNestConfig = {
units: "mm" | "inch";
scale: number;
spacing: number;
curveTolerance: number;
clipperScale: number;
rotations: number;
threads: number;
populationSize: number;
mutationRate: number;
placementType: "gravity" | "box" | "convexhull";
mergeLines: boolean;
/**
* ratio of material reduction to laser time. 0 = optimize material only, 1 = optimize laser time only
*/
timeRatio: number;
simplify: boolean;
dxfImportScale: number;
dxfExportScale: number;
endpointTolerance: number;
conversionServer: string;
};

export type SheetPlacement = {
filename: string;
id: number;
rotation: number;
source: number;
x: number;
y: number;
};

export type NestingResult = {
area: number;
fitness: number;
index: number;
mergedLength: number;
selected: boolean;
placements: {
sheet: number;
sheetid: number;
sheetplacements: SheetPlacement[];
}[];
};
Loading
Loading