资源简介
使用DXFlib来读取DXF文件,软件实现了读取出来数据的处理,图形的显示,一个简单的数控加工软件,VS2005编译
代码片段和文件信息
/****************************************************************************
** Copyright (C) 2001-2013 RibbonSoft GmbH. All rights reserved.
**
** This file is part of the dxflib project.
**
** This file is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License or
** (at your option) any later version.
**
** Licensees holding valid dxflib Professional Edition licenses may use
** this file in accordance with the dxflib Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND INCLUDING THE
** WARRANTY OF DESIGN MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.ribbonsoft.com for further details.
**
** Contact info@ribbonsoft.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include “dl_dxf.h“
#include
#include
#include
#include
#include
#include “dl_attributes.h“
#include “dl_codes.h“
#include “dl_creationadapter.h“
#include “dl_writer_ascii.h“
#include “iostream“
/**
* Default constructor.
*/
DL_Dxf::DL_Dxf() {
version = DL_VERSION_2000;
vertices = NULL;
maxVertices = 0;
vertexIndex = 0;
knots = NULL;
maxKnots = 0;
knotIndex = 0;
weights = NULL;
weightIndex = 0;
controlPoints = NULL;
maxControlPoints = 0;
controlPointIndex = 0;
fitPoints = NULL;
maxFitPoints = 0;
fitPointIndex = 0;
leaderVertices = NULL;
maxLeaderVertices = 0;
leaderVertexIndex = 0;
}
/**
* Destructor.
*/
DL_Dxf::~DL_Dxf() {
if (vertices!=NULL) {
delete[] vertices;
}
if (knots!=NULL) {
delete[] knots;
}
if (controlPoints!=NULL) {
delete[] controlPoints;
}
if (fitPoints!=NULL) {
delete[] fitPoints;
}
if (weights!=NULL) {
delete[] weights;
}
if (leaderVertices!=NULL) {
delete[] leaderVertices;
}
}
/**
* @brief Reads the given file and calls the appropriate functions in
* the given creation interface for every entity found in the file.
*
* @param file Input
* Path and name of file to read
* @param creationInterface
* Pointer to the class which takes care of the entities in the file.
*
* @retval true If \p file could be opened.
* @retval false If \p file could not be opened.
*/
bool DL_Dxf::in(const std::string& file DL_CreationInterface* creationInterface) {
FILE *fp;
firstCall = true;
currentobjectType = DL_UNKNOWN;
fp = fopen(file.c_str() “rt“);
if (fp) {
std::locale oldLocale = std::locale::global(std::locale(“C“)); // use dot in numbers
while (readDxfGroups(fp creationInterface)) {}
std::locale::global(oldLocale);
fclose(fp);
return true;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-03-05 14:10 dxflib\
目录 0 2018-03-05 14:10 dxflib\Debug\
文件 4392 2017-12-29 17:09 dxflib\Debug\BuildLog.htm
文件 1629592 2017-12-29 17:09 dxflib\Debug\dl_dxf.obj
文件 49223 2017-12-29 11:50 dxflib\Debug\dl_writer_ascii.obj
文件 338944 2017-12-29 11:27 dxflib\Debug\vc80.idb
文件 348160 2017-12-29 11:27 dxflib\Debug\vc80.pdb
文件 388096 2017-12-29 17:09 dxflib\Debug\vc90.idb
文件 430080 2017-12-29 17:09 dxflib\Debug\vc90.pdb
文件 5755 2017-05-18 16:17 dxflib\dl_attributes.h
文件 21926 2017-05-18 16:17 dxflib\dl_codes.h
文件 5747 2017-05-18 16:17 dxflib\dl_creationadapter.h
文件 11348 2017-05-18 16:17 dxflib\dl_creationinterface.h
文件 144288 2017-12-29 17:08 dxflib\dl_dxf.cpp
文件 18666 2017-05-18 16:17 dxflib\dl_dxf.h
文件 42247 2017-05-18 16:17 dxflib\dl_entities.h
文件 1541 2017-05-18 16:17 dxflib\dl_exception.h
文件 3102 2017-05-18 16:17 dxflib\dl_extrusion.h
文件 299 2017-05-18 16:17 dxflib\dl_global.h
文件 13998 2017-05-18 16:17 dxflib\dl_writer.h
文件 3530 2017-05-18 16:17 dxflib\dl_writer_ascii.cpp
文件 2258 2017-05-18 16:17 dxflib\dl_writer_ascii.h
文件 4337 2017-12-29 11:49 dxflib\dxflib.vcproj
文件 2595 2018-01-26 17:28 dxflib\dxflib.vcproj.2014-0731-0942.celiy.user
文件 1401 2017-12-29 11:35 dxflib\dxflib.vcproj.NML-D9C3CCFBAA9.NML.user
文件 655 2017-12-29 09:27 dxflib\ReadMe.txt
目录 0 2018-03-05 14:10 EasyLaser\
目录 0 2018-03-05 14:10 EasyLaser\_UpgradeReport_Files\
文件 3348 2017-12-29 11:45 EasyLaser\_UpgradeReport_Files\UpgradeReport.css
文件 12505 2008-01-11 01:25 EasyLaser\_UpgradeReport_Files\UpgradeReport.xslt
文件 69 2017-12-29 11:45 EasyLaser\_UpgradeReport_Files\UpgradeReport_Minus.gif
............此处省略3915个文件信息
相关资源
- DXF轨迹图转G代码工具
- AutoCAD表格图形文件中的数据读取
- vs2005学生信息管理系统
- 数控毕业论文
- 数控直流电流源2005全国电子设计竞赛
- x-y数控工作台机电系统设计268865
- 数控加工切削用量计算器V2.0
- 五轴数控电解加工机床控制
- 数控液晶显示可调稳压电源
- 基于LM317的直流数控数控电源
- usbview 的vs2005工程
- 一键批量转换SolidWorks工程图到PDF和
- dxf参考手册中文版
- 简易数控直流电源论文
- X-Y数控工作台设计 课程设计
- 专业程序员必备 VS2005 程序字体颜色设
- C620普遍车床的数控化改造(本科)
- \\VS2005C《图像编程精髓从开发自己的
- 使用LabVIEW读取DXF文件并显示该图形直
- 数控电源制作资料、各种各样电源制
- 读取DXF文件并在OpenGL中显示.
- 数控直流稳压电源 Proteus
- js-output-dxf
- test2_DXF_cc.rar
- 一种新型低纹波高精度数控直流电流
- 直流数控电源Proteus仿真1~10V输出
- 基于FPGA的正交数控振荡器_NCO_的设计
- 基于Autocad的数控线切割自动编程系统
- 数控通讯软件PCIN4.2
- NC 转 dxf 工具
评论
共有 条评论