SHAPER  9.12.0
SketchAPI_Sketch Class Reference

Interface for Sketch feature. More...

Inheritance diagram for SketchAPI_Sketch:
Inheritance graph

Public Member Functions

 SketchAPI_Sketch (const std::shared_ptr< ModelAPI_Feature > &theFeature)
 Constructor without values. More...
 
 SketchAPI_Sketch (const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::shared_ptr< GeomAPI_Ax3 > &thePlane)
 Constructor with values. More...
 
 SketchAPI_Sketch (const std::shared_ptr< ModelAPI_Feature > &theFeature, const ModelHighAPI_Selection &theExternal)
 Constructor with values. More...
 
 SketchAPI_Sketch (const std::shared_ptr< ModelAPI_Feature > &theFeature, std::shared_ptr< ModelAPI_Object > thePlaneObject)
 Constructor with values. More...
 
virtual ~SketchAPI_Sketch ()
 Destructor. More...
 
virtual std::string getID ()
 
virtual std::shared_ptr< GeomDataAPI_Pointorigin () const
 Origin point. More...
 
virtual std::shared_ptr< GeomDataAPI_DirdirX () const
 Direction of X. More...
 
virtual std::shared_ptr< GeomDataAPI_Dirnormal () const
 Normal. More...
 
virtual std::shared_ptr< ModelAPI_AttributeRefListfeatures () const
 Features. More...
 
virtual std::shared_ptr< ModelAPI_AttributeSelectionexternal () const
 External. More...
 
virtual std::shared_ptr< ModelAPI_AttributeStringsolverError () const
 Solver error. More...
 
virtual std::shared_ptr< ModelAPI_AttributeStringsolverDOF () const
 Solver DOF. More...
 
void setPlane (const std::shared_ptr< GeomAPI_Ax3 > &thePlane)
 Set plane. More...
 
void setPlane (const ModelHighAPI_Selection &thePlane, bool theRemoveExternalDependency=false)
 Change sketch plane. More...
 
void setExternal (const ModelHighAPI_Selection &theExternal)
 Set external. More...
 
void setExternal (std::shared_ptr< ModelAPI_Object > thePlaneObject)
 Set external. More...
 
void changeFacesOrder (const std::list< std::list< ModelHighAPI_Selection > > &theFaces)
 Change order of sketch results (faces) More...
 
std::list< std::shared_ptr< SketchAPI_Point > > getFreePoints ()
 List points not connected by constraints with other sketch entitites. More...
 
std::shared_ptr< SketchAPI_PointaddPoint (double theX, double theY)
 Add point. More...
 
std::shared_ptr< SketchAPI_PointaddPoint (const std::shared_ptr< GeomAPI_Pnt2d > &thePoint)
 Add point. More...
 
std::shared_ptr< SketchAPI_PointaddPoint (const ModelHighAPI_Selection &theExternal)
 Add point. More...
 
std::shared_ptr< SketchAPI_PointaddPoint (const std::wstring &theExternalName)
 Add point. More...
 
std::shared_ptr< SketchAPI_IntersectionPointaddIntersectionPoint (const ModelHighAPI_Selection &theExternal, bool theKeepResult=false)
 Add intersection point. More...
 
std::shared_ptr< SketchAPI_IntersectionPointaddIntersectionPoint (const std::wstring &theExternalName, bool theKeepResult=false)
 Add point. More...
 
std::shared_ptr< SketchAPI_LineaddLine (double theX1, double theY1, double theX2, double theY2)
 Add line. More...
 
std::shared_ptr< SketchAPI_LineaddLine (const std::shared_ptr< GeomAPI_Pnt2d > &theStartPoint, const std::shared_ptr< GeomAPI_Pnt2d > &theEndPoint)
 Add line. More...
 
std::shared_ptr< SketchAPI_LineaddLine (const ModelHighAPI_Selection &theExternal)
 Add line. More...
 
std::shared_ptr< SketchAPI_LineaddLine (const std::wstring &theExternalName)
 Add line. More...
 
std::shared_ptr< SketchAPI_RectangleaddRectangle (double theX1, double theY1, double theX2, double theY2)
 Add rectangle. More...
 
std::shared_ptr< SketchAPI_RectangleaddRectangle (const std::shared_ptr< GeomAPI_Pnt2d > &theStartPoint, const std::shared_ptr< GeomAPI_Pnt2d > &theEndPoint)
 Add rectangle. More...
 
std::shared_ptr< SketchAPI_RectangleaddRectangleCentered (const std::pair< std::shared_ptr< GeomAPI_Pnt2d >, ModelHighAPI_RefAttr > &theCenter, const std::pair< std::shared_ptr< GeomAPI_Pnt2d >, ModelHighAPI_RefAttr > &theCorner)
 Add rectangle. More...
 
std::shared_ptr< SketchAPI_CircleaddCircle (double theCenterX, double theCenterY, double theRadius)
 Add circle. More...
 
std::shared_ptr< SketchAPI_CircleaddCircle (const std::shared_ptr< GeomAPI_Pnt2d > &theCenter, double theRadius)
 Add circle. More...
 
std::shared_ptr< SketchAPI_MacroCircleaddCircle (double theCenterX, double theCenterY, double thePassedX, double thePassedY)
 Add circle. More...
 
std::shared_ptr< SketchAPI_MacroCircleaddCircle (const std::shared_ptr< GeomAPI_Pnt2d > &theCenterPoint, const std::shared_ptr< GeomAPI_Pnt2d > &thePassedPoint)
 Add circle. More...
 
std::shared_ptr< SketchAPI_MacroCircleaddCircle (double theX1, double theY1, double theX2, double theY2, double theX3, double theY3)
 Add circle. More...
 
