} else if (aType1 == GeomAPI_Shape::VERTEX && aType2 == GeomAPI_Shape::EDGE) {
// If first object is vertex and second object is edge then set by projection.
setByProjectionOnEdge(theObject1, theObject2);
- } /* else if(aType1 == GeomAPI_Shape::EDGE && aType2 == GeomAPI_Shape::EDGE) {
+ } else if(aType1 == GeomAPI_Shape::EDGE && aType2 == GeomAPI_Shape::EDGE) {
// If both objects are edges then set by lines intersection.
setByLinesIntersection(theObject1, theObject2);
- } */ else if(aType1 == GeomAPI_Shape::EDGE && aType2 == GeomAPI_Shape::FACE) {
+ } else if(aType1 == GeomAPI_Shape::EDGE && aType2 == GeomAPI_Shape::FACE) {
// If first object is edge and second object is face then set by line and plane intersection.
setByLineAndPlaneIntersection(theObject1, theObject2);
}
}
}
+//==================================================================================================
+ConstructionAPI_Point::ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const ModelHighAPI_Selection& theObject1,
+ const ModelHighAPI_Selection& theObject2,
+ const ModelHighAPI_Selection& theObject3)
+: ModelHighAPI_Interface(theFeature)
+{
+ if (initialize())
+ {
+ GeomAPI_Shape::ShapeType aType1 = getShapeType(theObject1);
+ GeomAPI_Shape::ShapeType aType2 = getShapeType(theObject2);
+ GeomAPI_Shape::ShapeType aType3 = getShapeType(theObject3);
+ if (aType1 == GeomAPI_Shape::FACE
+ && aType2 == GeomAPI_Shape::FACE
+ && aType3 == GeomAPI_Shape::FACE)
+ {
+ setByPlanesIntersection(theObject1, theObject2, theObject3);
+ }
+ }
+}
+
//==================================================================================================
ConstructionAPI_Point::~ConstructionAPI_Point()
{
execute();
}
-/*
//==================================================================================================
void ConstructionAPI_Point::setByLinesIntersection(const ModelHighAPI_Selection& theEdge1,
const ModelHighAPI_Selection& theEdge2)
{
- fillAttribute(ConstructionPlugin_Point::CREATION_METHOD_BY_LINES_INTERSECTION(), mycreationMethod);
- fillAttribute(theEdge1, myfirstLine);
- fillAttribute(theEdge2, mysecondLine);
+ fillAttribute(ConstructionPlugin_Point::CREATION_METHOD_BY_INTERSECTION(), mycreationMethod);
+ fillAttribute(ConstructionPlugin_Point::INTERSECTION_TYPE_BY_LINES(),
+ myintersectionType);
+ fillAttribute(theEdge1, myintersectionLine1);
+ fillAttribute(theEdge2, myintersectionLine2);
execute();
}
-*/
//==================================================================================================
void ConstructionAPI_Point::setByLineAndPlaneIntersection(const ModelHighAPI_Selection& theEdge,
const ModelHighAPI_Selection& theFace)
{
- fillAttribute(
- ConstructionPlugin_Point::CREATION_METHOD_BY_LINE_AND_PLANE_INTERSECTION(), mycreationMethod);
+ fillAttribute(ConstructionPlugin_Point::CREATION_METHOD_BY_INTERSECTION(), mycreationMethod);
+ fillAttribute(ConstructionPlugin_Point::INTERSECTION_TYPE_BY_LINE_AND_PLANE(),
+ myintersectionType);
fillAttribute(theEdge, myintersectionLine);
fillAttribute(theFace, myintersectionPlane);
fillAttribute("", useOffset()); // not used by default
execute();
}
+//==================================================================================================
+void ConstructionAPI_Point::setByPlanesIntersection(const ModelHighAPI_Selection& theFace1,
+ const ModelHighAPI_Selection& theFace2,
+ const ModelHighAPI_Selection& theFace3)
+{
+ fillAttribute(ConstructionPlugin_Point::CREATION_METHOD_BY_INTERSECTION(), mycreationMethod);
+ fillAttribute(ConstructionPlugin_Point::INTERSECTION_TYPE_BY_PLANES(),
+ myintersectionType);
+ fillAttribute(theFace1, myintersectionPlane1);
+ fillAttribute(theFace2, myintersectionPlane2);
+ fillAttribute(theFace3, myintersectionPlane3);
+
+ execute();
+}
+
//==================================================================================================
void ConstructionAPI_Point::dump(ModelHighAPI_Dumper& theDumper) const
{
FeaturePtr aBase = feature();
const std::string& aDocName = theDumper.name(aBase->document());
- const std::string& aMeth = creationMethod()->value();
+ const std::string aMeth = creationMethod()->value();
// common part
theDumper << aBase << " = model.addPoint(" << aDocName << ", ";
if (aMeth == "" || // default is XYZ
aMeth == ConstructionPlugin_Point::CREATION_METHOD_BY_XYZ()) {
theDumper << x() << ", " << y() << ", " << z();
- } else if (aMeth == ConstructionPlugin_Point::CREATION_METHOD_BY_LINE_AND_PLANE_INTERSECTION()) {
- theDumper << intersectionLine() << ", " <<intersectionPlane() ;
- if (!useOffset()->value().empty()) { // call method with defined offset
- theDumper << ", " << offset() << ", " << reverseOffset();
+ } else if (aMeth == ConstructionPlugin_Point::CREATION_METHOD_BY_INTERSECTION()) {
+ const std::string anIntersectionType = intersectionType()->value();
+ if (anIntersectionType == ConstructionPlugin_Point::INTERSECTION_TYPE_BY_LINES())
+ {
+ theDumper << intersectionLine1() << ", " << intersectionLine2();
+ }
+ else if (anIntersectionType == ConstructionPlugin_Point::INTERSECTION_TYPE_BY_LINE_AND_PLANE())
+ {
+ theDumper << intersectionLine() << ", " << intersectionPlane();
+ if (!useOffset()->value().empty()) { // call method with defined offset
+ theDumper << ", " << offset() << ", " << reverseOffset();
+ }
+ }
+ else if (anIntersectionType == ConstructionPlugin_Point::INTERSECTION_TYPE_BY_PLANES())
+ {
+ theDumper << intersectionPlane1() << ", "
+ << intersectionPlane2() << ", "
+ << intersectionPlane3();
}
} else if (aMeth == ConstructionPlugin_Point::CREATION_METHOD_BY_DISTANCE_ON_EDGE()) {
theDumper << edge() << ", ";
return anAPI;
}
+
+//==================================================================================================
+PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
+ const ModelHighAPI_Selection& theObject1,
+ const ModelHighAPI_Selection& theObject2,
+ const ModelHighAPI_Selection& theObject3)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(ConstructionAPI_Point::ID());
+ return PointPtr(new ConstructionAPI_Point(aFeature, theObject1, theObject2, theObject3));
+}
const ModelHighAPI_Selection& theObject1,
const ModelHighAPI_Selection& theObject2);
+ /// Constructor with values: intersected objects.
+ CONSTRUCTIONAPI_EXPORT
+ ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const ModelHighAPI_Selection& theObject1,
+ const ModelHighAPI_Selection& theObject2,
+ const ModelHighAPI_Selection& theObject3);
+
/// Destructor.
CONSTRUCTIONAPI_EXPORT
virtual ~ConstructionAPI_Point();
- INTERFACE_18(ConstructionPlugin_Point::ID(),
+ INTERFACE_24(ConstructionPlugin_Point::ID(),
x, ConstructionPlugin_Point::X(), ModelAPI_AttributeDouble, /** X attribute */,
y, ConstructionPlugin_Point::Y(), ModelAPI_AttributeDouble, /** Y attribute */,
z, ConstructionPlugin_Point::Z(), ModelAPI_AttributeDouble, /** Z attribute */,
creationMethod, ConstructionPlugin_Point::CREATION_METHOD(),
ModelAPI_AttributeString, /** Creation method */,
+ intersectionType, ConstructionPlugin_Point::INTERSECTION_TYPE(),
+ ModelAPI_AttributeString, /** Type of the intersection */,
+ intersectionLine1, ConstructionPlugin_Point::INTERSECTION_LINE_1(),
+ ModelAPI_AttributeSelection, /** Line for intersection */,
+ intersectionLine2, ConstructionPlugin_Point::INTERSECTION_LINE_2(),
+ ModelAPI_AttributeSelection, /** Line for intersection */,
intersectionLine, ConstructionPlugin_Point::INTERSECTION_LINE(),
ModelAPI_AttributeSelection, /** Line for intersection */,
intersectionPlane, ConstructionPlugin_Point::INTERSECTION_PLANE(),
ModelAPI_AttributeSelection, /** Plane for intersection */,
+ intersectionPlane1, ConstructionPlugin_Point::INTERSECTION_PLANE_1(),
+ ModelAPI_AttributeSelection, /** Plane for intersection */,
+ intersectionPlane2, ConstructionPlugin_Point::INTERSECTION_PLANE_2(),
+ ModelAPI_AttributeSelection, /** Plane for intersection */,
+ intersectionPlane3, ConstructionPlugin_Point::INTERSECTION_PLANE_3(),
+ ModelAPI_AttributeSelection, /** Plane for intersection */,
useOffset, ConstructionPlugin_Point::USE_OFFSET(),
ModelAPI_AttributeString, /** Use offset */,
offset, ConstructionPlugin_Point::OFFSET(),
void setByProjectionOnFace(const ModelHighAPI_Selection& theVertex,
const ModelHighAPI_Selection& theFace);
- /*
/// Set lines for intersections.
CONSTRUCTIONAPI_EXPORT
void setByLinesIntersection(const ModelHighAPI_Selection& theEdge1,
const ModelHighAPI_Selection& theEdge2);
- */
/// Set line and plane for intersections.
CONSTRUCTIONAPI_EXPORT
void setByLineAndPlaneIntersection(const ModelHighAPI_Selection& theEdge,
const ModelHighAPI_Selection& theFace);
+ /// Set faces for intersections.
+ CONSTRUCTIONAPI_EXPORT
+ void setByPlanesIntersection(const ModelHighAPI_Selection& theFace1,
+ const ModelHighAPI_Selection& theFace2,
+ const ModelHighAPI_Selection& theFace3);
+
/// Dump wrapped feature
CONSTRUCTIONAPI_EXPORT
virtual void dump(ModelHighAPI_Dumper& theDumper) const;
const ModelHighAPI_Double& theDistanceValue,
const bool theReverse = false);
+/// \ingroup CPPHighAPI
+/// \brief Create Point feature as an intersection of selected planes
+CONSTRUCTIONAPI_EXPORT
+PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
+ const ModelHighAPI_Selection& theObject1,
+ const ModelHighAPI_Selection& theObject2,
+ const ModelHighAPI_Selection& theObject3);
+
#endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_ */
ADD_UNIT_TESTS(TestAxisCreation.py
UnitTestAxis.py
TestPoint_XYZ.py
- TestPoint_LineAndPlane.py
+ TestPoint_IntersectLines.py
+ TestPoint_IntersectLineAndPlane.py
+ TestPoint_IntersectPlanes.py
TestPoint_Edge.py
TestPoint_ProjectOnEdge.py
TestPoint_ProjectOnFace.py
new ConstructionPlugin_ValidatorPlaneTwoParallelPlanes());
aFactory->registerValidator("ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes",
new ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes());
+ aFactory->registerValidator("ConstructionPlugin_ValidatorPointThreeNonParallelPlanes",
+ new ConstructionPlugin_ValidatorPointThreeNonParallelPlanes());
Config_PropManager::registerProp(SKETCH_TAB_NAME, "planes_size", "Size", Config_Prop::DblSpin,
PLANE_SIZE);
data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
-/*
- data()->addAttribute(FIRST_LINE(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(SECOND_LINE(), ModelAPI_AttributeSelection::typeId());
-*/
+ data()->addAttribute(INTERSECTION_LINE_1(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(INTERSECTION_LINE_2(), ModelAPI_AttributeSelection::typeId());
data()->addAttribute(INTERSECTION_LINE(), ModelAPI_AttributeSelection::typeId());
data()->addAttribute(INTERSECTION_PLANE(), ModelAPI_AttributeSelection::typeId());
-
data()->addAttribute(USE_OFFSET(), ModelAPI_AttributeString::typeId());
data()->addAttribute(OFFSET(), ModelAPI_AttributeDouble::typeId());
data()->addAttribute(REVERSE_OFFSET(), ModelAPI_AttributeBoolean::typeId());
data()->addAttribute(PROJECTION_TYPE(), ModelAPI_AttributeString::typeId());
data()->addAttribute(EDGE_FOR_POINT_PROJECTION(), ModelAPI_AttributeSelection::typeId());
data()->addAttribute(FACE_FOR_POINT_PROJECTION(), ModelAPI_AttributeSelection::typeId());
+
+ data()->addAttribute(INTERSECTION_TYPE(), ModelAPI_AttributeString::typeId());
+
+ data()->addAttribute(INTERSECTION_PLANE_1(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(INTERSECTION_PLANE_2(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(INTERSECTION_PLANE_3(), ModelAPI_AttributeSelection::typeId());
}
//==================================================================================================
} else {
aShape = createByProjectionOnFace();
}
- } /* else if(aCreationMethod == CREATION_METHOD_BY_LINES_INTERSECTION()) {
- aShape = createByLinesIntersection();
- } */ else if(aCreationMethod == CREATION_METHOD_BY_LINE_AND_PLANE_INTERSECTION()) {
- // this may produce several points
- std::list<std::shared_ptr<GeomAPI_Vertex> > aPoints = createByLineAndPlaneIntersection();
- if (!aPoints.empty()) { // if no points found produce the standard error later
- int anIndex = 0;
- std::list<std::shared_ptr<GeomAPI_Vertex> >::iterator aPIter = aPoints.begin();
- for(; aPIter != aPoints.end(); aPIter++, anIndex++) {
- std::shared_ptr<ModelAPI_ResultConstruction> aConstr =
- document()->createConstruction(data(), anIndex);
- aConstr->setShape(*aPIter);
- setResult(aConstr, anIndex);
+ } else if(aCreationMethod == CREATION_METHOD_BY_INTERSECTION()) {
+ std::string anIntersectionType = string(INTERSECTION_TYPE())->value();
+ if (anIntersectionType == INTERSECTION_TYPE_BY_LINES()) {
+ aShape = createByLinesIntersection();
+ } else if (anIntersectionType == INTERSECTION_TYPE_BY_LINE_AND_PLANE()) {
+ // this may produce several points
+ std::list<std::shared_ptr<GeomAPI_Vertex> > aPoints = createByLineAndPlaneIntersection();
+ if (!aPoints.empty()) { // if no points found produce the standard error later
+ int anIndex = 0;
+ std::list<std::shared_ptr<GeomAPI_Vertex> >::iterator aPIter = aPoints.begin();
+ for (; aPIter != aPoints.end(); aPIter++, anIndex++) {
+ std::shared_ptr<ModelAPI_ResultConstruction> aConstr =
+ document()->createConstruction(data(), anIndex);
+ aConstr->setShape(*aPIter);
+ setResult(aConstr, anIndex);
+ }
+ removeResults(anIndex);
+ return;
}
- removeResults(anIndex);
- return;
+ } else {
+ aShape = createByPlanesIntersection();
}
}
return GeomAlgoAPI_PointBuilder::vertexByProjection(aVertex, aFace);
}
-/*
//==================================================================================================
std::shared_ptr<GeomAPI_Vertex> ConstructionPlugin_Point::createByLinesIntersection()
{
// Get first line.
- AttributeSelectionPtr aFirstLineSelection= selection(FIRST_LINE());
+ AttributeSelectionPtr aFirstLineSelection= selection(INTERSECTION_LINE_1());
GeomShapePtr aFirstLineShape = aFirstLineSelection->value();
if(!aFirstLineShape.get()) {
aFirstLineShape = aFirstLineSelection->context()->shape();
std::shared_ptr<GeomAPI_Edge> aFirstEdge(new GeomAPI_Edge(aFirstLineShape));
// Get second line.
- AttributeSelectionPtr aSecondLineSelection= selection(SECOND_LINE());
+ AttributeSelectionPtr aSecondLineSelection= selection(INTERSECTION_LINE_2());
GeomShapePtr aSecondLineShape = aSecondLineSelection->value();
if(!aSecondLineShape.get()) {
aSecondLineShape = aSecondLineSelection->context()->shape();
return GeomAlgoAPI_PointBuilder::vertexByIntersection(aFirstEdge, aSecondEdge);
}
-*/
//==================================================================================================
std::list<std::shared_ptr<GeomAPI_Vertex> >
return GeomAlgoAPI_ShapeTools::intersect(anEdge, aFace,
aPlaneSelection->context()->groupName() == ModelAPI_ResultConstruction::group());
}
+
+//==================================================================================================
+std::shared_ptr<GeomAPI_Vertex> ConstructionPlugin_Point::createByPlanesIntersection()
+{
+ // Get plane.
+ AttributeSelectionPtr aPlaneSelection1 = selection(INTERSECTION_PLANE_1());
+ GeomShapePtr aPlaneShape1 = aPlaneSelection1->value();
+ if (!aPlaneShape1.get()) {
+ aPlaneShape1 = aPlaneSelection1->context()->shape();
+ }
+ std::shared_ptr<GeomAPI_Face> aFace1(new GeomAPI_Face(aPlaneShape1));
+ std::shared_ptr<GeomAPI_Pln> aPln1 = aFace1->getPlane();
+
+ // Get plane.
+ AttributeSelectionPtr aPlaneSelection2 = selection(INTERSECTION_PLANE_2());
+ GeomShapePtr aPlaneShape2 = aPlaneSelection2->value();
+ if (!aPlaneShape2.get()) {
+ aPlaneShape2 = aPlaneSelection2->context()->shape();
+ }
+ std::shared_ptr<GeomAPI_Face> aFace2(new GeomAPI_Face(aPlaneShape2));
+ std::shared_ptr<GeomAPI_Pln> aPln2 = aFace2->getPlane();
+
+ // Get plane.
+ AttributeSelectionPtr aPlaneSelection3 = selection(INTERSECTION_PLANE_3());
+ GeomShapePtr aPlaneShape3 = aPlaneSelection3->value();
+ if (!aPlaneShape3.get()) {
+ aPlaneShape3 = aPlaneSelection3->context()->shape();
+ }
+ std::shared_ptr<GeomAPI_Face> aFace3(new GeomAPI_Face(aPlaneShape3));
+ std::shared_ptr<GeomAPI_Pln> aPln3 = aFace3->getPlane();
+
+ std::shared_ptr<GeomAPI_Vertex> aVertex;
+
+ std::shared_ptr<GeomAPI_Lin> anIntersectLine = aPln1->intersect(aPln2);
+ if (!anIntersectLine.get()) {
+ return aVertex;
+ }
+
+ std::shared_ptr<GeomAPI_Pnt> aPnt = aPln3->intersect(anIntersectLine);
+ if (aPnt.get()) {
+ aVertex.reset(new GeomAPI_Vertex(aPnt->x(), aPnt->y(), aPnt->z()));
+ }
+
+ return aVertex;
+}
return MY_CREATION_METHOD_ID;
}
- /*
/// Attribute name for creation method.
- inline static const std::string& CREATION_METHOD_BY_LINES_INTERSECTION()
+ inline static const std::string& CREATION_METHOD_BY_INTERSECTION()
{
- static const std::string MY_CREATION_METHOD_ID("by_lines_intersection");
- return MY_CREATION_METHOD_ID;
- }
- */
-
- /// Attribute name for creation method.
- inline static const std::string& CREATION_METHOD_BY_LINE_AND_PLANE_INTERSECTION()
- {
- static const std::string MY_CREATION_METHOD_ID("by_line_and_plane_intersection");
+ static const std::string MY_CREATION_METHOD_ID("by_intersection");
return MY_CREATION_METHOD_ID;
}
return ATTR_ID;
}
- /*
- /// Attribute name for selected first line.
- inline static const std::string& FIRST_LINE()
+ /// Attribute name for intersection type.
+ inline static const std::string& INTERSECTION_TYPE()
{
- static const std::string ATTR_ID("first_line");
+ static const std::string ATTR_ID("intersection_type");
return ATTR_ID;
}
- /// Attribute name for selected second line.
- inline static const std::string& SECOND_LINE()
+ /// Attribute name for intersection type by lines.
+ inline static const std::string& INTERSECTION_TYPE_BY_LINES()
{
- static const std::string ATTR_ID("second_line");
+ static const std::string MY_CREATION_METHOD_ID("intersection_type_by_lines");
+ return MY_CREATION_METHOD_ID;
+ }
+
+ /// Attribute name for intersection type by line and plane.
+ inline static const std::string& INTERSECTION_TYPE_BY_LINE_AND_PLANE()
+ {
+ static const std::string MY_CREATION_METHOD_ID("intersection_type_by_line_and_plane");
+ return MY_CREATION_METHOD_ID;
+ }
+
+ /// Attribute name for intersection type by planes.
+ inline static const std::string& INTERSECTION_TYPE_BY_PLANES()
+ {
+ static const std::string MY_CREATION_METHOD_ID("intersection_type_by_planes");
+ return MY_CREATION_METHOD_ID;
+ }
+
+ /// Attribute name for selected first intersection line.
+ inline static const std::string& INTERSECTION_LINE_1()
+ {
+ static const std::string ATTR_ID("intersection_line_1");
+ return ATTR_ID;
+ }
+
+ /// Attribute name for selected second intersection line.
+ inline static const std::string& INTERSECTION_LINE_2()
+ {
+ static const std::string ATTR_ID("intersection_line_2");
return ATTR_ID;
}
- */
/// Attribute name for selected intersection line.
inline static const std::string& INTERSECTION_LINE()
return ATTR_ID;
}
+ /// Attribute name for selected intersection plane.
+ inline static const std::string& INTERSECTION_PLANE_1()
+ {
+ static const std::string ATTR_ID("intersection_plane_1");
+ return ATTR_ID;
+ }
+
+ /// Attribute name for selected intersection plane.
+ inline static const std::string& INTERSECTION_PLANE_2()
+ {
+ static const std::string ATTR_ID("intersection_plane_2");
+ return ATTR_ID;
+ }
+
+ /// Attribute name for selected intersection plane.
+ inline static const std::string& INTERSECTION_PLANE_3()
+ {
+ static const std::string ATTR_ID("intersection_plane_3");
+ return ATTR_ID;
+ }
+
/// Creates a new part document if needed.
CONSTRUCTIONPLUGIN_EXPORT virtual void execute();
std::shared_ptr<GeomAPI_Vertex> createByDistanceOnEdge();
std::shared_ptr<GeomAPI_Vertex> createByProjectionOnEdge();
std::shared_ptr<GeomAPI_Vertex> createByProjectionOnFace();
- /*std::shared_ptr<GeomAPI_Vertex> createByLinesIntersection();*/
+ std::shared_ptr<GeomAPI_Vertex> createByLinesIntersection();
std::list<std::shared_ptr<GeomAPI_Vertex> > createByLineAndPlaneIntersection();
-
+ std::shared_ptr<GeomAPI_Vertex> createByPlanesIntersection();
};
#endif
std::shared_ptr<GeomAPI_Lin> aLine1 = aLineEdge1->line();
std::shared_ptr<GeomAPI_Lin> aLine2 = aLineEdge2->line();
+ if (!aLine1.get() || !aLine2.get()) {
+ theError = "Selected edge is not a line.";
+ return false;
+ }
+
if(!aLine1->isCoplanar(aLine2)) {
theError = "Selected lines not coplanar.";
return false;
return true;
}
+//==================================================================================================
+bool ConstructionPlugin_ValidatorPointThreeNonParallelPlanes::isValid(
+ const AttributePtr& theAttribute,
+ const std::list<std::string>& theArguments,
+ Events_InfoMessage& theError) const
+{
+ FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
+
+ AttributeSelectionPtr anAttribute1 =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
+ AttributeSelectionPtr anAttribute2 = aFeature->selection(theArguments.front());
+ AttributeSelectionPtr anAttribute3 = aFeature->selection(theArguments.back());
+
+ GeomShapePtr aShape1 = anAttribute1->value();
+ ResultPtr aContext1 = anAttribute1->context();
+ if (!aContext1.get()) {
+ theError = "One of the attribute not initialized.";
+ return false;
+ }
+ if (!aShape1.get()) {
+ aShape1 = aContext1->shape();
+ }
+
+ std::shared_ptr<GeomAPI_Pln> aPln1 = getPln(aShape1);
+ if (!aPln1.get()) {
+ theError = "Wrong shape types selected.";
+ return false;
+ }
+ std::shared_ptr<GeomAPI_Dir> aDir1 = aPln1->direction();
+
+ if (anAttribute2.get()) {
+ GeomShapePtr aShape2 = anAttribute2->value();
+ ResultPtr aContext2 = anAttribute2->context();
+ if (!aShape2.get() && aContext2.get()) {
+ aShape2 = aContext2->shape();
+ }
+
+ if (aShape2.get()) {
+ std::shared_ptr<GeomAPI_Pln> aPln2 = getPln(aShape2);
+ if (!aPln2.get()) {
+ theError = "Wrong shape types selected.";
+ return false;
+ }
+ std::shared_ptr<GeomAPI_Dir> aDir2 = aPln2->direction();
+ if (aDir1->isParallel(aDir2)) {
+ theError = "Planes are parallel.";
+ return false;
+ }
+ }
+ }
+
+ if (anAttribute3.get()) {
+ GeomShapePtr aShape3 = anAttribute3->value();
+ ResultPtr aContext3 = anAttribute3->context();
+ if (!aShape3.get() && aContext3.get()) {
+ aShape3 = aContext3->shape();
+ }
+
+ if (aShape3.get()) {
+ std::shared_ptr<GeomAPI_Pln> aPln3 = getPln(aShape3);
+ if (!aPln3.get()) {
+ theError = "Wrong shape types selected.";
+ return false;
+ }
+ std::shared_ptr<GeomAPI_Dir> aDir3 = aPln3->direction();
+ if (aDir1->isParallel(aDir3)) {
+ theError = "Planes are parallel.";
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
std::shared_ptr<GeomAPI_Edge> getEdge(const GeomShapePtr theShape)
{
if(!theShape->isEdge()) {
Events_InfoMessage& theError) const;
};
+/// \class ConstructionPlugin_ValidatorPointThreeNonParallelPlanes
+/// \ingroup Validators
+/// \brief A validator for selection three non parallel planes.
+class ConstructionPlugin_ValidatorPointThreeNonParallelPlanes: public ModelAPI_AttributeValidator
+{
+public:
+ //! \return True if the attribute is valid.
+ //! \param[in] theAttribute the checked attribute.
+ //! \param[in] theArguments arguments of the attribute.
+ //! \param[out] theError error message.
+ virtual bool isValid(const AttributePtr& theAttribute,
+ const std::list<std::string>& theArguments,
+ Events_InfoMessage& theError) const;
+};
+
#endif
\ No newline at end of file
--- /dev/null
+## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
+
+"""
+Test case for Construction Point feature as intersection of line and plane.
+"""
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Sketch_1 = model.addSketch(partSet, model.defaultPlane("XOY"))
+SketchPoint_1 = Sketch_1.addPoint(model.selection("VERTEX", "Origin"))
+SketchCircle_1 = Sketch_1.addCircle(0, 0, 60)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.result(), SketchCircle_1.center())
+model.do()
+Sketch_2 = model.addSketch(partSet, model.defaultPlane("XOZ"))
+SketchLine_1 = Sketch_2.addLine(60, 100, 0, 20)
+SketchArc_1 = Sketch_2.addArc(0, 0, -65.89631323066888, 61.2998850129882, -90, 0, False)
+model.do()
+
+# point by sketch face and a line
+Point_1 = model.addPoint(partSet, model.selection("EDGE", "Sketch_2/Edge-SketchLine_1"), model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f"))
+model.do()
+# check the point position
+rightPosition = GeomAPI_Vertex(-15, 0, 0)
+assert(rightPosition.isEqual(Point_1.results()[0].resultSubShapePair()[0].shape()))
+
+# point by sketch face and an arc, intersection outside of the face, offset is defined
+Point_2 = model.addPoint(partSet, model.selection("EDGE", "Sketch_2/Edge-SketchArc_1"), model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f"), 10, True)
+# check the point position
+rightPosition = GeomAPI_Vertex(-89.442719099991606, 0, -10)
+assert(rightPosition.isEqual(Point_2.results()[0].resultSubShapePair()[0].shape()))
+
+
+model.end()
+assert(model.checkPythonDump())
--- /dev/null
+## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
+
+"""
+Test case for Construction Point feature by lines intersection.
+"""
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
+SketchPoint_1 = SketchProjection_1.createdFeature()
+SketchLine_1 = Sketch_1.addLine(-50, 50, 50, 50)
+model.do()
+Box_1 = model.addBox(Part_1_doc, 25, 100, 100)
+Point_2 = model.addPoint(Part_1_doc, model.selection("EDGE", "Box_1_1/Back&Box_1_1/Bottom"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"))
+Point_3 = model.addPoint(Part_1_doc, model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Box_1_1/Front&Box_1_1/Bottom"))
+model.do()
+model.end()
+
+assert (len(Point_2.results()) > 0)
+rightPosition = GeomAPI_Vertex(0, 50, 0)
+assert(rightPosition.isEqual(Point_2.results()[0].resultSubShapePair()[0].shape()))
+
+assert (len(Point_3.results()) > 0)
+rightPosition = GeomAPI_Vertex(25, 50, 0)
+assert(rightPosition.isEqual(Point_3.results()[0].resultSubShapePair()[0].shape()))
+
+assert(model.checkPythonDump())
--- /dev/null
+## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+##
+## This library is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## This library is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with this library; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+## See http:##www.salome-platform.org/ or
+## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+##
+
+"""
+Test case for Construction Point feature by planes intersection.
+"""
+
+from salome.shaper import model
+from GeomAPI import *
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Point_2 = model.addPoint(Part_1_doc, 50, 50, 50)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("EDGE", "PartSet/OY"), model.selection("VERTEX", "Point_1"), False)
+Plane_5 = model.addPlane(Part_1_doc, model.selection("EDGE", "PartSet/OX"), model.selection("VERTEX", "Point_1"), False)
+Plane_6 = model.addPlane(Part_1_doc, model.selection("EDGE", "PartSet/OZ"), model.selection("VERTEX", "Point_1"), True)
+Point_3 = model.addPoint(Part_1_doc, model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2"), model.selection("FACE", "Plane_3"))
+Box_1 = model.addBox(Part_1_doc, 50, 25, 100)
+Point_4 = model.addPoint(Part_1_doc, model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_3"), model.selection("FACE", "Box_1_1/Right"))
+model.do()
+model.end()
+
+assert (len(Point_3.results()) > 0)
+rightPosition = GeomAPI_Vertex(50, 50, 50)
+assert(rightPosition.isEqual(Point_3.results()[0].resultSubShapePair()[0].shape()))
+
+assert (len(Point_4.results()) > 0)
+rightPosition = GeomAPI_Vertex(50, 25, 50)
+assert(rightPosition.isEqual(Point_4.results()[0].resultSubShapePair()[0].shape()))
+
+assert(model.checkPythonDump())
+++ /dev/null
-## Copyright (C) 2014-2017 CEA/DEN, EDF R&D
-##
-## This library is free software; you can redistribute it and/or
-## modify it under the terms of the GNU Lesser General Public
-## License as published by the Free Software Foundation; either
-## version 2.1 of the License, or (at your option) any later version.
-##
-## This library is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-## Lesser General Public License for more details.
-##
-## You should have received a copy of the GNU Lesser General Public
-## License along with this library; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-## See http:##www.salome-platform.org/ or
-## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
-##
-
-"""
-Test case for Construction Point feature as intersection of line and plane.
-"""
-
-from salome.shaper import model
-from GeomAPI import *
-
-model.begin()
-partSet = model.moduleDocument()
-Sketch_1 = model.addSketch(partSet, model.defaultPlane("XOY"))
-SketchPoint_1 = Sketch_1.addPoint(model.selection("VERTEX", "Origin"))
-SketchCircle_1 = Sketch_1.addCircle(0, 0, 60)
-SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.result(), SketchCircle_1.center())
-model.do()
-Sketch_2 = model.addSketch(partSet, model.defaultPlane("XOZ"))
-SketchLine_1 = Sketch_2.addLine(60, 100, 0, 20)
-SketchArc_1 = Sketch_2.addArc(0, 0, -65.89631323066888, 61.2998850129882, -90, 0, False)
-model.do()
-
-# point by sketch face and a line
-Point_1 = model.addPoint(partSet, model.selection("EDGE", "Sketch_2/Edge-SketchLine_1"), model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f"))
-model.do()
-# check the point position
-rightPosition = GeomAPI_Vertex(-15, 0, 0)
-assert(rightPosition.isEqual(Point_1.results()[0].resultSubShapePair()[0].shape()))
-
-# point by sketch face and an arc, intersection outside of the face, offset is defined
-Point_2 = model.addPoint(partSet, model.selection("EDGE", "Sketch_2/Edge-SketchArc_1"), model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f"), 10, True)
-# check the point position
-rightPosition = GeomAPI_Vertex(-89.442719099991606, 0, -10)
-assert(rightPosition.isEqual(Point_2.results()[0].resultSubShapePair()[0].shape()))
-
-
-model.end()
-assert(model.checkPythonDump())
</box>
</toolbox>
</box>
-<!--
- <box id="by_lines_intersection"
- title="By two lines intersection"
- tooltip="Point by intersection of two coplanar lines."
- icon="icons/Construction/point_by_lines_intersection_32x32.png">
- <shape_selector id="first_line"
- label="First line"
- tooltip="First line."
- icon="icons/Construction/edge.png"
- shape_types="edge">
- <validator id="GeomValidators_ShapeType" parameters="line"/>
- <validator id="ConstructionPlugin_ValidatorPointLines" parameters="second_line"/>
- </shape_selector>
- <shape_selector id="second_line"
- label="Second line"
- tooltip="Second line."
- icon="icons/Construction/edge.png"
- shape_types="edge">
- <validator id="GeomValidators_ShapeType" parameters="line"/>
- <validator id="ConstructionPlugin_ValidatorPointLines" parameters="first_line"/>
- </shape_selector>
- </box>
--->
- <box id="by_line_and_plane_intersection"
- title="By line and plane intersection"
- tooltip="Point by intersection of line and plane."
- icon="icons/Construction/point_by_line_and_plane_intersection_32x32.png">
- <shape_selector id="intersection_line"
- label="Line"
- tooltip="Line for intersection."
- icon="icons/Construction/edge.png"
- shape_types="edge">
- <validator id="ConstructionPlugin_ValidatorPointEdgeAndPlaneNotParallel" parameters="intersection_plane"/>
- </shape_selector>
- <shape_selector id="intersection_plane"
- label="Plane"
- tooltip="Plane for intersection."
- icon="icons/Construction/face.png"
- shape_types="face">
- <validator id="GeomValidators_Face" parameters="plane"/>
- <validator id="ConstructionPlugin_ValidatorPointEdgeAndPlaneNotParallel" parameters="intersection_line"/>
- </shape_selector>
- <optionalbox id="use_offset" title="Offset from the plane">
- <doublevalue id="offset" label="Distance " tooltip="Distance from the plane" min="0" default="0"/>
- <boolvalue id="reverse_offset" label="Reverse" tooltip="Reverse offset value" default="false"/>
- </optionalbox>
+ <box id="by_intersection"
+ title="By intersection of objects"
+ tooltip="Point on intersection of different objects."
+ icon="icons/Construction/point_by_intersection_32x32.png">
+ <toolbox id="intersection_type">
+ <box id="intersection_type_by_lines"
+ title="By two lines intersection"
+ tooltip="Point by intersection of two coplanar lines."
+ icon="icons/Construction/point_by_lines_intersection_24x24.png">
+ <shape_selector id="intersection_line_1"
+ label="First line"
+ tooltip="First line."
+ icon="icons/Construction/edge.png"
+ shape_types="edge">
+ <validator id="GeomValidators_ShapeType" parameters="line"/>
+ <validator id="ConstructionPlugin_ValidatorPointLines"
+ parameters="intersection_line_2"/>
+ </shape_selector>
+ <shape_selector id="intersection_line_2"
+ label="Second line"
+ tooltip="Second line."
+ icon="icons/Construction/edge.png"
+ shape_types="edge">
+ <validator id="GeomValidators_ShapeType" parameters="line"/>
+ <validator id="ConstructionPlugin_ValidatorPointLines"
+ parameters="intersection_line_1"/>
+ </shape_selector>
+ </box>
+ <box id="intersection_type_by_line_and_plane"
+ title="By line and plane intersection"
+ tooltip="Point by intersection of line and plane."
+ icon="icons/Construction/point_by_line_and_plane_intersection_24x24.png">
+ <shape_selector id="intersection_line"
+ label="Line"
+ tooltip="Line for intersection."
+ icon="icons/Construction/edge.png"
+ shape_types="edge">
+ <validator id="ConstructionPlugin_ValidatorPointEdgeAndPlaneNotParallel"
+ parameters="intersection_plane"/>
+ </shape_selector>
+ <shape_selector id="intersection_plane"
+ label="Plane"
+ tooltip="Plane for intersection."
+ icon="icons/Construction/face.png"
+ shape_types="face">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ <validator id="ConstructionPlugin_ValidatorPointEdgeAndPlaneNotParallel"
+ parameters="intersection_line"/>
+ </shape_selector>
+ <optionalbox id="use_offset" title="Offset from the plane">
+ <doublevalue id="offset"
+ label="Distance "
+ tooltip="Distance from the plane"
+ min="0"
+ default="0"/>
+ <boolvalue id="reverse_offset"
+ label="Reverse"
+ tooltip="Reverse offset value"
+ default="false"/>
+ </optionalbox>
+ </box>
+ <box id="intersection_type_by_planes"
+ title="By three planes intersection"
+ tooltip="Point by intersection of three planes."
+ icon="icons/Construction/point_by_planes_intersection_24x24.png">
+ <shape_selector id="intersection_plane_1"
+ label="1st plane"
+ tooltip="Select a planar face."
+ icon="icons/Construction/face.png"
+ shape_types="face">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ <validator id="ConstructionPlugin_ValidatorPointThreeNonParallelPlanes"
+ parameters="intersection_plane_2, intersection_plane_3"/>
+ </shape_selector>
+ <shape_selector id="intersection_plane_2"
+ label="2nd plane"
+ tooltip="Select a planar face."
+ icon="icons/Construction/face.png"
+ shape_types="face">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ <validator id="ConstructionPlugin_ValidatorPointThreeNonParallelPlanes"
+ parameters="intersection_plane_1, intersection_plane_3"/>
+ </shape_selector>
+ <shape_selector id="intersection_plane_3"
+ label="3rd plane"
+ tooltip="Select a planar face."
+ icon="icons/Construction/face.png"
+ shape_types="face">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ <validator id="ConstructionPlugin_ValidatorPointThreeNonParallelPlanes"
+ parameters="intersection_plane_1, intersection_plane_2"/>
+ </shape_selector>
+ </box>
+ </toolbox>
</box>
-
</toolbox>
</source>
END_INIT() \
public:
+//--------------------------------------------------------------------------------------
+#define INTERFACE_24(KIND, \
+ N_0, AN_0, T_0, C_0, \
+ N_1, AN_1, T_1, C_1, \
+ N_2, AN_2, T_2, C_2, \
+ N_3, AN_3, T_3, C_3, \
+ N_4, AN_4, T_4, C_4, \
+ N_5, AN_5, T_5, C_5, \
+ N_6, AN_6, T_6, C_6, \
+ N_7, AN_7, T_7, C_7, \
+ N_8, AN_8, T_8, C_8, \
+ N_9, AN_9, T_9, C_9, \
+ N_10, AN_10, T_10, C_10, \
+ N_11, AN_11, T_11, C_11, \
+ N_12, AN_12, T_12, C_12, \
+ N_13, AN_13, T_13, C_13, \
+ N_14, AN_14, T_14, C_14, \
+ N_15, AN_15, T_15, C_15, \
+ N_16, AN_16, T_16, C_16, \
+ N_17, AN_17, T_17, C_17, \
+ N_18, AN_18, T_18, C_18, \
+ N_19, AN_19, T_19, C_19, \
+ N_20, AN_20, T_20, C_20, \
+ N_21, AN_21, T_21, C_21, \
+ N_22, AN_22, T_22, C_22, \
+ N_23, AN_23, T_23, C_23) \
+ public: \
+ INTERFACE_COMMON(KIND) \
+ DEFINE_ATTRIBUTE(N_0, T_0, C_0) \
+ DEFINE_ATTRIBUTE(N_1, T_1, C_1) \
+ DEFINE_ATTRIBUTE(N_2, T_2, C_2) \
+ DEFINE_ATTRIBUTE(N_3, T_3, C_3) \
+ DEFINE_ATTRIBUTE(N_4, T_4, C_4) \
+ DEFINE_ATTRIBUTE(N_5, T_5, C_5) \
+ DEFINE_ATTRIBUTE(N_6, T_6, C_6) \
+ DEFINE_ATTRIBUTE(N_7, T_7, C_7) \
+ DEFINE_ATTRIBUTE(N_8, T_8, C_8) \
+ DEFINE_ATTRIBUTE(N_9, T_9, C_9) \
+ DEFINE_ATTRIBUTE(N_10, T_10, C_10) \
+ DEFINE_ATTRIBUTE(N_11, T_11, C_11) \
+ DEFINE_ATTRIBUTE(N_12, T_12, C_12) \
+ DEFINE_ATTRIBUTE(N_13, T_13, C_13) \
+ DEFINE_ATTRIBUTE(N_14, T_14, C_14) \
+ DEFINE_ATTRIBUTE(N_15, T_15, C_15) \
+ DEFINE_ATTRIBUTE(N_16, T_16, C_16) \
+ DEFINE_ATTRIBUTE(N_17, T_17, C_17) \
+ DEFINE_ATTRIBUTE(N_18, T_18, C_18) \
+ DEFINE_ATTRIBUTE(N_19, T_19, C_19) \
+ DEFINE_ATTRIBUTE(N_20, T_20, C_20) \
+ DEFINE_ATTRIBUTE(N_21, T_21, C_21) \
+ DEFINE_ATTRIBUTE(N_22, T_22, C_22) \
+ DEFINE_ATTRIBUTE(N_23, T_23, C_23) \
+ protected: \
+ START_INIT() \
+ SET_ATTRIBUTE(N_0, T_0, AN_0) \
+ SET_ATTRIBUTE(N_1, T_1, AN_1) \
+ SET_ATTRIBUTE(N_2, T_2, AN_2) \
+ SET_ATTRIBUTE(N_3, T_3, AN_3) \
+ SET_ATTRIBUTE(N_4, T_4, AN_4) \
+ SET_ATTRIBUTE(N_5, T_5, AN_5) \
+ SET_ATTRIBUTE(N_6, T_6, AN_6) \
+ SET_ATTRIBUTE(N_7, T_7, AN_7) \
+ SET_ATTRIBUTE(N_8, T_8, AN_8) \
+ SET_ATTRIBUTE(N_9, T_9, AN_9) \
+ SET_ATTRIBUTE(N_10, T_10, AN_10) \
+ SET_ATTRIBUTE(N_11, T_11, AN_11) \
+ SET_ATTRIBUTE(N_12, T_12, AN_12) \
+ SET_ATTRIBUTE(N_13, T_13, AN_13) \
+ SET_ATTRIBUTE(N_14, T_14, AN_14) \
+ SET_ATTRIBUTE(N_15, T_15, AN_15) \
+ SET_ATTRIBUTE(N_16, T_16, AN_16) \
+ SET_ATTRIBUTE(N_17, T_17, AN_17) \
+ SET_ATTRIBUTE(N_18, T_18, AN_18) \
+ SET_ATTRIBUTE(N_19, T_19, AN_19) \
+ SET_ATTRIBUTE(N_20, T_20, AN_20) \
+ SET_ATTRIBUTE(N_21, T_21, AN_21) \
+ SET_ATTRIBUTE(N_22, T_22, AN_22) \
+ SET_ATTRIBUTE(N_23, T_23, AN_23) \
+ END_INIT() \
+ public:
+
//--------------------------------------------------------------------------------------
#endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_MACRO_H_ */