Freeform Geometry¶
New in version 5.2.
freeform
module provides classes for representing freeform geometry objects.
Freeform class provides a basis for storing freeform geometries. The points of the geometry can be set via the evaluate() method using a keyword argument.
Inheritance Diagram¶
Class Reference¶
-
class
geomdl.freeform.
Freeform
(**kwargs)¶ Bases:
geomdl.abstract.Geometry
n-dimensional freeform geometry
-
data
¶ Returns a dict which contains the geometry data.
Please refer to the wiki for details on using this class member.
-
dimension
¶ Spatial dimension.
Please refer to the wiki for details on using this class member.
Getter: Gets the spatial dimension, e.g. 2D, 3D, etc. Type: int
-
evalpts
¶ Evaluated points.
Please refer to the wiki for details on using this class member.
Getter: Gets the coordinates of the evaluated points Type: list
-
evaluate
(**kwargs)¶ Sets points that form the geometry.
- Keyword Arguments:
points
: sets the points
-
id
¶ Object ID (as an integer).
Please refer to the wiki for details on using this class member.
Getter: Gets the object ID Setter: Sets the object ID Type: int
-
name
¶ Object name (as a string)
Please refer to the wiki for details on using this class member.
Getter: Gets the object name Setter: Sets the object name Type: str
-
opt
¶ Dictionary for storing custom data in the current geometry object.
opt
is a wrapper to a dict in key => value format, where key is string, value is any Python object. You can useopt
property to store custom data inside the geometry object. For instance:geom.opt = ["face_id", 4] # creates "face_id" key and sets its value to an integer geom.opt = ["contents", "data values"] # creates "face_id" key and sets its value to a string print(geom.opt) # will print: {'face_id': 4, 'contents': 'data values'} del geom.opt # deletes the contents of the hash map print(geom.opt) # will print: {} geom.opt = ["body_id", 1] # creates "body_id" key and sets its value to 1 geom.opt = ["body_id", 12] # changes the value of "body_id" to 12 print(geom.opt) # will print: {'body_id': 12} geom.opt = ["body_id", None] # deletes "body_id" print(geom.opt) # will print: {}
Please refer to the wiki for details on using this class member.
Getter: Gets the dict Setter: Adds key and value pair to the dict Deleter: Deletes the contents of the dict
-