Add drawing workspace feature

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
CopilotandCopilot committed 2026-11-04 13:34:51 +09:00
1 parent ad73ddec2b
commit a5cc458252
78 files changed
+35740 -6

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import type { Entity,Point,Source } from './types';
/** CZSECMU-ARW2: actual source block vertices, inserted at 80/100 paper scale. */
export function sectionCut(point:Point,scale:number,label:string,reverse=false,source:Source):Entity[]{
const f=.8*scale,sign=reverse?-1:1,p=(x:number,y:number):Point=>[point[0]+x*f*sign,point[1]-y*f];
const layer='SECTION' as const;
return [
{kind:'line',a:p(-3,0),b:p(-13,0),layer,source},
{kind:'line',a:p(0,0),b:p(-1,0),layer,source},
{kind:'hatch',points:[p(-13,0),p(-10,0),p(-13,10)],pattern:'SOLID',spacing:scale,angle:0,color:'#ff0000',layer,source},
{kind:'text',point:p(-15.07132694382339,12.13685926104699),text:label,height:4.5*f,layer,source},
];
}