Draft: add view provider for BSpline object

This commit is contained in:
vocx-fc
2020-04-29 20:58:59 -05:00
committed by Bernd Hahnebach
parent e8c6cdc75a
commit 3ba2f86034
3 changed files with 41 additions and 2 deletions

View File

@@ -113,6 +113,7 @@ SET(Draft_objects
SET(Draft_view_providers
draftviewproviders/__init__.py
draftviewproviders/view_base.py
draftviewproviders/view_bspline.py
draftviewproviders/view_circulararray.py
draftviewproviders/view_clone.py
draftviewproviders/view_facebinder.py

View File

@@ -35,9 +35,9 @@ from draftutils.utils import type_check
from draftutils.translate import translate
from draftobjects.bspline import BSpline
if App.GuiUp:
# from draftviewproviders.view_bspline import ViewProviderBSpline
from draftviewproviders.view_wire import ViewProviderWire
from draftviewproviders.view_bspline import ViewProviderBSpline
def make_bspline(pointslist, closed=False, placement=None, face=None, support=None):

View File

@@ -0,0 +1,38 @@
# ***************************************************************************
# * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it under the terms of the GNU Lesser General Public License (LGPL) *
# * as published by the Free Software Foundation; either version 2 of *
# * the License, or (at your option) any later version. *
# * for detail see the LICENCE text file. *
# * *
# * This program is distributed in the hope that it will be useful, *
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
# * GNU Library General Public License for more details. *
# * *
# * You should have received a copy of the GNU Library General Public *
# * License along with this program; if not, write to the Free Software *
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
# * USA *
# * *
# ***************************************************************************
"""Provides the view provider code for BSpline objects.
At the moment this view provider subclasses the Wire view provider,
and behaves the same as it. In the future this could change
if another behavior is desired.
"""
## @package view_bspline
# \ingroup DRAFT
# \brief Provides the view provider code for BSpline objects.
from draftviewproviders.view_wire import ViewProviderWire
class ViewProviderBSpline(ViewProviderWire):
"""The view provider for the BSpline object."""
def __init__(self, vobj):
super(ViewProviderBSpline, self).__init__(vobj)