raygeo.sketch.selection
Selection
The current editor selection: point ids, entity ids, a constraint index and an optional junction point.
constraint_idx
constraint_idx: Optional[int]
Selected constraint index.
entity_ids
entity_ids: list[types.EntityID]
Selected entity ids.
junction_pid
junction_pid: Optional[types.EntityID]
Selected implicit junction point.
point_ids
point_ids: list[types.EntityID]
Selected point ids.
add_entity()
add_entity(entity_id: types.EntityID) -> None
Adds one entity without clearing other selection kinds.
| Parameter | Type | Description |
|---|---|---|
entity_id | types.EntityID | |
| Returns | None |
add_point()
add_point(pid: types.EntityID) -> None
Adds one point without clearing other selection kinds.
| Parameter | Type | Description |
|---|---|---|
pid | types.EntityID | |
| Returns | None |
clear()
clear() -> None
Clears every selected item.
| Parameter | Type | Description |
|---|---|---|
| Returns | None |
clear_entities()
clear_entities() -> None
Clears only the selected entities.
| Parameter | Type | Description |
|---|---|---|
| Returns | None |
clear_points()
clear_points() -> None
Clears only the selected points.
| Parameter | Type | Description |
|---|---|---|
| Returns | None |
copy()
copy() -> Selection
Creates a shallow copy of the selection.
| Parameter | Type | Description |
|---|---|---|
| Returns | Selection |
is_empty()
is_empty() -> bool
Whether nothing is selected.
| Parameter | Type | Description |
|---|---|---|
| Returns | bool |
select_connected_entities()
select_connected_entities(
entity_id: types.EntityID,
registry: registry.EntityRegistry,
) -> None
Adds all entities connected through shared points.
| Parameter | Type | Description |
|---|---|---|
entity_id | types.EntityID | |
registry | registry.EntityRegistry | |
| Returns | None |
select_constraint()
select_constraint(idx: int, is_multi: bool) -> None
Selects a constraint by index.
| Parameter | Type | Description |
|---|---|---|
idx | int | |
is_multi | bool | |
| Returns | None |
select_entity()
select_entity(entity_id: types.EntityID, is_multi: bool) -> None
Selects an entity by id.
| Parameter | Type | Description |
|---|---|---|
entity_id | types.EntityID | |
is_multi | bool | |
| Returns | None |
select_junction()
select_junction(pid: types.EntityID, is_multi: bool) -> None
Selects an implicit junction point.
| Parameter | Type | Description |
|---|---|---|
pid | types.EntityID | |
is_multi | bool | |
| Returns | None |
select_point()
select_point(pid: types.EntityID, is_multi: bool) -> None
Selects a point by id.
| Parameter | Type | Description |
|---|---|---|
pid | types.EntityID | |
is_multi | bool | |
| Returns | None |