LibreCAD 3 Development Logs

Development logs of GSoC 2017

No comments

Today I worked on the insert entity rendering.
I removed the rendering of the entities which are part of a block, and added the rendering of insert.
For each entity of the block, it does: draw(entity->move(block->base() - insert))
That should be optimizable, but for the moment the performance is good.

I also added the builder for Point and Insert, and use it in DXFimpl, with the corresponding unit tests.

I just need to find a way to get a block by its name during DXF load when adding an insert entity. I'll probably create a temporary map

No comments

Yesterday I had my last exam, so now I have more time to work on LibreCAD.

Today I continued to create the builders, with unit tests, and changes in DXF implementation.
I also added block line width, line pattern and color.

The builders creation still require time, this might impact my planning and take me one more week.

No comments

Today I started working on builders for entities, to remove some code duplication in the constructors.
After those changes, there will be at most 4 constructors :

  • copy constructor;
  • move constructor;
  • builder constructor;
  • constructor with every parameters for a faster creation;

The builder constructor is a constructor which takes the builder as a parameter, and construct the object.
This is required for builder inheritance and do :

Line(Builder) : CADEntity(builder) { … }

The builder constructor is private so the build() method of the builder should be used, which verify all the parameters. The verification will be done in the constructor with every parameters when all the others constructors will be removed.

The unneeded constructors will not be removed now at it will take time to update all the code, and I think I'll take more time than what I planned to add blocks and INSERT support.

No comments

As my exams are (almost) over, I began to work on my project for LibreCAD 3 this week-end.

The first part of the project consists of implementing blocks and INSERT entities.

The block is only a Document meta data containing the name and the base coordinate. The entities added to the Document will have a reference to the containing block.
All the entities will require a builder because with the current design, at least 4 constructors are required.

What was done:

  • Load blocks from DXF files
  • Add blocks to the document
  • INSERT entity class