std::shared_ptr< SketchAPI_MacroCircleaddCircle (const std::shared_ptr< GeomAPI_Pnt2d > &thePoint1, const std::shared_ptr< GeomAPI_Pnt2d > &thePoint2, const std::shared_ptr< GeomAPI_Pnt2d > &thePoint3)
 Add circle. More...
 
std::shared_ptr< SketchAPI_CircleaddCircle (const ModelHighAPI_Selection &theExternal)
 Add circle. More...
 
std::shared_ptr< SketchAPI_CircleaddCircle (const std::wstring &theExternalName)
 Add circle. More...
 
std::shared_ptr< SketchAPI_ArcaddArc (double theCenterX, double theCenterY, double theStartX, double theStartY, double theEndX, double theEndY, bool theInversed)
 Add arc. More...
 
std::shared_ptr< SketchAPI_ArcaddArc (const std::shared_ptr< GeomAPI_Pnt2d > &theCenter, const std::shared_ptr< GeomAPI_Pnt2d > &theStart, const std::shared_ptr< GeomAPI_Pnt2d > &theEnd, bool theInversed)
 Add arc. More...
 
std::shared_ptr< SketchAPI_MacroArcaddArc (double theStartX, double theStartY, double theEndX, double theEndY, double thePassedX, double thePassedY)
 Add arc. More...
 
std::shared_ptr< SketchAPI_MacroArcaddArc (const std::shared_ptr< GeomAPI_Pnt2d > &theStart, const std::shared_ptr< GeomAPI_Pnt2d > &theEnd, const std::shared_ptr< GeomAPI_Pnt2d > &thePassed)
 Add arc. More...
 
std::shared_ptr< SketchAPI_MacroArcaddArc (const ModelHighAPI_RefAttr &theConnectedPoint, double theEndX, double theEndY, bool theInversed, bool theTransversal=false)
 Add transversal/tangent arc. More...
 
std::shared_ptr< SketchAPI_MacroArcaddArc (const ModelHighAPI_RefAttr &theConnectedPoint, const std::shared_ptr< GeomAPI_Pnt2d > &theEnd, bool theInversed, bool theTransversal=false)
 Add transversal/tangent arc. More...
 
std::shared_ptr< SketchAPI_ArcaddArc (const ModelHighAPI_Selection &theExternal)
 Add arc. More...
 
std::shared_ptr< SketchAPI_ArcaddArc (const std::wstring &theExternalName)
 Add arc. More...
 
std::shared_ptr< SketchAPI_EllipseaddEllipse (double theCenterX, double theCenterY, double theFocusX, double theFocusY, double theMinorRadius)
 Add ellipse. More...
 
std::shared_ptr< SketchAPI_EllipseaddEllipse (const std::shared_ptr< GeomAPI_Pnt2d > &theCenter, const std::shared_ptr< GeomAPI_Pnt2d > &theFocus, double theRadius)
 Add ellipse. More...
 
std::shared_ptr< SketchAPI_MacroEllipseaddEllipse (double thePoint1X, double thePoint1Y, double thePoint2X, double thePoint2Y, double thePassedX, double thePassedY, bool isPoint1Center=true)
 Add ellipse. More...
 
std::shared_ptr< SketchAPI_MacroEllipseaddEllipse (const PointOrReference &thePoint1, const PointOrReference &thePoint2, const PointOrReference &thePassedPoint, bool isPoint1Center=true)
 Add ellipse. More...
 
std::shared_ptr< SketchAPI_EllipseaddEllipse (const ModelHighAPI_Selection &theExternal)
 Add ellipse. More...
 
std::shared_ptr< SketchAPI_EllipseaddEllipse (const std::wstring &theExternalName)
 Add ellipse. More...
 
std::shared_ptr< SketchAPI_EllipticArcaddEllipticArc (double theCenterX, double theCenterY, double theFocusX, double theFocusY, double theStartX, double theStartY, double theEndX, double theEndY, bool theInversed=false)
 Add elliptic arc. More...
 
std::shared_ptr< SketchAPI_MacroEllipticArcaddEllipticArc (const PointOrReference &theCenter, const PointOrReference &theMajorAxisPoint, const PointOrReference &theStartPoint, const PointOrReference &theEndPoint, bool theInversed=false)
 Add elliptic arc. More...
 
std::shared_ptr< SketchAPI_EllipticArcaddEllipticArc (const ModelHighAPI_Selection &theExternal)
 Add elliptic arc. More...
 
std::shared_ptr< SketchAPI_EllipticArcaddEllipticArc (const std::wstring &theExternalName)
 Add elliptic arc. More...
 
std::shared_ptr< SketchAPI_BSplineaddSpline (const ModelHighAPI_Selection &external=ModelHighAPI_Selection(), const int degree=-1, const std::list< PointOrReference > &poles=std::list< PointOrReference >(), const std::list< ModelHighAPI_Double > &weights=std::list< ModelHighAPI_Double >(), const std::list< ModelHighAPI_Double > &knots=std::list< ModelHighAPI_Double >(), const std::list< ModelHighAPI_Integer > &multiplicities=std::list< ModelHighAPI_Integer >(), const bool periodic=false)
 Add B-spline. More...
 
std::shared_ptr< SketchAPI_BSplineaddInterpolation (const std::list< ModelHighAPI_RefAttr > &points, const bool periodic=false, const bool closed=false)
 Add interpolation feature. More...
 
std::shared_ptr< SketchAPI_BSplineaddApproximation (const std::list< ModelHighAPI_RefAttr > &points, const ModelHighAPI_Double &precision=ModelHighAPI_Double(1.e-3), const bool periodic=false, const bool closed=false)
 Add approximation feature. More...
 
