diff --git a/docs/build/html/_images/class_diagram.svg b/docs/build/html/_images/class_diagram.svg new file mode 100644 index 0000000..59afc29 --- /dev/null +++ b/docs/build/html/_images/class_diagram.svg @@ -0,0 +1,267 @@ +LegendCLASSexplicit attributederived attributeadditional attributestatic attributeTODOREPRESENTATION_ITEMname : stridn : int «generated»B_SPLINE_CURVE_FORMPOLYLINE_FORMCIRCULAR_ARCELLIPTIC_ARCPARABOLIC_ARCHYPERBOLIC_ARCUNSPECIFIEDKNOT_TYPEUNIFORM_KNOTSQUASI_UNIFORM_KNOTSPIECEWISE_BEZIER_KNOTSUNSPECIFIEDGEOMETRIC_REPRESENTATION_ITEMdim : intCARTESIAN_POINTcoordinates : tuple[float]VERTEX_POINTvertex_geometry : POINTDIRECTIONdirection_ratios : tuple[float]VECTORorientation : DIRECTIONmagnitude : floatEDGEedge_start : VERTEXedge_end : VERTEXLINEpnt : CARTESIAN_POINTdir : VECTORSURFACE_CURVEcurve_3d : CURVEassociated_geometry : strtuple[PCURVE, SURFACE]master_representation : strbasis_surface : Nonetuple[SURFACE]EDGE_CURVEedge_geometry : CURVEsame_sense : strPLACEMENTlocation : CARTESIAN_POINTAXIS2_PLACEMENT_2Dref_direction : DIRECTIONp : Nonetuple[DIRECTION]AXIS2_PLACEMENT_3Daxis : DIRECTIONref_direction : DIRECTIONp : Nonetuple[DIRECTION]CONICposition : Union[AXIS2_PLACEMENT_2D, AXIS_PLACEMENT_3D]CIRCLEradius : floatELLIPSEsemi_axis_1 : floatsemi_axis_2 : floatB_SPLINE_CURVEdegree : intcontrol_points_list : tuple[CARTESIAN_POINT]curve_form : strB_BLINE_CURVE_FORMclosed_curve : strboolself_intersect : strboolupper_index_on_control_points : intcontrol_points : tuple[CARTESIAN_POINT]B_SPLINE_CURVE_WITH_KNOTSknot_multiplicities : tuple[int]knots : tuple[float]knot_spec : strKNOT_TYPEupper_index_on_knots : intORIENTED_EDGEedge_element : EDGEorientation : stredge_start : VERTEXedge_end : VERTEXPATHedge_list : tuple[ORIENTED_EDGE]POINTCURVESEAM_CURVEBONDED_CURVETOPOLOGICAL_REPRESENTATION_ITEMVERTEXLOOPEDGE_LOOP \ No newline at end of file diff --git a/docs/build/html/_modules/pylib/data.html b/docs/build/html/_modules/pylib/data.html index 7b9a972..af51f1f 100644 --- a/docs/build/html/_modules/pylib/data.html +++ b/docs/build/html/_modules/pylib/data.html @@ -344,6 +344,26 @@ except: return '' +
[docs]def strs_between(text, left, right): + """Get text between two pattern. + + Text can be multi-line. + + :param text: text to search in + :type text: str + :param left: left pattern + :type left: str + :param right: right pattern + :type right: str + + :returns: text between the left and right pattern + :rtype: str + """ + try: + return re.findall(left+'(.+?)'+right, text, re.DOTALL) + except: + return ''
+
[docs]def str_to_list(string, delimiter=';\n', newline_replacement=''): r"""Converts a string with block information into a list. diff --git a/docs/build/html/_modules/pylib/data_step_std.html b/docs/build/html/_modules/pylib/data_step_std.html index 8aa8d8c..ffb1af3 100644 --- a/docs/build/html/_modules/pylib/data_step_std.html +++ b/docs/build/html/_modules/pylib/data_step_std.html @@ -35,6 +35,7 @@

Source code for pylib.data_step_std

 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
+# pylint: disable=invalid-name,too-few-public-methods
 """STEP Standard structure.
 
 :Date: 2020-01-03
@@ -85,26 +86,135 @@
 #     parentheses, separated by comma ",":
 # STEP Standard TYPE LIST: first index is 1.
 # STEP Standard TYPE ARRAY: first index is 0.
+from enum import Enum
 
