Просмотр исходного кода

Deployed 203ed9d with MkDocs version: 1.1

Gilbert Brault 5 лет назад
Родитель
Сommit
e7c08ea015
4 измененных файлов с 449 добавлено и 10 удалено
  1. 88 9
      reference/index.html
  2. 360 0
      reference/wall.svg
  3. 1 1
      search/search_index.json
  4. BIN
      sitemap.xml.gz

+ 88 - 9
reference/index.html

@@ -546,6 +546,33 @@
       </ul>
     </nav>
   
+</li>
+      
+        <li class="md-nav__item">
+  <a href="#wall" class="md-nav__link">
+    Wall
+  </a>
+  
+    <nav class="md-nav" aria-label="Wall">
+      <ul class="md-nav__list">
+        
+          <li class="md-nav__item">
+  <a href="#yaml_12" class="md-nav__link">
+    Yaml
+  </a>
+  
+</li>
+        
+          <li class="md-nav__item">
+  <a href="#python_12" class="md-nav__link">
+    Python
+  </a>
+  
+</li>
+        
+      </ul>
+    </nav>
+  
 </li>
       
         <li class="md-nav__item">
@@ -557,14 +584,14 @@
       <ul class="md-nav__list">
         
           <li class="md-nav__item">
-  <a href="#yaml_12" class="md-nav__link">
+  <a href="#yaml_13" class="md-nav__link">
     Yaml
   </a>
   
 </li>
         
           <li class="md-nav__item">
-  <a href="#python_12" class="md-nav__link">
+  <a href="#python_13" class="md-nav__link">
     Python
   </a>
   
@@ -934,6 +961,33 @@
       </ul>
     </nav>
   
+</li>
+      
+        <li class="md-nav__item">
+  <a href="#wall" class="md-nav__link">
+    Wall
+  </a>
+  
+    <nav class="md-nav" aria-label="Wall">
+      <ul class="md-nav__list">
+        
+          <li class="md-nav__item">
+  <a href="#yaml_12" class="md-nav__link">
+    Yaml
+  </a>
+  
+</li>
+        
+          <li class="md-nav__item">
+  <a href="#python_12" class="md-nav__link">
+    Python
+  </a>
+  
+</li>
+        
+      </ul>
+    </nav>
+  
 </li>
       
         <li class="md-nav__item">
@@ -945,14 +999,14 @@
       <ul class="md-nav__list">
         
           <li class="md-nav__item">
-  <a href="#yaml_12" class="md-nav__link">
+  <a href="#yaml_13" class="md-nav__link">
     Yaml
   </a>
   
 </li>
         
           <li class="md-nav__item">
-  <a href="#python_12" class="md-nav__link">
+  <a href="#python_13" class="md-nav__link">
     Python
   </a>
   
@@ -996,6 +1050,7 @@
 <li><a href="#arc_wtext">Arc_wText</a>: defines an arc with text positionned left (moving clock-wise) of arc half-way</li>
 <li><a href="#arrow1">Arrow1</a>: defines a line with arrow(s) given starting and ending point and arrow termination(s) -&gt;, \&lt;-&gt;, \&lt;-</li>
 <li><a href="#force">Force</a>: defines an Indication of a force by an arrow and a text (symbol)</li>
+<li><a href="#wall">Wall</a>: defines an hached box given starting, ending point and thickness, filled with a pattern</li>
 <li><a href="#"></a></li>
 </ul>
 <h2 id="line">Line</h2>
@@ -1180,12 +1235,36 @@ force = Force(contact - vector, contact, r'$Force$', text_pos='start')
 </code></pre>
 
 <p><img alt="Force" src="force.svg" /></p>
+<h2 id="wall">Wall</h2>
+<p><a href="#list-of-shapes">home</a> defines an hached box given starting, ending point and thickness, filled with a pattern</p>
+<h3 id="yaml_12">Yaml</h3>
+<pre><code class="yaml">theta: 30
+L: 8
+B: point(L-4,-2)                      # wall right end
+A: point(-4,tan(radians(theta))*L-2)  # wall left end
+wall: 
+    formula: Wall(x=[A[0], B[0]], y=[A[1], B[1]], thickness=-0.5,transparent=False)
+    style:
+        linecolor: black
+</code></pre>
+
+<h3 id="python_12">Python</h3>
+<pre><code class="python">theta = 30
+L = 8
+B = point(L-4,-2)                      # wall right end
+A = point(-4,tan(radians(theta))*L-2)  # wall left end
+wall= Wall(x=[A[0], B[0]], y=[A[1], B[1]], thickness=-0.5,transparent=False)
+wall.set_linecolor('black')
+</code></pre>
+
+<p><img alt="Wall" src="wall.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 *
-[3]: drawing_tool.set_coordinate_system(xmin=-10, xmax=10,ymin=-10, ymax=10,axis=True)
-[4]: drawing_tool.mpl.gcf().canvas
+[3]: from math import tan, radians, sin, cos # needed for python code
+[4]: drawing_tool.set_coordinate_system(xmin=-10, xmax=10,ymin=-10, ymax=10,axis=True)
+[5]: drawing_tool.mpl.gcf().canvas
 </code></pre>
 
 <p>for Yaml, you need to add those extra steps</p>
@@ -1195,8 +1274,8 @@ myfig={}
 sketchParse(head,myfig)
 </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)</p>
-<h3 id="yaml_12">Yaml</h3>
+<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): this is used by the yaml definition of shapes</p>
+<h3 id="yaml_13">Yaml</h3>
 <pre><code class="python">myfig={}
 sketch=&quot;&quot;&quot;
 # put here the yaml 'object' definition
@@ -1208,7 +1287,7 @@ d = myfig['object'].draw()
 drawing_tool.display()
 </code></pre>
 
-<h3 id="python_12">Python</h3>
+<h3 id="python_13">Python</h3>
 <pre><code class="python">drawing_tool.erase()
 # put the code of the object case here
 # replace object by the actual name line, rectangle, circle...

Разница между файлами не показана из-за своего большого размера
+ 360 - 0
reference/wall.svg


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
search/search_index.json


BIN
sitemap.xml.gz