本文介绍了如何在OpenSCAD中使用Sphere渲染dxf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在导入dxf文件时遇到渲染问题。



渲染成功:




  • 对dxf文件使用linear_extrude()并显示一个球体。

  • 对dxf文件仅使用rotate_extrude()。



渲染失败:




  • 将rotate_extrude()用于dxf文件并显示



这是我的源代码:

  module loadFile(){
rotation_extrude()
import( import_exercise.dxf);
}

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

loadFile();
loadSphere();

以下是错误消息:

 错误:CGAL_Nef_polyhedron3()中的CGAL错误:CGAL错误:违反声明! Expr:e-> incident_sface()!= SFace_const_handle()文件:/Users/kintel/code/OpenSCAD/openscad/../libraries/install/include/CGAL/Nef_S2/SM_const_decorator.h行:329 

以下是scad文件:





您可以从以下位置下载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

Preview success

Render fail

Render success

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文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 08:18