Draft: add view provider for Bezier curve object

This commit is contained in:
vocx-fc
2020-04-29 22:50:02 -05:00
committed by Bernd Hahnebach
parent 3ba2f86034
commit 81029a2b74
3 changed files with 40 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_bezier.py
draftviewproviders/view_bspline.py
draftviewproviders/view_circulararray.py
draftviewproviders/view_clone.py

View File

@@ -36,8 +36,7 @@ from draftutils.translate import translate
from draftobjects.bezcurve import BezCurve
if App.GuiUp:
# from draftviewproviders.view_bezcurve import ViewProviderBezCurve
from draftviewproviders.view_wire import ViewProviderWire
from draftviewproviders.view_bezier import ViewProviderBezCurve
def make_bezcurve(pointslist, closed=False, placement=None, face=None, support=None, degree=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 Bezier curve 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_bezier
# \ingroup DRAFT
# \brief Provides the view provider code for Bezier curve objects.
from draftviewproviders.view_wire import ViewProviderWire
class ViewProviderBezCurve(ViewProviderWire):
"""The view provider for the Bezier curve object."""
def __init__(self, vobj):
super(ViewProviderBezCurve, self).__init__(vobj)