如何在 OpenSCAD 中使用 Sphere 渲染 dxf 文件 [英] How can I render a dxf file with Sphere in OpenSCAD
问题描述
我在导入 dxf 文件时遇到渲染问题.
渲染成功:
- 对 dxf 文件使用 linear_extrude() 并显示一个球体.
- 仅对 dxf 文件使用rotate_extrude().
渲染失败:
- 对 dxf 文件使用 rotate_extrude() 并显示一个球体.
这是我的源代码:
module loadFile() {旋转挤压()import("import_exercise.dxf");}模块 loadSphere() {翻译([0,0,-30])球体(10);}加载文件();负载球();
错误信息如下:
错误:CGAL_Nef_polyhedron3() 中的 CGAL 错误:CGAL 错误:断言冲突!表达式:e->incident_sface() != SFace_const_handle() 文件:/Users/kintel/code/OpenSCAD/openscad/../libraries/install/include/CGAL/Nef_S2/SM_const_decorator.h 行:329
这里是scad文件:
您可以从 box
下载 dxf 文件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
Thank you!
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
这篇关于如何在 OpenSCAD 中使用 Sphere 渲染 dxf 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!