IArc¶
- class IArc¶
Bases:
IEntity- Summary:
Represents an arc entity.
Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance
- property bevel_side¶
Gets bevel_side.
- Returns:
The value of bevel_side.
- Return type:
- property block¶
Gets Block.
- Summary:
Returns an IBlock object representing the block that this entity is in.
- property bridges¶
Gets Bridges.
- Summary:
Gets an IBridges collection representing all the bridges on this arc.
- property centre¶
Gets Centre.
- Summary:
The centre point of the arc entity.
Examples:
- property channel_offset_against¶
Gets channel_offset_against.
- Returns:
The value of channel_offset_against.
- Return type:
channel_offset_against (float)
- property channel_offset_with¶
Gets channel_offset_with.
- Returns:
The value of channel_offset_with.
- Return type:
channel_offset_with (float)
- property clockwise¶
Gets Clockwise.
- Summary:
Sets and gets the direction of the arc.
- Returns:
The value of Clockwise.
- Return type:
clockwise (bool)
Examples:
- property combination_end_mode¶
Gets combination_end_mode.
- Returns:
The value of combination_end_mode.
- Return type:
- property combination_palette1_is_main¶
Gets combination_palette1_is_main.
- Returns:
The value of combination_palette1_is_main.
- Return type:
combination_palette1_is_main (bool)
- property construction¶
Gets Construction.
- Returns:
The value of Construction.
- Return type:
construction (bool)
- property direction_locked¶
Gets direction_locked.
- Summary:
Indicates if the direction of the arc 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.
- Summary:
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:
- property drawing¶
Gets Drawing.
- Summary:
Returns an IDrawing object representing the drawing that this entity is in.
- property end¶
Gets End.
- Summary:
Gets or sets the end point of the arc.
- property entity_type¶
Gets entity_type.
- Summary:
Indicates the type of entity.
- Remarks:
Once you know the type of the entity, you can access additional properties. See IAngleDimension, IAnnotationDimension, IArc, IBezier, IBlockInsert, IBorderPlotArea, ICentreDimension, IDimension, IGraphic, IInsertEntity, ILayerInsert, ILeaderDimension, ILine, ILinearDimension, IMasterLayerInsert, IRadiusDimension, IRubberEntity, ISymbolInsert, IText.
- Returns:
The value of entity_type.
- Return type:
- property extents¶
Gets Extents.
- Summary:
Returns an IRect object representing the extents of the entity.
- property fillet_relief¶
Gets fillet_relief.
- Summary:
The fillet relief mode for the arc.
- Remarks:
Introduced in 8.0.0.56
- Returns:
The value of fillet_relief.
- Return type:
- property fillet_relief_extension¶
Gets fillet_relief_extension.
- Summary:
The fillet relief extension distance for the arc.
- Remarks:
Introduced in 8.0.0.56
- Returns:
The value of fillet_relief_extension.
- Return type:
fillet_relief_extension (float)
- property fold_data¶
Gets fold_data.
- Summary:
Returns an IFoldData object representing the folding data for this entity.
- Remarks:
Introduced in Impact 11.0.0.10.
- property geometric¶
Gets Geometric.
- Summary:
Determines if the entity is a geometric entity, i.e. the entity is a line, arc or bezier.
- Remarks:
This property is useful when iterating a list of entities to perform operations on only geometric entities.
- Returns:
The value of Geometric.
- Return type:
geometric (bool)
- property holding_bridge_side¶
Gets holding_bridge_side.
- Returns:
The value of holding_bridge_side.
- Return type:
- property is_circle¶
Gets is_circle.
- Summary:
Read is_circle to determine if the arc represents a complete circle.
- Remarks:
If is_circle is TRUE it will have a sweep of 360 degrees.
- Returns:
The value of is_circle.
- Return type:
is_circle (bool)
- property length¶
Gets Length.
- Summary:
Gets or sets the length of the arc.
- Returns:
The value of Length.
- Return type:
length (float)
Examples:
- property palette¶
Gets Palette.
- Summary:
Returns an IPalette object representing the palette of this entity.
- property radius¶
Gets Radius.
- Summary:
The radius of the arc entity.
- Returns:
The value of Radius.
- Return type:
radius (float)
Examples:
- property rule_height¶
Gets rule_height.
- Returns:
The value of rule_height.
- Return type:
rule_height (float)
- property secondary_palette¶
Gets secondary_palette.
- Summary:
Gets and sets the name of the secondary palette.
- Returns:
The value of secondary_palette.
- Return type:
secondary_palette (str)
- property selected¶
Gets Selected.
- Summary:
Indicates the selected state of the entity.
- Returns:
The value of Selected.
- Return type:
selected (bool)
- property stale¶
Gets Stale.
- Summary:
Use Stale to determine if the entity that this object describes still exists.
- Remarks:
An entity object may become “stale” when the underlying entity no longer exists. If Stale is TRUE then attempting to reference any other method or property of the object will cause an error.
- Returns:
The value of Stale.
- Return type:
stale (bool)
- property start¶
Gets Start.
- Summary:
Gets or sets the start point of the arc.
- property start_angle¶
Gets start_angle.
- Summary:
Gets or sets the start angle.
- Returns:
The value of start_angle.
- Return type:
start_angle (float)
Examples:
- property sweep_angle¶
Gets sweep_angle.
- Summary:
Gets or sets the sweep angle.
- Returns:
The value of sweep_angle.
- Return type:
sweep_angle (float)
Examples:
- property visible¶
Gets Visible.
- Summary:
Indicates whether an entity is currently visible.
- Remarks:
This is a read-only property. Any entity’s visibility is affected by factors such as its palette, its layer, its entity type, its block. Note that this property applies to the current window (equivalent to active_drawing.active_window). Introduced in Impact 8.0.0.74
- Returns:
The value of Visible.
- Return type:
visible (bool)
- property zipper_side¶
Gets zipper_side.
- Returns:
The value of zipper_side.
- Return type:
- add_bridge(start, width)¶
- Summary:
Adds a bridge to the arc.
- Parameters:
start (IVector) – Specifies the start of the bridge.
width (float) – Specifies the width of the bridge.
- clear_bridges()¶
- Summary:
Removes all bridges.
- copy()¶
- Summary:
Makes an identical copy of the entity.
- Remarks:
Note that the new entity goes into the same block as the original entity (not necessarily into the active block). See also copy_to_block method. Introduced in Impact 8.0.0.57
- copy_as_construction()¶
- copy_to_block(block)¶
- Summary:
Makes a copy of the entity, placing it into the specified block.
- Remarks:
Note that the entity’s location in block coordinates will remain constant, meaning that the entity might be moved in the layer (world coordinates). See also Copy method, which copies the entity within the same block. Introduced in Impact 8.0.0.73
- Parameters:
block (IBlock) – The destination block for the entity. This can be an IBlock or an IActiveBlock, allowing you to copy entities to the active sub-block of another layer.
- delete()¶
- Summary:
Deletes the entity.
- Remarks:
You need to avoid deleting entities while iterating through a collection of entities, because Impact is likely to crash when trying to find the next entity in the collection. One trick is to step backwards through the collection, as shown in the example script. A better solution is to put the entity objects into another data structure, such as an array or array_list, and then iterate through that structure instead. After calling this method it is an error to access any of the properties (except Stale) or methods of the entity since the entity is “stale”. Prior to Impact 9.0.0.77, Impact would crash if you attempt to delete an entity which is not within the current block (active_block).
- explode()¶
- Summary:
Explodes this entity into its component parts. Please do not use this method (see remarks).
- Remarks:
This method is no longer supported. Please use IActiveBlock.explode instead.
- extend(length, from_start)¶
- Summary:
Extends the arc 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 arc is extended from its start point otherwise it is extended from its end point.
- get_along(distance_along)¶
- Summary:
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)¶
- get_nearest_along(point)¶
- intersect_axis(origin, direction, matrix)¶
- intersect_entity(other, type)¶
- Summary:
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.
- Is(other_entity)¶
- Summary:
Compares this entity object with another one, to see if they actually represent the same entity.
- Remarks:
This method is not for comparing two entities which might be similar. If you copy an entity (using IEntity.copy, for example) then compare using this Is method, it will return False. Introduced in Impact 8.0.0.33.
- Returns:
True if the two objects refer to the same underlying entity.
- Parameters:
other_entity (IEntity) – The entity to be checked against this one.
Examples:
- isNone()¶
Checks if the COM object is None. This is useful for determining if the wrapper has been initialized with a valid COM object.
- parameter_along(point, height)¶
- Summary:
This method determines a parameter value representing the proportion along the arc by the specified point.
- Remarks:
If the point is not on the arc then height will be equal to the perpendicular distance from the arc to the point.
- Parameters:
point (IVector) – A point on the arc.
height (any) – The perpendicular distance from the arc if point is not on the arc.
Examples:
- point_on_side(point)¶
- Summary:
Determines the side of the entity a given point lies on.
- Remarks:
This method will only return valid results for entities with the following types: etLine etArc etBezier If the entity is not one of the above types then the result of this method will always be esUndefined.
- Returns:
One of the values from the enumeration ipEntitySide.
- Parameters:
point (IVector) – The point to query.
- split_at_point(point)¶
- Summary:
Splits the arc into two separate arcs.
- Remarks:
The original arc is made equal to the first section of the split arc and the other section is returned by this method. If the point specified is not on the arc or is equal to the start or end of the arc this method will fail.
- Returns:
A new IArc object created as a result of splitting the existing arc.
- Parameters:
point (IVector) – Specifies the point at which the arc should be split.
Examples:
Examples