ILine

class ILine

Bases: IEntity

Description:

Represents a line entity.

Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance

property angle

Gets Angle.

Description:

Gets or sets the angle of the line.

Remarks:

A horizontal line has an angle of zero degrees.

Returns:

The value of Angle.

Return type:

angle (float)

property bevel_side

Gets bevel_side.

Description:

Determines the side to be used for any side-bevelled palette.

Remarks:

This property is inherited from the entity’s palette, but may be overridden on a per entity basis. Introduced in Impact 8.0.0.56

Returns:

The value of bevel_side.

Return type:

bevel_side (ipBevelSide)

property bridges

Gets Bridges.

Description:

Gets an IBridges collection representing all the bridges on this line.

Returns:

The value of Bridges.

Return type:

bridges (IBridges)

property channel_offset_against

Gets channel_offset_against.

Description:

The make-ready channel width, when the entity direction is against the flute/grain.

Remarks:

This property is inherited from the entity’s palette, but may be overridden on a per entity basis. Introduced in Impact 8.0.0.56

Returns:

The value of channel_offset_against.

Return type:

channel_offset_against (float)

property channel_offset_with

Gets channel_offset_with.

Description:

The make-ready channel width, when the entity direction is aligned with the flute/grain.

Remarks:

This property is inherited from the entity’s palette, but may be overridden on a per entity basis. Introduced in Impact 8.0.0.56

Returns:

The value of channel_offset_with.

Return type:

channel_offset_with (float)

property combination_end_mode

Gets combination_end_mode.

Description:

The end-mode to be used for any combination palette.

Remarks:

This property is inherited from the entity’s palette, but may be overridden on a per entity basis. Introduced in Impact 8.0.0.56

Returns:

The value of combination_end_mode.

Return type:

combination_end_mode (ipCombinationEndMode)

property combination_palette1_is_main

Gets combination_palette1_is_main.

Description:

Determines which of the constituent palettes is main palette, for any combination palette.

Remarks:

If True, the first constituent palette is the main palette. If False, the second palette is main. This property is inherited from the entity’s palette, but may be overridden on a per entity basis. Introduced in Impact 8.0.0.56

Returns:

The value of combination_palette1_is_main.

Return type:

combination_palette1_is_main (bool)

property construction

Gets Construction.

Description:

Incidates whether the entity is a construction entity.

Remarks:

Construction entities may only be infinitely long lines or full circles. Introduced in 8.0.0.74

Returns:

The value of Construction.

Return type:

construction (bool)

property direction_locked

Gets direction_locked.

Description:

Indicates if the direction of the line is locked.

Remarks:

If direction_locked is TRUE the direction will not be affected by tools such as Transform Switch, the Arrange tools and the Plot tool.

Returns:

The value of direction_locked.

Return type:

direction_locked (bool)

property display_palette_text

Gets display_palette_text.

Description:

Determines whether palette text is visible or hidden.

Remarks:

Note that the behaviour of palette text also depends on the palette properties and on the user’s visibility settings. Introduced in Impact 6.4.0.10 and 7.0.0.38.

Returns:

The value of display_palette_text.

Return type:

display_palette_text (bool)

Examples:

  • Display palette text

property end

Gets End.

Description:

Gets or sets the end point of the line.

Returns:

The value of End.

Return type:

end (IVector)

property fold_data

Gets fold_data.

Description:

Returns an IFoldData object representing the folding data for this entity.

Remarks:

Introduced in Impact 11.0.0.10.

Returns:

The value of fold_data.

Return type:

fold_data (IFoldData)

property holding_bridge_side

Gets holding_bridge_side.

Description:

Determines the side to be used for any holding bridges.

Remarks:

This property is inherited from the entity’s palette, but may be overridden on a per entity basis. Introduced in Impact 8.0.0.56

Returns:

The value of holding_bridge_side.

Return type:

holding_bridge_side (ipBevelSide)

property length

Gets Length.

Description:

Gets or sets the length of the line.

Returns:

The value of Length.

Return type:

length (float)

property rule_height

Gets rule_height.

Description:

Determines the knife height for this entity.

Remarks:

