Merge branch 'master' into posttodxf
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -267,7 +267,7 @@ Only available for holes without thread</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="18" column="1">
|
||||
<item row="18" column="1" colspan="5">
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
@@ -277,7 +277,7 @@ Only available for holes without thread</string>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -509,7 +509,7 @@ Only available for holes without thread</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<item row="13" column="1" colspan="5">
|
||||
<widget class="QComboBox" name="HoleCutType">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
@@ -519,7 +519,7 @@ Only available for holes without thread</string>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
|
||||
@@ -105,7 +105,7 @@ Py::Dict TooltablePy::getTools(void) const
|
||||
{
|
||||
Py::Dict dict;
|
||||
for(std::map<int,Path::Tool*>::iterator i = getTooltablePtr()->Tools.begin(); i != getTooltablePtr()->Tools.end(); ++i) {
|
||||
PyObject *tool = new Path::ToolPy(i->second);
|
||||
PyObject *tool = new Path::ToolPy(new Tool(*i->second));
|
||||
dict.setItem(Py::Long(i->first), Py::asObject(tool));
|
||||
}
|
||||
return dict;
|
||||
|
||||
@@ -5987,7 +5987,7 @@ void CmdSketcherConstrainAngle::activated(int iMsg)
|
||||
std::swap(PosId1,PosId2);
|
||||
}
|
||||
|
||||
if(isBsplinePole(Obj, GeoId1) || isBsplinePole(Obj, GeoId2)) {
|
||||
if(isBsplinePole(Obj, GeoId1) || (GeoId2 != Constraint::GeoUndef && isBsplinePole(Obj, GeoId2))) {
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||
QObject::tr("Select an edge that is not a B-spline weight"));
|
||||
return;
|
||||
@@ -6538,14 +6538,14 @@ void CmdSketcherConstrainEqual::applyConstraint(std::vector<SelIdPair> &selSeq,
|
||||
const Part::Geometry *geo1 = Obj->getGeometry(GeoId1);
|
||||
const Part::Geometry *geo2 = Obj->getGeometry(GeoId2);
|
||||
|
||||
if ( (geo1->getTypeId() == Part::GeomLineSegment::getClassTypeId() && geo2->getTypeId() != Part::GeomLineSegment::getClassTypeId()) ||
|
||||
(geo1->getTypeId() == Part::GeomHyperbola::getClassTypeId() && geo2->getTypeId() != Part::GeomHyperbola::getClassTypeId()) ||
|
||||
(geo1->getTypeId() == Part::GeomParabola::getClassTypeId() && geo2->getTypeId() != Part::GeomParabola::getClassTypeId()) ||
|
||||
(isBsplinePole(geo1) && !isBsplinePole(geo1)) ||
|
||||
if ( (geo1->getTypeId() == Part::GeomLineSegment::getClassTypeId() && geo2->getTypeId() != Part::GeomLineSegment::getClassTypeId()) ||
|
||||
(geo1->getTypeId() == Part::GeomArcOfHyperbola::getClassTypeId() && geo2->getTypeId() != Part::GeomArcOfHyperbola::getClassTypeId()) ||
|
||||
(geo1->getTypeId() == Part::GeomArcOfParabola::getClassTypeId() && geo2->getTypeId() != Part::GeomArcOfParabola::getClassTypeId()) ||
|
||||
(isBsplinePole(geo1) && !isBsplinePole(geo2)) ||
|
||||
( (geo1->getTypeId() == Part::GeomCircle::getClassTypeId() || geo1->getTypeId() == Part::GeomArcOfCircle::getClassTypeId()) &&
|
||||
(geo2->getTypeId() != Part::GeomCircle::getClassTypeId() || geo2->getTypeId() != Part::GeomArcOfCircle::getClassTypeId())) ||
|
||||
!(geo2->getTypeId() == Part::GeomCircle::getClassTypeId() || geo2->getTypeId() == Part::GeomArcOfCircle::getClassTypeId())) ||
|
||||
( (geo1->getTypeId() == Part::GeomEllipse::getClassTypeId() || geo1->getTypeId() == Part::GeomArcOfEllipse::getClassTypeId()) &&
|
||||
(geo2->getTypeId() != Part::GeomEllipse::getClassTypeId() || geo2->getTypeId() != Part::GeomArcOfEllipse::getClassTypeId())) ){
|
||||
!(geo2->getTypeId() == Part::GeomEllipse::getClassTypeId() || geo2->getTypeId() == Part::GeomArcOfEllipse::getClassTypeId())) ){
|
||||
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||
QObject::tr("Select two or more edges of similar type"));
|
||||
|
||||
@@ -6106,9 +6106,9 @@ bool ViewProviderSketch::setEdit(int ModNum)
|
||||
// is loaded into the solver, which ensures that any prospective draw using temporal
|
||||
// geometry (draw with first parameter true) has the right ViewProvider geometry extensions
|
||||
// set - This fixes Weight constraint dragging on a just opened sketch.
|
||||
draw(false,true);
|
||||
getSketchObject()->solve(false);
|
||||
UpdateSolverInformation();
|
||||
draw(false,true);
|
||||
|
||||
connectUndoDocument = getDocument()
|
||||
->signalUndoDocument.connect(boost::bind(&ViewProviderSketch::slotUndoDocument, this, bp::_1));
|
||||
|
||||
@@ -106,8 +106,8 @@ DrawViewDimension::DrawViewDimension(void)
|
||||
References3D.setScope(App::LinkScope::Global);
|
||||
|
||||
ADD_PROPERTY_TYPE(FormatSpec,(getDefaultFormatSpec()) , "Format", App::Prop_Output,"Dimension Format");
|
||||
ADD_PROPERTY_TYPE(FormatSpecOverTolerance,("%+g") , "Format", App::Prop_Output,"Dimension Overtolerance Format");
|
||||
ADD_PROPERTY_TYPE(FormatSpecUnderTolerance,("%+g") , "Format", App::Prop_Output,"Dimension Undertolerance Format");
|
||||
ADD_PROPERTY_TYPE(FormatSpecOverTolerance,(getDefaultFormatSpec(true)) , "Format", App::Prop_Output,"Dimension Overtolerance Format");
|
||||
ADD_PROPERTY_TYPE(FormatSpecUnderTolerance,(getDefaultFormatSpec(true)) , "Format", App::Prop_Output,"Dimension Undertolerance Format");
|
||||
ADD_PROPERTY_TYPE(Arbitrary,(false) ,"Format", App::Prop_Output,"Value overridden by user");
|
||||
ADD_PROPERTY_TYPE(ArbitraryTolerances,(false) ,"Format", App::Prop_Output,"Tolerance values overridden by user");
|
||||
|
||||
@@ -1300,7 +1300,7 @@ std::string DrawViewDimension::getPrefix() const
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string DrawViewDimension::getDefaultFormatSpec() const
|
||||
std::string DrawViewDimension::getDefaultFormatSpec(bool isToleranceFormat) const
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Dimensions");
|
||||
@@ -1333,6 +1333,10 @@ std::string DrawViewDimension::getDefaultFormatSpec() const
|
||||
|
||||
}
|
||||
|
||||
if (isToleranceFormat) {
|
||||
formatSpec.replace(QString::fromUtf8("%"), QString::fromUtf8("%+"));
|
||||
}
|
||||
|
||||
return Base::Tools::toStdString(formatSpec);
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ protected:
|
||||
virtual void onChanged(const App::Property* prop) override;
|
||||
virtual void onDocumentRestored() override;
|
||||
std::string getPrefix() const;
|
||||
std::string getDefaultFormatSpec() const;
|
||||
std::string getDefaultFormatSpec(bool isToleranceFormat = false) const;
|
||||
virtual pointPair getPointsOneEdge();
|
||||
virtual pointPair getPointsTwoEdges();
|
||||
virtual pointPair getPointsTwoVerts();
|
||||
|
||||
Reference in New Issue
Block a user