SketchAPI.h
SketchAPI_Arc.h
SketchAPI_Circle.h
+ SketchAPI_IntersectionPoint.h
SketchAPI_Line.h
SketchAPI_Mirror.h
SketchAPI_Sketch.h
SET(PROJECT_SOURCES
SketchAPI_Arc.cpp
SketchAPI_Circle.cpp
+ SketchAPI_IntersectionPoint.cpp
SketchAPI_Line.cpp
SketchAPI_Mirror.cpp
SketchAPI_Sketch.cpp
// shared pointers
%shared_ptr(SketchAPI_Arc)
%shared_ptr(SketchAPI_Circle)
+%shared_ptr(SketchAPI_IntersectionPoint)
%shared_ptr(SketchAPI_Line)
%shared_ptr(SketchAPI_Mirror)
%shared_ptr(SketchAPI_Sketch)
// all supported interfaces (the order is very important according dependencies: base class first)
%include "SketchAPI_SketchEntity.h"
%include "SketchAPI_Point.h"
+%include "SketchAPI_IntersectionPoint.h"
%include "SketchAPI_Line.h"
%include "SketchAPI_Circle.h"
%include "SketchAPI_Arc.h"
--- /dev/null
+// Name : SketchAPI_IntersectionPoint.cpp
+// Purpose:
+//
+// History:
+// 15/06/16 - Sergey POKHODENKO - Creation of the file
+
+//--------------------------------------------------------------------------------------
+#include "SketchAPI_IntersectionPoint.h"
+//--------------------------------------------------------------------------------------
+#include <GeomAPI_Pnt2d.h>
+//--------------------------------------------------------------------------------------
+#include <ModelHighAPI_Selection.h>
+#include <ModelHighAPI_Tools.h>
+//--------------------------------------------------------------------------------------
+SketchAPI_IntersectionPoint::SketchAPI_IntersectionPoint(
+ const std::shared_ptr<ModelAPI_Feature> & theFeature)
+: SketchAPI_SketchEntity(theFeature)
+{
+ initialize();
+}
+
+SketchAPI_IntersectionPoint::SketchAPI_IntersectionPoint(
+ const std::shared_ptr<ModelAPI_Feature> & theFeature,
+ const ModelHighAPI_Selection & theExternal )
+: SketchAPI_SketchEntity(theFeature)
+{
+ if (initialize()) {
+ setByExternalLine(theExternal);
+ }
+}
+
+SketchAPI_IntersectionPoint::SketchAPI_IntersectionPoint(
+ const std::shared_ptr<ModelAPI_Feature> & theFeature,
+ const std::string & theExternalName )
+: SketchAPI_SketchEntity(theFeature)
+{
+ if (initialize()) {
+ setByExternalLineName(theExternalName);
+ }
+}
+
+SketchAPI_IntersectionPoint::~SketchAPI_IntersectionPoint()
+{
+
+}
+
+//--------------------------------------------------------------------------------------
+void SketchAPI_IntersectionPoint::setByExternalLine(const ModelHighAPI_Selection & theExternalLine)
+{
+ fillAttribute(theExternalLine, externalLine());
+
+ execute();
+}
+
+void SketchAPI_IntersectionPoint::setByExternalLineName(const std::string & theExternalLineName)
+{
+ fillAttribute(ModelHighAPI_Selection("EDGE", theExternalLineName), externalLine());
+
+ execute();
+}
+
+//--------------------------------------------------------------------------------------
--- /dev/null
+// Name : SketchAPI_IntersectionPoint.h
+// Purpose:
+//
+// History:
+// 15/06/16 - Sergey POKHODENKO - Creation of the file
+
+#ifndef SRC_SKETCHAPI_SKETCHAPI_INTERSECTIONPOINT_H_
+#define SRC_SKETCHAPI_SKETCHAPI_INTERSECTIONPOINT_H_
+
+//--------------------------------------------------------------------------------------
+#include "SketchAPI.h"
+
+#include <SketchPlugin_IntersectionPoint.h>
+
+#include "SketchAPI_SketchEntity.h"
+//--------------------------------------------------------------------------------------
+class ModelHighAPI_Selection;
+//--------------------------------------------------------------------------------------
+/**\class SketchAPI_IntersectionPoint
+ * \ingroup CPPHighAPI
+ * \brief Interface for IntersectionPoint feature
+ */
+class SketchAPI_IntersectionPoint : public SketchAPI_SketchEntity
+{
+public:
+ /// Constructor without values
+ SKETCHAPI_EXPORT
+ explicit SketchAPI_IntersectionPoint(const std::shared_ptr<ModelAPI_Feature> & theFeature);
+ /// Constructor with values
+ SKETCHAPI_EXPORT
+ SketchAPI_IntersectionPoint(const std::shared_ptr<ModelAPI_Feature> & theFeature,
+ const ModelHighAPI_Selection & theExternal);
+ /// Constructor with values
+ SKETCHAPI_EXPORT
+ SketchAPI_IntersectionPoint(const std::shared_ptr<ModelAPI_Feature> & theFeature,
+ const std::string & theExternalName);
+ /// Destructor
+ SKETCHAPI_EXPORT
+ virtual ~SketchAPI_IntersectionPoint();
+
+ INTERFACE_2(SketchPlugin_IntersectionPoint::ID(),
+ coordinates, SketchPlugin_IntersectionPoint::COORD_ID(), GeomDataAPI_Point2D, /** IntersectionPoint coordinates */,
+ externalLine, SketchPlugin_IntersectionPoint::EXTERNAL_LINE_ID(), ModelAPI_AttributeSelection, /** External line */
+ )
+
+ /// Set by external
+ SKETCHAPI_EXPORT
+ void setByExternalLine(const ModelHighAPI_Selection & theExternalLine);
+
+ /// Set by external name
+ SKETCHAPI_EXPORT
+ void setByExternalLineName(const std::string & theExternalLineName);
+};
+
+//! Pointer on IntersectionPoint object
+typedef std::shared_ptr<SketchAPI_IntersectionPoint> IntersectionPointPtr;
+
+//--------------------------------------------------------------------------------------
+//--------------------------------------------------------------------------------------
+#endif /* SRC_SKETCHAPI_SKETCHAPI_INTERSECTIONPOINT_H_ */
#include "SketchAPI.h"
#include "SketchAPI_Arc.h"
#include "SketchAPI_Circle.h"
+ #include "SketchAPI_IntersectionPoint.h"
#include "SketchAPI_Line.h"
#include "SketchAPI_Mirror.h"
#include "SketchAPI_Sketch.h"