-
[docs]def BOOLEAN_to_bool(boolean): - if boolean == ".T.": +# +# EXPRESS simple data types +# TODO: BINARY, NUMBER +# + +
[docs]class GENERIC: + """GENERIC + """
+ +
[docs]class STRING(str): + """EXPRESS Type STRING + + This is the most often used simple type. EXPRESS strings can be + of any length and can contain any character (ISO 10646/Unicode). + """
+ +
[docs]class INTEGER(int): + """EXPRESS Type INTEGER + + EXPRESS integers can have in principle any length, but most + implementations restricted them to a signed 32 bit value. + """
+ +
[docs]class REAL(float): + """EXPRESS Type REAL + + Ideally an EXPRESS real value is unlimited in accuracy and size. + But in practice a real value is represented by a floating point + value of type double. + """
+ +
[docs]def BOOLEAN(value): + """EXPRESS Type BOOLEAN with values TRUE and FALSE + + :param value: either ``.T.`` for a True value or ``.F.`` for a + False value + :type value: str + :raises: TypeError + """ + if value == ".T.": return True - elif boolean == ".F.": + if value == ".F.": return False - return boolean
+ raise ValueError
+ +
[docs]def LOGICAL(value): + """EXPRESS Type LOGICAL with values TRUE and FALSE and in addition + UNKNOWN + + :param value: either ``.T.`` for a True value or ``.F.`` for a + False value + :type value: str + """ + # TODO: how does the UNKNOWN value look like? + if value == ".T.": + return True + if value == ".F.": + return False + return None
+ +# +# EXPRESS aggregation data types +# BAG unordered -> ? +# TODO: find a data type for BAG? +# TODO: test if BAG have unset members? +# + +
[docs]class SET(set): + """EXPRESS Type SET + + SET are unordered. Contain a particular value more than once, is + not allowed. It is not possible to contain unset members. + + :param value: value + :type value: str + :param dtype: + :type dtype: + + :rtype: set + """
+ # TODO: test for unset members? + +
[docs]class LIST(tuple): + """EXPRESS Type LIST + + LIST are ordered. It is not possible to contain unset members. + + :param value: value + :type value: str + :param dtype: + :type dtype: + + :rtype: tuple + """
+ # TODO: test for unset members? + +
[docs]class ARRAY(tuple): + """EXPRESS Type ARRAY + + ARRAY are ordered. An ARRAY is the only aggregate that may + contain unset members. + + :param value: value + :type value: str + :param dtype: + :type dtype: + + :rtype: tuple + """
+ + +# +# STEP functions +#
[docs]def dimension_of(item): """STEP Standard FUNCTION dimension_of - :param item: STEP Standard TYPE GEOMETRIC_REPRESENTATION_ITEM + :param item: :type item: GEOMETRIC_REPRESENTATION_ITEM :returns: dim - :rtype: int or None + :rtype: Union[int, None] - :ivar dim: STEP Standard TYPE dimension_count (INTEGER). + :var dim: dimension_count dimension_count > 0 - :vartype dim: int + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_dimension_of.html @@ -170,19 +280,19 @@ """STEP Standard FUNCTION list_to_array :param lis: STEP Standard TYPE LIST [0:?] OF GENERIC - :type lis: tuple - :param low: STEP Standard TYPE INTEGER - :type low: int - :param u: STEP Standard TYPE INTEGER - :type u: int + :type lis: tuple[GENERIC, ...] + :param low: + :type low: INTEGER + :param u: + :type u: INTEGER :returns: res - :rtype: tuple or None + :rtype: Union[tuple, None] - :param n: STEP Standard TYPE INTEGER - :type n: int - :ivar res: STEP Standard TYPE ARRAY [low:u] OF GENERIC - :vartype res: tuple + :var n: + :vartype n: INTEGER + :var res: STEP Standard TYPE ARRAY [low:u] OF GENERIC + :vartype res: tuple[GENERIC, ...] .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_list_to_array.html @@ -226,12 +336,12 @@
[docs]def boolean_choose(b, choice1, choice2): """STEP Standard FUNCTION boolean_choose - :param b: STEP Standard TYPE BOOLEAN - :type b: bool - :param choice1: STEP Standard TYPE GENERIC - :type choice1: object - :param choice2: STEP Standard TYPE GENERIC - :type choice2: object + :param b: + :type b: BOOLEAN + :param choice1: + :type choice1: GENERIC + :param choice2: + :type choice2: GENERIC :returns: STEP STEP Standard TYPE GENERIC :rtype: object @@ -258,14 +368,14 @@ Check if the path is a connected curve set. - :param a_path: STEP Standard TYPE path + :param a_path: :type a_path: PATH :returns: p - :rtype: object + :rtype: LOGICAL - :ivar p: STEP STEP Standard TYPE LOGICAL - :vartype item: bool + :var p: + :vartype item: LOGICAL .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_path_head_to_tail.html @@ -294,19 +404,83 @@ return p
-
[docs]class REPRESENTATION_ITEM(): +# STEP Standard Type Enumeration +# Enumeration values are simple strings such as red, green, and blue +# for an rgb-enumeration. In the case that an enumeration type is +# declared extensible it can be extended in other schemas. + +# Python note: Starting with 1 because 0 is False in a boolean sense + +
[docs]class PREFERRED_SURFACE_CURVE_REPRESENTATION(Enum): + """STEP Standard TYPE b_spline_curve_form + + :cvar CURVE_3D: + :cvar PCURVE_S1: + :cvar PCURVE_S2: + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_preferred_surface_curve_representation.html + """ + CURVE_3D = 1 + PCURVE_S1 = 2 + PCURVE_S2 = 3
+ +
[docs]class B_SPLINE_CURVE_FORM(Enum): + """STEP Standard TYPE b_spline_curve_form + + ENUMERATION OF (polyline_form, circular_arc, elliptic_arc, + parabolic_arc, hyperbolic_arc, unspecified). + + :cvar POLYLINE_FORM: + :cvar CIRCULAR_ARC: + :cvar ELLIPTIC_ARC: + :cvar PARABOLIC_ARC: + :cvar HYPERBOLIC_ARC: + :cvar UNSPECIFIED: + + .. seealso:: + https://www.steptools.com/std/stp_aim/html/t_b_spline_curve_form.html + """ + POLYLINE_FORM = 1 + CIRCULAR_ARC = 2 + ELLIPTIC_ARC = 3 + PARABOLIC_ARC = 4 + HYPERBOLIC_ARC = 5 + UNSPECIFIED = 6
+ +
[docs]class KNOT_TYPE(Enum): + """STEP Standard TYPE knot_type + + ENUMERATION OF (uniform_knots, quasi_uniform_knots, + piecewise_bezier_knots, unspecified). + + :cvar UNIFORM_KNOTS: + :cvar QUASI_UNIFORM_KNOTS: + :cvar PIECEWISE_BEZIER_KNOTS: + :cvar UNSPECIFIED: + + .. seealso:: + https://www.steptools.com/std/stp_aim/html/t_knot_type.html + """ + UNIFORM_KNOTS = 1 + QUASI_UNIFORM_KNOTS = 2 + PIECEWISE_BEZIER_KNOTS = 3 + UNSPECIFIED = 4
+ + +
[docs]class REPRESENTATION_ITEM: """STEP Standard ENTITY representation_item Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING Additional attributes :ivar idn: for the instance the instance id and for the class the total number of instances - :vartype idn: int + :vartype idn: int <<additional>> .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_representation_item.html @@ -323,13 +497,13 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_geometric_representation_item.html @@ -345,34 +519,32 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_point.html - """ - def __init__(self, name): - super().__init__(name)
+ """
[docs]class CARTESIAN_POINT(POINT): """STEP Standard ENTITY cartesian_point Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param coordinates: list of length_measure (floats) - :type coordinates: tuple + :param name: label + :type name: STRING + :param coordinates: list of length_measure + :type coordinates: tuple[float, ...] Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_cartesian_point.html @@ -389,43 +561,39 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_topological_representation_item.html - """ - def __init__(self, name): - super().__init__(name)
+ """
[docs]class VERTEX(TOPOLOGICAL_REPRESENTATION_ITEM): """STEP Standard ENTITY vertex Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_vertex.html - """ - def __init__(self, name): - super().__init__(name)
+ """
[docs]class VERTEX_POINT(VERTEX): """STEP Standard ENTITY vertex_point Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param vertex_geometry: point :type vertex_geometry: POINT Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_vertex_point.html @@ -442,15 +610,15 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param direction_ratios: STEP Standard LIST OF REAL - :type direction_ratios: tuple + :type direction_ratios: LIST[REAL, ...] Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_direction.html @@ -464,17 +632,17 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param orientation: :type orientation: DIRECTION :param magnitude: length_measure - :type magnitude: float + :type magnitude: REAL Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_vector.html @@ -489,8 +657,8 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param edge_start: start point :type edge_start: VERTEX :param edge_end: end point @@ -509,27 +677,25 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_curve.html - """ - def __init__(self, name): - super().__init__(name)
+ """
[docs]class LINE(CURVE): """STEP Standard ENTITY line Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param pnt: :type pnt: CARTESIAN_POINT :param dir: @@ -537,8 +703,8 @@ Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_line.html @@ -553,25 +719,27 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param curve_3d: :type curve_3d: CURVE - :param associated_geometry: - :type associated_geometry: list of pcurve_or_surface - :param master_representation: - :type master_representation: preferred_surface_curve_representation + :param associated_geometry: STEP Standard TYPE LIST OF + pcurve_or_surface (SELECT) <<TODO>> + :type associated_geometry: LIST[Union[PCURVE, SURFACE], ...] + :param master_representation: <<TODO>> + :type master_representation: PREFERRED_SURFACE_CURVE_REPRESENTATION Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - :param basis_surface: - :type basis_surface: SET OF surface + :ivar dim: dimension_count + :vartype dim: INTEGER + :ivar basis_surface: <<TODO>> + :vartype basis_surface: SET[SURFACE, ...] .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_surface_curve.html """ + # TODO: type associated_geometry master_representation basis_surface def __init__(self, name, curve_3d, associated_geometry, master_representation): self.curve_3d = curve_3d self.associated_geometry = associated_geometry @@ -583,53 +751,63 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param curve_3d: :type curve_3d: CURVE - :param associated_geometry: - :type associated_geometry: list of pcurve_or_surface - :param master_representation: - :type master_representation: preferred_surface_curve_representation + :param associated_geometry: STEP Standard TYPE LIST OF + pcurve_or_surface (SELECT) <<TODO>> + :type associated_geometry: LIST[Union[PCURVE, SURFACE], ...] + :param master_representation: <<TODO>> + :type master_representation: PREFERRED_SURFACE_CURVE_REPRESENTATION Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - :param basis_surface: - :type basis_surface: SET OF surface + :ivar dim: dimension_count + :vartype dim: INTEGER + :ivar basis_surface: <<TODO>> + :vartype basis_surface: SET[SURFACE, ...] .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_seam_curve.html - """ - def __init__(self, name, curve_3d, associated_geometry, master_representation): - super().__init__(name, curve_3d, associated_geometry, master_representation)
+ """
[docs]class EDGE_CURVE(EDGE): """STEP Standard ENTITY edge_curve Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param edge_start: start point :type edge_start: VERTEX :param edge_end: end point :type edge_end: VERTEX :param edge_geometry: curve :type edge_geometry: CURVE - :param same_sense: STEP Standard TYPE BOOLEAN - :type same_sense: str + :param same_sense: <<TODO>> + :type same_sense: BOOLEAN Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER - Definition from ISO/CD 10303-42:1992: An edge curve is a special subtype of edge which has its geometry fully defined. The geometry is defined by associating the edge with a curve which may be unbounded. As the topological and geometric directions may be opposed, an indicator (same sense) is used to identify whether the edge and curve directions agree or are opposed. The Boolean value indicates whether the curve direction agrees with (TRUE) or is in the opposite direction (FALSE) to the edge direction. Any geometry associated with the vertices of the edge shall be consistent with the edge geometry. + Definition from ISO/CD 10303-42:1992: An edge curve is a special + subtype of edge which has its geometry fully defined. The + geometry is defined by associating the edge with a curve which + may be unbounded. As the topological and geometric directions may + be opposed, an indicator (same sense) is used to identify whether + the edge and curve directions agree or are opposed. The Boolean + value indicates whether the curve direction agrees with (TRUE) or + is in the opposite direction (FALSE) to the edge direction. Any + geometry associated with the vertices of the edge shall be + consistent with the edge geometry. Informal propositions - 1. The domain of the edge curve is formally defined to be the domain of its edge geometry as trimmed by the vertices. This domain does not include the vertices. + 1. The domain of the edge curve is formally defined to be the + domain of its edge geometry as trimmed by the vertices. This + domain does not include the vertices. 2. An edge curve has non-zero finite extent. 3. An edge curve is a manifold. 4. An edge curve is arcwise connected. @@ -639,9 +817,16 @@ Attribute definitions EdgeGeometry - The curve which defines the shape and spatial location of the edge. This curve may be unbounded and is implicitly trimmed by the vertices of the edge; this defines the edge domain. Multiple edges can reference the same curve. + The curve which defines the shape and spatial location of the + edge. This curve may be unbounded and is implicitly trimmed + by the vertices of the edge; this defines the edge domain. + Multiple edges can reference the same curve. SameSense - This logical flag indicates whether (TRUE), or not (FALSE) the senses of the edge and the curve defining the edge geometry are the same. The sense of an edge is from the edge start vertex to the edge end vertex; the sense of a curve is in the direction of increasing parameter. + This logical flag indicates whether (TRUE), or not (FALSE) + the senses of the edge and the curve defining the edge + geometry are the same. The sense of an edge is from the edge + start vertex to the edge end vertex; the sense of a curve is + in the direction of increasing parameter. .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_edge_curve.html @@ -649,7 +834,7 @@ """ def __init__(self, name, edge_start, edge_end, edge_geometry, same_sense): self.edge_geometry = edge_geometry - self.same_sense = BOOLEAN_to_bool(same_sense) + self.same_sense = BOOLEAN(same_sense) super().__init__(name, edge_start, edge_end)
[docs]class PLACEMENT(GEOMETRIC_REPRESENTATION_ITEM): @@ -657,15 +842,15 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param location: :type location: CARTESIAN_POINT Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_placement.html @@ -679,8 +864,8 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param location: :type location: CARTESIAN_POINT :param ref_direction: @@ -688,14 +873,15 @@ Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - :param p: - :type p: list of DIRECTION + :ivar dim: dimension_count + :vartype dim: INTEGER + :ivar p: + :vartype p: LIST[DIRECTION, ...] .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_axis2_placement_2d.html """ + # TODO: type p def __init__(self, name, location, ref_direction): self.ref_direction = ref_direction super().__init__(name, location)
@@ -705,8 +891,8 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param location: :type location: CARTESIAN_POINT :param axis: @@ -716,10 +902,10 @@ Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - :param p: - :type p: list of DIRECTION + :ivar dim: dimension_count + :vartype dim: INTEGER + :ivar p: + :vartype p: LIST[DIRECTION, ...] .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_axis2_placement_3d.html @@ -734,15 +920,15 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param position: axis2_placement - :type position: AXIS2_PLACEMENT_2D or AXIS2_PLACEMENT_3D + :type position: Union[AXIS2_PLACEMENT_2D, AXIS2_PLACEMENT_3D] Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_conic.html @@ -756,17 +942,17 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param position: axis2_placement - :type position: AXIS2_PLACEMENT_2D or AXIS2_PLACEMENT_3D + :type position: Union[AXIS2_PLACEMENT_2D, AXIS2_PLACEMENT_3D] :param radius: positive_length_measure - :type radius: float + :type radius: REAL Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_circle.html @@ -780,19 +966,19 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING :param position: STEP Standard TYPE axis2_placement (SELECT) - :type position: AXIS2_PLACEMENT_2D or AXIS2_PLACEMENT_3D - :param semi_axis_1: STEP Standard TYPE positive_length_measure (REAL) - :type semi_axis_1: float - :param semi_axis_2: STEP Standard TYPE positive_length_measure (REAL) - :type semi_axis_2: float + :type position: Union[AXIS2_PLACEMENT_2D, AXIS2_PLACEMENT_3D] + :param semi_axis_1: positive_length_measure + :type semi_axis_1: REAL + :param semi_axis_2: positive_length_measure + :type semi_axis_2: REAL Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_ellipse.html @@ -807,61 +993,57 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int + :ivar dim: dimension_count + :vartype dim: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_bounded_curve.html - """ - def __init__(self, name): - super().__init__(name) + """
[docs]class B_SPLINE_CURVE(BOUNDED_CURVE): """STEP Standard ENTITY b_spline_curve Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param degree: STEP Standard TYPE INTEGER - :type degree: int - :param control_points_list: STEP Standard TYPE LIST OF - cartesian_point (ENTITY) - :type control_points_list: tuple - :param curve_form: STEP Standard TYPE b_spline_curve_form (ENUM). - ENUMERATION OF (polyline_form, circular_arc, elliptic_arc, - parabolic_arc, hyperbolic_arc, unspecified). - :type curve_form: str - :param closed_curve: STEP Standard TYPE LOGICAL - :type closed_curve: str - :param self_intersect: STEP Standard TYPE LOGICAL - :type self_intersect: str + :param name: label + :type name: STRING + :param degree: + :type degree: INTEGER + :param control_points_list: + :type control_points_list: LIST[CARTESIAN_POINT, ...] + :param curve_form: + :type curve_form: B_SPLINE_CURVE_FORM + :param closed_curve: + :type closed_curve: LOGICAL + :param self_intersect: + :type self_intersect: LOGICAL Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - :param upper_index_on_control_points: STEP Standard TYPE INTEGER - :type upper_index_on_control_points: int - :param control_points: STEP Standard TYPE ARRAY OF - cartesian_point (ENTITY) - :type control_points: tuple + :ivar dim: dimension_count + :vartype dim: INTEGER + :ivar upper_index_on_control_points: + :vartype upper_index_on_control_points: INTEGER + :ivar control_points: + :vartype control_points: ARRAY[CARTESIAN_POINT, ...] .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_b_spline_curve.html """ + # TODO: curve_form from str to B_SPLINE_CURVE_FORM, closed_curve, + # self_intersect def __init__(self, name, degree, control_points_list, curve_form, closed_curve, self_intersect): self.degree = degree self.control_points_list = control_points_list self.curve_form = curve_form - self.closed_curve = BOOLEAN_to_bool(closed_curve) # TODO: BOOLEAN not LOGICAL? - self.self_intersect = BOOLEAN_to_bool(self_intersect) # TODO: BOOLEAN not LOGICAL? + self.closed_curve = LOGICAL(closed_curve) + self.self_intersect = LOGICAL(self_intersect) self.upper_index_on_control_points = len(control_points_list) - 1 # TODO: necessary? @@ -875,45 +1057,40 @@ Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param degree: STEP Standard TYPE INTEGER - :type degree: int - :param control_points_list: STEP Standard TYPE LIST OF - cartesian_point (ENTITY) - :type control_points_list: tuple - :param curve_form: STEP Standard TYPE b_spline_curve_form (ENUM). - ENUMERATION OF (polyline_form, circular_arc, elliptic_arc, - parabolic_arc, hyperbolic_arc, unspecified). - :type curve_form: str - :param closed_curve: STEP Standard TYPE LOGICAL - :type closed_curve: str - :param self_intersect: STEP Standard TYPE LOGICAL - :type self_intersect: str - :param knot_multiplicities: STEP Standard TYPE LIST OF INTEGER - :type knot_multiplicities: tuple + :param name: label + :type name: STRING + :param degree: + :type degree: INTEGER + :param control_points_list: + :type control_points_list: LIST[CARTESIAN_POINT, ...] + :param curve_form: + :type curve_form: B_SPLINE_CURVE_FORM + :param closed_curve: + :type closed_curve: LOGICAL + :param self_intersect: + :type self_intersect: LOGICAL + :param knot_multiplicities: + :type knot_multiplicities: LIST[INTEGER, ...] :param knots: STEP Standard TYPE LIST OF parameter_value (REAL) - :type knots: tuple - :param knot_spec: STEP Standard TYPE knot_type (ENUM). - ENUMERATION OF (uniform_knots, quasi_uniform_knots, - piecewise_bezier_knots, unspecified). - :type knot_spec: str + :type knots: LIST[REAL, ...] + :param knot_spec: + :type knot_spec: KNOT_TYPE Derived Attributes - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - :param upper_index_on_control_points: STEP Standard TYPE INTEGER - :type upper_index_on_control_points: int - :param control_points: STEP Standard TYPE ARRAY OF - cartesian_point (ENTITY) - :type control_points: tuple - :param upper_index_on_knots: STEP Standard TYPE INTEGER - :type upper_index_on_knots: int + :ivar dim: dimension_count + :vartype dim: INTEGER + :ivar upper_index_on_control_points: + :vartype upper_index_on_control_points: INTEGER + :ivar control_points: + :vartype control_points: ARRAY[CARTESIAN_POINT, ...] + :ivar upper_index_on_knots: + :vartype upper_index_on_knots: INTEGER .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_b_spline_curve_with_knots.html """ + # TODO: type of knot_spec from str to KNOT_TYPE def __init__(self, name, degree, control_points_list, curve_form, closed_curve, self_intersect, knot_multiplicities, knots, knot_spec): @@ -924,34 +1101,30 @@ self.upper_index_on_knots = len(knots) super().__init__(name, degree, control_points_list, curve_form, - closed_curve, self_intersect)
+ closed_curve, self_intersect)
[docs]class ORIENTED_EDGE(EDGE): """STEP Standard ENTITY oriented_edge Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param edge_start: STEP Standard TYPE vertex (ENTITY) - [re-declared attribute from edge] + :param name: label + :type name: STRING + :param edge_start: [re-declared attribute from edge] :type edge_start: VERTEX - :param edge_end: STEP Standard TYPE vertex (ENTITY) - [re-declared attribute from edge] + :param edge_end: [re-declared attribute from edge] :type edge_end: VERTEX - :param edge_element: STEP Standard TYPE edge (ENTITY) + :param edge_element: :type edge_element: EDGE - :param orientation: STEP Standard TYPE BOOLEAN - :type orientation: str + :param orientation: + :type orientation: BOOLEAN Derived Attributes - :param edge_start: STEP Standard TYPE vertex (ENTITY) - [re-declared attribute from edge] - :type edge_start: VERTEX - :param edge_end: STEP Standard TYPE vertex (ENTITY) - [re-declared attribute from edge] - :type edge_end: VERTEX + :ivar edge_start: [re-declared attribute from edge] + :vartype edge_start: VERTEX + :ivar edge_end: [re-declared attribute from edge] + :vartype edge_end: VERTEX .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_oriented_edge.html @@ -963,7 +1136,7 @@ # value of edge_start should be '*' # value of edge_end should be '*' self.edge_element = edge_element - self.orientation = BOOLEAN_to_bool(orientation) + self.orientation = BOOLEAN(orientation) self.edge_start = boolean_choose( self.orientation, @@ -974,32 +1147,29 @@ super().__init__(name, self.edge_start, self.edge_end) else: - self = None - print('no oriented_edge')
+ raise ValueError(edge_element + 'is not an EDGE')
[docs]class LOOP(TOPOLOGICAL_REPRESENTATION_ITEM): """STEP Standard ENTITY loop Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str + :param name: label + :type name: STRING .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_loop.html - """ - def __init__(self, name): - super().__init__(name)
+ """
[docs]class PATH(TOPOLOGICAL_REPRESENTATION_ITEM): """STEP Standard ENTITY path Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param edge_list: STEP Standard TYPE LIST OF oriented_edge (ENTITY) - :type edge_list: tuple + :param name: label + :type name: STRING + :param edge_list: + :type edge_list: LIST[ORIENTED_EDGE, ...] .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_path.html @@ -1008,18 +1178,17 @@ self.edge_list = edge_list super().__init__(name) if not path_head_to_tail(self): - self = None - print('no path')
+ raise ValueError(edge_list + 'is not a path')
[docs]class EDGE_LOOP(PATH, LOOP): """STEP Standard ENTITY edge_loop Explicit Attributes - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param edge_list: STEP Standard TYPE LIST OF oriented_edge (ENTITY) - :type edge_list: tuple + :param name: label + :type name: STRING + :param edge_list: + :type edge_list: LIST[ORIENTED_EDGE, ...] .. seealso:: https://www.steptools.com/stds/stp_aim/html/t_edge_loop.html @@ -1030,8 +1199,7 @@ self.ne = len(self.edge_list) if self.edge_list[0].edge_start != self.edge_list[self.ne-1].edge_end: - self = None - print('no edge_loop')
+ raise ValueError(edge_list + 'is not a loop') diff --git a/docs/build/html/_modules/pylib/function.html b/docs/build/html/_modules/pylib/function.html index 59bcbe4..764dd50 100644 --- a/docs/build/html/_modules/pylib/function.html +++ b/docs/build/html/_modules/pylib/function.html @@ -159,10 +159,10 @@
[docs]def cosine_wave(A=1, k=1, f=1, phi=0, D=0, degree=False): r"""A cosine wave is said to be sinusoidal, because, - :math:`\cos(x) = \sin(x + \pi/2)`, which is also a sine wave with a - phase-shift of π/2 radians. Because of this head start, it is often - said that the cosine function leads the sine function or the sine - lags the cosine. + :math:`\cos(x) = \sin(x + \pi/2)`, which is also a sine wave with + a phase-shift of π/2 radians. Because of this head start, it is + often said that the cosine function leads the sine function or + the sine lags the cosine. :param A: amplitude :type A: float or int @@ -195,22 +195,25 @@
[docs]def b_spline_basis(knots, knot_span, degree): r"""Cox-de Boor algorithm / recursion formula. - Calculate the i-th B-spline basis function of degree p: N_{i,p}(u) + Calculate the i-th B-spline basis function of degree p: + :math:`N_{i,p}(u)` :param knots: Knot vector U. m + 1 non-decreasing numbers / knots, - :math:`u_0 <= u_1 <= u_2 <= ... <= u_m` + :math:`u_0 \le u_1 \le u_2 \le \dots \le u_m` :type knots: list :param knot_span: i-th knot span :type knot_span: int :param degree: degree of B-spline basis function :type degree: int - :returns: B-spline basis function using variable, u \in [u_0, u_m] + :returns: B-spline basis function using variable, + :math:`u \in [u_0, u_m]` :rtype: function .. math:: - N_{i,0}(u) &= \begin{cases} 1 & \text{if } u_i \le u \lt u_{i+1} \\ - 0 & \text{otherwise}\end{cases} \\ + N_{i,0}(u) &= \begin{cases} + 1 & \text{if } u_i \le u \lt u_{i+1} \\ + 0 & \text{otherwise}\end{cases} \\ N_{i,p}(u) &= \frac{u - u_i}{u_{i+p} - u_i} N_{i,p-1}(u) + \frac{u_{i+p+1} - u}{u_{i+p+1} - u_{i+1}} N_{i+1,p-1}(u) @@ -277,10 +280,10 @@ :param control_points: control points P, n + 1 control points :type control_points: list :param knots: Knot vector U. m + 1 non-decreasing numbers / knots, - :math:`u_0 <= u_1 <= u_2 <= ... <= u_m` + :math:`u_0 \le u_1 \le u_2 \le \dots \le u_m` :type knots: list - :returns: B-spline curve using variable, u \in [u_0, u_m] + :returns: B-spline curve using variable, :math:`u \in [u_0, u_m]` :rtype: function .. math:: @@ -291,10 +294,11 @@ * the curve will not touch the first and last legs of the control polyline * the knot vector does not have any particular structure - * for degree p, intervals [u_0, u_p) and [u_{n-p}, u_n) will not - have "full support" of basis functions and are ignored when a - B-spline curve is open. For open B-spline curves, the domain - is inteval [u_p, u_{n-p}] + * for degree p, intervals :math:`[u_0, u_p)` and + :math:`[u_{n-p}, u_n)` will not have "full support" of basis + functions and are ignored when a B-spline curve is open. For + open B-spline curves, the domain is inteval + :math:`[u_p, u_{n-p}]` * clamped B-spline curves, nonperiodic B-spline curves @@ -307,7 +311,7 @@ * the start and the end of the generated curve join together forming a closed loop - * repeating some knots and control points # TODO: which? + * repeating some knots and control points (TODO: which?) * uniform B-spline curves @@ -448,9 +452,9 @@ * * * * * - >>> x, y = hyotrochoid(20, 6, 6)[:2] - >>> x, y, _ = hyotrochoid(20, 6, 6) - >>> x, y, interval = hyotrochoid(20, 6, 6) + >>> x, y = hypotrochoid(20, 6, 6)[:2] + >>> x, y, _ = hypotrochoid(20, 6, 6) + >>> x, y, interval = hypotrochoid(20, 6, 6) .. seealso:: :meth:`pylib.mathematics.lcm` diff --git a/docs/build/html/_modules/pylib/geometry2d.html b/docs/build/html/_modules/pylib/geometry2d.html index 7324af0..01c1c83 100644 --- a/docs/build/html/_modules/pylib/geometry2d.html +++ b/docs/build/html/_modules/pylib/geometry2d.html @@ -473,7 +473,7 @@ >>> x, y = line((0, 0), (1, 0)) >>> print(x, y) - ((0, 1), (0, 0)) + (0, 1) (0, 0) """ p1x, p1y = point1 p2x, p2y = point2 diff --git a/docs/build/html/_modules/pylib/helper.html b/docs/build/html/_modules/pylib/helper.html index cf376b3..ad1817e 100644 --- a/docs/build/html/_modules/pylib/helper.html +++ b/docs/build/html/_modules/pylib/helper.html @@ -58,18 +58,18 @@ :Example: - >>> with timeit('section_test'): - ... # code - section_test took 0.006 ms - :: + with timeit('section_test'): + # code + section_test took 0.006 ms + @timeit('func') def func(): # code - >>> func() - func took 0.006 ms + func() + func took 0.006 ms """ def __init__(self, description=None): self.description = description diff --git a/docs/build/html/_modules/pylib/mathematics.html b/docs/build/html/_modules/pylib/mathematics.html index 3b10655..7545246 100644 --- a/docs/build/html/_modules/pylib/mathematics.html +++ b/docs/build/html/_modules/pylib/mathematics.html @@ -114,7 +114,7 @@ >>> m = vector([1, 2, 3]) >>> m *= vector([3, 3, 3]) >>> print(v) - [[3, 3, 3], [6, 6, 6], [9, 9, 9]] + 18 """
[docs] def __getitem__(self, index): @@ -124,7 +124,7 @@ :Example: >>> v = vector([1, 2, 3, 4, 5]) - >>> v[1:3] + >>> print(v[1:3]) [2, 3] >>> v = vector([1, 2, 3, 4, 5]) >>> v[3] @@ -440,12 +440,15 @@ :Example: + >>> import random + >>> random.seed(1) >>> v = vector.random(3) >>> print(v) - [0.9172905912930438, 0.8908124278322492, 0.5256002790725927] + [0.13436424411240122, 0.8474337369372327, 0.763774618976614] + >>> random.seed(1) >>> v = vector.random(3, 1, 2) >>> print(v) - [1.2563665665080803, 1.9270454509964547, 1.2381672401270487] + [1.134364244112401, 1.8474337369372327, 1.7637746189766141] """ import random dl = lmax-lmin @@ -673,8 +676,7 @@ :Example: - >>> m = matrix([[1, 2, 3, 0], [4, 5, 6, 0], [7, 8, 9, 0], \ - [0, 0, 0, 0]]) + >>> m = matrix([[1, 2, 3, 0], [4, 5, 6, 0], [7, 8, 9, 0], [0, 0, 0, 0]]) >>> print(m[:]) [[1, 2, 3, 0], [4, 5, 6, 0], [7, 8, 9, 0], [0, 0, 0, 0]] >>> print(m[2]) @@ -737,20 +739,16 @@ :Example: - >>> m = matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], \ - [0, 0, 0, 1]]) * 5 + >>> m = matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [0, 0, 0, 1]]) * 5 >>> print(m) [[5, 10, 15, 20], [25, 30, 35, 40], [45, 50, 55, 60], [0, 0, 0, 5]] - >>> m = matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], \ - [0, 0, 0, 1]]) * 5. + >>> m = matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [0, 0, 0, 1]]) * 5. >>> print(m) [[5.0, 10.0, 15.0, 20.0], [25.0, 30.0, 35.0, 40.0], [45.0, 50.0, 55.0, 60.0], [0.0, 0.0, 0.0, 5.0]] - >>> v = matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) * \ - vector([12, 12, 13]) + >>> v = matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) * vector([12, 12, 13]) >>> print(v) [75, 186, 297] - >>> m = matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) * \ - matrix([[12, 12, 13], [14, 15, 16], [17, 18, 19]]) + >>> m = matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) * matrix([[12, 12, 13], [14, 15, 16], [17, 18, 19]]) >>> print(m) [[91, 96, 102], [220, 231, 246], [349, 366, 390]] @@ -784,12 +782,10 @@ :Example: - >>> m = 5 * matrix([[1, 2, 3, 4], [5, 6, 7, 8], \ - [9, 10, 11, 12], [0, 0, 0, 1]]) + >>> m = 5 * matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [0, 0, 0, 1]]) >>> print(m) [[5, 10, 15, 20], [25, 30, 35, 40], [45, 50, 55, 60], [0, 0, 0, 5]] - >>> m = 5. * matrix([[1, 2, 3, 4], [5, 6, 7, 8], \ - [9, 10, 11, 12], [0, 0, 0, 1]]) + >>> m = 5. * matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [0, 0, 0, 1]]) >>> print(m) [[5.0, 10.0, 15.0, 20.0], [25.0, 30.0, 35.0, 40.0], [45.0, 50.0, 55.0, 60.0], [0.0, 0.0, 0.0, 5.0]] diff --git a/docs/build/html/_modules/pylib/numerical/integration.html b/docs/build/html/_modules/pylib/numerical/integration.html index e041dbe..87e02f2 100644 --- a/docs/build/html/_modules/pylib/numerical/integration.html +++ b/docs/build/html/_modules/pylib/numerical/integration.html @@ -132,7 +132,7 @@ numerical solution - >>> f = lambda(x): x**2 + >>> f = lambda x: x**2 >>> trapez(f, 0, 1, 1) 0.5 >>> trapez(f, 0, 1, 10) diff --git a/docs/build/html/_sources/index.rst.txt b/docs/build/html/_sources/index.rst.txt index 08341a4..59b5175 100644 --- a/docs/build/html/_sources/index.rst.txt +++ b/docs/build/html/_sources/index.rst.txt @@ -7,7 +7,7 @@ Welcome to pylib's documentation! ================================= .. toctree:: - :maxdepth: 2 + :maxdepth: 6 :caption: Contents: modules @@ -22,15 +22,20 @@ Indices and tables * :ref:`search` +``data_step_std`` +----------------- +.. image:: _static/class_diagram.svg + :target: _images/class_diagram.svg -tui ---- -pylib/tui.py is the main module for tui 'terminal user interface' programs. +``tui`` +------- -* curses package (for Windows install windows-curses) is the underlying main - package to build terminal programs. The curses package can also be used - directly. +``pylib/tui.py`` is the main module for tui 'textual user interface' programs. + +* ``curses`` package (for Windows install ``windows-curses``) is the underlying + main package to build terminal programs. The ``curses`` package can also be + used directly. * Windows (Anaconda): @@ -38,9 +43,9 @@ pylib/tui.py is the main module for tui 'terminal user interface' programs. * ``python -m pip install windows-curses`` * https://github.com/zephyrproject-rtos/windows-curses -* drawille package is used to draw with braille characters (dottet and quasi- - line charts). Make sure you use a font with Unicode Braille characters. For - Windows e. g.: NSimSun, MS Gothic. +* ``drawille`` package is used to draw with braille characters (dottet and + quasi-line charts). Make sure you use a font with Unicode Braille characters. + For Windows e. g.: NSimSun, MS Gothic. * Install: ``python -m pip install drawille`` * Windows (Anaconda): @@ -48,6 +53,5 @@ pylib/tui.py is the main module for tui 'terminal user interface' programs. * ``C:\PathToAnaconda3\condabin\conda.bat activate base`` * ``python -m pip install drawille`` -* drawblock.py is used to draw with block characters (histogram). - -example/tui.py is an example script to build a terminal program. +* ``drawblock`` is used to draw with block characters (histogram). +* ``example/tui.py`` is an example script to build a terminal program. diff --git a/docs/build/html/_static/class_diagram.svg b/docs/build/html/_static/class_diagram.svg new file mode 100644 index 0000000..59afc29 --- /dev/null +++ b/docs/build/html/_static/class_diagram.svg @@ -0,0 +1,267 @@ +LegendCLASSexplicit attributederived attributeadditional attributestatic attributeTODOREPRESENTATION_ITEMname : stridn : int «generated»B_SPLINE_CURVE_FORMPOLYLINE_FORMCIRCULAR_ARCELLIPTIC_ARCPARABOLIC_ARCHYPERBOLIC_ARCUNSPECIFIEDKNOT_TYPEUNIFORM_KNOTSQUASI_UNIFORM_KNOTSPIECEWISE_BEZIER_KNOTSUNSPECIFIEDGEOMETRIC_REPRESENTATION_ITEMdim : intCARTESIAN_POINTcoordinates : tuple[float]VERTEX_POINTvertex_geometry : POINTDIRECTIONdirection_ratios : tuple[float]VECTORorientation : DIRECTIONmagnitude : floatEDGEedge_start : VERTEXedge_end : VERTEXLINEpnt : CARTESIAN_POINTdir : VECTORSURFACE_CURVEcurve_3d : CURVEassociated_geometry : strtuple[PCURVE, SURFACE]master_representation : strbasis_surface : Nonetuple[SURFACE]EDGE_CURVEedge_geometry : CURVEsame_sense : strPLACEMENTlocation : CARTESIAN_POINTAXIS2_PLACEMENT_2Dref_direction : DIRECTIONp : Nonetuple[DIRECTION]AXIS2_PLACEMENT_3Daxis : DIRECTIONref_direction : DIRECTIONp : Nonetuple[DIRECTION]CONICposition : Union[AXIS2_PLACEMENT_2D, AXIS_PLACEMENT_3D]CIRCLEradius : floatELLIPSEsemi_axis_1 : floatsemi_axis_2 : floatB_SPLINE_CURVEdegree : intcontrol_points_list : tuple[CARTESIAN_POINT]curve_form : strB_BLINE_CURVE_FORMclosed_curve : strboolself_intersect : strboolupper_index_on_control_points : intcontrol_points : tuple[CARTESIAN_POINT]B_SPLINE_CURVE_WITH_KNOTSknot_multiplicities : tuple[int]knots : tuple[float]knot_spec : strKNOT_TYPEupper_index_on_knots : intORIENTED_EDGEedge_element : EDGEorientation : stredge_start : VERTEXedge_end : VERTEXPATHedge_list : tuple[ORIENTED_EDGE]POINTCURVESEAM_CURVEBONDED_CURVETOPOLOGICAL_REPRESENTATION_ITEMVERTEXLOOPEDGE_LOOP \ No newline at end of file diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html index 44c41db..2c688b5 100644 --- a/docs/build/html/genindex.html +++ b/docs/build/html/genindex.html @@ -47,11 +47,13 @@ | G | H | I + | K | L | M | N | O | P + | Q | R | S | T @@ -156,15 +158,17 @@
  • arc_circle_geometry() (in module pylib.data_step)
  • - - + @@ -347,6 +357,8 @@
  • Ellipse (class in pylib.geometry)
  • ellipse() (in module pylib.function) +
  • +
  • ELLIPTIC_ARC (B_SPLINE_CURVE_FORM attribute)
  • end() (App method)
  • @@ -383,6 +395,8 @@
  • gauss_fit() (in module pylib.numerical.fit)
  • gaußsche_osterformel() (in module pylib.date) +
  • +
  • GENERIC (class in pylib.data_step_std)
  • GEOMETRIC_REPRESENTATION_ITEM (class in pylib.data_step_std)
  • @@ -429,6 +443,8 @@
  • hours() (in module pylib.time_of_day)
  • hours_norm() (in module pylib.time_of_day) +
  • +
  • HYPERBOLIC_ARC (B_SPLINE_CURVE_FORM attribute)
  • hypotrochoid() (in module pylib.function)
  • @@ -453,6 +469,8 @@ +

    K

    + + +
    +

    L

    - +
    • lines() (in module pylib.geometry2d) +
    • +
    • LIST (class in pylib.data_step_std)
    • list_to_array() (in module pylib.data_step_std)
    • load() (in module pylib.data) +
    • +
    • LOGICAL() (in module pylib.data_step_std)
    • LOOP (class in pylib.data_step_std)
    • @@ -550,11 +580,19 @@

      P

      + -
      +

      Q

      + + +
      +

      R

      - +
      +
      +

      data_step_std

      +_images/class_diagram.svg +
      -

      tui

      -

      pylib/tui.py is the main module for tui ‘terminal user interface’ programs.

      +

      tui

      +

      pylib/tui.py is the main module for tui ‘textual user interface’ programs.

        -
      • curses package (for Windows install windows-curses) is the underlying main -package to build terminal programs. The curses package can also be used -directly.

        +
      • curses package (for Windows install windows-curses) is the underlying +main package to build terminal programs. The curses package can also be +used directly.

        • Windows (Anaconda):

            @@ -69,9 +106,9 @@ directly.

        • -
        • drawille package is used to draw with braille characters (dottet and quasi- -line charts). Make sure you use a font with Unicode Braille characters. For -Windows e. g.: NSimSun, MS Gothic.

          +
        • drawille package is used to draw with braille characters (dottet and +quasi-line charts). Make sure you use a font with Unicode Braille characters. +For Windows e. g.: NSimSun, MS Gothic.

          • Install: python -m pip install drawille

          • Windows (Anaconda):

            @@ -82,9 +119,9 @@ Windows e. g.: NSimSun, MS Gothic.

        • -
        • drawblock.py is used to draw with block characters (histogram).

        • +
        • drawblock is used to draw with block characters (histogram).

        • +
        • example/tui.py is an example script to build a terminal program.

        -

        example/tui.py is an example script to build a terminal program.

      diff --git a/docs/build/html/objects.inv b/docs/build/html/objects.inv index 9c1d24c..25c475b 100644 Binary files a/docs/build/html/objects.inv and b/docs/build/html/objects.inv differ diff --git a/docs/build/html/pylib.data.html b/docs/build/html/pylib.data.html index 29b1069..9b7b876 100644 --- a/docs/build/html/pylib.data.html +++ b/docs/build/html/pylib.data.html @@ -318,6 +318,28 @@ removed from the resulting list.

      +
      +
      +strs_between(text, left, right)[source]
      +

      Get text between two pattern.

      +

      Text can be multi-line.

      +
      +
      Parameters
      +
        +
      • text (str) – text to search in

      • +
      • left (str) – left pattern

      • +
      • right (str) – right pattern

      • +
      +
      +
      Returns
      +

      text between the left and right pattern

      +
      +
      Return type
      +

      str

      +
      +
      +
      +
      unique_ending(ids, n=1)[source]
      @@ -386,7 +408,28 @@ unhashable types: ‘list’

      Contents:

      diff --git a/docs/build/html/pylib.data_step.html b/docs/build/html/pylib.data_step.html index 6b912cf..6bed7ae 100644 --- a/docs/build/html/pylib.data_step.html +++ b/docs/build/html/pylib.data_step.html @@ -187,7 +187,28 @@ inside a parenthesis and then split the string at the commas.

      Contents:

      diff --git a/docs/build/html/pylib.data_step_std.html b/docs/build/html/pylib.data_step_std.html index e9accee..b6fa0b3 100644 --- a/docs/build/html/pylib.data_step_std.html +++ b/docs/build/html/pylib.data_step_std.html @@ -56,6 +56,26 @@ Product data representation and exchange – Part 21: Implementation methods: Clear text encoding of the exchange structure

      +
      +
      +class ARRAY[source]
      +

      Bases: tuple

      +

      EXPRESS Type ARRAY

      +

      ARRAY are ordered. An ARRAY is the only aggregate that may +contain unset members.

      +
      +
      Parameters
      +
        +
      • value (str) – value

      • +
      • dtype

      • +
      +
      +
      Return type
      +

      tuple

      +
      +
      +
      +
      class AXIS2_PLACEMENT_2D(name, location, ref_direction)[source]
      @@ -65,7 +85,7 @@ structure

      Parameters
      @@ -73,10 +93,10 @@ structure

      Derived Attributes

      -
      Parameters
      +
      Variables
        -
      • dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      • -
      • p (list of DIRECTION) –

      • +
      • dim (INTEGER) – dimension_count

      • +
      • p (LIST[DIRECTION, ..]) –

      @@ -95,7 +115,7 @@ structure

      Parameters

      Derived Attributes

      -
      Parameters
      +
      Variables
        -
      • dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      • -
      • p (list of DIRECTION) –

      • +
      • dim (INTEGER) – dimension_count

      • +
      • p (LIST[DIRECTION, ..]) –

      @@ -118,9 +138,19 @@ structure

      -
      -BOOLEAN_to_bool(boolean)[source]
      -
      +
      +BOOLEAN(value)[source]
      +

      EXPRESS Type BOOLEAN with values TRUE and FALSE

      +
      +
      Parameters
      +

      value (str) – either .T. for a True value or .F. for a +False value

      +
      +
      Raises
      +

      TypeError

      +
      +
      +
      @@ -130,13 +160,13 @@ structure

      Explicit Attributes

      Parameters
      -

      name (str) – STEP Standard TYPE label (STRING)

      +

      name (STRING) – label

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      @@ -154,26 +184,22 @@ structure

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • -
      • degree (int) – STEP Standard TYPE INTEGER

      • -
      • control_points_list (tuple) – STEP Standard TYPE LIST OF -cartesian_point (ENTITY)

      • -
      • curve_form (str) – STEP Standard TYPE b_spline_curve_form (ENUM). -ENUMERATION OF (polyline_form, circular_arc, elliptic_arc, -parabolic_arc, hyperbolic_arc, unspecified).

      • -
      • closed_curve (str) – STEP Standard TYPE LOGICAL

      • -
      • self_intersect (str) – STEP Standard TYPE LOGICAL

      • +
      • name (STRING) – label

      • +
      • degree (INTEGER) –

      • +
      • control_points_list (LIST[CARTESIAN_POINT, ..]) –

      • +
      • curve_form (B_SPLINE_CURVE_FORM) –

      • +
      • closed_curve (LOGICAL) –

      • +
      • self_intersect (LOGICAL) –

      Derived Attributes

      -
      Parameters
      +
      Variables
        -
      • dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      • -
      • upper_index_on_control_points (int) – STEP Standard TYPE INTEGER

      • -
      • control_points (tuple) – STEP Standard TYPE ARRAY OF -cartesian_point (ENTITY)

      • +
      • dim (INTEGER) – dimension_count

      • +
      • upper_index_on_control_points (INTEGER) –

      • +
      • control_points (ARRAY[CARTESIAN_POINT, ..]) –

      @@ -183,6 +209,61 @@ cartesian_point (ENTITY)

      +
      +
      +class B_SPLINE_CURVE_FORM[source]
      +

      Bases: enum.Enum

      +

      STEP Standard TYPE b_spline_curve_form

      +

      ENUMERATION OF (polyline_form, circular_arc, elliptic_arc, +parabolic_arc, hyperbolic_arc, unspecified).

      +
      +
      Variables
      +
      +
      +
      + +
      +
      +CIRCULAR_ARC = 2
      +
      + +
      +
      +ELLIPTIC_ARC = 3
      +
      + +
      +
      +HYPERBOLIC_ARC = 5
      +
      + +
      +
      +PARABOLIC_ARC = 4
      +
      + +
      +
      +POLYLINE_FORM = 1
      +
      + +
      +
      +UNSPECIFIED = 6
      +
      + +
      +
      class B_SPLINE_CURVE_WITH_KNOTS(name, degree, control_points_list, curve_form, closed_curve, self_intersect, knot_multiplicities, knots, knot_spec)[source]
      @@ -192,32 +273,26 @@ cartesian_point (ENTITY)

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • -
      • degree (int) – STEP Standard TYPE INTEGER

      • -
      • control_points_list (tuple) – STEP Standard TYPE LIST OF -cartesian_point (ENTITY)

      • -
      • curve_form (str) – STEP Standard TYPE b_spline_curve_form (ENUM). -ENUMERATION OF (polyline_form, circular_arc, elliptic_arc, -parabolic_arc, hyperbolic_arc, unspecified).

      • -
      • closed_curve (str) – STEP Standard TYPE LOGICAL

      • -
      • self_intersect (str) – STEP Standard TYPE LOGICAL

      • -
      • knot_multiplicities (tuple) – STEP Standard TYPE LIST OF INTEGER

      • -
      • knots (tuple) – STEP Standard TYPE LIST OF parameter_value (REAL)

      • -
      • knot_spec (str) – STEP Standard TYPE knot_type (ENUM). -ENUMERATION OF (uniform_knots, quasi_uniform_knots, -piecewise_bezier_knots, unspecified).

      • +
      • name (STRING) – label

      • +
      • degree (INTEGER) –

      • +
      • control_points_list (LIST[CARTESIAN_POINT, ..]) –

      • +
      • curve_form (B_SPLINE_CURVE_FORM) –

      • +
      • closed_curve (LOGICAL) –

      • +
      • self_intersect (LOGICAL) –

      • +
      • knot_multiplicities (LIST[INTEGER, ..]) –

      • +
      • knots (LIST[REAL, ..]) – STEP Standard TYPE LIST OF parameter_value (REAL)

      • +
      • knot_spec (KNOT_TYPE) –

      Derived Attributes

      -
      Parameters
      +
      Variables
        -
      • dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      • -
      • upper_index_on_control_points (int) – STEP Standard TYPE INTEGER

      • -
      • control_points (tuple) – STEP Standard TYPE ARRAY OF -cartesian_point (ENTITY)

      • -
      • upper_index_on_knots (int) – STEP Standard TYPE INTEGER

      • +
      • dim (INTEGER) – dimension_count

      • +
      • upper_index_on_control_points (INTEGER) –

      • +
      • control_points (ARRAY[CARTESIAN_POINT, ..]) –

      • +
      • upper_index_on_knots (INTEGER) –

      @@ -236,15 +311,15 @@ cartesian_point (ENTITY)

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • -
      • coordinates (tuple) – list of length_measure (floats)

      • +
      • name (STRING) – label

      • +
      • coordinates (tuple[float, ..]) – list of length_measure

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      @@ -268,16 +343,16 @@ cartesian_point (ENTITY)

      Parameters

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      @@ -295,15 +370,15 @@ cartesian_point (ENTITY)

      Parameters

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      @@ -320,13 +395,13 @@ cartesian_point (ENTITY)

      Explicit Attributes

      Parameters
      -

      name (str) – STEP Standard TYPE label (STRING)

      +

      name (STRING) – label

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      @@ -344,15 +419,15 @@ cartesian_point (ENTITY)

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • -
      • direction_ratios (tuple) – STEP Standard LIST OF REAL

      • +
      • name (STRING) – label

      • +
      • direction_ratios (LIST[REAL, ..]) – STEP Standard LIST OF REAL

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      @@ -370,7 +445,7 @@ cartesian_point (ENTITY)

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • +
      • name (STRING) – label

      • edge_start (VERTEX) – start point

      • edge_end (VERTEX) – end point

      @@ -391,24 +466,35 @@ cartesian_point (ENTITY)

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • +
      • name (STRING) – label

      • edge_start (VERTEX) – start point

      • edge_end (VERTEX) – end point

      • edge_geometry (CURVE) – curve

      • -
      • same_sense (str) – STEP Standard TYPE BOOLEAN

      • +
      • same_sense (BOOLEAN) – <<TODO>>

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      -

      Definition from ISO/CD 10303-42:1992: An edge curve is a special subtype of edge which has its geometry fully defined. The geometry is defined by associating the edge with a curve which may be unbounded. As the topological and geometric directions may be opposed, an indicator (same sense) is used to identify whether the edge and curve directions agree or are opposed. The Boolean value indicates whether the curve direction agrees with (TRUE) or is in the opposite direction (FALSE) to the edge direction. Any geometry associated with the vertices of the edge shall be consistent with the edge geometry.

      +

      Definition from ISO/CD 10303-42:1992: An edge curve is a special +subtype of edge which has its geometry fully defined. The +geometry is defined by associating the edge with a curve which +may be unbounded. As the topological and geometric directions may +be opposed, an indicator (same sense) is used to identify whether +the edge and curve directions agree or are opposed. The Boolean +value indicates whether the curve direction agrees with (TRUE) or +is in the opposite direction (FALSE) to the edge direction. Any +geometry associated with the vertices of the edge shall be +consistent with the edge geometry.

      Informal propositions
        -
      1. The domain of the edge curve is formally defined to be the domain of its edge geometry as trimmed by the vertices. This domain does not include the vertices.

      2. +
      3. The domain of the edge curve is formally defined to be the +domain of its edge geometry as trimmed by the vertices. This +domain does not include the vertices.

      4. An edge curve has non-zero finite extent.

      5. An edge curve is a manifold.

      6. An edge curve is arcwise connected.

      7. @@ -418,9 +504,16 @@ cartesian_point (ENTITY)

      Attribute definitions
      -
      EdgeGeometry

      The curve which defines the shape and spatial location of the edge. This curve may be unbounded and is implicitly trimmed by the vertices of the edge; this defines the edge domain. Multiple edges can reference the same curve.

      +
      EdgeGeometry

      The curve which defines the shape and spatial location of the +edge. This curve may be unbounded and is implicitly trimmed +by the vertices of the edge; this defines the edge domain. +Multiple edges can reference the same curve.

      -
      SameSense

      This logical flag indicates whether (TRUE), or not (FALSE) the senses of the edge and the curve defining the edge geometry are the same. The sense of an edge is from the edge start vertex to the edge end vertex; the sense of a curve is in the direction of increasing parameter.

      +
      SameSense

      This logical flag indicates whether (TRUE), or not (FALSE) +the senses of the edge and the curve defining the edge +geometry are the same. The sense of an edge is from the edge +start vertex to the edge end vertex; the sense of a curve is +in the direction of increasing parameter.

      @@ -441,8 +534,8 @@ cartesian_point (ENTITY)

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • -
      • edge_list (tuple) – STEP Standard TYPE LIST OF oriented_edge (ENTITY)

      • +
      • name (STRING) – label

      • +
      • edge_list (LIST[ORIENTED_EDGE, ..]) –

      @@ -461,17 +554,17 @@ cartesian_point (ENTITY)

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • -
      • position (AXIS2_PLACEMENT_2D or AXIS2_PLACEMENT_3D) – STEP Standard TYPE axis2_placement (SELECT)

      • -
      • semi_axis_1 (float) – STEP Standard TYPE positive_length_measure (REAL)

      • -
      • semi_axis_2 (float) – STEP Standard TYPE positive_length_measure (REAL)

      • +
      • name (STRING) – label

      • +
      • position (Union[AXIS2_PLACEMENT_2D, AXIS2_PLACEMENT_3D]) – STEP Standard TYPE axis2_placement (SELECT)

      • +
      • semi_axis_1 (REAL) – positive_length_measure

      • +
      • semi_axis_2 (REAL) – positive_length_measure

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      @@ -480,6 +573,12 @@ cartesian_point (ENTITY)

      +
      +
      +class GENERIC[source]
      +

      Bases: object

      +
      +
      class GEOMETRIC_REPRESENTATION_ITEM(name)[source]
      @@ -488,13 +587,13 @@ cartesian_point (ENTITY)

      Explicit Attributes

      Parameters
      -

      name (str) – STEP Standard TYPE label (STRING)

      +

      name (STRING) – label

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      @@ -503,6 +602,58 @@ cartesian_point (ENTITY)

      +
      +
      +class INTEGER[source]
      +

      Bases: int

      +

      EXPRESS Type INTEGER

      +

      EXPRESS integers can have in principle any length, but most +implementations restricted them to a signed 32 bit value.

      +
      + +
      +
      +class KNOT_TYPE[source]
      +

      Bases: enum.Enum

      +

      STEP Standard TYPE knot_type

      +

      ENUMERATION OF (uniform_knots, quasi_uniform_knots, +piecewise_bezier_knots, unspecified).

      +
      +
      Variables
      +
      +
      +
      + +
      +
      +PIECEWISE_BEZIER_KNOTS = 3
      +
      + +
      +
      +QUASI_UNIFORM_KNOTS = 2
      +
      + +
      +
      +UNIFORM_KNOTS = 1
      +
      + +
      +
      +UNSPECIFIED = 4
      +
      + +
      +
      class LINE(name, pnt, dir)[source]
      @@ -512,7 +663,7 @@ cartesian_point (ENTITY)

      Parameters
      @@ -520,8 +671,8 @@ cartesian_point (ENTITY)

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      @@ -530,6 +681,38 @@ cartesian_point (ENTITY)

      +
      +
      +class LIST[source]
      +

      Bases: tuple

      +

      EXPRESS Type LIST

      +

      LIST are ordered. It is not possible to contain unset members.

      +
      +
      Parameters
      +
        +
      • value (str) – value

      • +
      • dtype

      • +
      +
      +
      Return type
      +

      tuple

      +
      +
      +
      + +
      +
      +LOGICAL(value)[source]
      +

      EXPRESS Type LOGICAL with values TRUE and FALSE and in addition +UNKNOWN

      +
      +
      Parameters
      +

      value (str) – either .T. for a True value or .F. for a +False value

      +
      +
      +
      +
      class LOOP(name)[source]
      @@ -538,7 +721,7 @@ cartesian_point (ENTITY)

      Explicit Attributes

      Parameters
      -

      name (str) – STEP Standard TYPE label (STRING)

      +

      name (STRING) – label

      @@ -556,24 +739,20 @@ cartesian_point (ENTITY)

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • -
      • edge_start (VERTEX) – STEP Standard TYPE vertex (ENTITY) -[re-declared attribute from edge]

      • -
      • edge_end (VERTEX) – STEP Standard TYPE vertex (ENTITY) -[re-declared attribute from edge]

      • -
      • edge_element (EDGE) – STEP Standard TYPE edge (ENTITY)

      • -
      • orientation (str) – STEP Standard TYPE BOOLEAN

      • +
      • name (STRING) – label

      • +
      • edge_start (VERTEX) – [re-declared attribute from edge]

      • +
      • edge_end (VERTEX) – [re-declared attribute from edge]

      • +
      • edge_element (EDGE) –

      • +
      • orientation (BOOLEAN) –

      Derived Attributes

      -
      Parameters
      +
      Variables
        -
      • edge_start (VERTEX) – STEP Standard TYPE vertex (ENTITY) -[re-declared attribute from edge]

      • -
      • edge_end (VERTEX) – STEP Standard TYPE vertex (ENTITY) -[re-declared attribute from edge]

      • +
      • edge_start (VERTEX) – [re-declared attribute from edge]

      • +
      • edge_end (VERTEX) – [re-declared attribute from edge]

      @@ -592,8 +771,8 @@ cartesian_point (ENTITY)

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • -
      • edge_list (tuple) – STEP Standard TYPE LIST OF oriented_edge (ENTITY)

      • +
      • name (STRING) – label

      • +
      • edge_list (LIST[ORIENTED_EDGE, ..]) –

      @@ -612,15 +791,15 @@ cartesian_point (ENTITY)

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • +
      • name (STRING) – label

      • location (CARTESIAN_POINT) –

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      @@ -637,13 +816,13 @@ cartesian_point (ENTITY)

      Explicit Attributes

      Parameters
      -

      name (str) – STEP Standard TYPE label (STRING)

      +

      name (STRING) – label

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      @@ -652,6 +831,51 @@ cartesian_point (ENTITY)

      +
      +
      +class PREFERRED_SURFACE_CURVE_REPRESENTATION[source]
      +

      Bases: enum.Enum

      +

      STEP Standard TYPE b_spline_curve_form

      +
      +
      Variables
      +
      +
      +
      + +
      +
      +CURVE_3D = 1
      +
      + +
      +
      +PCURVE_S1 = 2
      +
      + +
      +
      +PCURVE_S2 = 3
      +
      + +
      + +
      +
      +class REAL[source]
      +

      Bases: float

      +

      EXPRESS Type REAL

      +

      Ideally an EXPRESS real value is unlimited in accuracy and size. +But in practice a real value is represented by a floating point +value of type double.

      +
      +
      class REPRESENTATION_ITEM(name)[source]
      @@ -660,13 +884,13 @@ cartesian_point (ENTITY)

      Explicit Attributes

      Parameters
      -

      name (str) – STEP Standard TYPE label (STRING)

      +

      name (STRING) – label

      Additional attributes

      Variables
      -

      idn (int) – for the instance the instance id and for the class the +

      idn (int <<additional>>) – for the instance the instance id and for the class the total number of instances

      @@ -690,19 +914,20 @@ total number of instances

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • +
      • name (STRING) – label

      • curve_3d (CURVE) –

      • -
      • associated_geometry (list of pcurve_or_surface) –

      • -
      • master_representation (preferred_surface_curve_representation) –

      • +
      • associated_geometry (LIST[Union[PCURVE, SURFACE], ..]) – STEP Standard TYPE LIST OF +pcurve_or_surface (SELECT) <<TODO>>

      • +
      • master_representation (PREFERRED_SURFACE_CURVE_REPRESENTATION) – <<TODO>>

      Derived Attributes

      -
      Parameters
      +
      Variables
        -
      • dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      • -
      • basis_surface (SET OF surface) –

      • +
      • dim (INTEGER) – dimension_count

      • +
      • basis_surface (SET[SURFACE, ..]) – <<TODO>>

      @@ -712,6 +937,35 @@ total number of instances

      +
      +
      +class SET[source]
      +

      Bases: set

      +

      EXPRESS Type SET

      +

      SET are unordered. Contain a particular value more than once, is +not allowed. It is not possible to contain unset members.

      +
      +
      Parameters
      +
        +
      • value (str) – value

      • +
      • dtype

      • +
      +
      +
      Return type
      +

      set

      +
      +
      +
      + +
      +
      +class STRING[source]
      +

      Bases: str

      +

      EXPRESS Type STRING

      +

      This is the most often used simple type. EXPRESS strings can be +of any length and can contain any character (ISO 10646/Unicode).

      +
      +
      class SURFACE_CURVE(name, curve_3d, associated_geometry, master_representation)[source]
      @@ -721,19 +975,20 @@ total number of instances

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • +
      • name (STRING) – label

      • curve_3d (CURVE) –

      • -
      • associated_geometry (list of pcurve_or_surface) –

      • -
      • master_representation (preferred_surface_curve_representation) –

      • +
      • associated_geometry (LIST[Union[PCURVE, SURFACE], ..]) – STEP Standard TYPE LIST OF +pcurve_or_surface (SELECT) <<TODO>>

      • +
      • master_representation (PREFERRED_SURFACE_CURVE_REPRESENTATION) – <<TODO>>

      Derived Attributes

      -
      Parameters
      +
      Variables
        -
      • dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      • -
      • basis_surface (SET OF surface) –

      • +
      • dim (INTEGER) – dimension_count

      • +
      • basis_surface (SET[SURFACE, ..]) – <<TODO>>

      @@ -751,7 +1006,7 @@ total number of instances

      Explicit Attributes

      Parameters
      -

      name (str) – STEP Standard TYPE label (STRING)

      +

      name (STRING) – label

      @@ -769,16 +1024,16 @@ total number of instances

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • +
      • name (STRING) – label

      • orientation (DIRECTION) –

      • -
      • magnitude (float) – length_measure

      • +
      • magnitude (REAL) – length_measure

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      @@ -795,7 +1050,7 @@ total number of instances

      Explicit Attributes

      Parameters
      -

      name (str) – STEP Standard TYPE label (STRING)

      +

      name (STRING) – label

      @@ -813,15 +1068,15 @@ total number of instances

      Parameters
        -
      • name (str) – STEP Standard TYPE label (STRING)

      • +
      • name (STRING) – label

      • vertex_geometry (POINT) – point

      Derived Attributes

      -
      Parameters
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER)

      +
      Variables
      +

      dim (INTEGER) – dimension_count

      @@ -843,9 +1098,9 @@ total number of instances

      Parameters
        -
      • b (bool) – STEP Standard TYPE BOOLEAN

      • -
      • choice1 (object) – STEP Standard TYPE GENERIC

      • -
      • choice2 (object) – STEP Standard TYPE GENERIC

      • +
      • b (BOOLEAN) –

      • +
      • choice1 (GENERIC) –

      • +
      • choice2 (GENERIC) –

      Returns
      @@ -867,16 +1122,16 @@ total number of instances

      STEP Standard FUNCTION dimension_of

      Parameters
      -

      item (GEOMETRIC_REPRESENTATION_ITEM) – STEP Standard TYPE GEOMETRIC_REPRESENTATION_ITEM

      +

      item (GEOMETRIC_REPRESENTATION_ITEM) –

      Returns

      dim

      Return type
      -

      int or None

      +

      Union[int, None]

      Variables
      -

      dim (int) – STEP Standard TYPE dimension_count (INTEGER). +

      dim (INTEGER) – dimension_count dimension_count > 0

      @@ -893,20 +1148,22 @@ dimension_count > 0

      Parameters
        -
      • lis (tuple) – STEP Standard TYPE LIST [0:?] OF GENERIC

      • -
      • low (int) – STEP Standard TYPE INTEGER

      • -
      • u (int) – STEP Standard TYPE INTEGER

      • -
      • n (int) – STEP Standard TYPE INTEGER

      • +
      • lis (tuple[GENERIC, ..]) – STEP Standard TYPE LIST [0:?] OF GENERIC

      • +
      • low (INTEGER) –

      • +
      • u (INTEGER) –

      Returns

      res

      Return type
      -

      tuple or None

      +

      Union[tuple, None]

      Variables
      -

      res (tuple) – STEP Standard TYPE ARRAY [low:u] OF GENERIC

      +
        +
      • n (INTEGER) –

      • +
      • res (tuple[GENERIC, ..]) – STEP Standard TYPE ARRAY [low:u] OF GENERIC

      • +
      @@ -922,16 +1179,16 @@ dimension_count > 0

      Check if the path is a connected curve set.

      Parameters
      -

      a_path (PATH) – STEP Standard TYPE path

      +

      a_path (PATH) –

      Returns

      p

      Return type
      -

      object

      +

      LOGICAL

      Variables
      -

      p – STEP STEP Standard TYPE LOGICAL

      +

      p

      @@ -962,7 +1219,28 @@ dimension_count > 0

      Contents:

      diff --git a/docs/build/html/pylib.date.html b/docs/build/html/pylib.date.html index e9e91dd..3c2c358 100644 --- a/docs/build/html/pylib.date.html +++ b/docs/build/html/pylib.date.html @@ -183,7 +183,28 @@

      Contents:

      diff --git a/docs/build/html/pylib.drawblock.html b/docs/build/html/pylib.drawblock.html index 0dcded6..125d095 100644 --- a/docs/build/html/pylib.drawblock.html +++ b/docs/build/html/pylib.drawblock.html @@ -86,7 +86,28 @@

      Contents:

      diff --git a/docs/build/html/pylib.function.html b/docs/build/html/pylib.function.html index 0482dae..f18b745 100644 --- a/docs/build/html/pylib.function.html +++ b/docs/build/html/pylib.function.html @@ -47,26 +47,29 @@
      b_spline_basis(knots, knot_span, degree)[source]

      Cox-de Boor algorithm / recursion formula.

      -

      Calculate the i-th B-spline basis function of degree p: N_{i,p}(u)

      +

      Calculate the i-th B-spline basis function of degree p: +\(N_{i,p}(u)\)

      Parameters
      • knots (list) – Knot vector U. m + 1 non-decreasing numbers / knots, -\(u_0 <= u_1 <= u_2 <= ... <= u_m\)

      • +\(u_0 \le u_1 \le u_2 \le \dots \le u_m\)

      • knot_span (int) – i-th knot span

      • degree (int) – degree of B-spline basis function

      Returns
      -

      B-spline basis function using variable, u in [u_0, u_m]

      +

      B-spline basis function using variable, +\(u \in [u_0, u_m]\)

      Return type

      function

      -\[\begin{split}N_{i,0}(u) &= \begin{cases} 1 & \text{if } u_i \le u \lt u_{i+1} \\ -0 & \text{otherwise}\end{cases} \\ +\[\begin{split}N_{i,0}(u) &= \begin{cases} + 1 & \text{if } u_i \le u \lt u_{i+1} \\ + 0 & \text{otherwise}\end{cases} \\ N_{i,p}(u) &= \frac{u - u_i}{u_{i+p} - u_i} N_{i,p-1}(u) + \frac{u_{i+p+1} - u}{u_{i+p+1} - u_{i+1}} N_{i+1,p-1}(u)\end{split}\]
      @@ -82,11 +85,11 @@ N_{i,p}(u) &= \frac{u - u_i}{u_{i+p} - u_i} N_{i,p-1}(u) +
    • degree (int) – degree of B-spline basis functions

    • control_points (list) – control points P, n + 1 control points

    • knots (list) – Knot vector U. m + 1 non-decreasing numbers / knots, -\(u_0 <= u_1 <= u_2 <= ... <= u_m\)

    • +\(u_0 \le u_1 \le u_2 \le \dots \le u_m\)

      Returns
      -

      B-spline curve using variable, u in [u_0, u_m]

      +

      B-spline curve using variable, \(u \in [u_0, u_m]\)

      Return type

      function

      @@ -100,10 +103,11 @@ N_{i,p}(u) &= \frac{u - u_i}{u_{i+p} - u_i} N_{i,p-1}(u) +
    • the curve will not touch the first and last legs of the control polyline

    • the knot vector does not have any particular structure

    • -
    • for degree p, intervals [u_0, u_p) and [u_{n-p}, u_n) will not -have “full support” of basis functions and are ignored when a -B-spline curve is open. For open B-spline curves, the domain -is inteval [u_p, u_{n-p}]

    • +
    • for degree p, intervals \([u_0, u_p)\) and +\([u_{n-p}, u_n)\) will not have “full support” of basis +functions and are ignored when a B-spline curve is open. For +open B-spline curves, the domain is inteval +\([u_p, u_{n-p}]\)

    • clamped B-spline curves, nonperiodic B-spline curves

      @@ -118,7 +122,7 @@ a Bézier curve

      • the start and the end of the generated curve join together forming a closed loop

      • -
      • repeating some knots and control points # TODO: which?

      • +
      • repeating some knots and control points (TODO: which?)

    • uniform B-spline curves

      @@ -202,10 +206,10 @@ y(\theta) = r\sin\theta \\
      cosine_wave(A=1, k=1, f=1, phi=0, D=0, degree=False)[source]

      A cosine wave is said to be sinusoidal, because, -\(\cos(x) = \sin(x + \pi/2)\), which is also a sine wave with a -phase-shift of π/2 radians. Because of this head start, it is often -said that the cosine function leads the sine function or the sine -lags the cosine.

      +\(\cos(x) = \sin(x + \pi/2)\), which is also a sine wave with +a phase-shift of π/2 radians. Because of this head start, it is +often said that the cosine function leads the sine function or +the sine lags the cosine.

      Parameters
        @@ -363,9 +367,9 @@ y(\theta) = (R - r)\sin\theta - d\sin\left(\frac{R-r}{r}\theta\right) \\ * * *
    • -
      >>> x, y = hyotrochoid(20, 6, 6)[:2]
      ->>> x, y, _ = hyotrochoid(20, 6, 6)
      ->>> x, y, interval = hyotrochoid(20, 6, 6)
      +
      >>> x, y = hypotrochoid(20, 6, 6)[:2]
      +>>> x, y, _ = hypotrochoid(20, 6, 6)
      +>>> x, y, interval = hypotrochoid(20, 6, 6)
       
      @@ -625,7 +629,28 @@ Example of 3 columns and 3 rows (upside down view of ‘normal’ braille/drawil

      Contents:

      diff --git a/docs/build/html/pylib.geometry.html b/docs/build/html/pylib.geometry.html index 4b7d0c6..b8b66ed 100644 --- a/docs/build/html/pylib.geometry.html +++ b/docs/build/html/pylib.geometry.html @@ -420,7 +420,28 @@ The Wireframe class create its own points (copy).

      Contents:

      diff --git a/docs/build/html/pylib.geometry2d.html b/docs/build/html/pylib.geometry2d.html index 14f9ac1..39b1a11 100644 --- a/docs/build/html/pylib.geometry2d.html +++ b/docs/build/html/pylib.geometry2d.html @@ -235,7 +235,7 @@ x = s\,L + x_1\end{split}\]
      >>> x, y = line((0, 0), (1, 0))
       >>> print(x, y)
      -((0, 1), (0, 0))
      +(0, 1) (0, 0)
       
      @@ -467,7 +467,28 @@ around a given origin. The angle should be given in radians.

      Contents:

      diff --git a/docs/build/html/pylib.geometry2d_plot.html b/docs/build/html/pylib.geometry2d_plot.html index 0ff8944..83597cc 100644 --- a/docs/build/html/pylib.geometry2d_plot.html +++ b/docs/build/html/pylib.geometry2d_plot.html @@ -74,7 +74,28 @@

      Contents:

      diff --git a/docs/build/html/pylib.geometry_plot.html b/docs/build/html/pylib.geometry_plot.html index 0c81824..05e40ba 100644 --- a/docs/build/html/pylib.geometry_plot.html +++ b/docs/build/html/pylib.geometry_plot.html @@ -64,7 +64,28 @@

      Contents:

      diff --git a/docs/build/html/pylib.geometry_plot_pylab.html b/docs/build/html/pylib.geometry_plot_pylab.html index c1c8c2f..84cfc17 100644 --- a/docs/build/html/pylib.geometry_plot_pylab.html +++ b/docs/build/html/pylib.geometry_plot_pylab.html @@ -135,7 +135,28 @@ working for 3D.

      Contents:

      diff --git a/docs/build/html/pylib.helper.html b/docs/build/html/pylib.helper.html index 27d29ea..83be967 100644 --- a/docs/build/html/pylib.helper.html +++ b/docs/build/html/pylib.helper.html @@ -90,18 +90,16 @@ used for the print-out

      Example

      -
      >>> with timeit('section_test'):
      -...   # code
      -section_test took 0.006 ms
      -
      -
      -
      @timeit('func')
      +
      with timeit('section_test'):
      +  # code
      +section_test took 0.006 ms
      +
      +@timeit('func')
       def func():
         # code
      -
      -
      -
      >>> func()
      -func took 0.006 ms
      +
      +func()
      +func took 0.006 ms
       
      @@ -128,7 +126,28 @@ used for the print-out

      Contents:

      diff --git a/docs/build/html/pylib.html b/docs/build/html/pylib.html index 58e32d3..520f00b 100644 --- a/docs/build/html/pylib.html +++ b/docs/build/html/pylib.html @@ -97,7 +97,31 @@

      Contents:

      diff --git a/docs/build/html/pylib.mathematics.html b/docs/build/html/pylib.mathematics.html index a2097a9..4c827aa 100644 --- a/docs/build/html/pylib.mathematics.html +++ b/docs/build/html/pylib.mathematics.html @@ -61,8 +61,7 @@
      Example

      -
      >>> m = matrix([[1, 2, 3, 0], [4, 5, 6, 0], [7, 8, 9, 0], \
      -                [0, 0, 0, 0]])
      +
      >>> m = matrix([[1, 2, 3, 0], [4, 5, 6, 0], [7, 8, 9, 0], [0, 0, 0, 0]])
       >>> print(m[:])
       [[1, 2, 3, 0], [4, 5, 6, 0], [7, 8, 9, 0], [0, 0, 0, 0]]
       >>> print(m[2])
      @@ -103,20 +102,16 @@ for wrong usage (result will be nonsense).

      Example

      -
      >>> m = matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], \
      -                [0, 0, 0, 1]]) * 5
      +
      >>> m = matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [0, 0, 0, 1]]) * 5
       >>> print(m)
       [[5, 10, 15, 20], [25, 30, 35, 40], [45, 50, 55, 60], [0, 0, 0, 5]]
      ->>> m = matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], \
      -                [0, 0, 0, 1]]) * 5.
      +>>> m = matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [0, 0, 0, 1]]) * 5.
       >>> print(m)
       [[5.0, 10.0, 15.0, 20.0], [25.0, 30.0, 35.0, 40.0], [45.0, 50.0, 55.0, 60.0], [0.0, 0.0, 0.0, 5.0]]
      ->>> v = matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) * \
      -    vector([12, 12, 13])
      +>>> v = matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) * vector([12, 12, 13])
       >>> print(v)
       [75, 186, 297]
      ->>> m = matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) * \
      -    matrix([[12, 12, 13], [14, 15, 16], [17, 18, 19]])
      +>>> m = matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) * matrix([[12, 12, 13], [14, 15, 16], [17, 18, 19]])
       >>> print(m)
       [[91, 96, 102], [220, 231, 246], [349, 366, 390]]
       
      @@ -153,12 +148,10 @@ for wrong usage (result will be nonsense).

      Example

      -
      >>> m = 5 * matrix([[1, 2, 3, 4], [5, 6, 7, 8], \
      -                    [9, 10, 11, 12], [0, 0, 0, 1]])
      +
      >>> m = 5 * matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [0, 0, 0, 1]])
       >>> print(m)
       [[5, 10, 15, 20], [25, 30, 35, 40], [45, 50, 55, 60], [0, 0, 0, 5]]
      ->>> m = 5. * matrix([[1, 2, 3, 4], [5, 6, 7, 8], \
      -                     [9, 10, 11, 12], [0, 0, 0, 1]])
      +>>> m = 5. * matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [0, 0, 0, 1]])
       >>> print(m)
       [[5.0, 10.0, 15.0, 20.0], [25.0, 30.0, 35.0, 40.0], [45.0, 50.0, 55.0, 60.0], [0.0, 0.0, 0.0, 5.0]]
       
      @@ -538,7 +531,7 @@ filled with zeros.

      >>> m = vector([1, 2, 3])
       >>> m *= vector([3, 3, 3])
       >>> print(v)
      -[[3, 3, 3], [6, 6, 6], [9, 9, 9]]
      +18
       
      @@ -604,7 +597,7 @@ other object.

      >>> v = vector([1, 2, 3, 4, 5])
      ->>> v[1:3]
      +>>> print(v[1:3])
       [2, 3]
       >>> v = vector([1, 2, 3, 4, 5])
       >>> v[3]
      @@ -994,12 +987,15 @@ numbers.

      Example

      -
      >>> v = vector.random(3)
      +
      >>> import random
      +>>> random.seed(1)
      +>>> v = vector.random(3)
       >>> print(v)
      -[0.9172905912930438, 0.8908124278322492, 0.5256002790725927]
      +[0.13436424411240122, 0.8474337369372327, 0.763774618976614]
      +>>> random.seed(1)
       >>> v = vector.random(3, 1, 2)
       >>> print(v)
      -[1.2563665665080803, 1.9270454509964547, 1.2381672401270487]
      +[1.134364244112401, 1.8474337369372327, 1.7637746189766141]
       
      @@ -1135,7 +1131,28 @@ where it should be.

      Contents:

      diff --git a/docs/build/html/pylib.numerical.fit.html b/docs/build/html/pylib.numerical.fit.html index d765b81..087046e 100644 --- a/docs/build/html/pylib.numerical.fit.html +++ b/docs/build/html/pylib.numerical.fit.html @@ -128,7 +128,23 @@ amplitude a, expected value \(\mu\)Contents:

      diff --git a/docs/build/html/pylib.numerical.html b/docs/build/html/pylib.numerical.html index 687cd80..8af0f33 100644 --- a/docs/build/html/pylib.numerical.html +++ b/docs/build/html/pylib.numerical.html @@ -69,7 +69,23 @@

      Contents:

      diff --git a/docs/build/html/pylib.numerical.integration.html b/docs/build/html/pylib.numerical.integration.html index bad7bc8..87023dd 100644 --- a/docs/build/html/pylib.numerical.integration.html +++ b/docs/build/html/pylib.numerical.integration.html @@ -111,7 +111,7 @@ b &= 1\end{split}\]
      = \left. \frac{1}{3} x^3 \right\vert_0^1 = \frac{1}{3}\]

      numerical solution

      -
      >>> f = lambda(x): x**2
      +
      >>> f = lambda x: x**2
       >>> trapez(f, 0, 1, 1)
       0.5
       >>> trapez(f, 0, 1, 10)
      @@ -144,7 +144,23 @@ b &= 1\end{split}\]

      Contents:

      diff --git a/docs/build/html/pylib.numerical.ode.html b/docs/build/html/pylib.numerical.ode.html index 49c0acd..f4cc908 100644 --- a/docs/build/html/pylib.numerical.ode.html +++ b/docs/build/html/pylib.numerical.ode.html @@ -327,7 +327,23 @@ t &\in [t_0, t_n]\end{split}\]

      Contents:

      diff --git a/docs/build/html/pylib.numerical.ode_model.html b/docs/build/html/pylib.numerical.ode_model.html index 2ec18de..2a14a5b 100644 --- a/docs/build/html/pylib.numerical.ode_model.html +++ b/docs/build/html/pylib.numerical.ode_model.html @@ -178,7 +178,23 @@ system of 3x2 first-order differential equations.

      Contents:

      diff --git a/docs/build/html/pylib.time_of_day.html b/docs/build/html/pylib.time_of_day.html index cc3de20..9d57fb0 100644 --- a/docs/build/html/pylib.time_of_day.html +++ b/docs/build/html/pylib.time_of_day.html @@ -16,6 +16,7 @@ + @@ -237,7 +238,28 @@

      Contents:

      @@ -249,6 +271,7 @@
    • pylib
    • diff --git a/docs/build/html/pylib.tui.html b/docs/build/html/pylib.tui.html index 267efee..c7a17d6 100644 --- a/docs/build/html/pylib.tui.html +++ b/docs/build/html/pylib.tui.html @@ -265,7 +265,28 @@ the left.

      Contents:

      diff --git a/docs/build/html/searchindex.js b/docs/build/html/searchindex.js index 79b2c50..36930bc 100644 --- a/docs/build/html/searchindex.js +++ b/docs/build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["index","modules","pylib","pylib.data","pylib.data_step","pylib.data_step_std","pylib.date","pylib.drawblock","pylib.function","pylib.geometry","pylib.geometry2d","pylib.geometry2d_plot","pylib.geometry_plot","pylib.geometry_plot_pylab","pylib.helper","pylib.mathematics","pylib.numerical","pylib.numerical.fit","pylib.numerical.integration","pylib.numerical.ode","pylib.numerical.ode_model","pylib.time_of_day","pylib.tui"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.viewcode":1,sphinx:56},filenames:["index.rst","modules.rst","pylib.rst","pylib.data.rst","pylib.data_step.rst","pylib.data_step_std.rst","pylib.date.rst","pylib.drawblock.rst","pylib.function.rst","pylib.geometry.rst","pylib.geometry2d.rst","pylib.geometry2d_plot.rst","pylib.geometry_plot.rst","pylib.geometry_plot_pylab.rst","pylib.helper.rst","pylib.mathematics.rst","pylib.numerical.rst","pylib.numerical.fit.rst","pylib.numerical.integration.rst","pylib.numerical.ode.rst","pylib.numerical.ode_model.rst","pylib.time_of_day.rst","pylib.tui.rst"],objects:{"":{"function":[8,0,0,"-"],data:[3,0,0,"-"],data_step:[4,0,0,"-"],data_step_std:[5,0,0,"-"],date:[6,0,0,"-"],drawblock:[7,0,0,"-"],fit:[17,0,0,"-"],geometry2d:[10,0,0,"-"],geometry2d_plot:[11,0,0,"-"],geometry:[9,0,0,"-"],geometry_plot:[12,0,0,"-"],geometry_plot_pylab:[13,0,0,"-"],helper:[14,0,0,"-"],integration:[18,0,0,"-"],mathematics:[15,0,0,"-"],ode:[19,0,0,"-"],ode_model:[20,0,0,"-"],pylib:[2,0,0,"-"],time_of_day:[21,0,0,"-"],tui:[22,0,0,"-"]},"pylib.data":{find_last:[3,1,1,""],fold_list:[3,1,1,""],get_id:[3,1,1,""],issequence:[3,1,1,""],load:[3,1,1,""],print_list:[3,1,1,""],read:[3,1,1,""],read_columns:[3,1,1,""],seq:[3,1,1,""],store:[3,1,1,""],str_between:[3,1,1,""],str_to_list:[3,1,1,""],unique_ending:[3,1,1,""],unique_list:[3,1,1,""],unique_list_hashable:[3,1,1,""],write:[3,1,1,""]},"pylib.data_step":{arc_circle_geometry:[4,1,1,""],b_spline_curve_with_knots_geometry:[4,1,1,""],data_cmds_to_data_dict:[4,1,1,""],data_dict_edge_curve_to_geometry:[4,1,1,""],data_dict_to_geometry_world:[4,1,1,""],data_dict_to_geometry_world_edge_curve:[4,1,1,""],data_section_dict:[4,1,1,""],line_geometry:[4,1,1,""],print_edge_loop:[4,1,1,""],step:[4,2,1,""],str_to_cmd_args:[4,1,1,""]},"pylib.data_step_std":{AXIS2_PLACEMENT_2D:[5,2,1,""],AXIS2_PLACEMENT_3D:[5,2,1,""],BOOLEAN_to_bool:[5,1,1,""],BOUNDED_CURVE:[5,2,1,""],B_SPLINE_CURVE:[5,2,1,""],B_SPLINE_CURVE_WITH_KNOTS:[5,2,1,""],CARTESIAN_POINT:[5,2,1,""],CIRCLE:[5,2,1,""],CONIC:[5,2,1,""],CURVE:[5,2,1,""],DIRECTION:[5,2,1,""],EDGE:[5,2,1,""],EDGE_CURVE:[5,2,1,""],EDGE_LOOP:[5,2,1,""],ELLIPSE:[5,2,1,""],GEOMETRIC_REPRESENTATION_ITEM:[5,2,1,""],LINE:[5,2,1,""],LOOP:[5,2,1,""],ORIENTED_EDGE:[5,2,1,""],PATH:[5,2,1,""],PLACEMENT:[5,2,1,""],POINT:[5,2,1,""],REPRESENTATION_ITEM:[5,2,1,""],SEAM_CURVE:[5,2,1,""],SURFACE_CURVE:[5,2,1,""],TOPOLOGICAL_REPRESENTATION_ITEM:[5,2,1,""],VECTOR:[5,2,1,""],VERTEX:[5,2,1,""],VERTEX_POINT:[5,2,1,""],boolean_choose:[5,1,1,""],dimension_of:[5,1,1,""],list_to_array:[5,1,1,""],path_head_to_tail:[5,1,1,""]},"pylib.data_step_std.CARTESIAN_POINT":{__str__:[5,3,1,""]},"pylib.data_step_std.REPRESENTATION_ITEM":{idn:[5,4,1,""]},"pylib.data_step_std.VERTEX_POINT":{__str__:[5,3,1,""]},"pylib.date":{"gau\u00dfsche_osterformel":[6,1,1,""],ascension_of_jesus:[6,1,1,""],easter_friday:[6,1,1,""],easter_monday:[6,1,1,""],easter_sunday:[6,1,1,""],pentecost:[6,1,1,""]},"pylib.drawblock":{histogram:[7,1,1,""]},"pylib.function":{b_spline_basis:[8,1,1,""],b_spline_curve_with_knots:[8,1,1,""],b_spline_knots:[8,1,1,""],circle:[8,1,1,""],cosine_wave:[8,1,1,""],ellipse:[8,1,1,""],epitrochoid:[8,1,1,""],hypotrochoid:[8,1,1,""],sample_half_open:[8,1,1,""],sample_half_open_seq:[8,1,1,""],sine_wave:[8,1,1,""],to_str:[8,1,1,""],transformation:[8,1,1,""]},"pylib.geometry":{ArcBSplineCurveWithKnots:[9,2,1,""],ArcCircle:[9,2,1,""],ArcEllipse:[9,2,1,""],B_spline_curve_with_knots:[9,2,1,""],CS:[9,2,1,""],Circle:[9,2,1,""],Direction:[9,2,1,""],Ellipse:[9,2,1,""],Hexahedron:[9,2,1,""],Line:[9,2,1,""],Point:[9,2,1,""],Polygon:[9,2,1,""],Polyline:[9,2,1,""],Properties:[9,2,1,""],Solid:[9,2,1,""],World:[9,2,1,""],sample_half_open:[9,1,1,""]},"pylib.geometry.CS":{get_coordinates:[9,3,1,""],init_xyz:[9,3,1,""],x90:[9,3,1,""],xm90:[9,3,1,""],y90:[9,3,1,""],ym90:[9,3,1,""]},"pylib.geometry.Direction":{cross:[9,3,1,""]},"pylib.geometry.Point":{projection:[9,3,1,""]},"pylib.geometry.Polyline":{__iter__:[9,3,1,""],__repr__:[9,3,1,""],__str__:[9,3,1,""],ch_cs:[9,3,1,""],points:[9,3,1,""],rotate_x:[9,3,1,""],rotate_y:[9,3,1,""],rotate_z:[9,3,1,""],scale:[9,3,1,""],translate:[9,3,1,""],xy:[9,3,1,""],xyz:[9,3,1,""]},"pylib.geometry.Properties":{circle_sectors:[9,4,1,""]},"pylib.geometry.Solid":{ch_cs:[9,3,1,""],scale:[9,3,1,""],translate:[9,3,1,""],wireframes:[9,3,1,""]},"pylib.geometry.World":{__iter__:[9,3,1,""],__str__:[9,3,1,""],add:[9,3,1,""],bounding_box:[9,3,1,""],center:[9,3,1,""],ch_cs:[9,3,1,""],cs:[9,3,1,""],objects:[9,3,1,""],rotate_x:[9,3,1,""],rotate_y:[9,3,1,""],rotate_z:[9,3,1,""],scale:[9,3,1,""],space_diagonal:[9,3,1,""],translate:[9,3,1,""],wireframes:[9,3,1,""],wireframes_xy:[9,3,1,""],wireframes_xyz:[9,3,1,""]},"pylib.geometry2d":{angle:[10,1,1,""],cubic:[10,1,1,""],cubic_deg:[10,1,1,""],cubics:[10,1,1,""],distance:[10,1,1,""],interpolate_hermite:[10,1,1,""],line:[10,1,1,""],lines:[10,1,1,""],rectangle:[10,1,1,""],rotate:[10,1,1,""],rotate_deg:[10,1,1,""],rotate_xy:[10,1,1,""],square:[10,1,1,""],translate:[10,1,1,""],translate_xy:[10,1,1,""]},"pylib.geometry2d_plot":{plot_cubic_lines:[11,1,1,""],plot_lines:[11,1,1,""]},"pylib.geometry_plot_pylab":{cad_wireframe:[13,1,1,""],plot_post:[13,1,1,""],set_aspect_equal:[13,1,1,""],wireframe3d:[13,1,1,""]},"pylib.helper":{cd:[14,2,1,""],run_file:[14,1,1,""],timeit:[14,2,1,""]},"pylib.mathematics":{lcm:[15,1,1,""],matrix:[15,2,1,""],vector:[15,2,1,""]},"pylib.mathematics.matrix":{__getitem__:[15,3,1,""],__mul__:[15,3,1,""],__repr__:[15,3,1,""],__rmul__:[15,3,1,""],__setitem__:[15,3,1,""],__str__:[15,3,1,""],rotate_x:[15,3,1,""],rotate_y:[15,3,1,""],rotate_z:[15,3,1,""],rx:[15,3,1,""],ry:[15,3,1,""],rz:[15,3,1,""],s:[15,3,1,""],scale:[15,3,1,""],t:[15,3,1,""],translate:[15,3,1,""],transpose:[15,3,1,""],transposed:[15,3,1,""],zeros:[15,3,1,""]},"pylib.mathematics.vector":{__abs__:[15,3,1,""],__add__:[15,3,1,""],__ge__:[15,3,1,""],__getitem__:[15,3,1,""],__gt__:[15,3,1,""],__iadd__:[15,3,1,""],__le__:[15,3,1,""],__lt__:[15,3,1,""],__matmul__:[15,3,1,""],__mul__:[15,3,1,""],__neg__:[15,3,1,""],__pos__:[15,3,1,""],__repr__:[15,3,1,""],__rmul__:[15,3,1,""],__str__:[15,3,1,""],__sub__:[15,3,1,""],abs:[15,3,1,""],ang:[15,3,1,""],arg:[15,3,1,""],ch_cs:[15,3,1,""],conjugate:[15,3,1,""],cross:[15,3,1,""],full:[15,3,1,""],im:[15,3,1,""],isclose:[15,3,1,""],iscloseto:[15,3,1,""],normalize:[15,3,1,""],normalized:[15,3,1,""],ones:[15,3,1,""],random:[15,3,1,""],re:[15,3,1,""],rotate_x:[15,3,1,""],rotate_y:[15,3,1,""],rotate_z:[15,3,1,""],scale:[15,3,1,""],translate:[15,3,1,""],zeros:[15,3,1,""]},"pylib.numerical":{fit:[17,0,0,"-"],integration:[18,0,0,"-"],ode:[19,0,0,"-"],ode_model:[20,0,0,"-"]},"pylib.numerical.fit":{gauss:[17,1,1,""],gauss_fit:[17,1,1,""]},"pylib.numerical.integration":{trapez:[18,1,1,""]},"pylib.numerical.ode":{e1:[19,1,1,""],e2:[19,1,1,""],e4:[19,1,1,""],fpi:[19,1,1,""],i1:[19,1,1,""],newmark_newtonraphson:[19,1,1,""],newmark_newtonraphson_mdk:[19,1,1,""]},"pylib.numerical.ode_model":{disk:[20,1,1,""]},"pylib.time_of_day":{days:[21,1,1,""],days_norm:[21,1,1,""],hours:[21,1,1,""],hours_norm:[21,1,1,""],in_seconds:[21,1,1,""],minutes:[21,1,1,""],minutes_norm:[21,1,1,""],seconds:[21,1,1,""],seconds_norm:[21,1,1,""],transform:[21,1,1,""]},"pylib.tui":{App:[22,2,1,""],StdOutWrapper:[22,2,1,""],Window:[22,2,1,""],newwin:[22,1,1,""]},"pylib.tui.App":{clear:[22,3,1,""],color_def:[22,3,1,""],color_table:[22,3,1,""],end:[22,3,1,""],getch:[22,3,1,""],main_loop:[22,3,1,""],refresh:[22,3,1,""]},"pylib.tui.StdOutWrapper":{get_text:[22,3,1,""],write:[22,3,1,""]},"pylib.tui.Window":{border:[22,3,1,""],clear:[22,3,1,""],derwin:[22,3,1,""],getch:[22,3,1,""],getmaxyx:[22,3,1,""],initscr:[22,3,1,""],instr:[22,3,1,""],refresh:[22,3,1,""],text:[22,3,1,""],textbox:[22,3,1,""]},pylib:{"function":[8,0,0,"-"],data:[3,0,0,"-"],data_step:[4,0,0,"-"],data_step_std:[5,0,0,"-"],date:[6,0,0,"-"],drawblock:[7,0,0,"-"],geometry2d:[10,0,0,"-"],geometry2d_plot:[11,0,0,"-"],geometry:[9,0,0,"-"],geometry_plot:[12,0,0,"-"],geometry_plot_pylab:[13,0,0,"-"],helper:[14,0,0,"-"],mathematics:[15,0,0,"-"],numerical:[16,0,0,"-"],time_of_day:[21,0,0,"-"],tui:[22,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"],"4":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method","4":"py:attribute"},terms:{"14t14":[3,4],"1st":[4,19],"259f":8,"28ff":8,"2\u03c0f":8,"2nd":[4,19],"3x2":20,"4th":19,"9fsche_osterformel":6,"\u03bb":8,"\u03bd":8,"\u03c0":8,"\u03c6":8,"\u03c9":8,"b\u00e9zier":8,"boolean":[5,8],"case":[8,18],"catch":22,"char":[3,8,22],"class":[4,5,9,14,15,22],"default":[3,8,10,17,18,19,20,21,22],"enum":5,"f\u00fcr":6,"float":[3,5,8,10,17,18,19,20,21],"fr\u00fchling":6,"function":[1,2,3,5,9,14,15,17,18,19,20],"gau\u00dfsch":6,"gau\u00dfsche_osterformel":6,"int":[3,5,6,8,10,15,17,18,19,22],"korrekturgr\u00f6\u00df":6,"m\u00e4rz":6,"m\u00e4rzdatum":6,"new":[4,15,21,22],"return":[3,5,6,8,9,10,15,17,18,19,20,21,22],"s\u00e4kular":6,"s\u00e4kularzahl":6,"static":15,"switch":8,"true":[3,5,8,13,15,22],"vorw\u00e4rt":19,Axes:13,Das:6,For:[0,8,9,15,20],The:[0,3,4,5,8,9,10,15,18,19,20,21,22],Use:15,Using:[4,19],With:9,_____:8,__abs__:15,__add__:15,__contains__:15,__eq__:15,__ge__:15,__getitem__:15,__gt__:15,__iadd__:15,__imatmul__:15,__imul__:15,__isub__:15,__iter__:[9,15],__le__:15,__lt__:15,__matmul__:15,__mul__:15,__ne__:15,__neg__:15,__pos__:15,__repr__:[9,15],__rmul__:15,__setitem__:15,__stderr__:[],__stdout__:[],__str__:[5,9,15],__sub__:15,a_i:15,a_path:5,about:15,abs:15,abs_tol:15,absolut:[10,15],activ:0,add:[9,22],adding:9,addit:[4,5,10],affin:9,after:[3,14],afterward:15,against:19,agre:5,algorithm:8,algorithmu:6,alia:8,all:[4,22],als:6,also:[0,8,22],alwai:9,amplitud:[8,17],anaconda:0,analyt:18,ang1:9,ang2:9,ang:15,angl:[10,13],angle1:10,angle2:10,angular:8,ani:[5,8],anim:8,app:22,appear:13,appli:8,applic:5,approx:18,approxim:[17,18,19],april:6,arc:9,arc_circle_geometri:4,arcbsplinecurvewithknot:9,arccircl:9,arcellips:9,arcwis:5,area:18,arg:15,argument:[4,8,10],arithmet:3,around:[8,10,15,22],arrai:[3,5],ascens:6,ascension_of_jesu:6,ascii:3,associ:5,associated_geometri:5,assum:[4,10],attach:8,attribut:[5,22],augment:9,author:[3,4],autom:5,automotive_design:[3,4],avail:22,averag:21,avoid:15,axes:13,axi:[5,8,13],axis2_plac:5,axis2_placement_2d:5,axis2_placement_3d:5,axonometr:13,b_spline:4,b_spline_basi:8,b_spline_curv:5,b_spline_curve_form:5,b_spline_curve_with_knot:[5,8,9],b_spline_curve_with_knots_geometri:4,b_spline_knot:8,back:[14,15,22],background:22,backward:19,base:[0,4,5,9,14,15,18,22],basi:8,basis_surfac:5,bat:0,becaus:8,becom:[4,19],befor:[3,14],begin:[8,15,19,20,22],beta:19,between:[3,4,8,10],binari:3,block:[0,3,7,8,14],bmatrix:[15,19,20],bool:[3,5,8,17,18,19],boolean_choos:5,boolean_to_bool:5,boor:8,border:22,both:[9,15],bottom:[8,10,22],bound:3,boundari:10,bounded_curv:5,bounding_box:9,braill:[0,8],build:[0,10],cad_wirefram:13,calcul:[6,8,17,21],call:8,can:[0,3,4,5,9,15,22],carbinet:13,cartesian_point:[4,5],cascad:[3,4],cauchi:19,cavali:13,cdot:[15,19,20],center:[8,9,10,13,15],ch_c:[9,15],chang:[8,10,14],char_set:8,charact:[0,7,8,22],characterist:8,chart:[0,7,8],check:[5,15,22],choice1:5,choice2:5,choos:19,circl:[5,8,9],circle_sector:9,circular_arc:5,clamp:[4,8],classmethod:9,clean:22,clear:[5,22],close:[3,4,8,9],closed_curv:5,cmd_str:4,code:14,color:22,color_def:22,color_pair:22,color_t:22,column:[3,8,15,22],com:[0,5,13],comma:4,command:4,common:[3,15],complex:15,composit:18,comput:15,conda:0,condabin:0,condit:[8,10,19],conduct:15,conic:[4,5],conjug:15,connect:5,consecut:3,consist:5,consol:22,constant:3,content:[0,3,22],context:14,contextdecor:14,contextlib:14,control:8,control_point:[5,8,9],control_point_span:8,control_points_list:5,convert:[3,4,21],coordin:[5,9,10,15,22],copi:9,corner:22,cos:[8,15,20],cosin:8,cosine_wav:8,counterclockwis:10,cox:8,creat:[3,4,9,15],cross:[9,15],cube:13,cubic:10,cubic_deg:10,cudb:8,current:[4,14],curs:[0,22],curv:[4,5,8,9],curve_3d:5,curve_form:5,curvilinear:13,cycl:8,dai:[6,21],damp:19,data:[1,2,4,5,8,17],data_cmd:4,data_cmds_to_data_dict:4,data_dict:4,data_dict_edge_curve_to_geometri:4,data_dict_to_geometry_world:4,data_dict_to_geometry_world_edge_curv:4,data_section_dict:4,data_step:[1,2],data_step_std:[1,2],databas:8,date:[1,2,3,4,5,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22],datetim:6,datum:6,days_norm:21,ddot:[19,20],decid:10,declar:5,decor:22,decreas:8,def:14,defin:[5,10,15],definit:[5,18],deflect:10,deform:10,degener:3,degre:[5,8,9,10],delai:22,delimit:3,delta:19,den:6,densiti:8,depend:8,der:6,derform:10,deriv:[5,19,20],derwin:22,des:6,describ:[8,20],descript:14,deviat:[8,17],diamet:[19,20],dict:[3,4],die:6,differ:[3,4,19],differenti:[19,20],dim:5,dimens:[8,9],dimension:3,dimension_count:5,dimension_of:5,dimenson:3,dimetr:13,dir:5,dirction:15,direct:[5,8,9,10,15],direction_ratio:5,directli:0,directori:14,disk:20,disk_nm:[],disk_nmmdk:[],displac:[10,19],distanc:[8,10],distribut:[4,17],divid:18,dnp:20,dnpp:20,doe:[5,8,10],domain:[5,8],dot:[7,8,15,19,20],dottet:0,down:[8,13],draw:[0,7,22],drawblock:[0,1,2],drawil:[0,8],dummi:9,each:[4,8,10,22],easter:6,easter_fridai:6,easter_mondai:6,easter_sundai:6,eccentr:20,edg:[5,10],edge_curv:5,edge_el:5,edge_end:5,edge_geometri:5,edge_list:5,edge_loop:5,edge_start:5,edgegeometri:5,either:[8,10,15],element:[3,8,10,22],elev:13,ellips:[4,5,8,9],elliptic_arc:5,empti:[3,4],emptyset:3,encapsul:22,encod:5,end:[3,5,8,9,10,15,18,19,20,22],endpoint:10,endpoint_epsilon:[8,9],endsec:4,endwin:22,enter:14,entfernung:6,entiti:5,enumer:5,epitrochoid:8,equal:[4,8,13,15,18],equalii:18,equat:[8,19,20],error:[17,19],ersten:6,etc:13,euler:19,everi:[3,19,22],exampl:[0,3,4,8,10,14,15,18,19,22],except:15,exchang:5,excut:14,execut:14,exit:22,expect:17,explicit:[5,19,20],explizit:19,extent:5,exterior:8,f_n:18,factor:[8,10],fail:3,fals:[3,4,5,8,9,15,17,18,19,22],fassregel:18,faster:3,file:[3,4,14],file_descript:[3,4],file_nam:[3,4,14],file_schema:[3,4],filenam:3,fill:15,fill_valu:15,find:3,find_last:3,finit:5,first:[3,8,10,13,19,20],fisrt:8,fit:[2,16],fix:[8,19],flag:5,float64:17,fmdk:19,fnm:[],fold_list:3,follow:3,font:0,foo:22,footer:22,footer_left:22,footer_right:22,foral:18,form:8,formal:5,formul:19,formula:8,forward:19,found:[9,15],fourth:19,fpi:19,frac:[8,10,15,18,19],frame:8,frequenc:8,fridai:6,from:[3,4,5,8,15,19,22],full:[3,8,15,17],fulli:5,func:14,fwhm:17,gamma:19,gau:6,gauss:17,gauss_fit:17,gener:[5,8],geometr:5,geometri:[1,2,5,10,11,12,13],geometric_representation_item:5,geometry2d:[1,2],geometry2d_plot:[1,2],geometry_plot:[1,2,10],geometry_plot_pylab:[1,2],get:[3,9],get_coordin:9,get_id:3,get_text:22,getch:22,getmaxyx:22,gilt:6,github:0,given:[3,8,10,15,17,19],global:[10,19],global_deform:10,gothic:0,gov:5,govern:20,graphic:13,greater:15,gregorian:21,gregorianischen:6,half:17,hand:[9,15],happen:15,has:[3,5,15,19],has_color:22,hashabl:3,hat:15,have:[4,8,13,15],head:8,header:4,height:[10,22],help:22,helper:[1,2],here:22,hermit:10,hexahedron:9,higher:8,histogram:[0,7,8],homogen:9,horizont:[8,10,22],hour:21,hours_norm:21,htm:5,html:5,http:[0,5,6,13],hyotrochoid:8,hyperbolic_arc:5,hypotrochoid:8,iaiweb:5,identifi:5,idn:5,ids:3,ifc_releas:5,ifcedgecurv:5,ifctopologyresourc:5,ignor:[3,8],imaginari:15,implement:5,implicit:19,implicitli:5,in_second:21,inc:10,incid:10,includ:5,increas:5,increment:19,independ:20,index:[0,3,8,10,15],index_offset:10,indic:5,industri:5,inform:[3,5,17,18,19],init_xyz:9,initi:[19,20],initscr:22,inner:15,insid:[4,8,14],instal:0,instanc:5,instance_nam:4,instr:22,integ:5,integr:[2,5,16],integrand:18,interfac:[0,22],interior:8,intern:8,interpol:10,interpolate_hermit:10,interpret:[3,8,14],interv:[8,18],intev:8,isclos:15,iscloseto:15,isinst:15,iso:5,isometr:13,issequ:3,item:5,iter:[9,19],its:[5,8,9,15],jahr:6,jesu:6,johann:18,join:8,just:8,kalend:6,kalendarisch:6,keep:22,kei:[4,15],keim:6,kepler:18,keplersch:18,keyword:10,knot:[5,8,9],knot_multipl:[5,9],knot_span:8,knot_spec:5,knot_typ:5,kutta:19,kwarg:[10,11],kx1:3,label:[5,22],lag:8,lambda:[8,18],larger:15,last:[3,8,22],lbl:5,lcm:[8,15],ldot:[18,19],lead:8,left:[3,8,10,18,22],leftrightarrow:17,leg:8,len:15,length:[3,10,15,21],length_measur:5,leq:18,lexic:5,lhape:15,lhd:10,like:[8,15],limit:18,limits_:[8,18],limits_a:18,line:[0,3,4,5,8,9,10,22],line_geometri:4,linear:[8,9],lis:5,list:[3,4,5,8,9,10,15,17,18,19,22],list_to_arrai:5,lmax:15,lmin:15,lns:11,load:3,local:[9,19],locat:[5,15],logic:5,lookahead:4,loop:[5,8],low:5,lower:[3,15,18],lowest:15,lst:3,lvd:10,lvert:19,magnitud:[5,15],magntud:15,mai:5,main:0,main_loop:22,major:8,make:[0,8,13],manag:14,manifold:5,manipul:3,march:6,mass:19,master_represent:5,match:4,mathbf:[8,9,15,20],mathemat:[1,2,8,9],mathmat:20,mathrm:[8,17,18,19],matplotlib:[11,12,13],matrix:[9,15],max:8,max_iter:19,maximum:[17,19],mean:[8,19],meassur:14,method:[5,19,20],militari:13,min:8,minor:8,minumum:3,minut:21,minutes_norm:21,model:[3,4,20],modul:[0,1,2,16],modulu:15,mondai:6,mondparamet:6,mondschaltung:6,move:[8,15],multi:3,multilin:22,multipl:[5,8,15],multiview:13,must:[3,8],mxn:[3,15],mystdout:22,name:5,ncurs:22,ndarrai:17,necessari:18,necessarili:18,neg:4,new_path:14,newline_replac:3,newmark:19,newmark_newtonraphson:[19,20],newmark_newtonraphson_mdk:[19,20],newmark_newtonraphson_rdk:[],newwin:22,nmmdk:20,node:10,non:[5,8],none:[3,5,7,8,9,10,14,15,17,18,22],nonperiod:8,nonsens:15,norm:[8,15],normal:[8,9,15,21,22],note:15,now:14,nsimsun:0,number:[4,5,8,10,15,18,19],numer:[1,2],numerisch:18,numpi:17,obj:3,object:[3,4,5,9,10,14,15,22],object_data:3,obliqu:13,occur:[3,8],ode:[2,16,20],ode_model:[2,16],offset:[17,21],often:8,omega:8,one:[3,4,8,10,13,19,22],ones:15,onli:[3,4],open:[3,4,8,9],oppos:5,opposit:5,option:[8,10,22],order:[8,10,19,20],ordinari:[8,19,20],org:6,orient:5,oriented_edg:5,origin:[10,15],orthogon:[9,15],orthograph:[9,13],oscil:8,osterentfernung:6,osterformel:6,ostergrenz:6,ostersonntag:6,other:[10,15],otherwis:[8,10],otim:15,out:14,outer:15,output:22,outsid:[8,14],over:[4,8],overwright:22,own:9,packag:[0,1],padding_left:22,padding_top:22,page:[0,22],pagen:[],parabolic_arc:5,parallel:13,paramet:[3,5,6,8,10,13,14,15,17,18,19,20,21,22],parameter_valu:5,parent:22,parent_window:22,parenthesi:4,part:[4,5,8,15],particular:8,pass:[],path:5,path_head_to_tail:5,pathtoanaconda3:0,pathtoanaconda3condabinconda:[],pattern:[3,8],pcurve_or_surfac:5,peak:8,pentecost:6,per:[3,8,19],perform:15,period:8,perspect:13,phase:[8,15],phi:[8,20],piecewise_bezier_knot:5,pip:0,pixel:8,placement:5,plan:13,plane:[9,10],plot:[8,10,13],plot_cubic_lin:11,plot_lin:[10,11],plot_post:13,plotter:[11,12,13],pmatrix:15,pnt:5,point1:[9,10],point1_i:10,point1_x:10,point2:[9,10],point2_i:10,point2_x:10,point3:[9,10],point4:[9,10],point5:9,point6:9,point7:9,point8:9,point:[5,8,9,10,13,18,19,22],point_i:10,point_x:10,pointer_to_new_created_point_object:4,pointer_to_new_created_vertex_object:4,points1_i:10,polygon:[9,10],polygonzugverfahren:19,polylin:[8,9],polyline_form:5,popt:17,posit:[5,8,17,22],position_norm:21,positive_length_measur:5,possibl:13,preferred_surface_curve_represent:5,print:[3,10,14,15,18,19,22],print_edge_loop:4,print_list:3,problem:[19,20],processor:[3,4],product:[5,9,15],program:[0,3],project:[9,13],propag:8,properti:9,proport:19,proportion:8,proposit:5,protocol:5,pts:10,pylab:[11,12,13],pythin:14,python:0,qquad:19,quad:[18,19,20],quadratur:18,quasi:[0,8],quasi_uniform_knot:5,r2x3_final:5,rac:[],radian:[8,10],radiu:[5,8,9],random:15,rang:[8,15,21],rate:8,rdx:20,rdxp:20,read:[3,4],read_column:3,reader:4,real:[5,15],rectangl:10,recurs:8,reduct:20,ref_direct:5,refer:[5,8,22],refresh:22,rel_tol:15,relat:8,remov:[3,4],repeat:8,repesent:9,replac:3,repr:[9,15],repres:8,represent:5,representation_item:5,res:5,residuum:19,resourc:5,result:[3,4,8,15],rhd:10,right:[3,8,9,10,15,18,22],rkx:20,rmx:20,rmxpp:20,roation:10,roll:8,rotat:[10,15,20],rotate_deg:10,rotate_i:[9,15],rotate_x:[9,15],rotate_xi:10,rotate_z:[9,15],rotation_plan:10,row:[8,15,22],rto:0,rule:[9,15,18],run:14,run_fil:14,rung:19,runtim:22,rvd:10,rvert:19,s_x:15,s_y:15,s_z:15,said:8,same:[3,5],same_sens:5,samesens:5,sampl:10,sample_half_open:[8,9],sample_half_open_seq:8,sample_point1_x:10,sample_point2_i:10,sample_point2_x:10,sample_points1_i:10,satisfi:8,save_valu:18,scalar:15,scale:[8,9,13,15],scale_horizont:8,scale_i:10,scale_vert:8,scale_x:10,sche:19,schema:5,screen:22,script:0,seam_curv:5,search:[0,3],second:[3,8,10,19,20,21],seconds_norm:21,section:4,section_test:14,see:15,segment:18,select:5,self:[5,9,15],self_intersect:5,semi:8,semi_axis_1:5,semi_axis_2:5,send:22,sens:5,seper:4,seq:3,sequenc:3,set:[3,5,8,15,19,22],set_aspect:13,set_aspect_equ:13,sever:4,shall:5,shape:[3,4,5],shift:8,shift_horizont:8,shift_vert:8,should:[10,15],show:22,side:18,sigma:17,simpson:18,simpsonregel:18,sin:[8,15,20],sine:8,sine_wav:8,sinusoid:8,six:[],size:[3,10,15,19],slope:10,smaller:15,smooth:8,solid:[9,10],solut:[13,18,19],solv:19,solver:19,some:[8,14],sonnenschaltung:6,sonntag:6,sourc:[3,4,5,6,7,8,9,10,11,13,14,15,17,18,19,20,21,22],space:[8,9,18,22],space_diagon:9,spacial:6,span:8,spatial:[5,8],special:[5,18],specif:8,specifi:[8,18],speed:8,sperat:22,sphere:13,spline:[8,9],split:4,sqrt:[15,17],squar:[10,19],stabl:19,stackoverflow:13,standard:[5,17,19,22],start:[3,5,8,9,10,14,22],state:22,std:5,stderr:[],stdout:22,stdoutwrapp:22,stdsc:22,stdscr:22,step:[3,4,5,19],steptool:5,stiff:19,stop:3,store:3,stp_aim:5,str:[3,5,8,9,14,15,22],str_between:3,str_to_cmd_arg:4,str_to_list:3,straight:10,string:[3,4,5,8,10,14,22],stripe:3,struct_tim:21,structur:[3,5,8],stuff:22,style:22,sub:22,subinterv:18,submodul:1,subpackag:1,subtyp:5,sum:[8,15,18],sundai:6,support:8,suppress:22,sure:0,surfac:5,surface_curv:5,symbol:7,sys:[],system:[5,9,10,15,19,20],t_0:19,t_axis2_placement_2d:5,t_axis2_placement_3d:5,t_b_spline_curv:5,t_b_spline_curve_with_knot:5,t_boolean_choos:5,t_bounded_curv:5,t_cartesian_point:5,t_circl:5,t_conic:5,t_curv:5,t_dimension_of:5,t_direct:5,t_edg:5,t_edge_curv:5,t_edge_loop:5,t_ellips:5,t_geometric_representation_item:5,t_i:19,t_line:5,t_list_to_arrai:5,t_loop:5,t_n:19,t_oriented_edg:5,t_path:5,t_path_head_to_tail:5,t_placement:5,t_point:5,t_representation_item:5,t_seam_curv:5,t_surface_curv:5,t_topological_representation_item:5,t_vector:5,t_vertex:5,t_vertex_point:5,t_x:15,t_y:15,t_z:15,tabl:10,tagen:6,tangent:8,term:3,termin:0,test:[15,22],text:[3,5,8,19,22],textbox:22,tfrac:19,than:[3,10,15,22],therefor:[15,19],theta:[8,9,15],thi:[3,4,5,8,9,10,13,15,20,22],thick:19,thicker:8,third:13,thoma:18,three:20,ti1:19,time:[8,9,14,15,19,20,21],time_norm:21,time_of_dai:[1,2],timeit:14,titl:22,tmp:14,to_str:8,todo:8,togeth:8,tol:19,toler:19,took:14,top:[10,13,22],topolog:5,topological_representation_item:5,torqu:20,total:5,touch:8,transform:[8,9,15,21],translat:[9,10,15],translate_xi:10,transpos:15,trapez:18,trapezium:18,trapezoid:18,trapezregel:18,trim:5,trimetri:13,tui:[1,2],tupl:[3,5,8,10,17],two:[3,10,18],txt:22,type:[3,4,5,6,8,10,15,17,18,20,21,22],typr:8,u_0:8,u_1:8,u_2:8,u_i:[8,15],u_m:8,u_n:8,u_p:8,u_x:15,u_z:15,uid:3,unbound:5,underli:0,unhash:3,unicod:[0,8],uniform:[8,15],uniform_knot:5,uniqu:3,unique_end:3,unique_list:3,unique_list_hash:3,unit:8,unknown:[3,4],unspecifi:5,upper:[3,18],upper_index_on_control_point:5,upper_index_on_knot:5,upsid:8,usag:[8,15],use:[0,15,20],used:[0,5,14,17],useful:22,user:[0,22],uses:[8,22],using:[3,8,11,12,13,18],usw:6,v_x:15,v_y:15,v_z:15,valu:[4,5,8,15,17,18,19,20,21],varepsilon:19,variabl:[5,6,8,18],varianc:17,varphi:[8,20],vec:10,vector:[5,8,9,10,15],veloc:19,verbos:[3,4,17,18,19],verfahren:19,vert_0:18,vert_a:18,vertcal:10,vertex:5,vertex_geometri:5,vertex_point:[4,5],vertic:[5,8,10,17],view:8,vmatrix:20,vollmond:6,von:6,w_x:15,w_y:15,w_z:15,wave:8,wavelength:8,wavenumb:8,what:10,when:[8,15],where:[8,14,15,17],whether:5,which:[4,5,8,19],widget:22,width:[8,10,17,22],wiki:6,wikipedia:6,window:[0,8,22],wirefram:9,wireframe3d:13,wireframes_xi:9,wireframes_xyz:9,wise:10,work:[13,14],world:[9,13],wrap:[3,4],write:[3,22],wrong:15,www:5,x90:9,x_0:[8,18,19],x_1:[8,10,18,19,20],x_2:[10,18,19,20],x_3:20,x_4:20,x_5:20,x_6:20,x_column:3,x_fit:17,x_i:[18,19],x_n:18,xm90:9,xp0:19,xp1:20,xp2:20,xp3:20,xp4:20,xp5:20,xp6:20,xpn:20,xpp0:19,xppn:20,xyz:9,y90:9,y_0:19,y_1:10,y_2:10,y_column:3,y_fit:17,year:[6,21],ym90:9,you:[0,22],your:22,zephyrproject:0,zero:[5,8,15]},titles:["Welcome to pylib\u2019s documentation!","pylib","pylib package","pylib.data module","pylib.data_step module","pylib.data_step_std module","pylib.date module","pylib.drawblock module","pylib.function module","pylib.geometry module","pylib.geometry2d module","pylib.geometry2d_plot module","pylib.geometry_plot module","pylib.geometry_plot_pylab module","pylib.helper module","pylib.mathematics module","pylib.numerical package","pylib.numerical.fit module","pylib.numerical.integration module","pylib.numerical.ode module","pylib.numerical.ode_model module","pylib.time_of_day module","pylib.tui module"],titleterms:{"function":8,data:3,data_step:4,data_step_std:5,date:6,document:0,drawblock:7,fit:17,geometri:9,geometry2d:10,geometry2d_plot:11,geometry_plot:12,geometry_plot_pylab:13,helper:14,indic:0,integr:18,mathemat:15,modul:[3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22],numer:[16,17,18,19,20],ode:19,ode_model:20,packag:[2,16],pylib:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22],submodul:[2,16],subpackag:2,tabl:0,time_of_dai:21,tui:[0,22],welcom:0}}) \ No newline at end of file +Search.setIndex({docnames:["index","modules","pylib","pylib.data","pylib.data_step","pylib.data_step_std","pylib.date","pylib.drawblock","pylib.function","pylib.geometry","pylib.geometry2d","pylib.geometry2d_plot","pylib.geometry_plot","pylib.geometry_plot_pylab","pylib.helper","pylib.mathematics","pylib.numerical","pylib.numerical.fit","pylib.numerical.integration","pylib.numerical.ode","pylib.numerical.ode_model","pylib.time_of_day","pylib.tui"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.viewcode":1,sphinx:56},filenames:["index.rst","modules.rst","pylib.rst","pylib.data.rst","pylib.data_step.rst","pylib.data_step_std.rst","pylib.date.rst","pylib.drawblock.rst","pylib.function.rst","pylib.geometry.rst","pylib.geometry2d.rst","pylib.geometry2d_plot.rst","pylib.geometry_plot.rst","pylib.geometry_plot_pylab.rst","pylib.helper.rst","pylib.mathematics.rst","pylib.numerical.rst","pylib.numerical.fit.rst","pylib.numerical.integration.rst","pylib.numerical.ode.rst","pylib.numerical.ode_model.rst","pylib.time_of_day.rst","pylib.tui.rst"],objects:{"":{"function":[8,0,0,"-"],data:[3,0,0,"-"],data_step:[4,0,0,"-"],data_step_std:[5,0,0,"-"],date:[6,0,0,"-"],drawblock:[7,0,0,"-"],fit:[17,0,0,"-"],geometry2d:[10,0,0,"-"],geometry2d_plot:[11,0,0,"-"],geometry:[9,0,0,"-"],geometry_plot:[12,0,0,"-"],geometry_plot_pylab:[13,0,0,"-"],helper:[14,0,0,"-"],integration:[18,0,0,"-"],mathematics:[15,0,0,"-"],ode:[19,0,0,"-"],ode_model:[20,0,0,"-"],pylib:[2,0,0,"-"],time_of_day:[21,0,0,"-"],tui:[22,0,0,"-"]},"pylib.data":{find_last:[3,1,1,""],fold_list:[3,1,1,""],get_id:[3,1,1,""],issequence:[3,1,1,""],load:[3,1,1,""],print_list:[3,1,1,""],read:[3,1,1,""],read_columns:[3,1,1,""],seq:[3,1,1,""],store:[3,1,1,""],str_between:[3,1,1,""],str_to_list:[3,1,1,""],strs_between:[3,1,1,""],unique_ending:[3,1,1,""],unique_list:[3,1,1,""],unique_list_hashable:[3,1,1,""],write:[3,1,1,""]},"pylib.data_step":{arc_circle_geometry:[4,1,1,""],b_spline_curve_with_knots_geometry:[4,1,1,""],data_cmds_to_data_dict:[4,1,1,""],data_dict_edge_curve_to_geometry:[4,1,1,""],data_dict_to_geometry_world:[4,1,1,""],data_dict_to_geometry_world_edge_curve:[4,1,1,""],data_section_dict:[4,1,1,""],line_geometry:[4,1,1,""],print_edge_loop:[4,1,1,""],step:[4,2,1,""],str_to_cmd_args:[4,1,1,""]},"pylib.data_step_std":{ARRAY:[5,2,1,""],AXIS2_PLACEMENT_2D:[5,2,1,""],AXIS2_PLACEMENT_3D:[5,2,1,""],BOOLEAN:[5,1,1,""],BOUNDED_CURVE:[5,2,1,""],B_SPLINE_CURVE:[5,2,1,""],B_SPLINE_CURVE_FORM:[5,2,1,""],B_SPLINE_CURVE_WITH_KNOTS:[5,2,1,""],CARTESIAN_POINT:[5,2,1,""],CIRCLE:[5,2,1,""],CONIC:[5,2,1,""],CURVE:[5,2,1,""],DIRECTION:[5,2,1,""],EDGE:[5,2,1,""],EDGE_CURVE:[5,2,1,""],EDGE_LOOP:[5,2,1,""],ELLIPSE:[5,2,1,""],GENERIC:[5,2,1,""],GEOMETRIC_REPRESENTATION_ITEM:[5,2,1,""],INTEGER:[5,2,1,""],KNOT_TYPE:[5,2,1,""],LINE:[5,2,1,""],LIST:[5,2,1,""],LOGICAL:[5,1,1,""],LOOP:[5,2,1,""],ORIENTED_EDGE:[5,2,1,""],PATH:[5,2,1,""],PLACEMENT:[5,2,1,""],POINT:[5,2,1,""],PREFERRED_SURFACE_CURVE_REPRESENTATION:[5,2,1,""],REAL:[5,2,1,""],REPRESENTATION_ITEM:[5,2,1,""],SEAM_CURVE:[5,2,1,""],SET:[5,2,1,""],STRING:[5,2,1,""],SURFACE_CURVE:[5,2,1,""],TOPOLOGICAL_REPRESENTATION_ITEM:[5,2,1,""],VECTOR:[5,2,1,""],VERTEX:[5,2,1,""],VERTEX_POINT:[5,2,1,""],boolean_choose:[5,1,1,""],dimension_of:[5,1,1,""],list_to_array:[5,1,1,""],path_head_to_tail:[5,1,1,""]},"pylib.data_step_std.B_SPLINE_CURVE_FORM":{CIRCULAR_ARC:[5,3,1,""],ELLIPTIC_ARC:[5,3,1,""],HYPERBOLIC_ARC:[5,3,1,""],PARABOLIC_ARC:[5,3,1,""],POLYLINE_FORM:[5,3,1,""],UNSPECIFIED:[5,3,1,""]},"pylib.data_step_std.CARTESIAN_POINT":{__str__:[5,4,1,""]},"pylib.data_step_std.KNOT_TYPE":{PIECEWISE_BEZIER_KNOTS:[5,3,1,""],QUASI_UNIFORM_KNOTS:[5,3,1,""],UNIFORM_KNOTS:[5,3,1,""],UNSPECIFIED:[5,3,1,""]},"pylib.data_step_std.PREFERRED_SURFACE_CURVE_REPRESENTATION":{CURVE_3D:[5,3,1,""],PCURVE_S1:[5,3,1,""],PCURVE_S2:[5,3,1,""]},"pylib.data_step_std.REPRESENTATION_ITEM":{idn:[5,3,1,""]},"pylib.data_step_std.VERTEX_POINT":{__str__:[5,4,1,""]},"pylib.date":{"gau\u00dfsche_osterformel":[6,1,1,""],ascension_of_jesus:[6,1,1,""],easter_friday:[6,1,1,""],easter_monday:[6,1,1,""],easter_sunday:[6,1,1,""],pentecost:[6,1,1,""]},"pylib.drawblock":{histogram:[7,1,1,""]},"pylib.function":{b_spline_basis:[8,1,1,""],b_spline_curve_with_knots:[8,1,1,""],b_spline_knots:[8,1,1,""],circle:[8,1,1,""],cosine_wave:[8,1,1,""],ellipse:[8,1,1,""],epitrochoid:[8,1,1,""],hypotrochoid:[8,1,1,""],sample_half_open:[8,1,1,""],sample_half_open_seq:[8,1,1,""],sine_wave:[8,1,1,""],to_str:[8,1,1,""],transformation:[8,1,1,""]},"pylib.geometry":{ArcBSplineCurveWithKnots:[9,2,1,""],ArcCircle:[9,2,1,""],ArcEllipse:[9,2,1,""],B_spline_curve_with_knots:[9,2,1,""],CS:[9,2,1,""],Circle:[9,2,1,""],Direction:[9,2,1,""],Ellipse:[9,2,1,""],Hexahedron:[9,2,1,""],Line:[9,2,1,""],Point:[9,2,1,""],Polygon:[9,2,1,""],Polyline:[9,2,1,""],Properties:[9,2,1,""],Solid:[9,2,1,""],World:[9,2,1,""],sample_half_open:[9,1,1,""]},"pylib.geometry.CS":{get_coordinates:[9,4,1,""],init_xyz:[9,4,1,""],x90:[9,4,1,""],xm90:[9,4,1,""],y90:[9,4,1,""],ym90:[9,4,1,""]},"pylib.geometry.Direction":{cross:[9,4,1,""]},"pylib.geometry.Point":{projection:[9,4,1,""]},"pylib.geometry.Polyline":{__iter__:[9,4,1,""],__repr__:[9,4,1,""],__str__:[9,4,1,""],ch_cs:[9,4,1,""],points:[9,4,1,""],rotate_x:[9,4,1,""],rotate_y:[9,4,1,""],rotate_z:[9,4,1,""],scale:[9,4,1,""],translate:[9,4,1,""],xy:[9,4,1,""],xyz:[9,4,1,""]},"pylib.geometry.Properties":{circle_sectors:[9,3,1,""]},"pylib.geometry.Solid":{ch_cs:[9,4,1,""],scale:[9,4,1,""],translate:[9,4,1,""],wireframes:[9,4,1,""]},"pylib.geometry.World":{__iter__:[9,4,1,""],__str__:[9,4,1,""],add:[9,4,1,""],bounding_box:[9,4,1,""],center:[9,4,1,""],ch_cs:[9,4,1,""],cs:[9,4,1,""],objects:[9,4,1,""],rotate_x:[9,4,1,""],rotate_y:[9,4,1,""],rotate_z:[9,4,1,""],scale:[9,4,1,""],space_diagonal:[9,4,1,""],translate:[9,4,1,""],wireframes:[9,4,1,""],wireframes_xy:[9,4,1,""],wireframes_xyz:[9,4,1,""]},"pylib.geometry2d":{angle:[10,1,1,""],cubic:[10,1,1,""],cubic_deg:[10,1,1,""],cubics:[10,1,1,""],distance:[10,1,1,""],interpolate_hermite:[10,1,1,""],line:[10,1,1,""],lines:[10,1,1,""],rectangle:[10,1,1,""],rotate:[10,1,1,""],rotate_deg:[10,1,1,""],rotate_xy:[10,1,1,""],square:[10,1,1,""],translate:[10,1,1,""],translate_xy:[10,1,1,""]},"pylib.geometry2d_plot":{plot_cubic_lines:[11,1,1,""],plot_lines:[11,1,1,""]},"pylib.geometry_plot_pylab":{cad_wireframe:[13,1,1,""],plot_post:[13,1,1,""],set_aspect_equal:[13,1,1,""],wireframe3d:[13,1,1,""]},"pylib.helper":{cd:[14,2,1,""],run_file:[14,1,1,""],timeit:[14,2,1,""]},"pylib.mathematics":{lcm:[15,1,1,""],matrix:[15,2,1,""],vector:[15,2,1,""]},"pylib.mathematics.matrix":{__getitem__:[15,4,1,""],__mul__:[15,4,1,""],__repr__:[15,4,1,""],__rmul__:[15,4,1,""],__setitem__:[15,4,1,""],__str__:[15,4,1,""],rotate_x:[15,4,1,""],rotate_y:[15,4,1,""],rotate_z:[15,4,1,""],rx:[15,4,1,""],ry:[15,4,1,""],rz:[15,4,1,""],s:[15,4,1,""],scale:[15,4,1,""],t:[15,4,1,""],translate:[15,4,1,""],transpose:[15,4,1,""],transposed:[15,4,1,""],zeros:[15,4,1,""]},"pylib.mathematics.vector":{__abs__:[15,4,1,""],__add__:[15,4,1,""],__ge__:[15,4,1,""],__getitem__:[15,4,1,""],__gt__:[15,4,1,""],__iadd__:[15,4,1,""],__le__:[15,4,1,""],__lt__:[15,4,1,""],__matmul__:[15,4,1,""],__mul__:[15,4,1,""],__neg__:[15,4,1,""],__pos__:[15,4,1,""],__repr__:[15,4,1,""],__rmul__:[15,4,1,""],__str__:[15,4,1,""],__sub__:[15,4,1,""],abs:[15,4,1,""],ang:[15,4,1,""],arg:[15,4,1,""],ch_cs:[15,4,1,""],conjugate:[15,4,1,""],cross:[15,4,1,""],full:[15,4,1,""],im:[15,4,1,""],isclose:[15,4,1,""],iscloseto:[15,4,1,""],normalize:[15,4,1,""],normalized:[15,4,1,""],ones:[15,4,1,""],random:[15,4,1,""],re:[15,4,1,""],rotate_x:[15,4,1,""],rotate_y:[15,4,1,""],rotate_z:[15,4,1,""],scale:[15,4,1,""],translate:[15,4,1,""],zeros:[15,4,1,""]},"pylib.numerical":{fit:[17,0,0,"-"],integration:[18,0,0,"-"],ode:[19,0,0,"-"],ode_model:[20,0,0,"-"]},"pylib.numerical.fit":{gauss:[17,1,1,""],gauss_fit:[17,1,1,""]},"pylib.numerical.integration":{trapez:[18,1,1,""]},"pylib.numerical.ode":{e1:[19,1,1,""],e2:[19,1,1,""],e4:[19,1,1,""],fpi:[19,1,1,""],i1:[19,1,1,""],newmark_newtonraphson:[19,1,1,""],newmark_newtonraphson_mdk:[19,1,1,""]},"pylib.numerical.ode_model":{disk:[20,1,1,""]},"pylib.time_of_day":{days:[21,1,1,""],days_norm:[21,1,1,""],hours:[21,1,1,""],hours_norm:[21,1,1,""],in_seconds:[21,1,1,""],minutes:[21,1,1,""],minutes_norm:[21,1,1,""],seconds:[21,1,1,""],seconds_norm:[21,1,1,""],transform:[21,1,1,""]},"pylib.tui":{App:[22,2,1,""],StdOutWrapper:[22,2,1,""],Window:[22,2,1,""],newwin:[22,1,1,""]},"pylib.tui.App":{clear:[22,4,1,""],color_def:[22,4,1,""],color_table:[22,4,1,""],end:[22,4,1,""],getch:[22,4,1,""],main_loop:[22,4,1,""],refresh:[22,4,1,""]},"pylib.tui.StdOutWrapper":{get_text:[22,4,1,""],write:[22,4,1,""]},"pylib.tui.Window":{border:[22,4,1,""],clear:[22,4,1,""],derwin:[22,4,1,""],getch:[22,4,1,""],getmaxyx:[22,4,1,""],initscr:[22,4,1,""],instr:[22,4,1,""],refresh:[22,4,1,""],text:[22,4,1,""],textbox:[22,4,1,""]},pylib:{"function":[8,0,0,"-"],data:[3,0,0,"-"],data_step:[4,0,0,"-"],data_step_std:[5,0,0,"-"],date:[6,0,0,"-"],drawblock:[7,0,0,"-"],geometry2d:[10,0,0,"-"],geometry2d_plot:[11,0,0,"-"],geometry:[9,0,0,"-"],geometry_plot:[12,0,0,"-"],geometry_plot_pylab:[13,0,0,"-"],helper:[14,0,0,"-"],mathematics:[15,0,0,"-"],numerical:[16,0,0,"-"],time_of_day:[21,0,0,"-"],tui:[22,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","attribute","Python attribute"],"4":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:attribute","4":"py:method"},terms:{"14t14":[3,4],"1st":[4,19],"259f":8,"28ff":8,"2\u03c0f":8,"2nd":[4,19],"3x2":20,"4th":19,"9fsche_osterformel":6,"\u03bb":8,"\u03bd":8,"\u03c0":8,"\u03c6":8,"\u03c9":8,"b\u00e9zier":8,"boolean":[5,8],"case":[8,18],"catch":22,"char":[3,8,22],"class":[4,5,9,14,15,22],"default":[3,8,10,17,18,19,20,21,22],"enum":5,"f\u00fcr":6,"float":[3,5,8,10,17,18,19,20,21],"fr\u00fchling":6,"function":[0,1,2,3,5,9,14,15,17,18,19,20],"gau\u00dfsch":6,"gau\u00dfsche_osterformel":6,"import":15,"int":[3,5,6,8,10,15,17,18,19,22],"korrekturgr\u00f6\u00df":6,"m\u00e4rz":6,"m\u00e4rzdatum":6,"new":[4,15,21,22],"return":[3,5,6,8,9,10,15,17,18,19,20,21,22],"s\u00e4kular":6,"s\u00e4kularzahl":6,"static":15,"switch":8,"true":[3,5,8,13,15,22],"vorw\u00e4rt":19,Axes:13,But:5,Das:6,For:[0,8,9,15,20],The:[0,3,4,5,8,9,10,15,18,19,20,21,22],Use:15,Using:[4,19],With:9,_____:8,__abs__:15,__add__:15,__contains__:15,__eq__:15,__ge__:15,__getitem__:15,__gt__:15,__iadd__:15,__imatmul__:15,__imul__:15,__isub__:15,__iter__:[9,15],__le__:15,__lt__:15,__matmul__:15,__mul__:15,__ne__:15,__neg__:15,__pos__:15,__repr__:[9,15],__rmul__:15,__setitem__:15,__str__:[5,9,15],__sub__:15,a_i:15,a_path:5,about:15,abs:15,abs_tol:15,absolut:[10,15],accuraci:5,activ:0,add:[9,22],adding:9,addit:[4,5,10],affin:9,after:[3,14],afterward:15,against:19,aggreg:5,agre:5,algorithm:8,algorithmu:6,alia:8,all:[4,22],allow:5,als:6,also:[0,8,22],alwai:9,amplitud:[8,17],anaconda:0,analyt:18,ang1:9,ang2:9,ang:15,angl:[10,13],angle1:10,angle2:10,angular:8,ani:[5,8],anim:8,app:22,appear:13,appli:8,applic:5,approx:18,approxim:[17,18,19],april:6,arc:9,arc_circle_geometri:4,arcbsplinecurvewithknot:9,arccircl:9,arcellips:9,arcwis:5,area:18,arg:15,argument:[4,8,10],arithmet:3,around:[8,10,15,22],arrai:[3,5],ascens:6,ascension_of_jesu:6,ascii:3,associ:5,associated_geometri:5,assum:[4,10],attach:8,attribut:[5,22],augment:9,author:[3,4],autom:5,automotive_design:[3,4],avail:22,averag:21,avoid:15,axes:13,axi:[5,8,13],axis2_plac:5,axis2_placement_2d:5,axis2_placement_3d:5,axonometr:13,b_spline:4,b_spline_basi:8,b_spline_curv:5,b_spline_curve_form:5,b_spline_curve_with_knot:[5,8,9],b_spline_curve_with_knots_geometri:4,b_spline_knot:8,back:[14,15,22],background:22,backward:19,base:[0,4,5,9,14,15,18,22],basi:8,basis_surfac:5,bat:0,becaus:8,becom:[4,19],befor:[3,14],begin:[8,15,19,20,22],beta:19,between:[3,4,8,10],binari:3,bit:5,block:[0,3,7,8,14],bmatrix:[15,19,20],bool:[3,8,17,18,19],boolean_choos:5,boolean_to_bool:[],boor:8,border:22,both:[9,15],bottom:[8,10,22],bound:3,boundari:10,bounded_curv:5,bounding_box:9,braill:[0,8],build:[0,10],cad_wirefram:13,calcul:[6,8,17,21],call:8,can:[0,3,4,5,9,15,22],carbinet:13,cartesian_point:[4,5],cascad:[3,4],cauchi:19,cavali:13,cdot:[15,19,20],center:[8,9,10,13,15],ch_c:[9,15],chang:[8,10,14],char_set:8,charact:[0,5,7,8,22],characterist:8,chart:[0,7,8],check:[5,15,22],choice1:5,choice2:5,choos:19,circl:[5,8,9],circle_sector:9,circular_arc:5,clamp:[4,8],classmethod:9,clean:22,clear:[5,22],close:[3,4,8,9],closed_curv:5,cmd_str:4,code:14,color:22,color_def:22,color_pair:22,color_t:22,column:[3,8,15,22],com:[0,5,13],comma:4,command:4,common:[3,15],complex:15,composit:18,comput:15,conda:0,condabin:0,condit:[8,10,19],conduct:15,conic:[4,5],conjug:15,connect:5,consecut:3,consist:5,consol:22,constant:3,contain:5,content:[0,3,22],context:14,contextdecor:14,contextlib:14,control:8,control_point:[5,8,9],control_point_span:8,control_points_list:5,convert:[3,4,21],coordin:[5,9,10,15,22],copi:9,corner:22,cos:[8,15,20],cosin:8,cosine_wav:8,counterclockwis:10,cox:8,creat:[3,4,9,15],cross:[9,15],cube:13,cubic:10,cubic_deg:10,cudb:8,current:[4,14],curs:[0,22],curv:[4,5,8,9],curve_3d:5,curve_form:5,curvilinear:13,cvartyp:[],cycl:8,dai:[6,21],damp:19,data:[0,1,2,4,5,8,17],data_cmd:4,data_cmds_to_data_dict:4,data_dict:4,data_dict_edge_curve_to_geometri:4,data_dict_to_geometry_world:4,data_dict_to_geometry_world_edge_curv:4,data_section_dict:4,data_step:[0,1,2],data_step_std:[1,2],databas:8,date:[0,1,2,3,4,5,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22],datetim:6,datum:6,days_norm:21,ddot:[19,20],decid:10,declar:5,decor:22,decreas:8,def:14,defin:[5,10,15],definit:[5,18],deflect:10,deform:10,degener:3,degre:[5,8,9,10],delai:22,delimit:3,delta:19,den:6,densiti:8,depend:8,der:6,derform:10,deriv:[5,19,20],derwin:22,des:6,describ:[8,20],descript:14,deviat:[8,17],diamet:[19,20],dict:[3,4],die:6,differ:[3,4,19],differenti:[19,20],dim:5,dimens:[8,9],dimension:3,dimension_count:5,dimension_of:5,dimenson:3,dimetr:13,dir:5,dirction:15,direct:[5,8,9,10,15],direction_ratio:5,directli:0,directori:14,disk:20,displac:[10,19],distanc:[8,10],distribut:[4,17],divid:18,dnp:20,dnpp:20,doe:[5,8,10],domain:[5,8],dot:[7,8,15,19,20],dottet:0,doubl:5,down:[8,13],draw:[0,7,22],drawblock:[0,1,2],drawil:[0,8],dtype:5,dummi:9,each:[4,8,10,22],easter:6,easter_fridai:6,easter_mondai:6,easter_sundai:6,eccentr:20,edg:[5,10],edge_curv:5,edge_el:5,edge_end:5,edge_geometri:5,edge_list:5,edge_loop:5,edge_start:5,edgegeometri:5,either:[5,8,10,15],element:[3,8,10,22],elev:13,ellips:[4,5,8,9],elliptic_arc:5,empti:[3,4],emptyset:3,encapsul:22,encod:5,end:[3,5,8,9,10,15,18,19,20,22],endpoint:10,endpoint_epsilon:[8,9],endsec:4,endwin:22,enter:14,entfernung:6,entiti:5,enumer:5,epitrochoid:8,equal:[4,8,13,15,18],equalii:18,equat:[8,19,20],error:[17,19],ersten:6,etc:13,euler:19,everi:[3,19,22],exampl:[0,3,4,8,10,14,15,18,19,22],except:15,exchang:5,excut:14,execut:14,exit:22,expect:17,explicit:[5,19,20],explizit:19,express:5,extent:5,exterior:8,f_n:18,factor:[8,10],fail:3,fals:[3,4,5,8,9,15,17,18,19,22],fassregel:18,faster:3,file:[3,4,14],file_descript:[3,4],file_nam:[3,4,14],file_schema:[3,4],filenam:3,fill:15,fill_valu:15,find:3,find_last:3,finit:5,first:[3,8,10,13,19,20],fisrt:8,fit:[0,2,16],fix:[8,19],flag:5,float64:17,fmdk:19,fold_list:3,follow:3,font:0,foo:22,footer:22,footer_left:22,footer_right:22,foral:18,form:8,formal:5,formul:19,formula:8,forward:19,found:[9,15],fourth:19,fpi:19,frac:[8,10,15,18,19],frame:8,frequenc:8,fridai:6,from:[3,4,5,8,15,19,22],full:[3,8,15,17],fulli:5,func:14,fwhm:17,gamma:19,gau:6,gauss:17,gauss_fit:17,gener:[5,8],geometr:5,geometri:[0,1,2,5,10,11,12,13],geometric_representation_item:5,geometry2d:[0,1,2],geometry2d_plot:[0,1,2],geometry_plot:[0,1,2,10],geometry_plot_pylab:[0,1,2],get:[3,9],get_coordin:9,get_id:3,get_text:22,getch:22,getmaxyx:22,gilt:6,github:0,given:[3,8,10,15,17,19],global:[10,19],global_deform:10,gothic:0,gov:5,govern:20,graphic:13,greater:15,gregorian:21,gregorianischen:6,half:17,hand:[9,15],happen:15,has:[3,5,15,19],has_color:22,hashabl:3,hat:15,have:[4,5,8,13,15],head:8,header:4,height:[10,22],help:22,helper:[0,1,2],here:22,hermit:10,hexahedron:9,higher:8,histogram:[0,7,8],homogen:9,horizont:[8,10,22],hour:21,hours_norm:21,htm:5,html:5,http:[0,5,6,13],hyperbolic_arc:5,hypotrochoid:8,iaiweb:5,ideal:5,identifi:5,idn:5,ids:3,ifc_releas:5,ifcedgecurv:5,ifctopologyresourc:5,ignor:[3,8],imaginari:15,implement:5,implicit:19,implicitli:5,in_second:21,inc:10,incid:10,includ:5,increas:5,increment:19,independ:20,index:[0,3,8,10,15],index_offset:10,indic:5,industri:5,inform:[3,5,17,18,19],init_xyz:9,initi:[19,20],initscr:22,inner:15,insid:[4,8,14],instal:0,instanc:5,instance_nam:4,instr:22,integ:5,integr:[0,2,5,16],integrand:18,interfac:[0,22],interior:8,intern:8,interpol:10,interpolate_hermit:10,interpret:[3,8,14],interv:[8,18],intev:8,isclos:15,iscloseto:15,isinst:15,iso:5,isometr:13,issequ:3,item:5,iter:[9,19],its:[5,8,9,15],jahr:6,jesu:6,johann:18,join:8,just:8,kalend:6,kalendarisch:6,keep:22,kei:[4,15],keim:6,kepler:18,keplersch:18,keyword:10,knot:[5,8,9],knot_multipl:[5,9],knot_span:8,knot_spec:5,knot_typ:5,kutta:19,kwarg:[10,11],kx1:3,label:[5,22],lag:8,lambda:[8,18],larger:15,last:[3,8,22],lbl:5,lcm:[8,15],ldot:[18,19],lead:8,left:[3,8,10,18,22],leftrightarrow:17,leg:8,len:15,length:[3,5,10,15,21],length_measur:5,leq:18,lexic:5,lhape:15,lhd:10,like:[8,15],limit:18,limits_:[8,18],limits_a:18,line:[0,3,4,5,8,9,10,22],line_geometri:4,linear:[8,9],lis:5,list:[3,4,5,8,9,10,15,17,18,19,22],list_to_arrai:5,lmax:15,lmin:15,lns:11,load:3,local:[9,19],locat:[5,15],logic:5,lookahead:4,loop:[5,8],low:5,lower:[3,15,18],lowest:15,lst:3,lvd:10,lvert:19,magnitud:[5,15],magntud:15,mai:5,main:0,main_loop:22,major:8,make:[0,8,13],manag:14,manifold:5,manipul:3,march:6,mass:19,master_represent:5,match:4,mathbf:[8,9,15,20],mathemat:[0,1,2,8,9],mathmat:20,mathrm:[8,17,18,19],matplotlib:[11,12,13],matrix:[9,15],max:8,max_iter:19,maximum:[17,19],mean:[8,19],meassur:14,member:5,method:[5,19,20],militari:13,min:8,minor:8,minumum:3,minut:21,minutes_norm:21,model:[3,4,20],modul:[0,1,2,16],modulu:15,mondai:6,mondparamet:6,mondschaltung:6,more:5,most:5,move:[8,15],multi:3,multilin:22,multipl:[5,8,15],multiview:13,must:[3,8],mxn:[3,15],mystdout:22,name:5,ncurs:22,ndarrai:17,necessari:18,necessarili:18,neg:4,new_path:14,newline_replac:3,newmark:19,newmark_newtonraphson:[19,20],newmark_newtonraphson_mdk:[19,20],newwin:22,nmmdk:20,node:10,non:[5,8],none:[3,5,7,8,9,10,14,15,17,18,22],nonperiod:8,nonsens:15,norm:[8,15],normal:[8,9,15,21,22],note:15,now:14,nsimsun:0,number:[4,5,8,10,15,18,19],numer:[0,1,2],numerisch:18,numpi:17,obj:3,object:[3,4,5,9,10,14,15,22],object_data:3,obliqu:13,occur:[3,8],ode:[0,2,16,20],ode_model:[0,2,16],offset:[17,21],often:[5,8],omega:8,onc:5,one:[3,4,8,10,13,19,22],ones:15,onli:[3,4,5],open:[3,4,8,9],oppos:5,opposit:5,option:[8,10,22],order:[5,8,10,19,20],ordinari:[8,19,20],org:6,orient:5,oriented_edg:5,origin:[10,15],orthogon:[9,15],orthograph:[9,13],oscil:8,osterentfernung:6,osterformel:6,ostergrenz:6,ostersonntag:6,other:[10,15],otherwis:[8,10],otim:15,out:14,outer:15,output:22,outsid:[8,14],over:[4,8],overwright:22,own:9,packag:[0,1],padding_left:22,padding_top:22,page:[0,22],parabolic_arc:5,parallel:13,paramet:[3,5,6,8,10,13,14,15,17,18,19,20,21,22],parameter_valu:5,parent:22,parent_window:22,parenthesi:4,part:[4,5,8,15],particular:[5,8],path:5,path_head_to_tail:5,pathtoanaconda3:0,pattern:[3,8],pcurv:5,pcurve_or_surfac:5,pcurve_s1:5,pcurve_s2:5,peak:8,pentecost:6,per:[3,8,19],perform:15,period:8,perspect:13,phase:[8,15],phi:[8,20],piecewise_bezier_knot:5,pip:0,pixel:8,placement:5,plan:13,plane:[9,10],plot:[8,10,13],plot_cubic_lin:11,plot_lin:[10,11],plot_post:13,plotter:[11,12,13],pmatrix:15,pnt:5,point1:[9,10],point1_i:10,point1_x:10,point2:[9,10],point2_i:10,point2_x:10,point3:[9,10],point4:[9,10],point5:9,point6:9,point7:9,point8:9,point:[5,8,9,10,13,18,19,22],point_i:10,point_x:10,pointer_to_new_created_point_object:4,pointer_to_new_created_vertex_object:4,points1_i:10,polygon:[9,10],polygonzugverfahren:19,polylin:[8,9],polyline_form:5,popt:17,posit:[5,8,17,22],position_norm:21,positive_length_measur:5,possibl:[5,13],practic:5,preferred_surface_curve_represent:5,principl:5,print:[3,10,14,15,18,19,22],print_edge_loop:4,print_list:3,problem:[19,20],processor:[3,4],product:[5,9,15],program:[0,3],project:[9,13],propag:8,properti:9,proport:19,proportion:8,proposit:5,protocol:5,pts:10,pylab:[11,12,13],pythin:14,python:0,qquad:19,quad:[18,19,20],quadratur:18,quasi:[0,8],quasi_uniform_knot:5,r2x3_final:5,radian:[8,10],radiu:[5,8,9],rais:5,random:15,rang:[8,15,21],rate:8,rdx:20,rdxp:20,read:[3,4],read_column:3,reader:4,real:[5,15],rectangl:10,recurs:8,reduct:20,ref_direct:5,refer:[5,8,22],refresh:22,rel_tol:15,relat:8,remov:[3,4],repeat:8,repesent:9,replac:3,repr:[9,15],repres:[5,8],represent:5,representation_item:5,res:5,residuum:19,resourc:5,restrict:5,result:[3,4,8,15],rhd:10,right:[3,8,9,10,15,18,22],rkx:20,rmx:20,rmxpp:20,roation:10,roll:8,rotat:[10,15,20],rotate_deg:10,rotate_i:[9,15],rotate_x:[9,15],rotate_xi:10,rotate_z:[9,15],rotation_plan:10,row:[8,15,22],rto:0,rule:[9,15,18],run:14,run_fil:14,rung:19,runtim:22,rvd:10,rvert:19,s_x:15,s_y:15,s_z:15,said:8,same:[3,5],same_sens:5,samesens:5,sampl:10,sample_half_open:[8,9],sample_half_open_seq:8,sample_point1_x:10,sample_point2_i:10,sample_point2_x:10,sample_points1_i:10,satisfi:8,save_valu:18,scalar:15,scale:[8,9,13,15],scale_horizont:8,scale_i:10,scale_vert:8,scale_x:10,sche:19,schema:5,screen:22,script:0,seam_curv:5,search:[0,3],second:[3,8,10,19,20,21],seconds_norm:21,section:4,section_test:14,see:15,seed:15,segment:18,select:5,self:[5,9,15],self_intersect:5,semi:8,semi_axis_1:5,semi_axis_2:5,send:22,sens:5,seper:4,seq:3,sequenc:3,set:[3,5,8,15,19,22],set_aspect:13,set_aspect_equ:13,sever:4,shall:5,shape:[3,4,5],shift:8,shift_horizont:8,shift_vert:8,should:[10,15],show:22,side:18,sigma:17,sign:5,simpl:5,simpson:18,simpsonregel:18,sin:[8,15,20],sine:8,sine_wav:8,sinusoid:8,size:[3,5,10,15,19],slope:10,smaller:15,smooth:8,solid:[9,10],solut:[13,18,19],solv:19,solver:19,some:[8,14],sonnenschaltung:6,sonntag:6,sourc:[3,4,5,6,7,8,9,10,11,13,14,15,17,18,19,20,21,22],space:[8,9,18,22],space_diagon:9,spacial:6,span:8,spatial:[5,8],special:[5,18],specif:8,specifi:[8,18],speed:8,sperat:22,sphere:13,spline:[8,9],split:4,sqrt:[15,17],squar:[10,19],stabl:19,stackoverflow:13,standard:[5,17,19,22],start:[3,5,8,9,10,14,22],state:22,std:5,stdout:22,stdoutwrapp:22,stdsc:22,stdscr:22,step:[3,4,5,19],steptool:5,stiff:19,stop:3,store:3,stp_aim:5,str:[3,5,8,9,14,15,22],str_between:3,str_to_cmd_arg:4,str_to_list:3,straight:10,string:[3,4,5,8,10,14,22],stripe:3,strs_between:3,struct_tim:21,structur:[3,5,8],stuff:22,style:22,sub:22,subinterv:18,submodul:[0,1],subpackag:[0,1],subtyp:5,sum:[8,15,18],sundai:6,support:8,suppress:22,sure:0,surfac:5,surface_curv:5,symbol:7,system:[5,9,10,15,19,20],t_0:19,t_axis2_placement_2d:5,t_axis2_placement_3d:5,t_b_spline_curv:5,t_b_spline_curve_form:5,t_b_spline_curve_with_knot:5,t_boolean_choos:5,t_bounded_curv:5,t_cartesian_point:5,t_circl:5,t_conic:5,t_curv:5,t_dimension_of:5,t_direct:5,t_edg:5,t_edge_curv:5,t_edge_loop:5,t_ellips:5,t_geometric_representation_item:5,t_i:19,t_knot_typ:5,t_line:5,t_list_to_arrai:5,t_loop:5,t_n:19,t_oriented_edg:5,t_path:5,t_path_head_to_tail:5,t_placement:5,t_point:5,t_preferred_surface_curve_represent:5,t_representation_item:5,t_seam_curv:5,t_surface_curv:5,t_topological_representation_item:5,t_vector:5,t_vertex:5,t_vertex_point:5,t_x:15,t_y:15,t_z:15,tabl:10,tagen:6,tangent:8,term:3,termin:0,test:[15,22],text:[3,5,8,19,22],textbox:22,textual:0,tfrac:19,than:[3,5,10,15,22],them:5,therefor:[15,19],theta:[8,9,15],thi:[3,4,5,8,9,10,13,15,20,22],thick:19,thicker:8,third:13,thoma:18,three:20,ti1:19,time:[8,9,14,15,19,20,21],time_norm:21,time_of_dai:[0,1,2],timeit:14,titl:22,tmp:14,to_str:8,todo:[5,8],togeth:8,tol:19,toler:19,took:14,top:[10,13,22],topolog:5,topological_representation_item:5,torqu:20,total:5,touch:8,transform:[8,9,15,21],translat:[9,10,15],translate_xi:10,transpos:15,trapez:18,trapezium:18,trapezoid:18,trapezregel:18,trim:5,trimetri:13,tui:[1,2],tupl:[3,5,8,10,17],two:[3,10,18],txt:22,type:[3,4,5,6,8,10,15,17,18,20,21,22],typeerror:5,typr:8,u_0:8,u_1:8,u_2:8,u_i:[8,15],u_m:8,u_n:8,u_p:8,u_x:15,u_z:15,uid:3,unbound:5,underli:0,unhash:3,unicod:[0,5,8],uniform:[8,15],uniform_knot:5,union:5,uniqu:3,unique_end:3,unique_list:3,unique_list_hash:3,unit:8,unknown:[3,4,5],unlimit:5,unord:5,unset:5,unspecifi:5,upper:[3,18],upper_index_on_control_point:5,upper_index_on_knot:5,upsid:8,usag:[8,15],use:[0,15,20],used:[0,5,14,17],useful:22,user:[0,22],uses:[8,22],using:[3,8,11,12,13,18],usw:6,v_x:15,v_y:15,v_z:15,valu:[4,5,8,15,17,18,19,20,21],varepsilon:19,variabl:[5,6,8,18],varianc:17,varphi:[8,20],vec:10,vector:[5,8,9,10,15],veloc:19,verbos:[3,4,17,18,19],verfahren:19,vert_0:18,vert_a:18,vertcal:10,vertex:5,vertex_geometri:5,vertex_point:[4,5],vertic:[5,8,10,17],view:8,vmatrix:20,vollmond:6,von:6,w_x:15,w_y:15,w_z:15,wave:8,wavelength:8,wavenumb:8,what:10,when:[8,15],where:[8,14,15,17],whether:5,which:[4,5,8,19],widget:22,width:[8,10,17,22],wiki:6,wikipedia:6,window:[0,8,22],wirefram:9,wireframe3d:13,wireframes_xi:9,wireframes_xyz:9,wise:10,work:[13,14],world:[9,13],wrap:[3,4],write:[3,22],wrong:15,www:5,x90:9,x_0:[8,18,19],x_1:[8,10,18,19,20],x_2:[10,18,19,20],x_3:20,x_4:20,x_5:20,x_6:20,x_column:3,x_fit:17,x_i:[18,19],x_n:18,xm90:9,xp0:19,xp1:20,xp2:20,xp3:20,xp4:20,xp5:20,xp6:20,xpn:20,xpp0:19,xppn:20,xyz:9,y90:9,y_0:19,y_1:10,y_2:10,y_column:3,y_fit:17,year:[6,21],ym90:9,you:[0,22],your:22,zephyrproject:0,zero:[5,8,15]},titles:["Welcome to pylib\u2019s documentation!","pylib","pylib package","pylib.data module","pylib.data_step module","pylib.data_step_std module","pylib.date module","pylib.drawblock module","pylib.function module","pylib.geometry module","pylib.geometry2d module","pylib.geometry2d_plot module","pylib.geometry_plot module","pylib.geometry_plot_pylab module","pylib.helper module","pylib.mathematics module","pylib.numerical package","pylib.numerical.fit module","pylib.numerical.integration module","pylib.numerical.ode module","pylib.numerical.ode_model module","pylib.time_of_day module","pylib.tui module"],titleterms:{"function":8,data:3,data_step:4,data_step_std:[0,5],date:6,document:0,drawblock:7,fit:17,geometri:9,geometry2d:10,geometry2d_plot:11,geometry_plot:12,geometry_plot_pylab:13,helper:14,indic:0,integr:18,mathemat:15,modul:[3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22],numer:[16,17,18,19,20],ode:19,ode_model:20,packag:[2,16],pylib:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22],submodul:[2,16],subpackag:2,tabl:0,time_of_dai:21,tui:[0,22],welcom:0}}) \ No newline at end of file diff --git a/docs/source/_static/class_diagram.svg b/docs/source/_static/class_diagram.svg new file mode 100644 index 0000000..59afc29 --- /dev/null +++ b/docs/source/_static/class_diagram.svg @@ -0,0 +1,267 @@ +LegendCLASSexplicit attributederived attributeadditional attributestatic attributeTODOREPRESENTATION_ITEMname : stridn : int «generated»B_SPLINE_CURVE_FORMPOLYLINE_FORMCIRCULAR_ARCELLIPTIC_ARCPARABOLIC_ARCHYPERBOLIC_ARCUNSPECIFIEDKNOT_TYPEUNIFORM_KNOTSQUASI_UNIFORM_KNOTSPIECEWISE_BEZIER_KNOTSUNSPECIFIEDGEOMETRIC_REPRESENTATION_ITEMdim : intCARTESIAN_POINTcoordinates : tuple[float]VERTEX_POINTvertex_geometry : POINTDIRECTIONdirection_ratios : tuple[float]VECTORorientation : DIRECTIONmagnitude : floatEDGEedge_start : VERTEXedge_end : VERTEXLINEpnt : CARTESIAN_POINTdir : VECTORSURFACE_CURVEcurve_3d : CURVEassociated_geometry : strtuple[PCURVE, SURFACE]master_representation : strbasis_surface : Nonetuple[SURFACE]EDGE_CURVEedge_geometry : CURVEsame_sense : strPLACEMENTlocation : CARTESIAN_POINTAXIS2_PLACEMENT_2Dref_direction : DIRECTIONp : Nonetuple[DIRECTION]AXIS2_PLACEMENT_3Daxis : DIRECTIONref_direction : DIRECTIONp : Nonetuple[DIRECTION]CONICposition : Union[AXIS2_PLACEMENT_2D, AXIS_PLACEMENT_3D]CIRCLEradius : floatELLIPSEsemi_axis_1 : floatsemi_axis_2 : floatB_SPLINE_CURVEdegree : intcontrol_points_list : tuple[CARTESIAN_POINT]curve_form : strB_BLINE_CURVE_FORMclosed_curve : strboolself_intersect : strboolupper_index_on_control_points : intcontrol_points : tuple[CARTESIAN_POINT]B_SPLINE_CURVE_WITH_KNOTSknot_multiplicities : tuple[int]knots : tuple[float]knot_spec : strKNOT_TYPEupper_index_on_knots : intORIENTED_EDGEedge_element : EDGEorientation : stredge_start : VERTEXedge_end : VERTEXPATHedge_list : tuple[ORIENTED_EDGE]POINTCURVESEAM_CURVEBONDED_CURVETOPOLOGICAL_REPRESENTATION_ITEMVERTEXLOOPEDGE_LOOP \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 7d739d2..d245189 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -34,8 +34,9 @@ release = '2019.12.21' # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autodoc', + 'sphinx.ext.autodoc', # see also autodoc_default_options below 'sphinx.ext.viewcode', + 'sphinx.ext.doctest', # see also doctest_global_setup below ] # Add any paths that contain templates here, relative to this directory. @@ -92,3 +93,11 @@ html_theme_options = { autodoc_default_options = { 'special-members': '__iter__, __contains__, __getitem__, __setitem__, __pos__, __neg__, __add__, __iadd__, __sub__, __isub__, __mul__, __rmul__, __imul__, __matmul__, __imatmul__, __abs__, __lt__, __le__, __gt__, __ge__, __eq__, __ne__, __str__, __repr__' } + +doctest_global_setup = ''' +from pylib.data import * +from pylib.mathematics import * +from pylib.function import * +from pylib.numerical.integration import * +from pylib.geometry2d import * +''' diff --git a/docs/source/index.rst b/docs/source/index.rst index 08341a4..59b5175 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -7,7 +7,7 @@ Welcome to pylib's documentation! ================================= .. toctree:: - :maxdepth: 2 + :maxdepth: 6 :caption: Contents: modules @@ -22,15 +22,20 @@ Indices and tables * :ref:`search` +``data_step_std`` +----------------- +.. image:: _static/class_diagram.svg + :target: _images/class_diagram.svg -tui ---- -pylib/tui.py is the main module for tui 'terminal user interface' programs. +``tui`` +------- -* curses package (for Windows install windows-curses) is the underlying main - package to build terminal programs. The curses package can also be used - directly. +``pylib/tui.py`` is the main module for tui 'textual user interface' programs. + +* ``curses`` package (for Windows install ``windows-curses``) is the underlying + main package to build terminal programs. The ``curses`` package can also be + used directly. * Windows (Anaconda): @@ -38,9 +43,9 @@ pylib/tui.py is the main module for tui 'terminal user interface' programs. * ``python -m pip install windows-curses`` * https://github.com/zephyrproject-rtos/windows-curses -* drawille package is used to draw with braille characters (dottet and quasi- - line charts). Make sure you use a font with Unicode Braille characters. For - Windows e. g.: NSimSun, MS Gothic. +* ``drawille`` package is used to draw with braille characters (dottet and + quasi-line charts). Make sure you use a font with Unicode Braille characters. + For Windows e. g.: NSimSun, MS Gothic. * Install: ``python -m pip install drawille`` * Windows (Anaconda): @@ -48,6 +53,5 @@ pylib/tui.py is the main module for tui 'terminal user interface' programs. * ``C:\PathToAnaconda3\condabin\conda.bat activate base`` * ``python -m pip install drawille`` -* drawblock.py is used to draw with block characters (histogram). - -example/tui.py is an example script to build a terminal program. +* ``drawblock`` is used to draw with block characters (histogram). +* ``example/tui.py`` is an example script to build a terminal program. diff --git a/pylib/data.py b/pylib/data.py index 0d27734..e656bf6 100644 --- a/pylib/data.py +++ b/pylib/data.py @@ -309,6 +309,26 @@ def str_between(text, left, right): except: return '' +def strs_between(text, left, right): + """Get text between two pattern. + + Text can be multi-line. + + :param text: text to search in + :type text: str + :param left: left pattern + :type left: str + :param right: right pattern + :type right: str + + :returns: text between the left and right pattern + :rtype: str + """ + try: + return re.findall(left+'(.+?)'+right, text, re.DOTALL) + except: + return '' + def str_to_list(string, delimiter=';\n', newline_replacement=''): r"""Converts a string with block information into a list. diff --git a/pylib/data_step_std.py b/pylib/data_step_std.py index 7e5e8c6..45d2ed2 100755 --- a/pylib/data_step_std.py +++ b/pylib/data_step_std.py @@ -1,999 +1,1167 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -"""STEP Standard structure. - -:Date: 2020-01-03 - -.. module:: data_step_std - :platform: *nix, Windows - :synopsis: STEP Standard structure. - -.. moduleauthor:: Daniel Weschke - -.. seealso:: - STEP, ISO 10303-21, AP 232 (Application Protocol) - http://www.steptools.com/stds/step/ and - https://www.steptools.com/stds/stp_aim/html/schema.html - - ISO 10303-21:2002. Industrial automation systems and integration -- - Product data representation and exchange -- Part 21: - Implementation methods: Clear text encoding of the exchange - structure - - ISO 10303-21:2016. Industrial automation systems and integration -- - Product data representation and exchange -- Part 21: - Implementation methods: Clear text encoding of the exchange - structure -""" -# DATA section -# - Format: Instance name = Entity instance -# - Example: #4 = PRODUCT_DEFINITION_SHAPE('','',#5); -# - Instance name -# - unique name in the form "#1234" -# - must consist of a positive number -# - only valid locally within the STEP-file -# - Entity instance: name of the entity in capital letters followed -# by attribute values in defined order within parentheses -# - Attributes -# - Only explicit attributes get mapped (are listed) -# - Inverse, Derived and re-declared attributes are not listed -# since their values can be deduced from the other ones. -# - Unset attribute values are given as: $ -# - Re-declared attributes as derived in a subtype are encoded: * -# - Enumeration (ENUM), boolean (BOOLEAN) and logical (LOGICAL) -# values are given in capital letters with a leading and -# trailing dot, e. g.: .TRUE. -# - String values are given as: '' -# - Integers (INTEGER) and real (REAL) values are used identical -# to typical programming languages -# - elements of aggregates (SET, BAG, LIST, ARRAY) are given in -# parentheses, separated by comma ",": -# STEP Standard TYPE LIST: first index is 1. -# STEP Standard TYPE ARRAY: first index is 0. - -def BOOLEAN_to_bool(boolean): - if boolean == ".T.": - return True - elif boolean == ".F.": - return False - return boolean - -def dimension_of(item): - """STEP Standard FUNCTION dimension_of - - :param item: STEP Standard TYPE GEOMETRIC_REPRESENTATION_ITEM - :type item: GEOMETRIC_REPRESENTATION_ITEM - - :returns: dim - :rtype: int or None - - :ivar dim: STEP Standard TYPE dimension_count (INTEGER). - dimension_count > 0 - :vartype dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_dimension_of.html - """ - # (* SCHEMA step_merged_ap_schema; *) - # - # -- DIFF IN AP214 - # -- DIFF IN AP203e2 - # -- DIFF IN AP238 STEP-NC - # -- DIFF IN AP224 - # -- DIFF IN AP232 - # FUNCTION dimension_of - # (item : geometric_representation_item ) : dimension_count; - # LOCAL - # x : SET OF representation; - # y : representation_context; - # dim : dimension_count; - # END_LOCAL; - # IF 'STEP_MERGED_AP_SCHEMA.CARTESIAN_POINT' IN TYPEOF(item) THEN - # dim := SIZEOF(item\cartesian_point.coordinates); - # RETURN (dim); - # END_IF; - # IF 'STEP_MERGED_AP_SCHEMA.DIRECTION' IN TYPEOF(item) THEN - # dim := SIZEOF(item\direction.direction_ratios); - # RETURN (dim); - # END_IF; - # IF 'STEP_MERGED_AP_SCHEMA.VECTOR' IN TYPEOF(item) THEN - # dim := SIZEOF(item\vector.orientation\direction.direction_ratios); - # RETURN (dim); - # END_IF; - # x := using_representations(item); - # IF SIZEOF(x) > 0 THEN - # y := x[1].context_of_items; - # dim := y\geometric_representation_context.coordinate_space_dimension; - # RETURN (dim); - # ELSE - # RETURN (?); - # END_IF; - # END_FUNCTION; - if isinstance(item, CARTESIAN_POINT): - dim = len(item.coordinates) - return dim - if isinstance(item, DIRECTION): - dim = len(item.direction_ratios) - return dim - if isinstance(item, VECTOR): - dim = len(item.orientation.direction_ratios) - return dim - - # TODO: x, y - # x := using_representations(item); - # IF SIZEOF(x) > 0 THEN - # y := x[1].context_of_items; - # dim := y\geometric_representation_context.coordinate_space_dimension; - # RETURN (dim); - # ELSE - # RETURN (?); - # END_IF; - - return None - -def list_to_array(lis, low, u): - """STEP Standard FUNCTION list_to_array - - :param lis: STEP Standard TYPE LIST [0:?] OF GENERIC - :type lis: tuple - :param low: STEP Standard TYPE INTEGER - :type low: int - :param u: STEP Standard TYPE INTEGER - :type u: int - - :returns: res - :rtype: tuple or None - - :param n: STEP Standard TYPE INTEGER - :type n: int - :ivar res: STEP Standard TYPE ARRAY [low:u] OF GENERIC - :vartype res: tuple - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_list_to_array.html - """ - # (* SCHEMA step_merged_ap_schema; *) - - # -- DIFF IN AP214 - # -- DIFF IN AP203e2 - # -- DIFF IN AP238 STEP-NC - # -- DIFF IN AP224 - # -- DIFF IN AP232 - # FUNCTION list_to_array - # (lis : LIST [0:?] OF GENERIC : t; - # low : INTEGER; - # u : INTEGER ) : ARRAY [low:u] OF GENERIC : t; - # LOCAL - # n : INTEGER; - # res : ARRAY [low:u] OF GENERIC : t; - # END_LOCAL; - # n := SIZEOF(lis); - # IF n <> u - low + 1 THEN - # RETURN (?); - # ELSE - # res := [ lis[1]:0 ]; - # REPEAT i := 2 TO n BY 1; - # res[(low + i - 1)] := lis[i]; - # END_REPEAT; - # RETURN (res); - # END_IF; - # END_FUNCTION; - n = len(lis) - # length of new array and old list must be equal - if n != u - low + 1: # len(lis) != len(range(low, u+1)) - return None - - # TODO: new list? - #res = [i for i in lis] - res = lis - return res - -def boolean_choose(b, choice1, choice2): - """STEP Standard FUNCTION boolean_choose - - :param b: STEP Standard TYPE BOOLEAN - :type b: bool - :param choice1: STEP Standard TYPE GENERIC - :type choice1: object - :param choice2: STEP Standard TYPE GENERIC - :type choice2: object - - :returns: STEP STEP Standard TYPE GENERIC - :rtype: object - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_boolean_choose.html - """ - # (* SCHEMA step_merged_ap_schema; *) - # - # FUNCTION boolean_choose - # (b : BOOLEAN; - # choice1 : GENERIC : item; - # choice2 : GENERIC : item ) : GENERIC : item; - # IF b THEN - # RETURN (choice1); - # ELSE - # RETURN (choice2); - # END_IF; - # END_FUNCTION; - return choice1 if b else choice2 - -def path_head_to_tail(a_path): - """STEP Standard FUNCTION path_head_to_tail - - Check if the path is a connected curve set. - - :param a_path: STEP Standard TYPE path - :type a_path: PATH - - :returns: p - :rtype: object - - :ivar p: STEP STEP Standard TYPE LOGICAL - :vartype item: bool - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_path_head_to_tail.html - """ - # (* SCHEMA step_merged_ap_schema; *) - - # -- DIFF IN AP214 - # -- DIFF IN AP203e2 - # -- DIFF IN AP238 STEP-NC - # -- DIFF IN AP224 - # -- DIFF IN AP232 - # FUNCTION path_head_to_tail - # (a_path : path ) : LOGICAL; - # LOCAL - # n : INTEGER; - # p : LOGICAL := TRUE; - # END_LOCAL; - # n := SIZEOF(a_path.edge_list); - # REPEAT i := 2 TO n BY 1; - # p := p AND (a_path.edge_list[(i - 1)].edge_end :=: a_path.edge_list[i].edge_start); - # END_REPEAT; - # RETURN (p); - # END_FUNCTION; - n = len(a_path.edge_list) - p = all([a_path.edge_list[i-1].edge_end == a_path.edge_list[i].edge_start for i in range(1, n)]) - return p - - -class REPRESENTATION_ITEM(): - """STEP Standard ENTITY representation_item - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - - Additional attributes - - :ivar idn: for the instance the instance id and for the class the - total number of instances - :vartype idn: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_representation_item.html - """ - idn = 0 # equal to total numbers of instances - - def __init__(self, name): - self.name = name - REPRESENTATION_ITEM.idn += 1 - self.idn = REPRESENTATION_ITEM.idn # instance id - -class GEOMETRIC_REPRESENTATION_ITEM(REPRESENTATION_ITEM): - """STEP Standard ENTITY geometric_representation_item - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_geometric_representation_item.html - """ - def __init__(self, name): - # TODO: or dim rather in a method (or property) so that it is - # conducted only on demand? - self.dim = dimension_of(self) - super().__init__(name) - -class POINT(GEOMETRIC_REPRESENTATION_ITEM): - """STEP Standard ENTITY point - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_point.html - """ - def __init__(self, name): - super().__init__(name) - -class CARTESIAN_POINT(POINT): - """STEP Standard ENTITY cartesian_point - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param coordinates: list of length_measure (floats) - :type coordinates: tuple - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_cartesian_point.html - """ - def __init__(self, name, coordinates): - self.coordinates = coordinates - super().__init__(name) - - def __str__(self): - return "#"+str(self.idn)+" = CARTESIAN_POINT('"+self.name+"', "+str(self.coordinates)+")" - -class TOPOLOGICAL_REPRESENTATION_ITEM(REPRESENTATION_ITEM): - """STEP Standard ENTITY topological_representation_item - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_topological_representation_item.html - """ - def __init__(self, name): - super().__init__(name) - -class VERTEX(TOPOLOGICAL_REPRESENTATION_ITEM): - """STEP Standard ENTITY vertex - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_vertex.html - """ - def __init__(self, name): - super().__init__(name) - -class VERTEX_POINT(VERTEX): - """STEP Standard ENTITY vertex_point - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param vertex_geometry: point - :type vertex_geometry: POINT - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_vertex_point.html - """ - def __init__(self, name, vertex_geometry): - self.vertex_geometry = vertex_geometry - super().__init__(name) - - def __str__(self): - return "#"+str(self.idn)+" = VERTEX_POINT('"+self.name+"', #"+str(self.vertex_geometry.idn)+")" - -class DIRECTION(GEOMETRIC_REPRESENTATION_ITEM): - """STEP Standard ENTITY direction - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param direction_ratios: STEP Standard LIST OF REAL - :type direction_ratios: tuple - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_direction.html - """ - def __init__(self, name, direction_ratios): - self.direction_ratios = direction_ratios - super().__init__(name) - -class VECTOR(GEOMETRIC_REPRESENTATION_ITEM): - """STEP Standard ENTITY vector - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param orientation: - :type orientation: DIRECTION - :param magnitude: length_measure - :type magnitude: float - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_vector.html - """ - def __init__(self, name, orientation, magnitude): - self.orientation = orientation - self.magnitude = magnitude - super().__init__(name) - -class EDGE(TOPOLOGICAL_REPRESENTATION_ITEM): - """STEP Standard ENTITY edge - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param edge_start: start point - :type edge_start: VERTEX - :param edge_end: end point - :type edge_end: VERTEX - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_edge.html - """ - def __init__(self, name, edge_start, edge_end): - self.edge_start = edge_start - self.edge_end = edge_end - super().__init__(name) - -class CURVE(GEOMETRIC_REPRESENTATION_ITEM): - """STEP Standard ENTITY curve - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_curve.html - """ - def __init__(self, name): - super().__init__(name) - -class LINE(CURVE): - """STEP Standard ENTITY line - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param pnt: - :type pnt: CARTESIAN_POINT - :param dir: - :type dir: VECTOR - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_line.html - """ - def __init__(self, name, pnt, dir): - self.pnt = pnt - self.dir = dir - super().__init__(name) - -class SURFACE_CURVE(CURVE): - """STEP Standard ENTITY surface_curve - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param curve_3d: - :type curve_3d: CURVE - :param associated_geometry: - :type associated_geometry: list of pcurve_or_surface - :param master_representation: - :type master_representation: preferred_surface_curve_representation - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - :param basis_surface: - :type basis_surface: SET OF surface - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_surface_curve.html - """ - def __init__(self, name, curve_3d, associated_geometry, master_representation): - self.curve_3d = curve_3d - self.associated_geometry = associated_geometry - self.master_representation = master_representation - super().__init__(name) - -class SEAM_CURVE(SURFACE_CURVE): - """STEP Standard ENTITY seam_curve - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param curve_3d: - :type curve_3d: CURVE - :param associated_geometry: - :type associated_geometry: list of pcurve_or_surface - :param master_representation: - :type master_representation: preferred_surface_curve_representation - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - :param basis_surface: - :type basis_surface: SET OF surface - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_seam_curve.html - """ - def __init__(self, name, curve_3d, associated_geometry, master_representation): - super().__init__(name, curve_3d, associated_geometry, master_representation) - -class EDGE_CURVE(EDGE): - """STEP Standard ENTITY edge_curve - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param edge_start: start point - :type edge_start: VERTEX - :param edge_end: end point - :type edge_end: VERTEX - :param edge_geometry: curve - :type edge_geometry: CURVE - :param same_sense: STEP Standard TYPE BOOLEAN - :type same_sense: str - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - Definition from ISO/CD 10303-42:1992: An edge curve is a special subtype of edge which has its geometry fully defined. The geometry is defined by associating the edge with a curve which may be unbounded. As the topological and geometric directions may be opposed, an indicator (same sense) is used to identify whether the edge and curve directions agree or are opposed. The Boolean value indicates whether the curve direction agrees with (TRUE) or is in the opposite direction (FALSE) to the edge direction. Any geometry associated with the vertices of the edge shall be consistent with the edge geometry. - - Informal propositions - 1. The domain of the edge curve is formally defined to be the domain of its edge geometry as trimmed by the vertices. This domain does not include the vertices. - 2. An edge curve has non-zero finite extent. - 3. An edge curve is a manifold. - 4. An edge curve is arcwise connected. - 5. The edge start is not a part of the edge domain. - 6. The edge end is not a part of the edge domain. - 7. Vertex geometry shall be consistent with edge geometry. - - Attribute definitions - EdgeGeometry - The curve which defines the shape and spatial location of the edge. This curve may be unbounded and is implicitly trimmed by the vertices of the edge; this defines the edge domain. Multiple edges can reference the same curve. - SameSense - This logical flag indicates whether (TRUE), or not (FALSE) the senses of the edge and the curve defining the edge geometry are the same. The sense of an edge is from the edge start vertex to the edge end vertex; the sense of a curve is in the direction of increasing parameter. - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_edge_curve.html - https://iaiweb.lbl.gov/Resources/IFC_Releases/R2x3_final/ifctopologyresource/lexical/ifcedgecurve.htm - """ - def __init__(self, name, edge_start, edge_end, edge_geometry, same_sense): - self.edge_geometry = edge_geometry - self.same_sense = BOOLEAN_to_bool(same_sense) - super().__init__(name, edge_start, edge_end) - -class PLACEMENT(GEOMETRIC_REPRESENTATION_ITEM): - """STEP Standard ENTITY placement - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param location: - :type location: CARTESIAN_POINT - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_placement.html - """ - def __init__(self, name, location): - self.location = location - super().__init__(name) - -class AXIS2_PLACEMENT_2D(PLACEMENT): - """STEP Standard ENTITY axis2_placement_2d - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param location: - :type location: CARTESIAN_POINT - :param ref_direction: - :type ref_direction: DIRECTION - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - :param p: - :type p: list of DIRECTION - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_axis2_placement_2d.html - """ - def __init__(self, name, location, ref_direction): - self.ref_direction = ref_direction - super().__init__(name, location) - -class AXIS2_PLACEMENT_3D(PLACEMENT): - """STEP Standard ENTITY axis2_placement_3d - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param location: - :type location: CARTESIAN_POINT - :param axis: - :type axis: DIRECTION - :param ref_direction: - :type ref_direction: DIRECTION - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - :param p: - :type p: list of DIRECTION - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_axis2_placement_3d.html - """ - def __init__(self, name, location, axis, ref_direction): - self.axis = axis - self.ref_direction = ref_direction - super().__init__(name, location) - -class CONIC(CURVE): - """STEP Standard ENTITY conic - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param position: axis2_placement - :type position: AXIS2_PLACEMENT_2D or AXIS2_PLACEMENT_3D - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_conic.html - """ - def __init__(self, name, position): - self.position = position - super().__init__(name) - -class CIRCLE(CONIC): - """STEP Standard ENTITY circle - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param position: axis2_placement - :type position: AXIS2_PLACEMENT_2D or AXIS2_PLACEMENT_3D - :param radius: positive_length_measure - :type radius: float - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_circle.html - """ - def __init__(self, name, position, radius): - self.radius = radius - super().__init__(name, position) - -class ELLIPSE(CONIC): - """STEP Standard ENTITY ellipse - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param position: STEP Standard TYPE axis2_placement (SELECT) - :type position: AXIS2_PLACEMENT_2D or AXIS2_PLACEMENT_3D - :param semi_axis_1: STEP Standard TYPE positive_length_measure (REAL) - :type semi_axis_1: float - :param semi_axis_2: STEP Standard TYPE positive_length_measure (REAL) - :type semi_axis_2: float - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_ellipse.html - """ - def __init__(self, name, position, semi_axis_1, semi_axis_2): - self.semi_axis_1 = semi_axis_1 - self.semi_axis_2 = semi_axis_2 - super().__init__(name, position) - -class BOUNDED_CURVE(CURVE): - """STEP Standard ENTITY bounded_curve - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_bounded_curve.html - """ - def __init__(self, name): - super().__init__(name) - -class B_SPLINE_CURVE(BOUNDED_CURVE): - """STEP Standard ENTITY b_spline_curve - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param degree: STEP Standard TYPE INTEGER - :type degree: int - :param control_points_list: STEP Standard TYPE LIST OF - cartesian_point (ENTITY) - :type control_points_list: tuple - :param curve_form: STEP Standard TYPE b_spline_curve_form (ENUM). - ENUMERATION OF (polyline_form, circular_arc, elliptic_arc, - parabolic_arc, hyperbolic_arc, unspecified). - :type curve_form: str - :param closed_curve: STEP Standard TYPE LOGICAL - :type closed_curve: str - :param self_intersect: STEP Standard TYPE LOGICAL - :type self_intersect: str - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - :param upper_index_on_control_points: STEP Standard TYPE INTEGER - :type upper_index_on_control_points: int - :param control_points: STEP Standard TYPE ARRAY OF - cartesian_point (ENTITY) - :type control_points: tuple - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_b_spline_curve.html - """ - def __init__(self, name, degree, control_points_list, curve_form, - closed_curve, self_intersect): - self.degree = degree - self.control_points_list = control_points_list - self.curve_form = curve_form - self.closed_curve = BOOLEAN_to_bool(closed_curve) # TODO: BOOLEAN not LOGICAL? - self.self_intersect = BOOLEAN_to_bool(self_intersect) # TODO: BOOLEAN not LOGICAL? - - self.upper_index_on_control_points = len(control_points_list) - 1 - # TODO: necessary? - self.control_points = list_to_array( - control_points_list, 0, self.upper_index_on_control_points) - - super().__init__(name) - -class B_SPLINE_CURVE_WITH_KNOTS(B_SPLINE_CURVE): - """STEP Standard ENTITY b_spline_curve_with_knots - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param degree: STEP Standard TYPE INTEGER - :type degree: int - :param control_points_list: STEP Standard TYPE LIST OF - cartesian_point (ENTITY) - :type control_points_list: tuple - :param curve_form: STEP Standard TYPE b_spline_curve_form (ENUM). - ENUMERATION OF (polyline_form, circular_arc, elliptic_arc, - parabolic_arc, hyperbolic_arc, unspecified). - :type curve_form: str - :param closed_curve: STEP Standard TYPE LOGICAL - :type closed_curve: str - :param self_intersect: STEP Standard TYPE LOGICAL - :type self_intersect: str - :param knot_multiplicities: STEP Standard TYPE LIST OF INTEGER - :type knot_multiplicities: tuple - :param knots: STEP Standard TYPE LIST OF parameter_value (REAL) - :type knots: tuple - :param knot_spec: STEP Standard TYPE knot_type (ENUM). - ENUMERATION OF (uniform_knots, quasi_uniform_knots, - piecewise_bezier_knots, unspecified). - :type knot_spec: str - - Derived Attributes - - :param dim: STEP Standard TYPE dimension_count (INTEGER) - :type dim: int - :param upper_index_on_control_points: STEP Standard TYPE INTEGER - :type upper_index_on_control_points: int - :param control_points: STEP Standard TYPE ARRAY OF - cartesian_point (ENTITY) - :type control_points: tuple - :param upper_index_on_knots: STEP Standard TYPE INTEGER - :type upper_index_on_knots: int - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_b_spline_curve_with_knots.html - """ - def __init__(self, name, degree, control_points_list, curve_form, - closed_curve, self_intersect, knot_multiplicities, - knots, knot_spec): - self.knot_multiplicities = knot_multiplicities - self.knots = knots - self.knot_spec = knot_spec - - self.upper_index_on_knots = len(knots) - - super().__init__(name, degree, control_points_list, curve_form, - closed_curve, self_intersect) - -class ORIENTED_EDGE(EDGE): - """STEP Standard ENTITY oriented_edge - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param edge_start: STEP Standard TYPE vertex (ENTITY) - [re-declared attribute from edge] - :type edge_start: VERTEX - :param edge_end: STEP Standard TYPE vertex (ENTITY) - [re-declared attribute from edge] - :type edge_end: VERTEX - :param edge_element: STEP Standard TYPE edge (ENTITY) - :type edge_element: EDGE - :param orientation: STEP Standard TYPE BOOLEAN - :type orientation: str - - Derived Attributes - - :param edge_start: STEP Standard TYPE vertex (ENTITY) - [re-declared attribute from edge] - :type edge_start: VERTEX - :param edge_end: STEP Standard TYPE vertex (ENTITY) - [re-declared attribute from edge] - :type edge_end: VERTEX - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_oriented_edge.html - """ - def __init__(self, name, edge_start, edge_end, edge_element, - orientation): - # if edge_element not EDGE - if not isinstance(self, type(edge_element)): - # value of edge_start should be '*' - # value of edge_end should be '*' - self.edge_element = edge_element - self.orientation = BOOLEAN_to_bool(orientation) - - self.edge_start = boolean_choose( - self.orientation, - self.edge_element.edge_start, self.edge_element.edge_end) - self.edge_end = boolean_choose( - self.orientation, - self.edge_element.edge_end, self.edge_element.edge_start) - - super().__init__(name, self.edge_start, self.edge_end) - else: - self = None - print('no oriented_edge') - -class LOOP(TOPOLOGICAL_REPRESENTATION_ITEM): - """STEP Standard ENTITY loop - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_loop.html - """ - def __init__(self, name): - super().__init__(name) - -class PATH(TOPOLOGICAL_REPRESENTATION_ITEM): - """STEP Standard ENTITY path - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param edge_list: STEP Standard TYPE LIST OF oriented_edge (ENTITY) - :type edge_list: tuple - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_path.html - """ - def __init__(self, name, edge_list): - self.edge_list = edge_list - super().__init__(name) - if not path_head_to_tail(self): - self = None - print('no path') - -class EDGE_LOOP(PATH, LOOP): - """STEP Standard ENTITY edge_loop - - Explicit Attributes - - :param name: STEP Standard TYPE label (STRING) - :type name: str - :param edge_list: STEP Standard TYPE LIST OF oriented_edge (ENTITY) - :type edge_list: tuple - - .. seealso:: - https://www.steptools.com/stds/stp_aim/html/t_edge_loop.html - """ - def __init__(self, name, edge_list): - self.edge_list = edge_list - super().__init__(name, edge_list) - - self.ne = len(self.edge_list) - if self.edge_list[0].edge_start != self.edge_list[self.ne-1].edge_end: - self = None - print('no edge_loop') +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# pylint: disable=invalid-name,too-few-public-methods +"""STEP Standard structure. + +:Date: 2020-01-03 + +.. module:: data_step_std + :platform: *nix, Windows + :synopsis: STEP Standard structure. + +.. moduleauthor:: Daniel Weschke + +.. seealso:: + STEP, ISO 10303-21, AP 232 (Application Protocol) + http://www.steptools.com/stds/step/ and + https://www.steptools.com/stds/stp_aim/html/schema.html + + ISO 10303-21:2002. Industrial automation systems and integration -- + Product data representation and exchange -- Part 21: + Implementation methods: Clear text encoding of the exchange + structure + + ISO 10303-21:2016. Industrial automation systems and integration -- + Product data representation and exchange -- Part 21: + Implementation methods: Clear text encoding of the exchange + structure +""" +# DATA section +# - Format: Instance name = Entity instance +# - Example: #4 = PRODUCT_DEFINITION_SHAPE('','',#5); +# - Instance name +# - unique name in the form "#1234" +# - must consist of a positive number +# - only valid locally within the STEP-file +# - Entity instance: name of the entity in capital letters followed +# by attribute values in defined order within parentheses +# - Attributes +# - Only explicit attributes get mapped (are listed) +# - Inverse, Derived and re-declared attributes are not listed +# since their values can be deduced from the other ones. +# - Unset attribute values are given as: $ +# - Re-declared attributes as derived in a subtype are encoded: * +# - Enumeration (ENUM), boolean (BOOLEAN) and logical (LOGICAL) +# values are given in capital letters with a leading and +# trailing dot, e. g.: .TRUE. +# - String values are given as: '' +# - Integers (INTEGER) and real (REAL) values are used identical +# to typical programming languages +# - elements of aggregates (SET, BAG, LIST, ARRAY) are given in +# parentheses, separated by comma ",": +# STEP Standard TYPE LIST: first index is 1. +# STEP Standard TYPE ARRAY: first index is 0. +from enum import Enum + +# +# EXPRESS simple data types +# TODO: BINARY, NUMBER +# + +class GENERIC: + """GENERIC + """ + +class STRING(str): + """EXPRESS Type STRING + + This is the most often used simple type. EXPRESS strings can be + of any length and can contain any character (ISO 10646/Unicode). + """ + +class INTEGER(int): + """EXPRESS Type INTEGER + + EXPRESS integers can have in principle any length, but most + implementations restricted them to a signed 32 bit value. + """ + +class REAL(float): + """EXPRESS Type REAL + + Ideally an EXPRESS real value is unlimited in accuracy and size. + But in practice a real value is represented by a floating point + value of type double. + """ + +def BOOLEAN(value): + """EXPRESS Type BOOLEAN with values TRUE and FALSE + + :param value: either ``.T.`` for a True value or ``.F.`` for a + False value + :type value: str + :raises: TypeError + """ + if value == ".T.": + return True + if value == ".F.": + return False + raise ValueError + +def LOGICAL(value): + """EXPRESS Type LOGICAL with values TRUE and FALSE and in addition + UNKNOWN + + :param value: either ``.T.`` for a True value or ``.F.`` for a + False value + :type value: str + """ + # TODO: how does the UNKNOWN value look like? + if value == ".T.": + return True + if value == ".F.": + return False + return None + +# +# EXPRESS aggregation data types +# BAG unordered -> ? +# TODO: find a data type for BAG? +# TODO: test if BAG have unset members? +# + +class SET(set): + """EXPRESS Type SET + + SET are unordered. Contain a particular value more than once, is + not allowed. It is not possible to contain unset members. + + :param value: value + :type value: str + :param dtype: + :type dtype: + + :rtype: set + """ + # TODO: test for unset members? + +class LIST(tuple): + """EXPRESS Type LIST + + LIST are ordered. It is not possible to contain unset members. + + :param value: value + :type value: str + :param dtype: + :type dtype: + + :rtype: tuple + """ + # TODO: test for unset members? + +class ARRAY(tuple): + """EXPRESS Type ARRAY + + ARRAY are ordered. An ARRAY is the only aggregate that may + contain unset members. + + :param value: value + :type value: str + :param dtype: + :type dtype: + + :rtype: tuple + """ + + +# +# STEP functions +# + +def dimension_of(item): + """STEP Standard FUNCTION dimension_of + + :param item: + :type item: GEOMETRIC_REPRESENTATION_ITEM + + :returns: dim + :rtype: Union[int, None] + + :var dim: dimension_count + dimension_count > 0 + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_dimension_of.html + """ + # (* SCHEMA step_merged_ap_schema; *) + # + # -- DIFF IN AP214 + # -- DIFF IN AP203e2 + # -- DIFF IN AP238 STEP-NC + # -- DIFF IN AP224 + # -- DIFF IN AP232 + # FUNCTION dimension_of + # (item : geometric_representation_item ) : dimension_count; + # LOCAL + # x : SET OF representation; + # y : representation_context; + # dim : dimension_count; + # END_LOCAL; + # IF 'STEP_MERGED_AP_SCHEMA.CARTESIAN_POINT' IN TYPEOF(item) THEN + # dim := SIZEOF(item\cartesian_point.coordinates); + # RETURN (dim); + # END_IF; + # IF 'STEP_MERGED_AP_SCHEMA.DIRECTION' IN TYPEOF(item) THEN + # dim := SIZEOF(item\direction.direction_ratios); + # RETURN (dim); + # END_IF; + # IF 'STEP_MERGED_AP_SCHEMA.VECTOR' IN TYPEOF(item) THEN + # dim := SIZEOF(item\vector.orientation\direction.direction_ratios); + # RETURN (dim); + # END_IF; + # x := using_representations(item); + # IF SIZEOF(x) > 0 THEN + # y := x[1].context_of_items; + # dim := y\geometric_representation_context.coordinate_space_dimension; + # RETURN (dim); + # ELSE + # RETURN (?); + # END_IF; + # END_FUNCTION; + if isinstance(item, CARTESIAN_POINT): + dim = len(item.coordinates) + return dim + if isinstance(item, DIRECTION): + dim = len(item.direction_ratios) + return dim + if isinstance(item, VECTOR): + dim = len(item.orientation.direction_ratios) + return dim + + # TODO: x, y + # x := using_representations(item); + # IF SIZEOF(x) > 0 THEN + # y := x[1].context_of_items; + # dim := y\geometric_representation_context.coordinate_space_dimension; + # RETURN (dim); + # ELSE + # RETURN (?); + # END_IF; + + return None + +def list_to_array(lis, low, u): + """STEP Standard FUNCTION list_to_array + + :param lis: STEP Standard TYPE LIST [0:?] OF GENERIC + :type lis: tuple[GENERIC, ...] + :param low: + :type low: INTEGER + :param u: + :type u: INTEGER + + :returns: res + :rtype: Union[tuple, None] + + :var n: + :vartype n: INTEGER + :var res: STEP Standard TYPE ARRAY [low:u] OF GENERIC + :vartype res: tuple[GENERIC, ...] + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_list_to_array.html + """ + # (* SCHEMA step_merged_ap_schema; *) + + # -- DIFF IN AP214 + # -- DIFF IN AP203e2 + # -- DIFF IN AP238 STEP-NC + # -- DIFF IN AP224 + # -- DIFF IN AP232 + # FUNCTION list_to_array + # (lis : LIST [0:?] OF GENERIC : t; + # low : INTEGER; + # u : INTEGER ) : ARRAY [low:u] OF GENERIC : t; + # LOCAL + # n : INTEGER; + # res : ARRAY [low:u] OF GENERIC : t; + # END_LOCAL; + # n := SIZEOF(lis); + # IF n <> u - low + 1 THEN + # RETURN (?); + # ELSE + # res := [ lis[1]:0 ]; + # REPEAT i := 2 TO n BY 1; + # res[(low + i - 1)] := lis[i]; + # END_REPEAT; + # RETURN (res); + # END_IF; + # END_FUNCTION; + n = len(lis) + # length of new array and old list must be equal + if n != u - low + 1: # len(lis) != len(range(low, u+1)) + return None + + # TODO: new list? + #res = [i for i in lis] + res = lis + return res + +def boolean_choose(b, choice1, choice2): + """STEP Standard FUNCTION boolean_choose + + :param b: + :type b: BOOLEAN + :param choice1: + :type choice1: GENERIC + :param choice2: + :type choice2: GENERIC + + :returns: STEP STEP Standard TYPE GENERIC + :rtype: object + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_boolean_choose.html + """ + # (* SCHEMA step_merged_ap_schema; *) + # + # FUNCTION boolean_choose + # (b : BOOLEAN; + # choice1 : GENERIC : item; + # choice2 : GENERIC : item ) : GENERIC : item; + # IF b THEN + # RETURN (choice1); + # ELSE + # RETURN (choice2); + # END_IF; + # END_FUNCTION; + return choice1 if b else choice2 + +def path_head_to_tail(a_path): + """STEP Standard FUNCTION path_head_to_tail + + Check if the path is a connected curve set. + + :param a_path: + :type a_path: PATH + + :returns: p + :rtype: LOGICAL + + :var p: + :vartype item: LOGICAL + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_path_head_to_tail.html + """ + # (* SCHEMA step_merged_ap_schema; *) + + # -- DIFF IN AP214 + # -- DIFF IN AP203e2 + # -- DIFF IN AP238 STEP-NC + # -- DIFF IN AP224 + # -- DIFF IN AP232 + # FUNCTION path_head_to_tail + # (a_path : path ) : LOGICAL; + # LOCAL + # n : INTEGER; + # p : LOGICAL := TRUE; + # END_LOCAL; + # n := SIZEOF(a_path.edge_list); + # REPEAT i := 2 TO n BY 1; + # p := p AND (a_path.edge_list[(i - 1)].edge_end :=: a_path.edge_list[i].edge_start); + # END_REPEAT; + # RETURN (p); + # END_FUNCTION; + n = len(a_path.edge_list) + p = all([a_path.edge_list[i-1].edge_end == a_path.edge_list[i].edge_start for i in range(1, n)]) + return p + + +# STEP Standard Type Enumeration +# Enumeration values are simple strings such as red, green, and blue +# for an rgb-enumeration. In the case that an enumeration type is +# declared extensible it can be extended in other schemas. + +# Python note: Starting with 1 because 0 is False in a boolean sense + +class PREFERRED_SURFACE_CURVE_REPRESENTATION(Enum): + """STEP Standard TYPE b_spline_curve_form + + :cvar CURVE_3D: + :cvar PCURVE_S1: + :cvar PCURVE_S2: + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_preferred_surface_curve_representation.html + """ + CURVE_3D = 1 + PCURVE_S1 = 2 + PCURVE_S2 = 3 + +class B_SPLINE_CURVE_FORM(Enum): + """STEP Standard TYPE b_spline_curve_form + + ENUMERATION OF (polyline_form, circular_arc, elliptic_arc, + parabolic_arc, hyperbolic_arc, unspecified). + + :cvar POLYLINE_FORM: + :cvar CIRCULAR_ARC: + :cvar ELLIPTIC_ARC: + :cvar PARABOLIC_ARC: + :cvar HYPERBOLIC_ARC: + :cvar UNSPECIFIED: + + .. seealso:: + https://www.steptools.com/std/stp_aim/html/t_b_spline_curve_form.html + """ + POLYLINE_FORM = 1 + CIRCULAR_ARC = 2 + ELLIPTIC_ARC = 3 + PARABOLIC_ARC = 4 + HYPERBOLIC_ARC = 5 + UNSPECIFIED = 6 + +class KNOT_TYPE(Enum): + """STEP Standard TYPE knot_type + + ENUMERATION OF (uniform_knots, quasi_uniform_knots, + piecewise_bezier_knots, unspecified). + + :cvar UNIFORM_KNOTS: + :cvar QUASI_UNIFORM_KNOTS: + :cvar PIECEWISE_BEZIER_KNOTS: + :cvar UNSPECIFIED: + + .. seealso:: + https://www.steptools.com/std/stp_aim/html/t_knot_type.html + """ + UNIFORM_KNOTS = 1 + QUASI_UNIFORM_KNOTS = 2 + PIECEWISE_BEZIER_KNOTS = 3 + UNSPECIFIED = 4 + + +class REPRESENTATION_ITEM: + """STEP Standard ENTITY representation_item + + Explicit Attributes + + :param name: label + :type name: STRING + + Additional attributes + + :ivar idn: for the instance the instance id and for the class the + total number of instances + :vartype idn: int <> + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_representation_item.html + """ + idn = 0 # equal to total numbers of instances + + def __init__(self, name): + self.name = name + REPRESENTATION_ITEM.idn += 1 + self.idn = REPRESENTATION_ITEM.idn # instance id + +class GEOMETRIC_REPRESENTATION_ITEM(REPRESENTATION_ITEM): + """STEP Standard ENTITY geometric_representation_item + + Explicit Attributes + + :param name: label + :type name: STRING + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_geometric_representation_item.html + """ + def __init__(self, name): + # TODO: or dim rather in a method (or property) so that it is + # conducted only on demand? + self.dim = dimension_of(self) + super().__init__(name) + +class POINT(GEOMETRIC_REPRESENTATION_ITEM): + """STEP Standard ENTITY point + + Explicit Attributes + + :param name: label + :type name: STRING + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_point.html + """ + +class CARTESIAN_POINT(POINT): + """STEP Standard ENTITY cartesian_point + + Explicit Attributes + + :param name: label + :type name: STRING + :param coordinates: list of length_measure + :type coordinates: tuple[float, ...] + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_cartesian_point.html + """ + def __init__(self, name, coordinates): + self.coordinates = coordinates + super().__init__(name) + + def __str__(self): + return "#"+str(self.idn)+" = CARTESIAN_POINT('"+self.name+"', "+str(self.coordinates)+")" + +class TOPOLOGICAL_REPRESENTATION_ITEM(REPRESENTATION_ITEM): + """STEP Standard ENTITY topological_representation_item + + Explicit Attributes + + :param name: label + :type name: STRING + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_topological_representation_item.html + """ + +class VERTEX(TOPOLOGICAL_REPRESENTATION_ITEM): + """STEP Standard ENTITY vertex + + Explicit Attributes + + :param name: label + :type name: STRING + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_vertex.html + """ + +class VERTEX_POINT(VERTEX): + """STEP Standard ENTITY vertex_point + + Explicit Attributes + + :param name: label + :type name: STRING + :param vertex_geometry: point + :type vertex_geometry: POINT + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_vertex_point.html + """ + def __init__(self, name, vertex_geometry): + self.vertex_geometry = vertex_geometry + super().__init__(name) + + def __str__(self): + return "#"+str(self.idn)+" = VERTEX_POINT('"+self.name+"', #"+str(self.vertex_geometry.idn)+")" + +class DIRECTION(GEOMETRIC_REPRESENTATION_ITEM): + """STEP Standard ENTITY direction + + Explicit Attributes + + :param name: label + :type name: STRING + :param direction_ratios: STEP Standard LIST OF REAL + :type direction_ratios: LIST[REAL, ...] + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_direction.html + """ + def __init__(self, name, direction_ratios): + self.direction_ratios = direction_ratios + super().__init__(name) + +class VECTOR(GEOMETRIC_REPRESENTATION_ITEM): + """STEP Standard ENTITY vector + + Explicit Attributes + + :param name: label + :type name: STRING + :param orientation: + :type orientation: DIRECTION + :param magnitude: length_measure + :type magnitude: REAL + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_vector.html + """ + def __init__(self, name, orientation, magnitude): + self.orientation = orientation + self.magnitude = magnitude + super().__init__(name) + +class EDGE(TOPOLOGICAL_REPRESENTATION_ITEM): + """STEP Standard ENTITY edge + + Explicit Attributes + + :param name: label + :type name: STRING + :param edge_start: start point + :type edge_start: VERTEX + :param edge_end: end point + :type edge_end: VERTEX + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_edge.html + """ + def __init__(self, name, edge_start, edge_end): + self.edge_start = edge_start + self.edge_end = edge_end + super().__init__(name) + +class CURVE(GEOMETRIC_REPRESENTATION_ITEM): + """STEP Standard ENTITY curve + + Explicit Attributes + + :param name: label + :type name: STRING + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_curve.html + """ + +class LINE(CURVE): + """STEP Standard ENTITY line + + Explicit Attributes + + :param name: label + :type name: STRING + :param pnt: + :type pnt: CARTESIAN_POINT + :param dir: + :type dir: VECTOR + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_line.html + """ + def __init__(self, name, pnt, dir): + self.pnt = pnt + self.dir = dir + super().__init__(name) + +class SURFACE_CURVE(CURVE): + """STEP Standard ENTITY surface_curve + + Explicit Attributes + + :param name: label + :type name: STRING + :param curve_3d: + :type curve_3d: CURVE + :param associated_geometry: STEP Standard TYPE LIST OF + pcurve_or_surface (SELECT) <> + :type associated_geometry: LIST[Union[PCURVE, SURFACE], ...] + :param master_representation: <> + :type master_representation: PREFERRED_SURFACE_CURVE_REPRESENTATION + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + :ivar basis_surface: <> + :vartype basis_surface: SET[SURFACE, ...] + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_surface_curve.html + """ + # TODO: type associated_geometry master_representation basis_surface + def __init__(self, name, curve_3d, associated_geometry, master_representation): + self.curve_3d = curve_3d + self.associated_geometry = associated_geometry + self.master_representation = master_representation + super().__init__(name) + +class SEAM_CURVE(SURFACE_CURVE): + """STEP Standard ENTITY seam_curve + + Explicit Attributes + + :param name: label + :type name: STRING + :param curve_3d: + :type curve_3d: CURVE + :param associated_geometry: STEP Standard TYPE LIST OF + pcurve_or_surface (SELECT) <> + :type associated_geometry: LIST[Union[PCURVE, SURFACE], ...] + :param master_representation: <> + :type master_representation: PREFERRED_SURFACE_CURVE_REPRESENTATION + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + :ivar basis_surface: <> + :vartype basis_surface: SET[SURFACE, ...] + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_seam_curve.html + """ + +class EDGE_CURVE(EDGE): + """STEP Standard ENTITY edge_curve + + Explicit Attributes + + :param name: label + :type name: STRING + :param edge_start: start point + :type edge_start: VERTEX + :param edge_end: end point + :type edge_end: VERTEX + :param edge_geometry: curve + :type edge_geometry: CURVE + :param same_sense: <> + :type same_sense: BOOLEAN + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + Definition from ISO/CD 10303-42:1992: An edge curve is a special + subtype of edge which has its geometry fully defined. The + geometry is defined by associating the edge with a curve which + may be unbounded. As the topological and geometric directions may + be opposed, an indicator (same sense) is used to identify whether + the edge and curve directions agree or are opposed. The Boolean + value indicates whether the curve direction agrees with (TRUE) or + is in the opposite direction (FALSE) to the edge direction. Any + geometry associated with the vertices of the edge shall be + consistent with the edge geometry. + + Informal propositions + 1. The domain of the edge curve is formally defined to be the + domain of its edge geometry as trimmed by the vertices. This + domain does not include the vertices. + 2. An edge curve has non-zero finite extent. + 3. An edge curve is a manifold. + 4. An edge curve is arcwise connected. + 5. The edge start is not a part of the edge domain. + 6. The edge end is not a part of the edge domain. + 7. Vertex geometry shall be consistent with edge geometry. + + Attribute definitions + EdgeGeometry + The curve which defines the shape and spatial location of the + edge. This curve may be unbounded and is implicitly trimmed + by the vertices of the edge; this defines the edge domain. + Multiple edges can reference the same curve. + SameSense + This logical flag indicates whether (TRUE), or not (FALSE) + the senses of the edge and the curve defining the edge + geometry are the same. The sense of an edge is from the edge + start vertex to the edge end vertex; the sense of a curve is + in the direction of increasing parameter. + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_edge_curve.html + https://iaiweb.lbl.gov/Resources/IFC_Releases/R2x3_final/ifctopologyresource/lexical/ifcedgecurve.htm + """ + def __init__(self, name, edge_start, edge_end, edge_geometry, same_sense): + self.edge_geometry = edge_geometry + self.same_sense = BOOLEAN(same_sense) + super().__init__(name, edge_start, edge_end) + +class PLACEMENT(GEOMETRIC_REPRESENTATION_ITEM): + """STEP Standard ENTITY placement + + Explicit Attributes + + :param name: label + :type name: STRING + :param location: + :type location: CARTESIAN_POINT + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_placement.html + """ + def __init__(self, name, location): + self.location = location + super().__init__(name) + +class AXIS2_PLACEMENT_2D(PLACEMENT): + """STEP Standard ENTITY axis2_placement_2d + + Explicit Attributes + + :param name: label + :type name: STRING + :param location: + :type location: CARTESIAN_POINT + :param ref_direction: + :type ref_direction: DIRECTION + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + :ivar p: + :vartype p: LIST[DIRECTION, ...] + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_axis2_placement_2d.html + """ + # TODO: type p + def __init__(self, name, location, ref_direction): + self.ref_direction = ref_direction + super().__init__(name, location) + +class AXIS2_PLACEMENT_3D(PLACEMENT): + """STEP Standard ENTITY axis2_placement_3d + + Explicit Attributes + + :param name: label + :type name: STRING + :param location: + :type location: CARTESIAN_POINT + :param axis: + :type axis: DIRECTION + :param ref_direction: + :type ref_direction: DIRECTION + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + :ivar p: + :vartype p: LIST[DIRECTION, ...] + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_axis2_placement_3d.html + """ + def __init__(self, name, location, axis, ref_direction): + self.axis = axis + self.ref_direction = ref_direction + super().__init__(name, location) + +class CONIC(CURVE): + """STEP Standard ENTITY conic + + Explicit Attributes + + :param name: label + :type name: STRING + :param position: axis2_placement + :type position: Union[AXIS2_PLACEMENT_2D, AXIS2_PLACEMENT_3D] + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_conic.html + """ + def __init__(self, name, position): + self.position = position + super().__init__(name) + +class CIRCLE(CONIC): + """STEP Standard ENTITY circle + + Explicit Attributes + + :param name: label + :type name: STRING + :param position: axis2_placement + :type position: Union[AXIS2_PLACEMENT_2D, AXIS2_PLACEMENT_3D] + :param radius: positive_length_measure + :type radius: REAL + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_circle.html + """ + def __init__(self, name, position, radius): + self.radius = radius + super().__init__(name, position) + +class ELLIPSE(CONIC): + """STEP Standard ENTITY ellipse + + Explicit Attributes + + :param name: label + :type name: STRING + :param position: STEP Standard TYPE axis2_placement (SELECT) + :type position: Union[AXIS2_PLACEMENT_2D, AXIS2_PLACEMENT_3D] + :param semi_axis_1: positive_length_measure + :type semi_axis_1: REAL + :param semi_axis_2: positive_length_measure + :type semi_axis_2: REAL + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_ellipse.html + """ + def __init__(self, name, position, semi_axis_1, semi_axis_2): + self.semi_axis_1 = semi_axis_1 + self.semi_axis_2 = semi_axis_2 + super().__init__(name, position) + +class BOUNDED_CURVE(CURVE): + """STEP Standard ENTITY bounded_curve + + Explicit Attributes + + :param name: label + :type name: STRING + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_bounded_curve.html + """ + +class B_SPLINE_CURVE(BOUNDED_CURVE): + """STEP Standard ENTITY b_spline_curve + + Explicit Attributes + + :param name: label + :type name: STRING + :param degree: + :type degree: INTEGER + :param control_points_list: + :type control_points_list: LIST[CARTESIAN_POINT, ...] + :param curve_form: + :type curve_form: B_SPLINE_CURVE_FORM + :param closed_curve: + :type closed_curve: LOGICAL + :param self_intersect: + :type self_intersect: LOGICAL + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + :ivar upper_index_on_control_points: + :vartype upper_index_on_control_points: INTEGER + :ivar control_points: + :vartype control_points: ARRAY[CARTESIAN_POINT, ...] + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_b_spline_curve.html + """ + # TODO: curve_form from str to B_SPLINE_CURVE_FORM, closed_curve, + # self_intersect + def __init__(self, name, degree, control_points_list, curve_form, + closed_curve, self_intersect): + self.degree = degree + self.control_points_list = control_points_list + self.curve_form = curve_form + self.closed_curve = LOGICAL(closed_curve) + self.self_intersect = LOGICAL(self_intersect) + + self.upper_index_on_control_points = len(control_points_list) - 1 + # TODO: necessary? + self.control_points = list_to_array( + control_points_list, 0, self.upper_index_on_control_points) + + super().__init__(name) + +class B_SPLINE_CURVE_WITH_KNOTS(B_SPLINE_CURVE): + """STEP Standard ENTITY b_spline_curve_with_knots + + Explicit Attributes + + :param name: label + :type name: STRING + :param degree: + :type degree: INTEGER + :param control_points_list: + :type control_points_list: LIST[CARTESIAN_POINT, ...] + :param curve_form: + :type curve_form: B_SPLINE_CURVE_FORM + :param closed_curve: + :type closed_curve: LOGICAL + :param self_intersect: + :type self_intersect: LOGICAL + :param knot_multiplicities: + :type knot_multiplicities: LIST[INTEGER, ...] + :param knots: STEP Standard TYPE LIST OF parameter_value (REAL) + :type knots: LIST[REAL, ...] + :param knot_spec: + :type knot_spec: KNOT_TYPE + + Derived Attributes + + :ivar dim: dimension_count + :vartype dim: INTEGER + :ivar upper_index_on_control_points: + :vartype upper_index_on_control_points: INTEGER + :ivar control_points: + :vartype control_points: ARRAY[CARTESIAN_POINT, ...] + :ivar upper_index_on_knots: + :vartype upper_index_on_knots: INTEGER + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_b_spline_curve_with_knots.html + """ + # TODO: type of knot_spec from str to KNOT_TYPE + def __init__(self, name, degree, control_points_list, curve_form, + closed_curve, self_intersect, knot_multiplicities, + knots, knot_spec): + self.knot_multiplicities = knot_multiplicities + self.knots = knots + self.knot_spec = knot_spec + + self.upper_index_on_knots = len(knots) + + super().__init__(name, degree, control_points_list, curve_form, + closed_curve, self_intersect) + +class ORIENTED_EDGE(EDGE): + """STEP Standard ENTITY oriented_edge + + Explicit Attributes + + :param name: label + :type name: STRING + :param edge_start: [re-declared attribute from edge] + :type edge_start: VERTEX + :param edge_end: [re-declared attribute from edge] + :type edge_end: VERTEX + :param edge_element: + :type edge_element: EDGE + :param orientation: + :type orientation: BOOLEAN + + Derived Attributes + + :ivar edge_start: [re-declared attribute from edge] + :vartype edge_start: VERTEX + :ivar edge_end: [re-declared attribute from edge] + :vartype edge_end: VERTEX + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_oriented_edge.html + """ + def __init__(self, name, edge_start, edge_end, edge_element, + orientation): + # if edge_element not EDGE + if not isinstance(self, type(edge_element)): + # value of edge_start should be '*' + # value of edge_end should be '*' + self.edge_element = edge_element + self.orientation = BOOLEAN(orientation) + + self.edge_start = boolean_choose( + self.orientation, + self.edge_element.edge_start, self.edge_element.edge_end) + self.edge_end = boolean_choose( + self.orientation, + self.edge_element.edge_end, self.edge_element.edge_start) + + super().__init__(name, self.edge_start, self.edge_end) + else: + raise ValueError(edge_element + 'is not an EDGE') + +class LOOP(TOPOLOGICAL_REPRESENTATION_ITEM): + """STEP Standard ENTITY loop + + Explicit Attributes + + :param name: label + :type name: STRING + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_loop.html + """ + +class PATH(TOPOLOGICAL_REPRESENTATION_ITEM): + """STEP Standard ENTITY path + + Explicit Attributes + + :param name: label + :type name: STRING + :param edge_list: + :type edge_list: LIST[ORIENTED_EDGE, ...] + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_path.html + """ + def __init__(self, name, edge_list): + self.edge_list = edge_list + super().__init__(name) + if not path_head_to_tail(self): + raise ValueError(edge_list + 'is not a path') + +class EDGE_LOOP(PATH, LOOP): + """STEP Standard ENTITY edge_loop + + Explicit Attributes + + :param name: label + :type name: STRING + :param edge_list: + :type edge_list: LIST[ORIENTED_EDGE, ...] + + .. seealso:: + https://www.steptools.com/stds/stp_aim/html/t_edge_loop.html + """ + def __init__(self, name, edge_list): + self.edge_list = edge_list + super().__init__(name, edge_list) + + self.ne = len(self.edge_list) + if self.edge_list[0].edge_start != self.edge_list[self.ne-1].edge_end: + raise ValueError(edge_list + 'is not a loop') diff --git a/pylib/function.py b/pylib/function.py index 9fa1686..d154154 100755 --- a/pylib/function.py +++ b/pylib/function.py @@ -124,10 +124,10 @@ def sine_wave(A=1, k=1, f=1, phi=0, D=0, degree=False): def cosine_wave(A=1, k=1, f=1, phi=0, D=0, degree=False): r"""A cosine wave is said to be sinusoidal, because, - :math:`\cos(x) = \sin(x + \pi/2)`, which is also a sine wave with a - phase-shift of π/2 radians. Because of this head start, it is often - said that the cosine function leads the sine function or the sine - lags the cosine. + :math:`\cos(x) = \sin(x + \pi/2)`, which is also a sine wave with + a phase-shift of π/2 radians. Because of this head start, it is + often said that the cosine function leads the sine function or + the sine lags the cosine. :param A: amplitude :type A: float or int @@ -160,22 +160,25 @@ def cosine_wave(A=1, k=1, f=1, phi=0, D=0, degree=False): def b_spline_basis(knots, knot_span, degree): r"""Cox-de Boor algorithm / recursion formula. - Calculate the i-th B-spline basis function of degree p: N_{i,p}(u) + Calculate the i-th B-spline basis function of degree p: + :math:`N_{i,p}(u)` :param knots: Knot vector U. m + 1 non-decreasing numbers / knots, - :math:`u_0 <= u_1 <= u_2 <= ... <= u_m` + :math:`u_0 \le u_1 \le u_2 \le \dots \le u_m` :type knots: list :param knot_span: i-th knot span :type knot_span: int :param degree: degree of B-spline basis function :type degree: int - :returns: B-spline basis function using variable, u \in [u_0, u_m] + :returns: B-spline basis function using variable, + :math:`u \in [u_0, u_m]` :rtype: function .. math:: - N_{i,0}(u) &= \begin{cases} 1 & \text{if } u_i \le u \lt u_{i+1} \\ - 0 & \text{otherwise}\end{cases} \\ + N_{i,0}(u) &= \begin{cases} + 1 & \text{if } u_i \le u \lt u_{i+1} \\ + 0 & \text{otherwise}\end{cases} \\ N_{i,p}(u) &= \frac{u - u_i}{u_{i+p} - u_i} N_{i,p-1}(u) + \frac{u_{i+p+1} - u}{u_{i+p+1} - u_{i+1}} N_{i+1,p-1}(u) @@ -242,10 +245,10 @@ def b_spline_curve_with_knots(degree, control_points, knots): :param control_points: control points P, n + 1 control points :type control_points: list :param knots: Knot vector U. m + 1 non-decreasing numbers / knots, - :math:`u_0 <= u_1 <= u_2 <= ... <= u_m` + :math:`u_0 \le u_1 \le u_2 \le \dots \le u_m` :type knots: list - :returns: B-spline curve using variable, u \in [u_0, u_m] + :returns: B-spline curve using variable, :math:`u \in [u_0, u_m]` :rtype: function .. math:: @@ -256,10 +259,11 @@ def b_spline_curve_with_knots(degree, control_points, knots): * the curve will not touch the first and last legs of the control polyline * the knot vector does not have any particular structure - * for degree p, intervals [u_0, u_p) and [u_{n-p}, u_n) will not - have "full support" of basis functions and are ignored when a - B-spline curve is open. For open B-spline curves, the domain - is inteval [u_p, u_{n-p}] + * for degree p, intervals :math:`[u_0, u_p)` and + :math:`[u_{n-p}, u_n)` will not have "full support" of basis + functions and are ignored when a B-spline curve is open. For + open B-spline curves, the domain is inteval + :math:`[u_p, u_{n-p}]` * clamped B-spline curves, nonperiodic B-spline curves @@ -272,7 +276,7 @@ def b_spline_curve_with_knots(degree, control_points, knots): * the start and the end of the generated curve join together forming a closed loop - * repeating some knots and control points # TODO: which? + * repeating some knots and control points (TODO: which?) * uniform B-spline curves @@ -413,9 +417,9 @@ def hypotrochoid(R, r, d): * * * * * - >>> x, y = hyotrochoid(20, 6, 6)[:2] - >>> x, y, _ = hyotrochoid(20, 6, 6) - >>> x, y, interval = hyotrochoid(20, 6, 6) + >>> x, y = hypotrochoid(20, 6, 6)[:2] + >>> x, y, _ = hypotrochoid(20, 6, 6) + >>> x, y, interval = hypotrochoid(20, 6, 6) .. seealso:: :meth:`pylib.mathematics.lcm` diff --git a/pylib/geometry2d.py b/pylib/geometry2d.py index 7c733a9..9ee5d94 100644 --- a/pylib/geometry2d.py +++ b/pylib/geometry2d.py @@ -438,7 +438,7 @@ def line(point1, point2, samples=2): >>> x, y = line((0, 0), (1, 0)) >>> print(x, y) - ((0, 1), (0, 0)) + (0, 1) (0, 0) """ p1x, p1y = point1 p2x, p2y = point2 diff --git a/pylib/helper.py b/pylib/helper.py index b346219..ca2a535 100755 --- a/pylib/helper.py +++ b/pylib/helper.py @@ -23,18 +23,18 @@ class timeit(ContextDecorator): :Example: - >>> with timeit('section_test'): - ... # code - section_test took 0.006 ms - :: + with timeit('section_test'): + # code + section_test took 0.006 ms + @timeit('func') def func(): # code - >>> func() - func took 0.006 ms + func() + func took 0.006 ms """ def __init__(self, description=None): self.description = description diff --git a/pylib/mathematics.py b/pylib/mathematics.py index 3a6f360..59fdf90 100644 --- a/pylib/mathematics.py +++ b/pylib/mathematics.py @@ -79,7 +79,7 @@ class vector(list): >>> m = vector([1, 2, 3]) >>> m *= vector([3, 3, 3]) >>> print(v) - [[3, 3, 3], [6, 6, 6], [9, 9, 9]] + 18 """ def __getitem__(self, index): @@ -89,7 +89,7 @@ class vector(list): :Example: >>> v = vector([1, 2, 3, 4, 5]) - >>> v[1:3] + >>> print(v[1:3]) [2, 3] >>> v = vector([1, 2, 3, 4, 5]) >>> v[3] @@ -405,12 +405,15 @@ class vector(list): :Example: + >>> import random + >>> random.seed(1) >>> v = vector.random(3) >>> print(v) - [0.9172905912930438, 0.8908124278322492, 0.5256002790725927] + [0.13436424411240122, 0.8474337369372327, 0.763774618976614] + >>> random.seed(1) >>> v = vector.random(3, 1, 2) >>> print(v) - [1.2563665665080803, 1.9270454509964547, 1.2381672401270487] + [1.134364244112401, 1.8474337369372327, 1.7637746189766141] """ import random dl = lmax-lmin @@ -638,8 +641,7 @@ class matrix(list): :Example: - >>> m = matrix([[1, 2, 3, 0], [4, 5, 6, 0], [7, 8, 9, 0], \ - [0, 0, 0, 0]]) + >>> m = matrix([[1, 2, 3, 0], [4, 5, 6, 0], [7, 8, 9, 0], [0, 0, 0, 0]]) >>> print(m[:]) [[1, 2, 3, 0], [4, 5, 6, 0], [7, 8, 9, 0], [0, 0, 0, 0]] >>> print(m[2]) @@ -702,20 +704,16 @@ class matrix(list): :Example: - >>> m = matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], \ - [0, 0, 0, 1]]) * 5 + >>> m = matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [0, 0, 0, 1]]) * 5 >>> print(m) [[5, 10, 15, 20], [25, 30, 35, 40], [45, 50, 55, 60], [0, 0, 0, 5]] - >>> m = matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], \ - [0, 0, 0, 1]]) * 5. + >>> m = matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [0, 0, 0, 1]]) * 5. >>> print(m) [[5.0, 10.0, 15.0, 20.0], [25.0, 30.0, 35.0, 40.0], [45.0, 50.0, 55.0, 60.0], [0.0, 0.0, 0.0, 5.0]] - >>> v = matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) * \ - vector([12, 12, 13]) + >>> v = matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) * vector([12, 12, 13]) >>> print(v) [75, 186, 297] - >>> m = matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) * \ - matrix([[12, 12, 13], [14, 15, 16], [17, 18, 19]]) + >>> m = matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) * matrix([[12, 12, 13], [14, 15, 16], [17, 18, 19]]) >>> print(m) [[91, 96, 102], [220, 231, 246], [349, 366, 390]] @@ -749,12 +747,10 @@ class matrix(list): :Example: - >>> m = 5 * matrix([[1, 2, 3, 4], [5, 6, 7, 8], \ - [9, 10, 11, 12], [0, 0, 0, 1]]) + >>> m = 5 * matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [0, 0, 0, 1]]) >>> print(m) [[5, 10, 15, 20], [25, 30, 35, 40], [45, 50, 55, 60], [0, 0, 0, 5]] - >>> m = 5. * matrix([[1, 2, 3, 4], [5, 6, 7, 8], \ - [9, 10, 11, 12], [0, 0, 0, 1]]) + >>> m = 5. * matrix([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [0, 0, 0, 1]]) >>> print(m) [[5.0, 10.0, 15.0, 20.0], [25.0, 30.0, 35.0, 40.0], [45.0, 50.0, 55.0, 60.0], [0.0, 0.0, 0.0, 5.0]] diff --git a/pylib/numerical/integration.py b/pylib/numerical/integration.py index eefe983..419fdb9 100644 --- a/pylib/numerical/integration.py +++ b/pylib/numerical/integration.py @@ -97,7 +97,7 @@ def trapez(f, a=0, b=1, N=10, x=None, verbose=False, numerical solution - >>> f = lambda(x): x**2 + >>> f = lambda x: x**2 >>> trapez(f, 0, 1, 1) 0.5 >>> trapez(f, 0, 1, 10) diff --git a/tests/test_data_step_std.py b/tests/test_data_step_std.py index fa6ddb6..0901bf4 100755 --- a/tests/test_data_step_std.py +++ b/tests/test_data_step_std.py @@ -13,29 +13,57 @@ import unittest import os import sys + +from pylib.data_step_std import ( + BOOLEAN, + CARTESIAN_POINT, + VERTEX_POINT, + ) + sys.path.insert(0, os.path.abspath('..')) -from pylib.data_step_std import CARTESIAN_POINT, VERTEX_POINT + class TestDataStepStd(unittest.TestCase): + def test_BOOLEAN(self): + self.assertRaises( + TypeError, + BOOLEAN, + ) + self.assertRaises( + ValueError, + BOOLEAN, + '', + ) + self.assertEqual( + BOOLEAN('.T.'), + True, + ) + self.assertEqual( + BOOLEAN('.F.'), + False, + ) + + #def test_ + def test_multi_objects(self): cp = CARTESIAN_POINT('', (0.E+000, 0.E+000, 0.E+000)) #print(cp) self.assertEqual( - str(cp), - "#1 = CARTESIAN_POINT('', (0.0, 0.0, 0.0))") + str(cp), + "#1 = CARTESIAN_POINT('', (0.0, 0.0, 0.0))") cp2 = eval('CARTESIAN_POINT("j", (0.E+000,0.E+000,0.E+000))') #print(cp2) self.assertEqual( - str(cp2), - "#2 = CARTESIAN_POINT('j', (0.0, 0.0, 0.0))") + str(cp2), + "#2 = CARTESIAN_POINT('j', (0.0, 0.0, 0.0))") vp = VERTEX_POINT('', cp) #print(vp) self.assertEqual( - str(vp), - "#3 = VERTEX_POINT('', #1)") + str(vp), + "#3 = VERTEX_POINT('', #1)") if __name__ == '__main__':