GeomAPI_DataMapOfShapeShape alreadyProcessed;
// 1. Explode on Vertices
- for (GeomAPI_ShapeExplorer anExp (theShape, GeomAPI_Shape::VERTEX); anExp.more(); anExp.next()) {
+ for (GeomAPI_ShapeExplorer anExp (theShape, GeomAPI_Shape::VERTEX);
+ anExp.more(); anExp.next()) {
GeomShapePtr aSubShape = anExp.current();
if (alreadyProcessed.bind(aSubShape, aSubShape)) {
// Partition
ListOfShape anObjList, aTools;
anObjList.push_back(theShape);
- std::shared_ptr<GeomAlgoAPI_Partition> aPartitionAlgo (new GeomAlgoAPI_Partition(anObjList, aTools));
+ std::shared_ptr<GeomAlgoAPI_Partition> aPartitionAlgo (
+ new GeomAlgoAPI_Partition(anObjList, aTools));
std::string anError;
if (GeomAlgoAPI_Tools::AlgoError::isAlgorithmFailed(aPartitionAlgo, getKind(), anError)) {
GeomShapePtr aSplittedSketch = aPartitionAlgo->shape();
// Explode on Vertices, skip vertices of initial sketch
- for (GeomAPI_ShapeExplorer anExp (aSplittedSketch, GeomAPI_Shape::VERTEX); anExp.more(); anExp.next()) {
+ for (GeomAPI_ShapeExplorer anExp (aSplittedSketch, GeomAPI_Shape::VERTEX);
+ anExp.more(); anExp.next()) {
GeomShapePtr aSubShape = anExp.current();
//if (!theShape->isSubShape(aSubShape)) { // skip vertices of initial sketch
// Partition
ListOfShape anObjList, aTools;
anObjList.push_back(theShape);
- std::shared_ptr<GeomAlgoAPI_Partition> aPartitionAlgo (new GeomAlgoAPI_Partition(anObjList, aTools));
+ std::shared_ptr<GeomAlgoAPI_Partition> aPartitionAlgo (
+ new GeomAlgoAPI_Partition(anObjList, aTools));
std::string anError;
if (GeomAlgoAPI_Tools::AlgoError::isAlgorithmFailed(aPartitionAlgo, getKind(), anError)) {
GeomShapePtr aSplittedSketch = aPartitionAlgo->shape();
// Explode on Vertices, skip vertices of initial sketch
- for (GeomAPI_ShapeExplorer anExp (aSplittedSketch, GeomAPI_Shape::VERTEX); anExp.more(); anExp.next()) {
+ for (GeomAPI_ShapeExplorer anExp (aSplittedSketch, GeomAPI_Shape::VERTEX);
+ anExp.more(); anExp.next()) {
GeomShapePtr aSubShape = anExp.current();
//if (!theShape->isSubShape(aSubShape)) { // skip vertices of initial sketch
// Sub-result i
GeomShapePtr aSubResShape = aRes->shape();
- for (GeomAPI_ShapeExplorer anExp (aSubResShape, GeomAPI_Shape::VERTEX); anExp.more(); anExp.next()) {
+ for (GeomAPI_ShapeExplorer anExp (aSubResShape, GeomAPI_Shape::VERTEX);
+ anExp.more(); anExp.next()) {
GeomShapePtr aSubShape = anExp.current();
if (alreadyProcessed.bind(aSubShape, aSubShape)) {
for (ListOfMakeShape::const_iterator
anIt = aGenMakeShapes.cbegin(); anIt != aGenMakeShapes.cend(); ++anIt) {
GeomMakeShapePtr anAlgo = (*anIt);
- std::shared_ptr<GeomAlgoAPI_Prism> aPrismAlgo = std::dynamic_pointer_cast<GeomAlgoAPI_Prism>(anAlgo);
+ std::shared_ptr<GeomAlgoAPI_Prism> aPrismAlgo =
+ std::dynamic_pointer_cast<GeomAlgoAPI_Prism>(anAlgo);
// Cut the prism by all objects and throw away end pieces
- std::shared_ptr<GeomAlgoAPI_ThroughAll> aToolAlgo (new GeomAlgoAPI_ThroughAll(aPrismAlgo, anObjects));
+ std::shared_ptr<GeomAlgoAPI_ThroughAll> aToolAlgo (
+ new GeomAlgoAPI_ThroughAll(aPrismAlgo, anObjects));
// Checking that the algorithm worked properly
if (!aToolAlgo->isDone() || aToolAlgo->shape()->isNull() || !aToolAlgo->isValid()) {
double& theToSize, double& theFromSize)
{
// Bounding box of objects
- std::list<std::shared_ptr<GeomAPI_Pnt> > aBndObjs = GeomAlgoAPI_ShapeTools::getBoundingBox(theObjects);
+ std::list<std::shared_ptr<GeomAPI_Pnt> > aBndObjs =
+ GeomAlgoAPI_ShapeTools::getBoundingBox(theObjects);
if (aBndObjs.size() != 8) {
return;
}
gp_Dir aDir = theDir->impl<gp_Dir>();
// Bounding box of the base
- std::list<std::shared_ptr<GeomAPI_Pnt> > aBndBases = GeomAlgoAPI_ShapeTools::getBoundingBox(theBaseShapes);
+ std::list<std::shared_ptr<GeomAPI_Pnt> > aBndBases =
+ GeomAlgoAPI_ShapeTools::getBoundingBox(theBaseShapes);
if (aBndBases.size() != 8) {
return;
}
theToSize = 0.0;
theFromSize = 0.0;
- for (ListOfShape::const_iterator anIt = theBaseShapes.begin(); anIt != theBaseShapes.end(); ++anIt) {
+ for (ListOfShape::const_iterator anIt = theBaseShapes.begin();
+ anIt != theBaseShapes.end(); ++anIt) {
const GeomShapePtr& aBaseShape_i = (*anIt);
ListOfShape aBaseShapes_i;
aBaseShapes_i.push_back(aBaseShape_i);
// Bounding box of the base
- std::list<std::shared_ptr<GeomAPI_Pnt> > aBndBases = GeomAlgoAPI_ShapeTools::getBoundingBox(aBaseShapes_i);
+ std::list<std::shared_ptr<GeomAPI_Pnt> > aBndBases =
+ GeomAlgoAPI_ShapeTools::getBoundingBox(aBaseShapes_i);
if (aBndBases.size() != 8) {
return;
}
/// Customize presentation according to objects attributes
/// \param theObject an object for presentation
/// \param thePrs a presentation object
- virtual void customizePresentation(const ObjectPtr& theObject, const AISObjectPtr& thePrs) const {}
+ virtual void customizePresentation(const ObjectPtr& theObject, const AISObjectPtr& thePrs) const
+ {}
//! Returns data object by AIS
virtual ObjectPtr findPresentedObject(const AISObjectPtr& theAIS) const = 0;
//******************************************************
-void PartSet_Module::customizePresentation(const ObjectPtr& theObject, const AISObjectPtr& thePrs) const
+void PartSet_Module::customizePresentation(const ObjectPtr& theObject,
+ const AISObjectPtr& thePrs) const
{
if (mySketchMgr->isSketchStarted()) {
mySketchMgr->customizeSketchPresentation(theObject, thePrs);
// }
// if (!aColor.empty()) {
// if (theResult.get() && ModelAPI_Session::get()->isOperation()) {
- // AttributeIntArrayPtr aColorAttr = theResult->data()->intArray(ModelAPI_Result::COLOR_ID());
+ // AttributeIntArrayPtr aColorAttr =
+ // theResult->data()->intArray(ModelAPI_Result::COLOR_ID());
// aColorAttr->setSize(3);
// // Set the color attribute in order do not use default colors in the presentation object
// for (int i = 0; i < 3; i++)