std::shared_ptr< SketchAPI_ProjectionaddProjection (const ModelHighAPI_Selection &theExternalFeature, bool keepResult=false, bool keepRefToOriginal=true)
 Add projection. More...
 
std::shared_ptr< SketchAPI_MirroraddMirror (const ModelHighAPI_RefAttr &theMirrorLine, const std::list< std::shared_ptr< ModelAPI_Object > > &theObjects)
 Add mirror. More...
 
std::shared_ptr< SketchAPI_OffsetaddOffset (const std::list< std::shared_ptr< ModelAPI_Object > > &theObjects, const ModelHighAPI_Double &theValue, const bool theReversed=false, const std::string &theJointType=SketchPlugin_Offset::JOINT_KEEP_DISTANCE(), const bool theApprox=false)
 Add offset. More...
 
std::shared_ptr< SketchAPI_TranslationaddTranslation (const std::list< std::shared_ptr< ModelAPI_Object > > &theObjects, const ModelHighAPI_RefAttr &thePoint1, const ModelHighAPI_RefAttr &thePoint2, const ModelHighAPI_Integer &theNumberOfObjects, bool theFullValue=false)
 Add translation. More...
 
std::shared_ptr< SketchAPI_RotationaddRotation (const std::list< std::shared_ptr< ModelAPI_Object > > &theObjects, const ModelHighAPI_RefAttr &theCenter, const ModelHighAPI_Double &theAngle, const ModelHighAPI_Integer &theNumberOfObjects, bool theFullValue=false, bool theReversed=false)
 Add rotation. More...
 
std::shared_ptr< ModelHighAPI_InterfaceaddSplit (const ModelHighAPI_Reference &theFeature, const std::shared_ptr< GeomAPI_Pnt2d > &thePositionPoint)
 Add split. More...
 
std::shared_ptr< ModelHighAPI_InterfaceaddTrim (const ModelHighAPI_Reference &theFeature, const std::shared_ptr< GeomAPI_Pnt2d > &thePositionPoint)
 Add trim. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetAngle (const ModelHighAPI_RefAttr &theLine1, const ModelHighAPI_RefAttr &theLine2, const ModelHighAPI_Double &theValue, const std::string &type=std::string())
 Set angle. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetAngleComplementary (const ModelHighAPI_RefAttr &theLine1, const ModelHighAPI_RefAttr &theLine2, const ModelHighAPI_Double &theValue)
 Set complementary angle. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetAngleBackward (const ModelHighAPI_RefAttr &theLine1, const ModelHighAPI_RefAttr &theLine2, const ModelHighAPI_Double &theValue)
 Set backward angle (= 360 - angle) More...
 
std::shared_ptr< ModelHighAPI_InterfacesetCoincident (const ModelHighAPI_RefAttr &thePoint1, const ModelHighAPI_RefAttr &thePoint2)
 Set coincident. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetCollinear (const ModelHighAPI_RefAttr &theLine1, const ModelHighAPI_RefAttr &theLine2)
 Set collinear. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetDistance (const ModelHighAPI_RefAttr &thePoint, const ModelHighAPI_RefAttr &thePointOrLine, const ModelHighAPI_Double &theValue, bool isSigned=false)
 Set distance. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetSignedDistance (const ModelHighAPI_RefAttr &thePoint, const ModelHighAPI_RefAttr &thePointOrLine, const ModelHighAPI_Double &theValue)
 Set signed distance. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetUnsignedDistance (const ModelHighAPI_RefAttr &thePoint, const ModelHighAPI_RefAttr &thePointOrLine, const ModelHighAPI_Double &theValue)
 Set unsigned distance. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetHorizontalDistance (const ModelHighAPI_RefAttr &thePoint1, const ModelHighAPI_RefAttr &thePoint2, const ModelHighAPI_Double &theValue)
 Set horizontal distance. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetVerticalDistance (const ModelHighAPI_RefAttr &thePoint1, const ModelHighAPI_RefAttr &thePoint2, const ModelHighAPI_Double &theValue)
 Set vertical distance. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetEqual (const ModelHighAPI_RefAttr &theObject1, const ModelHighAPI_RefAttr &theObject2)
 Set equal. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetFillet (const ModelHighAPI_RefAttr &thePoint)
 Set fillet. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetFilletWithRadius (const ModelHighAPI_RefAttr &thePoint, const ModelHighAPI_Double &theRadius)
 Set fillet with additional radius constraint. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetFixed (const ModelHighAPI_RefAttr &theObject)
 Set fixed. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetHorizontal (const ModelHighAPI_RefAttr &theLine)
 Set horizontal. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetLength (const ModelHighAPI_RefAttr &theLine, const ModelHighAPI_Double &theValue)
 Set length. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetMiddlePoint (const ModelHighAPI_RefAttr &thePoint, const ModelHighAPI_RefAttr &theLine)
 Set middle. More...
 
std::shared_ptr< SketchAPI_MacroMiddlePointsetMiddlePoint (const ModelHighAPI_RefAttr &theLine)
 Set middle. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetParallel (const ModelHighAPI_RefAttr &theLine1, const ModelHighAPI_RefAttr &theLine2)
 Set parallel. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetPerpendicular (const ModelHighAPI_RefAttr &theLine1, const ModelHighAPI_RefAttr &theLine2)
 Set perpendicular. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetRadius (const ModelHighAPI_RefAttr &theCircleOrArc, const ModelHighAPI_Double &theValue)
 Set radius. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetTangent (const ModelHighAPI_RefAttr &theLine, const ModelHighAPI_RefAttr &theCircle)
 Set tangent. More...
 
