=========================== Location (hwx.inspire.core) =========================== Store a location relative to another entity. Locations are get or set in global coordinates. Locations relative to Features have special code to stay at the same point on the feature after feature modifications like push/pull. -------------- Public Methods -------------- +------------------------------------------------------------+ | castForGet_ (self, obj, value) | +------------------------------------------------------------+ | castForSet_ (self, obj, value) | +------------------------------------------------------------+ | getCoord_ (self, feature, point) | +------------------------------------------------------------+ | getCoordLocation_ (self, feature, coord, normalized=False) | +------------------------------------------------------------+ | getValue_ (self, obj) | +------------------------------------------------------------+ -------------- Method Details -------------- .. _castForGet: .. method:: castForGet(self, obj, value) Converts and returns the location value to gui units. .. _castForSet: .. method:: castForSet(self, obj, value) Converts and validates the location value before setting it. :param obj: Object this attribute belongs to. :type obj: GeneralObject :param value: Value of the attribute to set. :type value: List[float] :returns: Validated and converted value. :rtype: Location .. _getCoord: .. method:: getCoord(self, feature, point) Converts the location on the feature into UV coordinates. None is returned if point is not touching feature :param feature: Feature from which coordinates are extracted from. :type feature: Feature :param point: Point on the feature for which UV coordinates are derived. :type point: Point :returns: Coordinates from the converted location. :rtype: UV Coordinates .. _getCoordLocation: .. method:: getCoordLocation(self, feature, coord, normalized=False) Convert coordinates to location from the specified feature. :param feature: Feature on which location is extracted. :type feature: Feature :param coord: Coordinates from which the location is derived. :type coord: List[Point] :param normalized: If True normalize the locations, defaults to False. :type normalized: bool :returns: Converted UV coordinates to location value. :rtype: Location .. _getValue: .. method:: getValue(self, obj) Returns the location value from the specified object.