xdesign.feature
¶
Functions:
Feature (geometry[, mass_atten]) |
A geometric region(s) and associated materials properti(es). |
-
class
xdesign.feature.
Feature
(geometry, mass_atten=1)[source]¶ Bases:
object
A geometric region(s) and associated materials properti(es). Properties and geometry can be manipulated from this level, but rendering must access the geometry directly.
-
geometry
¶ Entity
Defines a region where the properties are valid.
-
mass_atten
¶ scalar
The mass attenuation coefficient of the Feature.
-
add_property
(name, function)[source]¶ Adds a property by name to the Feature. NOTE: Properties added here are not cached because they are probably never called with the same parameters ever or the property is static so it doesnt need caching.
-
area
¶ Returns the total surface area of the feature
-
center
¶ Returns the centroid of the feature.
-
radius
¶ Returns the radius of the smallest boundary circle
-
rotate
(theta, p, axis=None)[source]¶ Rotate feature geometry around a line. Rotating property functions is not supported.
-
translate
(x, y)[source]¶ Translate feature geometry. Translating property functions is not supported.
-
volume
¶ Returns the volume of the feature
-