FreeCAD

Форк
0
/
JointGroup.cpp 
55 строк · 2.3 Кб
1
// SPDX-License-Identifier: LGPL-2.1-or-later
2
/****************************************************************************
3
 *                                                                          *
4
 *   Copyright (c) 2023 Ondsel <development@ondsel.com>                     *
5
 *                                                                          *
6
 *   This file is part of FreeCAD.                                          *
7
 *                                                                          *
8
 *   FreeCAD is free software: you can redistribute it and/or modify it     *
9
 *   under the terms of the GNU Lesser General Public License as            *
10
 *   published by the Free Software Foundation, either version 2.1 of the   *
11
 *   License, or (at your option) any later version.                        *
12
 *                                                                          *
13
 *   FreeCAD is distributed in the hope that it will be useful, but         *
14
 *   WITHOUT ANY WARRANTY; without even the implied warranty of             *
15
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU       *
16
 *   Lesser General Public License for more details.                        *
17
 *                                                                          *
18
 *   You should have received a copy of the GNU Lesser General Public       *
19
 *   License along with FreeCAD. If not, see                                *
20
 *   <https://www.gnu.org/licenses/>.                                       *
21
 *                                                                          *
22
 ***************************************************************************/
23

24
#include "PreCompiled.h"
25
#ifndef _PreComp_
26
#endif
27

28
#include <App/Application.h>
29
#include <App/Document.h>
30
#include <App/FeaturePythonPyImp.h>
31
#include <App/PropertyPythonObject.h>
32
#include <Base/Console.h>
33
#include <Base/Tools.h>
34

35
#include "JointGroup.h"
36
#include "JointGroupPy.h"
37

38
using namespace Assembly;
39

40

41
PROPERTY_SOURCE(Assembly::JointGroup, App::DocumentObjectGroup)
42

43
JointGroup::JointGroup()
44
{}
45

46
JointGroup::~JointGroup() = default;
47

48
PyObject* JointGroup::getPyObject()
49
{
50
    if (PythonObject.is(Py::_None())) {
51
        // ref counter is set to 1
52
        PythonObject = Py::Object(new JointGroupPy(this), true);
53
    }
54
    return Py::new_reference_to(PythonObject);
55
}
56

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.