GeneralConnector (hwx.inspire.GeneralConnector)#
- class GeneralConnector(self, **kwds)#
Bases:
GeneralObject
Baseclass for objects which connect 1 or 2 other objects (usually Features).
Can be in one of 2 modes as specified by connectorMode property.
Face - Connected entities must be a FeatureCurve or FeatureArea.
The connector is attached to the feature at ‘location1’ and sticks out in ‘direction’.
‘entity2’ isn’t used to orient the connector unless both features are holes in which case ‘direction’ is ignored and the connector goes through both holes. ‘location2’ isn’t used at all.
PointToPoint - Connector extends from location1 to location2. ‘direction’ isn’t used.
# Name
Type
property
property
property
property
property
# Name
Description
flip
(self)Swaps the two location end points of the connector.
getGuiValue
(self, attr, **kwds)getPart
(obj)Returns the part associated with the specified object.
isValidConnection
(connection)Can Face mode connector be created out of passed connection object -
- property clevisPinHoles#
Lists all the cylindrical features from a clevis pin part, that has 3 aligned holes and outside two holes are in the same part.
- property parts#
Lists all the parts the object is attached to.
- property entity1#
The first feature entity connector is attached to.
- property location1#
Specifies the location of the connector object wrt to entity1.
- property entity2#
The second feature entity connector is attached to.
- property location2#
Specifies the location of the connector object wrt to entity2.
- property direction#
Returns or sets the direction of the object.
- property flipAxis#
Allows to flip the axis of the object.
- property overrideConnRadius#
Allows to override default connection radius value.
- property connectionRadius#
Specifies the radius of the connection.
- property rotation#
Specifies the angle of rotation from the shaft of the object.
- getGuiValue(attr, **kwds)#
Get value formatted to be shown in the gui
- Parameters:
attr (str) – Attribute name to gets its gui value.
- Returns:
Returns a string of the value with its gui units, like “5 mm/s”.
- Return type:
str
- property features#
Returns the features associated with the connector object.
- property location#
Specifies the location of the connector object.
For PointToPoint and hole based Face mode connectors this is the center of the object / axis. For Face mode connectors attached to a non hole face this the location1.
Location is not necessarily the same as the origin of the position.
- property axis#
Specifies two points along the connector.
This affects the connectors location and position.
- flip()#
Swaps the two location end points of the connector.
- property movable#
Specifies if the connector object can be moved using move tool.
GeneralConnectorManipulator will work on any connector regardless of this.
- property position#
Specifies the objects position in global space.
This affects where the move tool will show up.