Browse Source

Deployed 33266aa with MkDocs version: 1.1

Gilbert Brault 5 năm trước cách đây
mục cha
commit
d0e0517a33

+ 12 - 0
404.html

@@ -200,6 +200,18 @@
   </li>
 
     
+      
+      
+      
+
+
+  <li class="md-nav__item">
+    <a href="/yamlsketcher/" title="YAML files Reference" class="md-nav__link">
+      YAML files Reference
+    </a>
+  </li>
+
+    
   </ul>
 </nav>
                   </div>

+ 12 - 0
about/index.html

@@ -207,6 +207,18 @@
   </li>
 
     
+      
+      
+      
+
+
+  <li class="md-nav__item">
+    <a href="../yamlsketcher/" title="YAML files Reference" class="md-nav__link">
+      YAML files Reference
+    </a>
+  </li>
+
+    
   </ul>
 </nav>
                   </div>

+ 12 - 0
index.html

@@ -214,6 +214,18 @@
   </li>
 
     
+      
+      
+      
+
+
+  <li class="md-nav__item">
+    <a href="yamlsketcher/" title="YAML files Reference" class="md-nav__link">
+      YAML files Reference
+    </a>
+  </li>
+
+    
   </ul>
 </nav>
                   </div>

+ 12 - 0
learningbyexample/index.html

@@ -339,6 +339,18 @@
   </li>
 
     
+      
+      
+      
+
+
+  <li class="md-nav__item">
+    <a href="../yamlsketcher/" title="YAML files Reference" class="md-nav__link">
+      YAML files Reference
+    </a>
+  </li>
+
+    
   </ul>
 </nav>
                   </div>

+ 12 - 0
presentation/index.html

@@ -264,6 +264,18 @@
   </li>
 
     
+      
+      
+      
+
+
+  <li class="md-nav__item">
+    <a href="../yamlsketcher/" title="YAML files Reference" class="md-nav__link">
+      YAML files Reference
+    </a>
+  </li>
+
+    
   </ul>
 </nav>
                   </div>

+ 97 - 0
reference/dryfriction.yml

@@ -0,0 +1,97 @@
+!!omap
+- name: unknown
+- parts:
+  - name: head
+    shapes:
+      libraries: ['from math import tan, radians, sin, cos', from pysketcher import
+          *]
+  - name: constants
+    shapes:
+      fontsize: 18       # size of the characters
+      g: 9.81            # constant gravity
+      theta: 30.0        # inclined plane angle
+      L: 10.0            # sketch sizing parameter
+      a: 1.0             #
+      xmin: 0.0          # sketech min Abscissa
+      ymin: -3.0         # sketech min Ordinate     
+      rl: 2.0            # rectangle width
+      rL: 1.0            # rectangle length
+  - name: frame
+    shapes:
+      setframe:          # sketch setup
+        action: 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')
+      setblackline:      # default frame values and actions
+        action: drawing_tool.set_linecolor('black')
+      B: point(a+L,0)                    # wall right end
+      A: point(a,tan(radians(theta))*L)  # wall left end
+      normal_vec: point(sin(radians(theta)),cos(radians(theta)))   # Vector normal to wall
+      tangent_vec: point(cos(radians(theta)),-sin(radians(theta))) # Vector tangent to wall
+      help_line: Line(A,B)               # wall line
+      x: a + 3*L/10.                     # contact point Abscissa
+      y: help_line(x=x)                  # contact point Ordinate
+      contact: point(x, y)               # contact point: middle of the rectangle bottom edge
+      c: contact + rL/2*normal_vec
+  - name: body
+    shapes:
+      rectangle:
+        formula: Rectangle(contact, rl, rL)
+        style:
+          linecolor: blue
+          filled_curves: blue
+        transform: ['rotate(-theta, contact)', translate(-rl/2*tangent_vec)]
+      N:
+        formula: Force(contact - rl*normal_vec, contact, r'$N$', text_pos='start')
+        style:
+          linecolor: black
+      wheel:
+        formula: "Composition({'outer': rectangle})"
+        style:
+          shadow: 1
+      mc:
+        formula: Text(r'$c$', c)
+      body:
+        formula: "Composition({'wheel': wheel, 'N': N, 'mc': mc})"
+        style:
+          linecolor: black
+  - name: plan
+    shapes:
+      mB:
+        formula: Text(r'$B$',B)
+      mA:
+        formula: Text(r'$A$', A)
+      wall:
+        formula: Wall(x=[A[0], B[0]], y=[A[1], B[1]], thickness=-0.25,transparent=False)
+        style:
+          linecolor: black
+      x_const:
+        formula: Line(contact, contact + point(0,4))
+        style:
+          linestyle: dotted
+        transform: rotate(-theta, contact)
+      x_axis:
+        formula: Axis(start=contact+ 2*rl*normal_vec, length=2*rl,label='$x$', rotation_angle=-theta)
+      plan:
+        formula: "Composition({'body': body, 'inclined wall': wall, 'x start': x_const,\
+          \ 'x axis': x_axis, 'mA': mA, 'mB': mB})"
+  - name: friction
+    shapes:
+      mg:
+        formula: Gravity(c, rl, text='$Mg$')
+        style:
+          linecolor: black
+      angle:
+        formula: Arc_wText(r'$<bslash>theta$', center=B, radius=3, start_angle=180-theta,
+          arc_angle=theta, fontsize=fontsize)
+        style:
+          linecolor: black
+          linewidth: 1
+      ground:
+        formula: Line((B[0]-L/10., 0), (B[0]-L/2.,0))
+        stlye:
+          linecolor: black
+          linestyle: dashed
+          linewidth: 1
+      friction:
+        formula: "Composition({'plan': plan, 'ground': ground, 'mg': mg, 'angle':\
+          \ angle})"

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 0
reference/yamlpysketchergrammar.svg


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 394 - 615
resources/DryFriction.html


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 0
resources/yamlpysketchergrammar.drawio


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
search/search_index.json


