}
}
+std::shared_ptr<GeomAPI_Shape> GeomAPI_AISObject::getShape() const
+{
+ std::shared_ptr<GeomAPI_Shape> aResult;
+
+ Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
+ if (!anAIS.IsNull()) {
+ Handle(AIS_Shape) aShapeAIS = Handle(AIS_Shape)::DownCast(anAIS);
+ if (aShapeAIS) {
+ std::shared_ptr<GeomAPI_Shape> aResult(new GeomAPI_Shape);
+ aResult->setImpl(new TopoDS_Shape(aShapeAIS->Shape()));
+ return aResult;
+ }
+ }
+ return std::shared_ptr<GeomAPI_Shape>();
+}
+
void GeomAPI_AISObject::createDistance(std::shared_ptr<GeomAPI_Pnt> theStartPoint,
std::shared_ptr<GeomAPI_Pnt> theEndPoint,
std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
GEOMAPI_EXPORT
void createShape(std::shared_ptr<GeomAPI_Shape> theShape);
+ /// Reyirns shape used for the presentation creation (can be NULL)
+ GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Shape> getShape() const;
+
/** \brief Creates AIS_LengthDimension object
* \param[in] theStartPoint first point for dimension
* \param[in] theEndPoint second point for dimension
aXYZ.Reverse();
}*/
- myWorkshop->viewer()->setViewProjection(aXYZ.X(), aXYZ.Y(), aXYZ.Z(), aTwist);
+ // Rotate view if the sketcher plane is selected only from preview planes
+ // Preview planes are created only if there is no any shape
+ if (myYZPlane.get()) {
+ myWorkshop->viewer()->setViewProjection(aXYZ.X(), aXYZ.Y(), aXYZ.Z(), aTwist);
+ }
}
// 3. Clear text in the label
myLabel->setText("");
connect(workshop()->selector(), SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged()));
activateFilters(true);
-
- //VSV aDisp->updateViewer();
}
void PartSet_WidgetSketchLabel::deactivate()