LEDAS Blog

One hierarchy, many algorithms

Geometrical modeling projects often contain some form of central hierarchy of objects. A geometric kernel, for example, has a hierarchy of geometric entities. Another example is a geometric solver which has a hierarchy of objects and constraints. Simplified inheritance diagrams for these hierarchies are shown in the figures below.

Many routines/algorithms of other modules need to process all the entities in a hierarchy in a similar fashion, although with different implementation details. So, polymorphism naturally is used with these kinds of hierarchies.

Assuming we are talking about C++ (and this is usually the programming language of choice for algorithmic libraries in CAD), using virtual functions is the first consideration for implementing polymorphic behaviour.

However, a variety of routines applied to the entire hierarchy, ...

Read more

This post was written by a LEDAS developer in his own blog, and now we repost it here. Focus on performance is the major goal in our projects, and we are going to publish more posts on this topic.

It is well-known that Debug build in Visual C++ is very slow compared to Release build, with the typical ratio about 10-20 times. Various reasons behind it are often stated, and some people even believe that it is inevitable because it is caused by lack of compiler optimizations.

If some issue happens only on a large dataset or in a real-time application, and it cannot be extracted into a smaller test case, then developer is forced to debug Release build. Which is rather painful ...

Read more

How to Hack C++ with Templates and Friends

May 07, 2020 Andrey Karpovskii

Templates are a very powerful feature in C++, because they allow you to write generic programs that accept a data type as an extra parameter. This feature of them means that we don’t need to repeat similar code for different data types.

When templates were first introduced in C++, their capabilities were unforeseen. Since then templates have grown into a separate functional language inside of C++. This language has its own syntax, rules, and huge number of specifics, one of which I will discuss later.

How Templates Work

Each template defines a family of functions. It is, after all, a functional language. But the family does not produce any code on its own. Instead, the compiler generates code only for functions that are actually used in the program. This process ...

Read more

On C++ code bloat

Apr 08, 2020
Foreword by Alexey Ershov:
After publishing my post about C++'s new standard, in which slow compilation time is highlighted as the most bothersome C++ feature, one of our developers responded with a link to his post from 2018. This post is more technically involved with the problems that code bloat have on slow compilation times. It focuses primarily on the negative effect of extensive templates, headers, and inlines on compile times, but then also provides the programming practices to overcome these problems. Read it here now.


The C++ language is known for its slow build times. This problem is not present in the world of pure C, which might give a hint that the problem is caused by some ...

Read more

Which Missing C++ Features Are Needed Most?

Mar 26, 2020 Alexey Ershov
A dozen LEDAS programmers took part in a C++ event a month ago in our city of Novosibirsk, which was happily organized before the spread of any COVID-19. C++ has become a very complex programming language with a long history stretching back to 1983, and so it was tricky for event organizers to arrange talks that appealed to every kind of developer. Perhaps the easiest thing to talk about was new standards, and this year this was possible as the new C++ 20 standard is on its way.

Following the event, we wanted to know what our LEDAS programmers thought about C++ 20, and now we have their answers available to share with you.

C++ 20 highlights four major new features: concepts, ranges, coroutines, and modules. Here is how our ...

Read more


Show: 10 20 50 All