std::shared_ptr< ModelHighAPI_InterfacesetVertical (const ModelHighAPI_RefAttr &theLine)
 Set vertical. More...
 
void setValue (const std::shared_ptr< ModelHighAPI_Interface > &theConstraint, const ModelHighAPI_Double &theValue)
 Set constraint value. More...
 
void move (const ModelHighAPI_RefAttr &theMovedEntity, const std::shared_ptr< GeomAPI_Pnt2d > &theTargetPoint)
 Move point or sketch feature. More...
 
void move (const ModelHighAPI_RefAttr &theMovedEntity, double theTargetX, double theTargetY)
 Move point or sketch feature. More...
 
std::shared_ptr< GeomAPI_Pnt2dto2D (const std::shared_ptr< GeomAPI_Pnt > &thePoint)
 
std::list< ModelHighAPI_SelectionselectFace () const
 Select face. More...
 
virtual void dump (ModelHighAPI_Dumper &theDumper) const
 Dump wrapped feature. More...
 
std::shared_ptr< ModelAPI_Featurefeature () const
 Return ModelAPI_Feature. More...
 
std::shared_ptr< ModelHighAPI_InterfacesubFeature (const int theIndex) const
 If feature is composite return intefrace for sub-feature by zero-based index, or empty pointer if feature not composite or does not have sub-feature with such index. More...
 
const std::string & getKind () const
 Shortcut for feature()->getKind() More...
 
void execute (bool isForce=false)
 Shortcut for feature()->execute() More...
 
void setName (const std::wstring &theName)
 Shortcut for feature()->data()->setName() More...
 
std::wstring name () const
 Shortcut for feature()->data()->name() More...
 
virtual ModelHighAPI_Selection result () const
 Return firts object of the feature. More...
 
virtual std::list< ModelHighAPI_Selectionresults () const
 Return all objects of the feature. More...
 
virtual std::shared_ptr< ModelAPI_ResultdefaultResult () const
 Return default result. Default implementation feature()->lastResult() More...
 
void throwException (const std::string &theDescription)
 Throw exception to event loop. More...
 
const std::string & attributeGetter (const std::string &theAttrName)
 Return name of getter for specified attribute. More...
 

Static Public Member Functions

static std::string ID ()
 

Protected Member Functions

bool initialize ()
 
std::shared_ptr< ModelAPI_CompositeFeaturecompositeFeature () const
 

Protected Attributes

std::shared_ptr< GeomDataAPI_Pointmyorigin
 
std::shared_ptr< GeomDataAPI_DirmydirX
 
std::shared_ptr< GeomDataAPI_Dirmynormal
 
std::shared_ptr< ModelAPI_AttributeRefListmyfeatures
 
std::shared_ptr< ModelAPI_AttributeSelectionmyexternal
 
std::shared_ptr< ModelAPI_AttributeStringmysolverError
 
std::shared_ptr< ModelAPI_AttributeStringmysolverDOF
 
std::shared_ptr< ModelAPI_FeaturemyFeature
 feature of this interface More...
 
std::map< std::string, std::string > myAttrGetter
 names of attributes and their getters More...
 

Detailed Description

Interface for Sketch feature.

Constructor & Destructor Documentation

◆ SketchAPI_Sketch() [1/4]

SketchAPI_Sketch::SketchAPI_Sketch ( const std::shared_ptr< ModelAPI_Feature > &  theFeature)
explicit

Constructor without values.

◆ SketchAPI_Sketch() [2/4]

SketchAPI_Sketch::SketchAPI_Sketch ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
const std::shared_ptr< GeomAPI_Ax3 > &  thePlane 
)

Constructor with values.

◆ SketchAPI_Sketch() [3/4]

SketchAPI_Sketch::SketchAPI_Sketch ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
const ModelHighAPI_Selection theExternal 
)

Constructor with values.

◆ SketchAPI_Sketch() [4/4]

SketchAPI_Sketch::SketchAPI_Sketch ( const std::shared_ptr< ModelAPI_Feature > &  theFeature,
std::shared_ptr< ModelAPI_Object thePlaneObject 
)

Constructor with values.

◆ ~SketchAPI_Sketch()

SketchAPI_Sketch::~SketchAPI_Sketch ( )
virtual

Destructor.

Member Function Documentation

◆ origin()

virtual std::shared_ptr< GeomDataAPI_Point > SketchAPI_Sketch::origin ( ) const
inlinevirtual

Origin point.

◆ dirX()

virtual std::shared_ptr< GeomDataAPI_Dir > SketchAPI_Sketch::dirX ( ) const
inlinevirtual

Direction of X.

◆ normal()

virtual std::shared_ptr< GeomDataAPI_Dir > SketchAPI_Sketch::normal ( ) const
inlinevirtual

Normal.

◆ features()

virtual std::shared_ptr< ModelAPI_AttributeRefList > SketchAPI_Sketch::features ( ) const
inlinevirtual

Features.

◆ external()

virtual std::shared_ptr< ModelAPI_AttributeSelection > SketchAPI_Sketch::external ( ) const
inlinevirtual

External.

◆ solverError()

virtual std::shared_ptr< ModelAPI_AttributeString > SketchAPI_Sketch::solverError ( ) const
inlinevirtual

Solver error.

◆ solverDOF()

virtual std::shared_ptr< ModelAPI_AttributeString > SketchAPI_Sketch::solverDOF ( ) const
inlinevirtual

Solver DOF.

◆ setPlane() [1/2]

void SketchAPI_Sketch::setPlane ( const std::shared_ptr< GeomAPI_Ax3 > &  thePlane)

