Coder Social home page Coder Social logo

yuryatin / egcst Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 205 KB

This package performs triangulation for engineering geological cross-sections

License: MIT License

Python 6.35% Jupyter Notebook 93.65%
delaunay delaunay-triangulation delaunay-triangulator engineering geological mesh meshing meshing-algorithms plotting-in-python triangulation

egcst's Introduction

Python package egcst

This Python package helps to perform triangulation for engineering geological cross-sections.

Installation

This Python package is uploaded to the PyPI repository and therefore can be installed with pip install egcst command line instruction and updated (this is critical at this early stage of development) with pip install egcst --upgrade.

Polygon data format to feed

The only class CrossSection() of this package, when initiated, is expected to read an input text file that contains the polygons with unique geological characteristics in the following format: each polygon is placed on an individual line in the file with vertices' coordinates following one another separated with tabulation characters with x and y coordinates separated with a comma. The expected default name for this input file is input.txt. The object of the class CrossSection(), when initiated, can accept the optional argument input_file_name with another name for this input file. Another optional argument is min_step, which determines the approximate step for the triangulation grid. Its default value is 0.5.

Dependencies

This package depends on the standard Python modules sys and datetime as well as the non-standard Python modules numpy, matplotlib, shapely, ground, and sect.

How to use it

Very easy. The package has only one class CrossSection(), which is initiated with the input text file containing the coordinates for the polygons of the engineering geological cross-section. This class has only 5 'public' methods: .draw_blank(), .triangulate(), .save_triangles(), .draw_triangles(), .do_everything(), which (except for the last one) are expected to be called in this order (and never repeated for the same object). The .save_triangles() method saves triangles in a simplified text formats as well as attempts to do so in a STEP (ISO 10303-21) format. Although since I failed to find a single free working STEP analyzer, it is still a question whether the exported .step files actually comply with the stantard. Your comments on them are very welcome.

The illustration of how to use this package can be found in the attached file egcst_illustration.ipybn .
Briefly this can be expressed like this:

from egcst import CrossSection
cs = CrossSection(input_file_name="input.txt", min_step=1.0)
cs.do_everything()

output_triangles

egcst's People

Contributors

yuryatin avatar

Stargazers

 avatar

Watchers

 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.