How can I render a dxf file with Sphere in OpenSCAD

旧巷老猫 提交于 2019-12-11 15:27:30

问题


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:


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!

You can download the dxf-files from box



来源:https://stackoverflow.com/questions/48217579/how-can-i-render-a-dxf-file-with-sphere-in-openscad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!