QSketchMetric is a Python 2D parametric DXF CAD rendering engine. Parametrization is done using QCAD Professional software
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')
The most common case is the installation by pip package manager:
pip install qsketchmetric
Examples of parametrized DXF files can be found in the examples directory. 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...
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...
- 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 usingINSERT
entity. - Open source and daily maintained
YouTube tutorials are available at Tutorials playlist
Documentation is available at QSketchMetric docs
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!
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.
This project exists thanks to all the people who contribute. Thank you!