diff --git a/locales/be.tsv b/locales/be.tsv index 4bbe9c4..a5a2c8e 100644 --- a/locales/be.tsv +++ b/locales/be.tsv @@ -2785,3 +2785,36 @@ no track within 15 m у 15 м няма рэек the tracks are not joined, or run the other way (see View > AI lanes) рэйкі не злучаны або ідуць у іншы бок (Выгляд > Паласы ШІ) no track beside няма рэек ля Drives on Ездзіць па +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Выбрана зыходная вяршыня. Пстрыкніце мэтавую вяршыню для прывязкі (Shift: толькі па гарызанталі, Esc: адмена) +Aim at a vertex of the selected object Нацэліцеся на вяршыню абранага аб'екта +Snapped to vertex! (Ctrl+Z to undo) Прышпілены да вяршыні! (Ctrl+Z, каб адмяніць) +Aim at a target vertex or spline endpoint Нацэліцеся на мэтавую вяршыню або канцавую кропку сплайна +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Выбраны край крыніцы. Пстрыкніце мэтавы край або дарогу, каб выраўнаваць (Shift: толькі па гарызанталі, Esc: адмена) +Aim at an edge of the selected object Нацэліцеся на край абранага аб'екта +Aligned edge to edge! (Ctrl+Z to undo) Выраўнаваны ад краю да краю! (Ctrl+Z, каб адмяніць) +Aim at a target edge or road Цэліцца ў мэтавы край або дарогу +Target cancelled. Pick a source vertex again Мэта адменена. Зноў абярыце зыходную вяршыню +Vertex snap cancelled Прывязка да вяршыні адменена +Target cancelled. Pick a source edge again Мэта адменена. Зноў абярыце зыходны край +Edge snap cancelled Прывязка краёў адменена +Select an object first to snap its vertex Спачатку абярыце аб'ект, каб зафіксаваць яго вяршыню +Vertex snap: click a source vertex on the selected object (Esc to cancel) Прывязка да вяршыні: пстрыкніце зыходную вяршыню на выбраным аб'екце (Esc для адмены) +Snap vertex to vertex Прывязаць вяршыню да вяршыні +Select an object first to align its edge Спачатку абярыце аб'ект, каб выраўнаваць яго край +Edge snap: click a source edge on the selected object (Esc to cancel) Прывязка краю: пстрыкніце зыходны край на выбраным аб'екце (Esc для адмены) +Snap edge to edge Прышпіліць край да краю +Snap vertex to vertex (V) Прывязаць вяршыню да вяршыні (V) +Snap edge to edge (L) Прывязаць край да краю (L) +Snap vertex (V) Вершыня прывязкі (V) +Snap a vertex of this object to another vertex (Shortcut: V) Прывязаць вяршыню гэтага аб'екта да іншай вяршыні (Ярлык: V) +Snap edge (L) Край фіксацыі (L) +Snap an edge of this object to another edge or road (Shortcut: L) Прывязаць край гэтага аб'екта да іншага краю або дарогі (Ярлык: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Прывязаць вяршыню выбранага аб'екта да вяршыні іншага аб'екта (V)\nShift: толькі па гарызанталі, Esc/пстрычка правай кнопкай мышы: адмена +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Выраўнаваць край абранага аб'екта па краі або дарозе (L)\nПаварочвае і замацоўвае коллінеарна\nЗрух: толькі па гарызанталі, Esc/пстрычка правай кнопкай мышы: адмена +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Точка 1 выраўнавана! Клікніце другую кропку на аб'екце для павароту або Esc для завяршэння +Reference angle set. Click a target point or spline to align (Esc: finish) Апорны кут зададзены. Клікніце мэтавую кропку або дарогу для выраўноўвання (Esc: завяршыць) +Pick a different vertex on the object Выберыце іншую вяршыню на аб'екце +Click a 2nd reference point on the object, or Esc to finish Клікніце 2-ю апорную кропку на аб'екце або націсніце Esc для завяршэння +Aligned angle! (Ctrl+Z to undo) Кут выраўнаваны! (Ctrl+Z для адмены) +Vertex snap complete Прывязка вяршыні завершана +Align vertex angle Выраўнаваць кут вяршыні diff --git a/locales/ca.tsv b/locales/ca.tsv index 44b13b2..68027e5 100644 --- a/locales/ca.tsv +++ b/locales/ca.tsv @@ -2785,3 +2785,36 @@ no track within 15 m cap via a menys de 15 m the tracks are not joined, or run the other way (see View > AI lanes) les vies no estan unides o van en sentit contrari (vegeu Vista > Carrils d'IA) no track beside cap via al costat de Drives on Circula per +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Vèrtex font escollit. Feu clic a un vèrtex objectiu per ajustar-lo (Maj: només horitzontal, Esc: cancel·la) +Aim at a vertex of the selected object Apunta a un vèrtex de l'objecte seleccionat +Snapped to vertex! (Ctrl+Z to undo) Enganxat al vèrtex! (Ctrl+Z per desfer) +Aim at a target vertex or spline endpoint Apunteu a un vèrtex objectiu o punt final de spline +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) S'ha triat la vora de la font. Feu clic a una vora o una carretera objectiu per alinear-la (Maj: només horitzontal, Esc: cancel·la) +Aim at an edge of the selected object Apunta a una vora de l'objecte seleccionat +Aligned edge to edge! (Ctrl+Z to undo) Alineat vora a vora! (Ctrl+Z per desfer) +Aim at a target edge or road Apunta a una vora o carretera objectiu +Target cancelled. Pick a source vertex again Objectiu cancel·lat. Torna a triar un vèrtex font +Vertex snap cancelled S'ha cancel·lat l'ajust del vèrtex +Target cancelled. Pick a source edge again Objectiu cancel·lat. Torna a triar una vora font +Edge snap cancelled S'ha cancel·lat la fixació de vora +Select an object first to snap its vertex Seleccioneu primer un objecte per ajustar-ne el vèrtex +Vertex snap: click a source vertex on the selected object (Esc to cancel) Fixació de vèrtex: feu clic a un vèrtex font de l'objecte seleccionat (Esc per cancel·lar) +Snap vertex to vertex Ajusta el vèrtex al vèrtex +Select an object first to align its edge Seleccioneu primer un objecte per alinear-ne la vora +Edge snap: click a source edge on the selected object (Esc to cancel) Fixació de vora: feu clic a una vora font de l'objecte seleccionat (Esc per cancel·lar) +Snap edge to edge Enganxa vora a vora +Snap vertex to vertex (V) Ajusta el vèrtex al vèrtex (V) +Snap edge to edge (L) Enganxa vora a vora (L) +Snap vertex (V) Vèrtex de fixació (V) +Snap a vertex of this object to another vertex (Shortcut: V) Ajusta un vèrtex d'aquest objecte a un altre vèrtex (Drecera: V) +Snap edge (L) Vora ajustada (L) +Snap an edge of this object to another edge or road (Shortcut: L) Fixeu una vora d'aquest objecte a una altra vora o carretera (Drecera: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Ajusta un vèrtex de l'objecte seleccionat a un vèrtex d'un altre objecte (V)\nMaj: només horitzontal, Esc/Clic dret: Cancel·la +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Alinea una vora de l'objecte seleccionat a una vora o una carretera (L)\nGira i ajusta colineal\nCanvi: només horitzontal, Esc/Clic dret: Cancel·la +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Punt 1 alineat! Feu clic a un 2n punt de l'objecte per girar, o Esc per finalitzar +Reference angle set. Click a target point or spline to align (Esc: finish) Angle de referència establert. Feu clic a un punt objectiu o carretera per alinear (Esc: finalitzar) +Pick a different vertex on the object Trieu un vèrtex diferent de l'objecte +Click a 2nd reference point on the object, or Esc to finish Feu clic a un 2n punt de referència a l'objecte, o Esc per finalitzar +Aligned angle! (Ctrl+Z to undo) Angle alineat! (Ctrl+Z per desfer) +Vertex snap complete Ajust de vèrtex completat +Align vertex angle Alinea l'angle del vèrtex diff --git a/locales/cs.tsv b/locales/cs.tsv index 140f099..c80d371 100644 --- a/locales/cs.tsv +++ b/locales/cs.tsv @@ -2785,3 +2785,36 @@ no track within 15 m do 15 m nejsou koleje the tracks are not joined, or run the other way (see View > AI lanes) koleje nejsou spojeny nebo vedou opačně (viz Zobrazení > Pruhy AI) no track beside žádné koleje vedle Drives on Jezdí po +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Zvolený zdrojový vertex. Klikněte na cílový vrchol, který chcete přichytit (Shift: pouze horizontální, Esc: zrušení) +Aim at a vertex of the selected object Zamiřte na vrchol vybraného objektu +Snapped to vertex! (Ctrl+Z to undo) Přichyceno k vrcholu! (Ctrl+Z pro vrácení zpět) +Aim at a target vertex or spline endpoint Zamiřte na cílový vrchol nebo koncový bod spline +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Okraj zdroje vybrán. Kliknutím na cílovou hranu nebo cestu zarovnáte (Shift: pouze vodorovně, Esc: zrušení) +Aim at an edge of the selected object Zamiřte na okraj vybraného objektu +Aligned edge to edge! (Ctrl+Z to undo) Zarovnáno od okraje k okraji! (Ctrl+Z pro vrácení zpět) +Aim at a target edge or road Zamiřte na cílovou hranu nebo silnici +Target cancelled. Pick a source vertex again Cíl zrušen. Znovu vyberte zdrojový vrchol +Vertex snap cancelled Vertex snap zrušeno +Target cancelled. Pick a source edge again Cíl zrušen. Znovu vyberte okraj zdroje +Edge snap cancelled Uchopení okraje zrušeno +Select an object first to snap its vertex Nejprve vyberte objekt, abyste přichytili jeho vrchol +Vertex snap: click a source vertex on the selected object (Esc to cancel) Uchop vertexu: klikněte na zdrojový vertex na vybraném objektu (Esc pro zrušení) +Snap vertex to vertex Přichytit vrchol k vrcholu +Select an object first to align its edge Nejprve vyberte objekt a zarovnejte jeho okraj +Edge snap: click a source edge on the selected object (Esc to cancel) Uchopení hrany: klikněte na zdrojovou hranu na vybraném objektu (zrušte pomocí klávesy Esc) +Snap edge to edge Přichytit okraj k okraji +Snap vertex to vertex (V) Přichytit vrchol k vrcholu (V) +Snap edge to edge (L) Přichytit okraj k okraji (L) +Snap vertex (V) Vrchol přichycení (V) +Snap a vertex of this object to another vertex (Shortcut: V) Přichyťte vrchol tohoto objektu k jinému vrcholu (Zkratka: V) +Snap edge (L) Zacvakávací okraj (L) +Snap an edge of this object to another edge or road (Shortcut: L) Přichyťte okraj tohoto objektu k jinému okraji nebo silnici (Zkratka: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Přichytit vrchol vybraného objektu k vrcholu jiného objektu (V)\nShift: Pouze vodorovně, Esc/Kliknutí pravým tlačítkem: Zrušit +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Zarovnat okraj vybraného objektu k okraji nebo silnici (L)\nOtočí a přichytí kolineárně\nShift: Pouze vodorovně, Esc/Kliknutí pravým tlačítkem: Zrušit +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Bod 1 zarovnán! Klikněte na 2. bod na objektu pro otočení, nebo Esc pro dokončení +Reference angle set. Click a target point or spline to align (Esc: finish) Referenční úhel nastaven. Klikněte na cílový bod nebo silnici pro zarovnání (Esc: dokončit) +Pick a different vertex on the object Vyberte jiný vrchol na objektu +Click a 2nd reference point on the object, or Esc to finish Klikněte na 2. referenční bod na objektu nebo Esc pro dokončení +Aligned angle! (Ctrl+Z to undo) Úhel zarovnán! (Ctrl+Z pro vrácení zpět) +Vertex snap complete Přichycení vrcholu dokončeno +Align vertex angle Zarovnat úhel vrcholu diff --git a/locales/de.tsv b/locales/de.tsv index f3ffde5..2df8b8a 100644 --- a/locales/de.tsv +++ b/locales/de.tsv @@ -2783,3 +2783,36 @@ no track within 15 m kein Gleis im Umkreis von 15 m the tracks are not joined, or run the other way (see View > AI lanes) die Gleise sind nicht verbunden oder verlaufen in die andere Richtung (siehe Ansicht > KI-Spuren) no track beside kein Gleis neben Drives on Fährt auf +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Quellscheitelpunkt ausgewählt. Klicken Sie zum Fangen auf einen Zielscheitelpunkt (Umschalttaste: nur horizontal, Esc: Abbrechen). +Aim at a vertex of the selected object Zielen Sie auf einen Scheitelpunkt des ausgewählten Objekts +Snapped to vertex! (Ctrl+Z to undo) Am Scheitelpunkt eingerastet! (Strg+Z zum Rückgängigmachen) +Aim at a target vertex or spline endpoint Zielen Sie auf einen Zielscheitelpunkt oder Spline-Endpunkt +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Quellkante ausgewählt. Klicken Sie zum Ausrichten auf eine Zielkante oder -straße (Umschalttaste: nur horizontal, Esc: Abbrechen). +Aim at an edge of the selected object Zielen Sie auf eine Kante des ausgewählten Objekts +Aligned edge to edge! (Ctrl+Z to undo) Kante an Kante ausgerichtet! (Strg+Z zum Rückgängigmachen) +Aim at a target edge or road Zielen Sie auf eine Zielkante oder Straße +Target cancelled. Pick a source vertex again Ziel abgesagt. Wählen Sie erneut einen Quellscheitelpunkt aus +Vertex snap cancelled Scheitelpunktfang abgebrochen +Target cancelled. Pick a source edge again Ziel abgesagt. Wählen Sie erneut eine Quellkante aus +Edge snap cancelled Kantenfang abgebrochen +Select an object first to snap its vertex Wählen Sie zunächst ein Objekt aus, um dessen Scheitelpunkt einzurasten +Vertex snap: click a source vertex on the selected object (Esc to cancel) Scheitelpunktfang: Klicken Sie auf einen Quellscheitelpunkt des ausgewählten Objekts (Esc zum Abbrechen). +Snap vertex to vertex Scheitelpunkt an Scheitelpunkt einrasten +Select an object first to align its edge Wählen Sie zunächst ein Objekt aus, um dessen Kante auszurichten +Edge snap: click a source edge on the selected object (Esc to cancel) Kantenfang: Klicken Sie auf eine Quellkante am ausgewählten Objekt (Esc zum Abbrechen). +Snap edge to edge Kante an Kante einrasten +Snap vertex to vertex (V) Scheitelpunkt an Scheitelpunkt einrasten (V) +Snap edge to edge (L) Kante an Kante einrasten (L) +Snap vertex (V) Scheitelpunkt fangen (V) +Snap a vertex of this object to another vertex (Shortcut: V) Fangen Sie einen Scheitelpunkt dieses Objekts an einem anderen Scheitelpunkt ein (Tastenkürzel: V) +Snap edge (L) Schnappkante (L) +Snap an edge of this object to another edge or road (Shortcut: L) Eine Kante dieses Objekts an einer anderen Kante oder Straße einrasten lassen (Tastenkürzel: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Einen Scheitelpunkt des ausgewählten Objekts an einem Scheitelpunkt eines anderen Objekts einrasten lassen (V)\nVerschiebung: Nur horizontal, Esc/Rechtsklick: Abbrechen +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Richten Sie eine Kante des ausgewählten Objekts an einer Kante oder Straße aus (L).\nDreht und rastet kollinear ein\nUmschalttaste: Nur horizontal, Esc/Rechtsklick: Abbrechen +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Punkt 1 ausgerichtet! Klicken Sie auf einen 2. Punkt am Objekt zum Drehen oder Esc zum Beenden +Reference angle set. Click a target point or spline to align (Esc: finish) Referenzwinkel festgelegt. Klicken Sie auf einen Zielpunkt oder eine Straße zum Ausrichten (Esc: Beenden) +Pick a different vertex on the object Wählen Sie einen anderen Scheitelpunkt am Objekt +Click a 2nd reference point on the object, or Esc to finish Klicken Sie auf einen 2. Referenzpunkt am Objekt oder Esc zum Beenden +Aligned angle! (Ctrl+Z to undo) Winkel ausgerichtet! (Strg+Z zum Rückgängigmachen) +Vertex snap complete Scheitelpunkt-Ausrichtung abgeschlossen +Align vertex angle Scheitelpunktwinkel ausrichten diff --git a/locales/es.tsv b/locales/es.tsv index 379227e..fabe8b6 100644 --- a/locales/es.tsv +++ b/locales/es.tsv @@ -2785,3 +2785,36 @@ no track within 15 m no hay vía a menos de 15 m the tracks are not joined, or run the other way (see View > AI lanes) las vías no están unidas o van en sentido contrario (ver Ver > Carriles de IA) no track beside sin vía junto a Drives on Circula por +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Vértice de origen elegido. Haga clic en un vértice de destino para ajustar (Shift: solo horizontal, Esc: cancelar) +Aim at a vertex of the selected object Apunta a un vértice del objeto seleccionado. +Snapped to vertex! (Ctrl+Z to undo) ¡Ajustado al vértice! (Ctrl+Z para deshacer) +Aim at a target vertex or spline endpoint Apunte a un vértice objetivo o al punto final de una spline +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Borde de origen elegido. Haga clic en un borde o carretera de destino para alinear (Shift: solo horizontal, Esc: cancelar) +Aim at an edge of the selected object Apunta a un borde del objeto seleccionado. +Aligned edge to edge! (Ctrl+Z to undo) ¡Alineado de borde a borde! (Ctrl+Z para deshacer) +Aim at a target edge or road Apunta a un borde o camino objetivo +Target cancelled. Pick a source vertex again Objetivo cancelado. Elija un vértice de origen nuevamente +Vertex snap cancelled Ajuste de vértice cancelado +Target cancelled. Pick a source edge again Objetivo cancelado. Elija un borde de origen nuevamente +Edge snap cancelled Ajuste de borde cancelado +Select an object first to snap its vertex Seleccione un objeto primero para ajustar su vértice +Vertex snap: click a source vertex on the selected object (Esc to cancel) Ajuste de vértice: haga clic en un vértice de origen en el objeto seleccionado (Esc para cancelar) +Snap vertex to vertex Ajustar vértice a vértice +Select an object first to align its edge Seleccione un objeto primero para alinear su borde +Edge snap: click a source edge on the selected object (Esc to cancel) Ajuste de borde: haga clic en un borde de origen en el objeto seleccionado (Esc para cancelar) +Snap edge to edge Ajustar borde a borde +Snap vertex to vertex (V) Ajustar vértice a vértice (V) +Snap edge to edge (L) Ajustar borde a borde (L) +Snap vertex (V) Ajustar vértice (V) +Snap a vertex of this object to another vertex (Shortcut: V) Ajustar un vértice de este objeto a otro vértice (Atajo: V) +Snap edge (L) Borde a presión (L) +Snap an edge of this object to another edge or road (Shortcut: L) Ajustar un borde de este objeto a otro borde o carretera (atajo: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Ajustar un vértice del objeto seleccionado a un vértice de otro objeto (V)\nMayús: Solo horizontal, Esc/Clic derecho: Cancelar +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Alinear un borde del objeto seleccionado con un borde o carretera (L)\nGira y ajusta\ncolineal Mayús: Solo horizontal, Esc/Clic derecho: Cancelar +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish ¡Punto 1 alineado! Haga clic en un 2.º punto del objeto para rotar, o Esc para finalizar +Reference angle set. Click a target point or spline to align (Esc: finish) Ángulo de referencia establecido. Haga clic en un punto objetivo o carretera para alinear (Esc: finalizar) +Pick a different vertex on the object Elija un vértice diferente en el objeto +Click a 2nd reference point on the object, or Esc to finish Haga clic en un 2.º punto de referencia en el objeto, o Esc para finalizar +Aligned angle! (Ctrl+Z to undo) ¡Ángulo alineado! (Ctrl+Z para deshacer) +Vertex snap complete Ajuste de vértice completado +Align vertex angle Alinear ángulo del vértice diff --git a/locales/fr.tsv b/locales/fr.tsv index 50c3ae2..f581f1a 100644 --- a/locales/fr.tsv +++ b/locales/fr.tsv @@ -2783,3 +2783,36 @@ no track within 15 m aucune voie ferrée à moins de 15 m the tracks are not joined, or run the other way (see View > AI lanes) les voies ne sont pas jointes, ou vont dans l'autre sens (voir Vue > Voies IA) no track beside pas de voie ferrée près de Drives on Circule sur +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Sommet source choisi. Cliquez sur un sommet cible à capturer (Maj : horizontal uniquement, Échap : annuler) +Aim at a vertex of the selected object Viser un sommet de l'objet sélectionné +Snapped to vertex! (Ctrl+Z to undo) Accroché au sommet ! (Ctrl+Z pour annuler) +Aim at a target vertex or spline endpoint Viser un sommet cible ou un point final de spline +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Bord source choisi. Cliquez sur un bord ou une route cible à aligner (Maj : horizontal uniquement, Échap : annuler) +Aim at an edge of the selected object Viser un bord de l'objet sélectionné +Aligned edge to edge! (Ctrl+Z to undo) Alignés bord à bord ! (Ctrl+Z pour annuler) +Aim at a target edge or road Visez un bord ou une route cible +Target cancelled. Pick a source vertex again Cible annulée. Choisissez à nouveau un sommet source +Vertex snap cancelled Capture de sommet annulée +Target cancelled. Pick a source edge again Cible annulée. Choisissez à nouveau un bord source +Edge snap cancelled Accrochage des bords annulé +Select an object first to snap its vertex Sélectionnez d'abord un objet pour accrocher son sommet +Vertex snap: click a source vertex on the selected object (Esc to cancel) Accrochage de sommet : cliquez sur un sommet source sur l'objet sélectionné (Esc pour annuler) +Snap vertex to vertex Aligner un sommet sur un sommet +Select an object first to align its edge Sélectionnez d'abord un objet pour aligner son bord +Edge snap: click a source edge on the selected object (Esc to cancel) Accrochage des bords : cliquez sur un bord source sur l'objet sélectionné (Esc pour annuler) +Snap edge to edge Accrocher bord à bord +Snap vertex to vertex (V) Accrocher le sommet au sommet (V) +Snap edge to edge (L) Snap bord à bord (L) +Snap vertex (V) Snap sommet (V) +Snap a vertex of this object to another vertex (Shortcut: V) Aligner un sommet de cet objet sur un autre sommet (Raccourci : V) +Snap edge (L) Bord à pression (L) +Snap an edge of this object to another edge or road (Shortcut: L) Aligner un bord de cet objet sur un autre bord ou une autre route (Raccourci : L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Aligner un sommet de l'objet sélectionné sur un sommet d'un autre objet (V)\nMaj : horizontal uniquement, Échap/Clic droit : Annuler +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Aligner un bord de l'objet sélectionné sur un bord ou une route (L)\nFait pivoter et accroche\ncolinéaire Maj : horizontal uniquement, Échap/Clic droit : Annuler +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Point 1 aligné ! Cliquez sur un 2e point de l'objet pour pivoter, ou Échap pour terminer +Reference angle set. Click a target point or spline to align (Esc: finish) Angle de référence défini. Cliquez sur un point cible ou une route pour aligner (Échap : terminer) +Pick a different vertex on the object Choisissez un autre sommet sur l'objet +Click a 2nd reference point on the object, or Esc to finish Cliquez sur un 2e point de référence sur l'objet, ou Échap pour terminer +Aligned angle! (Ctrl+Z to undo) Angle aligné ! (Ctrl+Z pour annuler) +Vertex snap complete Accrochage de sommet terminé +Align vertex angle Aligner l'angle du sommet diff --git a/locales/hi.tsv b/locales/hi.tsv index 0c3fa94..f8a5902 100644 --- a/locales/hi.tsv +++ b/locales/hi.tsv @@ -2785,3 +2785,36 @@ no track within 15 m 15 m के भीतर ट्रैक नहीं the tracks are not joined, or run the other way (see View > AI lanes) ट्रैक जुड़े नहीं हैं, या उल्टी दिशा में हैं (व्यू > AI लेन देखें) no track beside पास में ट्रैक नहीं: Drives on किस पर चलती है +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) स्रोत शीर्ष चुना गया. स्नैप करने के लिए लक्ष्य शीर्ष पर क्लिक करें (शिफ्ट: केवल क्षैतिज, Esc: रद्द करें) +Aim at a vertex of the selected object चयनित वस्तु के शीर्ष पर निशाना लगाओ +Snapped to vertex! (Ctrl+Z to undo) शीर्ष पर पहुंच गया! (पूर्ववत करने के लिए Ctrl+Z) +Aim at a target vertex or spline endpoint लक्ष्य शीर्ष या तख़्ता समापन बिंदु पर निशाना लगाओ +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) स्रोत किनारा चुना गया. संरेखित करने के लिए लक्ष्य किनारे या सड़क पर क्लिक करें (शिफ्ट: केवल क्षैतिज, Esc: रद्द करें) +Aim at an edge of the selected object चयनित वस्तु के एक किनारे पर निशाना लगाएँ +Aligned edge to edge! (Ctrl+Z to undo) किनारे से किनारे तक संरेखित! (पूर्ववत करने के लिए Ctrl+Z) +Aim at a target edge or road लक्ष्य किनारे या सड़क पर निशाना लगाओ +Target cancelled. Pick a source vertex again लक्ष्य रद्द कर दिया गया. एक स्रोत शीर्ष फिर से चुनें +Vertex snap cancelled वर्टेक्स स्नैप रद्द कर दिया गया +Target cancelled. Pick a source edge again लक्ष्य रद्द कर दिया गया. स्रोत किनारा फिर से चुनें +Edge snap cancelled एज स्नैप रद्द किया गया +Select an object first to snap its vertex किसी ऑब्जेक्ट के शीर्ष को स्नैप करने के लिए पहले उसका चयन करें +Vertex snap: click a source vertex on the selected object (Esc to cancel) वर्टेक्स स्नैप: चयनित ऑब्जेक्ट पर स्रोत वर्टेक्स पर क्लिक करें (रद्द करने के लिए Esc) +Snap vertex to vertex शीर्ष को शीर्ष पर स्नैप करें +Select an object first to align its edge किसी ऑब्जेक्ट के किनारे को संरेखित करने के लिए पहले उसका चयन करें +Edge snap: click a source edge on the selected object (Esc to cancel) एज स्नैप: चयनित ऑब्जेक्ट पर सोर्स एज पर क्लिक करें (रद्द करने के लिए Esc) +Snap edge to edge किनारे से किनारे तक स्नैप करें +Snap vertex to vertex (V) शीर्ष को शीर्ष पर स्नैप करें (V) +Snap edge to edge (L) किनारे से किनारे तक स्नैप करें (एल) +Snap vertex (V) स्नैप वर्टेक्स (V) +Snap a vertex of this object to another vertex (Shortcut: V) इस ऑब्जेक्ट के एक शीर्ष को दूसरे शीर्ष पर स्नैप करें (शॉर्टकट: V) +Snap edge (L) स्नैप एज (एल) +Snap an edge of this object to another edge or road (Shortcut: L) इस वस्तु के एक किनारे को दूसरे किनारे या सड़क पर स्नैप करें (शॉर्टकट: एल) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel चयनित ऑब्जेक्ट के शीर्ष को किसी अन्य ऑब्जेक्ट के शीर्ष पर स्नैप करें (V)\nशिफ्ट: केवल क्षैतिज, Esc/राइट-क्लिक: रद्द करें +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel चयनित ऑब्जेक्ट के किनारे को किसी किनारे या सड़क पर संरेखित करें (L)\nघुमाता है और संरेख में स्नैप करता है\nशिफ्ट: क्षैतिज केवल, Esc/राइट-क्लिक करें: रद्द करें +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish बिंदु 1 संरेखित! घुमाने के लिए वस्तु पर दूसरे बिंदु पर क्लिक करें, या समाप्त करने के लिए Esc दबाएं +Reference angle set. Click a target point or spline to align (Esc: finish) संदर्भ कोण सेट। संरेखित करने के लिए लक्ष्य बिंदु या सड़क पर क्लिक करें (Esc: समाप्त) +Pick a different vertex on the object वस्तु पर कोई भिन्न शीर्ष चुनें +Click a 2nd reference point on the object, or Esc to finish वस्तु पर दूसरा संदर्भ बिंदु क्लिक करें, या समाप्त करने के लिए Esc दबाएं +Aligned angle! (Ctrl+Z to undo) कोण संरेखित! (पूर्ववत करने के लिए Ctrl+Z) +Vertex snap complete शीर्ष स्नैप पूर्ण +Align vertex angle शीर्ष कोण संरेखित करें diff --git a/locales/hu.tsv b/locales/hu.tsv index 915a17f..6765f13 100644 --- a/locales/hu.tsv +++ b/locales/hu.tsv @@ -2785,3 +2785,36 @@ no track within 15 m 15 m-en belül nincs sín the tracks are not joined, or run the other way (see View > AI lanes) a sínek nincsenek összekötve, vagy másfelé futnak (lásd Nézet > MI-sávok) no track beside nincs sín mellette: Drives on Közlekedik +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Forráscsúcs kiválasztva. Kattintson egy célcsúcsra a rögzítéshez (Shift: csak vízszintes, Esc: Mégse) +Aim at a vertex of the selected object Célozzon a kiválasztott objektum egyik csúcsára +Snapped to vertex! (Ctrl+Z to undo) Csúcshoz illesztve! (Ctrl+Z a visszavonáshoz) +Aim at a target vertex or spline endpoint Célozzon meg egy célcsúcsot vagy spline végpontot +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Forrás széle kiválasztva. Kattintson egy célélre vagy útra az igazításhoz (Shift: csak vízszintes, Esc: Mégse) +Aim at an edge of the selected object Célozzon a kiválasztott objektum egyik szélére +Aligned edge to edge! (Ctrl+Z to undo) Éltől élig igazítva! (Ctrl+Z a visszavonáshoz) +Aim at a target edge or road Célozzon egy célszegélyre vagy útra +Target cancelled. Pick a source vertex again Cél törölve. Válasszon újra egy forráscsúcsot +Vertex snap cancelled Vertex snap törölve +Target cancelled. Pick a source edge again Cél törölve. Válasszon újra egy forrás élt +Edge snap cancelled Élpattanás törölve +Select an object first to snap its vertex Először válasszon ki egy objektumot a csúcspontjának rögzítéséhez +Vertex snap: click a source vertex on the selected object (Esc to cancel) Csúcspont raszter: kattintson egy forráscsúcsra a kiválasztott objektumon (Esc a törléshez) +Snap vertex to vertex Csúcs rögzítése csúcsra +Select an object first to align its edge Először válasszon ki egy objektumot a szélének igazításához +Edge snap: click a source edge on the selected object (Esc to cancel) Élrögzítés: kattintson a forrás élére a kiválasztott objektumon (esc a törléshez) +Snap edge to edge Pattintsa éltől szélig +Snap vertex to vertex (V) Csúcs rögzítése csúcshoz (V) +Snap edge to edge (L) Pattintsa a szélét a szélhez (L) +Snap vertex (V) Rasztercsúcs (V) +Snap a vertex of this object to another vertex (Shortcut: V) Ennek az objektumnak egy csúcsának rögzítése egy másik csúcshoz (Gyorsbillentyű: V) +Snap edge (L) Bepattanó él (L) +Snap an edge of this object to another edge or road (Shortcut: L) Illessze az objektum szélét egy másik szélhez vagy úthoz (Gyorsbillentyű: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel A kiválasztott objektum csúcsának rögzítése egy másik objektum csúcsához (V)\nShift: Csak vízszintes, Esc/Jobb gomb: Mégse +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel A kijelölt objektum élének igazítása egy élhez vagy úthoz (L)\nElforgatja és kollineárisan rögzíti\nShift: Csak vízszintes, Esc/Jobb gomb: Mégse +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish 1. pont igazítva! Kattintson a 2. pontra a forgatáshoz, vagy nyomjon Esc billentyűt a befejezéshez +Reference angle set. Click a target point or spline to align (Esc: finish) Referenciaszög beállítva. Kattintson egy célpontra vagy útra az igazításhoz (Esc: kész) +Pick a different vertex on the object Válasszon egy másik csúcspontot az objektumon +Click a 2nd reference point on the object, or Esc to finish Kattintson egy 2. referenciapontra az objektumon, vagy Esc a befejezéshez +Aligned angle! (Ctrl+Z to undo) Szög igazítva! (Ctrl+Z a visszavonáshoz) +Vertex snap complete Csúcspont illesztése kész +Align vertex angle Csúcspontszög igazítása diff --git a/locales/id.tsv b/locales/id.tsv index ac551b7..2689f28 100644 --- a/locales/id.tsv +++ b/locales/id.tsv @@ -2785,3 +2785,36 @@ no track within 15 m tidak ada rel dalam 15 m the tracks are not joined, or run the other way (see View > AI lanes) rel tidak tersambung, atau berlawanan arah (lihat Tampilan > Lajur AI) no track beside tidak ada rel di samping Drives on Berjalan di +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Titik sumber dipilih. Klik titik sasaran yang akan diambil (Shift: horizontal saja, Esc: batal) +Aim at a vertex of the selected object Arahkan ke titik puncak objek yang dipilih +Snapped to vertex! (Ctrl+Z to undo) Terjepret ke titik puncak! (Ctrl+Z untuk membatalkan) +Aim at a target vertex or spline endpoint Bidik pada titik akhir atau titik akhir spline target +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Tepi sumber dipilih. Klik tepi atau jalan target untuk menyelaraskan (Shift: horizontal saja, Esc: batal) +Aim at an edge of the selected object Arahkan ke tepi objek yang dipilih +Aligned edge to edge! (Ctrl+Z to undo) Sejajarkan ujung ke ujung! (Ctrl+Z untuk membatalkan) +Aim at a target edge or road Bidik ke tepi atau jalan sasaran +Target cancelled. Pick a source vertex again Target dibatalkan. Pilih titik sumber lagi +Vertex snap cancelled Jepretan simpul dibatalkan +Target cancelled. Pick a source edge again Target dibatalkan. Pilih tepi sumber lagi +Edge snap cancelled Jepretan tepi dibatalkan +Select an object first to snap its vertex Pilih objek terlebih dahulu untuk mengambil titik puncaknya +Vertex snap: click a source vertex on the selected object (Esc to cancel) Vertex snap: klik titik sumber pada objek yang dipilih (Esc untuk membatalkan) +Snap vertex to vertex Jepret titik ke titik +Select an object first to align its edge Pilih objek terlebih dahulu untuk menyelaraskan tepinya +Edge snap: click a source edge on the selected object (Esc to cancel) Edge snap: klik tepi sumber pada objek yang dipilih (Esc untuk membatalkan) +Snap edge to edge Jepret ujung ke ujung +Snap vertex to vertex (V) Jepret titik ke titik (V) +Snap edge to edge (L) Jepret ujung ke ujung (L) +Snap vertex (V) Jepret simpul (V) +Snap a vertex of this object to another vertex (Shortcut: V) Jepret sebuah titik dari objek ini ke titik lainnya (Pintasan: V) +Snap edge (L) Tepi jepret (L) +Snap an edge of this object to another edge or road (Shortcut: L) Jepret salah satu tepi objek ini ke tepi atau jalan lain (Pintasan: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Jepret titik dari objek yang dipilih ke titik dari objek lain (V)\nShift: Hanya horizontal, Esc/Klik kanan: Batal +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Sejajarkan tepi objek yang dipilih dengan tepi atau jalan (L)\nMemutar dan membuat collinear\nShift: Hanya horizontal, Esc/Klik kanan: Batal +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Titik 1 disejajarkan! Klik titik ke-2 pada objek untuk memutar, atau Esc untuk selesai +Reference angle set. Click a target point or spline to align (Esc: finish) Sudut referensi ditentukan. Klik titik target atau jalan untuk menyelaraskan (Esc: selesai) +Pick a different vertex on the object Pilih titik sudut lain pada objek +Click a 2nd reference point on the object, or Esc to finish Klik titik referensi ke-2 pada objek, atau Esc untuk selesai +Aligned angle! (Ctrl+Z to undo) Sudut disejajarkan! (Ctrl+Z untuk membatalkan) +Vertex snap complete Tempel titik sudut selesai +Align vertex angle Selaraskan sudut titik diff --git a/locales/it.tsv b/locales/it.tsv index 431b6e5..127c375 100644 --- a/locales/it.tsv +++ b/locales/it.tsv @@ -2785,3 +2785,36 @@ no track within 15 m nessun binario entro 15 m the tracks are not joined, or run the other way (see View > AI lanes) i binari non sono collegati, o vanno nell'altro verso (vedi Vista > Corsie IA) no track beside nessun binario accanto a Drives on Corre su +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Vertice sorgente scelto. Fare clic su un vertice di destinazione per eseguire lo snap (Shift: solo orizzontale, Esc: annulla) +Aim at a vertex of the selected object Puntare su un vertice dell'oggetto selezionato +Snapped to vertex! (Ctrl+Z to undo) Scattato al vertice! (Ctrl+Z per annullare) +Aim at a target vertex or spline endpoint Mirare a un vertice di destinazione o al punto finale della spline +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Bordo di origine scelto. Fare clic su un bordo o una strada target da allineare (Maiusc: solo orizzontale, Esc: annulla) +Aim at an edge of the selected object Puntare su un bordo dell'oggetto selezionato +Aligned edge to edge! (Ctrl+Z to undo) Allineato bordo a bordo! (Ctrl+Z per annullare) +Aim at a target edge or road Mirare al bordo o alla strada di un bersaglio +Target cancelled. Pick a source vertex again Obiettivo annullato. Scegli di nuovo un vertice di origine +Vertex snap cancelled Snap al vertice annullato +Target cancelled. Pick a source edge again Obiettivo annullato. Scegli di nuovo un bordo di origine +Edge snap cancelled Snap al bordo annullato +Select an object first to snap its vertex Selezionare prima un oggetto per agganciarne il vertice +Vertex snap: click a source vertex on the selected object (Esc to cancel) Snap al vertice: fare clic su un vertice di origine sull'oggetto selezionato (Esc per annullare) +Snap vertex to vertex Aggancia vertice a vertice +Select an object first to align its edge Selezionare prima un oggetto per allinearne il bordo +Edge snap: click a source edge on the selected object (Esc to cancel) Snap al bordo: fare clic su un bordo di origine sull'oggetto selezionato (Esc per annullare) +Snap edge to edge Aggancia bordo a bordo +Snap vertex to vertex (V) Aggancia vertice a vertice (V) +Snap edge to edge (L) Aggancia bordo a bordo (L) +Snap vertex (V) Snap vertice (V) +Snap a vertex of this object to another vertex (Shortcut: V) Aggancia un vertice di questo oggetto a un altro vertice (scorciatoia: V) +Snap edge (L) Bordo a scatto (L) +Snap an edge of this object to another edge or road (Shortcut: L) Aggancia un bordo di questo oggetto a un altro bordo o strada (scorciatoia: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Aggancia un vertice dell'oggetto selezionato al vertice di un altro oggetto (V)\nMaiusc: solo orizzontale, Esc/clic destro: Annulla +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Allinea un bordo dell'oggetto selezionato a un bordo o una strada (L)\nRuota e aggancia collinearmente\nMaiusc: solo orizzontale, Esc/clic destro: Annulla +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Punto 1 allineato! Fai clic su un 2° punto dell'oggetto per ruotare, o Esc per terminare +Reference angle set. Click a target point or spline to align (Esc: finish) Angolo di riferimento impostato. Fai clic su un punto di destinazione o strada per allineare (Esc: termina) +Pick a different vertex on the object Scegli un vertice diverso sull'oggetto +Click a 2nd reference point on the object, or Esc to finish Fai clic su un 2° punto di riferimento sull'oggetto, o Esc per terminare +Aligned angle! (Ctrl+Z to undo) Angolo allineato! (Ctrl+Z per annullare) +Vertex snap complete Allineamento vertice completato +Align vertex angle Allinea angolo vertice diff --git a/locales/ja.tsv b/locales/ja.tsv index 8867e2d..02506a9 100644 --- a/locales/ja.tsv +++ b/locales/ja.tsv @@ -2785,3 +2785,36 @@ no track within 15 m 15 m以内に線路がありません the tracks are not joined, or run the other way (see View > AI lanes) 線路が接続されていないか、逆向きです(表示 > AI車線を参照) no track beside 線路なし: Drives on 走行 +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) ソース頂点が選択されました。スナップする対象の頂点をクリックします (Shift: 水平のみ、Esc: キャンセル) +Aim at a vertex of the selected object 選択したオブジェクトの頂点を狙う +Snapped to vertex! (Ctrl+Z to undo) 頂点にスナップされました! (元に戻すには Ctrl+Z) +Aim at a target vertex or spline endpoint ターゲットの頂点またはスプラインの終点を目指します +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) ソースエッジが選択されました。整列する対象のエッジまたは道路をクリックします (Shift: 水平のみ、Esc: キャンセル) +Aim at an edge of the selected object 選択したオブジェクトの端を狙う +Aligned edge to edge! (Ctrl+Z to undo) 端から端まで揃っています! (元に戻すには Ctrl+Z) +Aim at a target edge or road ターゲットのエッジまたは道路を狙う +Target cancelled. Pick a source vertex again ターゲットはキャンセルされました。ソース頂点を再度選択します +Vertex snap cancelled 頂点スナップがキャンセルされました +Target cancelled. Pick a source edge again ターゲットはキャンセルされました。ソースエッジを再度選択します +Edge snap cancelled エッジスナップがキャンセルされました +Select an object first to snap its vertex 最初にオブジェクトを選択して、その頂点をスナップします +Vertex snap: click a source vertex on the selected object (Esc to cancel) 頂点スナップ: 選択したオブジェクト上のソース頂点をクリックします(キャンセルするにはEsc) +Snap vertex to vertex 頂点を頂点にスナップ +Select an object first to align its edge まずオブジェクトを選択してエッジを揃えます +Edge snap: click a source edge on the selected object (Esc to cancel) エッジ スナップ: 選択したオブジェクトのソース エッジをクリックします (キャンセルするには Esc) +Snap edge to edge 端から端までスナップ +Snap vertex to vertex (V) 頂点を頂点にスナップ(V) +Snap edge to edge (L) 端から端までスナップ (L) +Snap vertex (V) 頂点スナップ(V) +Snap a vertex of this object to another vertex (Shortcut: V) このオブジェクトの頂点を別の頂点にスナップします(ショートカット: V) +Snap edge (L) スナップエッジ(L) +Snap an edge of this object to another edge or road (Shortcut: L) このオブジェクトのエッジを別のエッジまたは道路にスナップします (ショートカット: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel 選択したオブジェクトの頂点を別のオブジェクトの頂点にスナップします (V)\nShift: 水平方向のみ、Esc/右クリック: キャンセル +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel 選択したオブジェクトのエッジをエッジまたは道路に位置合わせします (L)\n回転して同一線上にスナップします\nShift: 水平のみ、Esc/右クリック: キャンセル +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish ポイント1を配置しました!オブジェクト上の2点目をクリックして回転、またはEscで完了 +Reference angle set. Click a target point or spline to align (Esc: finish) 基準角度を設定しました。位置合わせ先の頂点または道路をクリックしてください(Esc:完了) +Pick a different vertex on the object オブジェクトの別の頂点を選択してください +Click a 2nd reference point on the object, or Esc to finish オブジェクト上の2点目の基準点をクリック、またはEscで完了 +Aligned angle! (Ctrl+Z to undo) 角度を合わせました!(Ctrl+Z で元に戻す) +Vertex snap complete 頂点吸着完了 +Align vertex angle 頂点の角度を合わせる diff --git a/locales/kk.tsv b/locales/kk.tsv index 45f0c83..7e64af1 100644 --- a/locales/kk.tsv +++ b/locales/kk.tsv @@ -2785,3 +2785,36 @@ no track within 15 m 15 м ішінде рельс жоқ the tracks are not joined, or run the other way (see View > AI lanes) рельстер жалғанбаған немесе кері жаққа кетеді (Көрініс > ЖИ жолақтары қараңыз) no track beside жанында рельс жоқ: Drives on Жүретін жолы +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Таңдалған бастапқы шың. Кесу үшін мақсатты шыңды басыңыз (Shift: тек көлденең, Esc: бас тарту) +Aim at a vertex of the selected object Таңдалған нысанның шыңына бағыттаңыз +Snapped to vertex! (Ctrl+Z to undo) Шыңға ілінді! (Болдырмау үшін Ctrl+Z) +Aim at a target vertex or spline endpoint Мақсатты шыңға немесе сплайнның соңғы нүктесіне бағыттаңыз +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Бастапқы жиегі таңдалды. Түзету үшін мақсатты жиекті немесе жолды басыңыз (Shift: тек көлденең, Esc: бас тарту) +Aim at an edge of the selected object Таңдалған нысанның шетіне бағыттаңыз +Aligned edge to edge! (Ctrl+Z to undo) Шетінен шетіне тураланған! (Болдырмау үшін Ctrl+Z) +Aim at a target edge or road Мақсатты шетке немесе жолға бағыттаңыз +Target cancelled. Pick a source vertex again Мақсат жойылды. Қайтадан бастапқы шыңды таңдаңыз +Vertex snap cancelled Vertex snap бас тартылды +Target cancelled. Pick a source edge again Мақсат жойылды. Қайтадан бастапқы жиекті таңдаңыз +Edge snap cancelled Жиекті қысу тоқтатылды +Select an object first to snap its vertex Шыңын бекіту үшін алдымен нысанды таңдаңыз +Vertex snap: click a source vertex on the selected object (Esc to cancel) Шыңға қондырма: таңдалған нысандағы бастапқы шыңды басыңыз (бас тарту үшін Esc пернесін басыңыз) +Snap vertex to vertex Төбенің шыңына қарай бекітіңіз +Select an object first to align its edge Шетін туралау үшін алдымен нысанды таңдаңыз +Edge snap: click a source edge on the selected object (Esc to cancel) Жиекті қысу: таңдалған нысандағы бастапқы жиекті басыңыз (бас тарту үшін Esc пернесін басыңыз) +Snap edge to edge Шетінен шетіне қарай сырғытыңыз +Snap vertex to vertex (V) Шыңды шыңға (V) сырғыту +Snap edge to edge (L) Шеттен шетке сырғыту (L) +Snap vertex (V) Төбесі (V) +Snap a vertex of this object to another vertex (Shortcut: V) Осы нысанның төбесін басқа төбеге бекітіңіз (Таңбаша: V) +Snap edge (L) Кесетін жиегі (L) +Snap an edge of this object to another edge or road (Shortcut: L) Осы нысанның шетін басқа жиекке немесе жолға сырғытыңыз (таңбаша: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Таңдалған нысанның төбесін басқа нысанның шыңына бекіту (V)\nShift: тек көлденең, Esc/тінтуірдің оң жақ түймешігімен басыңыз: Болдырмау +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Таңдалған нысанның шетін жиекке немесе жолға туралау (L)\nБірдей етіп айналдырады және түсіреді\nShift: Тек көлденең, Esc/тінтуірдің оң жақ түймешігімен басыңыз: Болдырмау +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish 1-нүкте тураланды! Айналдыру үшін нысандағы 2-нүктені басыңыз немесе аяқтау үшін Esc пернесін басыңыз +Reference angle set. Click a target point or spline to align (Esc: finish) Негізгі бұрыш орнатылды. Туралау үшін нысана нүктесін немесе жолды басыңыз (Esc: аяқтау) +Pick a different vertex on the object Нысанда басқа төбені таңдаңыз +Click a 2nd reference point on the object, or Esc to finish Нысанда 2-ші тірек нүктесін басыңыз немесе аяқтау үшін Esc пернесін басыңыз +Aligned angle! (Ctrl+Z to undo) Бұрыш тураланды! (Болдырмау үшін Ctrl+Z) +Vertex snap complete Төбені бекіту аяқталды +Align vertex angle Төбе бұрышын туралау diff --git a/locales/ko.tsv b/locales/ko.tsv index 5bee289..ac64e3d 100644 --- a/locales/ko.tsv +++ b/locales/ko.tsv @@ -2785,3 +2785,36 @@ no track within 15 m 15 m 이내에 선로 없음 the tracks are not joined, or run the other way (see View > AI lanes) 선로가 연결되지 않았거나 반대 방향입니다(보기 > AI 차선 참조) no track beside 옆에 선로 없음: Drives on 운행 경로 +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) 소스 정점이 선택되었습니다. 스냅할 대상 정점을 클릭합니다(Shift: 가로만, Esc: 취소). +Aim at a vertex of the selected object 선택한 개체의 꼭지점을 겨냥합니다. +Snapped to vertex! (Ctrl+Z to undo) 정점에 스냅되었습니다! (실행 취소하려면 Ctrl+Z) +Aim at a target vertex or spline endpoint 대상 정점 또는 스플라인 끝점을 조준합니다. +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) 소스 가장자리가 선택되었습니다. 정렬할 대상 가장자리나 도로를 클릭합니다(Shift: 수평만, Esc: 취소). +Aim at an edge of the selected object 선택한 개체의 가장자리를 겨냥합니다. +Aligned edge to edge! (Ctrl+Z to undo) 가장자리부터 가장자리까지 정렬! (실행 취소하려면 Ctrl+Z) +Aim at a target edge or road 목표 가장자리나 도로를 겨냥하세요 +Target cancelled. Pick a source vertex again 타겟이 취소되었습니다. 소스 꼭지점을 다시 선택하세요. +Vertex snap cancelled 정점 스냅이 취소되었습니다. +Target cancelled. Pick a source edge again 타겟이 취소되었습니다. 소스 가장자리를 다시 선택하세요. +Edge snap cancelled 가장자리 스냅이 취소되었습니다. +Select an object first to snap its vertex 정점을 스냅하려면 먼저 객체를 선택하세요. +Vertex snap: click a source vertex on the selected object (Esc to cancel) 정점 스냅: 선택한 개체의 소스 정점을 클릭합니다(취소하려면 Esc를 누름). +Snap vertex to vertex 정점을 정점에 스냅 +Select an object first to align its edge 가장자리를 정렬하려면 먼저 개체를 선택하세요. +Edge snap: click a source edge on the selected object (Esc to cancel) 가장자리 스냅: 선택한 객체의 소스 가장자리를 클릭합니다(취소하려면 Esc를 누름). +Snap edge to edge 가장자리를 가장자리에 맞춥니다. +Snap vertex to vertex (V) 정점을 정점에 스냅(V) +Snap edge to edge (L) 가장자리에서 가장자리로 스냅(L) +Snap vertex (V) 스냅 정점(V) +Snap a vertex of this object to another vertex (Shortcut: V) 이 객체의 정점을 다른 정점에 스냅합니다(단축키: V) +Snap edge (L) 스냅 엣지(L) +Snap an edge of this object to another edge or road (Shortcut: L) 이 개체의 가장자리를 다른 가장자리나 도로에 스냅합니다(단축키: L). +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel 선택한 객체의 정점을 다른 객체의 정점에 스냅(V)\nShift: 수평만, Esc/우클릭: 취소 +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel 선택한 개체의 가장자리를 가장자리 또는 도로에 정렬(L)\n동일 선상에 회전하고 스냅합니다.\nShift: 수평만, Esc/오른쪽 클릭: 취소 +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish 1번 점 정렬 완료! 회전할 개체의 2번째 점을 클릭하거나 Esc 키로 완료하세요 +Reference angle set. Click a target point or spline to align (Esc: finish) 기준 각도 설정됨. 정렬할 대상 점이나 도로를 클릭하세요 (Esc: 완료) +Pick a different vertex on the object 개체에서 다른 꼭짓점을 선택하세요 +Click a 2nd reference point on the object, or Esc to finish 개체에서 2번째 기준점을 클릭하거나 Esc 키로 완료하세요 +Aligned angle! (Ctrl+Z to undo) 각도 정렬 완료! (Ctrl+Z: 실행 취소) +Vertex snap complete 꼭짓점 스냅 완료 +Align vertex angle 꼭짓점 각도 정렬 diff --git a/locales/ms.tsv b/locales/ms.tsv index 83084d0..10a1499 100644 --- a/locales/ms.tsv +++ b/locales/ms.tsv @@ -2785,3 +2785,36 @@ no track within 15 m tiada landasan dalam 15 m the tracks are not joined, or run the other way (see View > AI lanes) landasan tidak bercantum, atau menuju arah lain (lihat Lihat > Lorong AI) no track beside tiada landasan di sebelah Drives on Bergerak di +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Puncak sumber dipilih. Klik bucu sasaran untuk mengambil (Shift: mendatar sahaja, Esc: batal) +Aim at a vertex of the selected object Sasarkan pada bucu objek yang dipilih +Snapped to vertex! (Ctrl+Z to undo) Tersentap ke puncak! (Ctrl+Z untuk membuat asal) +Aim at a target vertex or spline endpoint Sasarkan pada bucu sasaran atau titik akhir spline +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Tepi sumber dipilih. Klik tepi sasaran atau jalan untuk menjajarkan (Anjakan: mendatar sahaja, Esc: batal) +Aim at an edge of the selected object Sasarkan pada tepi objek yang dipilih +Aligned edge to edge! (Ctrl+Z to undo) Dijajarkan tepi ke tepi! (Ctrl+Z untuk membuat asal) +Aim at a target edge or road Sasar pada tepi sasaran atau jalan +Target cancelled. Pick a source vertex again Sasaran dibatalkan. Pilih puncak sumber sekali lagi +Vertex snap cancelled Pucuk snap dibatalkan +Target cancelled. Pick a source edge again Sasaran dibatalkan. Pilih kelebihan sumber sekali lagi +Edge snap cancelled Snap tepi dibatalkan +Select an object first to snap its vertex Pilih objek terlebih dahulu untuk mengambil bucunya +Vertex snap: click a source vertex on the selected object (Esc to cancel) Pucuk snap: klik puncak sumber pada objek yang dipilih (Esc untuk membatalkan) +Snap vertex to vertex Snap bucu ke bucu +Select an object first to align its edge Pilih objek dahulu untuk menjajarkan tepinya +Edge snap: click a source edge on the selected object (Esc to cancel) Snap tepi: klik tepi sumber pada objek yang dipilih (Esc untuk membatalkan) +Snap edge to edge Selak tepi ke tepi +Snap vertex to vertex (V) Tangkap bucu ke bucu (V) +Snap edge to edge (L) Paut tepi ke tepi (L) +Snap vertex (V) Bucu snap (V) +Snap a vertex of this object to another vertex (Shortcut: V) Tangkap bucu objek ini ke bucu lain (Pintasan: V) +Snap edge (L) Snap tepi (L) +Snap an edge of this object to another edge or road (Shortcut: L) Tangkap tepi objek ini ke tepi atau jalan lain (Pintasan: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Tangkap bucu objek yang dipilih ke bucu objek lain (V)\nShift: Mendatar sahaja, Esc/Klik kanan: Batal +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Jajarkan tepi objek yang dipilih ke tepi atau jalan (L)\nBerpusing dan mengetuk kolinear\nShift: Mendatar sahaja, Esc/Klik kanan: Batal +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Titik 1 dijajarkan! Klik titik ke-2 pada objek untuk memutar, atau Esc untuk selesai +Reference angle set. Click a target point or spline to align (Esc: finish) Sudut rujukan ditetapkan. Klik titik sasaran atau jalan untuk menjajarkan (Esc: selesai) +Pick a different vertex on the object Pilih bucu lain pada objek +Click a 2nd reference point on the object, or Esc to finish Klik titik rujukan ke-2 pada objek, atau Esc untuk selesai +Aligned angle! (Ctrl+Z to undo) Sudut dijajarkan! (Ctrl+Z untuk membuat asal) +Vertex snap complete Lekatan bucu selesai +Align vertex angle Jajarkan sudut bucu diff --git a/locales/nl.tsv b/locales/nl.tsv index 5bcac5f..7acaf90 100644 --- a/locales/nl.tsv +++ b/locales/nl.tsv @@ -2785,3 +2785,37 @@ no track within 15 m geen spoor binnen 15 m the tracks are not joined, or run the other way (see View > AI lanes) de sporen zijn niet verbonden, of lopen de andere kant op (zie Beeld > AI-rijstroken) no track beside geen spoor naast Drives on Rijdt over +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Bronpunt gekozen. Klik op een doelhoekpunt om te snappen (Shift: alleen horizontaal, Esc: annuleren) +Aim at a vertex of the selected object Richt op een hoekpunt van het geselecteerde object +Snapped to vertex! (Ctrl+Z to undo) Geknapt naar het hoekpunt! (Ctrl+Z om ongedaan te maken) +Aim at a target vertex or spline endpoint Richt op een doelhoekpunt of spline-eindpunt +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Bronrand gekozen. Klik op een doelrand of weg om uit te lijnen (Shift: alleen horizontaal, Esc: annuleren) +Aim at an edge of the selected object Richt op een rand van het geselecteerde object +Aligned edge to edge! (Ctrl+Z to undo) Rand tot rand uitgelijnd! (Ctrl+Z om ongedaan te maken) +Aim at a target edge or road Richt op een doelrand of weg +Target cancelled. Pick a source vertex again Doel geannuleerd. Kies opnieuw een bronpunt +Vertex snap cancelled Vertex-snap geannuleerd +Target cancelled. Pick a source edge again Doel geannuleerd. Kies opnieuw een bronrand +Edge snap cancelled Randsnap geannuleerd +Select an object first to snap its vertex Selecteer eerst een object om het hoekpunt ervan te snappen +Vertex snap: click a source vertex on the selected object (Esc to cancel) Vertex-snap: klik op een bronpunt op het geselecteerde object (Esc om te annuleren) +Snap vertex to vertex Snap hoekpunt op hoekpunt +Select an object first to align its edge Selecteer eerst een object om de rand uit te lijnen +Edge snap: click a source edge on the selected object (Esc to cancel) Rand snappen: klik op een bronrand op het geselecteerde object (Esc om te annuleren) +Snap edge to edge Klik van rand tot rand +Snap vertex to vertex (V) Hoekpunt op hoekpunt klikken (V) +Snap edge to edge (L) Klik van rand tot rand (L) +Snap vertex (V) Snaphoekpunt (V) +Snap a vertex of this object to another vertex (Shortcut: V) Plaats een hoekpunt van dit object op een ander hoekpunt (sneltoets: V) +Snap edge (L) Snaprand (L) +Snap an edge of this object to another edge or road (Shortcut: L) Plaats een rand van dit object op een andere rand of weg (sneltoets: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Plaats een hoekpunt van het geselecteerde object op een hoekpunt van een ander object (V)\nShift: alleen horizontaal, Esc/klik met de rechtermuisknop: annuleren +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Lijn een rand van het geselecteerde object uit op een rand of weg (L)\nRoteert en snapt collineair\nShift: alleen horizontaal, Esc/rechts klikken: annuleren +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Punt 1 uitgelijnd! Klik op een 2e punt op het object om te draaien, of Esc om te voltooien +Reference angle set. Click a target point or spline to align (Esc: finish) Referentiehoek ingesteld. Klik op een doelpunt of weg om uit te lijnen (Esc: voltooien) +Pick a different vertex on the object Kies een ander hoekpunt op het object +Click a 2nd reference point on the object, or Esc to finish Klik op een 2e referentiepunt op het object, of Esc om te voltooien +Aligned angle! (Ctrl+Z om ongedaan te maken) Hoek uitgelijnd! (Ctrl+Z om ongedaan te maken) +Vertex snap complete Hoekpunt magnetisch uitlijnen voltooid +Align vertex angle Hoekpunt uitlijningshoek aanpassen +Aligned angle! (Ctrl+Z to undo) Hoek uitgelijnd! (Ctrl+Z om ongedaan te maken) diff --git a/locales/pl.tsv b/locales/pl.tsv index fc18023..4348892 100644 --- a/locales/pl.tsv +++ b/locales/pl.tsv @@ -2785,3 +2785,36 @@ no track within 15 m w promieniu 15 m brak torów the tracks are not joined, or run the other way (see View > AI lanes) tory nie są połączone lub biegną w drugą stronę (zobacz Widok > Pasy AI) no track beside brak torów przy Drives on Jeździ po +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Wybrano wierzchołek źródłowy. Kliknij docelowy wierzchołek, aby go przyciągnąć (Shift: tylko w poziomie, Esc: anuluj) +Aim at a vertex of the selected object Wyceluj w wierzchołek wybranego obiektu +Snapped to vertex! (Ctrl+Z to undo) Przyciągnięty do wierzchołka! (Ctrl+Z, aby cofnąć) +Aim at a target vertex or spline endpoint Wyceluj w docelowy wierzchołek lub punkt końcowy splajnu +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Wybrano krawędź źródłową. Kliknij docelową krawędź lub drogę, aby ją wyrównać (Shift: tylko w poziomie, Esc: anuluj) +Aim at an edge of the selected object Wyceluj w krawędź wybranego obiektu +Aligned edge to edge! (Ctrl+Z to undo) Wyrównane od krawędzi do krawędzi! (Ctrl+Z, aby cofnąć) +Aim at a target edge or road Celuj w docelową krawędź lub drogę +Target cancelled. Pick a source vertex again Cel anulowany. Wybierz ponownie wierzchołek źródłowy +Vertex snap cancelled Przyciąganie wierzchołków anulowane +Target cancelled. Pick a source edge again Cel anulowany. Wybierz ponownie krawędź źródłową +Edge snap cancelled Przyciąganie krawędzi anulowane +Select an object first to snap its vertex Najpierw wybierz obiekt, aby przyciągnąć jego wierzchołek +Vertex snap: click a source vertex on the selected object (Esc to cancel) Lokalizacja wierzchołka: kliknij wierzchołek źródłowy na wybranym obiekcie (Esc, aby anulować) +Snap vertex to vertex Przyciągaj wierzchołek do wierzchołka +Select an object first to align its edge Najpierw wybierz obiekt, aby wyrównać jego krawędzie +Edge snap: click a source edge on the selected object (Esc to cancel) Przyciąganie do krawędzi: kliknij krawędź źródłową wybranego obiektu (Esc, aby anulować) +Snap edge to edge Przyciągaj krawędź do krawędzi +Snap vertex to vertex (V) Przyciągaj wierzchołek do wierzchołka (V) +Snap edge to edge (L) Przyciągaj krawędź do krawędzi (L) +Snap vertex (V) Wierzchołek przyciągania (V) +Snap a vertex of this object to another vertex (Shortcut: V) Przyciągnij wierzchołek tego obiektu do innego wierzchołka (skrót: V) +Snap edge (L) Krawędź zatrzaskowa (L) +Snap an edge of this object to another edge or road (Shortcut: L) Przyciągnij krawędź tego obiektu do innej krawędzi lub drogi (skrót: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Przyciągnij wierzchołek wybranego obiektu do wierzchołka innego obiektu (V)\nShift: Tylko w poziomie, Esc/kliknięcie prawym przyciskiem myszy: Anuluj +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Wyrównaj krawędź wybranego obiektu do krawędzi lub drogi (L)\nObraca i przyciąga współliniowo\nShift: Tylko w poziomie, Esc/kliknięcie prawym przyciskiem myszy: Anuluj +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Punkt 1 wyrównany! Kliknij 2. punkt na obiekcie, aby obrócić, lub Esc, aby zakończyć +Reference angle set. Click a target point or spline to align (Esc: finish) Kąt odniesienia ustawiony. Kliknij punkt docelowy lub drogę, aby wyrównać (Esc: zakończ) +Pick a different vertex on the object Wybierz inny wierzchołek na obiekcie +Click a 2nd reference point on the object, or Esc to finish Kliknij 2. punkt odniesienia na obiekcie lub Esc, aby zakończyć +Aligned angle! (Ctrl+Z to undo) Kąt wyrównany! (Ctrl+Z, aby cofnąć) +Vertex snap complete Przyciąganie wierzchołka zakończone +Align vertex angle Wyrównaj kąt wierzchołka diff --git a/locales/pt-pt.tsv b/locales/pt-pt.tsv index bd8a146..0fc1cf9 100644 --- a/locales/pt-pt.tsv +++ b/locales/pt-pt.tsv @@ -2785,3 +2785,36 @@ no track within 15 m nenhum carril a menos de 15 m the tracks are not joined, or run the other way (see View > AI lanes) os carris não estão ligados, ou vão ao contrário (veja Ver > Faixas de IA) no track beside sem carril junto a Drives on Circula por +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Vértice de origem escolhido. Clique em um vértice de destino para ajustar (Shift: apenas horizontal, Esc: cancelar) +Aim at a vertex of the selected object Mire em um vértice do objeto selecionado +Snapped to vertex! (Ctrl+Z to undo) Ajustado ao vértice! (Ctrl+Z para desfazer) +Aim at a target vertex or spline endpoint Mire em um vértice alvo ou ponto final do spline +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Borda de origem escolhida. Clique em uma borda ou estrada alvo para alinhar (Shift: apenas horizontal, Esc: cancelar) +Aim at an edge of the selected object Mire em uma borda do objeto selecionado +Aligned edge to edge! (Ctrl+Z to undo) Alinhado de ponta a ponta! (Ctrl+Z para desfazer) +Aim at a target edge or road Mire em uma borda ou estrada alvo +Target cancelled. Pick a source vertex again Meta cancelada. Escolha um vértice de origem novamente +Vertex snap cancelled Snap de vértice cancelado +Target cancelled. Pick a source edge again Meta cancelada. Escolha uma borda de origem novamente +Edge snap cancelled Snap de borda cancelado +Select an object first to snap its vertex Selecione um objeto primeiro para ajustar seu vértice +Vertex snap: click a source vertex on the selected object (Esc to cancel) Snap de vértice: clique em um vértice de origem no objeto selecionado (Esc para cancelar) +Snap vertex to vertex Ajustar vértice a vértice +Select an object first to align its edge Selecione um objeto primeiro para alinhar sua borda +Edge snap: click a source edge on the selected object (Esc to cancel) Ajuste de borda: clique em uma borda de origem no objeto selecionado (Esc para cancelar) +Snap edge to edge Encaixe de ponta a ponta +Snap vertex to vertex (V) Ajustar vértice a vértice (V) +Snap edge to edge (L) Encaixar borda a borda (L) +Snap vertex (V) Snap vértice (V) +Snap a vertex of this object to another vertex (Shortcut: V) Encaixe um vértice deste objeto em outro vértice (atalho: V) +Snap edge (L) Borda de encaixe (L) +Snap an edge of this object to another edge or road (Shortcut: L) Encaixe uma aresta deste objeto em outra aresta ou estrada (Atalho: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Ajustar um vértice do objeto selecionado a um vértice de outro objeto (V)\nShift: Somente horizontal, Esc/Clique com o botão direito: Cancelar +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Alinha uma aresta do objeto selecionado a uma aresta ou estrada (L)\nGira e ajusta colinearmente\nShift: Somente horizontal, Esc/Clique com o botão direito: Cancelar +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Ponto 1 alinhado! Clique num 2º ponto no objeto para rodar, ou Esc para terminar +Reference angle set. Click a target point or spline to align (Esc: finish) Ângulo de referência definido. Clique num ponto alvo ou estrada para alinhar (Esc: terminar) +Pick a different vertex on the object Escolha um vértice diferente no objeto +Click a 2nd reference point on the object, or Esc to finish Clique num 2º ponto de referência no objeto, ou Esc para terminar +Aligned angle! (Ctrl+Z to undo) Ângulo alinhado! (Ctrl+Z para anular) +Vertex snap complete Encaixe de vértice concluído +Align vertex angle Alinhar ângulo de vértice diff --git a/locales/pt.tsv b/locales/pt.tsv index 58ae6d6..9f92e3e 100644 --- a/locales/pt.tsv +++ b/locales/pt.tsv @@ -2785,3 +2785,36 @@ no track within 15 m nenhum trilho a 15 m the tracks are not joined, or run the other way (see View > AI lanes) os trilhos não estão unidos ou seguem no outro sentido (veja Exibir > Faixas de IA) no track beside sem trilho junto a Drives on Circula por +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Vértice de origem escolhido. Clique em um vértice de destino para ajustar (Shift: apenas horizontal, Esc: cancelar) +Aim at a vertex of the selected object Mire em um vértice do objeto selecionado +Snapped to vertex! (Ctrl+Z to undo) Ajustado ao vértice! (Ctrl+Z para desfazer) +Aim at a target vertex or spline endpoint Mire em um vértice alvo ou ponto final do spline +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Borda de origem escolhida. Clique em uma borda ou estrada alvo para alinhar (Shift: apenas horizontal, Esc: cancelar) +Aim at an edge of the selected object Mire em uma borda do objeto selecionado +Aligned edge to edge! (Ctrl+Z to undo) Alinhado de ponta a ponta! (Ctrl+Z para desfazer) +Aim at a target edge or road Mire em uma borda ou estrada alvo +Target cancelled. Pick a source vertex again Meta cancelada. Escolha um vértice de origem novamente +Vertex snap cancelled Snap de vértice cancelado +Target cancelled. Pick a source edge again Meta cancelada. Escolha uma borda de origem novamente +Edge snap cancelled Snap de borda cancelado +Select an object first to snap its vertex Selecione um objeto primeiro para ajustar seu vértice +Vertex snap: click a source vertex on the selected object (Esc to cancel) Snap de vértice: clique em um vértice de origem no objeto selecionado (Esc para cancelar) +Snap vertex to vertex Ajustar vértice a vértice +Select an object first to align its edge Selecione um objeto primeiro para alinhar sua borda +Edge snap: click a source edge on the selected object (Esc to cancel) Ajuste de borda: clique em uma borda de origem no objeto selecionado (Esc para cancelar) +Snap edge to edge Encaixe de ponta a ponta +Snap vertex to vertex (V) Ajustar vértice a vértice (V) +Snap edge to edge (L) Encaixar borda a borda (L) +Snap vertex (V) Snap vértice (V) +Snap a vertex of this object to another vertex (Shortcut: V) Encaixe um vértice deste objeto em outro vértice (atalho: V) +Snap edge (L) Borda de encaixe (L) +Snap an edge of this object to another edge or road (Shortcut: L) Encaixe uma aresta deste objeto em outra aresta ou estrada (Atalho: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Ajustar um vértice do objeto selecionado a um vértice de outro objeto (V)\nShift: Somente horizontal, Esc/Clique com o botão direito: Cancelar +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Alinha uma aresta do objeto selecionado a uma aresta ou estrada (L)\nGira e ajusta colinearmente\nShift: Somente horizontal, Esc/Clique com o botão direito: Cancelar +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Ponto 1 alinhado! Clique num 2º ponto no objeto para rodar, ou Esc para terminar +Reference angle set. Click a target point or spline to align (Esc: finish) Ângulo de referência definido. Clique num ponto alvo ou estrada para alinhar (Esc: terminar) +Pick a different vertex on the object Escolha um vértice diferente no objeto +Click a 2nd reference point on the object, or Esc to finish Clique num 2º ponto de referência no objeto, ou Esc para terminar +Aligned angle! (Ctrl+Z to undo) Ângulo alinhado! (Ctrl+Z para anular) +Vertex snap complete Encaixe de vértice concluído +Align vertex angle Alinhar ângulo de vértice diff --git a/locales/sv.tsv b/locales/sv.tsv index a1b2ad6..592941a 100644 --- a/locales/sv.tsv +++ b/locales/sv.tsv @@ -2785,3 +2785,36 @@ no track within 15 m inget spår inom 15 m the tracks are not joined, or run the other way (see View > AI lanes) spåren är inte sammanfogade, eller går åt andra hållet (se Visa > AI-körfält) no track beside inget spår vid Drives on Kör på +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Källa vertex vald. Klicka på en målpunkt för att fästa (Shift: endast horisontell, Esc: avbryt) +Aim at a vertex of the selected object Sikta på ett hörn av det valda objektet +Snapped to vertex! (Ctrl+Z to undo) Snäppt till vertex! (Ctrl+Z för att ångra) +Aim at a target vertex or spline endpoint Sikta på en målpunkt eller spline-ändpunkt +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Källkant vald. Klicka på en målkant eller väg för att justera (Skift: endast horisontellt, Esc: avbryt) +Aim at an edge of the selected object Sikta på en kant av det markerade objektet +Aligned edge to edge! (Ctrl+Z to undo) Riktat kant i kant! (Ctrl+Z för att ångra) +Aim at a target edge or road Sikta på en målkant eller väg +Target cancelled. Pick a source vertex again Målet avbröts. Välj ett källpunkt igen +Vertex snap cancelled Vertex snap avbröts +Target cancelled. Pick a source edge again Målet avbröts. Välj en källkant igen +Edge snap cancelled Edge snap avbruten +Select an object first to snap its vertex Välj ett objekt först för att fästa dess vertex +Vertex snap: click a source vertex on the selected object (Esc to cancel) Vertex snap: klicka på en källpunkt på det valda objektet (Esc för att avbryta) +Snap vertex to vertex Fäst vertex till vertex +Select an object first to align its edge Välj ett objekt först för att justera dess kant +Edge snap: click a source edge on the selected object (Esc to cancel) Edge snap: klicka på en källkant på det valda objektet (Esc för att avbryta) +Snap edge to edge Snäpp kant i kant +Snap vertex to vertex (V) Fäst vertex till vertex (V) +Snap edge to edge (L) Snäpp kant i kant (L) +Snap vertex (V) Snap vertex (V) +Snap a vertex of this object to another vertex (Shortcut: V) Fäst en vertex av detta objekt till en annan vertex (genväg: V) +Snap edge (L) Snäppkant (L) +Snap an edge of this object to another edge or road (Shortcut: L) Fäst en kant av detta objekt till en annan kant eller väg (genväg: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Fäst en vertex av det markerade objektet till en vertex av ett annat objekt (V)\nShift: Endast horisontellt, Esc/Högerklicka: Avbryt +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Justera en kant på det markerade objektet mot en kant eller väg (L)\nRoterar och fäster kolinjärt\nShift: Endast horisontellt, Esc/Högerklicka: Avbryt +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Punkt 1 justerad! Klicka på en andra punkt på objektet för att rotera, eller Esc för att slutföra +Reference angle set. Click a target point or spline to align (Esc: finish) Referensvinkel inställd. Klicka på en målpunkt eller väg för att justera (Esc: slutför) +Pick a different vertex on the object Välj ett annat hörn på objektet +Click a 2nd reference point on the object, or Esc to finish Klicka på en andra referenspunkt på objektet, eller Esc för att slutföra +Aligned angle! (Ctrl+Z to undo) Vinkel justerad! (Ctrl+Z för att ångra) +Vertex snap complete Hörnfästning slutförd +Align vertex angle Justera hörnvinkel diff --git a/locales/th.tsv b/locales/th.tsv index ba3b46a..73909a3 100644 --- a/locales/th.tsv +++ b/locales/th.tsv @@ -2785,3 +2785,36 @@ no track within 15 m ไม่มีรางภายใน 15 ม. the tracks are not joined, or run the other way (see View > AI lanes) รางไม่ได้เชื่อมกันหรือวิ่งไปอีกทาง (ดู มุมมอง > เลน AI) no track beside ไม่มีรางข้าง Drives on วิ่งบน +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) เลือกจุดยอดต้นทางแล้ว คลิกจุดยอดเป้าหมายเพื่อสแนป (Shift: แนวนอนเท่านั้น Esc: ยกเลิก) +Aim at a vertex of the selected object เล็งไปที่จุดยอดของวัตถุที่เลือก +Snapped to vertex! (Ctrl+Z to undo) ทะลุจุดยอด! (Ctrl+Z เพื่อเลิกทำ) +Aim at a target vertex or spline endpoint เล็งไปที่จุดยอดเป้าหมายหรือจุดปลายเส้นโค้ง +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) เลือกขอบแหล่งที่มาแล้ว คลิกที่ขอบหรือถนนเป้าหมายเพื่อจัดแนว (Shift: แนวนอนเท่านั้น Esc: ยกเลิก) +Aim at an edge of the selected object เล็งไปที่ขอบของวัตถุที่เลือก +Aligned edge to edge! (Ctrl+Z to undo) ชิดขอบ! (Ctrl+Z เพื่อเลิกทำ) +Aim at a target edge or road เล็งไปที่ขอบเป้าหมายหรือถนน +Target cancelled. Pick a source vertex again เป้าหมายถูกยกเลิก เลือกจุดยอดต้นทางอีกครั้ง +Vertex snap cancelled ยกเลิกจุดยอดสแนปแล้ว +Target cancelled. Pick a source edge again เป้าหมายถูกยกเลิก เลือกขอบแหล่งที่มาอีกครั้ง +Edge snap cancelled ยกเลิกการสแนปขอบแล้ว +Select an object first to snap its vertex เลือกวัตถุก่อนเพื่อสแนปจุดยอด +Vertex snap: click a source vertex on the selected object (Esc to cancel) Vertex snap: คลิกจุดยอดต้นทางบนวัตถุที่เลือก (Esc เพื่อยกเลิก) +Snap vertex to vertex สแน็ปจุดยอดไปยังจุดยอด +Select an object first to align its edge เลือกวัตถุก่อนเพื่อจัดแนวขอบ +Edge snap: click a source edge on the selected object (Esc to cancel) Edge snap: คลิกขอบต้นทางบนวัตถุที่เลือก (Esc เพื่อยกเลิก) +Snap edge to edge ชิดขอบถึงขอบ +Snap vertex to vertex (V) สแน็ปจุดยอดถึงจุดยอด (V) +Snap edge to edge (L) ชิดขอบถึงขอบ (L) +Snap vertex (V) จุดยอดสแนป (V) +Snap a vertex of this object to another vertex (Shortcut: V) สแน็ปจุดยอดของวัตถุนี้ไปยังจุดยอดอื่น (ทางลัด: V) +Snap edge (L) ขอบสแนป (L) +Snap an edge of this object to another edge or road (Shortcut: L) สแนปขอบของวัตถุนี้ไปยังขอบหรือถนนอื่น (ทางลัด: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel สแน็ปจุดยอดของวัตถุที่เลือกไปยังจุดยอดของวัตถุอื่น (V)\nShift: แนวนอนเท่านั้น Esc/คลิกขวา: ยกเลิก +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel จัดขอบของวัตถุที่เลือกให้ตรงกับขอบหรือถนน (L)\nหมุนและจัดชิดแนว\nShift: แนวนอนเท่านั้น Esc/คลิกขวา: ยกเลิก +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish จัดตำแหน่งจุดที่ 1 แล้ว! คลิกจุดที่ 2 บนวัตถุเพื่อหมุน หรือกด Esc เพื่อเสร็จสิ้น +Reference angle set. Click a target point or spline to align (Esc: finish) ตั้งค่ามุมอ้างอิงแล้ว คลิกจุดเป้าหมายหรือถนนเพื่อจัดแนว (Esc: เสร็จสิ้น) +Pick a different vertex on the object เลือกจุดยอดอื่นบนวัตถุ +Click a 2nd reference point on the object, or Esc to finish คลิกจุดอ้างอิงจุดที่ 2 บนวัตถุ หรือกด Esc เพื่อเสร็จสิ้น +Aligned angle! (Ctrl+Z to undo) จัดแนวมุมแล้ว! (Ctrl+Z เพื่อเลิกทำ) +Vertex snap complete ตรึงจุดยอดเสร็จสมบูรณ์ +Align vertex angle จัดแนวมุมของจุดยอด diff --git a/locales/tl.tsv b/locales/tl.tsv index c6e8f1c..f0e861c 100644 --- a/locales/tl.tsv +++ b/locales/tl.tsv @@ -2785,3 +2785,36 @@ no track within 15 m walang riles sa loob ng 15 m the tracks are not joined, or run the other way (see View > AI lanes) hindi nakakabit ang mga riles, o kabilang direksyon ang takbo (tingnan ang View > Mga AI lane) no track beside walang riles sa tabi ng Drives on Tumatakbo sa +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Pinili ang source vertex. I-click ang isang target na vertex para i-snap (Shift: pahalang lang, Esc: kanselahin) +Aim at a vertex of the selected object Layunin ang isang vertex ng napiling bagay +Snapped to vertex! (Ctrl+Z to undo) Na-snap sa vertex! (Ctrl+Z para i-undo) +Aim at a target vertex or spline endpoint Layunin ang isang target na vertex o spline endpoint +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Pinili ang gilid ng pinagmulan. Mag-click ng target na gilid o kalsada para i-align (Shift: pahalang lang, Esc: kanselahin) +Aim at an edge of the selected object Layunin ang isang gilid ng napiling bagay +Aligned edge to edge! (Ctrl+Z to undo) Naka-align gilid sa gilid! (Ctrl+Z para i-undo) +Aim at a target edge or road Layunin ang isang target na gilid o kalsada +Target cancelled. Pick a source vertex again Kinansela ang target. Pumili muli ng source vertex +Vertex snap cancelled Kinansela ang vertex snap +Target cancelled. Pick a source edge again Kinansela ang target. Pumili muli ng gilid ng pinagmulan +Edge snap cancelled Kinansela ang Edge snap +Select an object first to snap its vertex Pumili muna ng isang bagay upang kunin ang tuktok nito +Vertex snap: click a source vertex on the selected object (Esc to cancel) Vertex snap: mag-click ng source vertex sa napiling object (Esc para kanselahin) +Snap vertex to vertex Mag-snap vertex sa vertex +Select an object first to align its edge Pumili muna ng isang bagay upang ihanay ang gilid nito +Edge snap: click a source edge on the selected object (Esc to cancel) Edge snap: mag-click ng source edge sa napiling object (Esc para kanselahin) +Snap edge to edge Snap gilid sa gilid +Snap vertex to vertex (V) I-snap ang vertex sa vertex (V) +Snap edge to edge (L) Snap gilid sa gilid (L) +Snap vertex (V) Snap vertex (V) +Snap a vertex of this object to another vertex (Shortcut: V) Mag-snap ng vertex ng object na ito sa isa pang vertex (Shortcut: V) +Snap edge (L) Snap na gilid (L) +Snap an edge of this object to another edge or road (Shortcut: L) I-snap ang isang gilid ng bagay na ito sa isa pang gilid o kalsada (Shortcut: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Mag-snap ng vertex ng napiling object papunta sa vertex ng isa pang object (V)\nShift: Horizontal lang, Esc/Right-click: Cancel +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel I-align ang isang gilid ng napiling bagay sa isang gilid o kalsada (L)\nUmiikot at kumukuha ng collinear\nShift: Pahalang lamang, Esc/Right-click: Kanselahin +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Naitugma ang Punto 1! Mag-click ng ika-2 punto sa bagay upang paikutin, o Esc upang matapos +Reference angle set. Click a target point or spline to align (Esc: finish) Naitakda ang anggulo ng sanggunian. Mag-click ng target na punto o daan upang itugma (Esc: tapusin) +Pick a different vertex on the object Pumili ng ibang vertex sa bagay +Click a 2nd reference point on the object, or Esc to finish Mag-click ng ika-2 sangguniang punto sa bagay, o Esc upang matapos +Aligned angle! (Ctrl+Z to undo) Naitugma ang anggulo! (Ctrl+Z upang i-undo) +Vertex snap complete Nakumpleto ang snap ng vertex +Align vertex angle Itugma ang anggulo ng vertex diff --git a/locales/tr.tsv b/locales/tr.tsv index 28f926a..a1d9126 100644 --- a/locales/tr.tsv +++ b/locales/tr.tsv @@ -2785,3 +2785,36 @@ no track within 15 m 15 m içinde ray yok the tracks are not joined, or run the other way (see View > AI lanes) raylar bağlı değil ya da ters yöne gidiyor (Görünüm > YZ şeritleri) no track beside yanında ray yok: Drives on Gittiği yol +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Kaynak köşesi seçildi. Yakalamak için hedef köşeyi tıklayın (Shift: yalnızca yatay, Esc: cancel) +Aim at a vertex of the selected object Seçilen nesnenin bir tepe noktasına nişan alın +Snapped to vertex! (Ctrl+Z to undo) Köşeye sıkıştı! (Geri almak için Ctrl+Z) +Aim at a target vertex or spline endpoint Hedef köşeyi veya spline uç noktasını hedefleyin +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Kaynak kenarı seçildi. Hizalamak için bir hedef kenarı veya yolu tıklayın (Shift: yalnızca yatay, Esc: iptal) +Aim at an edge of the selected object Seçilen nesnenin bir kenarına nişan alın +Aligned edge to edge! (Ctrl+Z to undo) Kenardan kenara hizalanmış! (Geri almak için Ctrl+Z) +Aim at a target edge or road Hedef kenarı veya yolu hedefleyin +Target cancelled. Pick a source vertex again Hedef iptal edildi. Tekrar bir kaynak tepe noktası seçin +Vertex snap cancelled Tepe noktası yakalaması iptal edildi +Target cancelled. Pick a source edge again Hedef iptal edildi. Tekrar bir kaynak kenarı seçin +Edge snap cancelled Kenar yapıştırma iptal edildi +Select an object first to snap its vertex Tepe noktasını yakalamak için önce bir nesne seçin +Vertex snap: click a source vertex on the selected object (Esc to cancel) Köşe yakalama: seçilen nesnedeki bir kaynak köşe noktasına tıklayın (iptal etmek için Esc) +Snap vertex to vertex Tepe noktasını tepe noktasına yasla +Select an object first to align its edge Kenarını hizalamak için önce bir nesne seçin +Edge snap: click a source edge on the selected object (Esc to cancel) Kenar yakalama: seçili nesnede bir kaynak kenara tıklayın (iptal etmek için Esc) +Snap edge to edge Kenardan kenara yasla +Snap vertex to vertex (V) Tepe noktasını tepe noktasına yasla (V) +Snap edge to edge (L) Kenardan kenara yasla (L) +Snap vertex (V) Köşeyi yasla (V) +Snap a vertex of this object to another vertex (Shortcut: V) Bu nesnenin bir köşesini başka bir köşeye tuttur (Kısayol: V) +Snap edge (L) Geçme kenarı (L) +Snap an edge of this object to another edge or road (Shortcut: L) Bu nesnenin bir kenarını başka bir kenara veya yola yaslayın (Kısayol: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Seçilen nesnenin tepe noktasını başka bir nesnenin tepe noktasına yasla (V)\nShift: Yalnızca yatay, Esc/Sağ tıklama: İptal +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Seçilen nesnenin bir kenarını bir kenara veya yola hizalayın (L)\nDöndürür ve eşdoğrusal\nyakalar Shift: Yalnızca yatay, Esc/Sağ tıklama: İptal +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish 1. nokta hizalandı! Döndürmek için nesne üzerindeki 2. noktaya tıklayın veya tamamlamak için Esc tuşuna basın +Reference angle set. Click a target point or spline to align (Esc: finish) Referans açısı ayarlandı. Hizalamak için bir hedef noktaya veya yola tıklayın (Esc: bitir) +Pick a different vertex on the object Nesne üzerinde farklı bir tepe noktası seçin +Click a 2nd reference point on the object, or Esc to finish Nesne üzerinde 2. referans noktasına tıklayın veya bitirmek için Esc tuşuna basın +Aligned angle! (Ctrl+Z to undo) Açı hizalandı! (Geri almak için Ctrl+Z) +Vertex snap complete Köşe yakalama tamamlandı +Align vertex angle Köşe açısını hizala diff --git a/locales/uk.tsv b/locales/uk.tsv index da31e1b..0811e1e 100644 --- a/locales/uk.tsv +++ b/locales/uk.tsv @@ -2783,3 +2783,36 @@ no track within 15 m у 15 м немає рейок the tracks are not joined, or run the other way (see View > AI lanes) рейки не з'єднані або йдуть в інший бік (Вигляд > Смуги ШІ) no track beside немає рейок біля Drives on Їздить по +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Вибрана вихідна вершина. Клацніть цільову вершину, щоб зробити прив’язку (Shift: лише горизонтально, Esc: скасувати) +Aim at a vertex of the selected object Наведіть приціл у вершину вибраного об'єкта +Snapped to vertex! (Ctrl+Z to undo) Прищеплено до вершини! (Ctrl+Z, щоб скасувати) +Aim at a target vertex or spline endpoint Наведіть на цільову вершину або кінцеву точку сплайна +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Вибраний край джерела. Клацніть цільовий край або дорогу, щоб вирівняти (Shift: лише горизонтально, Esc: скасувати) +Aim at an edge of the selected object Наведіть на край вибраного об’єкта +Aligned edge to edge! (Ctrl+Z to undo) Вирівняно від краю до краю! (Ctrl+Z, щоб скасувати) +Aim at a target edge or road Цільтесь у край цілі або дорогу +Target cancelled. Pick a source vertex again Ціль скасовано. Знову виберіть вихідну вершину +Vertex snap cancelled Прив’язку вершини скасовано +Target cancelled. Pick a source edge again Ціль скасовано. Знову виберіть край джерела +Edge snap cancelled Прив’язку краю скасовано +Select an object first to snap its vertex Спочатку виберіть об’єкт, щоб прив’язати його вершину +Vertex snap: click a source vertex on the selected object (Esc to cancel) Прив’язка вершин: клацніть вихідну вершину на вибраному об’єкті (Esc для скасування) +Snap vertex to vertex Прив’язка вершини до вершини +Select an object first to align its edge Спочатку виберіть об’єкт, щоб вирівняти його край +Edge snap: click a source edge on the selected object (Esc to cancel) Прив’язка краю: клацніть вихідний край вибраного об’єкта (Esc для скасування) +Snap edge to edge Прив'яжіть край до краю +Snap vertex to vertex (V) Прив’язати вершину до вершини (V) +Snap edge to edge (L) Прив’язати край до краю (L) +Snap vertex (V) Вершина прив'язки (V) +Snap a vertex of this object to another vertex (Shortcut: V) Прив’язати вершину цього об’єкта до іншої вершини (Ярлик: V) +Snap edge (L) Край кріплення (L) +Snap an edge of this object to another edge or road (Shortcut: L) Прив’язати край цього об’єкта до іншого краю або дороги (комбінація клавіш: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Прив’язати вершину вибраного об’єкта до вершини іншого об’єкта (V)\nShift: лише по горизонталі, Esc/клацання правою кнопкою миші: скасувати +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Вирівняйте край вибраного об’єкта за краєм або дорогою (L)\nОбертає та прив’язує колінеарно\nShift: Лише горизонтально, Esc/клацання правою кнопкою миші: Скасувати +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Точку 1 вирівняно! Клацніть другу точку на об'єкті для обертання або Esc для завершення +Reference angle set. Click a target point or spline to align (Esc: finish) Опорний кут задано. Клацніть цільову точку або дорогу для вирівнювання (Esc: завершити) +Pick a different vertex on the object Виберіть іншу вершину на об'єкті +Click a 2nd reference point on the object, or Esc to finish Клацніть 2-гу опорну точку на об'єкті або натисніть Esc для завершення +Aligned angle! (Ctrl+Z to undo) Кут вирівняно! (Ctrl+Z для скасування) +Vertex snap complete Прив'язку вершини завершено +Align vertex angle Вирівняти кут вершини diff --git a/locales/vi.tsv b/locales/vi.tsv index 2c5fc71..c057244 100644 --- a/locales/vi.tsv +++ b/locales/vi.tsv @@ -2785,3 +2785,36 @@ no track within 15 m không có đường ray trong 15 m the tracks are not joined, or run the other way (see View > AI lanes) các đường ray chưa nối, hoặc chạy ngược chiều (xem Xem > Làn AI) no track beside không có đường ray bên cạnh Drives on Chạy trên +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) Đỉnh nguồn được chọn. Bấm vào một đỉnh mục tiêu để chụp (Shift: chỉ theo chiều ngang, Esc: hủy) +Aim at a vertex of the selected object Nhắm vào một đỉnh của đối tượng đã chọn +Snapped to vertex! (Ctrl+Z to undo) Đã chụp đến đỉnh! (Ctrl + Z để hoàn tác) +Aim at a target vertex or spline endpoint Nhắm vào một đỉnh mục tiêu hoặc điểm cuối spline +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) Cạnh nguồn được chọn. Nhấp vào cạnh hoặc đường mục tiêu để căn chỉnh (Shift: chỉ ngang, Esc: hủy) +Aim at an edge of the selected object Nhắm vào một cạnh của đối tượng đã chọn +Aligned edge to edge! (Ctrl+Z to undo) Căn chỉnh từng cạnh! (Ctrl + Z để hoàn tác) +Aim at a target edge or road Nhắm vào mép hoặc đường mục tiêu +Target cancelled. Pick a source vertex again Mục tiêu bị hủy bỏ. Chọn lại một đỉnh nguồn +Vertex snap cancelled Đã hủy ảnh chụp đỉnh +Target cancelled. Pick a source edge again Mục tiêu bị hủy bỏ. Chọn lại cạnh nguồn +Edge snap cancelled Đã hủy chụp nhanh cạnh +Select an object first to snap its vertex Chọn một đối tượng trước tiên để chụp đỉnh của nó +Vertex snap: click a source vertex on the selected object (Esc to cancel) Chụp nhanh đỉnh: nhấp vào đỉnh nguồn trên đối tượng đã chọn (Esc để hủy) +Snap vertex to vertex Chuyển đỉnh này sang đỉnh khác +Select an object first to align its edge Chọn một đối tượng trước tiên để căn chỉnh cạnh của nó +Edge snap: click a source edge on the selected object (Esc to cancel) Edge snap: nhấp vào cạnh nguồn trên đối tượng đã chọn (Esc để hủy) +Snap edge to edge Chụp cạnh này sang cạnh khác +Snap vertex to vertex (V) Đưa đỉnh vào đỉnh (V) +Snap edge to edge (L) Chụp cạnh này sang cạnh khác (L) +Snap vertex (V) Đỉnh chụp (V) +Snap a vertex of this object to another vertex (Shortcut: V) Đưa một đỉnh của đối tượng này sang một đỉnh khác (Phím tắt: V) +Snap edge (L) Cạnh chụp (L) +Snap an edge of this object to another edge or road (Shortcut: L) Đưa một cạnh của đối tượng này sang một cạnh hoặc đường khác (Phím tắt: L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel Đưa một đỉnh của đối tượng đã chọn vào một đỉnh của đối tượng khác (V)\nShift: Chỉ theo chiều ngang, Esc/Nhấp chuột phải: Hủy +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel Căn chỉnh cạnh của đối tượng đã chọn với một cạnh hoặc đường (L)\nXoay và gắn chặt thẳng hàng\nShift: Chỉ ngang, Esc/Nhấp chuột phải: Hủy +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish Điểm 1 đã căn chỉnh! Bấm điểm thứ 2 trên đối tượng để xoay, hoặc Esc để hoàn tất +Reference angle set. Click a target point or spline to align (Esc: finish) Góc tham chiếu đã đặt. Bấm điểm đích hoặc đường để căn chỉnh (Esc: hoàn tất) +Pick a different vertex on the object Chọn một đỉnh khác trên đối tượng +Click a 2nd reference point on the object, or Esc to finish Bấm điểm tham chiếu thứ 2 trên đối tượng, hoặc Esc để hoàn tất +Aligned angle! (Ctrl+Z to undo) Đã căn chỉnh góc! (Ctrl+Z để hoàn tác) +Vertex snap complete Bắt dính đỉnh hoàn tất +Align vertex angle Căn chỉnh góc đỉnh diff --git a/locales/zh-tw.tsv b/locales/zh-tw.tsv index 0d1b18e..7a64206 100644 --- a/locales/zh-tw.tsv +++ b/locales/zh-tw.tsv @@ -2781,3 +2781,36 @@ no track within 15 m 15 m 內沒有軌道 the tracks are not joined, or run the other way (see View > AI lanes) 軌道未相連,或方向相反(見 檢視 > AI 行車線) no track beside 旁邊沒有軌道: Drives on 行駛於 +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) 已選擇來源頂點。點擊目標頂點以吸附(Shift:僅水平,Esc:取消) +Aim at a vertex of the selected object 對準所選物件的頂點 +Snapped to vertex! (Ctrl+Z to undo) 已吸附至頂點!(Ctrl+Z 復原) +Aim at a target vertex or spline endpoint 對準目標頂點或道路端點 +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) 已選擇來源邊緣。點擊目標邊緣或道路以對齊(Shift:僅水平,Esc:取消) +Aim at an edge of the selected object 對準所選物件的邊緣 +Aligned edge to edge! (Ctrl+Z to undo) 已完成邊緣對齊!(Ctrl+Z 復原) +Aim at a target edge or road 對準目標邊緣或道路 +Target cancelled. Pick a source vertex again 目標已取消。請重新選取來源頂點 +Vertex snap cancelled 已取消頂點吸附 +Target cancelled. Pick a source edge again 目標已取消。請重新選取來源邊緣 +Edge snap cancelled 已取消邊緣吸附 +Select an object first to snap its vertex 請先選取物件以吸附其頂點 +Vertex snap: click a source vertex on the selected object (Esc to cancel) 頂點吸附:點擊所選物件上的來源頂點(Esc 取消) +Snap vertex to vertex 頂點對頂點吸附 +Select an object first to align its edge 請先選取物件以對齊其邊緣 +Edge snap: click a source edge on the selected object (Esc to cancel) 邊緣吸附:點擊所選物件上的來源邊緣(Esc 取消) +Snap edge to edge 邊緣對邊緣吸附 +Snap vertex to vertex (V) 頂點對頂點吸附 (V) +Snap edge to edge (L) 邊緣對邊緣吸附 (L) +Snap vertex (V) 吸附頂點 (V) +Snap a vertex of this object to another vertex (Shortcut: V) 將此物件的頂點吸附至另一頂點(快捷鍵:V) +Snap edge (L) 吸附邊緣 (L) +Snap an edge of this object to another edge or road (Shortcut: L) 將此物件的邊緣吸附至另一邊緣或道路(快捷鍵:L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel 將所選物件的頂點吸附至另一物件的頂點 (V)\nShift:僅水平,Esc/右鍵:取消 +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel 將所選物件的邊緣對齊至邊緣或道路 (L)\n旋轉並同線吸附\nShift:僅水平,Esc/右鍵:取消 +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish 第 1 點已對齊!點擊物件上的第 2 個點進行旋轉,或按 Esc 完成 +Reference angle set. Click a target point or spline to align (Esc: finish) 參考角度已設定。點擊目標點或道路以對齊(Esc:完成) +Pick a different vertex on the object 請選取物件上的其他頂點 +Click a 2nd reference point on the object, or Esc to finish 點擊物件上的第 2 個參考點,或按 Esc 完成 +Aligned angle! (Ctrl+Z to undo) 已對齊角度!(Ctrl+Z 復原) +Vertex snap complete 頂點吸附完成 +Align vertex angle 對齊頂點角度 diff --git a/locales/zh.tsv b/locales/zh.tsv index f54c3cf..f972adb 100644 --- a/locales/zh.tsv +++ b/locales/zh.tsv @@ -2781,3 +2781,36 @@ no track within 15 m 15 m 内没有轨道 the tracks are not joined, or run the other way (see View > AI lanes) 轨道未连接,或方向相反(见 视图 > AI 车道) no track beside 旁边没有轨道: Drives on 行驶于 +Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel) 已选择来源顶点。点击目标顶点以吸附(Shift:仅水平,Esc:取消) +Aim at a vertex of the selected object 对准所选对象的顶点 +Snapped to vertex! (Ctrl+Z to undo) 已吸附至顶点!(Ctrl+Z 撤销) +Aim at a target vertex or spline endpoint 对准目标顶点或道路端点 +Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel) 已选择来源边缘。点击目标边缘或道路以对齐(Shift:仅水平,Esc:取消) +Aim at an edge of the selected object 对准所选对象的边缘 +Aligned edge to edge! (Ctrl+Z to undo) 已完成边缘对齐!(Ctrl+Z 撤销) +Aim at a target edge or road 对准目标边缘或道路 +Target cancelled. Pick a source vertex again 目标已取消。请重新选择来源顶点 +Vertex snap cancelled 已取消顶点吸附 +Target cancelled. Pick a source edge again 目标已取消。请重新选择来源边缘 +Edge snap cancelled 已取消边缘吸附 +Select an object first to snap its vertex 请先选择对象以吸附其顶点 +Vertex snap: click a source vertex on the selected object (Esc to cancel) 顶点吸附:点击所选对象上的来源顶点(Esc 取消) +Snap vertex to vertex 顶点对顶点吸附 +Select an object first to align its edge 请先选择对象以对齐其边缘 +Edge snap: click a source edge on the selected object (Esc to cancel) 边缘吸附:点击所选对象上的来源边缘(Esc 取消) +Snap edge to edge 边缘对边缘吸附 +Snap vertex to vertex (V) 顶点对顶点吸附 (V) +Snap edge to edge (L) 边缘对边缘吸附 (L) +Snap vertex (V) 吸附顶点 (V) +Snap a vertex of this object to another vertex (Shortcut: V) 将此对象的顶点吸附至另一顶点(快捷键:V) +Snap edge (L) 吸附边缘 (L) +Snap an edge of this object to another edge or road (Shortcut: L) 将此对象的边缘吸附至另一边缘或道路(快捷键:L) +Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel 将所选对象的顶点吸附至另一对象的顶点 (V)\nShift:仅水平,Esc/右键:取消 +Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel 将所选对象的边缘对齐至边缘或道路 (L)\n旋转并同线吸附\nShift:仅水平,Esc/右键:取消 +Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish 第 1 点已对齐!点击物体上的第 2 个点进行旋转,或按 Esc 完成 +Reference angle set. Click a target point or spline to align (Esc: finish) 参考角度已设定。点击目标点或道路以对齐(Esc:完成) +Pick a different vertex on the object 请选择物体上的其他顶点 +Click a 2nd reference point on the object, or Esc to finish 点击物体上的第 2 个参考点,或按 Esc 完成 +Aligned angle! (Ctrl+Z to undo) 已对齐角度!(Ctrl+Z 撤销) +Vertex snap complete 顶点吸附完成 +Align vertex angle 对齐顶点角度 diff --git a/src/app.rs b/src/app.rs index 4f0af5b..222bc0f 100644 --- a/src/app.rs +++ b/src/app.rs @@ -2135,6 +2135,30 @@ impl App { self.ed.toast(tr("Cut in two: each piece can now be changed on its own", "Разрезана надвое: каждый кусок теперь можно менять отдельно")); return; } + if !self.crossing.open + && code == Some(KeyCode::KeyV) + && !self.keys.ctrl + && !self.keys.alt + { + if self.ed.vertex_snap.is_some() { + self.ed.cancel_vertex_snap(); + } else { + self.ed.start_vertex_snap(); + } + return; + } + if !self.crossing.open + && code == Some(KeyCode::KeyL) + && !self.keys.ctrl + && !self.keys.alt + { + if self.ed.edge_snap.is_some() { + self.ed.cancel_edge_snap(); + } else { + self.ed.start_edge_snap(); + } + return; + } let ctrl = self.keys.ctrl; let shift = self.keys.shift; let mut actions = Vec::new(); @@ -2183,6 +2207,10 @@ impl App { if let Key::Named(NamedKey::Escape) = logical { if self.ui.view_menu.take().is_some() { // (only the view's menu closes) + } else if self.ed.vertex_snap.is_some() { + self.ed.cancel_vertex_snap(); + } else if self.ed.edge_snap.is_some() { + self.ed.cancel_edge_snap(); } else if std::mem::take(&mut self.ed.cutting) { // (only the knife goes, the selection stays) } else if self.ed.link_pick.take().is_some() { @@ -3952,6 +3980,20 @@ impl ApplicationHandler for App { if self.keys.alt { // Option + drag: turn the camera self.mouse.alt_orbit = true; + } else if self.ed.vertex_snap.is_some() || self.ed.edge_snap.is_some() { + self.mouse.left = true; + self.mouse.press = self.mouse.pos; + if let (Some((o, d)), Some(assets)) = (self.view_ray(), self.assets.as_mut()) { + self.ed.hover_ray(assets, &self.lib, o, d); + } + if let Some(assets) = self.assets.as_mut() { + self.ed.left_press(assets, &self.lib, self.keys.shift); + } + if self.ed.vertex_snap.is_some() || self.ed.edge_snap.is_some() { + if let (Some((o, d)), Some(assets)) = (self.view_ray(), self.assets.as_mut()) { + self.ed.hover_ray(assets, &self.lib, o, d); + } + } } else if self.ed.mesh.as_ref().map(|m| m.editing).unwrap_or(false) { // (the edit mode: a press picks or takes a handle; on nothing it // draws a box) diff --git a/src/assets.rs b/src/assets.rs index 8facda3..cf6797e 100644 --- a/src/assets.rs +++ b/src/assets.rs @@ -254,6 +254,11 @@ pub struct Assets { /// The largest texture side kept (the editor need not hold 4K pictures). const MAX_SIDE: u32 = 1024; +#[inline] +pub(crate) fn norm_asset_key(rel: &str) -> String { + rel.replace('\\', "/").to_lowercase() +} + impl Assets { pub fn new(omsi: PathBuf, content: PathBuf) -> Assets { let (tx, wrx) = mpsc::channel::(); @@ -293,8 +298,10 @@ impl Assets { } pub fn object(&mut self, rel: &str) -> Option> { - let key = rel.to_lowercase(); - match self.objects.get(&key) { + let key = norm_asset_key(rel); + let lower = rel.to_lowercase(); + let slot = self.objects.get(&key).or_else(|| self.objects.get(&lower)).or_else(|| self.objects.get(rel)); + match slot { Some(Slot::Ready(m)) => Some(m.clone()), Some(_) => None, None => { @@ -310,12 +317,14 @@ impl Assets { /// [`Assets::object`], waiting for the model when it has to be read first (for what is done /// once, on a click, not every frame): None if it cannot be read in `ms` milliseconds. pub fn object_wait(&mut self, rel: &str, ms: u64) -> Option> { + let key = norm_asset_key(rel); + let lower = rel.to_lowercase(); let start = std::time::Instant::now(); loop { if let Some(m) = self.object(rel) { return Some(m); } - if matches!(self.objects.get(&rel.to_lowercase()), Some(Slot::Failed)) || start.elapsed().as_millis() as u64 > ms { + if matches!(self.objects.get(&key).or_else(|| self.objects.get(&lower)).or_else(|| self.objects.get(rel)), Some(Slot::Failed)) || start.elapsed().as_millis() as u64 > ms { return None; } self.poll(); @@ -325,12 +334,14 @@ impl Assets { /// [`Assets::spline`], waiting for the model (see [`Assets::object_wait`]). pub fn spline_wait(&mut self, rel: &str, ms: u64) -> Option> { + let key = norm_asset_key(rel); + let lower = rel.to_lowercase(); let start = std::time::Instant::now(); loop { if let Some(m) = self.spline(rel) { return Some(m); } - if matches!(self.splines.get(&rel.to_lowercase()), Some(Slot::Failed)) || start.elapsed().as_millis() as u64 > ms { + if matches!(self.splines.get(&key).or_else(|| self.splines.get(&lower)).or_else(|| self.splines.get(rel)), Some(Slot::Failed)) || start.elapsed().as_millis() as u64 > ms { return None; } self.poll(); @@ -339,8 +350,10 @@ impl Assets { } pub fn spline(&mut self, rel: &str) -> Option> { - let key = rel.to_lowercase(); - match self.splines.get(&key) { + let key = norm_asset_key(rel); + let lower = rel.to_lowercase(); + let slot = self.splines.get(&key).or_else(|| self.splines.get(&lower)).or_else(|| self.splines.get(rel)); + match slot { Some(Slot::Ready(m)) => Some(m.clone()), Some(_) => None, None => { @@ -432,17 +445,21 @@ impl Assets { } pub fn spline_failed(&self, rel: &str) -> bool { - matches!(self.splines.get(&rel.to_lowercase()), Some(Slot::Failed)) + let lower = rel.to_lowercase(); + matches!(self.splines.get(&norm_asset_key(rel)).or_else(|| self.splines.get(&lower)).or_else(|| self.splines.get(rel)), Some(Slot::Failed)) } pub fn object_failed(&self, rel: &str) -> bool { - matches!(self.objects.get(&rel.to_lowercase()), Some(Slot::Failed)) + let lower = rel.to_lowercase(); + matches!(self.objects.get(&norm_asset_key(rel)).or_else(|| self.objects.get(&lower)).or_else(|| self.objects.get(rel)), Some(Slot::Failed)) } /// Forget one object's model, and the pictures in its folder, so they are read again /// (its files were written anew). pub fn forget_object(&mut self, rel: &str, dir: &Path) { + self.objects.remove(&norm_asset_key(rel)); self.objects.remove(&rel.to_lowercase()); + self.objects.remove(rel); self.textures.retain(|k, s| matches!(s, Slot::Loading) || !k.starts_with(dir)); } diff --git a/src/editor.rs b/src/editor.rs index b6dc110..e3dd853 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -357,10 +357,52 @@ pub(crate) fn attach_hint(n: usize) -> &'static str { } } +/// What stage of vertex-to-vertex snapping is active. +#[derive(Clone, Copy, PartialEq, Debug)] +pub enum VertexSnapStage { + /// Select a reference vertex on the selected object. + PickSource, + /// Select a target vertex on another object or road end to snap to. + PickTarget { source: DVec3 }, + /// Select a second reference vertex on the selected object to align rotation. + PickSource2 { anchor: DVec3 }, + /// Select a second target vertex or direction to align rotation. + PickTarget2 { anchor: DVec3, source2: DVec3 }, +} + +/// The state of the vertex-to-vertex snapping tool. +#[derive(Clone, PartialEq, Debug)] +pub struct VertexSnap { + pub objects: Vec<(TileKey, i64)>, + pub stage: VertexSnapStage, + pub hover: Option, +} + +/// What stage of edge-to-edge snapping is active. +#[derive(Clone, Copy, PartialEq, Debug)] +pub enum EdgeSnapStage { + /// Select a reference edge on the selected object. + PickSource, + /// Select a target edge or road segment to align to. + PickTarget { source: [DVec3; 2] }, +} + +/// The state of the edge-to-edge snapping tool. +#[derive(Clone, PartialEq, Debug)] +pub struct EdgeSnap { + pub objects: Vec<(TileKey, i64)>, + pub stage: EdgeSnapStage, + pub hover: Option<([DVec3; 2], DVec3)>, +} + pub struct Editor { pub doc: Option, pub history: History, pub tool: Tool, + /// Vertex-to-vertex snapping mode for aligning scenery objects. + pub vertex_snap: Option, + /// Edge-to-edge snapping mode for aligning scenery objects along edges or lines. + pub edge_snap: Option, /// The selection: the one shown in the properties (None: nothing selected, whatever /// `also` holds) and the others selected with it. pub selected: Option, @@ -893,6 +935,8 @@ impl Default for Editor { reveal: None, aim: None, path_numbers: None, + vertex_snap: None, + edge_snap: None, } } } @@ -1224,6 +1268,29 @@ fn ray_near_piece(o: DVec3, d: DVec3, a: DVec3, b: DVec3) -> Option<(f64, f64)> Some((lat, cross)) } +fn ray_near_edge(o: DVec3, d: DVec3, a: DVec3, b: DVec3) -> Option<(f64, f64, DVec3)> { + let u = b - a; + let au = u.length_squared(); + let w = a - o; + let (bu, du, eu) = (u.dot(d), u.dot(w), d.dot(w)); + let mut s = 0.0; + if au > 1e-12 { + let den = bu * bu - au; + if den.abs() > 1e-12 { + let t = (bu * du - eu * au) / den; + s = ((bu * t - du) / au).clamp(0.0, 1.0); + } + } + let p = a + u * s; + let rel = p - o; + let along = rel.dot(d); + if along <= 0.1 { + return None; + } + let lat = (rel - d * along).length(); + Some((lat, along, p)) +} + /// One drag of an end's heading: the roads as they were, and the last bend that fitted. struct HeadingDrag { key: TileKey, @@ -1419,6 +1486,8 @@ impl Editor { self.sample_browser = false; self.path_connect = None; self.cutting = false; + self.vertex_snap = None; + self.edge_snap = None; if let Some(doc) = &mut self.doc { self.history.commit(); let _ = doc; @@ -2037,6 +2106,38 @@ impl Editor { self.hover_stack.clear(); return; } + if self.vertex_snap.is_some() { + let target = match self.vertex_snap.as_ref().unwrap().stage { + VertexSnapStage::PickSource => None, + VertexSnapStage::PickTarget { source } => Some(source), + VertexSnapStage::PickSource2 { anchor } => Some(anchor), + VertexSnapStage::PickTarget2 { source2, .. } => Some(source2), + }; + let hover = self.vertex_at_ray(assets, o, d, g, target); + if let Some(snap) = &mut self.vertex_snap { + snap.hover = hover; + } + self.hover = None; + self.hover_handle = None; + self.hover_handle_of = None; + self.hover_stack.clear(); + return; + } + if self.edge_snap.is_some() { + let target_mode = match self.edge_snap.as_ref().unwrap().stage { + EdgeSnapStage::PickSource => false, + EdgeSnapStage::PickTarget { .. } => true, + }; + let hover = self.edge_at_ray(assets, o, d, g, target_mode); + if let Some(snap) = &mut self.edge_snap { + snap.hover = hover; + } + self.hover = None; + self.hover_handle = None; + self.hover_handle_of = None; + self.hover_stack.clear(); + return; + } match self.acts_as() { Tool::Select => { if self.drag == Drag::None { @@ -2261,6 +2362,114 @@ impl Editor { if self.doc.is_none() { return; } + if let Some(snap) = &self.vertex_snap { + let stage = snap.stage; + let hover = snap.hover.or_else(|| { + let (o, d) = self.aim?; + let g = self.ground_hit(o, d); + match stage { + VertexSnapStage::PickSource => self.vertex_at_ray(assets, o, d, g, None), + VertexSnapStage::PickTarget { source } => self.vertex_at_ray(assets, o, d, g, Some(source)), + VertexSnapStage::PickSource2 { anchor } => self.vertex_at_ray(assets, o, d, g, Some(anchor)), + VertexSnapStage::PickTarget2 { source2, .. } => self.vertex_at_ray(assets, o, d, g, Some(source2)), + } + }); + match (stage, hover) { + (VertexSnapStage::PickSource, Some(source)) => { + if let Some(s) = &mut self.vertex_snap { + s.stage = VertexSnapStage::PickTarget { source }; + s.hover = None; + } + self.toast(tr("Source vertex chosen. Click a target vertex to snap (Shift: horizontal only, Esc: cancel)", "Исходная точка выбрана. Щёлкните целевую вершину для привязки (Shift: только по горизонтали, Esc: отмена)")); + } + (VertexSnapStage::PickSource, None) => { + self.toast(tr("Aim at a vertex of the selected object", "Наведите на вершину выбранного объекта")); + } + (VertexSnapStage::PickTarget { source }, Some(target)) => { + let mut delta = target - source; + if shift { + delta.z = 0.0; + } + self.apply_vertex_snap(assets, delta); + let anchor = source + delta; + if let Some(s) = &mut self.vertex_snap { + s.stage = VertexSnapStage::PickSource2 { anchor }; + s.hover = None; + } + self.toast(tr("Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish", "Точка 1 совмещена! Кликните вторую точку на объекте для поворота или Esc для завершения")); + } + (VertexSnapStage::PickTarget { .. }, None) => { + self.toast(tr("Aim at a target vertex or spline endpoint", "Наведите на целевую вершину или конец дороги")); + } + (VertexSnapStage::PickSource2 { anchor }, Some(source2)) => { + if (source2 - anchor).length() > 0.02 { + if let Some(s) = &mut self.vertex_snap { + s.stage = VertexSnapStage::PickTarget2 { anchor, source2 }; + s.hover = None; + } + self.toast(tr("Reference angle set. Click a target point or spline to align (Esc: finish)", "Опорный угол задан. Кликните целевую точку или дорогу для выравнивания (Esc: завершить)")); + } else { + self.toast(tr("Pick a different vertex on the object", "Выберите другую вершину на объекте")); + } + } + (VertexSnapStage::PickSource2 { .. }, None) => { + self.toast(tr("Click a 2nd reference point on the object, or Esc to finish", "Кликните 2-ю опорную точку на объекте или нажмите Esc для завершения")); + } + (VertexSnapStage::PickTarget2 { anchor, source2 }, Some(target2)) => { + let v_src = (source2 - anchor).truncate(); + let v_tgt = (target2 - anchor).truncate(); + if v_src.length_squared() > 1e-6 && v_tgt.length_squared() > 1e-6 { + let h_src = roads::heading_of(v_src); + let h_tgt = roads::heading_of(v_tgt); + let deg = (h_tgt - h_src + 540.0).rem_euclid(360.0) - 180.0; + self.apply_vertex_snap_rotation(assets, anchor.truncate(), deg); + self.toast(tr("Aligned angle! (Ctrl+Z to undo)", "Угол выровнен! (Ctrl+Z для отмены)")); + } + self.vertex_snap = None; + } + (VertexSnapStage::PickTarget2 { .. }, None) => { + self.toast(tr("Aim at a target vertex or spline endpoint", "Наведите на целевую вершину или конец дороги")); + } + } + return; + } + if let Some(snap) = &self.edge_snap { + let stage = snap.stage; + let hover = snap.hover.or_else(|| { + let (o, d) = self.aim?; + let g = self.ground_hit(o, d); + match stage { + EdgeSnapStage::PickSource => self.edge_at_ray(assets, o, d, g, false), + EdgeSnapStage::PickTarget { .. } => self.edge_at_ray(assets, o, d, g, true), + } + }); + match (stage, hover) { + (EdgeSnapStage::PickSource, Some((edge, hit))) => { + let source = if (hit - edge[0]).length_squared() <= (hit - edge[1]).length_squared() { + edge + } else { + [edge[1], edge[0]] + }; + if let Some(s) = &mut self.edge_snap { + s.stage = EdgeSnapStage::PickTarget { source }; + s.hover = None; + } + self.toast(tr("Source edge chosen. Click a target edge or road to align (Shift: horizontal only, Esc: cancel)", "Исходное ребро выбрано. Щёлкните целевое ребро или дорогу для выравнивания (Shift: только по горизонтали, Esc: отмена)")); + } + (EdgeSnapStage::PickSource, None) => { + self.toast(tr("Aim at an edge of the selected object", "Наведите на ребро выбранного объекта")); + } + (EdgeSnapStage::PickTarget { source }, Some((target, target_hit))) => { + self.edge_snap = None; + self.apply_edge_snap(assets, source, target, target_hit, shift); + self.toast(tr("Aligned edge to edge! (Ctrl+Z to undo)", "Ребро выровнено по ребру! (Ctrl+Z для отмены)")); + } + (EdgeSnapStage::PickTarget { .. }, None) => { + self.toast(tr("Aim at a target edge or road", "Наведите на целевое ребро или дорогу")); + } + } + return; + } // "Connect to": the next click is the other end of the path, not a new selection if self.path_connect.is_some() && self.editing_paths() { match (self.hover_handle, self.hover_handle_of) { @@ -2490,6 +2699,44 @@ impl Editor { /// A right click without a drag: what the tool was doing is called off; true when the /// view's menu is to open instead. pub fn right_click(&mut self) -> bool { + if let Some(snap) = &mut self.vertex_snap { + match snap.stage { + VertexSnapStage::PickTarget { .. } => { + snap.stage = VertexSnapStage::PickSource; + snap.hover = None; + self.toast(tr("Target cancelled. Pick a source vertex again", "Выбор цели отменен. Выберите исходную вершину снова")); + return false; + } + VertexSnapStage::PickSource2 { .. } => { + self.vertex_snap = None; + self.toast(tr("Vertex snap complete", "Привязка вершины завершена")); + return false; + } + VertexSnapStage::PickTarget2 { anchor, .. } => { + snap.stage = VertexSnapStage::PickSource2 { anchor }; + snap.hover = None; + self.toast(tr("Point 1 aligned! Click a 2nd point on object to rotate, or Esc to finish", "Точка 1 совмещена! Кликните вторую точку на объекте для поворота или Esc для завершения")); + return false; + } + VertexSnapStage::PickSource => { + self.vertex_snap = None; + self.toast(tr("Vertex snap cancelled", "Привязка вершины отменена")); + return false; + } + } + } + if let Some(snap) = &mut self.edge_snap { + if let EdgeSnapStage::PickTarget { .. } = snap.stage { + snap.stage = EdgeSnapStage::PickSource; + snap.hover = None; + self.toast(tr("Target cancelled. Pick a source edge again", "Выбор цели отменен. Выберите исходное ребро снова")); + return false; + } else { + self.edge_snap = None; + self.toast(tr("Edge snap cancelled", "Привязка ребра отменена")); + return false; + } + } if let Some(m) = self.mesh.as_mut().filter(|m| m.modal_active()) { m.cancel(); return false; @@ -5978,6 +6225,99 @@ impl Editor { disc(&mut x.overlay, cam, p + lift, w * 2.5, [1.0, 0.85, 0.2, 1.0]); } } + if let Some(snap) = &self.vertex_snap { + let ball_r = (cam.distance * 0.007).clamp(0.06, 1.2); + let disc_r = (ball_r * 1.6) as f32; + let line_w = (cam.distance * 0.0012).clamp(0.02, 0.2) as f32; + match snap.stage { + VertexSnapStage::PickSource => { + for &(k, id) in &snap.objects { + let verts = Self::object_vertices_for_snap(doc, assets, k, id); + let dot_r = (cam.distance * 0.003).clamp(0.03, 0.35); + for p in verts { + ball(&mut x.overlay, p, dot_r, [1.0, 0.45, 0.45, 0.7]); + } + } + if let Some(hover) = snap.hover { + ball(&mut x.overlay, hover, ball_r, [1.0, 0.2, 0.2, 1.0]); + disc(&mut x.overlay, cam, hover, disc_r, [1.0, 0.85, 0.2, 0.6]); + } + } + VertexSnapStage::PickTarget { source } => { + ball(&mut x.overlay, source, ball_r, [1.0, 0.2, 0.2, 1.0]); + if let Some(hover) = snap.hover { + ball(&mut x.overlay, hover, ball_r, [0.2, 0.95, 0.35, 1.0]); + disc(&mut x.overlay, cam, hover, disc_r, [0.2, 0.95, 0.35, 0.6]); + line(&mut x.overlay, cam, source, hover, line_w, [1.0, 0.85, 0.2, 0.95]); + } + } + VertexSnapStage::PickSource2 { anchor } => { + // Anchor marker (distinct blue/cyan ball) + ball(&mut x.overlay, anchor, ball_r * 1.2, [0.1, 0.65, 1.0, 1.0]); + disc(&mut x.overlay, cam, anchor, disc_r * 1.2, [0.1, 0.65, 1.0, 0.5]); + + for &(k, id) in &snap.objects { + let verts = Self::object_vertices_for_snap(doc, assets, k, id); + let dot_r = (cam.distance * 0.003).clamp(0.03, 0.35); + for p in verts { + if (p - anchor).length() > 0.02 { + ball(&mut x.overlay, p, dot_r, [1.0, 0.6, 0.2, 0.7]); + } + } + } + if let Some(hover) = snap.hover { + ball(&mut x.overlay, hover, ball_r, [1.0, 0.4, 0.1, 1.0]); + disc(&mut x.overlay, cam, hover, disc_r, [1.0, 0.8, 0.2, 0.6]); + line(&mut x.overlay, cam, anchor, hover, line_w * 1.2, [1.0, 0.7, 0.1, 0.9]); + } + } + VertexSnapStage::PickTarget2 { anchor, source2 } => { + // Baseline (anchor to source2) + ball(&mut x.overlay, anchor, ball_r * 1.2, [0.1, 0.65, 1.0, 1.0]); + ball(&mut x.overlay, source2, ball_r, [1.0, 0.4, 0.1, 1.0]); + line(&mut x.overlay, cam, anchor, source2, line_w * 1.2, [1.0, 0.6, 0.1, 0.85]); + + if let Some(hover) = snap.hover { + ball(&mut x.overlay, hover, ball_r, [0.2, 0.95, 0.35, 1.0]); + disc(&mut x.overlay, cam, hover, disc_r, [0.2, 0.95, 0.35, 0.6]); + line(&mut x.overlay, cam, anchor, hover, line_w * 1.4, [0.2, 0.95, 0.35, 0.95]); + } + } + } + } + if let Some(snap) = &self.edge_snap { + let line_w = (cam.distance * 0.002).clamp(0.04, 0.4) as f32; + let dot_r = (cam.distance * 0.005).clamp(0.05, 0.8); + match snap.stage { + EdgeSnapStage::PickSource => { + for &(k, id) in &snap.objects { + let edges = Self::object_edges_for_snap(doc, assets, k, id); + for e in edges { + line(&mut x.overlay, cam, e[0], e[1], (line_w * 0.4).max(0.02), [1.0, 0.65, 0.2, 0.4]); + } + } + if let Some((e, hit)) = snap.hover { + line(&mut x.overlay, cam, e[0], e[1], line_w * 1.8, [1.0, 0.5, 0.1, 1.0]); + ball(&mut x.overlay, e[0], dot_r, [1.0, 0.8, 0.2, 1.0]); + ball(&mut x.overlay, e[1], dot_r, [1.0, 0.8, 0.2, 1.0]); + disc(&mut x.overlay, cam, hit, (dot_r * 1.5) as f32, [1.0, 1.0, 0.3, 0.8]); + } + } + EdgeSnapStage::PickTarget { source } => { + line(&mut x.overlay, cam, source[0], source[1], line_w * 1.5, [1.0, 0.5, 0.1, 1.0]); + ball(&mut x.overlay, source[0], dot_r, [1.0, 0.8, 0.2, 1.0]); + ball(&mut x.overlay, source[1], dot_r, [1.0, 0.8, 0.2, 1.0]); + + if let Some((e, hit)) = snap.hover { + line(&mut x.overlay, cam, e[0], e[1], line_w * 1.8, [0.2, 0.95, 0.35, 1.0]); + ball(&mut x.overlay, e[0], dot_r, [0.2, 0.95, 0.35, 0.8]); + ball(&mut x.overlay, e[1], dot_r, [0.2, 0.95, 0.35, 0.8]); + ball(&mut x.overlay, hit, dot_r * 1.2, [0.2, 1.0, 0.5, 1.0]); + line(&mut x.overlay, cam, source[0], hit, line_w * 0.8, [1.0, 0.85, 0.2, 0.9]); + } + } + } + } x } } @@ -8260,6 +8600,730 @@ impl Editor { self.toast(attach_hint(n)); } + /// Start vertex-to-vertex snapping for the selected objects. + pub fn start_vertex_snap(&mut self) { + let objs: Vec<(TileKey, i64)> = self.selection().into_iter().filter_map(|s| match s { + Sel::Object(k, id) => Some((k, id)), + _ => None, + }).collect(); + if objs.is_empty() { + self.toast(tr("Select an object first to snap its vertex", "Сначала выберите объект для привязки вершины")); + return; + } + self.cancel_edge_snap(); + self.vertex_snap = Some(VertexSnap { + objects: objs, + stage: VertexSnapStage::PickSource, + hover: None, + }); + self.toast(tr("Vertex snap: click a source vertex on the selected object (Esc to cancel)", "Привязка вершины: выберите исходную вершину на объекте (Esc для отмены)")); + } + + /// Cancel the active vertex-to-vertex snapping. + pub fn cancel_vertex_snap(&mut self) { + if let Some(snap) = self.vertex_snap.take() { + match snap.stage { + VertexSnapStage::PickSource2 { .. } | VertexSnapStage::PickTarget2 { .. } => { + self.toast(tr("Vertex snap complete", "Привязка вершины завершена")); + } + _ => { + self.toast(tr("Vertex snap cancelled", "Привязка вершины отменена")); + } + } + } + } + + /// Find the nearest vertex to ray (o, d) on candidate objects or road splines. + pub fn vertex_at_ray(&self, assets: &mut Assets, o: DVec3, d: DVec3, g: Option, target_mode: Option) -> Option { + let doc = self.doc.as_ref()?; + let dir = d.normalize_or_zero(); + if dir == DVec3::ZERO { + return None; + } + + let max_dist = 500.0; + let mut best_score = f64::MAX; + let mut best_pt: Option = None; + + let snap_objects = self.vertex_snap.as_ref().map(|s| s.objects.as_slice()).unwrap_or(&[]); + let ground_dist = g.map(|hit| (hit - o).length()); + + let is_occluded = |p: DVec3, along: f64| -> bool { + if let Some(gd) = ground_dist { + if along > gd + 3.0 && p.z < g.unwrap().z - 0.5 { + return true; + } + } + false + }; + + if target_mode.is_none() { + // PickSource: only evaluate vertices of the selected objects + for &(k, id) in snap_objects { + let verts = Self::object_vertices_for_snap(doc, assets, k, id); + for v in verts { + let to_v = v - o; + let t = to_v.dot(dir); + if t <= 0.1 || t > max_dist { + continue; + } + if is_occluded(v, t) { + continue; + } + let dist = (to_v - dir * t).length(); + let ang = dist / t; + if ang < 0.045 { + let score = ang + (t / 100.0) * 0.015; + if score < best_score { + best_score = score; + best_pt = Some(v); + } + } + } + } + } else { + let anchor = target_mode.unwrap(); + let is_source2 = matches!(self.vertex_snap.as_ref().map(|s| s.stage), Some(VertexSnapStage::PickSource2 { .. })); + + if is_source2 { + // PickSource2: evaluate vertices of selected objects, excluding points near anchor + for &(k, id) in snap_objects { + let verts = Self::object_vertices_for_snap(doc, assets, k, id); + for v in verts { + if (v - anchor).length() < 0.02 { + continue; + } + let to_v = v - o; + let t = to_v.dot(dir); + if t <= 0.1 || t > max_dist { + continue; + } + if is_occluded(v, t) { + continue; + } + let dist = (to_v - dir * t).length(); + let ang = dist / t; + if ang < 0.045 { + let score = ang + (t / 100.0) * 0.015; + if score < best_score { + best_score = score; + best_pt = Some(v); + } + } + } + } + } else { + // PickTarget / PickTarget2: evaluate candidate object vertices across all tiles + let extras = FrameExtras { show_technical: self.show_technical || self.tool == Tool::Logic, hide: self.hide, ..Default::default() }; + let unseen = |m: &crate::assets::ObjectModel| m.technical && !extras.show_technical || crate::render::hidden_layer(m, &extras); + + for (k, t) in doc.tiles.iter() { + for ob in t.tile.objects.iter().chain(&t.tile.attach_objects) { + if snap_objects.iter().any(|(sk, sid)| sk == k && *sid == ob.id) { + continue; + } + let Some(model) = assets.object(&ob.file) else { continue }; + if unseen(&model) { + continue; + } + let world = doc.object_world(*k, ob, model.abs_height); + if (world - o).length() > max_dist + 100.0 { + continue; + } + + let verts = Self::object_vertices_for_snap(doc, assets, *k, ob.id); + for v in verts { + let to_v = v - o; + let t = to_v.dot(dir); + if t <= 0.1 || t > max_dist { + continue; + } + if is_occluded(v, t) { + continue; + } + let dist = (to_v - dir * t).length(); + let ang = dist / t; + if ang < 0.045 { + let score = ang + (t / 100.0) * 0.015; + if score < best_score { + best_score = score; + best_pt = Some(v); + } + } + } + } + } + + // Spline endpoints and road vertices + for (k, t) in doc.tiles.iter() { + for sp in t.tile.splines.iter().filter(|s| !s.deleted) { + let curve = omsi_geometry::SplineCurve::from_map(sp, tile_origin(*k)); + for pt in [curve.point_at(0.0), curve.end_point()] { + let to_v = pt - o; + let t = to_v.dot(dir); + if t <= 0.1 || t > max_dist { + continue; + } + if is_occluded(pt, t) { + continue; + } + let dist = (to_v - dir * t).length(); + let ang = dist / t; + if ang < 0.045 { + let score = ang + (t / 100.0) * 0.015; + if score < best_score { + best_score = score; + best_pt = Some(pt); + } + } + } + } + } + } + } + + best_pt + } + + /// Apply the vertex snap translation to the selected objects. + pub fn apply_vertex_snap(&mut self, assets: &mut Assets, delta: DVec3) { + let snap_objects = self.vertex_snap.as_ref().map(|s| s.objects.clone()).unwrap_or_default(); + let mut sels = self.selection(); + if sels.is_empty() && !snap_objects.is_empty() { + sels = snap_objects.iter().map(|&(k, id)| Sel::Object(k, id)).collect(); + } + if sels.is_empty() || delta.length_squared() < 1e-12 { + return; + } + let Some(doc) = self.doc.as_mut() else { return }; + let from: Vec = sels.iter().filter_map(|s| crate::selection::origin_of(doc, *s)).collect(); + if from.is_empty() { + return; + } + + self.history.begin(tr("Snap vertex to vertex", "Привязка вершины к вершине")); + let moved = crate::selection::transform(doc, &mut self.history, &from, glam::DVec2::ZERO, 0.0, glam::DVec2::new(delta.x, delta.y)); + + for s in &moved { + if let Sel::Object(k, id) = *s { + self.history.touch_tile(doc, k); + let (abs, pos_xy) = match doc.tiles.get(&k).and_then(|t| t.tile.objects.iter().chain(&t.tile.attach_objects).find(|o| o.id == id)) { + Some(o) => ( + assets.object(&o.file).map(|m| m.abs_height).unwrap_or(false), + [o.pos[0], o.pos[1]], + ), + None => continue, + }; + let z_adj = if abs { + delta.z + } else { + let p_new = glam::DVec2::new(tile_origin(k).x + pos_xy[0], tile_origin(k).y + pos_xy[1]); + let p_old = p_new - glam::DVec2::new(delta.x, delta.y); + let ground_old = doc.ground(p_old); + let ground_new = doc.ground(p_new); + delta.z + (ground_old - ground_new) + }; + if let Some(o) = doc.object_mut(k, id) { + o.parent_id = None; + o.pos[2] += z_adj; + } else if let Some(t) = doc.tiles.get_mut(&k) { + if let Some(o) = t.tile.attach_objects.iter_mut().find(|o| o.id == id) { + o.parent_id = None; + o.pos[2] += z_adj; + } + } + if let Some(t) = doc.tiles.get_mut(&k) { + t.touch_content(); + } + } + } + + self.selected = moved.first().copied(); + self.also = moved.into_iter().skip(1).collect(); + self.history.commit(); + } + + /// Apply rotation around a pivot point (in 2D world coords) to the selected objects. + pub fn apply_vertex_snap_rotation(&mut self, assets: &mut Assets, pivot: DVec2, deg: f64) { + if deg.abs() < 1e-4 { + return; + } + let snap_objects = self.vertex_snap.as_ref().map(|s| s.objects.clone()).unwrap_or_default(); + let mut sels = self.selection(); + if sels.is_empty() && !snap_objects.is_empty() { + sels = snap_objects.iter().map(|&(k, id)| Sel::Object(k, id)).collect(); + } + if sels.is_empty() { + return; + } + let Some(doc) = self.doc.as_mut() else { return }; + let from: Vec = sels.iter().filter_map(|s| crate::selection::origin_of(doc, *s)).collect(); + if from.is_empty() { + return; + } + + self.history.begin(tr("Align vertex angle", "Выровнять угол вершины")); + let moved = crate::selection::transform(doc, &mut self.history, &from, pivot, deg, glam::DVec2::ZERO); + + for s in &moved { + if let Sel::Object(k, id) = *s { + self.history.touch_tile(doc, k); + let (abs, pos_xy) = match doc.tiles.get(&k).and_then(|t| t.tile.objects.iter().chain(&t.tile.attach_objects).find(|o| o.id == id)) { + Some(o) => ( + assets.object(&o.file).map(|m| m.abs_height).unwrap_or(false), + [o.pos[0], o.pos[1]], + ), + None => continue, + }; + let z_adj = if abs { + 0.0 + } else { + let p_new = glam::DVec2::new(tile_origin(k).x + pos_xy[0], tile_origin(k).y + pos_xy[1]); + let p_old = from.iter().find(|o| o.sel == Sel::Object(k, id)).map(|o| o.pos).unwrap_or(p_new); + let ground_old = doc.ground(p_old); + let ground_new = doc.ground(p_new); + ground_old - ground_new + }; + if let Some(o) = doc.object_mut(k, id) { + o.pos[2] += z_adj; + } else if let Some(t) = doc.tiles.get_mut(&k) { + if let Some(o) = t.tile.attach_objects.iter_mut().find(|o| o.id == id) { + o.pos[2] += z_adj; + } + } + if let Some(t) = doc.tiles.get_mut(&k) { + t.touch_content(); + } + } + } + + self.selected = moved.first().copied(); + self.also = moved.into_iter().skip(1).collect(); + self.history.commit(); + } + + /// Candidate snap vertices for an object: origin, mesh vertices, helpers, and bounding box corners if no mesh. + pub fn object_vertices_for_snap(doc: &Document, assets: &mut Assets, k: TileKey, id: i64) -> Vec { + let Some(o) = doc.tiles.get(&k).and_then(|t| t.tile.objects.iter().chain(&t.tile.attach_objects).find(|o| o.id == id)) else { return Vec::new() }; + let abs = assets.object(&o.file).map(|m| m.abs_height).unwrap_or(false); + let world = doc.object_world(k, o, abs); + let pose = crate::place::Pose::of_object(world, o.rot); + let mut out = Vec::new(); + out.push(world); + + if let Some(model) = assets.object(&o.file) { + let mut seen = std::collections::HashSet::new(); + for part in &model.parts { + for &p in &part.mesh.positions { + let key = ( + (p.x * 200.0).round() as i64, + (p.y * 200.0).round() as i64, + (p.z * 200.0).round() as i64, + ); + if seen.insert(key) { + out.push(world + pose.rot.transform_vector3(p).as_dvec3()); + } + } + } + for (h, _) in &model.helpers { + let hp = glam::Vec3::new(h[0], h[1], h[2]); + out.push(world + pose.rot.transform_vector3(hp).as_dvec3()); + } + + // Only fall back to bounding box corners if no mesh vertices exist + if seen.is_empty() { + let (lo, hi) = (model.lo, model.hi); + for x in [lo.x, hi.x] { + for y in [lo.y, hi.y] { + for z in [lo.z, hi.z] { + out.push(world + pose.rot.transform_vector3(glam::Vec3::new(x, y, z)).as_dvec3()); + } + } + } + } + } + out + } + + /// Start edge-to-edge snapping for the selected objects. + pub fn start_edge_snap(&mut self) { + let objs: Vec<(TileKey, i64)> = self.selection().into_iter().filter_map(|s| match s { + Sel::Object(k, id) => Some((k, id)), + _ => None, + }).collect(); + if objs.is_empty() { + self.toast(tr("Select an object first to align its edge", "Сначала выберите объект для выравнивания ребра")); + return; + } + self.cancel_vertex_snap(); + self.edge_snap = Some(EdgeSnap { + objects: objs, + stage: EdgeSnapStage::PickSource, + hover: None, + }); + self.toast(tr("Edge snap: click a source edge on the selected object (Esc to cancel)", "Привязка ребра: выберите исходное ребро на объекте (Esc для отмены)")); + } + + /// Cancel the active edge-to-edge snapping. + pub fn cancel_edge_snap(&mut self) { + if self.edge_snap.take().is_some() { + self.toast(tr("Edge snap cancelled", "Привязка ребра отменена")); + } + } + + /// Find the nearest edge to ray (o, d) on candidate objects or road splines. + pub fn edge_at_ray(&self, assets: &mut Assets, o: DVec3, d: DVec3, g: Option, target_mode: bool) -> Option<([DVec3; 2], DVec3)> { + let doc = self.doc.as_ref()?; + let dir = d.normalize_or_zero(); + if dir == DVec3::ZERO { + return None; + } + + let max_dist = 500.0; + let mut best_score = f64::MAX; + let mut best_edge: Option<([DVec3; 2], DVec3)> = None; + + let snap_objects = self.edge_snap.as_ref().map(|s| s.objects.as_slice()).unwrap_or(&[]); + let ground_dist = g.map(|hit| (hit - o).length()); + + if !target_mode { + // PickSource: evaluate edges of selected objects + for &(k, id) in snap_objects { + let edges = Self::object_edges_for_snap(doc, assets, k, id); + for e in edges { + if let Some((lat, along, p)) = ray_near_edge(o, dir, e[0], e[1]) { + if along <= 0.1 || along > max_dist { + continue; + } + let ang = lat / along; + if ang > 0.045 { + continue; + } + let score = ang + (along / 100.0) * 0.015; + if score < best_score { + best_score = score; + best_edge = Some((e, p)); + } + } + } + } + } else { + // PickTarget: evaluate other visible objects and road splines + let extras = FrameExtras { show_technical: self.show_technical || self.tool == Tool::Logic, hide: self.hide, ..Default::default() }; + let unseen = |m: &crate::assets::ObjectModel| m.technical && !extras.show_technical || crate::render::hidden_layer(m, &extras); + + // 1. Evaluate candidate objects across all tiles + for (k, t) in doc.tiles.iter() { + for ob in t.tile.objects.iter().chain(&t.tile.attach_objects) { + if snap_objects.iter().any(|(sk, sid)| sk == k && *sid == ob.id) { + continue; + } + let Some(model) = assets.object(&ob.file) else { continue }; + if unseen(&model) { + continue; + } + let world = doc.object_world(*k, ob, model.abs_height); + if (world - o).length() > max_dist + 100.0 { + continue; + } + + let edges = Self::object_edges_for_snap(doc, assets, *k, ob.id); + for e in edges { + if let Some((lat, along, p)) = ray_near_edge(o, dir, e[0], e[1]) { + if along <= 0.1 || along > max_dist { + continue; + } + if let Some(gd) = ground_dist { + if along > gd + 3.0 && p.z < g.unwrap().z - 0.5 { + continue; + } + } + let ang = lat / along; + if ang > 0.045 { + continue; + } + let score = ang + (along / 100.0) * 0.015; + if score < best_score { + best_score = score; + best_edge = Some((e, p)); + } + } + } + } + } + + // 2. Road splines (centerline and curb edges) + for (k, t) in doc.tiles.iter() { + for sp in t.tile.splines.iter().filter(|s| !s.deleted) { + let curve = omsi_geometry::SplineCurve::from_map(sp, tile_origin(*k)); + let step = 8.0f64; + let n = (sp.length / step).ceil().max(1.0) as usize; + let (sx0, sx1) = assets.spline(&sp.file).map(|m| { + let (x0, x1, _, _) = m.surface_span(); + if sp.mirror { (-(x1 as f64), -(x0 as f64)) } else { (x0 as f64, x1 as f64) } + }).unwrap_or((0.0, 0.0)); + let has_width = (sx1 - sx0).abs() > 0.05; + + for i in 0..n { + let s0 = sp.length * i as f64 / n as f64; + let s1 = sp.length * (i + 1) as f64 / n as f64; + let p0 = curve.point_at(s0); + let p1 = curve.point_at(s1); + + // Centerline segment + if let Some((lat, along, p)) = ray_near_edge(o, dir, p0, p1) { + if along > 0.1 && along <= max_dist { + if let Some(gd) = ground_dist { + if along > gd + 3.0 && p.z < g.unwrap().z - 0.5 { + continue; + } + } + let ang = lat / along; + if ang <= 0.045 { + let score = ang + (along / 100.0) * 0.015; + if score < best_score { + best_score = score; + best_edge = Some(([p0, p1], p)); + } + } + } + } + + if has_width { + let h0 = curve.heading_at(s0).to_radians(); + let h1 = curve.heading_at(s1).to_radians(); + let r0 = DVec3::new(h0.cos(), -h0.sin(), 0.0); + let r1 = DVec3::new(h1.cos(), -h1.sin(), 0.0); + let left_0 = p0 + r0 * sx0; + let left_1 = p1 + r1 * sx0; + let right_0 = p0 + r0 * sx1; + let right_1 = p1 + r1 * sx1; + + if let Some((lat, along, p)) = ray_near_edge(o, dir, left_0, left_1) { + if along > 0.1 && along <= max_dist { + if let Some(gd) = ground_dist { + if along > gd + 3.0 && p.z < g.unwrap().z - 0.5 { + continue; + } + } + let ang = lat / along; + if ang <= 0.045 { + let score = ang + (along / 100.0) * 0.015; + if score < best_score { + best_score = score; + best_edge = Some(([left_0, left_1], p)); + } + } + } + } + if let Some((lat, along, p)) = ray_near_edge(o, dir, right_0, right_1) { + if along > 0.1 && along <= max_dist { + if let Some(gd) = ground_dist { + if along > gd + 3.0 && p.z < g.unwrap().z - 0.5 { + continue; + } + } + let ang = lat / along; + if ang <= 0.045 { + let score = ang + (along / 100.0) * 0.015; + if score < best_score { + best_score = score; + best_edge = Some(([right_0, right_1], p)); + } + } + } + } + } + } + } + } + } + + best_edge + } + + /// Apply edge-to-edge alignment (rotation and translation) to the selected objects. + pub fn apply_edge_snap( + &mut self, + assets: &mut Assets, + source: [DVec3; 2], + target: [DVec3; 2], + target_hit: DVec3, + shift: bool, + ) { + let snap_objects = self.edge_snap.as_ref().map(|s| s.objects.clone()).unwrap_or_default(); + let mut sels = self.selection(); + if sels.is_empty() && !snap_objects.is_empty() { + sels = snap_objects.iter().map(|&(k, id)| Sel::Object(k, id)).collect(); + } + if sels.is_empty() { + return; + } + let Some(doc) = self.doc.as_mut() else { return }; + let from: Vec = sels.iter().filter_map(|s| crate::selection::origin_of(doc, *s)).collect(); + if from.is_empty() { + return; + } + + let d0 = (target_hit - target[0]).length(); + let d1 = (target_hit - target[1]).length(); + let snap_p = if d0 < 1.0 { + target[0] + } else if d1 < 1.0 { + target[1] + } else { + target_hit + }; + + let u_a = (source[1] - source[0]).truncate(); + let u_b = (target[1] - target[0]).truncate(); + + let deg = if u_a.length_squared() < 1e-6 || u_b.length_squared() < 1e-6 { + 0.0 + } else { + let h_a = roads::heading_of(u_a); + let h_b = roads::heading_of(u_b); + let diff1 = (h_b - h_a + 540.0).rem_euclid(360.0) - 180.0; + let diff2 = (h_b + 180.0 - h_a + 540.0).rem_euclid(360.0) - 180.0; + if diff1.abs() <= diff2.abs() { + diff1 + } else { + diff2 + } + }; + + let pivot = source[0].truncate(); + let delta_xy = (snap_p - source[0]).truncate(); + let delta_z = if shift { 0.0 } else { snap_p.z - source[0].z }; + + self.history.begin(tr("Snap edge to edge", "Привязка ребра к ребру")); + let moved = crate::selection::transform(doc, &mut self.history, &from, pivot, deg, delta_xy); + + for s in &moved { + if let Sel::Object(k, id) = *s { + self.history.touch_tile(doc, k); + let (abs, pos_xy) = match doc.tiles.get(&k).and_then(|t| t.tile.objects.iter().chain(&t.tile.attach_objects).find(|o| o.id == id)) { + Some(o) => ( + assets.object(&o.file).map(|m| m.abs_height).unwrap_or(false), + [o.pos[0], o.pos[1]], + ), + None => continue, + }; + let z_adj = if abs { + delta_z + } else { + let p_new = glam::DVec2::new(tile_origin(k).x + pos_xy[0], tile_origin(k).y + pos_xy[1]); + let p_old = from.iter().find(|o| o.sel == Sel::Object(k, id)).map(|o| o.pos).unwrap_or(p_new - delta_xy); + let ground_old = doc.ground(p_old); + let ground_new = doc.ground(p_new); + delta_z + (ground_old - ground_new) + }; + if let Some(o) = doc.object_mut(k, id) { + o.parent_id = None; + o.pos[2] += z_adj; + } else if let Some(t) = doc.tiles.get_mut(&k) { + if let Some(o) = t.tile.attach_objects.iter_mut().find(|o| o.id == id) { + o.parent_id = None; + o.pos[2] += z_adj; + } + } + if let Some(t) = doc.tiles.get_mut(&k) { + t.touch_content(); + } + } + } + + self.selected = moved.first().copied(); + self.also = moved.into_iter().skip(1).collect(); + self.history.commit(); + } + + /// Candidate snap edges for an object: mesh edges, or 12 bounding box edges if no mesh exists. + pub fn object_edges_for_snap(doc: &Document, assets: &mut Assets, k: TileKey, id: i64) -> Vec<[DVec3; 2]> { + let Some(o) = doc.tiles.get(&k).and_then(|t| t.tile.objects.iter().chain(&t.tile.attach_objects).find(|o| o.id == id)) else { return Vec::new() }; + let abs = assets.object(&o.file).map(|m| m.abs_height).unwrap_or(false); + let world = doc.object_world(k, o, abs); + let pose = crate::place::Pose::of_object(world, o.rot); + let mut out = Vec::new(); + + if let Some(model) = assets.object(&o.file) { + // Add mesh edges from all parts + let mut mesh_edges = Vec::with_capacity(32768); + let mut seen_edges = std::collections::HashSet::with_capacity(32768); + + for (part_idx, part) in model.parts.iter().enumerate() { + let pos = &part.mesh.positions; + let indices = &part.mesh.indices; + if indices.len() >= 3 { + for tri in indices.chunks_exact(3) { + let idxs = [tri[0] as usize, tri[1] as usize, tri[2] as usize]; + if idxs[0] < pos.len() && idxs[1] < pos.len() && idxs[2] < pos.len() { + let pairs = [(idxs[0], idxs[1]), (idxs[1], idxs[2]), (idxs[2], idxs[0])]; + for (a, b) in pairs { + let key = (part_idx, if a < b { (a, b) } else { (b, a) }); + if seen_edges.insert(key) { + let pa = world + pose.rot.transform_vector3(pos[a]).as_dvec3(); + let pb = world + pose.rot.transform_vector3(pos[b]).as_dvec3(); + if (pa - pb).length_squared() > 1e-4 { + mesh_edges.push([pa, pb]); + } + } + if mesh_edges.len() >= 200_000 { + break; + } + } + } + if mesh_edges.len() >= 200_000 { + break; + } + } + } + if mesh_edges.len() >= 200_000 { + break; + } + } + + if !mesh_edges.is_empty() { + out.extend(mesh_edges); + } else { + // Fall back to the 12 bounding box edges ONLY if the model has no triangle mesh + let (lo, hi) = (model.lo, model.hi); + let corner = |x: f32, y: f32, z: f32| -> DVec3 { + world + pose.rot.transform_vector3(glam::Vec3::new(x, y, z)).as_dvec3() + }; + + let c000 = corner(lo.x, lo.y, lo.z); + let c100 = corner(hi.x, lo.y, lo.z); + let c110 = corner(hi.x, hi.y, lo.z); + let c010 = corner(lo.x, hi.y, lo.z); + + let c001 = corner(lo.x, lo.y, hi.z); + let c101 = corner(hi.x, lo.y, hi.z); + let c111 = corner(hi.x, hi.y, hi.z); + let c011 = corner(lo.x, hi.y, hi.z); + + // 4 bottom edges + out.push([c000, c100]); + out.push([c100, c110]); + out.push([c110, c010]); + out.push([c010, c000]); + + // 4 top edges + out.push([c001, c101]); + out.push([c101, c111]); + out.push([c111, c011]); + out.push([c011, c001]); + + // 4 vertical pillar edges + out.push([c000, c001]); + out.push([c100, c101]); + out.push([c110, c111]); + out.push([c010, c011]); + } + } + out + } + /// Take a `[splineAttachement]` record off its road: it becomes a free object where its /// first copy stood, keeping its IDCode. A record of several copies becomes one object. pub fn detach_attachment(&mut self, k: TileKey, id: i64) -> Result<(), &'static str> { @@ -15349,4 +16413,169 @@ mod tests { } ed.grab_cancel(); } + + #[test] + fn test_vertex_to_vertex_snap() { + let mut doc = flat_map(1); + add_object(&mut doc, (0, 0), 1, 100.0, 100.0); + add_object(&mut doc, (0, 0), 2, 120.0, 150.0); + let mut ed = Editor::default(); + ed.open(doc); + let mut assets = Assets::new(std::env::temp_dir().join("openmapper-no-omsi"), std::env::temp_dir().join("openmapper-no-content")); + + // Select object 1 + ed.select(Some(Sel::Object((0, 0), 1))); + assert_eq!(ed.free_selected(), vec![((0, 0), 1)]); + + // Start vertex snapping + ed.start_vertex_snap(); + assert!(ed.vertex_snap.is_some()); + assert_eq!(ed.vertex_snap.as_ref().unwrap().stage, VertexSnapStage::PickSource); + + // Advance to PickTarget with source vertex at (100.0, 100.0, 0.0) + let source = DVec3::new(100.0, 100.0, 0.0); + ed.vertex_snap.as_mut().unwrap().hover = Some(source); + let lib = crate::library::Library::default(); + ed.left_press(&mut assets, &lib, false); + assert_eq!(ed.vertex_snap.as_ref().unwrap().stage, VertexSnapStage::PickTarget { source }); + + // Hover over target vertex at (120.0, 150.0, 5.0) and click + let target = DVec3::new(120.0, 150.0, 5.0); + ed.vertex_snap.as_mut().unwrap().hover = Some(target); + ed.left_press(&mut assets, &lib, false); + + // In 2-point orient snap, point 1 translates the object and enters PickSource2 + assert!(matches!(ed.vertex_snap.as_ref().unwrap().stage, VertexSnapStage::PickSource2 { anchor } if anchor == target)); + + // Pressing Esc / cancel finishes translation + ed.cancel_vertex_snap(); + assert!(ed.vertex_snap.is_none()); + + // Check object 1 position moved by (20.0, 50.0, 5.0) + let d = ed.doc.as_ref().unwrap(); + let o = d.object((0, 0), 1).unwrap(); + assert_eq!((o.pos[0].round(), o.pos[1].round()), (120.0, 150.0)); + assert!((o.pos[2] - 5.0).abs() < 1e-4); + + // Test Undo + ed.undo(); + let d = ed.doc.as_ref().unwrap(); + let o = d.object((0, 0), 1).unwrap(); + assert_eq!((o.pos[0].round(), o.pos[1].round()), (100.0, 100.0)); + assert!((o.pos[2] - 0.0).abs() < 1e-4); + + // Test full 2-point orient alignment (translation + rotation) + ed.select(Some(Sel::Object((0, 0), 1))); + ed.start_vertex_snap(); + ed.vertex_snap.as_mut().unwrap().hover = Some(source); + ed.left_press(&mut assets, &lib, false); + ed.vertex_snap.as_mut().unwrap().hover = Some(target); + ed.left_press(&mut assets, &lib, false); + // Now at PickSource2 with anchor = target (120, 150, 5) + // Pick 2nd point on object east of anchor: (130, 150, 5) -> baseline vector (10, 0) + let src2 = DVec3::new(130.0, 150.0, 5.0); + ed.vertex_snap.as_mut().unwrap().hover = Some(src2); + ed.left_press(&mut assets, &lib, false); + assert!(matches!(ed.vertex_snap.as_ref().unwrap().stage, VertexSnapStage::PickTarget2 { anchor, source2 } if anchor == target && source2 == src2)); + + // Pick target 2 north of anchor: (120, 160, 5) -> target vector (0, 10) + let tgt2 = DVec3::new(120.0, 160.0, 5.0); + ed.vertex_snap.as_mut().unwrap().hover = Some(tgt2); + ed.left_press(&mut assets, &lib, false); + // Snapping and orientation alignment completed + assert!(ed.vertex_snap.is_none()); + + // Check object rotated around pivot + let d = ed.doc.as_ref().unwrap(); + let o = d.object((0, 0), 1).unwrap(); + // Baseline heading (10, 0) is 90 deg. Target heading (0, 10) is 0 deg. + // Difference is -90 deg (270 deg). Heading should change by 270 deg. + assert!((o.rot[0] - 270.0).abs() < 1e-3 || (o.rot[0] + 90.0).abs() < 1e-3); + + // Test Shift (horizontal only snapping) + ed.select(Some(Sel::Object((0, 0), 1))); + ed.start_vertex_snap(); + let o_pos = ed.doc.as_ref().unwrap().object((0, 0), 1).unwrap().pos; + let cur_source = DVec3::from(o_pos); + ed.vertex_snap.as_mut().unwrap().hover = Some(cur_source); + ed.left_press(&mut assets, &lib, false); + let tgt3 = DVec3::new(200.0, 200.0, 50.0); + ed.vertex_snap.as_mut().unwrap().hover = Some(tgt3); + // Press with shift = true + ed.left_press(&mut assets, &lib, true); + ed.cancel_vertex_snap(); + assert!(ed.vertex_snap.is_none()); + + let d = ed.doc.as_ref().unwrap(); + let o = d.object((0, 0), 1).unwrap(); + assert_eq!((o.pos[0].round(), o.pos[1].round()), (200.0, 200.0)); + // Z should remain same because shift keeps horizontal only + assert!((o.pos[2] - cur_source.z).abs() < 1e-4); + } + + #[test] + fn test_edge_to_edge_snap() { + let mut doc = flat_map(1); + add_object(&mut doc, (0, 0), 1, 100.0, 100.0); + add_object(&mut doc, (0, 0), 2, 150.0, 200.0); + let mut ed = Editor::default(); + ed.open(doc); + let mut assets = Assets::new(std::env::temp_dir().join("openmapper-no-omsi"), std::env::temp_dir().join("openmapper-no-content")); + + // Select object 1 + ed.select(Some(Sel::Object((0, 0), 1))); + assert_eq!(ed.free_selected(), vec![((0, 0), 1)]); + + // Start edge snapping + ed.start_edge_snap(); + assert!(ed.edge_snap.is_some()); + assert_eq!(ed.edge_snap.as_ref().unwrap().stage, EdgeSnapStage::PickSource); + + // Pick source edge: (100.0, 100.0, 0.0) -> (110.0, 100.0, 0.0) (heading 90 deg) + let src_edge = [DVec3::new(100.0, 100.0, 0.0), DVec3::new(110.0, 100.0, 0.0)]; + ed.edge_snap.as_mut().unwrap().hover = Some((src_edge, DVec3::new(102.0, 100.0, 0.0))); + let lib = crate::library::Library::default(); + ed.left_press(&mut assets, &lib, false); + assert_eq!(ed.edge_snap.as_ref().unwrap().stage, EdgeSnapStage::PickTarget { source: src_edge }); + + // Hover over target edge: (150.0, 200.0, 4.0) -> (150.0, 210.0, 4.0) (heading 0 deg) + let tgt_edge = [DVec3::new(150.0, 200.0, 4.0), DVec3::new(150.0, 210.0, 4.0)]; + ed.edge_snap.as_mut().unwrap().hover = Some((tgt_edge, DVec3::new(150.0, 200.2, 4.0))); + ed.left_press(&mut assets, &lib, false); + + // Edge snap completed + assert!(ed.edge_snap.is_none()); + + // Check object 1 moved to target and rotated -90 deg (270 deg) + let d = ed.doc.as_ref().unwrap(); + let o = d.object((0, 0), 1).unwrap(); + assert_eq!((o.pos[0].round(), o.pos[1].round()), (150.0, 200.0)); + assert!((o.pos[2] - 4.0).abs() < 1e-4); + assert!((o.rot[0] - 270.0).abs() < 1e-4); + + // Test Undo + ed.undo(); + let d = ed.doc.as_ref().unwrap(); + let o = d.object((0, 0), 1).unwrap(); + assert_eq!((o.pos[0].round(), o.pos[1].round()), (100.0, 100.0)); + assert!((o.pos[2] - 0.0).abs() < 1e-4); + assert!((o.rot[0] - 0.0).abs() < 1e-4); + + // Test Shift (horizontal only snapping) + ed.select(Some(Sel::Object((0, 0), 1))); + ed.start_edge_snap(); + ed.edge_snap.as_mut().unwrap().hover = Some((src_edge, DVec3::new(102.0, 100.0, 0.0))); + ed.left_press(&mut assets, &lib, false); + ed.edge_snap.as_mut().unwrap().hover = Some((tgt_edge, DVec3::new(150.0, 200.2, 4.0))); + // Press with shift = true + ed.left_press(&mut assets, &lib, true); + assert!(ed.edge_snap.is_none()); + + let d = ed.doc.as_ref().unwrap(); + let o = d.object((0, 0), 1).unwrap(); + assert_eq!((o.pos[0].round(), o.pos[1].round()), (150.0, 200.0)); + // Z should remain 0 because shift keeps horizontal only + assert!((o.pos[2] - 0.0).abs() < 1e-4); + assert!((o.rot[0] - 270.0).abs() < 1e-4); + } } diff --git a/src/ui.rs b/src/ui.rs index 2345f1e..892d507 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -1277,6 +1277,26 @@ fn toolbar(root: &mut egui::Ui, st: &mut UiState, ed: &mut Editor, can_undo: boo ed.xform = if ed.xform == x { crate::editor::Xform::Select } else { x }; } } + let snap_on = ed.vertex_snap.is_some(); + let r = tool_button(ui, Icon::Focus, snap_on, true); + help(st, &r, tr("Snap vertex to vertex (V)", "Привязать вершину к вершине (V)")); + if r.clicked() { + if snap_on { + ed.cancel_vertex_snap(); + } else { + ed.start_vertex_snap(); + } + } + let edge_snap_on = ed.edge_snap.is_some(); + let r_edge = tool_button(ui, Icon::Line, edge_snap_on, true); + help(st, &r_edge, tr("Snap edge to edge (L)", "Привязать ребро к ребру (L)")); + if r_edge.clicked() { + if edge_snap_on { + ed.cancel_edge_snap(); + } else { + ed.start_edge_snap(); + } + } } } ui.separator(); @@ -1456,6 +1476,33 @@ fn tool_panel( Frame::new().inner_margin(Margin::same(8)).show(ui, |ui| match ed.tool { Tool::Roads => catalogue(ui, st, ed, lib, thumbs, wanted, Kind::Spline, actions), Tool::Objects => { + if ed.selection().iter().any(|s| matches!(s, Sel::Object(..))) { + ui.horizontal_wrapped(|ui| { + let snap_on = ed.vertex_snap.is_some(); + if ui.add(egui::Button::new(icons::labelled(Icon::Focus, tr("Snap vertex (V)", "Привязать вершину (V)"))).selected(snap_on)) + .on_hover_text(tr("Snap a vertex of this object to another vertex (Shortcut: V)", "Привязать вершину объекта к другой вершине (Горячая клавиша: V)")) + .clicked() + { + if snap_on { + ed.cancel_vertex_snap(); + } else { + ed.start_vertex_snap(); + } + } + let edge_on = ed.edge_snap.is_some(); + if ui.add(egui::Button::new(icons::labelled(Icon::Line, tr("Snap edge (L)", "Привязать ребро (L)"))).selected(edge_on)) + .on_hover_text(tr("Snap an edge of this object to another edge or road (Shortcut: L)", "Привязать ребро объекта к другому ребру или дороге (Горячая клавиша: L)")) + .clicked() + { + if edge_on { + ed.cancel_edge_snap(); + } else { + ed.start_edge_snap(); + } + } + }); + ui.add_space(4.0); + } egui::CollapsingHeader::new(RichText::new(tr("Shapes and lamps", "Фигуры и светильники")).strong()).id_salt("shapes").default_open(false).show(ui, |ui| { crate::ui_mesh::primitives_grid(ui, actions); crate::ui_mesh::lamp_makers(ui, &mut st.signal_lamps, actions); @@ -1507,6 +1554,33 @@ fn tool_panel( } ui.label(RichText::new(tr("Click an object or a road in the view to see and change it on the right.", "Кликните объект или дорогу в окне вида: свойства появятся справа.")).color(TEXT_DIM)); ui.add_space(8.0); + if ed.selection().iter().any(|s| matches!(s, Sel::Object(..))) { + ui.horizontal_wrapped(|ui| { + let snap_on = ed.vertex_snap.is_some(); + if ui.add(egui::Button::new(icons::labelled(Icon::Focus, tr("Snap vertex (V)", "Привязать вершину (V)"))).selected(snap_on)) + .on_hover_text(tr("Snap a vertex of this object to another vertex (Shortcut: V)", "Привязать вершину объекта к другой вершине (Горячая клавиша: V)")) + .clicked() + { + if snap_on { + ed.cancel_vertex_snap(); + } else { + ed.start_vertex_snap(); + } + } + let edge_on = ed.edge_snap.is_some(); + if ui.add(egui::Button::new(icons::labelled(Icon::Line, tr("Snap edge (L)", "Привязать ребро (L)"))).selected(edge_on)) + .on_hover_text(tr("Snap an edge of this object to another edge or road (Shortcut: L)", "Привязать ребро объекта к другому ребру или дороге (Горячая клавиша: L)")) + .clicked() + { + if edge_on { + ed.cancel_edge_snap(); + } else { + ed.start_edge_snap(); + } + } + }); + ui.add_space(8.0); + } for t in Tool::ALL.iter().skip(1) { if ui.add(egui::Button::new(icons::labelled(t.icon(), t.label())).shortcut_text(t.key()).min_size(Vec2::new(ui.available_width(), 24.0))).clicked() { ed.set_tool(*t); @@ -2270,6 +2344,10 @@ fn properties(ui: &mut egui::Ui, st: &mut UiState, ed: &mut Editor, lib: &Librar let mut replace_obj: Option = None; let mut detach_road = false; let mut arm_attach: Option = None; + let mut toggle_vertex_snap = false; + let mut toggle_edge_snap = false; + let v_armed = ed.vertex_snap.is_some(); + let e_armed = ed.edge_snap.is_some(); // (an attached object's place on its road, its row's shape, and its world rotation) let mut new_att: Option<(Option, Option, Option)> = None; let mut new_row: Option<(Option, Option, Option)> = None; @@ -2431,6 +2509,20 @@ fn properties(ui: &mut egui::Ui, st: &mut UiState, ed: &mut Editor, lib: &Librar arm_attach = Some(!armed); } } + ui.horizontal_wrapped(|ui| { + if ui.add(egui::Button::new(icons::labelled(Icon::Focus, tr("Snap vertex (V)", "Привязать вершину (V)"))).selected(v_armed)) + .on_hover_text(tr("Snap a vertex of this object to another vertex (Shortcut: V)", "Привязать вершину объекта к другой вершине (Горячая клавиша: V)")) + .clicked() + { + toggle_vertex_snap = true; + } + if ui.add(egui::Button::new(icons::labelled(Icon::Line, tr("Snap edge (L)", "Привязать ребро (L)"))).selected(e_armed)) + .on_hover_text(tr("Snap an edge of this object to another edge or road (Shortcut: L)", "Привязать ребро объекта к другому ребру или дороге (Горячая клавиша: L)")) + .clicked() + { + toggle_edge_snap = true; + } + }); let is_stop = a.map(|a| a.is_bus_stop).unwrap_or(false); let is_entry = a.map(|a| a.is_entry_point).unwrap_or(false); if is_entry { @@ -2713,6 +2805,20 @@ fn properties(ui: &mut egui::Ui, st: &mut UiState, ed: &mut Editor, lib: &Librar ed.attach_to.clear(); } } + if toggle_vertex_snap { + if v_armed { + ed.cancel_vertex_snap(); + } else { + ed.start_vertex_snap(); + } + } + if toggle_edge_snap { + if e_armed { + ed.cancel_edge_snap(); + } else { + ed.start_edge_snap(); + } + } // (an object's rules only where it has paths, or rules already) let has_paths = match sel { Sel::Object(k, id) => { diff --git a/src/ui_edit.rs b/src/ui_edit.rs index 57cdb96..629c5b5 100644 --- a/src/ui_edit.rs +++ b/src/ui_edit.rs @@ -394,6 +394,28 @@ pub fn group_properties(ui: &mut egui::Ui, ed: &mut Editor, lib: &Library, paren ed.arm_attach(free); } } + let snap_armed = ed.vertex_snap.is_some(); + if ui.add(egui::Button::new(icons::labelled(Icon::Focus, tr("Snap vertex to vertex (V)", "Привязать вершину к вершине (V)"))).selected(snap_armed)) + .on_hover_text(tr("Snap a vertex of the selected object to a vertex of another object (V)\nShift: Horizontal only, Esc/Right-click: Cancel", "Привязать вершину выбранного объекта к вершине другого объекта (V)\nShift: только по горизонтали, Esc/ПКМ: отмена")) + .clicked() + { + if snap_armed { + ed.cancel_vertex_snap(); + } else { + ed.start_vertex_snap(); + } + } + let edge_snap_armed = ed.edge_snap.is_some(); + if ui.add(egui::Button::new(icons::labelled(Icon::Line, tr("Snap edge to edge (L)", "Привязать ребро к ребру (L)"))).selected(edge_snap_armed)) + .on_hover_text(tr("Align an edge of the selected object to an edge or road (L)\nRotates and snaps collinear\nShift: Horizontal only, Esc/Right-click: Cancel", "Выровнять ребро выбранного объекта по ребру или дороге (L)\nПоворачивает и привязывает по линии\nShift: только по горизонтали, Esc/ПКМ: отмена")) + .clicked() + { + if edge_snap_armed { + ed.cancel_edge_snap(); + } else { + ed.start_edge_snap(); + } + } } if ui.button(icons::labelled(Icon::Flatten, tr("Level the ground under them", "Выровнять землю под ними"))).on_hover_text(tr("Each one's outline made level with its foot, blending into the ground 3 m round it", "Под каждым — ровно на уровне его основания, с плавным переходом 3 м вокруг")).clicked() { ed.level_request = true; diff --git a/src/ui_palette.rs b/src/ui_palette.rs index fb40eba..deeba79 100644 --- a/src/ui_palette.rs +++ b/src/ui_palette.rs @@ -73,6 +73,20 @@ fn commands() -> Vec { cmd!(Icon::Junction, "Complex junction editor…", "Редактор сложных перекрёстков…", "custom junction top view splines markings кастомный перекрёсток вид сверху разметка", "", |_, _, a| a.push(Action::ComplexJunctions)), cmd!(Icon::Layers, "PBR maps for a picture…", "PBR-карты для картинки…", "normal roughness нормали", "", |_, _, a| a.push(Action::PbrMaker)), cmd!(Icon::Road, "Knife: cut roads", "Нож: разрезать дороги", "cut split knife road spline разрезать разделить дорогу сплайн", "K", |_, ed, _| ed.toggle_cutting()), + cmd!(Icon::Focus, "Snap vertex to vertex", "Привязать вершину к вершине", "snap vertex align object привязка вершина", "V", |_, ed, _| { + if ed.vertex_snap.is_some() { + ed.cancel_vertex_snap(); + } else { + ed.start_vertex_snap(); + } + }), + cmd!(Icon::Line, "Snap edge to edge", "Привязать ребро к ребру", "snap edge align line object привязка ребро линия", "L", |_, ed, _| { + if ed.edge_snap.is_some() { + ed.cancel_edge_snap(); + } else { + ed.start_edge_snap(); + } + }), cmd!(Icon::Flag, "Ruler", "Линейка", "measure distance gradient измерить расстояние уклон", "U", |_, ed, _| ed.toggle_ruler()), // Map cmd!(Icon::Settings, "Map settings…", "Настройки карты…", "money tickets depot years seasons деньги билеты депо годы", "", |_, _, a| a.push(Action::MapSettings)),