Giter VIP home page Giter VIP logo

qsketchmetric's Introduction

QSketchMetric logo

CI Documentation Status codecov PyPI - Downloads License: MIT PyPI Python 3 Checked with mypy

QSketchMetric is a Python 2D parametric DXF CAD rendering engine. Parametrization is done using QCAD Professional software

⚡️ Quickstart

from qsketchmetric.renderer import Renderer
from ezdxf import new
from ezdxf import units

output_dxf = new()
output_dxf.units = units.MM

input_parametric_dxf_path = 'tutorial.dxf'
input_variables = {"h": 50}

renderer = Renderer(input_parametric_dxf_path, output_dxf,
                    variables=input_variables)
renderer.render()

output_dxf.saveas('tutorial_rendered.dxf')

📷 Demo showcase

Demo GIF

⚙️ Installation

The most common case is the installation by pip package manager:

  pip install qsketchmetric

📐 DXF Parametrization

Parametrization is done using QCAD Professional software. You can download the free trial version of the software and use it for parametrization of your DXF files. We need to use it because it is the only software that supports adding custom data to DXF entities. See docs to learn more...

✅ QSketchMetric Validator

To verify the proper parametrization of a DXF file during parametrization process, use the QSketchMetric Validator. It is a web application that allows you to upload DXF file and check if it is properly parametrized. In the event of an error, the app will give you full debug report. Including place where the error occurred in the DXF file and the error message. See docs to learn more...

success error

🎯 Features

  • Parametric DXF rendering
  • Easy dxf files parametrization using QCAD Professional software
  • Explicit support for parametrization of LINE,CIRCLE,ARC, POINT entities
  • Support for parametrization of LWPOLYLINE, POLYLINE, SPLINE, ELLIPSE, MTEXT, TEXT etc. entities using INSERT entity.
  • Open source and daily maintained

📚 Documentation

Documentation is available at QSketchMetric docs

📈 Roadmap

Explicit support for more entities is planned in the future. If you have any suggestions, please create an issue. If you want to contribute, see How to contribute section in the documentation. I am open to any suggestions and waiting for your pull requests!

⚠️ License

QSketchMetric is licensed under the MIT license. When using the QSketchMetric in your open-source project I would be grateful for a reference to the repository.

🏆 Hall of fame

This project exists thanks to all the people who contribute. Thank you!

GitHub Contributors Image

qsketchmetric's People

Contributors

dependabot[bot] avatar madscrewdriver avatar makschernetskyi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

makschernetskyi

qsketchmetric's Issues

Explicit support for LWpolyline parametrization

Specific issue of #9. Add support for LWPOLYLINE parametriztion.

Probably it it useless to explicly parametrize complex LWPolylines. Noone will use it because it would be too complex. Parametrizing it using INSERT entity is enough.

It is good idea to have it if somone would like to parametrize silmple LWPOLYLINE entitie.

Refactor tests

Refactor Renderer and SemiAutomaticParametrization tests to smaller test cases.

Add support for QCAD/CAM

Hi,

Does the library skip elements that don't have the "c" attribute?

I've just tried adding CAM data from QCAD/CAM, and getting an error (line 142; xdata parsing).

I've not properly gone through the code, but cursory glance, doesn't seem to be a reason to intentionally fail when elements don't have the "c" attribute? It seems like a nice potential feature, that elements that don't have "c" are not constrained and should be ignored altogether and left alone.

I can see quite a few potential benefits, the biggest is being able to have CAM prepared, so that the rendered file just needs the CAM exporting (it'll regenerate the new path positions), vs having to start from scratch, setting up config, tools, paths and then generating. As I assume paths are moved, but not replaced (so they have their original ID's), anything referencing elements will continue to work after rendering. Another is to have a frame, or other finished elements on different layers... using a point reference, or even graph elements, you could then lay out parametric elements on a finished CAD drawing etc, without ever having to touch the non-parametric elements.

Errors in Docs

Hi,

Just started using the Library - absolutely brilliant tool!

I had a really steep learning curve, mostly I found from a number of missing details, and a few errors/typos in the docs. One of the bigger ones is the interchanged use of "Build" and "Buld" for the MTEXT. Seems not an issue for renderer.py, but is referenced in semiautomatic.py.

I've also struggled to understand the ideal graph of constraints to build for an object, so an explanation of that and different examples would be incredibly useful!

I'm happy to edit and push my updates, or can list issues I've found?

Thanks

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.