Merge branch 'master' into dvdjimmy/MachDist

This commit is contained in:
Joachim Zettler 2012-03-27 14:02:49 +02:00
commit a68328eb29
60 changed files with 2274 additions and 232 deletions

View File

@ -1407,6 +1407,7 @@ void Application::initTypes(void)
Gui::BaseView ::init();
Gui::MDIView ::init();
Gui::View3DInventor ::init();
Gui::AbstractSplitView ::init();
Gui::SplitView3DInventor ::init();
// View Provider
Gui::ViewProvider ::init();

View File

@ -125,6 +125,7 @@ set(Gui_MOC_HDRS
HelpView.h
InputVector.h
MainWindow.h
ManualAlignment.h
MDIView.h
NetworkRetriever.h
OnlineDocumentation.h
@ -627,7 +628,7 @@ SET(Inventor_CPP_SRCS
SoFCInteractiveElement.cpp
SoFCOffscreenRenderer.cpp
SoFCSelection.cpp
SoFCUnifiedSelection.cpp
SoFCUnifiedSelection.cpp
SoFCSelectionAction.cpp
SoFCVectorizeSVGAction.cpp
SoFCVectorizeU3DAction.cpp
@ -647,7 +648,7 @@ SET(Inventor_SRCS
SoFCInteractiveElement.h
SoFCOffscreenRenderer.h
SoFCSelection.h
SoFCUnifiedSelection.h
SoFCUnifiedSelection.h
SoFCSelectionAction.h
SoFCVectorizeSVGAction.h
SoFCVectorizeU3DAction.h
@ -743,6 +744,7 @@ SET(FreeCADGui_CPP_SRCS
Thumbnail.cpp
Utilities.cpp
WaitCursor.cpp
ManualAlignment.cpp
)
SET(FreeCADGui_SRCS
Application.h
@ -763,6 +765,7 @@ SET(FreeCADGui_SRCS
Thumbnail.h
Utilities.h
WaitCursor.h
ManualAlignment.h
)
SET(FreeCADGui_SRCS

View File

@ -50,11 +50,13 @@
#include "DlgProjectUtility.h"
#include "Transform.h"
#include "Placement.h"
#include "ManualAlignment.h"
#include "WaitCursor.h"
#include "ViewProvider.h"
#include <Gui/View3DInventor.h>
#include <Gui/View3DInventorViewer.h>
#include "MergeDocuments.h"
#include "NavigationStyle.h"
using namespace Gui;
@ -1013,6 +1015,63 @@ bool StdCmdPlacement::isActive(void)
return (Gui::Control().activeDialog()==0);
}
//===========================================================================
// Std_Alignment
//===========================================================================
DEF_STD_CMD_A(StdCmdAlignment);
StdCmdAlignment::StdCmdAlignment()
: Command("Std_Alignment")
{
sGroup = QT_TR_NOOP("Edit");
sMenuText = QT_TR_NOOP("Alignment...");
sToolTipText = QT_TR_NOOP("Align the selected objects");
sStatusTip = QT_TR_NOOP("Align the selected objects");
sWhatsThis = "Std_Alignment";
}
void StdCmdAlignment::activated(int iMsg)
{
std::vector<App::DocumentObject*> sel = Gui::Selection().getObjectsOfType
(App::GeoFeature::getClassTypeId());
ManualAlignment* align = ManualAlignment::instance();
QObject::connect(align, SIGNAL(emitCanceled()), align, SLOT(deleteLater()));
QObject::connect(align, SIGNAL(emitFinished()), align, SLOT(deleteLater()));
// Get the fixed and moving meshes
FixedGroup fixedGroup;
std::map<int, MovableGroup> groupMap;
fixedGroup.addView(sel[0]);
groupMap[0].addView(sel[1]);
// add the fixed group
align->setFixedGroup(fixedGroup);
// create the model of movable groups
MovableGroupModel model;
model.addGroups(groupMap);
align->setModel(model);
Base::Type style = Base::Type::fromName("Gui::CADNavigationStyle");
Gui::Document* doc = Application::Instance->activeDocument();
if (doc) {
View3DInventor* mdi = qobject_cast<View3DInventor*>(doc->getActiveView());
if (mdi) {
style = mdi->getViewer()->navigationStyle()->getTypeId();
}
}
align->setMinPoints(1);
align->startAlignment(style);
Gui::Selection().clearSelection();
}
bool StdCmdAlignment::isActive(void)
{
if (ManualAlignment::hasInstance())
return false;
return Gui::Selection().countObjectsOfType(App::GeoFeature::getClassTypeId()) == 2;
}
//===========================================================================
// Std_Edit
//===========================================================================
@ -1085,6 +1144,7 @@ void CreateDocCommands(void)
rcCmdMgr.addCommand(new StdCmdRefresh());
rcCmdMgr.addCommand(new StdCmdTransform());
rcCmdMgr.addCommand(new StdCmdPlacement());
rcCmdMgr.addCommand(new StdCmdAlignment());
rcCmdMgr.addCommand(new StdCmdEdit());
}

View File

@ -23,6 +23,7 @@ EXTRA_DIST = \
FreeCAD_it.qm \
FreeCAD_nl.qm \
FreeCAD_no.qm \
FreeCAD_pl.qm \
FreeCAD_pt.qm \
FreeCAD_ru.qm \
FreeCAD_se.qm \
@ -37,6 +38,7 @@ EXTRA_DIST = \
FreeCAD_it.ts \
FreeCAD_nl.ts \
FreeCAD_no.ts \
FreeCAD_pl.ts \
FreeCAD_pt.ts \
FreeCAD_ru.ts \
FreeCAD_se.ts \

View File

@ -146,6 +146,7 @@ Translator::Translator()
d->mapLanguageTopLevelDomain[QT_TR_NOOP("Ukrainian" )] = "uk";
d->mapLanguageTopLevelDomain[QT_TR_NOOP("Finnish" )] = "fi";
d->mapLanguageTopLevelDomain[QT_TR_NOOP("Croatian" )] = "hr";
d->mapLanguageTopLevelDomain[QT_TR_NOOP("Polish" )] = "pl";
d->activatedLanguage = "English";
d->paths = directories();

View File

@ -9,6 +9,7 @@
<file>FreeCAD_it.qm</file>
<file>FreeCAD_nl.qm</file>
<file>FreeCAD_no.qm</file>
<file>FreeCAD_pl.qm</file>
<file>FreeCAD_pt.qm</file>
<file>FreeCAD_ru.qm</file>
<file>FreeCAD_se.qm</file>

1244
src/Gui/ManualAlignment.cpp Normal file

File diff suppressed because it is too large Load Diff

257
src/Gui/ManualAlignment.h Normal file
View File

@ -0,0 +1,257 @@
/***************************************************************************
* Copyright (c) 2012 Werner Mayer <wmayer[at]users.sourceforge.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 GUI_MANUALALIGNMENT_H
#define GUI_MANUALALIGNMENT_H
#include <Base/Placement.h>
#include <Base/Vector3D.h>
#include <Gui/Application.h>
#include <Gui/Document.h>
#include <Gui/ViewProviderDocumentObject.h>
#include <boost/signals.hpp>
class SbVec3f;
class SoPickedPoint;
class SoEventCallback;
namespace Gui {
class Document;
class AlignmentView;
class View3DInventorViewer;
/**
* The AlignemntGroup class is the base for fixed and movable groups.
* @author Werner Mayer
*/
class GuiExport AlignmentGroup
{
protected:
AlignmentGroup();
~AlignmentGroup();
public:
/**
* Add a mesh to the group.
*/
void addView(App::DocumentObject*);
std::vector<App::DocumentObject*> getViews() const;
/**
* Checks for the view provider of one of the added views.
*/
bool hasView(Gui::ViewProviderDocumentObject*) const;
/**
* Remove a previously added view by its view provider.
*/
void removeView(Gui::ViewProviderDocumentObject*);
/**
* Add the group and therefore all its added view providers to the Inventor tree.
*/
void addToViewer(Gui::View3DInventorViewer*) const;
/**
* Remove all the view providers from the Inventor tree.
*/
void removeFromViewer(Gui::View3DInventorViewer*) const;
void setRandomColor();
/**
* Returns the document of the added views.
*/
Gui::Document* getDocument() const;
/**
* Add a point to an array of picked points.
*/
void addPoint(const Base::Vector3d&);
/**
* Remove last point from array of picked points.
*/
void removeLastPoint();
/**
* Count the number of picked points.
*/
int countPoints() const;
/**
* Return an array of picked points.
*/
const std::vector<Base::Vector3d>& getPoints() const;
/**
* Clear all picked points.
*/
void clearPoints();
/**
* Set or unset the alignable mode for the added views. If a view is not alignable it also not pickable.
*/
void setAlignable(bool);
void moveTo(AlignmentGroup&);
/**
* Clear the list of added views.
*/
void clear();
/**
* Checks whether the list of added views is empty or not.
*/
bool isEmpty() const;
/**
* Return the number of added views.
*/
int count() const;
protected:
std::vector<Base::Vector3d> _pickedPoints;
std::vector<Gui::ViewProviderDocumentObject*> _views;
};
/**
* The FixedGroup class can be used for a fixed group of views.
* @author Werner Mayer
*/
class GuiExport MovableGroup : public AlignmentGroup
{
public:
MovableGroup();
~MovableGroup();
};
/**
* The FixedGroup class can be used for a fixed group of views.
* @author Werner Mayer
*/
class GuiExport FixedGroup : public AlignmentGroup
{
public:
FixedGroup();
~FixedGroup();
};
/**
* The MovableGroupModel class keeps an array of movable groups.
* @author Werner Mayer
*/
class GuiExport MovableGroupModel
{
public:
MovableGroupModel();
~MovableGroupModel();
void addGroup(const MovableGroup&);
void addGroups(const std::map<int, MovableGroup>&);
MovableGroup& activeGroup();
const MovableGroup& activeGroup() const;
void continueAlignment();
void clear();
bool isEmpty() const;
int count() const;
protected:
void removeActiveGroup();
private:
std::vector<MovableGroup> _groups;
};
/**
* @author Werner Mayer
*/
class GuiExport ManualAlignment : public QObject
{
Q_OBJECT
protected:
ManualAlignment();
~ManualAlignment();
public:
static ManualAlignment* instance();
static void destruct();
static bool hasInstance();
void setMinPoints(int minPoints);
void setFixedGroup(const FixedGroup&);
void setModel(const MovableGroupModel&);
void clearAll();
void setViewingDirections(const Base::Vector3d& view1, const Base::Vector3d& up1,
const Base::Vector3d& view2, const Base::Vector3d& up2);
void startAlignment(Base::Type mousemodel);
void finish();
void align();
bool canAlign() const;
void cancel();
const Base::Placement & getTransform() const
{ return myTransform; }
void alignObject(App::DocumentObject*);
// Observer stuff
/// Checks if the given object is about to be removed
void slotDeletedDocument(const Gui::Document& Doc);
/// Checks if the given document is about to be closed
void slotDeletedObject(const Gui::ViewProvider& Obj);
protected:
bool computeAlignment(const std::vector<Base::Vector3d>& unnavPts, const std::vector<Base::Vector3d>& navigPts);
void continueAlignment();
void showInstructions();
/** @name Probe picking */
//@{
static void probePickedCallback(void * ud, SoEventCallback * n);
void applyPickedProbe(Gui::ViewProviderDocumentObject*, const SoPickedPoint* pnt);
//@}
protected Q_SLOTS:
void reset();
void onAlign();
void onRemoveLastPointMoveable();
void onRemoveLastPointFixed();
void onClear();
void onCancel();
Q_SIGNALS:
void emitCanceled();
void emitFinished();
private:
SoNode* pickedPointsSubGraph(const SbVec3f& p, const SbVec3f& n, int id);
void closeViewer();
static ManualAlignment* _instance;
typedef boost::BOOST_SIGNALS_NAMESPACE::connection Connection;
Connection connectApplicationDeletedDocument;
Connection connectDocumentDeletedObject;
FixedGroup myFixedGroup;
MovableGroupModel myAlignModel;
QPointer<Gui::AlignmentView> myViewer;
Gui::Document* myDocument;
int myPickPoints;
Base::Placement myTransform;
class Private;
Private* d;
};
} // namespace Gui
#endif // GUI_MANUALALIGNMENT_H

View File

@ -24,20 +24,34 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# ifdef FC_OS_WIN32
# include <windows.h>
# endif
# ifdef FC_OS_MACOSX
# include <OpenGL/gl.h>
# else
# include <GL/gl.h>
# endif
# include <Inventor/actions/SoGetBoundingBoxAction.h>
# include <Inventor/actions/SoGLRenderAction.h>
# include <Inventor/bundles/SoMaterialBundle.h>
# include <Inventor/bundles/SoTextureCoordinateBundle.h>
# include <Inventor/elements/SoLazyElement.h>
# include <Inventor/elements/SoViewportRegionElement.h>
# include <Inventor/elements/SoViewVolumeElement.h>
# include <Inventor/elements/SoModelMatrixElement.h>
# include <Inventor/nodes/SoBaseColor.h>
# include <Inventor/nodes/SoShape.h>
# include <Inventor/nodes/SoScale.h>
# include <Inventor/nodes/SoCone.h>
# include <Inventor/nodes/SoCoordinate3.h>
# include <Inventor/nodes/SoCube.h>
# include <Inventor/nodes/SoFontStyle.h>
# include <Inventor/nodes/SoLineSet.h>
# include <Inventor/nodes/SoSeparator.h>
# include <Inventor/nodes/SoText2.h>
# include <Inventor/nodes/SoTranslation.h>
# include <Inventor/nodekits/SoShapeKit.h>
# include <Inventor/elements/SoViewportRegionElement.h>
# include <Inventor/elements/SoViewVolumeElement.h>
# include <Inventor/elements/SoModelMatrixElement.h>
#endif
@ -217,3 +231,129 @@ SoAxisCrossKit::createAxes()
set("zAxis.pickStyle", "style UNPICKABLE");
set("zHead.pickStyle", "style UNPICKABLE");
}
// --------------------------------------------------------------
SO_NODE_SOURCE(SoRegPoint);
void SoRegPoint::initClass()
{
SO_NODE_INIT_CLASS(SoRegPoint, SoShape, "Shape");
}
SoRegPoint::SoRegPoint()
{
SO_NODE_CONSTRUCTOR(SoRegPoint);
SO_NODE_ADD_FIELD(base, (SbVec3f(0,0,0)));
SO_NODE_ADD_FIELD(normal, (SbVec3f(1,1,1)));
SO_NODE_ADD_FIELD(length, (3.0));
SO_NODE_ADD_FIELD(color, (1.0f, 0.447059f, 0.337255f));
SO_NODE_ADD_FIELD(text, (""));
root = new SoSeparator();
root->ref();
// translation
SoTranslation* move = new SoTranslation();
move->translation.setValue(base.getValue() + normal.getValue() * length.getValue());
root->addChild(move);
// sub-group
SoBaseColor* col = new SoBaseColor();
col->rgb.setValue(this->color.getValue());
SoFontStyle* font = new SoFontStyle;
font->size = 14;
SoSeparator* sub = new SoSeparator();
sub->addChild(col);
sub->addChild(font);
sub->addChild(new SoText2());
root->addChild(sub);
}
SoRegPoint::~SoRegPoint()
{
root->unref();
}
/**
* Renders the probe with text label and a bullet at the base point.
*/
void SoRegPoint::GLRender(SoGLRenderAction *action)
{
if (shouldGLRender(action))
{
SoState* state = action->getState();
state->push();
SoMaterialBundle mb(action);
SoTextureCoordinateBundle tb(action, TRUE, FALSE);
SoLazyElement::setLightModel(state, SoLazyElement::BASE_COLOR);
mb.sendFirst(); // make sure we have the correct material
SbVec3f p1 = base.getValue();
SbVec3f p2 = p1 + normal.getValue() * length.getValue();
glLineWidth(1.0f);
glColor3fv(color.getValue().getValue());
glBegin(GL_LINE_STRIP);
glVertex3d(p1[0], p1[1], p1[2]);
glVertex3d(p2[0], p2[1], p2[2]);
glEnd();
glPointSize(5.0f);
glBegin(GL_POINTS);
glVertex3fv(p1.getValue());
glEnd();
glPointSize(2.0f);
glBegin(GL_POINTS);
glVertex3fv(p2.getValue());
glEnd();
root->GLRender(action);
state->pop();
}
}
void SoRegPoint::generatePrimitives(SoAction* action)
{
}
/**
* Sets the bounding box of the probe to \a box and its center to \a center.
*/
void SoRegPoint::computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center)
{
root->doAction(action);
if (action->getTypeId().isDerivedFrom(SoGetBoundingBoxAction::getClassTypeId()))
static_cast<SoGetBoundingBoxAction*>(action)->resetCenter();
SbVec3f p1 = base.getValue();
SbVec3f p2 = p1 + normal.getValue() * length.getValue();
box.extendBy(p1);
box.extendBy(p2);
center = box.getCenter();
}
void SoRegPoint::notify(SoNotList * node)
{
SoField * f = node->getLastField();
if (f == &this->base || f == &this->normal || f == &this->length) {
SoTranslation* move = static_cast<SoTranslation*>(root->getChild(0));
move->translation.setValue(base.getValue() + normal.getValue() * length.getValue());
}
else if (f == &this->color) {
SoSeparator* sub = static_cast<SoSeparator*>(root->getChild(1));
SoBaseColor* col = static_cast<SoBaseColor*>(sub->getChild(0));
col->rgb = this->color.getValue();
}
else if (f == &this->text) {
SoSeparator* sub = static_cast<SoSeparator*>(root->getChild(1));
SoText2* label = static_cast<SoText2*>(sub->getChild(2));
label->string = this->text.getValue();
}
SoShape::notify(node);
}