Set plane.

◆ setPlane() [2/2]

void SketchAPI_Sketch::setPlane ( const ModelHighAPI_Selection thePlane,
bool  theRemoveExternalDependency = false 
)

Change sketch plane.

◆ setExternal() [1/2]

void SketchAPI_Sketch::setExternal ( const ModelHighAPI_Selection theExternal)

Set external.

◆ setExternal() [2/2]

void SketchAPI_Sketch::setExternal ( std::shared_ptr< ModelAPI_Object thePlaneObject)

Set external.

◆ changeFacesOrder()

void SketchAPI_Sketch::changeFacesOrder ( const std::list< std::list< ModelHighAPI_Selection > > &  theFaces)

Change order of sketch results (faces)

◆ getFreePoints()

std::list< std::shared_ptr< SketchAPI_Point > > SketchAPI_Sketch::getFreePoints ( )

List points not connected by constraints with other sketch entitites.

◆ addPoint() [1/4]

std::shared_ptr< SketchAPI_Point > SketchAPI_Sketch::addPoint ( double  theX,
double  theY 
)

Add point.

◆ addPoint() [2/4]

std::shared_ptr< SketchAPI_Point > SketchAPI_Sketch::addPoint ( const std::shared_ptr< GeomAPI_Pnt2d > &  thePoint)

Add point.

◆ addPoint() [3/4]

std::shared_ptr< SketchAPI_Point > SketchAPI_Sketch::addPoint ( const ModelHighAPI_Selection theExternal)

Add point.

◆ addPoint() [4/4]

std::shared_ptr< SketchAPI_Point > SketchAPI_Sketch::addPoint ( const std::wstring &  theExternalName)

Add point.

◆ addIntersectionPoint() [1/2]

std::shared_ptr< SketchAPI_IntersectionPoint > SketchAPI_Sketch::addIntersectionPoint ( const ModelHighAPI_Selection theExternal,
bool  theKeepResult = false 
)

Add intersection point.

◆ addIntersectionPoint() [2/2]

std::shared_ptr< SketchAPI_IntersectionPoint > SketchAPI_Sketch::addIntersectionPoint ( const std::wstring &  theExternalName,
bool  theKeepResult = false 
)

Add point.

◆ addLine() [1/4]

std::shared_ptr< SketchAPI_Line > SketchAPI_Sketch::addLine ( double  theX1,
double  theY1,
double  theX2,
double  theY2 
)

Add line.

◆ addLine() [2/4]

std::shared_ptr< SketchAPI_Line > SketchAPI_Sketch::addLine ( const std::shared_ptr< GeomAPI_Pnt2d > &  theStartPoint,
const std::shared_ptr< GeomAPI_Pnt2d > &  theEndPoint 
)

Add line.

◆ addLine() [3/4]

std::shared_ptr< SketchAPI_Line > SketchAPI_Sketch::addLine ( const ModelHighAPI_Selection theExternal)

Add line.

◆ addLine() [4/4]

std::shared_ptr< SketchAPI_Line > SketchAPI_Sketch::addLine ( const std::wstring &  theExternalName)

Add line.

◆ addRectangle() [1/2]

std::shared_ptr< SketchAPI_Rectangle > SketchAPI_Sketch::addRectangle ( double  theX1,
double  theY1,
double  theX2,
double  theY2 
)

Add rectangle.

◆ addRectangle() [2/2]

std::shared_ptr< SketchAPI_Rectangle > SketchAPI_Sketch::addRectangle ( const std::shared_ptr< GeomAPI_Pnt2d > &  theStartPoint,
const std::shared_ptr< GeomAPI_Pnt2d > &  theEndPoint 
)

Add rectangle.

◆ addRectangleCentered()

std::shared_ptr< SketchAPI_Rectangle > SketchAPI_Sketch::addRectangleCentered ( const std::pair< std::shared_ptr< GeomAPI_Pnt2d >, ModelHighAPI_RefAttr > &  theCenter,
const std::pair< std::shared_ptr< GeomAPI_Pnt2d >, ModelHighAPI_RefAttr > &  theCorner 
)

Add rectangle.

◆ addCircle() [1/8]

std::shared_ptr< SketchAPI_Circle > SketchAPI_Sketch::addCircle ( double  theCenterX,
double  theCenterY,
double  theRadius 
)

Add circle.

◆ addCircle() [2/8]

std::shared_ptr< SketchAPI_Circle > SketchAPI_Sketch::addCircle ( const std::shared_ptr< GeomAPI_Pnt2d > &  theCenter,
double  theRadius 
)

Add circle.

◆ addCircle() [3/8]

std::shared_ptr< SketchAPI_MacroCircle > SketchAPI_Sketch::addCircle ( double  theCenterX,
double  theCenterY,
double  thePassedX,
double  thePassedY 
)

Add circle.

◆ addCircle() [4/8]

std::shared_ptr< SketchAPI_MacroCircle > SketchAPI_Sketch::addCircle ( const std::shared_ptr< GeomAPI_Pnt2d > &  theCenterPoint,
const std::shared_ptr< GeomAPI_Pnt2d > &  thePassedPoint 
)

Add circle.

◆ addCircle() [5/8]

std::shared_ptr< SketchAPI_MacroCircle > SketchAPI_Sketch::addCircle ( double  theX1,
double  theY1,
double  theX2,
double  theY2,
double  theX3,
double  theY3 
)

Add circle.

◆ addCircle() [6/8]

std::shared_ptr< SketchAPI_MacroCircle > SketchAPI_Sketch::addCircle ( const std::shared_ptr< GeomAPI_Pnt2d > &  thePoint1,
const std::shared_ptr< GeomAPI_Pnt2d > &  thePoint2,
const std::shared_ptr< GeomAPI_Pnt2d > &  thePoint3 
)

