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:
@@ -151,6 +151,38 @@ void EllipsePy::setMinorRadius(Py::Float arg)
|
||||
ellipse->SetMinorRadius((double)arg);
|
||||
}
|
||||
|
||||
Py::Float EllipsePy::getAngleXU(void) const
|
||||
{
|
||||
Handle_Geom_Ellipse ellipse = Handle_Geom_Ellipse::DownCast(getGeomEllipsePtr()->handle());
|
||||
|
||||
gp_Pnt center = ellipse->Axis().Location();
|
||||
gp_Dir normal = ellipse->Axis().Direction();
|
||||
gp_Dir xdir = ellipse->XAxis().Direction();
|
||||
|
||||
gp_Ax2 xdirref(center, normal); // this is a reference system, might be CCW or CW depending on the creation method
|
||||
|
||||
return Py::Float(-xdir.AngleWithRef(xdirref.XDirection(),normal));
|
||||
|
||||
}
|
||||
|
||||
void EllipsePy::setAngleXU(Py::Float arg)
|
||||
{
|
||||
Handle_Geom_Ellipse ellipse = Handle_Geom_Ellipse::DownCast(getGeomEllipsePtr()->handle());
|
||||
|
||||
|
||||
gp_Pnt center = ellipse->Axis().Location();
|
||||
gp_Dir normal = ellipse->Axis().Direction();
|
||||
|
||||
gp_Ax1 normaxis(center, normal);
|
||||
|
||||
gp_Ax2 xdirref(center, normal);
|
||||
|
||||
xdirref.Rotate(normaxis,arg);
|
||||
|
||||
ellipse->SetPosition(xdirref);
|
||||
|
||||
}
|
||||
|
||||
Py::Float EllipsePy::getEccentricity(void) const
|
||||
{
|
||||
Handle_Geom_Ellipse ellipse = Handle_Geom_Ellipse::DownCast(getGeomEllipsePtr()->handle());
|
||||
|
||||
Reference in New Issue
Block a user