View File

@ -27,6 +27,8 @@
#include <Inventor/nodekits/SoSubKit.h>
#include <Inventor/nodekits/SoBaseKit.h>
#include <Inventor/fields/SoSFFloat.h>
#include <Inventor/fields/SoSFColor.h>
#include <Inventor/fields/SoSFString.h>
class SbViewport;
class SoState;
@ -84,6 +86,33 @@ private:
virtual ~SoAxisCrossKit();
};
class GuiExport SoRegPoint : public SoShape {
typedef SoShape inherited;
SO_NODE_HEADER(SoRegPoint);
public:
static void initClass();
SoRegPoint();
void notify(SoNotList * node);
SoSFVec3f base;
SoSFVec3f normal;
SoSFFloat length;
SoSFColor color;
SoSFString text;
protected:
virtual ~SoRegPoint();
virtual void GLRender(SoGLRenderAction *action);
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center);
virtual void generatePrimitives(SoAction *action);
private:
SoSeparator* root;
};
} // namespace Gui
#endif // GUI_SOSHAPESCALE_H

View File

@ -95,6 +95,7 @@ void Gui::SoFCDB::init()
TranslateManip ::initClass();
SoShapeScale ::initClass();
SoAxisCrossKit ::initClass();
SoRegPoint ::initClass();
SoDrawingGrid ::initClass();
PropertyItem ::init();

