<commit_before>﻿using System.Linq;
using I3DShapesTool.Lib.Model;
using I3DShapesTool.Lib.Tools;
using System.IO;

namespace I3DShapesTool.Lib.Export
{
    public class WavefrontObj : IExporter
    {
        private string Name { get; }

        private string GeometryName { get; }

        private float Scale { get; }

        private I3DTri[] Triangles { get; set; }

        private I3DVector[] Positions { get; set; }

        private I3DVector[] Normals { get; set; }

        private I3DUV[] UVs { get; set; }

        public WavefrontObj(I3DShape shape, string name, float scale = 100)
        {
            Scale = scale;

            string geomname = shape.Name;
            if(geomname.EndsWith("Shape"))
                geomname = geomname[0..^5];

            Name = name;
            GeometryName = geomname;
            Positions = shape.Positions;
            Triangles = shape.Triangles;

            if(shape.Normals != null)
                Normals = shape.Normals;

            if(shape.UVSets.Length > 0)<commit_msg>Removed range operator case<commit_after>﻿using System.Linq;
using I3DShapesTool.Lib.Model;
using I3DShapesTool.Lib.Tools;
using System.IO;

namespace I3DShapesTool.Lib.Export
{
    public class WavefrontObj : IExporter
    {
        private string Name { get; }

        private string GeometryName { get; }

        private float Scale { get; }

        private I3DTri[] Triangles { get; set; }

        private I3DVector[] Positions { get; set; }

        private I3DVector[] Normals { get; set; }

        private I3DUV[] UVs { get; set; }

        public WavefrontObj(I3DShape shape, string name, float scale = 100)
        {
            Scale = scale;

            string geomname = shape.Name;
            if(geomname.EndsWith("Shape"))
                geomname = geomname.Substring(0, geomname.Length - 5);

            Name = name;
            GeometryName = geomname;
            Positions = shape.Positions;
            Triangles = shape.Triangles;

            if(shape.Normals != null)
                Normals = shape.Normals;

            if(shape.UVSets.Length > 0)
{'fraction_non_alphanumeric': 0.09485606418121756, 'fraction_numerical': 0.013213780084945729, 'mean_word_length': 1.9608938547486034, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1546369', 'n_tokens_mistral': 670, 'n_tokens_neox': 618, 'n_words': 156}