Paar namens änderung rotation ausgegleicht falls nur as es element da ist man die rotation von dieser passt
This commit is contained in:
@@ -2,6 +2,7 @@ from pydantic import BaseModel, Field, field_validator
|
||||
from typing import Optional
|
||||
|
||||
class Bt_element(BaseModel):
|
||||
"""Das sind beide BTMT Elemente"""
|
||||
teileid: str
|
||||
drehung: Optional [float] = Field(default=0.0,description="Rotation des Elements")
|
||||
hoehe: Optional [float] = Field(default=0.0,description="Hoehe des Elements")
|
||||
|
||||
@@ -305,6 +305,30 @@ class VarioFoerderer(BaseModel):
|
||||
winkel_VP_offset_vorne = (SP_1_nachbar[0] -VP_1_nachbar[0] ),0,( SP_1_nachbar[2]- VP_1_nachbar[2])
|
||||
|
||||
return winkel_VP_offset_vorne,winkel_VP_offset_hinten
|
||||
def horizontale_ausrichtung(x, y, voerder_richtung, rotation, x0_kreisel, y0_kreisel):
|
||||
mit_horizontal_verbunden = "None"
|
||||
if voerder_richtung == "Horizontal":
|
||||
if rotation == 0.0:
|
||||
if y> y0_kreisel:
|
||||
mit_horizontal_verbunden = "unten_drehung_0_or_-90"
|
||||
else:
|
||||
mit_horizontal_verbunden = "oben_drehung_0_or_-90"
|
||||
if rotation == -180.0:
|
||||
if y> y0_kreisel:
|
||||
mit_horizontal_verbunden = "unten_drehung_-180_or_-270"
|
||||
else:
|
||||
mit_horizontal_verbunden = "oben_drehung_-180_or_-270"
|
||||
if rotation == -90.0:
|
||||
if x> x0_kreisel:
|
||||
mit_horizontal_verbunden = "unten_drehung_0_or_-90"
|
||||
else:
|
||||
mit_horizontal_verbunden = "oben_drehung_0_or_-90"
|
||||
if rotation == -270.0:
|
||||
if x> x0_kreisel:
|
||||
mit_horizontal_verbunden = "unten_drehung_-180_or_-270"
|
||||
else:
|
||||
mit_horizontal_verbunden = "oben_drehung_-180_or_-270"
|
||||
return mit_horizontal_verbunden
|
||||
def vario_verbuden_am_kreisel(foerderer, block_vario, start, ende, mit_horizontal_verbunden = None,kreisel_verbunden = None,am_kreisel = None,erster_kreisel_höher = None):
|
||||
lower_hoehe_vario = foerderer.h0
|
||||
upper_hoehe_vario = foerderer.h1
|
||||
|
||||
Reference in New Issue
Block a user