How can I render a dxf file with Sphere in OpenSCA

2019-08-19 05:08发布

I have a rendering problem about importing dxf file.

Rendering success:

  • Use linear_extrude() for a dxf file and display a sphere.
  • Only use rotate_extrude() for a dxf file.

Rendering fail:

  • Use rotate_extrude() for a dxf file and display a sphere.

Here is my source code:

module loadFile() {
    rotate_extrude()
        import("import_exercise.dxf");
}

module loadSphere() {
    translate([0,0,-30])
        sphere(10);
}

loadFile();
loadSphere();

Here is the error message:

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: e->incident_sface() != SFace_const_handle() File: /Users/kintel/code/OpenSCAD/openscad/../libraries/install/include/CGAL/Nef_S2/SM_const_decorator.h Line: 329

Here is the scad file:

https://drive.google.com/file/d/1dT84jAzTGn-FxavEXamVivUwODelRqLS/view?usp=sharing

Here is the dxf file:

https://drive.google.com/file/d/1XhjWkydDVEnrn-vYcJOT5-yIjSRtdQaT/view?usp=sharing

Preview success

Render fail

Render success

Thank you!

1条回答
放我归山
2楼-- · 2019-08-19 05:47

The problem is in the dxf-file. Your model touches the y-axis in 1 point. Explanation see in openscad forum. I modified your dxf in two ways. In the first the y-axis is not touched by a point but by a shape, in the second the shape is 0.1 mm parallel to y-axis. Both render without error and the resulting design is valid!

enter image description here

You can download the dxf-files from box

查看更多
登录 后发表回答