GeneralConnector (hwx.inspire.core)

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.

Attributes

active: Bool clevisPinHoles: Attribute connectionRadius: Double
direction: Direction entity1: Attribute entity2: Attribute
flipAxis: Bool location1: Location location2: Location
name: Attribute parts: Attribute rotation: Double
visible: Bool  

Public Methods

classmethod getPart (cls, obj)
classmethod isValidConnection (cls, connection)
flip (self)

Attribute Details

active : Bool

Returns or sets the object activeness.

Setting this on or off sets all children. Setting to True sets all the parents active too.

clevisPinHoles : Attribute

Lists all the cylindrical features from a clevis pin part, that has 3 aligned holes and outside two holes are in the same part.

connectionRadius : Double

Specifies the radius of the connection.

direction : Direction

Returns or sets the direction of the object.

entity1 : Attribute

The first feature entity connector is attached to.

entity2 : Attribute

The second feature entity connector is attached to.

flipAxis : Bool

Allows to flip the axis of the object.

location1 : Location (units=”length”)

Specifies the location of the connector object wrt to entity1.

location2 : Location (units=”length”)

Specifies the location of the connector object wrt to entity2.

name : Attribute

Returns or sets the name of the object.

It can be any text string, including spaces, although it’s best to avoid using the following characters: ” ‘ * ? and $.

While these characters are allowed, they could create difficulties when you export the model to other applications.

parts : Attribute

Lists all the parts the object is attached to.

rotation : Double (units=”angle”)

Specifies the angle of rotation from the shaft of the object.

visible : Bool

Determines whether the object is visible in the modeling window.

Setting this on or off sets all children. Setting to True sets all the parents visible too.

Property Details

axis()

Specifies two points along the connector.

This affects the connectors location and position.

features()

Returns the features associated with the connector object.

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.

position()

Specifies the objects position in global space.

This affects where the move tool will show up.

Method Details

classmethod getPart(cls, obj)

Returns the part associated with the specified object.

classmethod isValidConnection(cls, connection)

Can Face mode connector be created out of passed connection object - Joint/Fastener, Hole, …

flip(self)

Swaps the two location end points of the connector.