<commit_before>from math import pi

import gmsh


class Cone:
    """
    Creates a cone.

    center : array-like[3]
        The 3 coordinates of the center of the first circular face.
    axis : array-like[3]
        The 3 components of the vector defining its axis.
    radius0 : float
        Radius of the first circle.
    radius1 : float
        Radius of the second circle.
    angle : float
        Angular opening of the the Cone.
    """

    dim = 3

    def __init__(self, center, axis, radius0, radius1, angle=2 * pi):
        assert len(center) == 3
        assert len(axis) == 3

        self.center = center
        self.axis = axis
        self.radius0 = radius0
        self.radius1 = radius1

        self._id = gmsh.model.occ.addCone(*center, *axis, radius0, radius1, angle=angle)
        self.dim_tag = (3, self._ID)
        self.dim_tags = [(3, self._ID)]
        
    def __repr__(self):
        return f"<pygmsh Cone object, ID {self._id}>"<commit_msg>format<commit_after>from math import pi

import gmsh


class Cone:
    """
    Creates a cone.

    center : array-like[3]
        The 3 coordinates of the center of the first circular face.
    axis : array-like[3]
        The 3 components of the vector defining its axis.
    radius0 : float
        Radius of the first circle.
    radius1 : float
        Radius of the second circle.
    angle : float
        Angular opening of the the Cone.
    """

    dim = 3

    def __init__(self, center, axis, radius0, radius1, angle=2 * pi):
        assert len(center) == 3
        assert len(axis) == 3

        self.center = center
        self.axis = axis
        self.radius0 = radius0
        self.radius1 = radius1

        self._id = gmsh.model.occ.addCone(*center, *axis, radius0, radius1, angle=angle)
        self.dim_tag = (3, self._ID)
        self.dim_tags = [(3, self._ID)]

    def __repr__(self):
        return f"<pygmsh Cone object, ID {self._id}>"
{'fraction_non_alphanumeric': 0.0959257349149046, 'fraction_numerical': 0.020629190304280558, 'mean_word_length': 2.0647709320695102, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4848858', 'n_tokens_mistral': 628, 'n_tokens_neox': 600, 'n_words': 201}