PartDesign: New features AdditiveHelix and SubtractiveHelix
These features, based on the code for the Pipe class, allow the user to simply create a helical sweep within PartDesign workbench. Sample application is threads, springs, coils, augers, etc. Also, remove needless requirement for positive cone angle on helixes. Thanks to @bitacovir for helping with the icons Thanks to @chennes for review Thanks to @vosk for review Thanks to @wwmayer for review Enforce that links stay within scope for ProfileBased features This also ensures that the Body itself is not used for creating features within the body, causing a "Graph not a DAG" error.
This commit is contained in:
62
src/Mod/PartDesign/Gui/ViewProviderHelix.h
Normal file
62
src/Mod/PartDesign/Gui/ViewProviderHelix.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2011 Juergen Riegel <FreeCAD@juergen-riegel.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library 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 library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef PARTGUI_ViewProviderHelix_H
|
||||
#define PARTGUI_ViewProviderHelix_H
|
||||
|
||||
#include "ViewProviderAddSub.h"
|
||||
|
||||
|
||||
namespace PartDesignGui {
|
||||
|
||||
class PartDesignGuiExport ViewProviderHelix : public ViewProviderAddSub
|
||||
{
|
||||
PROPERTY_HEADER(PartDesignGui::ViewProviderHelix);
|
||||
|
||||
public:
|
||||
/// constructor
|
||||
ViewProviderHelix();
|
||||
/// destructor
|
||||
virtual ~ViewProviderHelix();
|
||||
|
||||
void setupContextMenu(QMenu*, QObject*, const char*);
|
||||
|
||||
/// grouping handling
|
||||
std::vector<App::DocumentObject*> claimChildren(void)const;
|
||||
|
||||
virtual bool onDelete(const std::vector<std::string> &);
|
||||
|
||||
protected:
|
||||
virtual QIcon getIcon(void) const;
|
||||
|
||||
/// Returns a newly created TaskDlgHelixParameters
|
||||
virtual TaskDlgFeatureParameters *getEditDialog();
|
||||
virtual bool setEdit(int ModNum);
|
||||
virtual void unsetEdit(int ModNum);
|
||||
};
|
||||
|
||||
|
||||
} // namespace PartDesignGui
|
||||
|
||||
|
||||
#endif // PARTGUI_ViewProviderHelix_H
|
||||
Reference in New Issue
Block a user