index.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705
  1. <!doctype html>
  2. <html lang="en" class="no-js">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <link rel="shortcut icon" href="../assets/images/favicon.png">
  7. <meta name="generator" content="mkdocs-1.1, mkdocs-material-5.4.0">
  8. <title>Definition - Jypyter Sketcher</title>
  9. <link rel="stylesheet" href="../assets/stylesheets/main.fe0cca5b.min.css">
  10. <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
  11. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
  12. <style>body,input{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono",SFMono-Regular,Consolas,Menlo,monospace}</style>
  13. </head>
  14. <body dir="ltr">
  15. <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
  16. <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
  17. <label class="md-overlay" for="__drawer"></label>
  18. <div data-md-component="skip">
  19. <a href="#a-language-to-describe-a-sketch" class="md-skip">
  20. Skip to content
  21. </a>
  22. </div>
  23. <div data-md-component="announce">
  24. </div>
  25. <header class="md-header" data-md-component="header">
  26. <nav class="md-header-nav md-grid" aria-label="Header">
  27. <a href=".." title="Jypyter Sketcher" class="md-header-nav__button md-logo" aria-label="Jypyter Sketcher">
  28. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
  29. </a>
  30. <label class="md-header-nav__button md-icon" for="__drawer">
  31. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
  32. </label>
  33. <div class="md-header-nav__title" data-md-component="header-title">
  34. <div class="md-header-nav__ellipsis">
  35. <span class="md-header-nav__topic md-ellipsis">
  36. Jypyter Sketcher
  37. </span>
  38. <span class="md-header-nav__topic md-ellipsis">
  39. Definition
  40. </span>
  41. </div>
  42. </div>
  43. <label class="md-header-nav__button md-icon" for="__search">
  44. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
  45. </label>
  46. <div class="md-search" data-md-component="search" role="dialog">
  47. <label class="md-search__overlay" for="__search"></label>
  48. <div class="md-search__inner" role="search">
  49. <form class="md-search__form" name="search">
  50. <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active">
  51. <label class="md-search__icon md-icon" for="__search">
  52. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
  53. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
  54. </label>
  55. <button type="reset" class="md-search__icon md-icon" aria-label="Clear" data-md-component="search-reset" tabindex="-1">
  56. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
  57. </button>
  58. </form>
  59. <div class="md-search__output">
  60. <div class="md-search__scrollwrap" data-md-scrollfix>
  61. <div class="md-search-result" data-md-component="search-result">
  62. <div class="md-search-result__meta">
  63. Initializing search
  64. </div>
  65. <ol class="md-search-result__list"></ol>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </nav>
  72. </header>
  73. <div class="md-container" data-md-component="container">
  74. <main class="md-main" data-md-component="main">
  75. <div class="md-main__inner md-grid">
  76. <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
  77. <div class="md-sidebar__scrollwrap">
  78. <div class="md-sidebar__inner">
  79. <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
  80. <label class="md-nav__title" for="__drawer">
  81. <a href=".." title="Jypyter Sketcher" class="md-nav__button md-logo" aria-label="Jypyter Sketcher">
  82. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
  83. </a>
  84. Jypyter Sketcher
  85. </label>
  86. <ul class="md-nav__list" data-md-scrollfix>
  87. <li class="md-nav__item">
  88. <a href=".." title="Home" class="md-nav__link">
  89. Home
  90. </a>
  91. </li>
  92. <li class="md-nav__item">
  93. <a href="../about/" title="About" class="md-nav__link">
  94. About
  95. </a>
  96. </li>
  97. <li class="md-nav__item md-nav__item--active">
  98. <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
  99. <label class="md-nav__link md-nav__link--active" for="__toc">
  100. Definition
  101. <span class="md-nav__icon md-icon">
  102. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>
  103. </span>
  104. </label>
  105. <a href="./" title="Definition" class="md-nav__link md-nav__link--active">
  106. Definition
  107. </a>
  108. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  109. <label class="md-nav__title" for="__toc">
  110. <span class="md-nav__icon md-icon">
  111. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
  112. </span>
  113. Table of contents
  114. </label>
  115. <ul class="md-nav__list" data-md-scrollfix>
  116. <li class="md-nav__item">
  117. <a href="#a-language-to-describe-a-sketch" class="md-nav__link">
  118. A language to describe a sketch
  119. </a>
  120. </li>
  121. <li class="md-nav__item">
  122. <a href="#example" class="md-nav__link">
  123. Example
  124. </a>
  125. <nav class="md-nav" aria-label="Example">
  126. <ul class="md-nav__list">
  127. <li class="md-nav__item">
  128. <a href="#the-final-sketch" class="md-nav__link">
  129. The final sketch
  130. </a>
  131. </li>
  132. <li class="md-nav__item">
  133. <a href="#support-files" class="md-nav__link">
  134. Support files
  135. </a>
  136. </li>
  137. <li class="md-nav__item">
  138. <a href="#the-yaml-definition" class="md-nav__link">
  139. The yaml definition
  140. </a>
  141. <nav class="md-nav" aria-label="The yaml definition">
  142. <ul class="md-nav__list">
  143. <li class="md-nav__item">
  144. <a href="#libraries-construction-variables-frame" class="md-nav__link">
  145. Libraries, Construction Variables, Frame
  146. </a>
  147. </li>
  148. <li class="md-nav__item">
  149. <a href="#the-body-object" class="md-nav__link">
  150. The body object
  151. </a>
  152. </li>
  153. <li class="md-nav__item">
  154. <a href="#the-plan-object" class="md-nav__link">
  155. The plan object
  156. </a>
  157. </li>
  158. <li class="md-nav__item">
  159. <a href="#the-friction-sketch" class="md-nav__link">
  160. The friction sketch
  161. </a>
  162. </li>
  163. </ul>
  164. </nav>
  165. </li>
  166. <li class="md-nav__item">
  167. <a href="#using-the-parser" class="md-nav__link">
  168. Using the parser
  169. </a>
  170. </li>
  171. <li class="md-nav__item">
  172. <a href="#friction-sketch-hierarchy" class="md-nav__link">
  173. "friction" sketch hierarchy
  174. </a>
  175. </li>
  176. </ul>
  177. </nav>
  178. </li>
  179. </ul>
  180. </nav>
  181. </li>
  182. <li class="md-nav__item">
  183. <a href="../reference/" title="Reference" class="md-nav__link">
  184. Reference
  185. </a>
  186. </li>
  187. </ul>
  188. </nav>
  189. </div>
  190. </div>
  191. </div>
  192. <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
  193. <div class="md-sidebar__scrollwrap">
  194. <div class="md-sidebar__inner">
  195. <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  196. <label class="md-nav__title" for="__toc">
  197. <span class="md-nav__icon md-icon">
  198. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
  199. </span>
  200. Table of contents
  201. </label>
  202. <ul class="md-nav__list" data-md-scrollfix>
  203. <li class="md-nav__item">
  204. <a href="#a-language-to-describe-a-sketch" class="md-nav__link">
  205. A language to describe a sketch
  206. </a>
  207. </li>
  208. <li class="md-nav__item">
  209. <a href="#example" class="md-nav__link">
  210. Example
  211. </a>
  212. <nav class="md-nav" aria-label="Example">
  213. <ul class="md-nav__list">
  214. <li class="md-nav__item">
  215. <a href="#the-final-sketch" class="md-nav__link">
  216. The final sketch
  217. </a>
  218. </li>
  219. <li class="md-nav__item">
  220. <a href="#support-files" class="md-nav__link">
  221. Support files
  222. </a>
  223. </li>
  224. <li class="md-nav__item">
  225. <a href="#the-yaml-definition" class="md-nav__link">
  226. The yaml definition
  227. </a>
  228. <nav class="md-nav" aria-label="The yaml definition">
  229. <ul class="md-nav__list">
  230. <li class="md-nav__item">
  231. <a href="#libraries-construction-variables-frame" class="md-nav__link">
  232. Libraries, Construction Variables, Frame
  233. </a>
  234. </li>
  235. <li class="md-nav__item">
  236. <a href="#the-body-object" class="md-nav__link">
  237. The body object
  238. </a>
  239. </li>
  240. <li class="md-nav__item">
  241. <a href="#the-plan-object" class="md-nav__link">
  242. The plan object
  243. </a>
  244. </li>
  245. <li class="md-nav__item">
  246. <a href="#the-friction-sketch" class="md-nav__link">
  247. The friction sketch
  248. </a>
  249. </li>
  250. </ul>
  251. </nav>
  252. </li>
  253. <li class="md-nav__item">
  254. <a href="#using-the-parser" class="md-nav__link">
  255. Using the parser
  256. </a>
  257. </li>
  258. <li class="md-nav__item">
  259. <a href="#friction-sketch-hierarchy" class="md-nav__link">
  260. "friction" sketch hierarchy
  261. </a>
  262. </li>
  263. </ul>
  264. </nav>
  265. </li>
  266. </ul>
  267. </nav>
  268. </div>
  269. </div>
  270. </div>
  271. <div class="md-content">
  272. <article class="md-content__inner md-typeset">
  273. <h1>Definition</h1>
  274. <h2 id="a-language-to-describe-a-sketch">A language to describe a sketch</h2>
  275. <p>Pysketcher initial version <a href="">HPL Pysketcher</a> enable sketch definition in python. HPL is showing the hierachical nature of sketches. This is implemented via the Composition function. One can further grasp this using the graphviz_dot function applied to discover the composition herarchy implemented as a graphviz image <a href="#the-hierarchy-of-the-friction-main-object">see The hierarchy of the "friction" main object</a> at the end of this page.</p>
  276. <p>Due to the hierarchical nature of sketches, it is quite straightforward to think about using yaml as the syntax for defining a sketch.</p>
  277. <p>Benefits are the following:</p>
  278. <ul>
  279. <li>Leaner sketch writing as only data relevant to the context needs to be defined</li>
  280. <li>A more straightforward reading for the same reason</li>
  281. <li>A more robust sketch definition <ul>
  282. <li>The same set of rules is applied to generate a sketch</li>
  283. <li>No further python idiom is be intermingled as opposed to the case of python defined sketches</li>
  284. <li>Of course, data defined versus program defined there is no winner, it's just a matter of context</li>
  285. </ul>
  286. </li>
  287. </ul>
  288. <h2 id="example">Example</h2>
  289. <p>This example provides the yaml content to define the Dry Friction case</p>
  290. <h3 id="the-final-sketch">The final sketch</h3>
  291. <p><img alt="" src="../images/dryfriction.png" /></p>
  292. <p>An inclined plan (the A-B edge) supports a blue rectangle which is dragged down by gravity. The plan makes an angle <span><span class="MathJax_Preview">\theta</span><script type="math/tex">\theta</script></span> with the ground level. Sketch implementation notebook includes a controller enabling the <span><span class="MathJax_Preview">\theta</span><script type="math/tex">\theta</script></span> angle to change. The whole plan, including the body, can rotate arround point B.</p>
  293. <h3 id="support-files">Support files</h3>
  294. <p>The example we are developing now is based upon the "Dry Friction mockup" notebook</p>
  295. <ul>
  296. <li>the rendered html version of the notbook can be viewed <a href="../resources/DryFriction.html">here</a></li>
  297. <li>the notebook can be download <a href="../resources/DryFriction.ipynb">here</a></li>
  298. </ul>
  299. <h3 id="the-yaml-definition">The yaml definition</h3>
  300. <p>Sketcher language is defined as a yaml compliant file or string. The yaml file is a dictionnary of "objects". Objects can be regular python objects or sketcher objects.
  301. A skertcher object is composed as follow:</p>
  302. <ul>
  303. <li><strong>a formula</strong>: it's a leaf object, like Rectangle, Circle, Line etc or a composition</li>
  304. <li><strong>a style list</strong>: line or fill colors, line stroke... declared as a yaml hierarchy</li>
  305. <li><strong>a transformation list</strong>: the defined object can be transformed using sketcher transformation: translation, rotation...</li>
  306. </ul>
  307. <p>As a general rule, a new object suppose all parameters to be defined before they are used to construct it.</p>
  308. <p><strong>For example, you can create a circle if the center and the radius have been defined earlier in the file.</strong></p>
  309. <p>The general layout of a sketcher file is as follow:</p>
  310. <ul>
  311. <li><strong>Libraries, Construction Variables, Frame</strong><ul>
  312. <li>declaration of the libraries used by the objects further declared: at least pysketcher is mandatory</li>
  313. <li>various global variable which encompass the "Construction" variables which define the object main physical dimensions, positions...</li>
  314. <li>some "actions" corresponding to executable python sentences<ul>
  315. <li>One mandatory action is the setting of the drawing frame (drawing_tool.set_coordinate_system): it must be declared before any other pysketcher object is used.</li>
  316. <li>Other use case of action is the setting of global parameters like default line color: (drawing_tool.set_linecolor('black')) for example</li>
  317. </ul>
  318. </li>
  319. <li>this is stored in the head string thereafter</li>
  320. </ul>
  321. </li>
  322. <li><strong>Sketcher Objects</strong><ul>
  323. <li>Usually starting with the declaration of Pysketcher leaf objects (Geometry object like Line, Circle, Rectangle...)</li>
  324. <li>May be aggregated using the composition object</li>
  325. <li>Composition can be made of composition object (recursive behaviour)</li>
  326. <li>Grouping leafs and composition will be further used to apply transformation latter on (based on the "physics")</li>
  327. <li>The example presents three group of objects<ul>
  328. <li>The body object</li>
  329. <li>The plan object</li>
  330. <li>The friction main object</li>
  331. </ul>
  332. </li>
  333. <li>The plan includes the body</li>
  334. <li>The friction includes the plan (that will be able to rotate as a group) and the ground (will stay fixed)</li>
  335. </ul>
  336. </li>
  337. </ul>
  338. <h4 id="libraries-construction-variables-frame">Libraries, Construction Variables, Frame</h4>
  339. <pre><code class="python">head = &quot;&quot;&quot;\
  340. libraries: [&quot;from math import tan, radians, sin, cos&quot;,&quot;from pysketcher import *&quot;]
  341. fontsize: 18
  342. g: 9.81 # constant gravity
  343. theta: 30.0 # inclined plane angle
  344. L: 10.0 # sketch sizing parameter
  345. a: 1.0 #
  346. xmin: 0.0 # sketech min Abscissa
  347. ymin: -3.0 # sketech min Ordinate
  348. rl: 2.0 # rectangle width
  349. rL: 1.0 # rectangle length
  350. setframe: # sketch setup
  351. action: &quot;drawing_tool.set_coordinate_system(xmin=xmin-L/5, xmax=xmin+1.5*L,ymin=ymin, ymax=ymin+1.5*L,instruction_file='tmp_mpl_friction.py')&quot;
  352. setblackline: # default frame values and actions
  353. action: &quot;drawing_tool.set_linecolor('black')&quot;
  354. B: point(a+L,0) # wall right end
  355. A: point(a,tan(radians(theta))*L) # wall left end
  356. normal_vec: point(sin(radians(theta)),cos(radians(theta))) # Vector normal to wall
  357. tangent_vec: point(cos(radians(theta)),-sin(radians(theta))) # Vector tangent to wall
  358. help_line: Line(A,B) # wall line
  359. x: a + 3*L/10.
  360. y: help_line(x=x)
  361. contact: point(x, y)
  362. c: contact + rL/2*normal_vec
  363. &quot;&quot;&quot;
  364. </code></pre>
  365. <h4 id="the-body-object">The body object</h4>
  366. <pre><code class="python">body=&quot;&quot;&quot;\
  367. rectangle:
  368. formula: Rectangle(contact, rl, rL)
  369. style:
  370. linecolor: blue
  371. filled_curves: blue
  372. transform: [&quot;rotate(-theta, contact)&quot;,
  373. &quot;translate(-rl/2*tangent_vec)&quot;]
  374. N:
  375. formula: Force(contact - rl*normal_vec, contact, r'$N$', text_pos='start')
  376. style:
  377. linecolor: black
  378. wheel:
  379. formula: &quot;Composition({'outer': rectangle})&quot;
  380. style:
  381. shadow: 1
  382. mc:
  383. formula: Text(r'$c$', c)
  384. body:
  385. formula: &quot;Composition({'wheel': wheel, 'N': N, 'mc': mc})&quot;
  386. style:
  387. linecolor: black
  388. &quot;&quot;&quot;
  389. </code></pre>
  390. <h4 id="the-plan-object">The plan object</h4>
  391. <pre><code class="python">plan=&quot;&quot;&quot;\
  392. mB:
  393. formula: Text(r'$B$',B)
  394. mA:
  395. formula: Text(r'$A$', A)
  396. wall:
  397. formula: Wall(x=[A[0], B[0]], y=[A[1], B[1]], thickness=-0.25,transparent=False)
  398. style:
  399. linecolor: black
  400. x_const:
  401. formula: Line(contact, contact + point(0,4))
  402. style:
  403. linestyle: dotted
  404. transform: rotate(-theta, contact)
  405. x_axis:
  406. formula: &quot;Axis(start=contact+ 2*rl*normal_vec, length=2*rl,label='$x$', rotation_angle=-theta)&quot;
  407. plan:
  408. formula: &quot;Composition({'body': body, 'inclined wall': wall, 'x start': x_const, 'x axis': x_axis, 'mA': mA, 'mB': mB})&quot;
  409. &quot;&quot;&quot;
  410. </code></pre>
  411. <h4 id="the-friction-sketch">The friction sketch</h4>
  412. <pre><code class="python">friction=&quot;&quot;&quot;\
  413. mg:
  414. formula: Gravity(c, rl, text='$Mg$')
  415. style:
  416. linecolor: black
  417. angle:
  418. formula: &quot;Arc_wText(r'$&lt;bslash&gt;theta$', center=B, radius=3, start_angle=180-theta, arc_angle=theta, fontsize=fontsize)&quot;
  419. style:
  420. linecolor: black
  421. linewidth: 1
  422. ground:
  423. formula: Line((B[0]-L/10., 0), (B[0]-L/2.,0))
  424. stlye:
  425. linecolor: black
  426. linestyle: dashed
  427. linewidth: 1
  428. friction:
  429. formula: &quot;Composition({'plan': plan, 'ground': ground, 'mg': mg, 'angle': angle})&quot;
  430. &quot;&quot;&quot;
  431. </code></pre>
  432. <h3 id="using-the-parser">Using the parser</h3>
  433. <p>To parse the above example, the following code do the job.
  434. 1. the head must be used first as all the other bits needs one or more variable it defines.
  435. 2. After, any other string can be parsed, the order just need to respect precedence (if one object uses another one it must be parsed after)
  436. 3. this setting allows naturally a modular definition of sketch objects</p>
  437. <pre><code class="python">myfig = {}
  438. sketchParse(head,myfig)
  439. sketchParse(body,myfig)
  440. sketchParse(plan,myfig)
  441. sketchParse(friction,myfig)
  442. </code></pre>
  443. <h3 id="friction-sketch-hierarchy">"friction" sketch hierarchy</h3>
  444. <p><img alt="" src="../images/dotfriction.png" /></p>
  445. </article>
  446. </div>
  447. </div>
  448. </main>
  449. <footer class="md-footer">
  450. <div class="md-footer-nav">
  451. <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
  452. <a href="../about/" title="About" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
  453. <div class="md-footer-nav__button md-icon">
  454. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
  455. </div>
  456. <div class="md-footer-nav__title">
  457. <div class="md-ellipsis">
  458. <span class="md-footer-nav__direction">
  459. Previous
  460. </span>
  461. About
  462. </div>
  463. </div>
  464. </a>
  465. <a href="../reference/" title="Reference" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
  466. <div class="md-footer-nav__title">
  467. <div class="md-ellipsis">
  468. <span class="md-footer-nav__direction">
  469. Next
  470. </span>
  471. Reference
  472. </div>
  473. </div>
  474. <div class="md-footer-nav__button md-icon">
  475. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
  476. </div>
  477. </a>
  478. </nav>
  479. </div>
  480. <div class="md-footer-meta md-typeset">
  481. <div class="md-footer-meta__inner md-grid">
  482. <div class="md-footer-copyright">
  483. Made with
  484. <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
  485. Material for MkDocs
  486. </a>
  487. </div>
  488. </div>
  489. </div>
  490. </footer>
  491. </div>
  492. <script src="../assets/javascripts/vendor.d710d30a.min.js"></script>
  493. <script src="../assets/javascripts/bundle.b39636ac.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents"}</script>
  494. <script>
  495. app = initialize({
  496. base: "..",
  497. features: [],
  498. search: Object.assign({
  499. worker: "../assets/javascripts/worker/search.a68abb33.min.js"
  500. }, typeof search !== "undefined" && search)
  501. })
  502. </script>
  503. <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script>
  504. </body>
  505. </html>