Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


doc:user:geometry:user:points

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
doc:user:geometry:user:points [2014/08/07 11:32] jorisdoc:user:geometry:user:points [2015/01/07 17:22] boman
Line 3: Line 3:
 ===== Definition ===== ===== Definition =====
  
-Defining the geometry is a significant stepIndeed, in Metafor, most commands are applied on geometric entities, and not on the mesh itselfTherefore, the [[doc:user:general:glossaire#data set|data sets]] are easy to parametrize, since the number of mesh is not taken into account in the writing of boundary conditions. +Geometrical ''Points'' (e.gvertices) are created thanks to an object called ''PointSet'' of the ''Geometry'' using the member function ''define()''Once created, they are stored in the ''PointSet''
- +''Points'' are the geometrical entities of the lowest level. They are used to define later [[Courbes]].
-''Points'' are the most basic entitiesIt is from the ''Points'' that most ''[[doc:user:geometry:user:courbes]]'' are defined.+
  
   pt = pointset.define(number, x, y [, z])   pt = pointset.define(number, x, y [, z])
  
-| ''number'' | user number of the point (must be unique and $\geq 1$) | +with 
-| ''x'', ''y'', ''z'' | coordinates of this point ($z=0$ by default) |+| ''number''          | user number (unique among Points and $\ge 1$)  
 +| ''x'', ''y'', ''z'' | coordinates of this point ($z=0$ by default)   |
  
 ===== Example ===== ===== Example =====
  
-The four summits of a square of length $L$:+Definition of the 4 vertices of a square of length $L=5$. The python variable $L$ is used here to parametrize the positions of the points. 
  
   L=5   L=5
   pointset = geometry.getPointset()   pointset = geometry.getPointset()
      
-  pt1 = pointset.define(1, 0, 0) +  p1 = pointset.define(1, 0, 0) 
-  pt2 = pointset.define(2, L, 0) +  p2 = pointset.define(2, L, 0) 
-  pt3 = pointset.define(3, L, L) +  p3 = pointset.define(3, L, L) 
-  pt4 = pointset.define(4, 0, L) +  p4 = pointset.define(4, 0, L) 
- +   
-===== Note ===== +The following command prints the created points as a list: 
 +  print pointset 
 +which produces the following output: 
 +  PointSet        of size 4 (hash=off) 
 +      Point #1 nDB=[1] (pos in DB) p=[0 0 0] 
 +      Point #2 nDB=[2] (pos in DB) p=[5 0 0] 
 +      Point #3 nDB=[3] (pos in DB) p=[5 5 0] 
 +      Point #4 nDB=[4] (pos in DB) p=[0 5 0]   
 +   
 +===== Note  ===== 
 +{{:doc:user:ico-advanced.png?40 |}}  
 Temporary points can be used to define ''[[doc:user:geometry:user:axes]]'' or ''[[doc:user:geometry:user:triedres]]'': Temporary points can be used to define ''[[doc:user:geometry:user:axes]]'' or ''[[doc:user:geometry:user:triedres]]'':
  
-  pt0 = Point(0, 1, 00)+  pt = Point(1, x, yz)
  
-Since this point was not defined using ''pointset.define'', it will not be found in the ''pointset'', but only in the object that it will help create (''[[axes|Axe]]'' or ''[[triedres|Trièdre]]''.+Since this Point was not defined using ''pointset.define()'', it will not be found in the ''PointSet''.
doc/user/geometry/user/points.txt · Last modified: 2016/03/30 15:23 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki