trnsystor.anchorpoint.AnchorPoint¶
-
class
trnsystor.anchorpoint.AnchorPoint(model, offset=20, height=40, width=40)[source]¶ Handles the anchor point. There are 6 anchor points around a component.
Initialize object.
- Parameters
-
studio_anchor(other, loc)[source]¶ Return the studio anchor based on a location.
- Parameters
other (TrnsysModel) – The other TrnsysModel used to find the anchor of self.
loc (2-tuple) – A 2-tuple of location, eg.: (“best”, “best”) or of
anchor_ids.
-
property
anchor_points¶ Return dict of anchor points str->tuple.
-
property
reverse_anchor_points¶ Return dict of anchor points tuple->str.
-
property
studio_anchor_mapping¶ Return dict of anchor mapping str->tuple.
-
property
studio_anchor_reverse_mapping¶ Return dict of anchor mapping tuple->str.
-
get_octo_pts_dict(offset=10)[source]¶ Define 8-anchor
Pointaround theTrnsysModel.In cartesian space and returns a named-dict with human readable meaning. These points are equally dispersed at the four corners and 4 edges of the center, at distance =
offset.- Parameters
offset (float) – The offset around the center point of
self.
Note
In the Studio, a component has 8 anchor points at the four corners and four edges. units.Links can be created on these connections.
-
property
centroid¶ Return centroid of self.