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

Undocumented layer name assumption #10

Open
globalcitizen opened this issue May 18, 2021 · 3 comments
Open

Undocumented layer name assumption #10

globalcitizen opened this issue May 18, 2021 · 3 comments

Comments

@globalcitizen
Copy link

Processing group: main
dxf/test1.dxf
    Source: dxf/test1.dxf
        extrude: 2.0
        Layers: dict_keys([])
Traceback (most recent call last):
  File "/usr/local/bin/co2tools", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/co2tools/__init__.py", line 79, in main
    solidify(yaml_data, execute_action, execute_section, execute_file, base_folder, boolean_engine)
  File "/usr/local/lib/python3.9/site-packages/co2tools/stl/__init__.py", line 44, in solidify
    b.build(modifications, target)
  File "/usr/local/lib/python3.9/site-packages/co2tools/stl/builder.py", line 204, in build
    self.extrude(instructions)
  File "/usr/local/lib/python3.9/site-packages/co2tools/stl/builder.py", line 102, in extrude
    raise BaseException(1, 'Layer {} is not present in DXF file.'.format(self.LAYER_CUT))
BaseException: (1, 'Layer CUT is not present in DXF file.')
@Mambix
Copy link
Owner

Mambix commented May 18, 2021

@globalcitizen can you elaborate a bit what the issue is please.

I assume I need to update some documentation, but what specifically is not clear?

@globalcitizen
Copy link
Author

globalcitizen commented May 19, 2021

It looks like your code is searching for a layer that is not present in the DXF file.

BaseException: (1, 'Layer CUT is not present in DXF file.')

If this is a requirement, I did not see it documented. Anyway, I am switching to OpenSCAD which apparently has DXF import and extrusion as a first-order feature plus loads of other cool features.

@Mambix
Copy link
Owner

Mambix commented May 19, 2021

Yes, the way it works is you have a CUT layer which are outer perimeters and a HOLES layer, which as the name suggests, represent the parts that are cut out of CUT layer. You can name the layers how you want as long as you define that names in the yaml file.

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

No branches or pull requests

2 participants