Add circle.

◆ addCircle() [7/8]

std::shared_ptr< SketchAPI_Circle > SketchAPI_Sketch::addCircle ( const ModelHighAPI_Selection theExternal)

Add circle.

◆ addCircle() [8/8]

std::shared_ptr< SketchAPI_Circle > SketchAPI_Sketch::addCircle ( const std::wstring &  theExternalName)

Add circle.

◆ addArc() [1/8]

std::shared_ptr< SketchAPI_Arc > SketchAPI_Sketch::addArc ( double  theCenterX,
double  theCenterY,
double  theStartX,
double  theStartY,
double  theEndX,
double  theEndY,
bool  theInversed 
)

Add arc.

◆ addArc() [2/8]

std::shared_ptr< SketchAPI_Arc > SketchAPI_Sketch::addArc ( const std::shared_ptr< GeomAPI_Pnt2d > &  theCenter,
const std::shared_ptr< GeomAPI_Pnt2d > &  theStart,
const std::shared_ptr< GeomAPI_Pnt2d > &  theEnd,
bool  theInversed 
)

Add arc.

◆ addArc() [3/8]

std::shared_ptr< SketchAPI_MacroArc > SketchAPI_Sketch::addArc ( double  theStartX,
double  theStartY,
double  theEndX,
double  theEndY,
double  thePassedX,
double  thePassedY 
)

Add arc.

◆ addArc() [4/8]

std::shared_ptr< SketchAPI_MacroArc > SketchAPI_Sketch::addArc ( const std::shared_ptr< GeomAPI_Pnt2d > &  theStart,
const std::shared_ptr< GeomAPI_Pnt2d > &  theEnd,
const std::shared_ptr< GeomAPI_Pnt2d > &  thePassed 
)

Add arc.

◆ addArc() [5/8]

std::shared_ptr< SketchAPI_MacroArc > SketchAPI_Sketch::addArc ( const ModelHighAPI_RefAttr theConnectedPoint,
double  theEndX,
double  theEndY,
bool  theInversed,
bool  theTransversal = false 
)

Add transversal/tangent arc.

◆ addArc() [6/8]

std::shared_ptr< SketchAPI_MacroArc > SketchAPI_Sketch::addArc ( const ModelHighAPI_RefAttr theConnectedPoint,
const std::shared_ptr< GeomAPI_Pnt2d > &  theEnd,
bool  theInversed,
bool  theTransversal = false 
)

Add transversal/tangent arc.

◆ addArc() [7/8]

std::shared_ptr< SketchAPI_Arc > SketchAPI_Sketch::addArc ( const ModelHighAPI_Selection theExternal)

Add arc.

◆ addArc() [8/8]

std::shared_ptr< SketchAPI_Arc > SketchAPI_Sketch::addArc ( const std::wstring &  theExternalName)

Add arc.

◆ addEllipse() [1/6]

std::shared_ptr< SketchAPI_Ellipse > SketchAPI_Sketch::addEllipse ( double  theCenterX,
double  theCenterY,
double  theFocusX,
double  theFocusY,
double  theMinorRadius 
)

Add ellipse.

◆ addEllipse() [2/6]

std::shared_ptr< SketchAPI_Ellipse > SketchAPI_Sketch::addEllipse ( const std::shared_ptr< GeomAPI_Pnt2d > &  theCenter,
const std::shared_ptr< GeomAPI_Pnt2d > &  theFocus,
double  theRadius 
)

Add ellipse.

◆ addEllipse() [3/6]

std::shared_ptr< SketchAPI_MacroEllipse > SketchAPI_Sketch::addEllipse ( double  thePoint1X,
double  thePoint1Y,
double  thePoint2X,
double  thePoint2Y,
double  thePassedX,
double  thePassedY,
bool  isPoint1Center = true 
)

Add ellipse.

◆ addEllipse() [4/6]

std::shared_ptr< SketchAPI_MacroEllipse > SketchAPI_Sketch::addEllipse ( const PointOrReference &  thePoint1,
const PointOrReference &  thePoint2,
const PointOrReference &  thePassedPoint,
bool  isPoint1Center = true 
)

Add ellipse.

◆ addEllipse() [5/6]

std::shared_ptr< SketchAPI_Ellipse > SketchAPI_Sketch::addEllipse ( const ModelHighAPI_Selection theExternal)

Add ellipse.

◆ addEllipse() [6/6]

std::shared_ptr< SketchAPI_Ellipse > SketchAPI_Sketch::addEllipse ( const std::wstring &  theExternalName)

Add ellipse.

◆ addEllipticArc() [1/4]

std::shared_ptr< SketchAPI_EllipticArc > SketchAPI_Sketch::addEllipticArc ( double  theCenterX,
double  theCenterY,
double  theFocusX,
double  theFocusY,
double  theStartX,
double  theStartY,
double  theEndX,
double  theEndY,
bool  theInversed = false 
)

Add elliptic arc.

◆ addEllipticArc() [2/4]

std::shared_ptr< SketchAPI_MacroEllipticArc > SketchAPI_Sketch::addEllipticArc ( const PointOrReference &  theCenter,
const PointOrReference &  theMajorAxisPoint,
const PointOrReference &  theStartPoint,
const PointOrReference &  theEndPoint,
bool  theInversed = false 
)

Add elliptic arc.

◆ addEllipticArc() [3/4]

std::shared_ptr< SketchAPI_EllipticArc > SketchAPI_Sketch::addEllipticArc ( const ModelHighAPI_Selection theExternal)

