geometor.model package

Submodules

geometor.model.circles module

circles module

geometor.model.circles.circle(pt_c, pt_r)

make sympy.geometry.Circle from two points

geometor.model.common module

geometor.model.elements module

elements module

geometor.model.elements.add_intersection_points_mp(el)

geometor.model.lines module

lines module

geometor.model.lines.line(pt_a, pt_b)

make sympy.geometry.Line

geometor.model.lines.line_get_y(l1, x)

return y value for specific x

geometor.model.model module

Model module

class geometor.model.model.Model

Bases: list

Docstring for Model.

add_circle(struct: Circle, classes={}) Circle

add circle to model

add_line(struct: Line, classes=[]) Line

Add line to list. check for duplicates in elements. find intersection points for new element with all precedng elements

add_point(pt: Point, parents={}, classes=[]) Point

add point to model find duplicates clean values set parents and classes

circles()

filtered list of circles

gen_circle(pt_c: Point, pt_r: Point, classes=[]) Circle

create line object from points add_circle

gen_line(pt1: Point, pt2: Point, classes=[]) Line

create spg.Line object add add_line

gen_point(x_val, y_val, parents={}, classes=[]) Point

generate a sympy.geometry.Point

lines()

filtered list of lines

points() list

filter points from model :returns: list

structs()

filtered list of structs currently lines and circles

summary(name='')

geometor.model.points module

points module

geometor.model.points.compare_points(pt1, pt2)
geometor.model.points.get_pts_by_class(pts, classname)

find all points with specified classname

geometor.model.points.point(x_val, y_val)

make sympy.geometry.Point

geometor.model.points.point_value(pt)
geometor.model.points.sort_points(pts)

geometor.model.polygons module

polygons module

geometor.model.polygons.polygon(poly_pts, classes=[], style={})
  • takes array of points - make sympy.geometry.Polygon, Triangle or Segment

geometor.model.polygons.polygon_ids(ids, classes=[], style={})

create polygon from list of point ids

geometor.model.polygons.unit_square(pt, classes=[], style={})

creates a unit square from the reference point adds points and returns polygon

geometor.model.polynomials module

polynomials module

Module contents

Model Package

The Model module provides a set of tools for constructing geometric models. It relies heavily on sympy for providing the algebraic infrastructure the functions here are for creating the abstract model, not the rendering see the Render module for plotting with matplotlib

geometor.model.begin()

create inital two points - establishing the unit for the field

geometor.model.begin_zero()

create inital two points - establishing the unit for the field

geometor.model.bisect_lines(ln1, ln2)
geometor.model.bisect_pts(pt1, pt2)

use sympy function add prpoerties to line return line

geometor.model.bisect_pts2(pt1, pt2)

use circles but don’t add to model

geometor.model.bisector(pt1, pt2)

perform fundamental operations for two points and add perpendicular bisector

geometor.model.segment(pt_a, pt_b, classes=[], style={})

make sympy.geometry.Segment