Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DXF export (2D) and exporters cleanup #415

Merged
merged 12 commits into from
Jul 30, 2020
Merged

DXF export (2D) and exporters cleanup #415

merged 12 commits into from
Jul 30, 2020

Conversation

adam-urbanczyk
Copy link
Member

@adam-urbanczyk adam-urbanczyk commented Jul 27, 2020

Will resolve #352 , #340, #212, #334 and #360 .

This adds dxf export. Moreover I implemented a new export function and marked exportShape as deprecated:

def export(
    w: Union[Shape, Workplane],
    fname: str,
    exportType: Optional[ExportLiterals] = None,
    tolerance: float = 0.1,
): ...

Now exporting is more user friendly: exporters.export(obj,'out.step')

@codecov
Copy link

codecov bot commented Jul 27, 2020

Codecov Report

Merging #415 into master will increase coverage by 0.02%.
The diff coverage is 95.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #415      +/-   ##
==========================================
+ Coverage   93.56%   93.59%   +0.02%     
==========================================
  Files          19       25       +6     
  Lines        5147     5291     +144     
  Branches      530      548      +18     
==========================================
+ Hits         4816     4952     +136     
- Misses        209      215       +6     
- Partials      122      124       +2     
Impacted Files Coverage Δ
cadquery/occ_impl/exporters/__init__.py 92.63% <92.63%> (ø)
cadquery/occ_impl/exporters/dxf.py 92.85% <92.85%> (ø)
cadquery/__init__.py 100.00% <100.00%> (ø)
cadquery/cq.py 88.06% <100.00%> (+0.13%) ⬆️
cadquery/occ_impl/exporters/amf.py 100.00% <100.00%> (ø)
cadquery/occ_impl/exporters/json.py 100.00% <100.00%> (ø)
cadquery/occ_impl/exporters/svg.py 95.19% <100.00%> (ø)
cadquery/occ_impl/exporters/utils.py 100.00% <100.00%> (ø)
cadquery/occ_impl/jupyter_tools.py 100.00% <100.00%> (ø)
cadquery/occ_impl/shapes.py 90.69% <100.00%> (+0.01%) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac1c8de...62746e3. Read the comment docs.

@adam-urbanczyk adam-urbanczyk changed the title DXF export (2D) [WIP] DXF export (2D) and exporters cleanup Jul 29, 2020
@adam-urbanczyk adam-urbanczyk requested a review from jmwright July 29, 2020 16:23
Copy link
Member

@jmwright jmwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot here so I could have missed some things, but I think it looks good. It's nice to have the exporters broken out and organized rather than all dumped in one (or very few) files. Thanks!

doc/apireference.rst Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export to DXF for 2D sections
2 participants