This property is inherited from the entity’s palette, but may be overridden on a per entity basis. Introduced in Impact 8.0.0.56

Returns:

The value of rule_height.

Return type:

rule_height (float)

property start

Gets Start.

Description:

Gets or sets the start point of the line.

Returns:

The value of Start.

Return type:

start (IVector)

property zipper_side

Gets zipper_side.

Description:

Determines the side to be used for any zipper palette.

Remarks:

This property is inherited from the entity’s palette, but may be overridden on a per entity basis. Introduced in Impact 8.0.0.56

Returns:

The value of zipper_side.

Return type:

zipper_side (ipBevelSide)

add_bridge(start, width)
Description:

Adds a bridge to the line.

Parameters:
  • start (IVector) – Specifies the start of the bridge.

  • width (float) – Specifies the width of the bridge.

Examples:

clear_bridges()
Description:

Removes all bridges.

copy_as_construction()
Description:

Creates a new construction entity from this entity.

Remarks:

Construction entities may only be infinitely long lines or full circles. Introduced in 8.0.0.74

extend(length, from_start)
Description:

Extends the line by a given amount from either the start or the end.

Parameters:
  • length (float) – The length of the extension.

  • from_start (bool) – If from_start is TRUE the line is extended from its start point otherwise it is extended from its end point.

get_along(distance_along)
Description:

Returns a point along the line.

Remarks:

The point is parametrically defined by a value between 0 and 1. 0 represents the start point, 0.5 the mid point and 1 the end point. If the distance_along is less than zero the start point will be returned. If the distance_along is greater than one then the end point will be returned.

Parameters:

distance_along (float) – A value between 0 and 1 inclusive that represents the point along the entity that is required.

get_direction_along(point)
Description:

Returns a vector representing the direction of the entity at the specified point.

Remarks:

If Point is not a position on the entity, the entity’s nearest point is used. Introduced in Impact 8.0.0.49

Returns:

A direction vector representing a line tangential to the entity at the specified position.

Parameters:

point (IVector) – The point on (or near) the entity at which to determine the direction.

get_nearest_along(point)
Description:

Returns a point which is on the entity and is nearest to the specified position vector.

Remarks:

The returned point will always be bounded by the start and end points of the entity. Introduced in Impact 8.0.0.49

Returns:

A point on the entity which is nearest to the position given by Point.

Parameters:

point (IVector) – The point from which to measure the distance to the entity.

intersect_axis(origin, direction, matrix)
Description:

Intersects an axis (an imaginary line) with the entity.

Remarks:

Allows a script to “look” along a line, starting at the Origin point and along the specified Direction, to find intersecting entities - even those in sub-blocks. Used with the recursed_entities property, the entity’s transformation matrix can be used to compensate for the current coordinate system being different to the entity’s coordinate system. Introduced in Impact 8.0.0.71

Returns:

An array of zero or more vectors representing the intersection points. The points are specified in the coordinate system of the currently active block, not the block in which the entity resides.

Parameters:
  • origin (IVector) – The start point of the axis line.

  • direction (IVector) – The direction of the axis line.

  • matrix (IMatrix) – A transformation matrix to apply to the axis before calculating the intersections.

intersect_entity(other, type)
Description:

Gets an array of vectors representing the intersection points between this entity and another.

Parameters:
  • other (IEntity) – Specifies the other entity.

  • type (ipIntersectType) – Dictates whether the entities are to be considered as finite segments or infinitely long.

Examples:

parameter_along(point, height)
Description:

This method determines a parameter value representing the proportion along the line by the specified point. If this point is not on the line then height will be equal to the perpendicular distance from the line to the point.

Parameters:
  • point (IVector) – A point on the line.

  • height (any) – The perpendicular distance from the line if point is not on the line.

Examples:

split_at_point(point)
Description:

Splits the line into two separate lines.

Remarks:

The original line is made equal to the first section of the split line and the other section is returned by this method. If the point specified is not on the line or is equal to the start or end of the line this method will fail.

Returns:

A new ILine object created as a result of splitting the existing line.

Parameters:

point (IVector) – Specifies the point at which the line should be split.

Examples:

Examples