EdgeSelection#
- class ansys.geometry.core.selection_builder.edge_selection.EdgeSelection(design: ansys.geometry.core.designer.design.Design, grpc_client: ansys.geometry.core.connection.client.GrpcClient, items: list[ansys.geometry.core.designer.edge.Edge] = None)#
Bases:
ansys.geometry.core.selection_builder.typed_selection.TypedSelectionA builder for creating an edge selection.
Overview#
Return all visible edges in the active document. |
|
Return all edges in the active document. |
|
Return edges belonging to a named selection. |
|
Return edges whose length falls within a range. |
|
Return edges whose X-location falls within a range. |
|
Return edges whose Y-location falls within a range. |
|
Return edges whose Z-location falls within a range. |
|
Return the complement of this edge selection. |
|
Filter edges by length range. |
|
Filter edges keeping only the edge(s) with the maximum length. |
|
Filter edges keeping only the edge(s) with the minimum length. |
|
Filter edges by curve type. |
|
Filter edges by length percentile range. |
|
Extend selection to include nearby edges within a distance. |
|
Extend selection to all topologically connected edges. |
|
Extend selection to all tangentially chained edges. |
|
Extend selection to all coaxial edges. |
|
Order edges by length (ascending). |
|
Group edges by curve type. |
Import detail#
from ansys.geometry.core.selection_builder.edge_selection import EdgeSelection
Method detail#
- EdgeSelection.__add__(other: EdgeSelection) EdgeSelection#
Return a new selection that is the union of this selection and another.
- EdgeSelection.__sub__(other: EdgeSelection) EdgeSelection#
Return a new selection that is the difference of this selection and another.
- EdgeSelection.__and__(other: EdgeSelection) EdgeSelection#
Return a new selection that is the intersection of this selection and another.
- EdgeSelection.get_all_visible_edges() EdgeSelection#
Return all visible edges in the active document.
- Returns:
EdgeSelectionAll visible edges.
- EdgeSelection.get_all_edges() EdgeSelection#
Return all edges in the active document.
- Returns:
EdgeSelectionAll edges.
- EdgeSelection.get_edges_from_named_selection(name: str) EdgeSelection#
Return edges belonging to a named selection.
- Parameters:
- name
str Name of the named selection.
- name
- Returns:
EdgeSelectionEdges belonging to the matched named selection.
- EdgeSelection.get_edges_with_length(min: numbers.Real | pint.Quantity | ansys.geometry.core.misc.measurements.Distance, max: numbers.Real | pint.Quantity | ansys.geometry.core.misc.measurements.Distance | None = None) EdgeSelection#
Return edges whose length falls within a range.
- Parameters:
- min
Real,Quantity,orDistance Minimum edge length (in mm if a plain number).
- max
Real,Quantity,orDistance,optional Maximum edge length. If
None, no upper bound is applied.
- min
- Returns:
EdgeSelectionEdges whose length is within the specified range.
- EdgeSelection.get_edges_with_x_location(range_type: ansys.geometry.core.selection_builder.selection_builder.RangeType, min: numbers.Real | pint.Quantity | ansys.geometry.core.misc.measurements.Distance | None = None, max: numbers.Real | pint.Quantity | ansys.geometry.core.misc.measurements.Distance | None = None) EdgeSelection#
Return edges whose X-location falls within a range.
- Parameters:
- range_type
RangeType Whether to intersect or contain the range.
- min
Real,Quantity,orDistance,optional Minimum X coordinate (in mm if a plain number).
- max
Real,Quantity,orDistance,optional Maximum X coordinate.
- range_type
- Returns:
EdgeSelectionEdges within the specified X-location range.
- EdgeSelection.get_edges_with_y_location(range_type: ansys.geometry.core.selection_builder.selection_builder.RangeType, min: numbers.Real | pint.Quantity | ansys.geometry.core.misc.measurements.Distance | None = None, max: numbers.Real | pint.Quantity | ansys.geometry.core.misc.measurements.Distance | None = None) EdgeSelection#
Return edges whose Y-location falls within a range.
- Parameters:
- range_type
RangeType Whether to intersect or contain the range.
- min
Real,Quantity,orDistance,optional Minimum Y coordinate (in mm if a plain number).
- max
Real,Quantity,orDistance,optional Maximum Y coordinate.
- range_type
- Returns:
EdgeSelectionEdges within the specified Y-location range.
- EdgeSelection.get_edges_with_z_location(range_type: ansys.geometry.core.selection_builder.selection_builder.RangeType, min: numbers.Real | pint.Quantity | ansys.geometry.core.misc.measurements.Distance | None = None, max: numbers.Real | pint.Quantity | ansys.geometry.core.misc.measurements.Distance | None = None) EdgeSelection#
Return edges whose Z-location falls within a range.
- Parameters:
- range_type
RangeType Whether to intersect or contain the range.
- min
Real,Quantity,orDistance,optional Minimum Z coordinate (in mm if a plain number).
- max
Real,Quantity,orDistance,optional Maximum Z coordinate.
- range_type
- Returns:
EdgeSelectionEdges within the specified Z-location range.
- EdgeSelection.invert_edge_selection(scope: ansys.geometry.core.selection_builder.selection_builder.InvertTopologyScope = InvertTopologyScope.INVERTTOPOLOGYSCOPE_ALL) EdgeSelection#
Return the complement of this edge selection.
- Parameters:
- scope
InvertTopologyScope, default:InvertTopologyScope.INVERTTOPOLOGYSCOPE_ALL Whether to invert relative to all edges or only visible edges.
- scope
- Returns:
EdgeSelectionThe inverted edge selection.
- EdgeSelection.filter_edges_by_length(min: numbers.Real | pint.Quantity | ansys.geometry.core.misc.measurements.Distance, max: numbers.Real | pint.Quantity | ansys.geometry.core.misc.measurements.Distance | None = None) EdgeSelection#
Filter edges by length range.
- Parameters:
- min
RealorQuantity Minimum edge length (in mm if a plain number).
- max
RealorQuantity,optional Maximum edge length. If
None, no upper bound is applied.
- min
- Returns:
EdgeSelectionEdges within the specified length range.
- EdgeSelection.filter_edges_max_length() EdgeSelection#
Filter edges keeping only the edge(s) with the maximum length.
- Returns:
EdgeSelectionEdge(s) with the maximum length.
- EdgeSelection.filter_edges_min_length() EdgeSelection#
Filter edges keeping only the edge(s) with the minimum length.
- Returns:
EdgeSelectionEdge(s) with the minimum length.
- EdgeSelection.filter_edges_by_curve_type(curve_type: ansys.geometry.core.designer.edge.CurveType) EdgeSelection#
Filter edges by curve type.
- Parameters:
- curve_type
CurveType The curve type to retain.
- curve_type
- Returns:
EdgeSelectionEdges matching the given curve type.
- EdgeSelection.filter_edges_length_percentile(min_percentile: float, max_percentile: float) EdgeSelection#
Filter edges by length percentile range.
- EdgeSelection.extend_nearby_edges(distance: numbers.Real | pint.Quantity | ansys.geometry.core.misc.measurements.Distance, scope: ansys.geometry.core.selection_builder.selection_builder.ExtendScope = ExtendScope.EXTENDSCOPE_ALL) EdgeSelection#
Extend selection to include nearby edges within a distance.
- Parameters:
- distance
Real,Quantity,orDistance Maximum gap distance (in mm if a plain number).
- scope
ExtendScope, default:ExtendScope.EXTENDSCOPE_ALL Scope of edges to consider for extension.
- distance
- Returns:
EdgeSelectionExtended edge selection.
- EdgeSelection.extend_to_connected(scope: ansys.geometry.core.selection_builder.selection_builder.ExtendScope = ExtendScope.EXTENDSCOPE_ALL) EdgeSelection#
Extend selection to all topologically connected edges.
- Parameters:
- scope
ExtendScope, default:ExtendScope.EXTENDSCOPE_ALL Scope of edges to consider for extension.
- scope
- Returns:
EdgeSelectionExtended edge selection.
- EdgeSelection.extend_to_tangent_chain(scope: ansys.geometry.core.selection_builder.selection_builder.ExtendScope = ExtendScope.EXTENDSCOPE_ALL) EdgeSelection#
Extend selection to all tangentially chained edges.
- Parameters:
- scope
ExtendScope, default:ExtendScope.EXTENDSCOPE_ALL Scope of edges to consider for extension.
- scope
- Returns:
EdgeSelectionExtended edge selection.
- EdgeSelection.extend_to_coaxial_edges(scope: ansys.geometry.core.selection_builder.selection_builder.ExtendScope = ExtendScope.EXTENDSCOPE_ALL) EdgeSelection#
Extend selection to all coaxial edges.
- Parameters:
- scope
ExtendScope, default:ExtendScope.EXTENDSCOPE_ALL Scope of edges to consider for extension.
- scope
- Returns:
EdgeSelectionExtended edge selection.
- EdgeSelection.order_edges_by_length() EdgeSelection#
Order edges by length (ascending).
- Returns:
EdgeSelectionEdges ordered by ascending length.
- EdgeSelection.group_edges_by_curve_type() list[EdgeSelection]#
Group edges by curve type.
- Returns:
list[EdgeSelection]Edges partitioned into groups of the same curve type.