Sketcher New Feature: Ellipse support
- Ellipse introduction button via (center,majaxis extreme, a point in edge), ellipse is always CCW so that Z axis goes in the positive direction of the sketch - Backwards compatibility with files of previous versions of ellipse not defining a phi angle - Art by Jim (all the icons you see and the XPMs shown on creation of an ellipse) - Element Widget support for ellipses - Box selection for ellipses - Point on Ellipse constraint based on the gardener's method based on Ulrich's function proposal (radcan simplified, i.e. with simplify_radical sage function) - Tangent: Ellipse to Line based on DeepSOIC's geometric formulation (radcan simplified) Sketcher New Feature: Internal Alignment Constraint - The element to which internal alignment is applied has to be selected last. - All other elements are added in the order of priority, taking into account existing elements - Art by Jim (beautiful icons). Sketcher New Feature: Tool to show/hide/restore the internal geometry of an element - New functionality for show/hide internal geometry: toggles between hiding all unused internal geometry elements and showing all internal geometry. The restore function is implicit to the showing all internal geometry Sketcher New Feature: Arc of Ellipse support - Part::Geometry + Python implementation - ArcOfEllipse creation method - Art by Jim (all the icons you see and the XPMs shown on creation of arc of ellipse elements) - Sketcher Element widget for ArcOfEllipse. Bug fix: Select elements associated to constraints works now for foci internal alignment constraints
This commit is contained in:
@@ -43,6 +43,7 @@ const int Constraint::GeoUndef = -2000;
|
||||
|
||||
Constraint::Constraint()
|
||||
: Type(None),
|
||||
AlignmentType(Undef),
|
||||
Name(""),
|
||||
Value(0.0),
|
||||
First(GeoUndef),
|
||||
@@ -58,6 +59,7 @@ Constraint::Constraint()
|
||||
|
||||
Constraint::Constraint(const Constraint& from)
|
||||
: Type(from.Type),
|
||||
AlignmentType(from.AlignmentType),
|
||||
Name(from.Name),
|
||||
Value(from.Value),
|
||||
First(from.First),
|
||||
@@ -92,18 +94,22 @@ unsigned int Constraint::getMemSize (void) const
|
||||
|
||||
void Constraint::Save (Writer &writer) const
|
||||
{
|
||||
writer.Stream() << writer.ind() << "<Constrain "
|
||||
<< "Name=\"" << Name << "\" "
|
||||
<< "Type=\"" << (int)Type << "\" "
|
||||
<< "Value=\"" << Value << "\" "
|
||||
<< "First=\"" << First << "\" "
|
||||
<< "FirstPos=\"" << (int) FirstPos << "\" "
|
||||
<< "Second=\"" << Second << "\" "
|
||||
<< "SecondPos=\"" << (int) SecondPos << "\" "
|
||||
<< "Third=\"" << Third << "\" "
|
||||
<< "ThirdPos=\"" << (int) ThirdPos << "\" "
|
||||
<< "LabelDistance=\"" << LabelDistance << "\" "
|
||||
<< "LabelPosition=\"" << LabelPosition << "\" />"
|
||||
writer.Stream() << writer.ind() << "<Constrain "
|
||||
<< "Name=\"" << Name << "\" "
|
||||
<< "Type=\"" << (int)Type << "\" ";
|
||||
if(this->Type==InternalAlignment)
|
||||
writer.Stream()
|
||||
<< "InternalAlignmentType=\"" << (int)AlignmentType << "\" ";
|
||||
writer.Stream()
|
||||
<< "Value=\"" << Value << "\" "
|
||||
<< "First=\"" << First << "\" "
|
||||
<< "FirstPos=\"" << (int) FirstPos << "\" "
|
||||
<< "Second=\"" << Second << "\" "
|
||||
<< "SecondPos=\"" << (int) SecondPos << "\" "
|
||||
<< "Third=\"" << Third << "\" "
|
||||
<< "ThirdPos=\"" << (int) ThirdPos << "\" "
|
||||
<< "LabelDistance=\"" << LabelDistance << "\" "
|
||||
<< "LabelPosition=\"" << LabelPosition << "\" />"
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
@@ -118,6 +124,11 @@ void Constraint::Restore(XMLReader &reader)
|
||||
Second = reader.getAttributeAsInteger("Second");
|
||||
SecondPos = (PointPos) reader.getAttributeAsInteger("SecondPos");
|
||||
|
||||
if(this->Type==InternalAlignment)
|
||||
AlignmentType = (InternalAlignmentType) reader.getAttributeAsInteger("InternalAlignmentType");
|
||||
else
|
||||
AlignmentType = Undef;
|
||||
|
||||
// read the third geo group if present
|
||||
if (reader.hasAttribute("Third")) {
|
||||
Third = reader.getAttributeAsInteger("Third");
|
||||
|
||||
Reference in New Issue
Block a user