Add elliptic arc.

◆ addEllipticArc() [4/4]

std::shared_ptr< SketchAPI_EllipticArc > SketchAPI_Sketch::addEllipticArc ( const std::wstring &  theExternalName)

Add elliptic arc.

◆ addSpline()

std::shared_ptr< SketchAPI_BSpline > SketchAPI_Sketch::addSpline ( const ModelHighAPI_Selection external = ModelHighAPI_Selection(),
const int  degree = -1,
const std::list< PointOrReference > &  poles = std::list<PointOrReference>(),
const std::list< ModelHighAPI_Double > &  weights = std::list<ModelHighAPI_Double>(),
const std::list< ModelHighAPI_Double > &  knots = std::list<ModelHighAPI_Double>(),
const std::list< ModelHighAPI_Integer > &  multiplicities = std::list<ModelHighAPI_Integer>(),
const bool  periodic = false 
)

Add B-spline.

◆ addInterpolation()

std::shared_ptr< SketchAPI_BSpline > SketchAPI_Sketch::addInterpolation ( const std::list< ModelHighAPI_RefAttr > &  points,
const bool  periodic = false,
const bool  closed = false 
)

Add interpolation feature.

◆ addApproximation()

std::shared_ptr< SketchAPI_BSpline > SketchAPI_Sketch::addApproximation ( const std::list< ModelHighAPI_RefAttr > &  points,
const ModelHighAPI_Double precision = ModelHighAPI_Double(1.e-3),
const bool  periodic = false,
const bool  closed = false 
)

Add approximation feature.

◆ addProjection()

std::shared_ptr< SketchAPI_Projection > SketchAPI_Sketch::addProjection ( const ModelHighAPI_Selection theExternalFeature,
bool  keepResult = false,
bool  keepRefToOriginal = true 
)

Add projection.

◆ addMirror()

std::shared_ptr< SketchAPI_Mirror > SketchAPI_Sketch::addMirror ( const ModelHighAPI_RefAttr theMirrorLine,
const std::list< std::shared_ptr< ModelAPI_Object > > &  theObjects 
)

Add mirror.

◆ addOffset()

std::shared_ptr< SketchAPI_Offset > SketchAPI_Sketch::addOffset ( const std::list< std::shared_ptr< ModelAPI_Object > > &  theObjects,
const ModelHighAPI_Double theValue,
const bool  theReversed = false,
const std::string &  theJointType = SketchPlugin_Offset::JOINT_KEEP_DISTANCE(),
const bool  theApprox = false 
)

Add offset.

◆ addTranslation()

std::shared_ptr< SketchAPI_Translation > SketchAPI_Sketch::addTranslation ( const std::list< std::shared_ptr< ModelAPI_Object > > &  theObjects,
const ModelHighAPI_RefAttr thePoint1,
const ModelHighAPI_RefAttr thePoint2,
const ModelHighAPI_Integer theNumberOfObjects,
bool  theFullValue = false 
)

Add translation.

◆ addRotation()

std::shared_ptr< SketchAPI_Rotation > SketchAPI_Sketch::addRotation ( const std::list< std::shared_ptr< ModelAPI_Object > > &  theObjects,
const ModelHighAPI_RefAttr theCenter,
const ModelHighAPI_Double theAngle,
const ModelHighAPI_Integer theNumberOfObjects,
bool  theFullValue = false,
bool  theReversed = false 
)

Add rotation.

◆ addSplit()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::addSplit ( const ModelHighAPI_Reference theFeature,
const std::shared_ptr< GeomAPI_Pnt2d > &  thePositionPoint 
)

Add split.

◆ addTrim()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::addTrim ( const ModelHighAPI_Reference theFeature,
const std::shared_ptr< GeomAPI_Pnt2d > &  thePositionPoint 
)

Add trim.

◆ setAngle()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setAngle ( const ModelHighAPI_RefAttr theLine1,
const ModelHighAPI_RefAttr theLine2,
const ModelHighAPI_Double theValue,
const std::string &  type = std::string() 
)

Set angle.

◆ setAngleComplementary()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setAngleComplementary ( const ModelHighAPI_RefAttr theLine1,
const ModelHighAPI_RefAttr theLine2,
const ModelHighAPI_Double theValue 
)

Set complementary angle.

◆ setAngleBackward()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setAngleBackward ( const ModelHighAPI_RefAttr theLine1,
const ModelHighAPI_RefAttr theLine2,
const ModelHighAPI_Double theValue 
)

Set backward angle (= 360 - angle)

◆ setCoincident()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setCoincident ( const ModelHighAPI_RefAttr thePoint1,
const ModelHighAPI_RefAttr thePoint2 
)

Set coincident.

◆ setCollinear()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setCollinear ( const ModelHighAPI_RefAttr theLine1,
const ModelHighAPI_RefAttr theLine2 
)

Set collinear.

◆ setDistance()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setDistance ( const ModelHighAPI_RefAttr thePoint,
const ModelHighAPI_RefAttr thePointOrLine,
const ModelHighAPI_Double theValue,
bool  isSigned = false 
)

Set distance.

◆ setSignedDistance()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setSignedDistance ( const ModelHighAPI_RefAttr thePoint,
const ModelHighAPI_RefAttr thePointOrLine,
const ModelHighAPI_Double theValue 
)

Set signed distance.

◆ setUnsignedDistance()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setUnsignedDistance ( const ModelHighAPI_RefAttr thePoint,
const ModelHighAPI_RefAttr thePointOrLine,
const ModelHighAPI_Double theValue 
)

Set unsigned distance.

