Geometry3D.calc package

Submodules

Geometry3D.calc.acute module

Acute Module

Geometry3D.calc.acute.acute(rad)[source]

Input:

  • rad: A angle in rad.

Output:

If the given angle is >90 (pi/2), return the opposite angle.

Return the angle else.

Geometry3D.calc.angle module

Angle Module

Geometry3D.calc.angle.angle(a, b)[source]

Input:

  • a: Line/Plane/Plane/Vector

  • b: Line/Line/Plane/Vector

Output:

The angle (in radians) between

  • Line/Line

  • Plane/Line

  • Plane/Plane

  • Vector/Vector

Geometry3D.calc.angle.parallel(a, b)[source]

Input:

  • a:Line/Plane/Plane/Vector

  • b:Line/Line/Plane/Vector

Output:

A boolean of whether the two objects are parallel. This can check

  • Line/Line

  • Plane/Line

  • Plane/Plane

  • Vector/Vector

Geometry3D.calc.angle.orthogonal(a, b)[source]

Input:

  • a:Line/Plane/Plane/Vector

  • b:Line/Line/Plane/Vector

Output:

A boolean of whether the two objects are orthogonal. This can check

  • Line/Line

  • Plane/Line

  • Plane/Plane

  • Vector/Vector

Geometry3D.calc.aux_calc module

Auxilary Calculation Module.

Auxilary calculation functions for calculating intersection

Geometry3D.calc.aux_calc.get_projection_length(v1, v2)[source]

Input:

  • v1: Vector

  • v2: Vector

Output:

The length of vector that v1 projected on v2

Geometry3D.calc.aux_calc.get_relative_projection_length(v1, v2)[source]

Input:

  • v1: Vector

  • v2: Vector

Output:

The ratio of length of vector that v1 projected on v2 and the length of v2

Geometry3D.calc.aux_calc.get_segment_from_point_list(point_list)[source]

Input:

  • point_list: a list of Points

Output:

The longest segment between the points

Geometry3D.calc.aux_calc.get_segment_convexpolyhedron_intersection_point_set(s, cph)[source]

Input:

  • s: Segment

  • cph: ConvexPolyhedron

Output:

A set of intersection points

Geometry3D.calc.aux_calc.get_segment_convexpolygon_intersection_point_set(s, cpg)[source]

Input:

  • s: Segment

  • cpg: ConvexPolygon

Output:

A set of intersection points

Geometry3D.calc.aux_calc.get_halfline_convexpolyhedron_intersection_point_set(h, cph)[source]

Input:

  • h: HalfLine

  • cph: ConvexPolyhedron

Output:

A set of intersection points

Geometry3D.calc.aux_calc.points_in_a_line(points)[source]

Input:

  • points: Tuple or list of Points

Output:

A set of intersection points

Geometry3D.calc.distance module

Distance Module

Geometry3D.calc.distance.distance(a, b)[source]

Input:

  • a: Point/Line/Line/Plane/Plane

  • b: Point/Point/Line/Point/Line

Output:

Returns the distance between two objects. This includes

  • Point/Point

  • Line/Point

  • Line/Line

  • Plane/Point

  • Plane/Line

Geometry3D.calc.intersection module

Intersection Module

Geometry3D.calc.intersection.intersection(a, b)[source]

Input:

  • a: GeoBody or None

  • b: GeoBody or None

Output:

The Intersection.

Maybe None or GeoBody

Geometry3D.calc.volume module

Volume module

Geometry3D.calc.volume.volume(arg)[source]

Input:

  • arg: Pyramid or ConvexPolyhedron

Output:

Returns the object volume. This includes

  • Pyramid

  • ConvexPolyhedron

Module contents

Geometry3D.calc.distance(a, b)[source]

Input:

  • a: Point/Line/Line/Plane/Plane

  • b: Point/Point/Line/Point/Line

Output:

Returns the distance between two objects. This includes

  • Point/Point

  • Line/Point

  • Line/Line

  • Plane/Point

  • Plane/Line

Geometry3D.calc.intersection(a, b)[source]

Input:

  • a: GeoBody or None

  • b: GeoBody or None

Output:

The Intersection.

Maybe None or GeoBody

Geometry3D.calc.parallel(a, b)[source]

Input:

  • a:Line/Plane/Plane/Vector

  • b:Line/Line/Plane/Vector

Output:

A boolean of whether the two objects are parallel. This can check

  • Line/Line

  • Plane/Line

  • Plane/Plane

  • Vector/Vector

Geometry3D.calc.angle(a, b)[source]

Input:

  • a: Line/Plane/Plane/Vector

  • b: Line/Line/Plane/Vector

Output:

The angle (in radians) between

  • Line/Line

  • Plane/Line

  • Plane/Plane

  • Vector/Vector

Geometry3D.calc.orthogonal(a, b)[source]

Input:

  • a:Line/Plane/Plane/Vector

  • b:Line/Line/Plane/Vector

Output:

A boolean of whether the two objects are orthogonal. This can check

  • Line/Line

  • Plane/Line

  • Plane/Plane

  • Vector/Vector

Geometry3D.calc.volume(arg)[source]

Input:

  • arg: Pyramid or ConvexPolyhedron

Output:

Returns the object volume. This includes

  • Pyramid

  • ConvexPolyhedron

Geometry3D.calc.get_projection_length(v1, v2)[source]

Input:

  • v1: Vector

  • v2: Vector

Output:

The length of vector that v1 projected on v2

Geometry3D.calc.get_relative_projection_length(v1, v2)[source]

Input:

  • v1: Vector

  • v2: Vector

Output:

The ratio of length of vector that v1 projected on v2 and the length of v2

Geometry3D.calc.get_segment_from_point_list(point_list)[source]

Input:

  • point_list: a list of Points

Output:

The longest segment between the points

Geometry3D.calc.get_segment_convexpolyhedron_intersection_point_set(s, cph)[source]

Input:

  • s: Segment

  • cph: ConvexPolyhedron

Output:

A set of intersection points

Geometry3D.calc.get_segment_convexpolygon_intersection_point_set(s, cpg)[source]

Input:

  • s: Segment

  • cpg: ConvexPolygon

Output:

A set of intersection points

Geometry3D.calc.get_halfline_convexpolyhedron_intersection_point_set(h, cph)[source]

Input:

  • h: HalfLine

  • cph: ConvexPolyhedron

Output:

A set of intersection points

Geometry3D.calc.points_in_a_line(points)[source]

Input:

  • points: Tuple or list of Points

Output:

A set of intersection points