YCAD Library Usage

2019-06-02 11:20发布

I started using the YCAD Library. The problem is that I cannot find any usage instructions and I am kind of confused because I have no idea how to use it. I am hoping that somebody here used it before or is using it now so he/she can give me some tips how to use the library.

Thank you in advance.

PS.

One of the requirements for the project is to develop it in Java. I know that there are some good libraries in C#, C++, etc. but I need to do it in Java.

Best regards, Dimitar Georgiev

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-06-02 12:08

Import the classes such as com.ysystems.ycad.lib.yxxf.Yxxf.

Open the file object:

File flname = new File(filename);

Open the buffered input stream with the file:

BufferedInputStream is = null;

Open the buffered stream:

is = new BufferedInputStream(new FileInputStream(flname ));

Create the Yxxf object:

Yxxf dxfDrawing = new Yxxf();

Create the YdxfGetBuffer:

YdxfGetBuffer buffStream = new YdxfGetBuffer();

Set the type:

int typ = YdxfGetBuffer.GET_TYPE_MAIN; 
buffStream .setInput(typ, in, drawing);
YdxfGet.get(buffStream );

After this, you may probably find the objects and iterate through.

查看更多
登录 后发表回答