Code Monkey home page Code Monkey logo

dstv.net's Introduction

DSTV.Net

Build and Test Publish NuGet version (DSTV.Net)

DSTV.Net is an open-source library tailored for .NET platforms, providing a powerful utility for interacting with DSTV (also known as NC1 or Tekla) files. These files serve as a key industry standard in the steel industry, defining geometry and project information for steel plates. Introduction

DSTV.Net is a precision-oriented, high-performance library designed to simplify the process of working with DSTV files. It equips developers and software applications with the ability to read and interpret DSTV file content effortlessly, making it ideal for CAD, CAM, CNC, and other software applications associated with steel fabrication and structural engineering. Features

Getting started

Installation via Package Manager Console in Visual Studio:

PM> Install-Package DSTV.Net

Installation via .NET CLI:

> dotnet add <TARGET PROJECT> package DSTV.Net

Header Information Parsing

DSTV.Net offers robust parsing capabilities, adept at extracting header information from DSTV files. This function allows access to crucial metadata such as part name, material type, thickness, and more. Such data can be instrumental in areas like material management and manufacturing planning.

Usage

// Open a stream to the dstv file.
using var streamReader = new StreamReader("[filename]");
// Create a new dstv reader
var dstvReader = new DstvReader();
// Parse the dstv file.
var parsedDstv = await dstvReader.ParseAsync(streamReader))
// Access the header information
var dstvHeader = parsedDstv.Header;
// Print the order identification
Console.WriteLine(dstvHeader.OrderIdentification);

The header information contains the following properties:

Property Type Description
OrderIdentification string The order identification of the project
DrawingIdentification string The drawing identification of the piece within the project
PhaseIdentification string The phase identification of the piece within the project
PieceIdentification string The piece identification of the piece
SteelQuality string The steel quality of the piece
QuanityOfPieces int The quantity of pieces in the project
Profile string The profile of the piece
CodeProfile CodeProfile The code profile of the piece
Length double The length of the piece
SawLength double The saw length of the piece
ProfileHeight double The profile height of the piece
FlangeWidth double The flange width of the piece
WebThickness double The web thickness of the piece
Radius double The radius of the piece
WeightByMeter double The weight by meter of the piece
PaintingSurfaceByMeter double The painting surface by meter of the piece
WebStartCut double The web start cut of the piece
WebEndCut double The web end cut of the piece
FlangeStartCut double The flange start cut of the piece
FlangeEndCut double The flange end cut of the piece
Text1InfoOnPiece string The text 1 info on the piece
Text2InfoOnPiece string The text 2 info on the piece
Text3InfoOnPiece string The text 3 info on the piece
Text4InfoOnPiece string The text 4 info on the piece

The CodeProfile contains the following values:

Code Description
I Profile I
L Profile L
U Profile U
B Sheets, Plate, teared sheets, etc.
RU Round
RO Rouned Tube
M Rectangular Tube
C Profile C
T Profile T
SO Special Profile

Geometry Visualization

In addition to parsing, DSTV.Net also facilitates the visualization of the geometry of steel plates as defined in DSTV files. It achieves this by converting the geometric data into an SVG (Scalable Vector Graphics) format. This immediate visual representation aids better understanding and verification of the data extracted.

image image

We support this by providing a SVG generator that can be used to generate SVG files from the parsed DSTV data.

SVG's are lightweight and can be used in a variety of applications, including web applications, and are scalable to any size without losing quality.

Usage

// Open a stream to the dstv file.
using var streamReader = new StreamReader("[filename]");
// Create a new dstv reader
var dstvReader = new DstvReader();
// Parse the dstv file.
var parsedDstv = await dstvReader.ParseAsync(streamReader));
// Generate the SVG content
var svg = parsedDstv.ToSvg();
// Save the svg to a file
await File.WriteAllTextAsync("/tmp/dstv.svg",  @"<!DOCTYPE svg PUBLIC ""-//W3C//DTD SVG 1.1//EN"" ""http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"">" + Environment.NewLine + svg).ConfigureAwait(false);

Feedback is highly appreciated. Thank you for choosing DSTV.Net - happy coding!

dstv.net's People

Contributors

tluijken avatar martijn00 avatar ejayf avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.