linelength=100
-filter=-whitespace,+whitespace/line_length,-readability,-build,-runtime
+filter=-whitespace,+whitespace/end_of_line,-readability,-build,-runtime
root=src
+#+whitespace/line_length
virtual ~BuildAPI_Edge();
INTERFACE_1(BuildPlugin_Edge::ID(),
- baseObjects, BuildPlugin_Edge::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */)
+ baseObjects, BuildPlugin_Edge::BASE_OBJECTS_ID(),
+ ModelAPI_AttributeSelectionList, /** Base objects */)
/// Modify base attribute of the feature.
BUILDAPI_EXPORT
virtual ~BuildAPI_Face();
INTERFACE_1(BuildPlugin_Face::ID(),
- baseObjects, BuildPlugin_Face::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */)
+ baseObjects, BuildPlugin_Face::BASE_OBJECTS_ID(),
+ ModelAPI_AttributeSelectionList, /** Base objects */)
/// Modify base attribute of the feature.
BUILDAPI_EXPORT
virtual ~BuildAPI_Shell();
INTERFACE_1(BuildPlugin_Shell::ID(),
- baseObjects, BuildPlugin_Shell::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */)
+ baseObjects, BuildPlugin_Shell::BASE_OBJECTS_ID(),
+ ModelAPI_AttributeSelectionList, /** Base objects */)
/// Modify base attribute of the feature.
BUILDAPI_EXPORT
virtual ~BuildAPI_SubShapes();
INTERFACE_2(BuildPlugin_SubShapes::ID(),
- baseShape, BuildPlugin_SubShapes::BASE_SHAPE_ID(), ModelAPI_AttributeSelection, /** Base shape */,
- subShapes, BuildPlugin_SubShapes::SUBSHAPES_ID(), ModelAPI_AttributeSelectionList, /** Sub-shapes */)
+ baseShape, BuildPlugin_SubShapes::BASE_SHAPE_ID(),
+ ModelAPI_AttributeSelection, /** Base shape */,
+ subShapes, BuildPlugin_SubShapes::SUBSHAPES_ID(),
+ ModelAPI_AttributeSelectionList, /** Sub-shapes */)
/// Modify base attribute of the feature.
BUILDAPI_EXPORT
virtual ~BuildAPI_Vertex();
INTERFACE_1(BuildPlugin_Vertex::ID(),
- baseObjects, BuildPlugin_Vertex::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */)
+ baseObjects, BuildPlugin_Vertex::BASE_OBJECTS_ID(),
+ ModelAPI_AttributeSelectionList, /** Base objects */)
/// Modify base attribute of the feature.
BUILDAPI_EXPORT
virtual ~BuildAPI_Wire();
INTERFACE_1(BuildPlugin_Wire::ID(),
- baseObjects, BuildPlugin_Wire::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */)
+ baseObjects, BuildPlugin_Wire::BASE_OBJECTS_ID(),
+ ModelAPI_AttributeSelectionList, /** Base objects */)
/// Modify base attribute of the feature.
BUILDAPI_EXPORT
// Get faces.
ListOfShape aFaces;
- GeomAlgoAPI_SketchBuilder::createFaces(aPln->location(), aPln->xDirection(), aPln->direction(), anEdges, aFaces);
+ GeomAlgoAPI_SketchBuilder::createFaces(aPln->location(), aPln->xDirection(),
+ aPln->direction(), anEdges, aFaces);
// Get wires from faces.
ListOfShape aWires;
for(ListOfShape::const_iterator anIt = anEdges.cbegin(); anIt != anEdges.cend(); ++anIt) {
std::shared_ptr<GeomAPI_Edge> anEdgeInList(new GeomAPI_Edge(*anIt));
if(anEdgeInList->isEqual(anEdgeInResult)) {
- aResultBody->modified(anEdgeInList, anEdgeInResult, "Edge_" + std::to_string((long long)anEdgeIndex), anEdgeIndex);
+ aResultBody->modified(anEdgeInList, anEdgeInResult,
+ "Edge_" + std::to_string((long long)anEdgeIndex), anEdgeIndex);
++anEdgeIndex;
break;
}
ResultBodyPtr aResultBody = document()->createBody(data(), anIndex);
aResultBody->store(aShell);
for(ListOfShape::const_iterator anIt = aShapes.cbegin(); anIt != aShapes.cend(); ++anIt) {
- for(GeomAPI_ShapeExplorer aFaceExp(*anIt, GeomAPI_Shape::FACE); aFaceExp.more(); aFaceExp.next()) {
+ for(GeomAPI_ShapeExplorer
+ aFaceExp(*anIt, GeomAPI_Shape::FACE); aFaceExp.more(); aFaceExp.next()) {
GeomShapePtr aFace = aFaceExp.current();
ListOfShape aHistory;
aSewingAlgo.modified(aFace, aHistory);
aResultBody->storeModified(aBaseShape, aResultShape);
aResultBody->loadAndOrientModifiedShapes(&aBuilder, aBaseShape, GeomAPI_Shape::EDGE, aModEdgeTag,
"Modified_Edge", *aBuilder.mapOfSubShapes().get());
- for(ListOfShape::const_iterator anIt = aShapesToAdd.cbegin(); anIt != aShapesToAdd.cend(); ++anIt) {
+ for(ListOfShape::const_iterator
+ anIt = aShapesToAdd.cbegin(); anIt != aShapesToAdd.cend(); ++anIt) {
GeomAPI_Shape::ShapeType aShType = (*anIt)->shapeType();
aResultBody->loadAndOrientModifiedShapes(&aBuilder, *anIt, aShType,
- aShType == GeomAPI_Shape::VERTEX ? aModVertexTag : aModEdgeTag,
- aShType == GeomAPI_Shape::VERTEX ? "Modified_Vertex" : "Modified_Edge",
- *aBuilder.mapOfSubShapes().get());
+ aShType == GeomAPI_Shape::VERTEX ? aModVertexTag : aModEdgeTag,
+ aShType == GeomAPI_Shape::VERTEX ? "Modified_Vertex" : "Modified_Edge",
+ *aBuilder.mapOfSubShapes().get());
}
setResult(aResultBody);
}
{
// Get base objects list.
if(theAttribute->attributeType() != ModelAPI_AttributeSelectionList::typeId()) {
- std::string aMsg = "Error: BuildPlugin_ValidatorBaseForBuild does not support attribute type '%1'\nOnly '%2' is supported.";
+ std::string aMsg = "Error: BuildPlugin_ValidatorBaseForBuild does "
+ "not support attribute type '%1'\nOnly '%2' is supported.";
Events_InfoMessage("BuildPlugin_Validators", aMsg).
arg(theAttribute->attributeType()).arg(ModelAPI_AttributeSelectionList::typeId()).send();
return false;
}
// Check that it is shape on sketch.
- ResultConstructionPtr aConstruction = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
+ ResultConstructionPtr aConstruction =
+ std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
if(aConstruction.get()) {
if(aConstruction->isInfinite()) {
theError = "Inifinte objects not acceptable.";
return false;
}
- std::shared_ptr<GeomAPI_PlanarEdges> anEdges = std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aContextShape);
+ std::shared_ptr<GeomAPI_PlanarEdges> anEdges =
+ std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aContextShape);
if(anEdges.get()) {
if(aShape->isEqual(aContextShape)) {
// It is whole sketch.
{
// Get attribute.
if(theArguments.size() != 1) {
- std::string aMsg = "Error: BuildPlugin_ValidatorBaseForWire should be used only with 1 parameter (ID of base objects list).";
+ std::string aMsg = "Error: BuildPlugin_ValidatorBaseForWire should be used only "
+ "with 1 parameter (ID of base objects list).";
Events_InfoMessage("BuildPlugin_Validators", aMsg).send();
return false;
}
}
//=================================================================================================
-bool BuildPlugin_ValidatorBaseForWire::isNotObligatory(std::string theFeature, std::string theAttribute)
+bool BuildPlugin_ValidatorBaseForWire::isNotObligatory(std::string theFeature,
+ std::string theAttribute)
{
return false;
}
GeomShapePtr aSectedEdges = aPaveFiller.shape();
int anEdgesNum = 0;
- for(GeomAPI_ShapeExplorer anExp(aSectedEdges, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
+ for(GeomAPI_ShapeExplorer
+ anExp(aSectedEdges, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
anEdgesNum++;
}
if(anEdgesNum != anEdges.size()) {
// Check that selected objects have closed contours.
ListOfShape aFaces;
- GeomAlgoAPI_SketchBuilder::createFaces(aPln->location(), aPln->xDirection(), aPln->direction(), anEdges, aFaces);
+ GeomAlgoAPI_SketchBuilder::createFaces(aPln->location(), aPln->xDirection(),
+ aPln->direction(), anEdges, aFaces);
if(aFaces.empty()) {
theError = "Selected objects does not have closed contours.";
return false;
}
//=================================================================================================
-bool BuildPlugin_ValidatorBaseForFace::isNotObligatory(std::string theFeature, std::string theAttribute)
+bool BuildPlugin_ValidatorBaseForFace::isNotObligatory(std::string theFeature,
+ std::string theAttribute)
{
return false;
}
// Get base objects list.
if(theAttribute->attributeType() != ModelAPI_AttributeSelectionList::typeId()) {
- std::string aMsg = "Error: BuildPlugin_ValidatorSubShapesSelection does not support attribute type \""
+ std::string aMsg =
+ "Error: BuildPlugin_ValidatorSubShapesSelection does not support attribute type \""
"%1\"\n Only \"%2\" supported.";
Events_InfoMessage("BuildPlugin_Validators", aMsg).
arg(theAttribute->attributeType()).arg(ModelAPI_AttributeSelectionList::typeId()).send();
/// \class BuildPlugin_ValidatorBaseForBuild
/// \ingroup Validators
-/// \brief A validator for selection base shapes for build features. Allows to select shapes on sketch and
+/// \brief A validator for selection base shapes for build features.
+/// Allows to select shapes on sketch and
/// whole objects with allowed type.
class BuildPlugin_ValidatorBaseForBuild: public ModelAPI_AttributeValidator
{
// Check that it is edge on sketch.
ResultPtr aContext = aSelection->context();
- ResultConstructionPtr aConstruction = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
+ ResultConstructionPtr aConstruction =
+ std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
if(!aConstruction.get()) {
continue;
}
GeomShapePtr aContextShape = aConstruction->shape();
- std::shared_ptr<GeomAPI_PlanarEdges> aPlanarEdges = std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aContextShape);
+ std::shared_ptr<GeomAPI_PlanarEdges> aPlanarEdges =
+ std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aContextShape);
if(!aPlanarEdges.get()) {
continue;
}
AttributeSelectionPtr aSelection = *aListIt;
std::shared_ptr<GeomAPI_Edge> anEdgeInList(new GeomAPI_Edge(aSelection->value()));
- ResultConstructionPtr aConstruction = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aSelection->context());
+ ResultConstructionPtr aConstruction =
+ std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aSelection->context());
// Iterate on wires and add wire with this edge.
std::shared_ptr<GeomAPI_Shape> aFoundWire;
for(int anIndex = 0; anIndex < aConstruction->facesNum(); ++anIndex) {
std::shared_ptr<GeomAPI_Face> aFace = aConstruction->face(anIndex);
- for(GeomAPI_ShapeExplorer aWireExp(aFace, GeomAPI_Shape::WIRE); aWireExp.more(); aWireExp.next()) {
+ for(GeomAPI_ShapeExplorer
+ aWireExp(aFace, GeomAPI_Shape::WIRE); aWireExp.more(); aWireExp.next()) {
GeomShapePtr aWireOnFace = aWireExp.current();
- for(GeomAPI_ShapeExplorer anExp(aWireOnFace, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
+ for(GeomAPI_ShapeExplorer
+ anExp(aWireOnFace, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
std::shared_ptr<GeomAPI_Edge> anEdgeOnFace(new GeomAPI_Edge(anExp.current()));
if(anEdgeInList->isEqual(anEdgeOnFace)) {
aFoundWire = aWireOnFace;
// If wire with the same edge found. Add all other edges to list.
if(aFoundWire.get()) {
- for(GeomAPI_ShapeExplorer anExp(aFoundWire, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
+ for(GeomAPI_ShapeExplorer
+ anExp(aFoundWire, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
std::shared_ptr<GeomAPI_Edge> anEdgeOnFace(new GeomAPI_Edge(anExp.current()));
ListOfShape::const_iterator anEdgesIt = anAddedEdges.cbegin();
for(; anEdgesIt != anAddedEdges.cend(); ++anEdgesIt) {