20 #ifndef ConstructionPlugin_Point_H_
21 #define ConstructionPlugin_Point_H_
23 #include "ConstructionPlugin.h"
25 #include <GeomAPI_ICustomPrs.h>
26 #include <ModelAPI_Feature.h>
27 #include <ModelAPI_Result.h>
40 CONSTRUCTIONPLUGIN_EXPORT
virtual const std::string&
getKind();
45 static const std::string POINT_COLOR(
"85,85,0");
52 static const std::string POINT_COLOR_NAME(
"construction_point_color");
53 return POINT_COLOR_NAME;
58 inline static const std::string&
ID()
60 static const std::string CONSTRUCTION_POINT_KIND(
"Point");
61 return CONSTRUCTION_POINT_KIND;
67 static const std::string MY_CREATION_METHOD_ID(
"creation_method");
68 return MY_CREATION_METHOD_ID;
74 static const std::string MY_CREATION_METHOD_ID(
"by_xyz");
75 return MY_CREATION_METHOD_ID;
81 static const std::string MY_CREATION_METHOD_ID(
"by_distance_on_edge");
82 return MY_CREATION_METHOD_ID;
88 static const std::string MY_CREATION_METHOD_ID(
"by_projection");
89 return MY_CREATION_METHOD_ID;
95 static const std::string MY_CREATION_METHOD_ID(
"by_intersection");
96 return MY_CREATION_METHOD_ID;
102 static const std::string MY_CREATION_METHOD_ID(
"by_geometrical_property");
103 return MY_CREATION_METHOD_ID;
106 inline static const std::string& POINT3D()
108 static const std::string POINT_ATTR(
"point3d");
113 inline static const std::string&
EDGE()
115 static const std::string ATTR_ID(
"edge");
122 static const std::string ATTR_ID(
"offset_type");
129 static const std::string ATTR_ID(
"offset_type_by_distance");
136 static const std::string ATTR_ID(
"offset_type_by_ratio");
143 static const std::string ATTR_ID(
"distance");
148 inline static const std::string&
RATIO()
150 static const std::string ATTR_ID(
"ratio");
157 static const std::string ATTR_ID(
"reverse");
164 static const std::string ATTR_ID(
"point_to_project");
171 static const std::string ATTR_ID(
"projection_type");
178 static const std::string ATTR_ID(
"projection_type_on_edge");
185 static const std::string ATTR_ID(
"projection_type_on_face");
192 static const std::string ATTR_ID(
"edge_for_point_projection");
199 static const std::string ATTR_ID(
"face_for_point_projection");
206 static const std::string ATTR_ID(
"intersection_type");
213 static const std::string MY_CREATION_METHOD_ID(
"intersection_type_by_lines");
214 return MY_CREATION_METHOD_ID;
220 static const std::string MY_CREATION_METHOD_ID(
"intersection_type_by_line_and_plane");
221 return MY_CREATION_METHOD_ID;
227 static const std::string MY_CREATION_METHOD_ID(
"intersection_type_by_planes");
228 return MY_CREATION_METHOD_ID;
234 static const std::string ATTR_ID(
"intersection_line_1");
241 static const std::string ATTR_ID(
"intersection_line_2");
248 static const std::string ATTR_ID(
"intersection_line");
255 static const std::string ATTR_ID(
"intersection_plane");
262 static const std::string ATTR_ID(
"use_offset");
267 inline static const std::string&
OFFSET()
269 static const std::string ATTR_ID(
"offset");
276 static const std::string ATTR_ID(
"reverse_offset");
283 static const std::string ATTR_ID(
"intersection_plane_1");
290 static const std::string ATTR_ID(
"intersection_plane_2");
297 static const std::string ATTR_ID(
"intersection_plane_3");
304 static const std::string ATTR_ID(
"geometrical_property_type");
311 static const std::string PROPERTY_TYPE(
"geometrical_property_type_by_center_of_gravity");
312 return PROPERTY_TYPE;
318 static const std::string PROPERTY_TYPE(
"geometrical_property_type_by_center_of_circle");
319 return PROPERTY_TYPE;
325 static const std::string ATTR_ID(
"object_for_center_of_gravity");
332 static const std::string ATTR_ID(
"object_for_center_of_circle");
337 CONSTRUCTIONPLUGIN_EXPORT
virtual void execute();
349 std::shared_ptr<GeomAPI_Vertex> createByXYZ();
350 std::shared_ptr<GeomAPI_Vertex> createByDistanceOnEdge();
351 std::shared_ptr<GeomAPI_Vertex> createByProjectionOnEdge();
352 std::shared_ptr<GeomAPI_Vertex> createByProjectionOnFace();
353 std::shared_ptr<GeomAPI_Vertex> createByLinesIntersection();
354 std::list<std::shared_ptr<GeomAPI_Vertex> > createByLineAndPlaneIntersection();
355 std::shared_ptr<GeomAPI_Vertex> createByPlanesIntersection();
356 std::shared_ptr<GeomAPI_Vertex> createByCenterOfGravity();
357 std::shared_ptr<GeomAPI_Vertex> createByCenterOfCircle();
Feature for creation of the new part in PartSet.
Definition: ConstructionPlugin_Point.h:37
virtual void execute()
Creates a new part document if needed.
Definition: ConstructionPlugin_Point.cpp:93
virtual void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: ConstructionPlugin_Point.cpp:56
static const std::string & POINT_TO_PROJECT()
Attribute name for point to projection.
Definition: ConstructionPlugin_Point.h:162
static const std::string & RATIO()
Attribute name for percent flag.
Definition: ConstructionPlugin_Point.h:148
static const std::string & INTERSECTION_TYPE_BY_LINES()
Attribute name for intersection type by lines.
Definition: ConstructionPlugin_Point.h:211
static const std::string & COLOR_NAME()
Default color property name.
Definition: ConstructionPlugin_Point.h:50
static const std::string & INTERSECTION_LINE()
Attribute name for selected intersection line.
Definition: ConstructionPlugin_Point.h:246
static const std::string & REVERSE_OFFSET()
Attribute name for reverse offset for the intersection plane.
Definition: ConstructionPlugin_Point.h:274
ConstructionPlugin_Point()
Use plugin manager for features creation.
Definition: ConstructionPlugin_Point.cpp:44
static const std::string & EDGE_FOR_POINT_PROJECTION()
Attribute name for edge for point projection.
Definition: ConstructionPlugin_Point.h:190
static const std::string & INTERSECTION_LINE_2()
Attribute name for selected second intersection line.
Definition: ConstructionPlugin_Point.h:239
static const std::string & OFFSET()
Attribute name for offset for the intersection plane.
Definition: ConstructionPlugin_Point.h:267
static const std::string & INTERSECTION_PLANE_2()
Attribute name for selected intersection plane.
Definition: ConstructionPlugin_Point.h:288
static const std::string & PROJECTION_TYPE()
Attribute name for projection type.
Definition: ConstructionPlugin_Point.h:169
static const std::string & GEOMETRICAL_PROPERTY_TYPE()
Attribute name for property type.
Definition: ConstructionPlugin_Point.h:302
virtual const std::string & getKind()
Returns the kind of a feature.
Definition: ConstructionPlugin_Point.cpp:49
static const std::string & INTERSECTION_PLANE_1()
Attribute name for selected intersection plane.
Definition: ConstructionPlugin_Point.h:281
static const std::string & OFFSET_TYPE()
Attribute name for offset type on selected edge.
Definition: ConstructionPlugin_Point.h:120
static const std::string & GEOMETRICAL_PROPERTY_TYPE_BY_CENTER_OF_GRAVITY()
Attribute name for property type by center of gravity.
Definition: ConstructionPlugin_Point.h:309
static const std::string & DISTANCE()
Attribute name for distance.
Definition: ConstructionPlugin_Point.h:141
static const std::string & OFFSET_TYPE_BY_DISTANCE()
Attribute name for offset type by distance.
Definition: ConstructionPlugin_Point.h:127
static const std::string & INTERSECTION_TYPE_BY_PLANES()
Attribute name for intersection type by planes.
Definition: ConstructionPlugin_Point.h:225
static const std::string & INTERSECTION_TYPE()
Attribute name for intersection type.
Definition: ConstructionPlugin_Point.h:204
static const std::string & REVERSE()
Attribute name for reverse flag.
Definition: ConstructionPlugin_Point.h:155
static const std::string & OBJECT_FOR_CENTER_OF_GRAVITY()
Attribute name for selected object for center of gravity.
Definition: ConstructionPlugin_Point.h:323
static const std::string & USE_OFFSET()
Attribute name for use offset for the intersection plane.
Definition: ConstructionPlugin_Point.h:260
static const std::string & GEOMETRICAL_PROPERTY_TYPE_BY_CENTER_OF_CIRCLE()
Attribute name for property type by center of circle.
Definition: ConstructionPlugin_Point.h:316
static const std::string & ID()
Point kind.
Definition: ConstructionPlugin_Point.h:58
static const std::string & FACE_FOR_POINT_PROJECTION()
Attribute name for face for point projection.
Definition: ConstructionPlugin_Point.h:197
static const std::string & OBJECT_FOR_CENTER_OF_CIRCLE()
Attribute name for selected object for center of cricle.
Definition: ConstructionPlugin_Point.h:330
static const std::string & OFFSET_TYPE_BY_RATIO()
Attribute name for offset type by ratio.
Definition: ConstructionPlugin_Point.h:134
static const std::string & PROJECTION_TYPE_ON_FACE()
Attribute name for projection type on face.
Definition: ConstructionPlugin_Point.h:183
virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs)
Customize presentation of the feature.
Definition: ConstructionPlugin_Point.cpp:156
static const std::string & INTERSECTION_TYPE_BY_LINE_AND_PLANE()
Attribute name for intersection type by line and plane.
Definition: ConstructionPlugin_Point.h:218
static const std::string & CREATION_METHOD_BY_INTERSECTION()
Attribute name for creation method.
Definition: ConstructionPlugin_Point.h:93
static const std::string & CREATION_METHOD_BY_PROJECTION()
Attribute name for creation method.
Definition: ConstructionPlugin_Point.h:86
static const std::string & CREATION_METHOD()
Attribute name for creation method.
Definition: ConstructionPlugin_Point.h:65
static const std::string & PROJECTION_TYPE_ON_EDGE()
Attribute name for projection type on edge.
Definition: ConstructionPlugin_Point.h:176
static const std::string & INTERSECTION_LINE_1()
Attribute name for selected first intersection line.
Definition: ConstructionPlugin_Point.h:232
static const std::string & DEFAULT_COLOR()
Default color for a point.
Definition: ConstructionPlugin_Point.h:43
static const std::string & INTERSECTION_PLANE_3()
Attribute name for selected intersection plane.
Definition: ConstructionPlugin_Point.h:295
static const std::string & INTERSECTION_PLANE()
Attribute name for selected intersection plane.
Definition: ConstructionPlugin_Point.h:253
static const std::string & CREATION_METHOD_BY_XYZ()
Attribute name for creation method.
Definition: ConstructionPlugin_Point.h:72
static const std::string & CREATION_METHOD_BY_DISTANCE_ON_EDGE()
Attribute name for creation method.
Definition: ConstructionPlugin_Point.h:79
static const std::string & CREATION_METHOD_BY_GEOMETRICAL_PROPERTY()
Attribute name for creation method.
Definition: ConstructionPlugin_Point.h:100
static const std::string & EDGE()
Attribute name for selected edge.
Definition: ConstructionPlugin_Point.h:113
Interface of a class which can provide specific customization of object presentation.
Definition: GeomAPI_ICustomPrs.h:37
Interface to the vertex object.
Definition: GeomAPI_Vertex.h:31
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:41