◆ setHorizontalDistance()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setHorizontalDistance ( const ModelHighAPI_RefAttr thePoint1,
const ModelHighAPI_RefAttr thePoint2,
const ModelHighAPI_Double theValue 
)

Set horizontal distance.

◆ setVerticalDistance()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setVerticalDistance ( const ModelHighAPI_RefAttr thePoint1,
const ModelHighAPI_RefAttr thePoint2,
const ModelHighAPI_Double theValue 
)

Set vertical distance.

◆ setEqual()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setEqual ( const ModelHighAPI_RefAttr theObject1,
const ModelHighAPI_RefAttr theObject2 
)

Set equal.

◆ setFillet()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setFillet ( const ModelHighAPI_RefAttr thePoint)

Set fillet.

◆ setFilletWithRadius()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setFilletWithRadius ( const ModelHighAPI_RefAttr thePoint,
const ModelHighAPI_Double theRadius 
)

Set fillet with additional radius constraint.

◆ setFixed()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setFixed ( const ModelHighAPI_RefAttr theObject)

Set fixed.

◆ setHorizontal()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setHorizontal ( const ModelHighAPI_RefAttr theLine)

Set horizontal.

◆ setLength()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setLength ( const ModelHighAPI_RefAttr theLine,
const ModelHighAPI_Double theValue 
)

Set length.

◆ setMiddlePoint() [1/2]

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setMiddlePoint ( const ModelHighAPI_RefAttr thePoint,
const ModelHighAPI_RefAttr theLine 
)

Set middle.

◆ setMiddlePoint() [2/2]

std::shared_ptr< SketchAPI_MacroMiddlePoint > SketchAPI_Sketch::setMiddlePoint ( const ModelHighAPI_RefAttr theLine)

Set middle.

◆ setParallel()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setParallel ( const ModelHighAPI_RefAttr theLine1,
const ModelHighAPI_RefAttr theLine2 
)

Set parallel.

◆ setPerpendicular()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setPerpendicular ( const ModelHighAPI_RefAttr theLine1,
const ModelHighAPI_RefAttr theLine2 
)

Set perpendicular.

◆ setRadius()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setRadius ( const ModelHighAPI_RefAttr theCircleOrArc,
const ModelHighAPI_Double theValue 
)

Set radius.

◆ setTangent()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setTangent ( const ModelHighAPI_RefAttr theLine,
const ModelHighAPI_RefAttr theCircle 
)

Set tangent.

◆ setVertical()

std::shared_ptr< ModelHighAPI_Interface > SketchAPI_Sketch::setVertical ( const ModelHighAPI_RefAttr theLine)

Set vertical.

◆ setValue()

void SketchAPI_Sketch::setValue ( const std::shared_ptr< ModelHighAPI_Interface > &  theConstraint,
const ModelHighAPI_Double theValue 
)

Set constraint value.

◆ move() [1/2]

void SketchAPI_Sketch::move ( const ModelHighAPI_RefAttr theMovedEntity,
const std::shared_ptr< GeomAPI_Pnt2d > &  theTargetPoint 
)

Move point or sketch feature.

◆ move() [2/2]

void SketchAPI_Sketch::move ( const ModelHighAPI_RefAttr theMovedEntity,
double  theTargetX,
double  theTargetY 
)

Move point or sketch feature.

◆ selectFace()

std::list< ModelHighAPI_Selection > SketchAPI_Sketch::selectFace ( ) const

Select face.

◆ dump()

void SketchAPI_Sketch::dump ( ModelHighAPI_Dumper theDumper) const
virtual

Dump wrapped feature.

Reimplemented from ModelHighAPI_Interface.

◆ feature()

std::shared_ptr< ModelAPI_Feature > ModelHighAPI_Interface::feature ( ) const
inherited

◆ subFeature()

std::shared_ptr< ModelHighAPI_Interface > ModelHighAPI_Interface::subFeature ( const int  theIndex) const
inherited

If feature is composite return intefrace for sub-feature by zero-based index, or empty pointer if feature not composite or does not have sub-feature with such index.

◆ getKind()

const std::string & ModelHighAPI_Interface::getKind ( ) const
inherited

Shortcut for feature()->getKind()

◆ execute()

void ModelHighAPI_Interface::execute ( bool  isForce = false)
inherited

Shortcut for feature()->execute()

Parameters
isForcestart execution of feature instead of sending events

◆ setName()

void ModelHighAPI_Interface::setName ( const std::wstring &  theName)
inherited

Shortcut for feature()->data()->setName()

◆ name()

std::wstring ModelHighAPI_Interface::name ( ) const
inherited

Shortcut for feature()->data()->name()

◆ result()

ModelHighAPI_Selection ModelHighAPI_Interface::result ( ) const
virtualinherited

Return firts object of the feature.

◆ results()

std::list< ModelHighAPI_Selection > ModelHighAPI_Interface::results ( ) const
virtualinherited

Return all objects of the feature.

◆ defaultResult()

std::shared_ptr< ModelAPI_Result > ModelHighAPI_Interface::defaultResult ( ) const
virtualinherited

Return default result. Default implementation feature()->lastResult()

◆ throwException()

void ModelHighAPI_Interface::throwException ( const std::string &  theDescription)
inherited

Throw exception to event loop.

◆ attributeGetter()

const std::string & ModelHighAPI_Interface::attributeGetter ( const std::string &  theAttrName)
inherited

Return name of getter for specified attribute.

Field Documentation

◆ myFeature

std::shared_ptr<ModelAPI_Feature> ModelHighAPI_Interface::myFeature
protectedinherited

feature of this interface

◆ myAttrGetter

std::map<std::string, std::string> ModelHighAPI_Interface::myAttrGetter
protectedinherited

names of attributes and their getters