geometor.model.element

Element type ElementDetails class intersection functions

class geometor.model.element.Element(sympy_obj, parents: list | None = None, classes: list[str] | None = None, label: str = '')[source]

Bases: object

a container for special attributes of an element of a model that are not supported by the SymPy elements

parameters

  • sympy_obj :

    The sympy object representing the geometric entity.

  • parentslist[objects]

    A list of parent elements (default is None).

  • classeslist[str]

    A list of class labels (default is None).

  • labelstr
    • A string label for the element

    • if label is none, a label is generated

    • is used as a reference in reports and plots

attributes

  • labelstr

    name used in presentation and reports

  • classesdict

    dict with strings for class name

  • parentsdict

    dict with keys as parent sympy objects

class geometor.model.element.CircleElement(sympy_obj: Circle, pt_radius: Point, parents: list | None = None, classes: list[str] | None = None, label: str = '')[source]

Bases: Element

same as Element but adds a pt_radius

parameters

  • sympy_obj :

    The sympy object representing the geometric entity.

  • pt_radiusspg.Point

    A list of parent elements (default is None).

  • parentslist[objects]

    A list of parent elements (default is None).

  • classeslist[str]

    A list of class labels (default is None).

  • labelstr
    • A string label for the element

    • if label is none, a label is generated

    • is used as a reference in reports and plots

attributes

  • labelstr

    name used in presentation and reports

  • classesdict

    dict with strings for class name

  • parentsdict

    dict with keys as parent sympy objects

geometor.model.element.check_existence(self, struct: Line | Circle, existing_structs: list[Line | Circle]) tuple[bool, Line | Circle][source]

Check if a geometric structure exists in the model.

geometor.model.element.find_all_intersections(self, struct: Line | Circle) None[source]

find all intersections in the model for the given struct

geometor.model.element.find_intersection(test_tuple: tuple) tuple[source]

find intersection for two structs