Anders wrote:
What is the intended software license of the samples in the "OCCT" repository?
Formulating a proper license terms for code samples is pretty tricky. Obviously, it doesn't make sense prohibiting reuse of code of a sample - this is the very purpose of such samples, after all!
But puting them simply in a public domain doesn't fit well too. You may find the following phrase in some OCCT samples:
// Copyright (c) 2019 OPEN CASCADE SAS
//
// This file is part of the examples of the Open CASCADE Technology software library.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
Take a look at this notice in the message:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The header indicates that this file is part of OCCT samples, and asks to keep this message in it!
I would say that intention of this message is NOT to prevent reusage of code in the sample, but to prevent redistribution of the sample with removed copyright.
E.g., if you made a trivial copy of the sample or made some minor modifications to it - please redistribute it under the same license conditions as the original sample.
But if you write your own application, which reuses some portions of the sample, so that these reused portions become negligable part of the whole product - then this product doesn't need to have the same information as in sample file.
Practically speaking, the portions of reusable code are duplicated by many OCCT samples and in documentation, and writing the new application completely reusing the whole sample is not a good idea, as samples are intended to provide short introduction to OCCT functionality, usually over-simplified (or in opposite - overcomplicated to do simple things for verbosity).
This is NOT exactly what is written in samples, but rather my personal understanding of the intentions. It might be helpful to make a better description in documention related to the samples to avoid confusion and maybe even mark them with a simple license - just to make things simpler.