<commit_before>from UM.Math.Color import Color

import numpy


class LayerPolygon:
    NoneType = 0
    Inset0Type = 1
    InsetXType = 2
    SkinType = 3
    SupportType = 4
    SkirtType = 5
    InfillType = 6
    SupportInfillType = 7
    MoveCombingType = 8
    MoveRetractionType = 9
    SupportInterfaceType = 10
    
    __jump_map = numpy.logical_or( numpy.arange(11) == NoneType, numpy.arange(11) >= MoveRetractionType )
    
    def __init__(self, mesh, extruder, line_types, data, line_widths):
        self._mesh = mesh
        self._extruder = extruder
        self._types = line_types
        self._data = data
        self._line_widths = line_widths
        
        self._vertex_begin = 0
        self._vertex_end = 0
        self._index_begin = 0
        self._index_end = 0
        
        self._jump_mask = self.__jump_map[self._types]
        self._jump_count = numpy.sum(self._jump_mask)
        self._mesh_line_count = len(self._types)-self._jump_count
        self._vertex_count = self._mesh_line_count + numpy.sum( self._types[1:] == self._types[:-1])
<commit_msg>Properly hide moves and retractions in lower layers<commit_after>from UM.Math.Color import Color

import numpy


class LayerPolygon:
    NoneType = 0
    Inset0Type = 1
    InsetXType = 2
    SkinType = 3
    SupportType = 4
    SkirtType = 5
    InfillType = 6
    SupportInfillType = 7
    MoveCombingType = 8
    MoveRetractionType = 9
    SupportInterfaceType = 10
    
    __jump_map = numpy.logical_or(numpy.logical_or(numpy.arange(11) == NoneType, numpy.arange(11) == MoveCombingType), numpy.arange(11) == MoveRetractionType)
    
    def __init__(self, mesh, extruder, line_types, data, line_widths):
        self._mesh = mesh
        self._extruder = extruder
        self._types = line_types
        self._data = data
        self._line_widths = line_widths
        
        self._vertex_begin = 0
        self._vertex_end = 0
        self._index_begin = 0
        self._index_end = 0
        
        self._jump_mask = self.__jump_map[self._types]
        self._jump_count = numpy.sum(self._jump_mask)
        self._mesh_line_count = len(self._types)-self._jump_count
        self._vertex_count = self._mesh_line_count + numpy.sum( self._types[1:] == self._types[:-1])

{'fraction_non_alphanumeric': 0.0877038342882327, 'fraction_numerical': 0.021154693697664168, 'mean_word_length': 2.4976887519260402, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '6470190', 'n_tokens_mistral': 797, 'n_tokens_neox': 734, 'n_words': 152}