+ 58 - 17
shapereference/index.html

@@ -639,13 +639,6 @@
       </ul>
     </nav>
   
-</li>
-      
-        <li class="md-nav__item">
-  <a href="#code-to-display-the-above-defined-shapes" class="md-nav__link">
-    Code to display the above defined shapes
-  </a>
-  
 </li>
       
         <li class="md-nav__item">
@@ -778,6 +771,19 @@
   
 </li>
         
+      </ul>
+    </nav>
+  
+</li>
+      
+        <li class="md-nav__item">
+  <a href="#code-to-display-the-above-defined-shapes" class="md-nav__link">
+    Code to display the above defined shapes
+  </a>
+  
+    <nav class="md-nav" aria-label="Code to display the above defined shapes">
+      <ul class="md-nav__list">
+        
           <li class="md-nav__item">
   <a href="#yaml_20" class="md-nav__link">
     Yaml
@@ -804,6 +810,18 @@
   </li>
 
     
+      
+      
+      
+
+
+  <li class="md-nav__item">
+    <a href="../yamlsketcher/" title="YAML files Reference" class="md-nav__link">
+      YAML files Reference
+    </a>
+  </li>
+
+    
   </ul>
 </nav>
                   </div>
@@ -1237,13 +1255,6 @@
       </ul>
     </nav>
   
-</li>
-      
-        <li class="md-nav__item">
-  <a href="#code-to-display-the-above-defined-shapes" class="md-nav__link">
-    Code to display the above defined shapes
-  </a>
-  
 </li>
       
         <li class="md-nav__item">
@@ -1376,6 +1387,19 @@
   
 </li>
         
+      </ul>
+    </nav>
+  
+</li>
+      
+        <li class="md-nav__item">
+  <a href="#code-to-display-the-above-defined-shapes" class="md-nav__link">
+    Code to display the above defined shapes
+  </a>
+  
+    <nav class="md-nav" aria-label="Code to display the above defined shapes">
+      <ul class="md-nav__list">
+        
           <li class="md-nav__item">
   <a href="#yaml_20" class="md-nav__link">
     Yaml
@@ -1725,7 +1749,6 @@ gravity.set_name(&quot;gravity&quot;)
 </code></pre>
 
 <p><img alt="Gravity" src="../reference/gravity.svg" /></p>
