1"use strict";(self.webpackChunkdev=self.webpackChunkdev||[]).push([[12103],{49365:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>p,default:()=>l,frontMatter:()=>s,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"reference/api/path/edge/readme","title":"Path.edge()","description":"Returns the Point object at the edge of the path you specify. Edge must be one of:","source":"@site/docs/reference/api/path/edge/readme.mdx","sourceDirName":"reference/api/path/edge","slug":"/reference/api/path/edge/","permalink":"/reference/api/path/edge/","draft":false,"unlisted":false,"editUrl":"https://codeberg.org/freesewing/freesewing/src/branch/develop/sites/dev/docs/reference/api/path/edge/readme.mdx","tags":[],"version":"current","frontMatter":{"title":"Path.edge()"},"sidebar":"tutorialSidebar","previous":{"title":"Path.divide()","permalink":"/reference/api/path/divide/"},"next":{"title":"Path.end()","permalink":"/reference/api/path/end/"}}');var i=t(31085),r=t(71184);const s={title:"Path.edge()"},p=void 0,c={},d=[];function a(e){const n={code:"code",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components},{Example:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Example",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"Point path.edge(string side)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Returns the Point object at the edge of the path you specify. Edge must be one of:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"top"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"bottom"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"left"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"right"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"topLeft"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"topRight"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"bottomLeft"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"bottomRight"})}),"\n"]}),"\n",(0,i.jsx)(t,{caption:"Example of the Path.edge() method",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:'({ Point, points, Path, paths,snippets, Snippet, part }) => {\n\n points.A = new Point(45, 60)\n points.B = new Point(10, 30)\n points.BCp2 = new Point(40, 20)\n points.C = new Point(90, 30)\n points.CCp1 = new Point(50, -30)\n points.D = new Point(-60, 90)\n points.E = new Point(90, 190)\n\n paths.demo = new Path()\n .move(points.A)\n .line(points.B)\n .curve(points.BCp2, points.CCp1, points.C)\n .curve(points.E, points.D, points.A)\n .close()\n\n for (let i of [\n "topLeft",\n "topRight",\n "bottomLeft",\n "bottomRight",\n "top",\n "left",\n "bottom",\n "right"\n ]) snippets[i] = new Snippet("notch", paths.demo.edge(i))\n\n return part\n}\n'})})})]})}function l(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},71184:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>p});var o=t(14041);const i={},r=o.createContext(i);function s(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function p(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.