View File

@ -41,42 +41,29 @@
using namespace Gui;
TYPESYSTEM_SOURCE_ABSTRACT(Gui::SplitView3DInventor,Gui::MDIView);
TYPESYSTEM_SOURCE_ABSTRACT(Gui::AbstractSplitView,Gui::MDIView);
SplitView3DInventor::SplitView3DInventor(int views, Gui::Document* pcDocument, QWidget* parent, Qt::WFlags wflags)
AbstractSplitView::AbstractSplitView(Gui::Document* pcDocument, QWidget* parent, Qt::WFlags wflags)
: MDIView(pcDocument,parent, wflags)
{
// important for highlighting
setMouseTracking(true);
}
AbstractSplitView::~AbstractSplitView()
{
hGrp->Detach(this);
for (std::vector<View3DInventorViewer*>::iterator it = _viewer.begin(); it != _viewer.end(); ++it) {
delete *it;
}
}
void AbstractSplitView::setupSettings()
{
// attach Parameter Observer
hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
hGrp->Attach(this);
QSplitter* mainSplitter=0;
if (views <= 3) {
mainSplitter = new QSplitter(Qt::Horizontal, this);
_viewer.push_back(new View3DInventorViewer(mainSplitter));
_viewer.push_back(new View3DInventorViewer(mainSplitter));
if (views==3)
_viewer.push_back(new View3DInventorViewer(mainSplitter));
}
else {
mainSplitter = new QSplitter(Qt::Vertical, this);
QSplitter *topSplitter = new QSplitter(Qt::Horizontal, mainSplitter);
QSplitter *botSplitter = new QSplitter(Qt::Horizontal, mainSplitter);
_viewer.push_back(new View3DInventorViewer(topSplitter));
_viewer.push_back(new View3DInventorViewer(topSplitter));
for (int i=2;i<views;i++)
_viewer.push_back(new View3DInventorViewer(botSplitter));
topSplitter->setOpaqueResize( true );
botSplitter->setOpaqueResize( true );
}
mainSplitter->show();
setCentralWidget(mainSplitter);
// apply the user settings
OnChange(*hGrp,"EyeDistance");
OnChange(*hGrp,"CornerCoordSystem");
@ -100,21 +87,13 @@ SplitView3DInventor::SplitView3DInventor(int views, Gui::Document* pcDocument, Q
OnChange(*hGrp,"NavigationStyle");
}
SplitView3DInventor::~SplitView3DInventor()
{
hGrp->Detach(this);
for (std::vector<View3DInventorViewer*>::iterator it = _viewer.begin(); it != _viewer.end(); ++it) {
delete *it;
}
}
View3DInventorViewer* SplitView3DInventor::getViewer(unsigned int n) const
View3DInventorViewer* AbstractSplitView::getViewer(unsigned int n) const
{
return (_viewer.size() > n ? _viewer[n] : 0);
}
/// Observer message from the ParameterGrp
void SplitView3DInventor::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::MessageType Reason)
void AbstractSplitView::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::MessageType Reason)
{
const ParameterGrp& rGrp = static_cast<ParameterGrp&>(rCaller);
if (strcmp(Reason,"HeadlightColor") == 0) {
@ -266,17 +245,17 @@ void SplitView3DInventor::OnChange(ParameterGrp::SubjectType &rCaller,ParameterG
}
}
void SplitView3DInventor::onUpdate(void)
void AbstractSplitView::onUpdate(void)
{
update();
}
const char *SplitView3DInventor::getName(void) const
const char *AbstractSplitView::getName(void) const
{
return "SplitView3DInventor";
}
bool SplitView3DInventor::onMsg(const char* pMsg, const char** ppReturn)
bool AbstractSplitView::onMsg(const char* pMsg, const char** ppReturn)
{
if (strcmp("ViewFit",pMsg) == 0 ) {
for (std::vector<View3DInventorViewer*>::iterator it = _viewer.begin(); it != _viewer.end(); ++it)
@ -346,7 +325,7 @@ bool SplitView3DInventor::onMsg(const char* pMsg, const char** ppReturn)
return false;
}
bool SplitView3DInventor::onHasMsg(const char* pMsg) const
bool AbstractSplitView::onHasMsg(const char* pMsg) const
{
if (strcmp("ViewFit",pMsg) == 0) {
return true;
@ -375,7 +354,46 @@ bool SplitView3DInventor::onHasMsg(const char* pMsg) const
return false;
}
void SplitView3DInventor::setCursor(const QCursor& aCursor)
void AbstractSplitView::setCursor(const QCursor& aCursor)
{
//_viewer->getWidget()->setCursor(aCursor);
}
// ------------------------------------------------------
TYPESYSTEM_SOURCE_ABSTRACT(Gui::SplitView3DInventor, Gui::AbstractSplitView);
SplitView3DInventor::SplitView3DInventor(int views, Gui::Document* pcDocument, QWidget* parent, Qt::WFlags wflags)
: AbstractSplitView(pcDocument,parent, wflags)
{
QSplitter* mainSplitter=0;
if (views <= 3) {
mainSplitter = new QSplitter(Qt::Horizontal, this);
_viewer.push_back(new View3DInventorViewer(mainSplitter));
_viewer.push_back(new View3DInventorViewer(mainSplitter));
if (views==3)
_viewer.push_back(new View3DInventorViewer(mainSplitter));
}
else {
mainSplitter = new QSplitter(Qt::Vertical, this);
QSplitter *topSplitter = new QSplitter(Qt::Horizontal, mainSplitter);
QSplitter *botSplitter = new QSplitter(Qt::Horizontal, mainSplitter);
_viewer.push_back(new View3DInventorViewer(topSplitter));
_viewer.push_back(new View3DInventorViewer(topSplitter));
for (int i=2;i<views;i++)
_viewer.push_back(new View3DInventorViewer(botSplitter));
topSplitter->setOpaqueResize( true );
botSplitter->setOpaqueResize( true );
}
mainSplitter->show();
setCentralWidget(mainSplitter);
// apply the user settings
setupSettings();
}
SplitView3DInventor::~SplitView3DInventor()
{
}

View File

@ -36,13 +36,13 @@ class View3DInventorViewer;
/** The SplitView3DInventor class allows to create a window with two or more Inventor views.
* \author Werner Mayer
*/
class GuiExport SplitView3DInventor : public MDIView,public ParameterGrp::ObserverType
class GuiExport AbstractSplitView : public MDIView, public ParameterGrp::ObserverType
{
TYPESYSTEM_HEADER();
public:
SplitView3DInventor(int views, Gui::Document* pcDocument, QWidget* parent, Qt::WFlags wflags=0);
~SplitView3DInventor();
AbstractSplitView(Gui::Document* pcDocument, QWidget* parent, Qt::WFlags wflags=0);
~AbstractSplitView();
virtual const char *getName(void) const;
@ -56,14 +56,27 @@ public:
void setCursor(const QCursor&);
protected:
void setupSettings();
protected:
/// handle to the viewer parameter group
ParameterGrp::handle hGrp;
private:
std::vector<View3DInventorViewer*> _viewer;
};
/** The SplitView3DInventor class allows to create a window with two or more Inventor views.
* \author Werner Mayer
*/
class GuiExport SplitView3DInventor : public AbstractSplitView
{
TYPESYSTEM_HEADER();
public:
SplitView3DInventor(int views, Gui::Document* pcDocument, QWidget* parent, Qt::WFlags wflags=0);
~SplitView3DInventor();
};
} // namespace Gui
#endif //GUI_SPLITVIEW3DINVENTOR_H

View File

@ -441,7 +441,8 @@ MenuItem* StdWorkbench::setupMenuBar() const
edit->setCommand("&Edit");
*edit << "Std_Undo" << "Std_Redo" << "Separator" << "Std_Cut" << "Std_Copy"
<< "Std_Paste" << "Std_DuplicateSelection" << "Separator"
<< "Std_Refresh" << "Std_SelectAll" << "Std_Delete" << "Std_Placement"
<< "Std_Refresh" << "Std_SelectAll" << "Std_Delete"
<< "Std_Placement" << "Std_Alignment"
<< "Std_Edit" << "Separator" << "Std_DlgPreferences";
// Standard views

View File

@ -257,6 +257,25 @@ class _Wall(ArchComponent.Component):
if prop in ["Base","Height","Width","Align","Additions","Subtractions"]:
self.createGeometry(obj)
def getSubVolume(self,base,width,delta=None):
"returns a subvolume from a base object"
import Part
max_length = 0
for w in base.Shape.Wires:
if w.BoundBox.DiagonalLength > max_length:
max_length = w.BoundBox.DiagonalLength
f = w
f = Part.Face(f)
n = f.normalAt(0,0)
v1 = fcvec.scaleTo(n,width)
f.translate(v1)
v2 = fcvec.neg(v1)
v2 = fcvec.scale(v1,-2)
f = f.extrude(v2)
if delta:
f.translate(delta)
return f
def createGeometry(self,obj):
import Part
@ -339,17 +358,18 @@ class _Wall(ArchComponent.Component):
base = base.oldFuse(app.Shape)
app.ViewObject.hide() #to be removed
for hole in obj.Subtractions:
cut = False
if hasattr(hole,"Proxy"):
if hasattr(hole.Proxy,"Subvolume"):
if hole.Proxy.Subvolume:
print "cutting subvolume",hole.Proxy.Subvolume
base = base.cut(hole.Proxy.Subvolume)
cut = True
if not cut:
if hasattr(obj,"Shape"):
base = base.cut(hole.Shape)
hole.ViewObject.hide() # to be removed
if Draft.getType(hole) == "Window":
# window
if hole.Base and obj.Width:
f = self.getSubVolume(hole.Base,obj.Width)
base = base.cut(f)
elif Draft.isClone(hole,"Window"):
if hole.Objects[0].Base and obj.Width:
f = self.getSubVolume(hole.Objects[0].Base,obj.Width,hole.Placement.Base)
base = base.cut(f)
elif hasattr(obj,"Shape"):
base = base.cut(hole.Shape)
hole.ViewObject.hide() # to be removed
obj.Shape = base
if not fcgeo.isNull(pl):
obj.Placement = pl

View File

@ -33,6 +33,10 @@ __url__ = "http://free-cad.sourceforge.net"
def makeWindow(baseobj=None,name="Window"):
'''makeWindow(obj,[name]): creates a window based on the
given object'''
if baseobj:
if Draft.getType(baseobj) == "Window":
obj = Draft.clone(baseobj)
return obj
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
_Window(obj)
_ViewProviderWindow(obj.ViewObject)
@ -121,15 +125,16 @@ class _Window(ArchComponent.Component):
max_length = w.BoundBox.DiagonalLength
ext = w
wires.remove(ext)
for w in wires:
w.reverse()
wires.insert(0, ext)
shape = Part.Face(wires)
shape = Part.Face(ext)
norm = shape.normalAt(0,0)
thk = float(obj.WindowParts[(i*5)+3])
if thk:
exv = fcvec.scaleTo(norm,thk)
shape = shape.extrude(exv)
for w in wires:
f = Part.Face(w)
f = f.extrude(exv)
shape = shape.cut(f)
if obj.WindowParts[(i*5)+4]:
zof = float(obj.WindowParts[(i*5)+4])
if zof:

View File

@ -36,6 +36,7 @@
<file>translations/Arch_ru.qm</file>
<file>translations/Arch_se.qm</file>
<file>translations/Arch_uk.qm</file>
<file>translations/Arch_pl.qm</file>
<file>translations/Arch_pt.qm</file>
<file>translations/Arch_hr.qm</file>
<file>translations/Arch_zh.qm</file>

View File

@ -9,6 +9,7 @@
<file>translations/Complete_it.qm</file>
<file>translations/Complete_nl.qm</file>
<file>translations/Complete_no.qm</file>
<file>translations/Complete_pl.qm</file>
<file>translations/Complete_pt.qm</file>
<file>translations/Complete_ru.qm</file>
<file>translations/Complete_se.qm</file>

View File

@ -16,6 +16,7 @@ EXTRA_DIST = \
translations/Complete_it.qm \
translations/Complete_nl.qm \
translations/Complete_no.qm \
translations/Complete_pl.qm \
translations/Complete_pt.qm \
translations/Complete_ru.qm \
translations/Complete_se.qm \
@ -30,6 +31,7 @@ EXTRA_DIST = \
translations/Complete_it.ts \
translations/Complete_nl.ts \
translations/Complete_no.ts \
translations/Complete_pl.ts \
translations/Complete_pt.ts \
translations/Complete_ru.ts \
translations/Complete_se.ts \

View File

@ -132,7 +132,8 @@ Gui::MenuItem* Workbench::setupMenuBar() const
edit->setCommand("&Edit");
*edit << "Std_Undo" << "Std_Redo" << "Separator" << "Std_Cut" << "Std_Copy"
<< "Std_Paste" << "Std_DuplicateSelection" << "Separator"
<< "Std_Refresh" << "Std_SelectAll" << "Std_Delete" << "Std_Placement"
<< "Std_Refresh" << "Std_SelectAll" << "Std_Delete"
<< "Std_Placement" << "Std_Alignment"
<< "Separator" << "Std_DlgPreferences";
// Standard views

View File

@ -170,6 +170,15 @@ def getType(obj):
return "Group"
return "Unknown"
def isClone(obj,objtype):
"""isClone(obj,objtype): returns True if the given object is
a clone of an object of the given type"""
if getType(obj) == "Clone":
if len(obj.Objects) == 1:
if getType(obj.Objects[0]) == objtype:
return True
return False
def getGroupNames():
"returns a list of existing groups in the document"
glist = []
@ -1581,8 +1590,11 @@ def clone(obj,delta=None):
if not isinstance(obj,list):
obj = [obj]
cl = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Clone")
cl.Label = "Clone of " + obj[0].Label
_Clone(cl)
_ViewProviderDraftPart(cl.ViewObject)
if gui:
_ViewProviderDraftPart(cl.ViewObject)
formatObject(cl,obj[0])
cl.Objects = obj
if delta:
cl.Placement.move(delta)
@ -2813,3 +2825,6 @@ class _ViewProviderDraftPart(_ViewProviderDraft):
def getIcon(self):
return ":/icons/Tree_Part.svg"
def claimChildren(self):
return []

View File

@ -57,6 +57,8 @@ EXTRA_DIST = \
Resources/translations/Draft_nl.qm \
Resources/translations/Draft_no.ts \
Resources/translations/Draft_no.qm \
Resources/translations/Draft_pl.ts \
Resources/translations/Draft_pl.qm \
Resources/translations/Draft_pt.ts \
Resources/translations/Draft_pt.qm \
Resources/translations/Draft_ru.ts \

View File

@ -68,6 +68,7 @@
<file>translations/Draft_ru.qm</file>
<file>translations/Draft_se.qm</file>
<file>translations/Draft_uk.qm</file>
<file>translations/Draft_pl.qm</file>
<file>translations/Draft_pt.qm</file>
<file>translations/Draft_hr.qm</file>
<file>translations/Draft_zh.qm</file>

View File

@ -25,6 +25,7 @@
<file>translations/Drawing_it.qm</file>
<file>translations/Drawing_nl.qm</file>
<file>translations/Drawing_no.qm</file>
<file>translations/Drawing_pl.qm</file>
<file>translations/Drawing_pt.qm</file>
<file>translations/Drawing_ru.qm</file>
<file>translations/Drawing_se.qm</file>

View File

@ -32,6 +32,7 @@ EXTRA_DIST = \
translations/Drawing_it.qm \
translations/Drawing_nl.qm \
translations/Drawing_no.qm \
translations/Drawing_pl.qm \
translations/Drawing_pt.qm \
translations/Drawing_ru.qm \
translations/Drawing_se.qm \
@ -46,6 +47,7 @@ EXTRA_DIST = \
translations/Drawing_it.ts \
translations/Drawing_nl.ts \
translations/Drawing_no.ts \
translations/Drawing_pl.ts \
translations/Drawing_pt.ts \
translations/Drawing_ru.ts \
translations/Drawing_se.ts \

View File

@ -10,6 +10,7 @@
<file>translations/Fem_it.qm</file>
<file>translations/Fem_nl.qm</file>
<file>translations/Fem_no.qm</file>
<file>translations/Fem_pl.qm</file>
<file>translations/Fem_pt.qm</file>
<file>translations/Fem_ru.qm</file>
<file>translations/Fem_se.qm</file>

View File

@ -26,6 +26,8 @@ EXTRA_DIST = \
translations/Fem_nl.ts \
translations/Fem_no.qm \
translations/Fem_no.ts \
translations/Fem_pl.qm \
translations/Fem_pl.ts \
translations/Fem_pt.qm \
translations/Fem_pt.ts \
translations/Fem_ru.qm \

View File

@ -107,6 +107,8 @@ EXTRA_DIST = \
Resources/translations/Image_nl.ts \
Resources/translations/Image_no.qm \
Resources/translations/Image_no.ts \
Resources/translations/Image_pl.qm \
Resources/translations/Image_pl.ts \
Resources/translations/Image_pt.qm \
Resources/translations/Image_pt.ts \
Resources/translations/Image_ru.qm \

View File

@ -10,6 +10,7 @@
<file>translations/Image_it.qm</file>
<file>translations/Image_nl.qm</file>
<file>translations/Image_no.qm</file>
<file>translations/Image_pl.qm</file>
<file>translations/Image_pt.qm</file>
<file>translations/Image_ru.qm</file>
<file>translations/Image_se.qm</file>

View File

@ -661,7 +661,8 @@ bool MeshInput::LoadPLY (std::istream &inp)
return false; // wrong header
std::string line, element;
bool xyz_float=false,xyz_double=false,rgb_value=false;
bool xyz_float=false,xyz_double=false;
MeshIO::Binding rgb_value = MeshIO::OVERALL;
while (std::getline(inp, line)) {
std::istringstream str(line);
str.unsetf(std::ios_base::skipws);
@ -738,7 +739,11 @@ bool MeshInput::LoadPLY (std::istream &inp)
xyz_double = true;
}
else if (name == "red") {
rgb_value = true;
rgb_value = MeshIO::PER_VERTEX;
if (_material) {
_material->binding = MeshIO::PER_VERTEX;
_material->diffuseColor.reserve(v_count);
}
}
}
else if (element == "face") {
@ -753,9 +758,38 @@ bool MeshInput::LoadPLY (std::istream &inp)
boost::regex rx_p("^([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)"
"\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)"
"\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)\\s*$");
boost::regex rx_c("^([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)"
"\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)"
"\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)"
"\\s+([0-9]{1,3})\\s+([0-9]{1,3})\\s+([0-9]{1,3})\\s*$");
boost::regex rx_f("^\\s*3\\s+([0-9]+)\\s+([0-9]+)\\s+([0-9]+)\\s*$");
boost::cmatch what;
Base::Vector3f pt;
if (rgb_value == MeshIO::PER_VERTEX) {
int r,g,b;
for (std::size_t i = 0; i < v_count && std::getline(inp, line); i++) {
if (boost::regex_match(line.c_str(), what, rx_c)) {
pt.x = (float)std::atof(what[1].first);
pt.y = (float)std::atof(what[4].first);
pt.z = (float)std::atof(what[7].first);
meshPoints.push_back(pt);
if (_material) {
r = std::min<int>(std::atoi(what[10].first),255);
g = std::min<int>(std::atoi(what[11].first),255);
b = std::min<int>(std::atoi(what[12].first),255);
float fr = (float)r/255.0f;
float fg = (float)g/255.0f;
float fb = (float)b/255.0f;
_material->diffuseColor.push_back(App::Color(fr, fg, fb));
}
}
else {
return false;
}
}
}
else {
for (std::size_t i = 0; i < v_count && std::getline(inp, line); i++) {
if (boost::regex_match(line.c_str(), what, rx_p)) {
pt.x = (float)std::atof(what[1].first);
@ -767,6 +801,7 @@ bool MeshInput::LoadPLY (std::istream &inp)
return false;
}
}
}
int f1, f2, f3;
for (std::size_t i = 0; i < f_count && std::getline(inp, line); i++) {
if (boost::regex_match(line.c_str(), what, rx_f)) {
@ -777,6 +812,7 @@ bool MeshInput::LoadPLY (std::istream &inp)
}
}
}
// binary
else {
Base::InputStream is(inp);
if (format == binary_little_endian)
@ -789,16 +825,31 @@ bool MeshInput::LoadPLY (std::istream &inp)
for (std::size_t i = 0; i < v_count; i++) {
is >> pt.x >> pt.y >> pt.z;
meshPoints.push_back(pt);
if (rgb_value)
if (rgb_value == MeshIO::PER_VERTEX) {
is >> r >> g >> b;
if (_material) {
float fr = (float)r/255.0f;
float fg = (float)g/255.0f;
float fb = (float)b/255.0f;
_material->diffuseColor.push_back(App::Color(fr, fg, fb));
}
}
}
}
else if (xyz_double) {
Base::Vector3d pt;
for (std::size_t i = 0; i < v_count; i++) {
is >> pt.x >> pt.y >> pt.z;
is >> r >> g >> b;
meshPoints.push_back(Base::Vector3f((float)pt.x,(float)pt.y,(float)pt.z));
if (rgb_value == MeshIO::PER_VERTEX) {
is >> r >> g >> b;
if (_material) {
float fr = (float)r/255.0f;
float fg = (float)g/255.0f;
float fb = (float)b/255.0f;
_material->diffuseColor.push_back(App::Color(fr, fg, fb));
}
}
}
}
unsigned char n;
@ -1428,7 +1479,12 @@ bool MeshOutput::SaveAny(const char* FileName, MeshIO::Format format) const
}
else if (fileformat == MeshIO::PLY) {
// write file
if (!SavePLY(str))
if (!SaveBinaryPLY(str))
throw Base::FileException("Export of PLY mesh failed",FileName);
}
else if (fileformat == MeshIO::APLY) {
// write file
if (!SaveAsciiPLY(str))
throw Base::FileException("Export of PLY mesh failed",FileName);
}
else if (fileformat == MeshIO::IV) {
@ -1646,7 +1702,7 @@ bool MeshOutput::SaveOFF (std::ostream &out) const
return true;
}
bool MeshOutput::SavePLY (std::ostream &out) const
bool MeshOutput::SaveBinaryPLY (std::ostream &out) const
{
const MeshPointArray& rPoints = _rclMesh.GetPoints();
const MeshFacetArray& rFacets = _rclMesh.GetFacets();
@ -1706,6 +1762,81 @@ bool MeshOutput::SavePLY (std::ostream &out) const
return true;
}
bool MeshOutput::SaveAsciiPLY (std::ostream &out) const
{
const MeshPointArray& rPoints = _rclMesh.GetPoints();
const MeshFacetArray& rFacets = _rclMesh.GetFacets();
std::size_t v_count = rPoints.size();
std::size_t f_count = rFacets.size();
if (!out || out.bad() == true)
return false;
bool saveVertexColor = (_material && _material->binding == MeshIO::PER_VERTEX
&& _material->diffuseColor.size() == rPoints.size());
out << "ply" << std::endl
<< "format ascii 1.0" << std::endl
<< "comment Created by FreeCAD <http://free-cad.sourceforge.net>" << std::endl
<< "element vertex " << v_count << std::endl
<< "property float32 x" << std::endl
<< "property float32 y" << std::endl
<< "property float32 z" << std::endl;
if (saveVertexColor) {
out << "property uchar red" << std::endl
<< "property uchar green" << std::endl
<< "property uchar blue" << std::endl;
}
out << "element face " << f_count << std::endl
<< "property list uchar int vertex_index" << std::endl
<< "end_header" << std::endl;
Base::Vector3f pt;
out.precision(6);
out.setf(std::ios::fixed | std::ios::showpoint);
if (saveVertexColor) {
for (std::size_t i = 0; i < v_count; i++) {
const MeshPoint& p = rPoints[i];
if (this->apply_transform) {
Base::Vector3f pt = this->_transform * p;
out << pt.x << " " << pt.y << " " << pt.z;
}
else {
out << p.x << " " << p.y << " " << p.z;
}
const App::Color& c = _material->diffuseColor[i];
int r = (int)(255.0f * c.r);
int g = (int)(255.0f * c.g);
int b = (int)(255.0f * c.b);
out << " " << r << " " << g << " " << b << std::endl;
}
}
else {
for (std::size_t i = 0; i < v_count; i++) {
const MeshPoint& p = rPoints[i];
if (this->apply_transform) {
Base::Vector3f pt = this->_transform * p;
out << pt.x << " " << pt.y << " " << pt.z << std::endl;
}
else {
out << p.x << " " << p.y << " " << p.z << std::endl;
}
}
}
unsigned int n = 3;
int f1, f2, f3;
for (std::size_t i = 0; i < f_count; i++) {
const MeshFacet& f = rFacets[i];
f1 = (int)f._aulPoints[0];
f2 = (int)f._aulPoints[1];
f3 = (int)f._aulPoints[2];
out << n << " " << f1 << " " << f2 << " " << f3 << std::endl;
}
return true;
}
bool MeshOutput::SaveMeshNode (std::ostream &rstrOut)
{
const MeshPointArray& rPoints = _rclMesh.GetPoints();

View File

@ -51,6 +51,7 @@ namespace MeshIO {
WRZ,
NAS,
PLY,
APLY,
PY
};
enum Binding {
@ -74,7 +75,10 @@ struct MeshExport Material
class MeshExport MeshInput
{
public:
MeshInput (MeshKernel &rclM): _rclMesh(rclM){};
MeshInput (MeshKernel &rclM)
: _rclMesh(rclM), _material(0){}
MeshInput (MeshKernel &rclM, Material* m)
: _rclMesh(rclM), _material(m){}
virtual ~MeshInput (void) { }
/// Loads the file, decided by extension
@ -106,6 +110,7 @@ public:
protected:
MeshKernel &_rclMesh; /**< reference to mesh data structure */
Material* _material;
};
/**
@ -138,8 +143,10 @@ public:
bool SaveOBJ (std::ostream &rstrOut) const;
/** Saves the mesh object into an OFF file. */
bool SaveOFF (std::ostream &rstrOut) const;
/** Saves the mesh object into a PLY file. */
bool SavePLY (std::ostream &rstrOut) const;
/** Saves the mesh object into a binary PLY file. */
bool SaveBinaryPLY (std::ostream &rstrOut) const;
/** Saves the mesh object into an ASCII PLY file. */
bool SaveAsciiPLY (std::ostream &rstrOut) const;
/** Saves the mesh object into an XML file. */
void SaveXML (Base::Writer &writer) const;
/** Saves a node to an OpenInventor file. */

View File

@ -311,10 +311,10 @@ void MeshObject::save(std::ostream& out) const
_kernel.Write(out);
}
bool MeshObject::load(const char* file)
bool MeshObject::load(const char* file, MeshCore::Material* mat)
{
MeshCore::MeshKernel kernel;
MeshCore::MeshInput aReader(kernel);
MeshCore::MeshInput aReader(kernel, mat);
if (!aReader.LoadAny(file))
return false;
@ -631,6 +631,32 @@ void MeshObject::removeComponents(unsigned long count)
deletedFacets(removeIndices);
}
unsigned long MeshObject::getPointDegree(const std::vector<unsigned long>& indices,
std::vector<unsigned long>& point_degree) const
{
const MeshCore::MeshFacetArray& faces = _kernel.GetFacets();
std::vector<unsigned long> pointDeg(_kernel.CountPoints());
for (MeshCore::MeshFacetArray::_TConstIterator it = faces.begin(); it != faces.end(); ++it) {
pointDeg[it->_aulPoints[0]]++;
pointDeg[it->_aulPoints[1]]++;
pointDeg[it->_aulPoints[2]]++;
}
for (std::vector<unsigned long>::const_iterator it = indices.begin(); it != indices.end(); ++it) {
const MeshCore::MeshFacet& face = faces[*it];
pointDeg[face._aulPoints[0]]--;
pointDeg[face._aulPoints[1]]--;
pointDeg[face._aulPoints[2]]--;
}
unsigned long countInvalids = std::count_if(pointDeg.begin(), pointDeg.end(),
std::bind2nd(std::equal_to<unsigned long>(), 0));
point_degree = pointDeg;
return countInvalids;
}
void MeshObject::fillupHoles(unsigned long length, int level,
MeshCore::AbstractPolygonTriangulator& cTria)
{

View File

@ -144,7 +144,7 @@ public:
void save(const char* file,MeshCore::MeshIO::Format f=MeshCore::MeshIO::Undefined,
const MeshCore::Material* mat = 0) const;
void save(std::ostream&) const;
bool load(const char* file);
bool load(const char* file, MeshCore::Material* mat = 0);
void load(std::istream&);
//@}
@ -177,6 +177,14 @@ public:
std::vector<std::vector<unsigned long> > getComponents() const;
unsigned long countComponents() const;
void removeComponents(unsigned long);
/**
* Checks for the given facet indices what will be the degree for each point
* when these facets are removed from the mesh kernel.
* The point degree information is stored in \a point_degree. The return value
* gices the number of points which will have a degree of zero.
*/
unsigned long getPointDegree(const std::vector<unsigned long>& facets,
std::vector<unsigned long>& point_degree) const;
void fillupHoles(unsigned long, int, MeshCore::AbstractPolygonTriangulator&);
void offset(float fSize);
void offsetSpecial2(float fSize);

View File

@ -77,7 +77,10 @@ PyObject* MeshFeaturePy::smooth(PyObject *args)
return NULL;
PY_TRY {
getFeaturePtr()->Mesh.smooth(iter, d_max);
Mesh::Feature* obj = getFeaturePtr();
MeshObject* kernel = obj->Mesh.startEditing();
kernel->smooth(iter, d_max);
obj->Mesh.finishEditing();
} PY_CATCH;
Py_Return;
@ -87,7 +90,10 @@ PyObject* MeshFeaturePy::removeNonManifolds(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
getFeaturePtr()->Mesh.removeNonManifolds();
Mesh::Feature* obj = getFeaturePtr();
MeshObject* kernel = obj->Mesh.startEditing();
kernel->removeNonManifolds();
obj->Mesh.finishEditing();
Py_Return
}
@ -97,7 +103,10 @@ PyObject* MeshFeaturePy::fixIndices(PyObject *args)
return NULL;
PY_TRY {
getFeaturePtr()->Mesh.validateIndices();
Mesh::Feature* obj = getFeaturePtr();
MeshObject* kernel = obj->Mesh.startEditing();
kernel->validateIndices();
obj->Mesh.finishEditing();
} PY_CATCH;
Py_Return;
@ -109,7 +118,10 @@ PyObject* MeshFeaturePy::fixDegenerations(PyObject *args)
return NULL;
PY_TRY {
getFeaturePtr()->Mesh.validateDegenerations();
Mesh::Feature* obj = getFeaturePtr();
MeshObject* kernel = obj->Mesh.startEditing();
kernel->validateDegenerations();
obj->Mesh.finishEditing();
} PY_CATCH;
Py_Return;
@ -121,7 +133,10 @@ PyObject* MeshFeaturePy::removeDuplicatedFacets(PyObject *args)
return NULL;
PY_TRY {
getFeaturePtr()->Mesh.removeDuplicatedFacets();
Mesh::Feature* obj = getFeaturePtr();
MeshObject* kernel = obj->Mesh.startEditing();
kernel->removeDuplicatedFacets();
obj->Mesh.finishEditing();
} PY_CATCH;
Py_Return;
@ -133,7 +148,10 @@ PyObject* MeshFeaturePy::removeDuplicatedPoints(PyObject *args)
return NULL;
PY_TRY {
getFeaturePtr()->Mesh.removeDuplicatedPoints();
Mesh::Feature* obj = getFeaturePtr();
MeshObject* kernel = obj->Mesh.startEditing();
kernel->removeDuplicatedPoints();
obj->Mesh.finishEditing();
} PY_CATCH;
Py_Return;
@ -144,7 +162,10 @@ PyObject* MeshFeaturePy::fixSelfIntersections(PyObject *args)
if (!PyArg_ParseTuple(args, ""))
return NULL;
try {
getFeaturePtr()->Mesh.removeSelfIntersections();
Mesh::Feature* obj = getFeaturePtr();
MeshObject* kernel = obj->Mesh.startEditing();
kernel->removeSelfIntersections();
obj->Mesh.finishEditing();
}
catch (const Base::Exception& e) {
PyErr_SetString(PyExc_Exception, e.what());
@ -158,7 +179,10 @@ PyObject* MeshFeaturePy::removeFoldsOnSurface(PyObject *args)
if (!PyArg_ParseTuple(args, ""))
return NULL;
try {
getFeaturePtr()->Mesh.removeFoldsOnSurface();
Mesh::Feature* obj = getFeaturePtr();
MeshObject* kernel = obj->Mesh.startEditing();
kernel->removeFoldsOnSurface();
obj->Mesh.finishEditing();
}
catch (const Base::Exception& e) {
PyErr_SetString(PyExc_Exception, e.what());

View File

@ -390,20 +390,6 @@ void PropertyMeshKernel::transformGeometry(const Base::Matrix4D &rclMat)
hasSetValue();
}
void PropertyMeshKernel::deletePointIndices( const std::vector<unsigned long>& inds )
{
aboutToSetValue();
_meshObject->deletePoints(inds);
hasSetValue();
}
void PropertyMeshKernel::deleteFacetIndices( const std::vector<unsigned long>& inds )
{
aboutToSetValue();
_meshObject->deleteFacets(inds);
hasSetValue();
}
void PropertyMeshKernel::setPointIndices(const std::vector<std::pair<unsigned long, Base::Vector3f> >& inds)
{
aboutToSetValue();
@ -413,99 +399,6 @@ void PropertyMeshKernel::setPointIndices(const std::vector<std::pair<unsigned lo
hasSetValue();
}
void PropertyMeshKernel::append(const std::vector<MeshCore::MeshFacet>& rFaces,
const std::vector<Base::Vector3f>& rPoints)
{
aboutToSetValue();
_meshObject->addFacets(rFaces, rPoints);
hasSetValue();
}
void PropertyMeshKernel::createSegment(const std::vector<unsigned long>& segm)
{
aboutToSetValue();
_meshObject->addSegment(segm);
hasSetValue();
}
void PropertyMeshKernel::smooth(int iter, float d_max)
{
aboutToSetValue();
_meshObject->smooth(iter, d_max);
hasSetValue();
}
void PropertyMeshKernel::clear()
{
// clear the underlying mesh kernel and free any allocated memory
aboutToSetValue();
_meshObject->clear();
hasSetValue();
}
void PropertyMeshKernel::harmonizeNormals()
{
aboutToSetValue();
_meshObject->harmonizeNormals();
hasSetValue();
}
void PropertyMeshKernel::removeNonManifolds()
{
aboutToSetValue();
_meshObject->removeNonManifolds();
hasSetValue();
}
void PropertyMeshKernel::validateIndices()
{
aboutToSetValue();
_meshObject->validateIndices();
hasSetValue();
}
void PropertyMeshKernel::validateDegenerations()
{
aboutToSetValue();
_meshObject->validateDegenerations();
hasSetValue();
}
void PropertyMeshKernel::validateDeformations(float fMaxAngle)
{
aboutToSetValue();
_meshObject->validateDeformations(fMaxAngle);
hasSetValue();
}
void PropertyMeshKernel::removeDuplicatedFacets()
{
aboutToSetValue();
_meshObject->removeDuplicatedFacets();
hasSetValue();
}
void PropertyMeshKernel::removeDuplicatedPoints()
{
aboutToSetValue();
_meshObject->removeDuplicatedPoints();
hasSetValue();
}
void PropertyMeshKernel::removeSelfIntersections()
{
aboutToSetValue();
_meshObject->removeSelfIntersections();
hasSetValue();
}
void PropertyMeshKernel::removeFoldsOnSurface()
{
aboutToSetValue();
_meshObject->removeFoldsOnSurface();
hasSetValue();
}
PyObject *PropertyMeshKernel::getPyObject(void)
{
if (!meshPyObject) {

View File

@ -179,27 +179,7 @@ public:
void finishEditing();
/// Transform the real mesh data
void transformGeometry(const Base::Matrix4D &rclMat);
void deletePointIndices ( const std::vector<unsigned long>& );
void deleteFacetIndices ( const std::vector<unsigned long>& );
void setPointIndices( const std::vector<std::pair<unsigned long, Base::Vector3f> >& );
void append(const std::vector<MeshCore::MeshFacet>& rFaces,
const std::vector<Base::Vector3f>& rPoints);
void createSegment(const std::vector<unsigned long>& segm);
void smooth(int iter, float d_max);
void clear();
//@}
/** @name Mesh validation */
//@{
void harmonizeNormals();
void validateIndices();
void validateDeformations(float fMaxAngle);
void validateDegenerations();
void removeDuplicatedPoints();
void removeDuplicatedFacets();
void removeNonManifolds();
void removeSelfIntersections();
void removeFoldsOnSurface();
//@}
/** @name Python interface */

View File

@ -165,6 +165,7 @@ PyObject* MeshPy::write(PyObject *args)
ext["NAS" ] = MeshCore::MeshIO::NAS;
ext["BDF" ] = MeshCore::MeshIO::NAS;
ext["PLY" ] = MeshCore::MeshIO::PLY;
ext["APLY"] = MeshCore::MeshIO::APLY;
ext["PY" ] = MeshCore::MeshIO::PY;
if (ext.find(Ext) != ext.end())
format = ext[Ext];

View File

@ -66,7 +66,7 @@ libMeshGui_la_CPPFLAGS = -DMeshExport= -DMeshGuiExport=
libMeshGui_la_LIBADD = \
@BOOST_SIGNALS_LIB@ @BOOST_SYSTEM_LIB@ \
@GL_LIBS@ \
@GL_LIBS@ @ZIPIOS_LIB@ \
-lFreeCADBase \
-lFreeCADApp \
-lFreeCADGui \
@ -146,6 +146,8 @@ EXTRA_DIST = \
Resources/translations/Mesh_nl.ts \
Resources/translations/Mesh_no.qm \
Resources/translations/Mesh_no.ts \
Resources/translations/Mesh_pl.qm \
Resources/translations/Mesh_pl.ts \
Resources/translations/Mesh_pt.qm \
Resources/translations/Mesh_pt.ts \
Resources/translations/Mesh_ru.qm \

View File

@ -12,6 +12,7 @@
<file>translations/Mesh_it.qm</file>
<file>translations/Mesh_nl.qm</file>
<file>translations/Mesh_no.qm</file>
<file>translations/Mesh_pl.qm</file>
<file>translations/Mesh_pt.qm</file>
<file>translations/Mesh_ru.qm</file>
<file>translations/Mesh_se.qm</file>

View File

@ -27,6 +27,8 @@
# include <QMenu>
# include <Inventor/SbBox2s.h>
# include <Inventor/SoPickedPoint.h>
# include <Inventor/actions/SoToVRML2Action.h>
# include <Inventor/VRMLnodes/SoVRMLGroup.h>
# include <Inventor/details/SoFaceDetail.h>
# include <Inventor/events/SoMouseButtonEvent.h>
# include <Inventor/nodes/SoBaseColor.h>
@ -44,6 +46,7 @@
# include <Inventor/nodes/SoPolygonOffset.h>
# include <Inventor/nodes/SoShapeHints.h>
# include <Inventor/nodes/SoSeparator.h>
# include <Inventor/nodes/SoTransform.h>
#endif
/// Here the FreeCAD includes sorted by Base,App,Gui......
@ -63,6 +66,7 @@
#include <Gui/SoFCOffscreenRenderer.h>
#include <Gui/SoFCSelection.h>
#include <Gui/SoFCSelectionAction.h>
#include <Gui/SoFCDB.h>
#include <Gui/MainWindow.h>
#include <Gui/Selection.h>
#include <Gui/Utilities.h>
@ -82,6 +86,7 @@
#include <Mod/Mesh/App/Core/Visitor.h>
#include <Mod/Mesh/App/Mesh.h>
#include <Mod/Mesh/App/MeshFeature.h>
#include <zipios++/gzipoutputstream.h>
#include "ViewProvider.h"
#include "SoFCIndexedFaceSet.h"
@ -484,6 +489,69 @@ std::vector<std::string> ViewProviderMesh::getDisplayModes(void) const
return StrList;
}
bool ViewProviderMesh::exportToVrml(const char* filename, const MeshCore::Material& mat, bool binary) const
{
SoCoordinate3* coords = new SoCoordinate3();
SoIndexedFaceSet* faces = new SoIndexedFaceSet();
ViewProviderMeshBuilder builder;
builder.createMesh(&static_cast<Mesh::Feature*>(pcObject)->Mesh, coords, faces);
SoMaterialBinding* binding = new SoMaterialBinding;
SoMaterial* material = new SoMaterial;
if (mat.diffuseColor.size() == coords->point.getNum()) {
binding->value = SoMaterialBinding::PER_VERTEX_INDEXED;
}
else if (mat.diffuseColor.size() == faces->coordIndex.getNum()/4) {
binding->value = SoMaterialBinding::PER_FACE_INDEXED;
}
if (mat.diffuseColor.size() > 1) {
material->diffuseColor.setNum(mat.diffuseColor.size());
SbColor* colors = material->diffuseColor.startEditing();
for (unsigned int i=0; i<mat.diffuseColor.size(); i++)
colors[i].setValue(mat.diffuseColor[i].r,mat.diffuseColor[i].g,mat.diffuseColor[i].b);
material->diffuseColor.finishEditing();
}
SoGroup* group = new SoGroup();
group->addChild(material);
group->addChild(binding);
group->addChild(new SoTransform());
group->addChild(coords);
group->addChild(faces);
SoToVRML2Action tovrml2;
group->ref();
tovrml2.apply(group);
group->unref();
SoVRMLGroup *vrmlRoot = tovrml2.getVRML2SceneGraph();
vrmlRoot->ref();
std::string buffer = Gui::SoFCDB::writeNodesToString(vrmlRoot);
vrmlRoot->unref(); // release the memory as soon as possible
Base::FileInfo fi(filename);
if (binary) {
Base::ofstream str(fi, std::ios::out | std::ios::binary);
zipios::GZIPOutputStream gzip(str);
if (gzip) {
gzip << buffer;
gzip.close();
return true;
}
}
else {
Base::ofstream str(fi, std::ios::out);
if (str) {
str << buffer;
str.close();
return true;
}
}
return false;
}
bool ViewProviderMesh::setEdit(int ModNum)
{
if (ModNum == ViewProvider::Transform)
@ -1045,13 +1113,7 @@ void ViewProviderMesh::cutMesh(const std::vector<SbVec2f>& picked,
// Get the facet indices inside the tool mesh
std::vector<unsigned long> indices;
getFacetsFromPolygon(picked, Viewer, inner, indices);
// Get the attached mesh property
Mesh::PropertyMeshKernel& meshProp = static_cast<Mesh::Feature*>(pcObject)->Mesh;
//Remove the facets from the mesh and open a transaction object for the undo/redo stuff
meshProp.deleteFacetIndices(indices);
pcObject->purgeTouched();
removeFacets(indices);
}
void ViewProviderMesh::trimMesh(const std::vector<SbVec2f>& polygon,
@ -1137,7 +1199,7 @@ void ViewProviderMesh::splitMesh(const MeshCore::MeshKernel& toolMesh, const Bas
// Remove the facets from the mesh and create a new one
Mesh::MeshObject* kernel = meshProp.getValue().meshFromSegment(indices);
meshProp.deleteFacetIndices(indices);
removeFacets(indices);
Mesh::Feature* splitMesh = static_cast<Mesh::Feature*>(App::GetApplication().getActiveDocument()
->addObject("Mesh::Feature",pcObject->getNameInDocument()));
// Note: deletes also kernel
@ -1167,7 +1229,9 @@ void ViewProviderMesh::segmentMesh(const MeshCore::MeshKernel& toolMesh, const B
indices = complementary;
}
meshProp.createSegment(indices);
Mesh::MeshObject* kernel = meshProp.startEditing();
kernel->addSegment(indices);
meshProp.finishEditing();
static_cast<Mesh::Feature*>(pcObject)->purgeTouched();
}
@ -1401,10 +1465,23 @@ void ViewProviderMesh::fillHole(unsigned long uFacet)
//add the facets to the mesh and open a transaction object for the undo/redo stuff
Gui::Application::Instance->activeDocument()->openCommand("Fill hole");
fea->Mesh.append(newFacets, newPoints);
Mesh::MeshObject* kernel = fea->Mesh.startEditing();
kernel->addFacets(newFacets, newPoints);
fea->Mesh.finishEditing();
Gui::Application::Instance->activeDocument()->commitCommand();
}
void ViewProviderMesh::removeFacets(const std::vector<unsigned long>& facets)
{
// Get the attached mesh property
Mesh::PropertyMeshKernel& meshProp = static_cast<Mesh::Feature*>(pcObject)->Mesh;
Mesh::MeshObject* kernel = meshProp.startEditing();
//Remove the facets from the mesh and open a transaction object for the undo/redo stuff
kernel->deleteFacets(facets);
meshProp.finishEditing();
pcObject->purgeTouched();
}
void ViewProviderMesh::selectFacet(unsigned long facet)
{
std::vector<unsigned long> selection;

View File

@ -60,6 +60,7 @@ namespace Gui {
namespace MeshCore {
class MeshKernel;
struct Material;
}
@ -122,6 +123,7 @@ public:
virtual void setDisplayMode(const char* ModeName);
/// returns a list of all possible modes
virtual std::vector<std::string> getDisplayModes(void) const;
bool exportToVrml(const char* filename, const MeshCore::Material&, bool binary=false) const;
/** @name Editing */
//@{
@ -141,6 +143,7 @@ public:
std::vector<unsigned long> getFacetsOfRegion(const SbViewportRegion&, const SbViewportRegion&, SoCamera*) const;
std::vector<unsigned long> getVisibleFacetsAfterZoom(const SbBox2s&, const SbViewportRegion&, SoCamera*) const;
std::vector<unsigned long> getVisibleFacets(const SbViewportRegion&, SoCamera*) const;
virtual void removeFacets(const std::vector<unsigned long>&);
//@}
protected:

View File

@ -26,6 +26,8 @@ EXTRA_DIST = \
translations/MeshPart_nl.ts \
translations/MeshPart_no.qm \
translations/MeshPart_no.ts \
translations/MeshPart_pl.qm \
translations/MeshPart_pl.ts \
translations/MeshPart_pt.qm \
translations/MeshPart_pt.ts \
translations/MeshPart_ru.qm \

View File

@ -10,6 +10,7 @@
<file>translations/MeshPart_it.qm</file>
<file>translations/MeshPart_nl.qm</file>
<file>translations/MeshPart_no.qm</file>
<file>translations/MeshPart_pl.qm</file>
<file>translations/MeshPart_pt.qm</file>
<file>translations/MeshPart_ru.qm</file>
<file>translations/MeshPart_se.qm</file>

View File

@ -247,6 +247,8 @@ EXTRA_DIST = \
Resources/translations/Part_nl.ts \
Resources/translations/Part_no.qm \
Resources/translations/Part_no.ts \
Resources/translations/Part_pl.qm \
Resources/translations/Part_pl.ts \
Resources/translations/Part_pt.qm \
Resources/translations/Part_pt.ts \
Resources/translations/Part_ru.qm \

View File

@ -36,6 +36,7 @@
<file>translations/Part_it.qm</file>
<file>translations/Part_nl.qm</file>
<file>translations/Part_no.qm</file>
<file>translations/Part_pl.qm</file>
<file>translations/Part_pt.qm</file>
<file>translations/Part_ru.qm</file>
<file>translations/Part_se.qm</file>

View File

@ -25,6 +25,8 @@ EXTRA_DIST = \
translations/PartDesign_nl.ts \
translations/PartDesign_no.qm \
translations/PartDesign_no.ts \
translations/PartDesign_pl.qm \
translations/PartDesign_pl.ts \
translations/PartDesign_pt.qm \
translations/PartDesign_pt.ts \
translations/PartDesign_ru.qm \

View File

@ -12,6 +12,7 @@
<file>translations/PartDesign_it.qm</file>
<file>translations/PartDesign_nl.qm</file>
<file>translations/PartDesign_no.qm</file>
<file>translations/PartDesign_pl.qm</file>
<file>translations/PartDesign_pt.qm</file>
<file>translations/PartDesign_ru.qm</file>
<file>translations/PartDesign_se.qm</file>

View File

@ -100,6 +100,8 @@ EXTRA_DIST = \
Resources/translations/Points_nl.ts \
Resources/translations/Points_no.qm \
Resources/translations/Points_no.ts \
Resources/translations/Points_pl.qm \
Resources/translations/Points_pl.ts \
Resources/translations/Points_pt.qm \
Resources/translations/Points_pt.ts \
Resources/translations/Points_ru.qm \

View File

@ -9,6 +9,7 @@
<file>translations/Points_it.qm</file>
<file>translations/Points_nl.qm</file>
<file>translations/Points_no.qm</file>
<file>translations/Points_pl.qm</file>
<file>translations/Points_pt.qm</file>
<file>translations/Points_ru.qm</file>
<file>translations/Points_se.qm</file>

View File

@ -118,6 +118,8 @@ EXTRA_DIST = \
Resources/translations/Raytracing_nl.ts \
Resources/translations/Raytracing_no.qm \
Resources/translations/Raytracing_no.ts \
Resources/translations/Raytracing_pl.qm \
Resources/translations/Raytracing_pl.ts \
Resources/translations/Raytracing_pt.qm \
Resources/translations/Raytracing_pt.ts \
Resources/translations/Raytracing_ru.qm \

View File

@ -16,6 +16,7 @@
<file>translations/Raytracing_it.qm</file>
<file>translations/Raytracing_nl.qm</file>
<file>translations/Raytracing_no.qm</file>
<file>translations/Raytracing_pl.qm</file>
<file>translations/Raytracing_pt.qm</file>
<file>translations/Raytracing_ru.qm</file>
<file>translations/Raytracing_se.qm</file>

View File

@ -26,6 +26,8 @@ EXTRA_DIST = \
translations/ReverseEngineering_nl.ts \
translations/ReverseEngineering_no.qm \
translations/ReverseEngineering_no.ts \
translations/ReverseEngineering_pl.qm \
translations/ReverseEngineering_pl.ts \
translations/ReverseEngineering_pt.qm \
translations/ReverseEngineering_pt.ts \
translations/ReverseEngineering_ru.qm \

View File

@ -10,6 +10,7 @@
<file>translations/ReverseEngineering_it.qm</file>
<file>translations/ReverseEngineering_nl.qm</file>
<file>translations/ReverseEngineering_no.qm</file>
<file>translations/ReverseEngineering_pl.qm</file>
<file>translations/ReverseEngineering_pt.qm</file>
<file>translations/ReverseEngineering_ru.qm</file>
<file>translations/ReverseEngineering_se.qm</file>

View File

@ -38,6 +38,8 @@ EXTRA_DIST = \
translations/Robot_nl.ts \
translations/Robot_no.qm \
translations/Robot_no.ts \
translations/Robot_pl.qm \
translations/Robot_pl.ts \
translations/Robot_pt.qm \
translations/Robot_pt.ts \
translations/Robot_ru.qm \

View File

@ -22,6 +22,7 @@
<file>translations/Robot_it.qm</file>
<file>translations/Robot_nl.qm</file>
<file>translations/Robot_no.qm</file>
<file>translations/Robot_pl.qm</file>
<file>translations/Robot_pt.qm</file>
<file>translations/Robot_ru.qm</file>
<file>translations/Robot_se.qm</file>

View File

@ -92,6 +92,8 @@ icons/Constraint_PointOnObject.svg \
translations/Sketcher_nl.ts \
translations/Sketcher_no.qm \
translations/Sketcher_no.ts \
translations/Sketcher_pl.qm \
translations/Sketcher_pl.ts \
translations/Sketcher_pt.qm \
translations/Sketcher_pt.ts \
translations/Sketcher_ru.qm \

View File

@ -74,6 +74,7 @@
<file>translations/Sketcher_it.qm</file>
<file>translations/Sketcher_nl.qm</file>
<file>translations/Sketcher_no.qm</file>
<file>translations/Sketcher_pl.qm</file>
<file>translations/Sketcher_pt.qm</file>
<file>translations/Sketcher_ru.qm</file>
<file>translations/Sketcher_se.qm</file>

View File

@ -11,6 +11,7 @@
<file>translations/StartPage_ru.qm</file>
<file>translations/StartPage_se.qm</file>
<file>translations/StartPage_uk.qm</file>
<file>translations/StartPage_pl.qm</file>
<file>translations/StartPage_pt.qm</file>
<file>translations/StartPage_hr.qm</file>
<file>translations/StartPage_zh.qm</file>

View File

@ -77,14 +77,38 @@ EXTRA_DIST = \
CMakeLists.txt \
UnitTest.ui \
Resources/Test.qrc \
Resources/translations/Test_af.qm \
Resources/translations/Test_af.ts \
Resources/translations/Test_de.qm \
Resources/translations/Test_es.qm \
Resources/translations/Test_fr.qm \
Resources/translations/Test_it.qm \
Resources/translations/Test_se.qm \
Resources/translations/Test_de.ts \
Resources/translations/Test_es.qm \
Resources/translations/Test_es.ts \
Resources/translations/Test_fi.qm \
Resources/translations/Test_fi.ts \
Resources/translations/Test_fr.qm \
Resources/translations/Test_fr.ts \
Resources/translations/Test_hr.qm \
Resources/translations/Test_hr.ts \
Resources/translations/Test_hu.qm \
Resources/translations/Test_hu.ts \
Resources/translations/Test_it.qm \
Resources/translations/Test_it.ts \
Resources/translations/Test_ja.qm \
Resources/translations/Test_ja.ts \
Resources/translations/Test_nl.qm \
Resources/translations/Test_nl.ts \
Resources/translations/Test_no.qm \
Resources/translations/Test_no.ts \
Resources/translations/Test_pl.qm \
Resources/translations/Test_pl.ts \
Resources/translations/Test_pt.qm \
Resources/translations/Test_pt.ts \
Resources/translations/Test_ru.qm \
Resources/translations/Test_ru.ts \
Resources/translations/Test_se.qm \
Resources/translations/Test_se.ts \
Resources/translations/Test_uk.qm \
Resources/translations/Test_uk.ts \
Resources/translations/Test_zh.qm \
Resources/translations/Test_zh.ts \
qtunittest.py

View File

@ -1,9 +1,21 @@
<RCC>
<qresource>
<file>translations/Test_af.qm</file>
<file>translations/Test_de.qm</file>
<file>translations/Test_es.qm</file>
<file>translations/Test_fi.qm</file>
<file>translations/Test_fr.qm</file>
<file>translations/Test_hr.qm</file>
<file>translations/Test_hu.qm</file>
<file>translations/Test_it.qm</file>
<file>translations/Test_ja.qm</file>
<file>translations/Test_nl.qm</file>
<file>translations/Test_no.qm</file>
<file>translations/Test_pl.qm</file>
<file>translations/Test_pt.qm</file>
<file>translations/Test_ru.qm</file>
<file>translations/Test_se.qm</file>
<file>translations/Test_uk.qm</file>
<file>translations/Test_zh.qm</file>
</qresource>
</RCC>