-<h2 id="code-to-display-the-above-defined-shapes">Code to display the above defined shapes</h2>
 <h2 id="moment">Moment</h2>
 <p><a href="#list-of-shapes">home</a> defines a Moment arrow with text given text, center and radius.</p>
 <h3 id="yaml_15">Yaml</h3>
@@ -1812,6 +1835,7 @@ dashpot.set_name(&quot;dashpot&quot;)
 </code></pre>
 
 <p><img alt="Dashpot" src="../reference/dashpot.svg" /></p>
+<h2 id="code-to-display-the-above-defined-shapes">Code to display the above defined shapes</h2>
 <p><a href="#list-of-shapes">home</a> In order to display the various shapes, use the following code in a jupyter notebook</p>
 <pre><code class="python">[1]: %matplotlib widget
 [2]: from pysketcher import *
@@ -1825,7 +1849,8 @@ dashpot.set_name(&quot;dashpot&quot;)
 <pre><code class="python">head = &quot;&quot;&quot;\
 libraries: [&quot;from math import tan, radians, sin, cos&quot;,&quot;from pysketcher import *&quot;,&quot;import numpy as np&quot;]
 myfig={}
-sketchParse(head,myfig)
+sketch = Sketch(myfig)
+sketch.append(head)
 </code></pre>
 
 <p>The above code initialize myfig sketch space loading into it libraries references so samples can use tan, radians, si, cos and all the objects defined in pysketcher (the module name of jupytersketcher) and numpy as well: this is used by the yaml definition of shapes</p>
@@ -1835,10 +1860,11 @@ sketch=&quot;&quot;&quot;
 # put here the yaml 'object' definition
 &quot;&quot;&quot;
 drawing_tool.erase()
-sketchParse(sketch,myfig)
+sketch.append(sketch)
 # replace 'object' by the actual one
 d = myfig['object'].draw() 
 drawing_tool.display()
+display(SVG(Sketch.matplotlib2SVG()))
 </code></pre>
 
 <h3 id="python_20">Python</h3>
@@ -1847,6 +1873,7 @@ drawing_tool.display()
 # replace object by the actual name line, rectangle, circle...
 object.draw()
 drawing_tool.display()
+display(SVG(Sketch.matplotlib2SVG()))
 </code></pre>
                 
               
@@ -1881,6 +1908,20 @@ drawing_tool.display()
           </a>
         
         
+          <a href="../yamlsketcher/" title="YAML files Reference" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
+            <div class="md-footer-nav__title">
+              <div class="md-ellipsis">
+                <span class="md-footer-nav__direction">
+                  Next
+                </span>
+                YAML files Reference
+              </div>
+            </div>
+            <div class="md-footer-nav__button md-icon">
+              <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>
+            </div>
+          </a>
+        
       </nav>
     </div>
   

+ 9 - 5
sitemap.xml

@@ -1,23 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
      <loc>None</loc>
-     <lastmod>2020-08-06</lastmod>
+     <lastmod>2020-08-07</lastmod>
      <changefreq>daily</changefreq>
     </url><url>
      <loc>None</loc>
-     <lastmod>2020-08-06</lastmod>
+     <lastmod>2020-08-07</lastmod>
      <changefreq>daily</changefreq>
     </url><url>
      <loc>None</loc>
-     <lastmod>2020-08-06</lastmod>
+     <lastmod>2020-08-07</lastmod>
      <changefreq>daily</changefreq>
     </url><url>
      <loc>None</loc>
-     <lastmod>2020-08-06</lastmod>
+     <lastmod>2020-08-07</lastmod>
      <changefreq>daily</changefreq>
     </url><url>
      <loc>None</loc>
-     <lastmod>2020-08-06</lastmod>
+     <lastmod>2020-08-07</lastmod>
+     <changefreq>daily</changefreq>
+    </url><url>
+     <loc>None</loc>
+     <lastmod>2020-08-07</lastmod>
      <changefreq>daily</changefreq>
     </url>
 </urlset>

BIN
sitemap.xml.gz


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 645 - 0
yamlsketcher/index.html