Salome HOME
Issue #1860: fix end lines with spaces
authorVitaly SMETANNIKOV <vsv@salomex.nnov.opencascade.com>
Thu, 10 Nov 2016 14:13:34 +0000 (17:13 +0300)
committerVitaly SMETANNIKOV <vsv@salomex.nnov.opencascade.com>
Thu, 10 Nov 2016 14:13:34 +0000 (17:13 +0300)
543 files changed:
findEndLines.sh [new file with mode: 0755]
src/BuildAPI/BuildAPI_Face.h
src/BuildAPI/BuildAPI_Vertex.h
src/BuildPlugin/BuildPlugin_Shell.cpp
src/BuildPlugin/BuildPlugin_Validators.cpp
src/BuildPlugin/BuildPlugin_Validators.h
src/BuildPlugin/BuildPlugin_Wire.cpp
src/Config/Config_Common.cpp
src/Config/Config_DataModelReader.cpp
src/Config/Config_DataModelReader.h
src/Config/Config_FeatureReader.cpp
src/Config/Config_FeatureReader.h
src/Config/Config_ModuleReader.cpp
src/Config/Config_ModuleReader.h
src/Config/Config_PropManager.cpp
src/Config/Config_Translator.cpp
src/Config/Config_ValidatorReader.cpp
src/Config/Config_XMLReader.cpp
src/Config/Config_def.h
src/ConnectorAPI/ConnectorAPI_Connector.cpp
src/ConnectorAPI/ConnectorAPI_Connector.h
src/ConstructionAPI/ConstructionAPI_Axis.cpp
src/ConstructionAPI/ConstructionAPI_Axis.h
src/ConstructionAPI/ConstructionAPI_Plane.cpp
src/ConstructionAPI/ConstructionAPI_Plane.h
src/ConstructionAPI/ConstructionAPI_Point.cpp
src/ConstructionAPI/ConstructionAPI_Point.h
src/ConstructionPlugin/ConstructionPlugin_Axis.cpp
src/ConstructionPlugin/ConstructionPlugin_Axis.h
src/ConstructionPlugin/ConstructionPlugin_Plane.cpp
src/ConstructionPlugin/ConstructionPlugin_Validators.cpp
src/Events/Events_InfoMessage.cpp
src/Events/Events_InfoMessage.h
src/Events/Events_Listener.cpp
src/Events/Events_LongOp.cpp
src/Events/Events_Loop.cpp
src/Events/Events_Loop.h
src/Events/Events_Message.h
src/ExchangeAPI/ExchangeAPI_Export.cpp
src/ExchangeAPI/ExchangeAPI_Export.h
src/ExchangeAPI/ExchangeAPI_Import.cpp
src/ExchangeAPI/ExchangeAPI_Import.h
src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp
src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp
src/ExchangePlugin/ExchangePlugin_ImportFeature.h
src/FeaturesAPI/FeaturesAPI_Boolean.cpp
src/FeaturesAPI/FeaturesAPI_Extrusion.h
src/FeaturesAPI/FeaturesAPI_ExtrusionBoolean.cpp
src/FeaturesAPI/FeaturesAPI_Intersection.cpp
src/FeaturesAPI/FeaturesAPI_Pipe.cpp
src/FeaturesAPI/FeaturesAPI_Placement.h
src/FeaturesAPI/FeaturesAPI_Recover.h
src/FeaturesAPI/FeaturesAPI_RemoveSubShapes.cpp
src/FeaturesAPI/FeaturesAPI_RemoveSubShapes.h
src/FeaturesAPI/FeaturesAPI_Revolution.cpp
src/FeaturesAPI/FeaturesAPI_Revolution.h
src/FeaturesAPI/FeaturesAPI_RevolutionBoolean.cpp
src/FeaturesAPI/FeaturesAPI_RevolutionBoolean.h
src/FeaturesAPI/FeaturesAPI_Translation.cpp
src/FeaturesAPI/FeaturesAPI_Union.cpp
src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp
src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp
src/FeaturesPlugin/FeaturesPlugin_CompositeSketch.cpp
src/FeaturesPlugin/FeaturesPlugin_CompositeSketch.h
src/FeaturesPlugin/FeaturesPlugin_ExtrusionBoolean.cpp
src/FeaturesPlugin/FeaturesPlugin_ExtrusionBoolean.h
src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp
src/FeaturesPlugin/FeaturesPlugin_Intersection.h
src/FeaturesPlugin/FeaturesPlugin_Partition.cpp
src/FeaturesPlugin/FeaturesPlugin_Pipe.cpp
src/FeaturesPlugin/FeaturesPlugin_Pipe.h
src/FeaturesPlugin/FeaturesPlugin_Placement.cpp
src/FeaturesPlugin/FeaturesPlugin_RemoveSubShapes.cpp
src/FeaturesPlugin/FeaturesPlugin_Revolution.cpp
src/FeaturesPlugin/FeaturesPlugin_RevolutionBoolean.h
src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp
src/FeaturesPlugin/FeaturesPlugin_Translation.cpp
src/FeaturesPlugin/FeaturesPlugin_Union.cpp
src/FeaturesPlugin/FeaturesPlugin_ValidatorTransform.cpp
src/FeaturesPlugin/FeaturesPlugin_Validators.cpp
src/GeomAPI/GeomAPI_AISObject.cpp
src/GeomAPI/GeomAPI_AISObject.h
src/GeomAPI/GeomAPI_Angle2d.h
src/GeomAPI/GeomAPI_Ax1.h
src/GeomAPI/GeomAPI_Ax2.h
src/GeomAPI/GeomAPI_Ax3.cpp
src/GeomAPI/GeomAPI_Ax3.h
src/GeomAPI/GeomAPI_Circ.cpp
src/GeomAPI/GeomAPI_Circ2d.h
src/GeomAPI/GeomAPI_Curve.h
src/GeomAPI/GeomAPI_DataMapOfShapeMapOfShapes.h
src/GeomAPI/GeomAPI_DataMapOfShapeShape.cpp
src/GeomAPI/GeomAPI_DataMapOfShapeShape.h
src/GeomAPI/GeomAPI_Dir.cpp
src/GeomAPI/GeomAPI_Dir.h
src/GeomAPI/GeomAPI_Dir2d.h
src/GeomAPI/GeomAPI_Edge.cpp
src/GeomAPI/GeomAPI_Edge.h
src/GeomAPI/GeomAPI_Face.cpp
src/GeomAPI/GeomAPI_Face.h
src/GeomAPI/GeomAPI_ICustomPrs.h
src/GeomAPI/GeomAPI_Lin.cpp
src/GeomAPI/GeomAPI_Lin.h
src/GeomAPI/GeomAPI_Lin2d.cpp
src/GeomAPI/GeomAPI_Lin2d.h
src/GeomAPI/GeomAPI_PlanarEdges.cpp
src/GeomAPI/GeomAPI_PlanarEdges.h
src/GeomAPI/GeomAPI_Pln.cpp
src/GeomAPI/GeomAPI_Pln.h
src/GeomAPI/GeomAPI_Pnt.h
src/GeomAPI/GeomAPI_Pnt2d.h
src/GeomAPI/GeomAPI_Shape.cpp
src/GeomAPI/GeomAPI_Shape.h
src/GeomAPI/GeomAPI_ShapeIterator.h
src/GeomAPI/GeomAPI_XY.h
src/GeomAPI/GeomAPI_XYZ.h
src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Box.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Box.h
src/GeomAlgoAPI/GeomAlgoAPI_BoxPoints.cpp
src/GeomAlgoAPI/GeomAlgoAPI_BoxPoints.h
src/GeomAlgoAPI/GeomAlgoAPI_CompoundBuilder.h
src/GeomAlgoAPI/GeomAlgoAPI_DFLoader.h
src/GeomAlgoAPI/GeomAlgoAPI_EdgeBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Exception.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Exception.h
src/GeomAlgoAPI/GeomAlgoAPI_FaceBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Intersection.cpp
src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.cpp
src/GeomAlgoAPI/GeomAlgoAPI_MakeShape.h
src/GeomAlgoAPI/GeomAlgoAPI_MakeShapeList.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Partition.cpp
src/GeomAlgoAPI/GeomAlgoAPI_PaveFiller.cpp
src/GeomAlgoAPI/GeomAlgoAPI_PaveFiller.h
src/GeomAlgoAPI/GeomAlgoAPI_Pipe.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Pipe.h
src/GeomAlgoAPI/GeomAlgoAPI_Placement.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Placement.h
src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_PointBuilder.h
src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Prism.h
src/GeomAlgoAPI/GeomAlgoAPI_Revolution.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Revolution.h
src/GeomAlgoAPI/GeomAlgoAPI_Sewing.h
src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.cpp
src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h
src/GeomAlgoAPI/GeomAlgoAPI_ShapeBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp
src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.h
src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp
src/GeomAlgoAPI/GeomAlgoAPI_WireBuilder.h
src/GeomData/GeomData_Point.h
src/GeomData/GeomData_Point2D.cpp
src/GeomData/GeomData_Point2D.h
src/GeomDataAPI/GeomDataAPI_Point.h
src/GeomDataAPI/GeomDataAPI_Point2D.h
src/GeomValidators/GeomValidators_BooleanArguments.cpp
src/GeomValidators/GeomValidators_BooleanArguments.h
src/GeomValidators/GeomValidators_ConstructionComposite.cpp
src/GeomValidators/GeomValidators_Different.cpp
src/GeomValidators/GeomValidators_Different.h
src/GeomValidators/GeomValidators_DifferentShapes.cpp
src/GeomValidators/GeomValidators_Face.cpp
src/GeomValidators/GeomValidators_FeatureKind.cpp
src/GeomValidators/GeomValidators_Finite.cpp
src/GeomValidators/GeomValidators_IntersectionSelection.cpp
src/GeomValidators/GeomValidators_MinObjectsSelected.cpp
src/GeomValidators/GeomValidators_PartitionArguments.cpp
src/GeomValidators/GeomValidators_PartitionArguments.h
src/GeomValidators/GeomValidators_Plugin.cpp
src/GeomValidators/GeomValidators_Positive.cpp
src/GeomValidators/GeomValidators_ShapeType.cpp
src/GeomValidators/GeomValidators_Tools.cpp
src/GeomValidators/GeomValidators_Tools.h
src/GeomValidators/GeomValidators_ZeroOffset.cpp
src/GeomValidators/GeomValidators_ZeroOffset.h
src/InitializationPlugin/InitializationPlugin_Plugin.cpp
src/InitializationPlugin/InitializationPlugin_Plugin.h
src/Model/Model_Application.h
src/Model/Model_AttributeDocRef.h
src/Model/Model_AttributeIntArray.cpp
src/Model/Model_AttributeIntArray.h
src/Model/Model_AttributeRefAttrList.cpp
src/Model/Model_AttributeRefList.cpp
src/Model/Model_AttributeReference.cpp
src/Model/Model_AttributeSelection.cpp
src/Model/Model_AttributeSelection.h
src/Model/Model_AttributeSelectionList.cpp
src/Model/Model_AttributeValidator.cpp
src/Model/Model_BodyBuilder.cpp
src/Model/Model_BodyBuilder.h
src/Model/Model_Data.cpp
src/Model/Model_Data.h
src/Model/Model_Document.cpp
src/Model/Model_Document.h
src/Model/Model_Events.cpp
src/Model/Model_Expression.cpp
src/Model/Model_FeatureValidator.cpp
src/Model/Model_Objects.cpp
src/Model/Model_Objects.h
src/Model/Model_ResultBody.cpp
src/Model/Model_ResultBody.h
src/Model/Model_ResultCompSolid.cpp
src/Model/Model_ResultConstruction.cpp
src/Model/Model_ResultPart.cpp
src/Model/Model_ResultPart.h
src/Model/Model_SelectionNaming.cpp
src/Model/Model_SelectionNaming.h
src/Model/Model_Session.cpp
src/Model/Model_Session.h
src/Model/Model_Update.cpp
src/Model/Model_Update.h
src/Model/Model_Validator.cpp
src/Model/Model_Validator.h
src/ModelAPI/ModelAPI_Attribute.cpp
src/ModelAPI/ModelAPI_Attribute.h
src/ModelAPI/ModelAPI_AttributeDouble.h
src/ModelAPI/ModelAPI_AttributeInteger.h
src/ModelAPI/ModelAPI_BodyBuilder.h
src/ModelAPI/ModelAPI_Data.h
src/ModelAPI/ModelAPI_Document.h
src/ModelAPI/ModelAPI_Events.cpp
src/ModelAPI/ModelAPI_Events.h
src/ModelAPI/ModelAPI_Expression.h
src/ModelAPI/ModelAPI_Result.h
src/ModelAPI/ModelAPI_ResultBody.cpp
src/ModelAPI/ModelAPI_ResultBody.h
src/ModelAPI/ModelAPI_ResultPart.h
src/ModelAPI/ModelAPI_Session.cpp
src/ModelAPI/ModelAPI_Session.h
src/ModelAPI/ModelAPI_Tools.cpp
src/ModelGeomAlgo/ModelGeomAlgo_Point2D.cpp
src/ModelHighAPI/ModelHighAPI_Double.cpp
src/ModelHighAPI/ModelHighAPI_Double.h
src/ModelHighAPI/ModelHighAPI_Dumper.cpp
src/ModelHighAPI/ModelHighAPI_Dumper.h
src/ModelHighAPI/ModelHighAPI_FeatureStore.cpp
src/ModelHighAPI/ModelHighAPI_FeatureStore.h
src/ModelHighAPI/ModelHighAPI_Integer.cpp
src/ModelHighAPI/ModelHighAPI_Integer.h
src/ModelHighAPI/ModelHighAPI_Interface.cpp
src/ModelHighAPI/ModelHighAPI_Interface.h
src/ModelHighAPI/ModelHighAPI_Macro.h
src/ModelHighAPI/ModelHighAPI_RefAttr.cpp
src/ModelHighAPI/ModelHighAPI_RefAttr.h
src/ModelHighAPI/ModelHighAPI_Reference.h
src/ModelHighAPI/ModelHighAPI_Selection.cpp
src/ModelHighAPI/ModelHighAPI_Selection.h
src/ModelHighAPI/ModelHighAPI_Services.cpp
src/ModelHighAPI/ModelHighAPI_Tools.cpp
src/ModelHighAPI/ModelHighAPI_Tools.h
src/ModuleBase/ModuleBase.h
src/ModuleBase/ModuleBase_ActionInfo.h
src/ModuleBase/ModuleBase_Dialog.cpp
src/ModuleBase/ModuleBase_Dialog.h
src/ModuleBase/ModuleBase_DoubleSpinBox.cpp
src/ModuleBase/ModuleBase_DoubleSpinBox.h
src/ModuleBase/ModuleBase_Filter.h
src/ModuleBase/ModuleBase_FilterFactory.cpp
src/ModuleBase/ModuleBase_FilterValidated.h
src/ModuleBase/ModuleBase_IErrorMgr.cpp
src/ModuleBase/ModuleBase_IModule.cpp
src/ModuleBase/ModuleBase_IModule.h
src/ModuleBase/ModuleBase_IPrefMgr.h
src/ModuleBase/ModuleBase_IPropertyPanel.h
src/ModuleBase/ModuleBase_ISelection.h
src/ModuleBase/ModuleBase_IViewWindow.h
src/ModuleBase/ModuleBase_IViewer.h
src/ModuleBase/ModuleBase_IWorkshop.h
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_Operation.cpp
src/ModuleBase/ModuleBase_Operation.h
src/ModuleBase/ModuleBase_OperationAction.cpp
src/ModuleBase/ModuleBase_OperationDescription.h
src/ModuleBase/ModuleBase_OperationFeature.cpp
src/ModuleBase/ModuleBase_OperationFeature.h
src/ModuleBase/ModuleBase_PageBase.cpp
src/ModuleBase/ModuleBase_PagedContainer.cpp
src/ModuleBase/ModuleBase_Preferences.cpp
src/ModuleBase/ModuleBase_Preferences.h
src/ModuleBase/ModuleBase_ResultPrs.cpp
src/ModuleBase/ModuleBase_ResultPrs.h
src/ModuleBase/ModuleBase_SelectionValidator.h
src/ModuleBase/ModuleBase_Tools.cpp
src/ModuleBase/ModuleBase_Tools.h
src/ModuleBase/ModuleBase_ViewerFilters.h
src/ModuleBase/ModuleBase_ViewerPrs.cpp
src/ModuleBase/ModuleBase_WidgetChoice.cpp
src/ModuleBase/ModuleBase_WidgetConcealedObjects.cpp
src/ModuleBase/ModuleBase_WidgetCreatorFactory.cpp
src/ModuleBase/ModuleBase_WidgetCreatorFactory.h
src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp
src/ModuleBase/ModuleBase_WidgetEditor.h
src/ModuleBase/ModuleBase_WidgetExprEditor.cpp
src/ModuleBase/ModuleBase_WidgetFactory.cpp
src/ModuleBase/ModuleBase_WidgetFeatureSelector.cpp
src/ModuleBase/ModuleBase_WidgetFileSelector.cpp
src/ModuleBase/ModuleBase_WidgetIntValue.cpp
src/ModuleBase/ModuleBase_WidgetLabel.cpp
src/ModuleBase/ModuleBase_WidgetLineEdit.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.h
src/ModuleBase/ModuleBase_WidgetSelector.cpp
src/ModuleBase/ModuleBase_WidgetSelectorStore.cpp
src/ModuleBase/ModuleBase_WidgetSelectorStore.h
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
src/ModuleBase/ModuleBase_WidgetSwitch.cpp
src/ModuleBase/ModuleBase_WidgetToolbox.cpp
src/ModuleBase/ModuleBase_WidgetValidated.cpp
src/ModuleBase/ModuleBase_WidgetValidated.h
src/ModuleBase/ModuleBase_WidgetValidator.cpp
src/ModuleBase/ModuleBase_WidgetValidator.h
src/ParametersAPI/ParametersAPI_Parameter.cpp
src/ParametersAPI/ParametersAPI_Parameter.h
src/ParametersPlugin/ParametersPlugin_EvalListener.cpp
src/ParametersPlugin/ParametersPlugin_EvalListener.h
src/ParametersPlugin/ParametersPlugin_Plugin.cpp
src/ParametersPlugin/ParametersPlugin_PyInterp.cpp
src/ParametersPlugin/ParametersPlugin_Validators.cpp
src/ParametersPlugin/ParametersPlugin_WidgetCreator.cpp
src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp
src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.h
src/PartSet/PartSet.h
src/PartSet/PartSet_CustomPrs.cpp
src/PartSet/PartSet_ExternalObjectsMgr.cpp
src/PartSet/PartSet_FilterInfinite.cpp
src/PartSet/PartSet_FilterInfinite.h
src/PartSet/PartSet_Filters.cpp
src/PartSet/PartSet_Filters.h
src/PartSet/PartSet_IconFactory.cpp
src/PartSet/PartSet_MenuMgr.cpp
src/PartSet/PartSet_MenuMgr.h
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_Module.h
src/PartSet/PartSet_MouseProcessor.h
src/PartSet/PartSet_OperationPrs.cpp
src/PartSet/PartSet_OverconstraintListener.cpp
src/PartSet/PartSet_OverconstraintListener.h
src/PartSet/PartSet_PreviewPlanes.cpp
src/PartSet/PartSet_PreviewPlanes.h
src/PartSet/PartSet_ResultSketchPrs.cpp
src/PartSet/PartSet_ResultSketchPrs.h
src/PartSet/PartSet_SketcherMgr.cpp
src/PartSet/PartSet_SketcherMgr.h
src/PartSet/PartSet_SketcherReetntrantMgr.cpp
src/PartSet/PartSet_SketcherReetntrantMgr.h
src/PartSet/PartSet_Tools.cpp
src/PartSet/PartSet_Tools.h
src/PartSet/PartSet_Validators.cpp
src/PartSet/PartSet_Validators.h
src/PartSet/PartSet_WidgetChoice.h
src/PartSet/PartSet_WidgetFileSelector.cpp
src/PartSet/PartSet_WidgetMultiSelector.cpp
src/PartSet/PartSet_WidgetMultiSelector.h
src/PartSet/PartSet_WidgetPoint2DFlyout.cpp
src/PartSet/PartSet_WidgetPoint2DFlyout.h
src/PartSet/PartSet_WidgetPoint2d.cpp
src/PartSet/PartSet_WidgetPoint2d.h
src/PartSet/PartSet_WidgetPoint2dDistance.cpp
src/PartSet/PartSet_WidgetPoint2dDistance.h
src/PartSet/PartSet_WidgetShapeSelector.cpp
src/PartSet/PartSet_WidgetShapeSelector.h
src/PartSet/PartSet_WidgetSketchCreator.cpp
src/PartSet/PartSet_WidgetSketchCreator.h
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/PartSet/PartSet_WidgetSubShapeSelector.cpp
src/PartSet/PartSet_WidgetSubShapeSelector.h
src/PartSetAPI/PartSetAPI_Part.cpp
src/PartSetAPI/PartSetAPI_Part.h
src/PartSetPlugin/PartSetPlugin_Duplicate.h
src/PartSetPlugin/PartSetPlugin_Remove.cpp
src/PrimitivesAPI/PrimitivesAPI_Box.h
src/PrimitivesAPI/PrimitivesAPI_swig.h
src/PrimitivesPlugin/PrimitivesPlugin_Box.cpp
src/PrimitivesPlugin/PrimitivesPlugin_Box.h
src/SHAPERGUI/SHAPERGUI.cpp
src/SHAPERGUI/SHAPERGUI.h
src/SHAPERGUI/SHAPERGUI_DataModel.cpp
src/SHAPERGUI/SHAPERGUI_DataModel.h
src/SHAPERGUI/SHAPERGUI_NestedButton.cpp
src/SHAPERGUI/SHAPERGUI_NestedButton.h
src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp
src/SHAPERGUI/SHAPERGUI_SalomeViewer.h
src/SketchAPI/SketchAPI_Arc.cpp
src/SketchAPI/SketchAPI_Constraint.cpp
src/SketchAPI/SketchAPI_Constraint.h
src/SketchAPI/SketchAPI_IntersectionPoint.cpp
src/SketchAPI/SketchAPI_IntersectionPoint.h
src/SketchAPI/SketchAPI_Line.cpp
src/SketchAPI/SketchAPI_Line.h
src/SketchAPI/SketchAPI_Mirror.cpp
src/SketchAPI/SketchAPI_Mirror.h
src/SketchAPI/SketchAPI_Point.cpp
src/SketchAPI/SketchAPI_Point.h
src/SketchAPI/SketchAPI_Projection.cpp
src/SketchAPI/SketchAPI_Projection.h
src/SketchAPI/SketchAPI_Rectangle.cpp
src/SketchAPI/SketchAPI_Rectangle.h
src/SketchAPI/SketchAPI_Rotation.cpp
src/SketchAPI/SketchAPI_Rotation.h
src/SketchAPI/SketchAPI_Sketch.cpp
src/SketchAPI/SketchAPI_Sketch.h
src/SketchAPI/SketchAPI_SketchEntity.cpp
src/SketchAPI/SketchAPI_SketchEntity.h
src/SketchAPI/SketchAPI_Translation.cpp
src/SketchAPI/SketchAPI_Translation.h
src/SketchPlugin/SketchPlugin_Arc.cpp
src/SketchPlugin/SketchPlugin_Arc.h
src/SketchPlugin/SketchPlugin_Circle.cpp
src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp
src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp
src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp
src/SketchPlugin/SketchPlugin_ConstraintFillet.h
src/SketchPlugin/SketchPlugin_ConstraintLength.cpp
src/SketchPlugin/SketchPlugin_ConstraintMirror.cpp
src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.cpp
src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp
src/SketchPlugin/SketchPlugin_ConstraintRigid.cpp
src/SketchPlugin/SketchPlugin_ConstraintSplit.cpp
src/SketchPlugin/SketchPlugin_ConstraintSplit.h
src/SketchPlugin/SketchPlugin_ExternalValidator.cpp
src/SketchPlugin/SketchPlugin_ExternalValidator.h
src/SketchPlugin/SketchPlugin_Feature.cpp
src/SketchPlugin/SketchPlugin_IntersectionPoint.cpp
src/SketchPlugin/SketchPlugin_Line.cpp
src/SketchPlugin/SketchPlugin_MultiRotation.cpp
src/SketchPlugin/SketchPlugin_MultiTranslation.cpp
src/SketchPlugin/SketchPlugin_Plugin.cpp
src/SketchPlugin/SketchPlugin_Point.cpp
src/SketchPlugin/SketchPlugin_Projection.cpp
src/SketchPlugin/SketchPlugin_Sketch.cpp
src/SketchPlugin/SketchPlugin_Sketch.h
src/SketchPlugin/SketchPlugin_SketchEntity.cpp
src/SketchPlugin/SketchPlugin_SketchEntity.h
src/SketchPlugin/SketchPlugin_Tools.cpp
src/SketchPlugin/SketchPlugin_Tools.h
src/SketchPlugin/SketchPlugin_Validators.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Builder.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Builder.h
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EntityWrapper.h
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.h
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.h
src/SketchSolver/SketchSolver_Builder.cpp
src/SketchSolver/SketchSolver_Builder.h
src/SketchSolver/SketchSolver_Constraint.cpp
src/SketchSolver/SketchSolver_Constraint.h
src/SketchSolver/SketchSolver_ConstraintCollinear.h
src/SketchSolver/SketchSolver_ConstraintDistance.h
src/SketchSolver/SketchSolver_ConstraintFixed.h
src/SketchSolver/SketchSolver_ConstraintFixedArcRadius.h
src/SketchSolver/SketchSolver_ConstraintLength.cpp
src/SketchSolver/SketchSolver_ConstraintMiddle.h
src/SketchSolver/SketchSolver_ConstraintMovement.cpp
src/SketchSolver/SketchSolver_ConstraintMovement.h
src/SketchSolver/SketchSolver_ConstraintMulti.cpp
src/SketchSolver/SketchSolver_ConstraintMulti.h
src/SketchSolver/SketchSolver_ConstraintMultiRotation.cpp
src/SketchSolver/SketchSolver_ConstraintMultiTranslation.cpp
src/SketchSolver/SketchSolver_ConstraintTangent.cpp
src/SketchSolver/SketchSolver_Error.h
src/SketchSolver/SketchSolver_Group.cpp
src/SketchSolver/SketchSolver_Group.h
src/SketchSolver/SketchSolver_Manager.cpp
src/SketchSolver/SketchSolver_Manager.h
src/SketchSolver/SketchSolver_Storage.cpp
src/SketchSolver/SketchSolver_Storage.h
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.h
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ConstraintWrapper.cpp
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_ParameterWrapper.cpp
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Solver.h
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.h
src/SketcherPrs/SketcherPrs_Angle.cpp
src/SketcherPrs/SketcherPrs_Angle.h
src/SketcherPrs/SketcherPrs_Coincident.cpp
src/SketcherPrs/SketcherPrs_Coincident.h
src/SketcherPrs/SketcherPrs_Collinear.cpp
src/SketcherPrs/SketcherPrs_Collinear.h
src/SketcherPrs/SketcherPrs_DimensionStyleListener.cpp
src/SketcherPrs/SketcherPrs_Equal.cpp
src/SketcherPrs/SketcherPrs_Equal.h
src/SketcherPrs/SketcherPrs_Factory.cpp
src/SketcherPrs/SketcherPrs_HVDirection.cpp
src/SketcherPrs/SketcherPrs_HVDirection.h
src/SketcherPrs/SketcherPrs_LengthDimension.cpp
src/SketcherPrs/SketcherPrs_LengthDimension.h
src/SketcherPrs/SketcherPrs_Middle.cpp
src/SketcherPrs/SketcherPrs_Middle.h
src/SketcherPrs/SketcherPrs_Mirror.cpp
src/SketcherPrs/SketcherPrs_Mirror.h
src/SketcherPrs/SketcherPrs_Parallel.cpp
src/SketcherPrs/SketcherPrs_Parallel.h
src/SketcherPrs/SketcherPrs_Perpendicular.cpp
src/SketcherPrs/SketcherPrs_Perpendicular.h
src/SketcherPrs/SketcherPrs_PositionMgr.cpp
src/SketcherPrs/SketcherPrs_PositionMgr.h
src/SketcherPrs/SketcherPrs_Radius.cpp
src/SketcherPrs/SketcherPrs_Radius.h
src/SketcherPrs/SketcherPrs_Rigid.cpp
src/SketcherPrs/SketcherPrs_Rigid.h
src/SketcherPrs/SketcherPrs_SensitivePoint.h
src/SketcherPrs/SketcherPrs_SymbolPrs.cpp
src/SketcherPrs/SketcherPrs_SymbolPrs.h
src/SketcherPrs/SketcherPrs_Tangent.cpp
src/SketcherPrs/SketcherPrs_Tangent.h
src/SketcherPrs/SketcherPrs_Tools.cpp
src/SketcherPrs/SketcherPrs_Tools.h
src/SketcherPrs/SketcherPrs_Transformation.cpp
src/SketcherPrs/SketcherPrs_Transformation.h
src/XGUI/XGUI_ActionsMgr.cpp
src/XGUI/XGUI_ActionsMgr.h
src/XGUI/XGUI_ColorDialog.cpp
src/XGUI/XGUI_ColorDialog.h
src/XGUI/XGUI_ContextMenuMgr.cpp
src/XGUI/XGUI_CustomPrs.cpp
src/XGUI/XGUI_DataModel.cpp
src/XGUI/XGUI_DataModel.h
src/XGUI/XGUI_Displayer.cpp
src/XGUI/XGUI_Displayer.h
src/XGUI/XGUI_ErrorMgr.cpp
src/XGUI/XGUI_MenuMgr.cpp
src/XGUI/XGUI_MenuMgr.h
src/XGUI/XGUI_ModuleConnector.cpp
src/XGUI/XGUI_ModuleConnector.h
src/XGUI/XGUI_ObjectsBrowser.cpp
src/XGUI/XGUI_OperationMgr.cpp
src/XGUI/XGUI_PropertyPanel.cpp
src/XGUI/XGUI_QtEvents.cpp
src/XGUI/XGUI_SalomeConnector.h
src/XGUI/XGUI_Selection.cpp
src/XGUI/XGUI_Selection.h
src/XGUI/XGUI_SelectionMgr.cpp
src/XGUI/XGUI_Tools.cpp
src/XGUI/XGUI_ViewerProxy.cpp
src/XGUI/XGUI_ViewerProxy.h
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_Workshop.h
src/XGUI/XGUI_WorkshopListener.cpp
src/XGUI/XGUI_WorkshopListener.h

diff --git a/findEndLines.sh b/findEndLines.sh
new file mode 100755 (executable)
index 0000000..b6e51e2
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+find . \( -name "*.h" -o -name "*.cpp" \) -exec cpplint.py --filter=-,+whitespace/end_of_line  --verbose=0 --counting=detailed {} \+ 2>&1 | grep -v Done | tee ./tofix
+
+python correction_auto_2.py --cpplint_output_file ./tofix
+
+rm ./tofix
\ No newline at end of file
index c614eb411379fc0c71c15f5585d2a0deab54f1a5..5e48dc044a73b6006b6b6217f7323bd0f8c50bdf 100644 (file)
@@ -36,7 +36,7 @@ public:
   virtual ~BuildAPI_Face();
 
   INTERFACE_1(BuildPlugin_Face::ID(),
-              baseObjects, BuildPlugin_Face::BASE_OBJECTS_ID(), 
+              baseObjects, BuildPlugin_Face::BASE_OBJECTS_ID(),
               ModelAPI_AttributeSelectionList, /** Base objects */)
 
   /// Modify base attribute of the feature.
index f14e87897da720c324d43572d43150c1141158be..6bc594fdf92a355926758bf8b5af3110bc59a2dc 100644 (file)
@@ -36,7 +36,7 @@ public:
   virtual ~BuildAPI_Vertex();
 
   INTERFACE_1(BuildPlugin_Vertex::ID(),
-              baseObjects, BuildPlugin_Vertex::BASE_OBJECTS_ID(), 
+              baseObjects, BuildPlugin_Vertex::BASE_OBJECTS_ID(),
               ModelAPI_AttributeSelectionList, /** Base objects */)
 
   /// Modify base attribute of the feature.
index b90e749459d9728d538d5ed02fbee2f6cd39d41f..687341cf1dd900972d02cc768f19b07b29ee5ec8 100644 (file)
@@ -72,7 +72,7 @@ void BuildPlugin_Shell::execute()
     ResultBodyPtr aResultBody = document()->createBody(data(), anIndex);
     aResultBody->store(aShell);
     for(ListOfShape::const_iterator anIt = aShapes.cbegin(); anIt != aShapes.cend(); ++anIt) {
-      for(GeomAPI_ShapeExplorer 
+      for(GeomAPI_ShapeExplorer
           aFaceExp(*anIt, GeomAPI_Shape::FACE); aFaceExp.more(); aFaceExp.next()) {
         GeomShapePtr aFace = aFaceExp.current();
         ListOfShape aHistory;
index 4ff1e7dfb90d0609e3c30f05d586ee3eb64e883e..613e343629388cc70f11c205ccccd512b75b4233 100644 (file)
@@ -79,7 +79,7 @@ bool BuildPlugin_ValidatorBaseForBuild::isValid(const AttributePtr& theAttribute
     }
 
     // Check that it is shape on sketch.
-    ResultConstructionPtr aConstruction = 
+    ResultConstructionPtr aConstruction =
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
     if(aConstruction.get()) {
       if(aConstruction->isInfinite()) {
@@ -87,7 +87,7 @@ bool BuildPlugin_ValidatorBaseForBuild::isValid(const AttributePtr& theAttribute
         return false;
       }
 
-      std::shared_ptr<GeomAPI_PlanarEdges> anEdges = 
+      std::shared_ptr<GeomAPI_PlanarEdges> anEdges =
         std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aContextShape);
       if(anEdges.get()) {
         if(aShape->isEqual(aContextShape)) {
@@ -200,7 +200,7 @@ bool BuildPlugin_ValidatorBaseForFace::isValid(const std::shared_ptr<ModelAPI_Fe
     GeomShapePtr aSectedEdges = aPaveFiller.shape();
 
     int anEdgesNum = 0;
-    for(GeomAPI_ShapeExplorer 
+    for(GeomAPI_ShapeExplorer
         anExp(aSectedEdges, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
       anEdgesNum++;
     }
@@ -219,7 +219,7 @@ bool BuildPlugin_ValidatorBaseForFace::isValid(const std::shared_ptr<ModelAPI_Fe
 
   // Check that selected objects have closed contours.
   ListOfShape aFaces;
-  GeomAlgoAPI_SketchBuilder::createFaces(aPln->location(), aPln->xDirection(), 
+  GeomAlgoAPI_SketchBuilder::createFaces(aPln->location(), aPln->xDirection(),
                                          aPln->direction(), anEdges, aFaces);
   if(aFaces.empty()) {
     theError = "Selected objects does not have closed contours.";
@@ -230,7 +230,7 @@ bool BuildPlugin_ValidatorBaseForFace::isValid(const std::shared_ptr<ModelAPI_Fe
 }
 
 //=================================================================================================
-bool BuildPlugin_ValidatorBaseForFace::isNotObligatory(std::string theFeature, 
+bool BuildPlugin_ValidatorBaseForFace::isNotObligatory(std::string theFeature,
                                                        std::string theAttribute)
 {
   return false;
@@ -250,7 +250,7 @@ bool BuildPlugin_ValidatorSubShapesSelection::isValid(const AttributePtr& theAtt
 
   // Get base objects list.
   if(theAttribute->attributeType() != ModelAPI_AttributeSelectionList::typeId()) {
-    std::string aMsg = 
+    std::string aMsg =
       "Error: BuildPlugin_ValidatorSubShapesSelection does not support attribute type \""
       "%1\"\n Only \"%2\" supported.";
     Events_InfoMessage("BuildPlugin_Validators", aMsg).
index 4edd43894b194f0670fb91856ade13ff632407df..347ef5f22f4db23d368ae2fa3fca5ef1fa028ced 100644 (file)
@@ -12,7 +12,7 @@
 
 /// \class BuildPlugin_ValidatorBaseForBuild
 /// \ingroup Validators
-/// \brief A validator for selection base shapes for build features. 
+/// \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
index 15a832b7d6d1a48b32fd50e7c4828a0bc785bdac..c8004f617fe6bed1e243e9325ef75496bb743907 100644 (file)
@@ -128,7 +128,7 @@ bool BuildPlugin_Wire::addContour()
       continue;
     }
     GeomShapePtr aContextShape = aConstruction->shape();
-    std::shared_ptr<GeomAPI_PlanarEdges> aPlanarEdges = 
+    std::shared_ptr<GeomAPI_PlanarEdges> aPlanarEdges =
       std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aContextShape);
     if(!aPlanarEdges.get()) {
       continue;
@@ -151,17 +151,17 @@ bool BuildPlugin_Wire::addContour()
     AttributeSelectionPtr aSelection = *aListIt;
     std::shared_ptr<GeomAPI_Edge> anEdgeInList(new GeomAPI_Edge(aSelection->value()));
 
-    ResultConstructionPtr aConstruction = 
+    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 
+      for(GeomAPI_ShapeExplorer
           aWireExp(aFace, GeomAPI_Shape::WIRE); aWireExp.more(); aWireExp.next()) {
         GeomShapePtr aWireOnFace = aWireExp.current();
-        for(GeomAPI_ShapeExplorer 
+        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)) {
@@ -177,7 +177,7 @@ bool BuildPlugin_Wire::addContour()
 
     // If wire with the same edge found. Add all other edges to list.
     if(aFoundWire.get()) {
-      for(GeomAPI_ShapeExplorer 
+      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();
@@ -196,7 +196,7 @@ bool BuildPlugin_Wire::addContour()
   }
 
   if(!isAnyContourAdded) {
-    Events_InfoMessage("BuildPlugin_Wire", 
+    Events_InfoMessage("BuildPlugin_Wire",
       "Error: Contours already closed or no contours found for selected edges.").send();
     return false;
   }
index 46a3f3ce1d8301422dbff62227a2cd4d3bf0ef23..cb866a7d55dbca72facd4af0cd0c8c825b8f3d0d 100644 (file)
@@ -55,7 +55,7 @@ bool isAttributeNode(xmlNodePtr theNode)
   if(!isElementNode(theNode))
     return false;
   // it's parent is "feature" or "source" or page ("case" or "box")
-  if(!hasParent(theNode, NODE_FEATURE, NODE_SOURCE, 
+  if(!hasParent(theNode, NODE_FEATURE, NODE_SOURCE,
                          WDG_GROUP, WDG_OPTIONALBOX,
                          WDG_TOOLBOX_BOX, WDG_SWITCH_CASE, NULL))
     return false;
@@ -233,7 +233,7 @@ std::string getProperty(xmlNodePtr theNode, const char* thePropName)
   xmlFree(aPropChars);
 
   std::string::iterator new_end = std::unique(result.begin(), result.end(), BothAreSpaces);
-  result.erase(new_end, result.end()); 
+  result.erase(new_end, result.end());
 
   return result;
 }
index b9c000104422fff2548c678625828d53f6a85ce8..20e8203508c9ec8f034260b970241df8f9c70dc5 100644 (file)
@@ -31,7 +31,7 @@ void Config_DataModelReader::processNode(xmlNodePtr theNode)
     if (aName.empty() || aGroupType.empty())
       Events_InfoMessage("Config_DataModelReader",
         "Reading dataModel.xml: wrong folder definition.").send();
-   
+
     std::string aIcon = getProperty(theNode, NODE_ICON);
     std::string aEmpty = getProperty(theNode, SHOW_EMPTY);
     std::string aFeatures = getProperty(theNode, FOLDER_FEATURES);
@@ -91,7 +91,7 @@ int Config_DataModelReader::subFolderId(std::string theType) const
   return -1;
 }
 
-std::string getFolderFeatures(const std::string& theFolderName, 
+std::string getFolderFeatures(const std::string& theFolderName,
                     const std::vector<std::string>& theNames,
                     const std::vector<std::string>& theFeatures)
 {
index a66ad0f020b1357cf21154f68c31311044e733ca..7246fddb470f3c1195cc3768f31872476e01dc3d 100755 (executable)
@@ -35,7 +35,7 @@ class Config_DataModelReader : public Config_XMLReader
   /// Returns name of type of tree items in root
   CONFIG_EXPORT std::string rootType() const { return myRootTypes; }
 
-  /// Returns number of folders under root 
+  /// Returns number of folders under root
   CONFIG_EXPORT size_t rootFoldersNumber() const { return myRootFolderNames.size(); }
 
   /// Returns name of the folder by its Id
@@ -67,7 +67,7 @@ class Config_DataModelReader : public Config_XMLReader
   /// Returns name of type of tree items in sub document
   CONFIG_EXPORT std::string subType() const { return mySubTypes; }
 
-  /// Returns number of folders under sub document 
+  /// Returns number of folders under sub document
   CONFIG_EXPORT size_t subFoldersNumber() const { return mySubFolderNames.size(); }
 
   /// Returns name of the folder by its Id
index ed25f9821832ade3c5f82bc4a33562f4858a679d..5427e7dd3aa303a985197048a435877d48bb2e5e 100644 (file)
@@ -51,7 +51,7 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
   Events_ID aMenuItemEvent = Events_Loop::eventByName(myEventGenerated);
   if (isNode(theNode, NODE_FEATURE, NULL)) {
     storeAttribute(theNode, _ID);
-    std::shared_ptr<Config_FeatureMessage> 
+    std::shared_ptr<Config_FeatureMessage>
       aMessage(new Config_FeatureMessage(aMenuItemEvent, this));
     fillFeature(theNode, aMessage);
     myFeatures.push_back(getProperty(theNode, _ID));
@@ -89,7 +89,7 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
             aSwitchNode = hasParentRecursive(aCaseNode, WDG_TOOLBOX, NULL);
           }
           if (!xmlStrcmp(aName, (const xmlChar *) WDG_OPTIONALBOX)) {
-            /// the box is optional, attribute is in case 
+            /// the box is optional, attribute is in case
             /// if the optional attribute value is not empty
             aSwitchNode = aCaseNode;
           }
@@ -97,7 +97,7 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
             aSwitchNodeID = getProperty(aSwitchNode, _ID);
 
           aCases.push_back(std::make_pair(aSwitchNodeID, aCaseNodeID));
-          aCaseNode = hasParentRecursive(aSwitchNode, WDG_SWITCH_CASE, 
+          aCaseNode = hasParentRecursive(aSwitchNode, WDG_SWITCH_CASE,
                                          WDG_TOOLBOX_BOX, WDG_OPTIONALBOX, NULL);
         }
         aMessage->setCases(aCases);
@@ -126,7 +126,7 @@ bool Config_FeatureReader::processChildren(xmlNodePtr theNode)
 {
   bool result = isNode(theNode, NODE_WORKBENCH, NODE_GROUP, NULL);
   if(!result && myIsProcessWidgets) {
-    result = isNode(theNode, NODE_FEATURE, 
+    result = isNode(theNode, NODE_FEATURE,
                              WDG_GROUP, WDG_OPTIONALBOX,
                              WDG_TOOLBOX, WDG_TOOLBOX_BOX,
                              WDG_SWITCH, WDG_SWITCH_CASE, NULL);
@@ -150,7 +150,7 @@ void Config_FeatureReader::fillFeature(xmlNodePtr theFeatureNode,
     //Internal feature has no visual representation.
     return;
   }
-  
+
   outFeatureMessage->setText(getProperty(theFeatureNode, FEATURE_TEXT));
   outFeatureMessage->setTooltip(getProperty(theFeatureNode, FEATURE_TOOLTIP));
   outFeatureMessage->setIcon(getProperty(theFeatureNode, FEATURE_ICON));
index 409af6c7ec4270ae3db3e4d98f5f4a7a23c57339..8a976a59abc080014be38fbb3267f1b7a17e6377 100644 (file)
@@ -46,7 +46,7 @@ class Config_FeatureReader : public Config_XMLReader
   virtual bool processChildren(xmlNodePtr aNode);
 
   /// Fills feature message
-  void fillFeature(xmlNodePtr theRoot, 
+  void fillFeature(xmlNodePtr theRoot,
                    const std::shared_ptr<Config_FeatureMessage>& outFeatureMessage);
 
  private:
index 1b206fba6f97b3e59618101a058ee5e4515d9788..ddb2742407438828378759086cc03fde739aff55 100644 (file)
@@ -219,11 +219,11 @@ void Config_ModuleReader::loadLibrary(const std::string& theLibName)
     DWORD   dwLastError = ::GetLastError();
     LPSTR messageBuffer = NULL;
     size_t size = ::FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
-                                 FORMAT_MESSAGE_FROM_SYSTEM | 
+                                 FORMAT_MESSAGE_FROM_SYSTEM |
                                  FORMAT_MESSAGE_IGNORE_INSERTS,
-                                 NULL, 
-                                 dwLastError, 
-                                 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), 
+                                 NULL,
+                                 dwLastError,
+                                 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                                  (LPSTR)&messageBuffer, 0, NULL);
     anErrorMsg += ": " +  std::string(messageBuffer, size);
     #else
index a8b1910bc8a54e7db5e744ea7e72443d3af48b73..881a10d2db1e293adb24fca476bc5493df4a2438 100644 (file)
@@ -42,7 +42,7 @@ class Config_ModuleReader : public Config_XMLReader
   /// Returns list of module's xml files
   CONFIG_EXPORT const std::set<std::string>& modulePluginFiles() const;
   /// Returns module name: an xml attribute from the root of the plugins.xml:
-  /// e.g \code <plugins module="PartSet"> \endcode 
+  /// e.g \code <plugins module="PartSet"> \endcode
   CONFIG_EXPORT std::string getModuleName();
   /// Detects type of the given plugin and loads it using loadLibrary or loadScript.
   CONFIG_EXPORT static void loadPlugin(const std::string& thePluginName);
@@ -70,7 +70,7 @@ class Config_ModuleReader : public Config_XMLReader
   std::string addPlugin(const std::string& aPluginLibrary,
                         const std::string& aPluginScript,
                         const std::string& aPluginConf);
-  /// Save feature in myFeaturesInFiles. 
+  /// Save feature in myFeaturesInFiles.
   /// Generates an error if the feature name is already registered.
   void addFeature(const std::string& theFeatureName, const std::string& thePluginConfig);
 
index de17ec1a5fddd86dfaa67a9a9cdd3616ce5a68e6..1928fbfc38ea8c5a5fef65735ec5f64fe69bb744 100644 (file)
@@ -13,7 +13,7 @@ bool stringToBoolean(const std::string& theInt);
 
 Config_Properties Config_PropManager::myProps;
 
-Config_Prop* Config_PropManager::registerProp(const std::string& theSection, 
+Config_Prop* Config_PropManager::registerProp(const std::string& theSection,
                                               const std::string& theName,
                                               const std::string& theTitle,
                                               Config_Prop::PropType theType,
index c292159bde69634941b505851fa5832b5040b5ce..3760faca38cc1e6d6e0e05faf57461b278e6e843 100644 (file)
@@ -132,8 +132,8 @@ std::string Config_Translator::translate(const std::string& theContext,
 
 
 std::string Config_Translator::codec(const std::string& theContext)
-{ 
-  return (myCodecs.count(theContext) > 0)? myCodecs[theContext] : "UTF-8"; 
+{
+  return (myCodecs.count(theContext) > 0)? myCodecs[theContext] : "UTF-8";
 }
 
 
index 8a7236b212eaf09c3f002f0078a3b5d6b9f7e280..d15293f6758f18168e946f9be2ca90661ad25615 100644 (file)
@@ -70,7 +70,7 @@ void Config_ValidatorReader::processValidator(xmlNodePtr theNode)
 {
   Events_ID aValidatoEvent = Events_Loop::eventByName(EVENT_VALIDATOR_LOADED);
   Events_Loop* aEvLoop = Events_Loop::loop();
-  std::shared_ptr<Config_ValidatorMessage> 
+  std::shared_ptr<Config_ValidatorMessage>
     aMessage(new Config_ValidatorMessage(aValidatoEvent, this));
   std::string aValidatorId;
   std::list<std::string> aParameters;
index 1dab4ac3d46667278c11936eeba332ec55bb1b57..1a53ece53e28d328131d680dfc48dcf903e45b77 100644 (file)
@@ -36,7 +36,7 @@
 Config_XMLReader::Config_XMLReader(const std::string& theXmlFileName)
     : myXmlDoc(NULL)
 {
-  std::string prefix = ""; 
+  std::string prefix = "";
   Config_Prop* aProp = Config_PropManager::findProp("Plugins", "default_path");
   if (aProp)
     prefix = aProp->value();
@@ -51,7 +51,7 @@ Config_XMLReader::Config_XMLReader(const std::string& theXmlFileName)
 
   myDocumentPath = prefix + FSEP + theXmlFileName;
   std::ifstream aTestFile(myDocumentPath);
-  if (!aTestFile) 
+  if (!aTestFile)
     Events_InfoMessage("Config_XMLReader", "Unable to open %1").arg(myDocumentPath).send();
   aTestFile.close();
 }
@@ -201,6 +201,6 @@ bool Config_XMLReader::cleanupAttribute(const char* theNodeName, const char* the
 }
 
 const char* Config_XMLReader::encoding() const
-{ 
-  return (const char*) myXmlDoc->encoding; 
+{
+  return (const char*) myXmlDoc->encoding;
 }
\ No newline at end of file
index d572bbfd6e10e1dfd63fda44ae7a9f6d457a7ab9..f6ae53da6645fbc8aa2502cf0c40f496b3a2af92 100644 (file)
@@ -17,4 +17,4 @@
 #endif
 #endif
 
-#endif //CONFIG_H\r
\ No newline at end of file
+#endif //CONFIG_H
index 35b12b263b7229717944c5d488d352d6cd6a4f23..3586637f94c963e0d44c0c3dbda8c4b130674e99 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
 
 // Name   : ConnectorAPI_Connector.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
index 9c8c210ab8ae3bb7907e4e620ed1fb76ef531bc8..07e0e9a5522070041142c949e7bf06fe9d4ee1bf 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
 
 // Name   : ConnectorAPI_Connector.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
index 6883edf46289d71406b861d4537005efff27b343..f05e41edba5566bd5b3cc7fa99a256d00e44e906 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
 
 // Name   : ConstructionAPI_Axis.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 15/06/16 - Sergey POKHODENKO - Creation of the file
@@ -88,7 +88,7 @@ ConstructionAPI_Axis::ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Featur
 : ModelHighAPI_Interface(theFeature)
 {
   if(initialize()) {
-    setByTwoPlanes(thePlane1, theOffset1, theReverseOffset1, 
+    setByTwoPlanes(thePlane1, theOffset1, theReverseOffset1,
                    thePlane2, theOffset2, theReverseOffset2);
   }
 }
@@ -150,7 +150,7 @@ void ConstructionAPI_Axis::setByPointAndDirection(const ModelHighAPI_Selection&
                                                   const ModelHighAPI_Double& theY,
                                                   const ModelHighAPI_Double& theZ)
 {
-  fillAttribute(ConstructionPlugin_Axis::CREATION_METHOD_BY_POINT_AND_DIRECTION(), 
+  fillAttribute(ConstructionPlugin_Axis::CREATION_METHOD_BY_POINT_AND_DIRECTION(),
                 creationMethod());
   fillAttribute(thePoint, firstPoint());
   fillAttribute(theX, xDirection());
index 477ce6c3714d44bbf00739394335405e35a54fd0..0d08cdbaf837c0a9ac35cebfed08623f7c80c6dd 100644 (file)
@@ -3,7 +3,7 @@
 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
 
 // Name   : ConstructionAPI_Axis.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 15/06/16 - Sergey POKHODENKO - Creation of the file
index 9d7a3d96ec20349e2dc0642e97f8c1bdd5e07f18..5c2c28d5d30c1f0a6636356c7a698192aa817bb2 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
 
 // Name   : ConstructionAPI_Plane.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 27/05/16 - Sergey POKHODENKO - Creation of the file
@@ -161,7 +161,7 @@ void ConstructionAPI_Plane::setByLineAndPoint(const ModelHighAPI_Selection& theL
 void ConstructionAPI_Plane::setByTwoParallelPlanes(const ModelHighAPI_Selection& thePlane1,
                                                    const ModelHighAPI_Selection& thePlane2)
 {
-  fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_TWO_PARALLEL_PLANES(), 
+  fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_TWO_PARALLEL_PLANES(),
                 mycreationMethod);
   fillAttribute(thePlane1, myplane1);
   fillAttribute(thePlane2, myplane2);
@@ -175,7 +175,7 @@ void ConstructionAPI_Plane::setByCoincidentToPoint(const ModelHighAPI_Selection&
 {
   fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_OTHER_PLANE(), mycreationMethod);
   fillAttribute(thePlane, myplane);
-  fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_COINCIDENT_TO_POINT(), 
+  fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_COINCIDENT_TO_POINT(),
                 mycreationMethodByOtherPlane);
   fillAttribute(thePoint, mycoincidentPoint);
 
@@ -189,7 +189,7 @@ void ConstructionAPI_Plane::setByRotation(const ModelHighAPI_Selection& thePlane
 {
   fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_OTHER_PLANE(), mycreationMethod);
   fillAttribute(thePlane, myplane);
-  fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_ROTATION(), 
+  fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_ROTATION(),
                 mycreationMethodByOtherPlane);
   fillAttribute(theAxis, myaxis);
   fillAttribute(theAngle, myangle);
@@ -239,9 +239,9 @@ void ConstructionAPI_Plane::dump(ModelHighAPI_Dumper& theDumper) const
       AttributeBooleanPtr anAttrReverse = aBase->boolean(ConstructionPlugin_Plane::REVERSE());
 
       theDumper << ", " << anAttrPlane << ", " << anAttrDistance << ", " << anAttrReverse;
-    } else if(aCreationMethodOption == 
+    } else if(aCreationMethodOption ==
               ConstructionPlugin_Plane::CREATION_METHOD_BY_COINCIDENT_TO_POINT()) {
-      AttributeSelectionPtr anAttrPoint = 
+      AttributeSelectionPtr anAttrPoint =
         aBase->selection(ConstructionPlugin_Plane::COINCIDENT_POINT());
 
       theDumper << ", " << anAttrPlane << ", " << anAttrPoint;
@@ -251,7 +251,7 @@ void ConstructionAPI_Plane::dump(ModelHighAPI_Dumper& theDumper) const
 
       theDumper << ", " << anAttrPlane << ", " << anAttrAxis << ", " << anAttrAngle;
     }
-  } else if(aCreationMethod == 
+  } else if(aCreationMethod ==
             ConstructionPlugin_Plane::CREATION_METHOD_BY_TWO_PARALLEL_PLANES()) {
     AttributeSelectionPtr anAttrPlane1 = aBase->selection(ConstructionPlugin_Plane::PLANE1());
     AttributeSelectionPtr anAttrPlane2 = aBase->selection(ConstructionPlugin_Plane::PLANE2());
index b2d206e8c3247352b8385a002053226ba6ebc256..b3bab93bba4cbf943348ebeb0a37af7ae9890f9e 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
 
 // Name   : ConstructionAPI_Plane.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 27/05/16 - Sergey POKHODENKO - Creation of the file
index 2c86fbbb78c0f5112774e156df8d32e4649975fb..95e89ca4b87d946b411e90f6258bcca59251dd56 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
 
 // Name   : ConstructionAPI_Point.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 29/03/16 - Sergey POKHODENKO - Creation of the file
index aa454fcfba1e6c6b1d64bcd14c8eb8f2d27e941d..dc626968be88ac1a3b55a1d94d5b70a248a4232d 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
 
 // Name   : ConstructionAPI_Point.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 29/03/16 - Sergey POKHODENKO - Creation of the file
@@ -121,4 +121,4 @@ PointPtr addPoint(const std::shared_ptr<ModelAPI_Document> & thePart,
                   const ModelHighAPI_Selection& theObject1,
                   const ModelHighAPI_Selection& theObject2);*/
 
-#endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_ */ 
+#endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_POINT_H_ */
index 8c59aa01c704f0bb1fee23693c387519ece28151..2f504c2c5191e30d674372c54a0d70ac5f2eabf7 100644 (file)
@@ -4,7 +4,7 @@
 // Created:     12 Dec 2014
 // Author:      Vitaly Smetannikov
 
-// Modified by CEA (delegation to Alyotech) : 29 Mar 2016 
+// Modified by CEA (delegation to Alyotech) : 29 Mar 2016
 
 #include "ConstructionPlugin_Axis.h"
 
@@ -43,7 +43,7 @@ void ConstructionPlugin_Axis::initAttributes()
 {
   data()->addAttribute(ConstructionPlugin_Axis::METHOD(),
                        ModelAPI_AttributeString::typeId());
-  
+
   // Attributes needed to build the axis using the "two points" method
   data()->addAttribute(ConstructionPlugin_Axis::POINT_FIRST(),
                        ModelAPI_AttributeSelection::typeId());
@@ -59,11 +59,11 @@ void ConstructionPlugin_Axis::initAttributes()
                        ModelAPI_AttributeDouble::typeId());
   data()->addAttribute(ConstructionPlugin_Axis::Z_DIRECTION(),
                        ModelAPI_AttributeDouble::typeId());
-  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), 
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
       ConstructionPlugin_Axis::X_DIRECTION());
-  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), 
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
       ConstructionPlugin_Axis::Y_DIRECTION());
-  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), 
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
       ConstructionPlugin_Axis::Z_DIRECTION());
 
   //Attributes needed to build the axis using the "three dimensions" method
@@ -125,13 +125,13 @@ void ConstructionPlugin_Axis::createAxisByPointAndDirection()
   AttributeDoublePtr aXAttr = data()->real(ConstructionPlugin_Axis::X_DIRECTION());
   AttributeDoublePtr aYAttr = data()->real(ConstructionPlugin_Axis::Y_DIRECTION());
   AttributeDoublePtr aZAttr = data()->real(ConstructionPlugin_Axis::Z_DIRECTION());
-  if ((aRef1.get() != NULL) && (aXAttr.get() != NULL) && 
+  if ((aRef1.get() != NULL) && (aXAttr.get() != NULL) &&
       (aYAttr.get() != NULL) && (aZAttr.get() != NULL)) {
     GeomShapePtr aShape1 = aRef1->value();
     if (!aShape1.get())
       aShape1 = aRef1->context()->shape();
 
-    std::shared_ptr<GeomAPI_Vertex> aVertex(new GeomAPI_Vertex(aXAttr->value(), 
+    std::shared_ptr<GeomAPI_Vertex> aVertex(new GeomAPI_Vertex(aXAttr->value(),
                                                                aYAttr->value(),
                                                                aZAttr->value()));
     if (aShape1->isVertex() && (!aShape1->isEqual(aVertex))) {
@@ -171,7 +171,7 @@ void ConstructionPlugin_Axis::createAxisByDimensions()
   double aDY = data()->real(DY())->value();
   double aDZ = data()->real(DZ())->value();
 
-  if (fabs(aDX) < MINIMAL_LENGTH()  && fabs(aDY) < MINIMAL_LENGTH() && 
+  if (fabs(aDX) < MINIMAL_LENGTH()  && fabs(aDY) < MINIMAL_LENGTH() &&
       fabs(aDZ) < MINIMAL_LENGTH()) {
     setError("Axis builder with dimensions  :: all dimensions are null", false);
     return ;
@@ -182,7 +182,7 @@ void ConstructionPlugin_Axis::createAxisByDimensions()
   ResultConstructionPtr aConstr = document()->createConstruction(data());
   aConstr->setInfinite(true);
   aConstr->setShape(anEdge);
-  setResult(aConstr);    
+  setResult(aConstr);
 }
 
 void ConstructionPlugin_Axis::createAxisByLine()
index afd1e45fc6b793277fc7cf64d72a30bbf97976a0..222dc35a3b1812574b57ca4407bb68f620beaea1 100644 (file)
@@ -4,7 +4,7 @@
 // Created:     12 Dec 2014
 // Author:      Vitaly Smetannikov
 
-// Modified by CEA (delegation to Alyotech) : 29 Mar 2016 
+// Modified by CEA (delegation to Alyotech) : 29 Mar 2016
 
 #ifndef ConstructionPlugin_Axis_H
 #define ConstructionPlugin_Axis_H
index 754a5aa4680f3e810a636a9d78b9a904d09b8e5f..a121c4191f56934fbf6a2d487eca2fe194166f13 100644 (file)
@@ -89,7 +89,7 @@ void ConstructionPlugin_Plane::execute()
   GeomShapePtr aShape;
 
   std::string aCreationMethod = string(CREATION_METHOD())->value();
-  if(aCreationMethod == CREATION_METHOD_BY_GENERAL_EQUATION() || 
+  if(aCreationMethod == CREATION_METHOD_BY_GENERAL_EQUATION() ||
       aCreationMethod == "PlaneByGeneralEquation") {
     aShape = createByGeneralEquation();
   } else if(aCreationMethod == CREATION_METHOD_BY_THREE_POINTS()) {
@@ -129,7 +129,7 @@ bool ConstructionPlugin_Plane::customisePresentation(ResultPtr theResult, AISObj
 {
   std::vector<int> aColor;
   // get color from the attribute of the result
-  if (theResult.get() != NULL && 
+  if (theResult.get() != NULL &&
       theResult->data()->attribute(ModelAPI_Result::COLOR_ID()).get() != NULL) {
     AttributeIntArrayPtr aColorAttr = theResult->data()->intArray(ModelAPI_Result::COLOR_ID());
     if (aColorAttr.get() && aColorAttr->size()) {
@@ -165,7 +165,7 @@ std::shared_ptr<GeomAPI_Shape> ConstructionPlugin_Plane::createByGeneralEquation
       anAttrC->isInitialized() && anAttrD->isInitialized() ) {
     double aA = anAttrA->value(), aB = anAttrB->value(),
            aC = anAttrC->value(), aD = anAttrD->value();
-    std::shared_ptr<GeomAPI_Pln> aPlane = 
+    std::shared_ptr<GeomAPI_Pln> aPlane =
       std::shared_ptr<GeomAPI_Pln>(new GeomAPI_Pln(aA, aB, aC, aD));
     std::string kDefaultPlaneSize = "200";
     double aSize = Config_PropManager::integer(SKETCH_TAB_NAME, "planes_size", kDefaultPlaneSize);
@@ -332,7 +332,7 @@ std::shared_ptr<GeomAPI_Shape> ConstructionPlugin_Plane::createByRotation()
   }
   std::shared_ptr<GeomAPI_Edge> anEdge(new GeomAPI_Edge(anAxisShape));
 
-  std::shared_ptr<GeomAPI_Ax1> anAxis = 
+  std::shared_ptr<GeomAPI_Ax1> anAxis =
     std::shared_ptr<GeomAPI_Ax1>(new GeomAPI_Ax1(anEdge->line()->location(),
                                                  anEdge->line()->direction()));
 
@@ -391,7 +391,7 @@ GeomShapePtr faceByThreeVertices(const std::shared_ptr<GeomAPI_Vertex> theV1,
   anObjects.push_back(theV1);
   anObjects.push_back(theV2);
   anObjects.push_back(theV3);
-  std::list<std::shared_ptr<GeomAPI_Pnt> > aBoundingPoints = 
+  std::list<std::shared_ptr<GeomAPI_Pnt> > aBoundingPoints =
     GeomAlgoAPI_ShapeTools::getBoundingBox(anObjects, 1.0);
   GeomShapePtr aRes = GeomAlgoAPI_ShapeTools::fitPlaneToBox(aFace, aBoundingPoints);
 
@@ -431,7 +431,7 @@ std::shared_ptr<GeomAPI_Face> makeRectangularFace(const std::shared_ptr<GeomAPI_
   double aWgap = (aMaxX2d - aMinX2d) * 0.1;
   double aHgap = (aMaxY2d - aMinY2d) * 0.1;
   std::shared_ptr<GeomAPI_Face> aResFace = GeomAlgoAPI_FaceBuilder::planarFace(thePln,
-    aMinX2d - aWgap, aMinY2d - aHgap, aMaxX2d - aMinX2d + 2. * aWgap, 
+    aMinX2d - aWgap, aMinY2d - aHgap, aMaxX2d - aMinX2d + 2. * aWgap,
     aMaxY2d - aMinY2d + 2. * aHgap);
 
   return aResFace;
index e9d239b826941dc607716402356a0d70cd52ec7f..1a65f5320c69027cff3f7c35020d9e3251932725 100644 (file)
@@ -29,7 +29,7 @@ bool ConstructionPlugin_ValidatorPointLines::isValid(const AttributePtr& theAttr
 {
   FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
 
-  AttributeSelectionPtr aLineAttribute1 = 
+  AttributeSelectionPtr aLineAttribute1 =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
   AttributeSelectionPtr aLineAttribute2 = aFeature->selection(theArguments.front());
 
@@ -87,7 +87,7 @@ bool ConstructionPlugin_ValidatorPointLineAndPlaneNotParallel::isValid(
 {
   FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
 
-  AttributeSelectionPtr anAttribute1 = 
+  AttributeSelectionPtr anAttribute1 =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
   AttributeSelectionPtr anAttribute2 = aFeature->selection(theArguments.front());
 
@@ -211,7 +211,7 @@ bool ConstructionPlugin_ValidatorPlaneLinePoint::isValid(
 {
   FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
 
-  AttributeSelectionPtr anAttribute1 = 
+  AttributeSelectionPtr anAttribute1 =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
   AttributeSelectionPtr anAttribute2 = aFeature->selection(theArguments.front());
 
@@ -322,7 +322,7 @@ bool ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes::isValid(
 {
   FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
 
-  AttributeSelectionPtr anAttribute1 = 
+  AttributeSelectionPtr anAttribute1 =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
   AttributeSelectionPtr anAttribute2 = aFeature->selection(theArguments.front());
 
index 92e4c7c253f8a317cdcf11f8cf33163f78e91c24..54324c1eced772d7c1045f1e680e2ced3f42cbda 100644 (file)
 #pragma warning(disable : 4996) // for sprintf
 #endif
 
-void Events_InfoMessage::addParameter(double theParam) 
-{ 
+void Events_InfoMessage::addParameter(double theParam)
+{
   char aBuf[50];
   int n = sprintf(aBuf, "%g", theParam);
   std::string aStr(aBuf);
-  myParameters.push_back(aStr); 
+  myParameters.push_back(aStr);
 }
 
-void Events_InfoMessage::addParameter(int theParam) 
-{ 
+void Events_InfoMessage::addParameter(int theParam)
+{
   char aBuf[50];
   int n = sprintf(aBuf, "%d", theParam);
   std::string aStr(aBuf);
-  myParameters.push_back(aStr); 
+  myParameters.push_back(aStr);
 }
 
-void Events_InfoMessage::send() 
-{ 
+void Events_InfoMessage::send()
+{
   std::shared_ptr<Events_Message> aMsg(new Events_InfoMessage(*this));
-  Events_Loop::loop()->send(aMsg); 
+  Events_Loop::loop()->send(aMsg);
 }
 
 
@@ -54,7 +54,7 @@ std::string insertParameters(const std::string& theString, const std::list<std::
   return aResult;
 }
 
-std::string Events_InfoMessage::messageString() const 
-{ 
-  return insertParameters(myMessage, myParameters); 
+std::string Events_InfoMessage::messageString() const
+{
+  return insertParameters(myMessage, myParameters);
 }
index b5e33ec3c775b849c3b9613d5480e4a8c348aac1..1bfd9a232fa4b70a1b14fd490cc95bc9b20c3355 100644 (file)
@@ -29,12 +29,12 @@ public:
 
   /// Constructor
   /// \param theSender a pointer on sender object
-  Events_InfoMessage(const std::string& theContext, 
+  Events_InfoMessage(const std::string& theContext,
     const std::string& theMsg, const void* theSender = 0):
   Events_Message(Events_Loop::eventByName("InfoMessage"), theSender),
     myContext(theContext), myMessage(theMsg) {}
 
-  /// default destructor   
+  /// default destructor
   virtual ~Events_InfoMessage() {}
 
   /// Identifier of this event (one for all errors)
@@ -42,7 +42,7 @@ public:
 
   /// Set a context string
   /// \param theContext a context string
-  void  setContext(const std::string& theContext) { myContext = theContext; } 
+  void  setContext(const std::string& theContext) { myContext = theContext; }
 
 
   /// Returns context string
@@ -50,7 +50,7 @@ public:
 
   /// Set message string for translation
   /// \param theMsg the string of message
-  void setMessageString(const std::string& theMsg) { myMessage = theMsg; } 
+  void setMessageString(const std::string& theMsg) { myMessage = theMsg; }
 
   /// Returns message
   EVENTS_EXPORT std::string messageString() const;
@@ -66,9 +66,9 @@ public:
 
   /// Add parameter for message string of string type
   /// \param theParam the parameter
-  void addParameter(const std::string& theParam) 
-  { 
-    myParameters.push_back(theParam); 
+  void addParameter(const std::string& theParam)
+  {
+    myParameters.push_back(theParam);
   }
 
   /// Add parameter for message string of double type
index 158446b12f382453ac68875a9e49cfeee8e5a6dc..e29f3c178875645bbcd90b18242c05bbc566a5d5 100644 (file)
@@ -9,7 +9,7 @@
 #include <Events_Loop.h>
 
 void Events_Listener::groupWhileFlush(const std::shared_ptr<Events_Message>& theMessage) {
-  std::shared_ptr<Events_MessageGroup> aGroup = 
+  std::shared_ptr<Events_MessageGroup> aGroup =
     std::dynamic_pointer_cast<Events_MessageGroup>(theMessage);
   if (aGroup) {
     std::map<char*, std::shared_ptr<Events_Message> >::iterator aMyGroup = myGroups.find(
index 35558de6a5b75deba4f6e81586905b23e9ccc0c0..f298a9ae547692888ab43758c5b2379324c57616 100644 (file)
@@ -35,7 +35,7 @@ void Events_LongOp::start(void* theSender)
     MY_SENDERS[theSender]++;
 
   if (toSend) {
-    std::shared_ptr<Events_Message> aNewOne = 
+    std::shared_ptr<Events_Message> aNewOne =
       std::shared_ptr<Events_Message>(new Events_LongOp(theSender));
     Events_Loop::loop()->send(aNewOne);
   }
@@ -51,7 +51,7 @@ void Events_LongOp::end(void* theSender)
       MY_SENDERS[theSender] = aCount - 1;
   }
   if (MY_SENDERS.empty()) {
-    std::shared_ptr<Events_Message> aNewOne = 
+    std::shared_ptr<Events_Message> aNewOne =
       std::shared_ptr<Events_Message>(new Events_LongOp(theSender));
     Events_Loop::loop()->send(aNewOne);
   }
index 8e026f733f7f0aef459a2a9c7f4ccbdc7f79db6c..eaaf57be809fbd0af2ed9812dd79848bd603ceef 100644 (file)
@@ -59,7 +59,7 @@ void Events_Loop::send(const std::shared_ptr<Events_Message>& theMessage, bool i
   // if it is grouped message, just accumulate it
   bool isFlushedNow = myFlushed.find(theMessage->eventID().myID) != myFlushed.end();
   if (isGroup && !isFlushedNow) {
-    std::shared_ptr<Events_MessageGroup> aGroup = 
+    std::shared_ptr<Events_MessageGroup> aGroup =
       std::dynamic_pointer_cast<Events_MessageGroup>(theMessage);
     if (aGroup) {
       std::map<char*, std::shared_ptr<Events_Message> >::iterator aMyGroup = myGroups.find(
index b095cc4fc46226094ce6d449505ffe1cd85524dc..69ea2ed2485e9ad15cbcf6fe07389c16f918e966 100644 (file)
@@ -58,7 +58,7 @@ class Events_Loop
   //! \param isGroup is true for grouping messages if possible
   EVENTS_EXPORT void send(const std::shared_ptr<Events_Message>& theMessage, bool isGroup = true);
 
-  //! Registers (or adds if such listener is already registered) a listener 
+  //! Registers (or adds if such listener is already registered) a listener
   //! that will be called on the event and from the defined sender
   //! \param theListener the object that will listen (process) the event
   //! \param theID listen for messages with this ID
@@ -77,12 +77,12 @@ class Events_Loop
   //! Removes messages with the given ID: they are not needed anymore (UPDATE on close)
   EVENTS_EXPORT void eraseMessages(const Events_ID& theID);
 
-  //! Allows to disable flushes: needed in synchronization of document mechanism 
+  //! Allows to disable flushes: needed in synchronization of document mechanism
   //! (to synchronize all and only then flush create, update, etc in correct order)
   //! \param theActivate a state about flushe is active. If false, the flush is disabled
   //! \return the previous active flush state
   EVENTS_EXPORT bool activateFlushes(const bool theActivate);
-  
+
   //! Clears all collected messages
   EVENTS_EXPORT void clear(const Events_ID& theID);
 
index 68b757e8fc91a9dcff60557b6743761eda2708be..24e6349d1cf7f04fdb096c44ae9865ec0de6bb8b 100644 (file)
@@ -22,7 +22,7 @@
 class EVENTS_EXPORT Events_ID
 {
   /// pointer to the text-identifier of the event, unique pointer for all events of such type
-  char* myID;  
+  char* myID;
 
   Events_ID(char* theID)
   {
index 5b1dd9a98fe499d8fb3615439f29184f3b2bdfbf..f0daad8f1b16df396c718931927aaa6980238697 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
 // Name   : ExchangeAPI_Export.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 07/06/16 - Sergey POKHODENKO - Creation of the file
@@ -21,7 +21,7 @@ void exportToFile(const std::shared_ptr<ModelAPI_Document> & thePart,
     thePart->addFeature(ExchangePlugin_ExportFeature::ID());
   fillAttribute("Regular", aFeature->string(ExchangePlugin_ExportFeature::EXPORT_TYPE_ID()));
   fillAttribute(theFilePath, aFeature->string(ExchangePlugin_ExportFeature::FILE_PATH_ID()));
-  fillAttribute(theSelectionList, 
+  fillAttribute(theSelectionList,
                 aFeature->selectionList(ExchangePlugin_ExportFeature::SELECTION_LIST_ID()));
   fillAttribute(theFileFormat, aFeature->string(ExchangePlugin_ExportFeature::FILE_FORMAT_ID()));
   aFeature->execute();
@@ -33,12 +33,12 @@ void exportToXAO(const std::shared_ptr<ModelAPI_Document> & thePart,
                  const std::string & theGeometryName)
 {
   // TODO(spo): check that thePart is not empty
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(ExchangePlugin_ExportFeature::ID());
   fillAttribute("XAO", aFeature->string(ExchangePlugin_ExportFeature::EXPORT_TYPE_ID()));
   fillAttribute(theFilePath, aFeature->string(ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID()));
   fillAttribute(theAuthor, aFeature->string(ExchangePlugin_ExportFeature::XAO_AUTHOR_ID()));
-  fillAttribute(theGeometryName, 
+  fillAttribute(theGeometryName,
                 aFeature->string(ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID()));
   fillAttribute("XAO", aFeature->string(ExchangePlugin_ExportFeature::FILE_FORMAT_ID()));
   aFeature->execute();
index 6a7025f8bb98c6b3f4cec4446f3e405167c1c8b0..6b1b308128c0f346cb0f903d17feb731068f4a7e 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
 // Name   : ExchangeAPI_Export.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 07/06/16 - Sergey POKHODENKO - Creation of the file
index 12b987f4af09950d272d00784bcaf4bc0dcebb09..ff64ff5d972be538d76246c67aa1dc4f88e57a22 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
 // Name   : ExchangeAPI_Import.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 07/06/16 - Sergey POKHODENKO - Creation of the file
@@ -64,12 +64,12 @@ void ExchangeAPI_Import::dump(ModelHighAPI_Dumper& theDumper) const
   // to make import have results
   theDumper << "model.do()" << std::endl;
 
-  CompositeFeaturePtr aCompositeFeature = 
+  CompositeFeaturePtr aCompositeFeature =
     std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aBase);
   if(aCompositeFeature.get()) {
     int aNbOfSubs = aCompositeFeature->numberOfSubs();
     for(int anIndex = 0; anIndex < aNbOfSubs; ++anIndex) {
-      std::string aSubFeatureGet = 
+      std::string aSubFeatureGet =
         theDumper.name(aBase) + ".subFeature(" + std::to_string((long long)anIndex) + ")";
       theDumper.dumpSubFeatureNameAndColor(aSubFeatureGet, aCompositeFeature->subFeature(anIndex));
     }
index dd6a3d014af56f92397631fe44e3b73d9a5370e4..e89524d99e6c45341cbe2aa4aee141d505a918ea 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
 // Name   : ExchangeAPI_Import.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 07/06/16 - Sergey POKHODENKO - Creation of the file
@@ -38,7 +38,7 @@ public:
   virtual ~ExchangeAPI_Import();
 
   INTERFACE_1(ExchangePlugin_ImportFeature::ID(),
-              filePath, ExchangePlugin_ImportFeature::FILE_PATH_ID(), 
+              filePath, ExchangePlugin_ImportFeature::FILE_PATH_ID(),
               ModelAPI_AttributeString, /** File path */
   )
 
index 2c031fb4f211001454cfb7ee8f1af8e1d632dabb..ddc8e1431adead0bb409d60693077ed4b5f16a17 100644 (file)
@@ -236,7 +236,7 @@ void ExchangePlugin_ExportFeature::exportXAO(const std::string& theFileName)
       // complex conversion of reference id to element index
       int aReferenceID = aSelection->Id();
       std::string aReferenceString = XAO::XaoUtils::intToString(aReferenceID);
-      int anElementID = 
+      int anElementID =
         aXao.getGeometry()->getElementIndexByReference(aGroupDimension, aReferenceString);
 
       aXaoGroup->add(anElementID);
index 70bab6e93944316af75e56853536b65dbce28718..e55c4efd9e2eeb0d86c2783e898c950cc28d76cf 100644 (file)
@@ -52,10 +52,10 @@ ExchangePlugin_ImportFeature::~ExchangePlugin_ImportFeature()
  */
 void ExchangePlugin_ImportFeature::initAttributes()
 {
-  data()->addAttribute(ExchangePlugin_ImportFeature::FILE_PATH_ID(), 
+  data()->addAttribute(ExchangePlugin_ImportFeature::FILE_PATH_ID(),
                        ModelAPI_AttributeString::typeId());
-  AttributePtr aFeaturesAttribute = 
-    data()->addAttribute(ExchangePlugin_ImportFeature::FEATURES_ID(), 
+  AttributePtr aFeaturesAttribute =
+    data()->addAttribute(ExchangePlugin_ImportFeature::FEATURES_ID(),
                          ModelAPI_AttributeRefList::typeId());
   aFeaturesAttribute->setIsArgument(false);
 
index d882bc759e5e3fd0e2fc5cdedf0b0e69b4f80a15..10a40764da82f5ce2c604168dadc0311edef8c86 100644 (file)
@@ -93,7 +93,7 @@ class ExchangePlugin_ImportFeature : public ModelAPI_CompositeFeature
 
 private:
   /// Loads Naming data structure to the document
-  void loadNamingDS(std::shared_ptr<GeomAPI_Shape> theGeomShape, 
+  void loadNamingDS(std::shared_ptr<GeomAPI_Shape> theGeomShape,
                     std::shared_ptr<ModelAPI_ResultBody> theResultBody);
 };
 
index e99beb77cf2bd64009bccfe66b3eebe9fa785268..ec9737156f9ffec569f0d748a8057e5c746c8a7b 100644 (file)
@@ -84,7 +84,7 @@ void FeaturesAPI_Boolean::dump(ModelHighAPI_Dumper& theDumper) const
   }
 
   const std::string& aDocName = theDumper.name(aBase->document());
-  AttributeSelectionListPtr anObjects = 
+  AttributeSelectionListPtr anObjects =
     aBase->selectionList(FeaturesPlugin_Boolean::OBJECT_LIST_ID());
   AttributeSelectionListPtr aTools = aBase->selectionList(FeaturesPlugin_Boolean::TOOL_LIST_ID());
 
index 9f6261bd5dd644d9b90db8ab2221ce94dc757c0c..8e355717d69836198bfb5ed249b6314716244254 100644 (file)
@@ -114,7 +114,7 @@ public:
 
   /// Modify CreationMethod, to_size, from_size attributes of the feature.
   FEATURESAPI_EXPORT
-  void setSizes(const ModelHighAPI_Double& theToSize, 
+  void setSizes(const ModelHighAPI_Double& theToSize,
                 const ModelHighAPI_Double& theFromSize);
 
   /// Modify creation_method, to_size, from_size attributes of the feature.
index eb73b8ba21aa7288b216156f18d1426f185c96b8..e501b6e134b3115420b7605a6512443b966fa042 100644 (file)
@@ -115,7 +115,7 @@ void FeaturesAPI_ExtrusionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
   AttributeReferencePtr anAttrSketch = aBase->reference(FeaturesPlugin_Extrusion::SKETCH_ID());
   AttributeSelectionListPtr anAttrObjects =
     aBase->selectionList(FeaturesPlugin_Extrusion::BASE_OBJECTS_ID());
-  AttributeSelectionPtr anAttrDirection = 
+  AttributeSelectionPtr anAttrDirection =
     aBase->selection(FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID());
 
   theDumper << aBase << " = model.addExtrusion";
@@ -137,10 +137,10 @@ void FeaturesAPI_ExtrusionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
 
     theDumper << ", " << anAttrToSize << ", " << anAttrFromSize;
   } else if(aCreationMethod == FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES()) {
-    AttributeSelectionPtr anAttrToObject = 
+    AttributeSelectionPtr anAttrToObject =
       aBase->selection(FeaturesPlugin_Extrusion::TO_OBJECT_ID());
     AttributeDoublePtr anAttrToOffset = aBase->real(FeaturesPlugin_Extrusion::TO_OFFSET_ID());
-    AttributeSelectionPtr anAttrFromObject = 
+    AttributeSelectionPtr anAttrFromObject =
       aBase->selection(FeaturesPlugin_Extrusion::FROM_OBJECT_ID());
     AttributeDoublePtr anAttrFromOffset = aBase->real(FeaturesPlugin_Extrusion::FROM_OFFSET_ID());
 
@@ -148,7 +148,7 @@ void FeaturesAPI_ExtrusionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
       ", " << anAttrFromObject << ", " << anAttrFromOffset;
   }
 
-  AttributeSelectionListPtr anAttrBoolObjects = 
+  AttributeSelectionListPtr anAttrBoolObjects =
     aBase->selectionList(FeaturesPlugin_CompositeBoolean::OBJECTS_ID());
   theDumper << ", " << anAttrBoolObjects << ")" << std::endl;
 
@@ -302,7 +302,7 @@ ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePar
 {
   std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
-  return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, 
+  return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects,
                                                       theSize, theBooleanObjects));
 }
 
@@ -313,7 +313,7 @@ ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePar
                                 const ModelHighAPI_Double& theSize,
                                 const std::list<ModelHighAPI_Selection>& theBooleanObjects)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
   return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theDirection,
                                                       theSize, theBooleanObjects));
@@ -328,7 +328,7 @@ ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePar
 {
   std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
-  return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, 
+  return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects,
                                                       theToSize, theFromSize, theBooleanObjects));
 }
 
@@ -529,7 +529,7 @@ ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& theP
 {
   std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
-  return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, 
+  return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
                                                         theSize, theBooleanObjects));
 }
 
@@ -542,7 +542,7 @@ ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& theP
 {
   std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
-  return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, 
+  return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
                                                         theDirection, theSize, theBooleanObjects));
 }
 
@@ -553,9 +553,9 @@ ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& theP
                                   const ModelHighAPI_Double& theFromSize,
                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
-  return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, 
+  return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects,
                                                         theToSize, theFromSize, theBooleanObjects));
 }
 
@@ -607,7 +607,7 @@ ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& theP
                                   const ModelHighAPI_Double& theFromOffset,
                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
   return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
                                                         theBaseObjects,
index 803600f7dbab406e6ff6707338e36c456aab30d3..a9653c320910c3661eae74569c66ac644dad5f70 100644 (file)
@@ -60,9 +60,9 @@ void FeaturesAPI_Intersection::dump(ModelHighAPI_Dumper& theDumper) const
   FeaturePtr aBase = feature();
   const std::string& aDocName = theDumper.name(aBase->document());
 
-  AttributeSelectionListPtr anAttrObjects = 
+  AttributeSelectionListPtr anAttrObjects =
     aBase->selectionList(FeaturesPlugin_Intersection::OBJECT_LIST_ID());
-  AttributeSelectionListPtr anAttrTools = 
+  AttributeSelectionListPtr anAttrTools =
     aBase->selectionList(FeaturesPlugin_Intersection::TOOL_LIST_ID());
 
   theDumper << aBase << " = model.addIntersection(" << aDocName << ", "
index 97ce2d8a2d4ff2d98a134d3ba35af78dc5c726ce..40213134d7d5633405820de31f031d8c8892fb91 100644 (file)
@@ -118,7 +118,7 @@ void FeaturesAPI_Pipe::dump(ModelHighAPI_Dumper& theDumper) const
   FeaturePtr aBase = feature();
   const std::string& aDocName = theDumper.name(aBase->document());
 
-  AttributeSelectionListPtr anAttrObjects = 
+  AttributeSelectionListPtr anAttrObjects =
     aBase->selectionList(FeaturesPlugin_Pipe::BASE_OBJECTS_ID());
   AttributeSelectionPtr anAttrPath = aBase->selection(FeaturesPlugin_Pipe::PATH_OBJECT_ID());
 
index b6068a7b9805ce7c869ff12adc5d0b61a480ca5e..4650ff1ebaf7376e6dc80eda51bf13fdc31ee29f 100644 (file)
@@ -41,11 +41,11 @@ public:
   virtual ~FeaturesAPI_Placement();
 
   INTERFACE_5(FeaturesPlugin_Placement::ID(),
-              objects, FeaturesPlugin_Placement::OBJECTS_LIST_ID(), 
+              objects, FeaturesPlugin_Placement::OBJECTS_LIST_ID(),
               ModelAPI_AttributeSelectionList, /** Main objects */,
               startShape, FeaturesPlugin_Placement::START_SHAPE_ID(),
               ModelAPI_AttributeSelection, /** Start shape */,
-              endShape, FeaturesPlugin_Placement::END_SHAPE_ID(), 
+              endShape, FeaturesPlugin_Placement::END_SHAPE_ID(),
               ModelAPI_AttributeSelection, /** End shape */,
               reverseDirection, FeaturesPlugin_Placement::REVERSE_ID(),
               ModelAPI_AttributeBoolean, /** Reverse direction flag */,
index 862e018a27222eb8f46510052f32554c69d59c3d..2263ae84f2be9b5957cab95b83d20e1b755c62d4 100644 (file)
@@ -39,9 +39,9 @@ public:
   virtual ~FeaturesAPI_Recover();
 
   INTERFACE_3(FeaturesPlugin_Recover::ID(),
-              baseFeature, FeaturesPlugin_Recover::BASE_FEATURE(), 
+              baseFeature, FeaturesPlugin_Recover::BASE_FEATURE(),
               ModelAPI_AttributeReference, /** Concealed feature */,
-              recoveredList, FeaturesPlugin_Recover::RECOVERED_ENTITIES(), 
+              recoveredList, FeaturesPlugin_Recover::RECOVERED_ENTITIES(),
               ModelAPI_AttributeRefList, /** Recover list*/,
               isPersistent, FeaturesPlugin_Recover::PERSISTENT(),
               ModelAPI_AttributeBoolean, /** Is persistent flag */)
index ab5841b5b3f21e1b155434fc50d9ba0432e32f9a..5847f8ff26da12c77600cbdbbdbf6f51fce6d0de 100644 (file)
@@ -59,7 +59,7 @@ void FeaturesAPI_RemoveSubShapes::dump(ModelHighAPI_Dumper& theDumper) const
   FeaturePtr aBase = feature();
   const std::string& aDocName = theDumper.name(aBase->document());
 
-  AttributeSelectionPtr anAttrBaseShape = 
+  AttributeSelectionPtr anAttrBaseShape =
     aBase->selection(FeaturesPlugin_RemoveSubShapes::BASE_SHAPE_ID());
   AttributeSelectionListPtr anAttrSubShapes =
     aBase->selectionList(FeaturesPlugin_RemoveSubShapes::SUBSHAPES_ID());
index 86fe3e437e9568ff2de5d5226bb43ecfb2d46ef7..dab90093d65d9b68f98499f54668afef91fb3b76 100644 (file)
@@ -37,9 +37,9 @@ public:
   virtual ~FeaturesAPI_RemoveSubShapes();
 
   INTERFACE_2(FeaturesPlugin_RemoveSubShapes::ID(),
-              base, FeaturesPlugin_RemoveSubShapes::BASE_SHAPE_ID(), 
+              base, FeaturesPlugin_RemoveSubShapes::BASE_SHAPE_ID(),
               ModelAPI_AttributeSelection, /** Base */,
-              subshapes, FeaturesPlugin_RemoveSubShapes::SUBSHAPES_ID(), 
+              subshapes, FeaturesPlugin_RemoveSubShapes::SUBSHAPES_ID(),
               ModelAPI_AttributeSelectionList, /** Subshapes */)
 
   /// Modify objects attribute of the feature.
index a0dd09ed4a357616bca58809361b9e5489fd7490..1df4213f8183308c484faa400e3d58367494976a 100644 (file)
@@ -162,7 +162,7 @@ void FeaturesAPI_Revolution::dump(ModelHighAPI_Dumper& theDumper) const
   anAttrSketch->isInitialized() ? theDumper << "[]" : theDumper << anAttrObjects;
   theDumper << ", " << anAttrAxis;
 
-  std::string aCreationMethod = 
+  std::string aCreationMethod =
     aBase->string(FeaturesPlugin_Revolution::CREATION_METHOD())->value();
 
   if(aCreationMethod == FeaturesPlugin_Revolution::CREATION_METHOD_BY_ANGLES()) {
@@ -178,7 +178,7 @@ void FeaturesAPI_Revolution::dump(ModelHighAPI_Dumper& theDumper) const
       aBase->selection(FeaturesPlugin_Revolution::FROM_OBJECT_ID());
     AttributeDoublePtr anAttrFromOffset = aBase->real(FeaturesPlugin_Revolution::FROM_OFFSET_ID());
 
-    theDumper << ", " << anAttrToObject << ", " << anAttrToOffset << 
+    theDumper << ", " << anAttrToObject << ", " << anAttrToOffset <<
       ", " << anAttrFromObject << ", " << anAttrFromOffset;
   }
 
index fad2ce17b9b02b2360acd6ce3b970393b76db514..18de9fbcf8991d7573278ec4a0386071eed4bb03 100644 (file)
@@ -58,7 +58,7 @@ public:
   virtual ~FeaturesAPI_Revolution();
 
   INTERFACE_10(FeaturesPlugin_Revolution::ID(),
-               sketch, FeaturesPlugin_Revolution::SKETCH_ID(), 
+               sketch, FeaturesPlugin_Revolution::SKETCH_ID(),
                ModelAPI_AttributeReference, /** Sketch launcher */,
                baseObjects, FeaturesPlugin_Revolution::BASE_OBJECTS_ID(),
                ModelAPI_AttributeSelectionList, /** Base objects */,
@@ -93,14 +93,14 @@ public:
 
   /// Modify CreationMethod, to_angle, from_angle attributes of the feature.
   FEATURESAPI_EXPORT
-  void setAngles(const ModelHighAPI_Double& theToAngle, 
+  void setAngles(const ModelHighAPI_Double& theToAngle,
                  const ModelHighAPI_Double& theFromAngle);
 
   /// Modify CreationMethod, to_angle, from_angle attributes of the feature.
   FEATURESAPI_EXPORT
   void setAngle(const ModelHighAPI_Double& theAngle);
 
-  /// Modify CreationMethod, to_object, to_offset, 
+  /// Modify CreationMethod, to_object, to_offset,
   /// from_object, from_offset attributes of the feature.
   FEATURESAPI_EXPORT
   void setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
index bfdca9b565b692577503294e9651520aa017ab5b..17571521185142b9806d948247956f847a6a18e1 100644 (file)
@@ -129,7 +129,7 @@ void FeaturesAPI_RevolutionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
   anAttrSketch->isInitialized() ? theDumper << "[]" : theDumper << anAttrObjects;
   theDumper << ", " << anAttrAxis;
 
-  std::string aCreationMethod = 
+  std::string aCreationMethod =
     aBase->string(FeaturesPlugin_Revolution::CREATION_METHOD())->value();
 
   if(aCreationMethod == FeaturesPlugin_Revolution::CREATION_METHOD_BY_ANGLES()) {
@@ -142,12 +142,12 @@ void FeaturesAPI_RevolutionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
       aBase->selection(FeaturesPlugin_Revolution::TO_OBJECT_ID());
     AttributeDoublePtr anAttrToOffset =
       aBase->real(FeaturesPlugin_Revolution::TO_OFFSET_ID());
-    AttributeSelectionPtr anAttrFromObject = 
+    AttributeSelectionPtr anAttrFromObject =
       aBase->selection(FeaturesPlugin_Revolution::FROM_OBJECT_ID());
-    AttributeDoublePtr anAttrFromOffset = 
+    AttributeDoublePtr anAttrFromOffset =
       aBase->real(FeaturesPlugin_Revolution::FROM_OFFSET_ID());
 
-    theDumper << ", " << anAttrToObject << ", " << anAttrToOffset << 
+    theDumper << ", " << anAttrToObject << ", " << anAttrToOffset <<
       ", " << anAttrFromObject << ", " << anAttrFromOffset;
   }
 
@@ -246,9 +246,9 @@ RevolutionCutPtr addRevolutionCut(const std::shared_ptr<ModelAPI_Document>& theP
                                   const ModelHighAPI_Double& theSize,
                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(FeaturesPlugin_RevolutionCut::ID());
-  return RevolutionCutPtr(new FeaturesAPI_RevolutionCut(aFeature, theBaseObjects, 
+  return RevolutionCutPtr(new FeaturesAPI_RevolutionCut(aFeature, theBaseObjects,
                                                         theAxis, theSize, theBooleanObjects));
 }
 
@@ -260,7 +260,7 @@ RevolutionCutPtr addRevolutionCut(const std::shared_ptr<ModelAPI_Document>& theP
                                   const ModelHighAPI_Double& theFromAngle,
                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(FeaturesPlugin_RevolutionCut::ID());
   return RevolutionCutPtr(new FeaturesAPI_RevolutionCut(aFeature,
                                                       theBaseObjects,
@@ -280,7 +280,7 @@ RevolutionCutPtr addRevolutionCut(const std::shared_ptr<ModelAPI_Document>& theP
                                   const ModelHighAPI_Double& theFromOffset,
                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(FeaturesPlugin_RevolutionCut::ID());
   return RevolutionCutPtr(new FeaturesAPI_RevolutionCut(aFeature,
                                                       theBaseObjects,
@@ -371,9 +371,9 @@ RevolutionFusePtr addRevolutionFuse(const std::shared_ptr<ModelAPI_Document>& th
                                     const ModelHighAPI_Double& theSize,
                                     const std::list<ModelHighAPI_Selection>& theBooleanObjects)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(FeaturesPlugin_RevolutionFuse::ID());
-  return RevolutionFusePtr(new FeaturesAPI_RevolutionFuse(aFeature, theBaseObjects, 
+  return RevolutionFusePtr(new FeaturesAPI_RevolutionFuse(aFeature, theBaseObjects,
                                                           theAxis, theSize, theBooleanObjects));
 }
 
@@ -385,7 +385,7 @@ RevolutionFusePtr addRevolutionFuse(const std::shared_ptr<ModelAPI_Document>& th
                                     const ModelHighAPI_Double& theFromAngle,
                                     const std::list<ModelHighAPI_Selection>& theBooleanObjects)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(FeaturesPlugin_RevolutionFuse::ID());
   return RevolutionFusePtr(new FeaturesAPI_RevolutionFuse(aFeature,
                                                         theBaseObjects,
@@ -405,7 +405,7 @@ RevolutionFusePtr addRevolutionFuse(const std::shared_ptr<ModelAPI_Document>& th
                                     const ModelHighAPI_Double& theFromOffset,
                                     const std::list<ModelHighAPI_Selection>& theBooleanObjects)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     thePart->addFeature(FeaturesPlugin_RevolutionFuse::ID());
   return RevolutionFusePtr(new FeaturesAPI_RevolutionFuse(aFeature,
                                                         theBaseObjects,
index 10daa0d3d0c4792b6cc5699795d38fd904b02dac..6cf0ba4dce092675ea997a42c59476485eb3416d 100644 (file)
@@ -75,7 +75,7 @@ public:
   FEATURESAPI_EXPORT
   void setAngle(const ModelHighAPI_Double& theAngle);
 
-  /// Modify creation_method, to_object, to_offset, from_object, 
+  /// Modify creation_method, to_object, to_offset, from_object,
   /// from_offset attributes of the feature.
   FEATURESAPI_EXPORT
   void setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
index 07717134d49e5a262f9890d56db0f03e5aeed951..6b09954827301b2285e1c18aaed76ad1b2d77691 100644 (file)
@@ -86,6 +86,6 @@ TranslationPtr addTranslation(const std::shared_ptr<ModelAPI_Document>& thePart,
                               const ModelHighAPI_Double& theDistance)
 {
   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Translation::ID());
-  return TranslationPtr(new FeaturesAPI_Translation(aFeature, theMainObjects, 
+  return TranslationPtr(new FeaturesAPI_Translation(aFeature, theMainObjects,
                                                     theAxisObject, theDistance));
 }
index ca8f0d6fc9c60e07e3f1bbeaf33e981b9b966aaf..2d85df81a502299ced567e5891b5d2ecd67ca910 100644 (file)
@@ -49,7 +49,7 @@ void FeaturesAPI_Union::dump(ModelHighAPI_Dumper& theDumper) const
   AttributeSelectionListPtr anAttrObjects =
     aBase->selectionList(FeaturesPlugin_Union::BASE_OBJECTS_ID());
 
-  theDumper << aBase << " = model.addUnion(" << aDocName << 
+  theDumper << aBase << " = model.addUnion(" << aDocName <<
     ", " << anAttrObjects << ")" << std::endl;
 }
 
index dedb288a06731a8412dcac002a16914700ee050f..d265fb37cff4e1239d63b3f44dfc2223eaeb2e32 100644 (file)
@@ -37,7 +37,7 @@ void FeaturesPlugin_Boolean::initAttributes()
 {
   data()->addAttribute(FeaturesPlugin_Boolean::TYPE_ID(), ModelAPI_AttributeInteger::typeId());
 
-  AttributeSelectionListPtr aSelection = 
+  AttributeSelectionListPtr aSelection =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(data()->addAttribute(
     FeaturesPlugin_Boolean::OBJECT_LIST_ID(), ModelAPI_AttributeSelectionList::typeId()));
 
@@ -76,7 +76,7 @@ void FeaturesPlugin_Boolean::execute()
   std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape> aCompSolidsObjects;
 
   // Getting objects.
-  AttributeSelectionListPtr anObjectsSelList = 
+  AttributeSelectionListPtr anObjectsSelList =
     selectionList(FeaturesPlugin_Boolean::OBJECT_LIST_ID());
   for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
     AttributeSelectionPtr anObjectAttr = anObjectsSelList->value(anObjectsIndex);
@@ -88,7 +88,7 @@ void FeaturesPlugin_Boolean::execute()
     ResultCompSolidPtr aResCompSolidPtr = ModelAPI_Tools::compSolidOwner(aContext);
     if(aResCompSolidPtr.get()) {
       std::shared_ptr<GeomAPI_Shape> aContextShape = aResCompSolidPtr->shape();
-      std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape>::iterator 
+      std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape>::iterator
         anIt = aCompSolidsObjects.begin();
       for(; anIt != aCompSolidsObjects.end(); anIt++) {
         if(anIt->first->isEqual(aContextShape)) {
@@ -138,7 +138,7 @@ void FeaturesPlugin_Boolean::execute()
       }
 
       // For solids cut each object with all tools.
-      for(ListOfShape::iterator 
+      for(ListOfShape::iterator
           anObjectsIt = anObjects.begin(); anObjectsIt != anObjects.end(); anObjectsIt++) {
         std::shared_ptr<GeomAPI_Shape> anObject = *anObjectsIt;
         ListOfShape aListWithObject;
@@ -148,13 +148,13 @@ void FeaturesPlugin_Boolean::execute()
 
         switch(aType) {
           case BOOL_CUT: {
-            aBoolAlgo = 
+            aBoolAlgo =
               GeomAlgoAPI_Boolean(aListWithObject, aTools, GeomAlgoAPI_Boolean::BOOL_CUT);
             aResShape = aBoolAlgo.shape();
             break;
           }
           case BOOL_COMMON: {
-            aBoolAlgo = 
+            aBoolAlgo =
               GeomAlgoAPI_Boolean(aListWithObject, aTools, GeomAlgoAPI_Boolean::BOOL_COMMON);
             aResShape = aBoolAlgo.shape();
             break;
@@ -199,7 +199,7 @@ void FeaturesPlugin_Boolean::execute()
         if(GeomAlgoAPI_ShapeTools::volume(aResShape) > 1.e-27) {
           std::shared_ptr<ModelAPI_ResultBody> aResultBody =
             document()->createBody(data(), aResultIndex);
-          loadNamingDS(aResultBody, anObject, aTools, aResShape, 
+          loadNamingDS(aResultBody, anObject, aTools, aResShape,
                        aBoolAlgo, *aBoolAlgo.mapOfSubShapes().get());
           setResult(aResultBody, aResultIndex);
           aResultIndex++;
@@ -207,7 +207,7 @@ void FeaturesPlugin_Boolean::execute()
       }
 
       // Compsolids handling
-      for(std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape>::iterator 
+      for(std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape>::iterator
           anIt = aCompSolidsObjects.begin();
           anIt != aCompSolidsObjects.end(); anIt++) {
         std::shared_ptr<GeomAPI_Shape> aCompSolid = anIt->first;
@@ -215,7 +215,7 @@ void FeaturesPlugin_Boolean::execute()
 
         // Collecting solids from compsolids which will not be modified in boolean operation.
         ListOfShape aNotUsedSolids;
-        for(GeomAPI_ShapeExplorer 
+        for(GeomAPI_ShapeExplorer
             anExp(aCompSolid, GeomAPI_Shape::SOLID); anExp.more(); anExp.next()) {
           std::shared_ptr<GeomAPI_Shape> aSolidInCompSolid = anExp.current();
           ListOfShape::iterator anIt = aUsedInOperationSolids.begin();
@@ -287,9 +287,9 @@ void FeaturesPlugin_Boolean::execute()
         aMapOfShapes.merge(aFillerAlgo->mapOfSubShapes());
 
         if(GeomAlgoAPI_ShapeTools::volume(aFillerAlgo->shape()) > 1.e-27) {
-          std::shared_ptr<ModelAPI_ResultBody> aResultBody = 
+          std::shared_ptr<ModelAPI_ResultBody> aResultBody =
             document()->createBody(data(), aResultIndex);
-          loadNamingDS(aResultBody, aCompSolid, aTools, 
+          loadNamingDS(aResultBody, aCompSolid, aTools,
                        aFillerAlgo->shape(), aMakeShapeList, aMapOfShapes);
           setResult(aResultBody, aResultIndex);
           aResultIndex++;
@@ -298,7 +298,7 @@ void FeaturesPlugin_Boolean::execute()
       break;
     }
     case BOOL_FUSE: {
-      if((anObjects.size() + aTools.size() + 
+      if((anObjects.size() + aTools.size() +
           aCompSolidsObjects.size() + anEdgesAndFaces.size()) < 2) {
         std::string aFeatureError = "Error: Not enough objects for boolean operation.";
         setError(aFeatureError);
@@ -310,19 +310,19 @@ void FeaturesPlugin_Boolean::execute()
       aSolidsToFuse.insert(aSolidsToFuse.end(), anObjects.begin(), anObjects.end());
       aSolidsToFuse.insert(aSolidsToFuse.end(), aTools.begin(), aTools.end());
 
-      // Collecting solids from compsolids which will not be modified 
+      // Collecting solids from compsolids which will not be modified
       // in boolean operation and will be added to result.
       ListOfShape aShapesToAdd;
-      for(std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape>::iterator 
+      for(std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape>::iterator
           anIt = aCompSolidsObjects.begin();
           anIt != aCompSolidsObjects.end(); anIt++) {
         std::shared_ptr<GeomAPI_Shape> aCompSolid = anIt->first;
         ListOfShape& aUsedInOperationSolids = anIt->second;
-        aSolidsToFuse.insert(aSolidsToFuse.end(), aUsedInOperationSolids.begin(), 
+        aSolidsToFuse.insert(aSolidsToFuse.end(), aUsedInOperationSolids.begin(),
                              aUsedInOperationSolids.end());
 
         // Collect solids from compsolid which will not be modified in boolean operation.
-        for(GeomAPI_ShapeExplorer 
+        for(GeomAPI_ShapeExplorer
             anExp(aCompSolid, GeomAPI_Shape::SOLID); anExp.more(); anExp.next()) {
           std::shared_ptr<GeomAPI_Shape> aSolidInCompSolid = anExp.current();
           ListOfShape::iterator anIt = aUsedInOperationSolids.begin();
@@ -353,13 +353,13 @@ void FeaturesPlugin_Boolean::execute()
           aMapOfShapes.merge(aCutAlgo->mapOfSubShapes());
         }
       }
-      anOriginalShapes.insert(anOriginalShapes.end(), anEdgesAndFaces.begin(), 
+      anOriginalShapes.insert(anOriginalShapes.end(), anEdgesAndFaces.begin(),
                               anEdgesAndFaces.end());
 
       // If we have compsolids then cut with not used solids all others.
       if(!aShapesToAdd.empty()) {
         aSolidsToFuse.clear();
-        for(ListOfShape::iterator 
+        for(ListOfShape::iterator
             anIt = anOriginalShapes.begin(); anIt != anOriginalShapes.end(); anIt++) {
           ListOfShape aOneObjectList;
           aOneObjectList.push_back(*anIt);
@@ -449,9 +449,9 @@ void FeaturesPlugin_Boolean::execute()
 
       std::shared_ptr<GeomAPI_Shape> aBackShape = anOriginalShapes.back();
       anOriginalShapes.pop_back();
-      std::shared_ptr<ModelAPI_ResultBody> aResultBody = 
+      std::shared_ptr<ModelAPI_ResultBody> aResultBody =
         document()->createBody(data(), aResultIndex);
-      loadNamingDS(aResultBody, aBackShape, anOriginalShapes, 
+      loadNamingDS(aResultBody, aBackShape, anOriginalShapes,
                    aShape, aMakeShapeList, aMapOfShapes);
       setResult(aResultBody, aResultIndex);
       aResultIndex++;
@@ -476,17 +476,17 @@ void FeaturesPlugin_Boolean::execute()
       // Collecting solids from compsolids which will not be modified in
       // boolean operation and will be added to result.
       ListOfShape aShapesToAdd;
-      for(std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape>::iterator 
+      for(std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape>::iterator
         anIt = aCompSolidsObjects.begin();
         anIt != aCompSolidsObjects.end(); anIt++) {
         std::shared_ptr<GeomAPI_Shape> aCompSolid = anIt->first;
         ListOfShape& aUsedInOperationSolids = anIt->second;
         anOriginalShapes.push_back(aCompSolid);
-        aShapesToSmash.insert(aShapesToSmash.end(), aUsedInOperationSolids.begin(), 
+        aShapesToSmash.insert(aShapesToSmash.end(), aUsedInOperationSolids.begin(),
                               aUsedInOperationSolids.end());
 
         // Collect solids from compsolid which will not be modified in boolean operation.
-        for(GeomAPI_ShapeExplorer 
+        for(GeomAPI_ShapeExplorer
             anExp(aCompSolid, GeomAPI_Shape::SOLID); anExp.more(); anExp.next()) {
           std::shared_ptr<GeomAPI_Shape> aSolidInCompSolid = anExp.current();
           ListOfShape::iterator anIt = aUsedInOperationSolids.begin();
@@ -582,9 +582,9 @@ void FeaturesPlugin_Boolean::execute()
 
       std::shared_ptr<GeomAPI_Shape> aFrontShape = anOriginalShapes.front();
       anOriginalShapes.pop_front();
-      std::shared_ptr<ModelAPI_ResultBody> aResultBody = 
+      std::shared_ptr<ModelAPI_ResultBody> aResultBody =
         document()->createBody(data(), aResultIndex);
-      loadNamingDS(aResultBody, aFrontShape, anOriginalShapes, 
+      loadNamingDS(aResultBody, aFrontShape, anOriginalShapes,
         aShape, aMakeShapeList, aMapOfShapes);
       setResult(aResultBody, aResultIndex);
       aResultIndex++;
@@ -616,7 +616,7 @@ void FeaturesPlugin_Boolean::loadNamingDS(std::shared_ptr<ModelAPI_ResultBody> t
     const int aModifyTag = 1;
     const int aDeletedTag = 2;
     /// sub solids will be placed at labels 3, 4, etc. if result is compound of solids
-    const int aSubsolidsTag = 3; 
+    const int aSubsolidsTag = 3;
     const int anEdgesAndFacesTag = 10000;
 
     theResultBody->storeModified(theBaseShape, theResultShape, aSubsolidsTag);
@@ -627,12 +627,12 @@ void FeaturesPlugin_Boolean::loadNamingDS(std::shared_ptr<ModelAPI_ResultBody> t
 
     theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::FACE,
                                                aModifyTag, aModName, theMapOfShapes);
-    theResultBody->loadDeletedShapes(&theMakeShape, theBaseShape, 
+    theResultBody->loadDeletedShapes(&theMakeShape, theBaseShape,
                                      GeomAPI_Shape::FACE, aDeletedTag);
 
     int aTag;
     std::string aName;
-    for(ListOfShape::const_iterator 
+    for(ListOfShape::const_iterator
         anIter = theTools.begin(); anIter != theTools.end(); anIter++) {
       if((*anIter)->shapeType() == GeomAPI_Shape::EDGE) {
         aTag = anEdgesAndFacesTag;
@@ -645,7 +645,7 @@ void FeaturesPlugin_Boolean::loadNamingDS(std::shared_ptr<ModelAPI_ResultBody> t
         aTag = aModifyTag;
         aName = aModName;
       }
-      theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, 
+      theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter,
         aName == aModEName ? GeomAPI_Shape::EDGE : GeomAPI_Shape::FACE,
         aTag, aName, theMapOfShapes);
       theResultBody->loadDeletedShapes(&theMakeShape, *anIter, GeomAPI_Shape::FACE, aDeletedTag);
index 44ea7eddd4ea242e1cf79415ef004aa856416585..f3dbf0683f8ddf50d20bef8e1d21c56a4022f1f9 100644 (file)
@@ -36,7 +36,7 @@ void FeaturesPlugin_CompositeBoolean::executeCompositeBoolean()
 
   // Getting tools.
   ListOfShape aTools;
-  for(ListOfMakeShape::const_iterator 
+  for(ListOfMakeShape::const_iterator
       anIt = aGenMakeShapes.cbegin(); anIt != aGenMakeShapes.cend(); ++anIt) {
     aTools.push_back((*anIt)->shape());
   }
@@ -133,7 +133,7 @@ bool FeaturesPlugin_CompositeBoolean::makeBoolean(const ListOfShape& theTools,
       }
 
       // For solids cut each object with all tools.
-      for(ListOfShape::const_iterator 
+      for(ListOfShape::const_iterator
           anIt = anObjects.cbegin(); anIt != anObjects.cend(); ++anIt) {
         GeomShapePtr anObject = *anIt;
         ListOfShape aListWithObject;
@@ -162,7 +162,7 @@ bool FeaturesPlugin_CompositeBoolean::makeBoolean(const ListOfShape& theTools,
 
         // Collecting solids from compsolids which will not be modified in boolean operation.
         ListOfShape aShapesToAdd;
-        for(GeomAPI_ShapeExplorer 
+        for(GeomAPI_ShapeExplorer
             anExp(aCompSolid, GeomAPI_Shape::SOLID); anExp.more(); anExp.next()) {
           GeomShapePtr aSolidInCompSolid = anExp.current();
           ListOfShape::const_iterator aUsedShapesIt = aUsedShapes.cbegin();
@@ -224,7 +224,7 @@ bool FeaturesPlugin_CompositeBoolean::makeBoolean(const ListOfShape& theTools,
         }
       }
 
-      if((anObjects.size() + aTools.size() + 
+      if((anObjects.size() + aTools.size() +
           aCompSolidsObjects.size() + anEdgesAndFaces.size()) < 2) {
         myFeature->setError("Error: Not enough objects for boolean operation.");
         return false;
@@ -235,7 +235,7 @@ bool FeaturesPlugin_CompositeBoolean::makeBoolean(const ListOfShape& theTools,
       aSolidsToFuse.insert(aSolidsToFuse.end(), anObjects.begin(), anObjects.end());
       aSolidsToFuse.insert(aSolidsToFuse.end(), aTools.begin(), aTools.end());
 
-      // Collecting solids from compsolids which will not be 
+      // Collecting solids from compsolids which will not be
       // modified in boolean operation and will be added to result.
       ListOfShape aShapesToAdd;
       for(std::map<GeomShapePtr, ListOfShape>::iterator anIt = aCompSolidsObjects.begin();
@@ -245,7 +245,7 @@ bool FeaturesPlugin_CompositeBoolean::makeBoolean(const ListOfShape& theTools,
         aSolidsToFuse.insert(aSolidsToFuse.end(), aUsedShapes.begin(), aUsedShapes.end());
 
         // Collect solids from compsolid which will not be modified in boolean operation.
-        for(GeomAPI_ShapeExplorer 
+        for(GeomAPI_ShapeExplorer
             anExp(aCompSolid, GeomAPI_Shape::SOLID); anExp.more(); anExp.next()) {
           GeomShapePtr aSolidInCompSolid = anExp.current();
           ListOfShape::iterator anIt = aUsedShapes.begin();
@@ -372,7 +372,7 @@ void FeaturesPlugin_CompositeBoolean::storeModificationHistory(ResultBodyPtr the
       aTag = aModTag;
       aName = aModName;
     }
-    theResultBody->loadAndOrientModifiedShapes(theMakeShape.get(), *anIt, 
+    theResultBody->loadAndOrientModifiedShapes(theMakeShape.get(), *anIt,
       (*anIt)->shapeType() == GeomAPI_Shape::EDGE ?
       GeomAPI_Shape::EDGE : GeomAPI_Shape::FACE, aTag, aName, *aMap.get());
     theResultBody->loadDeletedShapes(theMakeShape.get(), *anIt, GeomAPI_Shape::FACE, aDelTag);
index da470abe149e8aa520d8baaa07c82b12ec70bc55..06320e03c71610916e502b84e3993381f73101af 100644 (file)
@@ -69,7 +69,7 @@ int FeaturesPlugin_CompositeSketch::numberOfSubs(bool forTree) const
 }
 
 //=================================================================================================
-std::shared_ptr<ModelAPI_Feature> FeaturesPlugin_CompositeSketch::subFeature(const int theIndex, 
+std::shared_ptr<ModelAPI_Feature> FeaturesPlugin_CompositeSketch::subFeature(const int theIndex,
                                                                              bool forTree)
 {
   if(theIndex == 0) {
@@ -149,7 +149,7 @@ void FeaturesPlugin_CompositeSketch::getBaseShapes(ListOfShape& theBaseShapesLis
       }
       ResultConstructionPtr aConstruction =
         std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aBaseObjectSelection->context());
-      if(aConstruction.get() && !aBaseShape->isEqual(aConstruction->shape()) && 
+      if(aConstruction.get() && !aBaseShape->isEqual(aConstruction->shape()) &&
           aST == GeomAPI_Shape::WIRE) {
         // It is a wire on the sketch, store it to make face later.
         aSketchWiresMap[aConstruction].push_back(aBaseShape);
@@ -172,7 +172,7 @@ void FeaturesPlugin_CompositeSketch::getBaseShapes(ListOfShape& theBaseShapesLis
         aBaseShape = aConstruction->shape();
         if(aBaseShape.get() && !aBaseShape->isNull()) {
           GeomAPI_Shape::ShapeType aST = aBaseShape->shapeType();
-          if(aST != GeomAPI_Shape::VERTEX && aST != GeomAPI_Shape::EDGE && 
+          if(aST != GeomAPI_Shape::VERTEX && aST != GeomAPI_Shape::EDGE &&
              aST != GeomAPI_Shape::WIRE &&
              aST != GeomAPI_Shape::FACE && aST != GeomAPI_Shape::SHELL) {
             setError("Error: Selected shapes has unsupported type.");
@@ -213,7 +213,7 @@ void FeaturesPlugin_CompositeSketch::getBaseShapes(ListOfShape& theBaseShapesLis
     ListOfShape aShells;
     ListOfShape aFreeFaces;
     GeomShapePtr aFacesCompound = GeomAlgoAPI_CompoundBuilder::compound(aBaseFacesList);
-    GeomAlgoAPI_ShapeTools::combineShapes(aFacesCompound, GeomAPI_Shape::SHELL, 
+    GeomAlgoAPI_ShapeTools::combineShapes(aFacesCompound, GeomAPI_Shape::SHELL,
                                           aShells, aFreeFaces);
     theBaseShapesList.insert(theBaseShapesList.end(), aFreeFaces.begin(), aFreeFaces.end());
     theBaseShapesList.insert(theBaseShapesList.end(), aShells.begin(), aShells.end());
@@ -304,30 +304,30 @@ void FeaturesPlugin_CompositeSketch::storeGenerationHistory(ResultBodyPtr theRes
     }
   }
 
-  if(aShapeTypeToExplode == GeomAPI_Shape::VERTEX || 
+  if(aShapeTypeToExplode == GeomAPI_Shape::VERTEX ||
       aShapeTypeToExplode == GeomAPI_Shape::COMPOUND) {
-    theResultBody->loadAndOrientGeneratedShapes(theMakeShape.get(), theBaseShape, 
+    theResultBody->loadAndOrientGeneratedShapes(theMakeShape.get(), theBaseShape,
                                                 GeomAPI_Shape::VERTEX,
-                                                theTag++, aGenName + "Edge", 
+                                                theTag++, aGenName + "Edge",
                                                 *aMapOfSubShapes.get());
   }
-  if(aShapeTypeToExplode == GeomAPI_Shape::EDGE || 
+  if(aShapeTypeToExplode == GeomAPI_Shape::EDGE ||
       aShapeTypeToExplode == GeomAPI_Shape::COMPOUND) {
-    theResultBody->loadAndOrientGeneratedShapes(theMakeShape.get(), 
+    theResultBody->loadAndOrientGeneratedShapes(theMakeShape.get(),
                                                 theBaseShape, GeomAPI_Shape::EDGE,
                                                 theTag++, aGenName + "Face",
                                                 *aMapOfSubShapes.get());
   }
 
-  std::shared_ptr<GeomAlgoAPI_MakeSweep> aMakeSweep = 
+  std::shared_ptr<GeomAlgoAPI_MakeSweep> aMakeSweep =
     std::dynamic_pointer_cast<GeomAlgoAPI_MakeSweep>(theMakeShape);
   if(aMakeSweep.get()) {
     // Store from shapes.
-    storeShapes(theResultBody, aBaseShapeType, aMapOfSubShapes, 
+    storeShapes(theResultBody, aBaseShapeType, aMapOfSubShapes,
                 aMakeSweep->fromShapes(), "From_", theTag);
 
     // Store to shapes.
-    storeShapes(theResultBody, aBaseShapeType, aMapOfSubShapes, 
+    storeShapes(theResultBody, aBaseShapeType, aMapOfSubShapes,
                 aMakeSweep->toShapes(), "To_", theTag);
   }
 }
index 46620a2edfbfe273a60d40f4ba1d51f8a940af3a..5cfefa7e40a553c72d74494b5a4edaf606e89583 100644 (file)
@@ -40,7 +40,7 @@ public:
   FEATURESPLUGIN_EXPORT virtual int numberOfSubs(bool forTree = false) const;
 
   /// \return the sub-feature by zero-base index.
-  FEATURESPLUGIN_EXPORT virtual 
+  FEATURESPLUGIN_EXPORT virtual
     std::shared_ptr<ModelAPI_Feature> subFeature(const int theIndex, bool forTree = false);
 
   /// \return the sub-feature unique identifier in this composite feature by zero-base index.
index 2fa5ea282d7dc1e469dfea7cae3ae1627562bf62..b4cd6e44abd3db9d44dde432bec017bee8abac6c 100755 (executable)
@@ -27,6 +27,6 @@ void FeaturesPlugin_ExtrusionBoolean::storeGenerationHistory(ResultBodyPtr theRe
                                         const std::shared_ptr<GeomAlgoAPI_MakeShape> theMakeShape,
                                         int& theTag)
 {
-  FeaturesPlugin_Extrusion::storeGenerationHistory(theResultBody, theBaseShape, 
+  FeaturesPlugin_Extrusion::storeGenerationHistory(theResultBody, theBaseShape,
                                                    theMakeShape, theTag);
 }
index 76a45d8c5b597c4cf50495c2f990a8d6f9c47fde..e524805b9857fe6694d4f904e9fbf09f2ecfd8f3 100644 (file)
@@ -13,7 +13,7 @@
 /// \class FeaturesPlugin_ExtrusionBoolean
 /// \ingroup Plugins
 /// \brief Interface for the composite extrusion feature.
-class FeaturesPlugin_ExtrusionBoolean: public FeaturesPlugin_Extrusion, 
+class FeaturesPlugin_ExtrusionBoolean: public FeaturesPlugin_Extrusion,
                                        public FeaturesPlugin_CompositeBoolean
 {
 public:
index 55a254d73e067a24bc19145ee542533300e423b6..3e04656b11108d6f67e0a9a81b6e95584331025a 100644 (file)
@@ -24,9 +24,9 @@ FeaturesPlugin_Intersection::FeaturesPlugin_Intersection()
 //=================================================================================================
 void FeaturesPlugin_Intersection::initAttributes()
 {
-  data()->addAttribute(FeaturesPlugin_Intersection::OBJECT_LIST_ID(), 
+  data()->addAttribute(FeaturesPlugin_Intersection::OBJECT_LIST_ID(),
                        ModelAPI_AttributeSelectionList::typeId());
-  data()->addAttribute(FeaturesPlugin_Intersection::TOOL_LIST_ID(), 
+  data()->addAttribute(FeaturesPlugin_Intersection::TOOL_LIST_ID(),
                        ModelAPI_AttributeSelectionList::typeId());
 }
 
@@ -36,10 +36,10 @@ void FeaturesPlugin_Intersection::execute()
   ListOfShape anObjects, aTools;
 
   // Getting objects.
-  AttributeSelectionListPtr anObjectsSelList = 
+  AttributeSelectionListPtr anObjectsSelList =
     selectionList(FeaturesPlugin_Intersection::OBJECT_LIST_ID());
   for (int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
-    std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr = 
+    std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr =
       anObjectsSelList->value(anObjectsIndex);
     std::shared_ptr<GeomAPI_Shape> anObject = anObjectAttr->value();
     if (!anObject.get()) {
@@ -49,7 +49,7 @@ void FeaturesPlugin_Intersection::execute()
   }
 
   // Getting tools.
-  AttributeSelectionListPtr aToolsSelList = 
+  AttributeSelectionListPtr aToolsSelList =
     selectionList(FeaturesPlugin_Intersection::TOOL_LIST_ID());
   for (int aToolsIndex = 0; aToolsIndex < aToolsSelList->size(); aToolsIndex++) {
     std::shared_ptr<ModelAPI_AttributeSelection> aToolAttr = aToolsSelList->value(aToolsIndex);
@@ -68,7 +68,7 @@ void FeaturesPlugin_Intersection::execute()
   int aResultIndex = 0;
 
   // Create result for each object.
-  for (ListOfShape::iterator 
+  for (ListOfShape::iterator
        anObjectsIt = anObjects.begin(); anObjectsIt != anObjects.end(); anObjectsIt++) {
     std::shared_ptr<GeomAPI_Shape> anObject = *anObjectsIt;
     ListOfShape aListWithObject; aListWithObject.push_back(anObject);
@@ -112,7 +112,7 @@ void FeaturesPlugin_Intersection::loadNamingDS(std::shared_ptr<ModelAPI_ResultBo
   std::shared_ptr<GeomAPI_DataMapOfShapeShape> aMapOfShapes = theMakeShape.mapOfSubShapes();
   const int aDeletedTag = 1;
   /// sub solids will be placed at labels 3, 4, etc. if result is compound of solids
-  const int aSubsolidsTag = 2; 
+  const int aSubsolidsTag = 2;
   const int aModifyTag = 100000;
   int aModifyToolsTag = 200000;
   std::ostringstream aStream;
index 1b87fff368637a51b4435c2029aae5f588d702ea..844766c585f407e362fe0f616fc40790ded6a73c 100644 (file)
@@ -18,7 +18,7 @@ class GeomAlgoAPI_MakeShape;
 /// \class FeaturesPlugin_Intersection
 /// \ingroup Plugins
 /// \brief Intersection feature takes a list of shapes as objects and list of shapes as tools.
-/// The types of objects and tools may be different: 
+/// The types of objects and tools may be different:
 /// whole objects, compsoilds, solids, shells, faces or edges.
 /// The result is less than the minimal dimension from pair of intersection:
 /// for two solids or two faces it is wire, for the edge and face it is vertex, etc.
index 9268f95d7f1ebe055df9948b85165ac4af1468de..5272cd8188a8afb92283c3f1ece5ae6bde57f968 100755 (executable)
@@ -131,7 +131,7 @@ void FeaturesPlugin_Partition::storeResult(
   const std::shared_ptr<GeomAlgoAPI_MakeShape> theMakeShape,
   const int theIndex)
 {
-  // Find base. The most complicated is the real modified object (#1799 if box is partitioned by 
+  // Find base. The most complicated is the real modified object (#1799 if box is partitioned by
   // two planes the box is the base, not planes, independently on the order in the list).
   GeomShapePtr aBaseShape;
   for(ListOfShape::const_iterator anIt = theObjects.cbegin(); anIt != theObjects.cend(); ++anIt) {
@@ -163,7 +163,7 @@ void FeaturesPlugin_Partition::storeResult(
 
   const int aDelTag = 1;
   /// sub solids will be placed at labels 3, 4, etc. if result is compound of solids
-  const int aSubTag = 2; 
+  const int aSubTag = 2;
   int aModTag = aSubTag + 10000;
   const std::string aModName = "Modified";
 
@@ -204,7 +204,7 @@ GeomShapePtr findBase(const GeomShapePtr theObjectShape,
     GeomShapePtr anObjectSubShape = anObjectSubShapesExp.current();
     ListOfShape aModifiedShapes;
     theMakeShape->modified(anObjectSubShape, aModifiedShapes);
-    for(ListOfShape::const_iterator 
+    for(ListOfShape::const_iterator
         aModIt = aModifiedShapes.cbegin(); aModIt != aModifiedShapes.cend(); ++aModIt) {
       GeomShapePtr aModShape = *aModIt;
       if(aMapOfSubShapes->isBound(aModShape)) {
index af528e2ffd58265d9fc757ac23969583e00daef3..b02103c32a13093e2b98575e6281301946dacfd1 100644 (file)
@@ -78,7 +78,7 @@ void FeaturesPlugin_Pipe::execute()
       GeomAPI_Shape::ShapeType aST = aBaseShape->shapeType();
       ResultConstructionPtr aConstruction =
         std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aBaseObjectSelection->context());
-      if(aConstruction.get() && !aBaseShape->isEqual(aConstruction->shape()) && 
+      if(aConstruction.get() && !aBaseShape->isEqual(aConstruction->shape()) &&
           aST == GeomAPI_Shape::WIRE) {
         // It is a wire on the sketch, store it to make face later.
         aSketchWiresMap[aConstruction].push_back(aBaseShape);
@@ -89,7 +89,7 @@ void FeaturesPlugin_Pipe::execute()
       }
     } else {
       // This may be the whole sketch result selected, check and get faces.
-      ResultConstructionPtr aConstruction = 
+      ResultConstructionPtr aConstruction =
         std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aBaseObjectSelection->context());
       if(!aConstruction.get()) {
         setError("Error: One of selected sketches does not have results.");
@@ -105,7 +105,7 @@ void FeaturesPlugin_Pipe::execute()
         }
       } else {
         for(int aFaceIndex = 0; aFaceIndex < aFacesNum; aFaceIndex++) {
-          std::shared_ptr<GeomAPI_Shape> aBaseFace = 
+          std::shared_ptr<GeomAPI_Shape> aBaseFace =
             std::dynamic_pointer_cast<GeomAPI_Shape>(aConstruction->face(aFaceIndex));
           if(!aBaseFace.get() || aBaseFace->isNull()) {
             setError("Error: One of the faces on selected sketch is Null.");
@@ -135,9 +135,9 @@ void FeaturesPlugin_Pipe::execute()
   if(aCreationMethod == CREATION_METHOD_SIMPLE()) {
     ListOfShape aShells;
     ListOfShape aFreeFaces;
-    std::shared_ptr<GeomAPI_Shape> aFacesCompound = 
+    std::shared_ptr<GeomAPI_Shape> aFacesCompound =
       GeomAlgoAPI_CompoundBuilder::compound(aBaseFacesList);
-    GeomAlgoAPI_ShapeTools::combineShapes(aFacesCompound, GeomAPI_Shape::SHELL, 
+    GeomAlgoAPI_ShapeTools::combineShapes(aFacesCompound, GeomAPI_Shape::SHELL,
                                           aShells, aFreeFaces);
     aBaseShapesList.insert(aBaseShapesList.end(), aFreeFaces.begin(), aFreeFaces.end());
     aBaseShapesList.insert(aBaseShapesList.end(), aShells.begin(), aShells.end());
@@ -151,7 +151,7 @@ void FeaturesPlugin_Pipe::execute()
     setError("Error: Path selection is empty.");
     return;
   }
-  std::shared_ptr<GeomAPI_Shape> aPathShape = 
+  std::shared_ptr<GeomAPI_Shape> aPathShape =
     std::dynamic_pointer_cast<GeomAPI_Shape>(aPathSelection->value());
   if(!aPathShape.get()) {
     // Probaply it is a construction.
@@ -210,7 +210,7 @@ void FeaturesPlugin_Pipe::execute()
 
   // Generating result for each object.
   int aResultIndex = 0;
-  if(aCreationMethod == CREATION_METHOD_SIMPLE() || 
+  if(aCreationMethod == CREATION_METHOD_SIMPLE() ||
       aCreationMethod == CREATION_METHOD_BINORMAL()) {
     for(ListOfShape::const_iterator
         anIter = aBaseShapesList.cbegin(); anIter != aBaseShapesList.cend(); anIter++) {
@@ -317,23 +317,23 @@ void FeaturesPlugin_Pipe::storeResult(const std::shared_ptr<GeomAPI_Shape> theBa
     }
   }
 
-  if(aShapeTypeToExplode == GeomAPI_Shape::VERTEX || 
+  if(aShapeTypeToExplode == GeomAPI_Shape::VERTEX ||
       aShapeTypeToExplode == GeomAPI_Shape::COMPOUND) {
     aResultBody->loadAndOrientGeneratedShapes(&thePipeAlgo, theBaseShape, GeomAPI_Shape::VERTEX,
                                            aGenTag++, aGenName + "Edge", *aMapOfSubShapes.get());
   }
-  if(aShapeTypeToExplode == GeomAPI_Shape::EDGE || 
+  if(aShapeTypeToExplode == GeomAPI_Shape::EDGE ||
       aShapeTypeToExplode == GeomAPI_Shape::COMPOUND) {
     aResultBody->loadAndOrientGeneratedShapes(&thePipeAlgo, theBaseShape, GeomAPI_Shape::EDGE,
                                            aGenTag++, aGenName + "Face", *aMapOfSubShapes.get());
   }
 
-  aResultBody->loadAndOrientGeneratedShapes(&thePipeAlgo, theBaseShape, aShapeTypeToExplode, 
+  aResultBody->loadAndOrientGeneratedShapes(&thePipeAlgo, theBaseShape, aShapeTypeToExplode,
                                             aGenTag++, aGenName, *aMapOfSubShapes.get());
 
   // Store from shapes.
   int aFromTag = aGenTag;
-  storeShapes(aResultBody, aBaseShapeType, aMapOfSubShapes, 
+  storeShapes(aResultBody, aBaseShapeType, aMapOfSubShapes,
               thePipeAlgo.fromShapes(), "From_", aFromTag);
 
   // Store to shapes.
@@ -358,7 +358,7 @@ void FeaturesPlugin_Pipe::storeResult(const ListOfShape& theBaseShapes,
   int aGenTag = 1;
   std::shared_ptr<GeomAPI_DataMapOfShapeShape> aMapOfSubShapes = thePipeAlgo.mapOfSubShapes();
 
-  for(ListOfShape::const_iterator 
+  for(ListOfShape::const_iterator
       anIter = theBaseShapes.cbegin(); anIter != theBaseShapes.cend(); anIter++) {
     GeomShapePtr aBaseShape = *anIter;
     GeomAPI_Shape::ShapeType aBaseShapeType = aBaseShape->shapeType();
@@ -398,7 +398,7 @@ void FeaturesPlugin_Pipe::storeResult(const ListOfShape& theBaseShapes,
 
   // Store to shapes.
   int aToTag = aFromTag;
-  storeShapes(aResultBody, theBaseShapes.back()->shapeType(), 
+  storeShapes(aResultBody, theBaseShapes.back()->shapeType(),
               aMapOfSubShapes, thePipeAlgo.toShapes(), "To", aToTag);
 
 
index 9fedeee8c9fef270e2e8ad5404b1d9e5115926d8..9d79324662b5d34f9a479c1c41a3b15d5fb66835 100644 (file)
@@ -17,7 +17,7 @@
 /// \class FeaturesPlugin_Pipe
 /// \ingroup Plugins
 /// \brief Feature for creation of extrusion along a path.
-/// Pipe creates extrusion of objects along a path. 
+/// Pipe creates extrusion of objects along a path.
 /// It produces the following results from objects:\n
 /// Vertex -> Edge\n
 /// Edge -> Face\n
index d3fc14903062a5d5a27ffaf3df4a934815716d62..5702921e29a3cffdd4b2d54003d9b4bd763e14e6 100644 (file)
@@ -27,7 +27,7 @@ FeaturesPlugin_Placement::FeaturesPlugin_Placement()
 void FeaturesPlugin_Placement::initAttributes()
 {
 
-  AttributeSelectionListPtr aSelection = 
+  AttributeSelectionListPtr aSelection =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(data()->addAttribute(
     OBJECTS_LIST_ID(), ModelAPI_AttributeSelectionList::typeId()));
 
@@ -47,7 +47,7 @@ void FeaturesPlugin_Placement::execute()
     return;
   }
   for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
-    std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr = 
+    std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr =
       anObjectsSelList->value(anObjectsIndex);
     std::shared_ptr<GeomAPI_Shape> anObject = anObjectAttr->value();
     if(!anObject.get()) { // may be for not-activated parts
@@ -144,7 +144,7 @@ void FeaturesPlugin_Placement::execute()
       anObjectsIt++, aContext++) {
 
     // for part results just set transformation
-    if ((*aContext)->groupName() == ModelAPI_ResultPart::group()) { 
+    if ((*aContext)->groupName() == ModelAPI_ResultPart::group()) {
       ResultPartPtr anOrigin = std::dynamic_pointer_cast<ModelAPI_ResultPart>(*aContext);
       ResultPartPtr aResultPart = document()->copyPart(anOrigin, data(), aResultIndex);
       aResultPart->setTrsf(aContextRes, aTrsf);
@@ -171,7 +171,7 @@ void FeaturesPlugin_Placement::execute()
       }
 
       //LoadNamingDS
-      std::shared_ptr<ModelAPI_ResultBody> aResultBody = 
+      std::shared_ptr<ModelAPI_ResultBody> aResultBody =
         document()->createBody(data(), aResultIndex);
       loadNamingDS(aTransformAlgo, aResultBody, aBaseShape);
       setResult(aResultBody, aResultIndex);
index e29d8558f59d40385e9958206919d2724e59bada..222880d87f033a6d2267318408b3209537f2810e 100644 (file)
@@ -45,7 +45,7 @@ void FeaturesPlugin_RemoveSubShapes::attributeChanged(const std::string& theID)
     aSubShapesAttrList->clear();
 
     ResultPtr aContext = aShapeAttrSelection->context();
-    ResultCompSolidPtr aResultCompSolid = 
+    ResultCompSolidPtr aResultCompSolid =
       std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aContext);
     if(!aResultCompSolid.get()) {
       return;
index 4ef29b4dadaf9df5ed0310070be74b5ec66f689b..d4005402a11e03423a98419ebc4fbf0666f77df6 100644 (file)
@@ -61,7 +61,7 @@ void FeaturesPlugin_Revolution::execute()
   int aResultIndex = 0;
   ListOfShape::const_iterator aBaseIt = aBaseShapesList.cbegin();
   ListOfMakeShape::const_iterator anAlgoIt = aMakeShapesList.cbegin();
-  for(; aBaseIt != aBaseShapesList.cend() && anAlgoIt != aMakeShapesList.cend(); 
+  for(; aBaseIt != aBaseShapesList.cend() && anAlgoIt != aMakeShapesList.cend();
         ++aBaseIt, ++anAlgoIt) {
     storeResult(*aBaseIt, *anAlgoIt, aResultIndex++);
   }
@@ -134,7 +134,7 @@ bool FeaturesPlugin_Revolution::makeRevolutions(ListOfShape& theBaseShapes,
   }
 
   // Generating result for each base shape.
-  for(ListOfShape::const_iterator 
+  for(ListOfShape::const_iterator
       anIter = theBaseShapes.cbegin(); anIter != theBaseShapes.cend(); anIter++) {
     GeomShapePtr aBaseShape = *anIter;
 
index 371cc09054b46a4177edb18de7264594d8e85804..2d6fab5af22a5b313461208cea1d7cf570c339bc 100644 (file)
@@ -13,7 +13,7 @@
 /// \class FeaturesPlugin_RevolutionBoolean
 /// \ingroup Plugins
 /// \brief Interface for the composite revolution feature.
-class FeaturesPlugin_RevolutionBoolean : public FeaturesPlugin_Revolution, 
+class FeaturesPlugin_RevolutionBoolean : public FeaturesPlugin_Revolution,
                                          public FeaturesPlugin_CompositeBoolean
 {
 public:
index 59b02f42e08e0f5371e3e6dc5939d801fd25b0c7..1e0dd3c29a45ad8c5e1fd5deb3f20725b5a753ab 100755 (executable)
@@ -22,11 +22,11 @@ FeaturesPlugin_Rotation::FeaturesPlugin_Rotation()
 //=================================================================================================
 void FeaturesPlugin_Rotation::initAttributes()
 {
-  AttributeSelectionListPtr aSelection = 
+  AttributeSelectionListPtr aSelection =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(data()->addAttribute(
     FeaturesPlugin_Rotation::OBJECTS_LIST_ID(), ModelAPI_AttributeSelectionList::typeId()));
 
-  data()->addAttribute(FeaturesPlugin_Rotation::AXIS_OBJECT_ID(), 
+  data()->addAttribute(FeaturesPlugin_Rotation::AXIS_OBJECT_ID(),
                        ModelAPI_AttributeSelection::typeId());
   data()->addAttribute(FeaturesPlugin_Rotation::ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
 }
@@ -37,13 +37,13 @@ void FeaturesPlugin_Rotation::execute()
   // Getting objects.
   ListOfShape anObjects;
   std::list<ResultPtr> aContextes;
-  AttributeSelectionListPtr anObjectsSelList = 
+  AttributeSelectionListPtr anObjectsSelList =
     selectionList(FeaturesPlugin_Rotation::OBJECTS_LIST_ID());
   if (anObjectsSelList->size() == 0) {
     return;
   }
   for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
-    std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr = 
+    std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr =
       anObjectsSelList->value(anObjectsIndex);
     std::shared_ptr<GeomAPI_Shape> anObject = anObjectAttr->value();
     if(!anObject.get()) {
@@ -60,12 +60,12 @@ void FeaturesPlugin_Rotation::execute()
     selection(FeaturesPlugin_Rotation::AXIS_OBJECT_ID());
   if(anObjRef && anObjRef->value() && anObjRef->value()->isEdge()) {
     anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(anObjRef->value()));
-  } else if (anObjRef && !anObjRef->value() && anObjRef->context() && 
+  } else if (anObjRef && !anObjRef->value() && anObjRef->context() &&
              anObjRef->context()->shape() && anObjRef->context()->shape()->isEdge()) {
     anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(anObjRef->context()->shape()));
   }
   if(anEdge) {
-    anAxis = std::shared_ptr<GeomAPI_Ax1>(new GeomAPI_Ax1(anEdge->line()->location(), 
+    anAxis = std::shared_ptr<GeomAPI_Ax1>(new GeomAPI_Ax1(anEdge->line()->location(),
                                                           anEdge->line()->direction()));
   }
 
@@ -75,7 +75,7 @@ void FeaturesPlugin_Rotation::execute()
   // Rotating each object.
   int aResultIndex = 0;
   std::list<ResultPtr>::iterator aContext = aContextes.begin();
-  for(ListOfShape::iterator anObjectsIt = anObjects.begin(); anObjectsIt != anObjects.end(); 
+  for(ListOfShape::iterator anObjectsIt = anObjects.begin(); anObjectsIt != anObjects.end();
         anObjectsIt++, aContext++) {
     std::shared_ptr<GeomAPI_Shape> aBaseShape = *anObjectsIt;
     bool isPart = (*aContext)->groupName() == ModelAPI_ResultPart::group();
index a060576f08775de2b4fc9cd5e670b8f0c64bfba3..30b64de120ebc2d58e21e4379bc98f1f9830dafa 100644 (file)
@@ -24,7 +24,7 @@ FeaturesPlugin_Translation::FeaturesPlugin_Translation()
 //=================================================================================================
 void FeaturesPlugin_Translation::initAttributes()
 {
-  AttributeSelectionListPtr aSelection = 
+  AttributeSelectionListPtr aSelection =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(data()->addAttribute(
     FeaturesPlugin_Translation::OBJECTS_LIST_ID(), ModelAPI_AttributeSelectionList::typeId()));
 
@@ -40,13 +40,13 @@ void FeaturesPlugin_Translation::execute()
   // Getting objects.
   ListOfShape anObjects;
   std::list<ResultPtr> aContextes;
-  AttributeSelectionListPtr anObjectsSelList = 
+  AttributeSelectionListPtr anObjectsSelList =
     selectionList(FeaturesPlugin_Translation::OBJECTS_LIST_ID());
   if (anObjectsSelList->size() == 0) {
     return;
   }
   for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
-    std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr = 
+    std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr =
       anObjectsSelList->value(anObjectsIndex);
     std::shared_ptr<GeomAPI_Shape> anObject = anObjectAttr->value();
     if(!anObject.get()) { // may be for not-activated parts
@@ -60,16 +60,16 @@ void FeaturesPlugin_Translation::execute()
   //Getting axis.
   std::shared_ptr<GeomAPI_Ax1> anAxis;
   std::shared_ptr<GeomAPI_Edge> anEdge;
-  std::shared_ptr<ModelAPI_AttributeSelection> anObjRef = 
+  std::shared_ptr<ModelAPI_AttributeSelection> anObjRef =
     selection(FeaturesPlugin_Translation::AXIS_OBJECT_ID());
   if(anObjRef && anObjRef->value() && anObjRef->value()->isEdge()) {
     anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(anObjRef->value()));
-  } else if (anObjRef && !anObjRef->value() && anObjRef->context() && 
+  } else if (anObjRef && !anObjRef->value() && anObjRef->context() &&
              anObjRef->context()->shape() && anObjRef->context()->shape()->isEdge()) {
     anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(anObjRef->context()->shape()));
   }
   if(anEdge) {
-    anAxis = std::shared_ptr<GeomAPI_Ax1>(new GeomAPI_Ax1(anEdge->line()->location(), 
+    anAxis = std::shared_ptr<GeomAPI_Ax1>(new GeomAPI_Ax1(anEdge->line()->location(),
                                                           anEdge->line()->direction()));
   }
 
index a7c62749a0812102675e613f49aa07482a0ccfee..7cafc45fe2ac74ebbbb9099a35926fc92c5b4888 100644 (file)
@@ -34,7 +34,7 @@ void FeaturesPlugin_Union::execute()
   std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape> aCompSolidsObjects;
 
   // Getting objects.
-  AttributeSelectionListPtr anObjectsSelList = 
+  AttributeSelectionListPtr anObjectsSelList =
     selectionList(FeaturesPlugin_Union::BASE_OBJECTS_ID());
   for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
     AttributeSelectionPtr anObjectAttr = anObjectsSelList->value(anObjectsIndex);
@@ -46,7 +46,7 @@ void FeaturesPlugin_Union::execute()
     ResultCompSolidPtr aResCompSolidPtr = ModelAPI_Tools::compSolidOwner(aContext);
     if(aResCompSolidPtr.get()) {
       std::shared_ptr<GeomAPI_Shape> aContextShape = aResCompSolidPtr->shape();
-      std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape>::iterator 
+      std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape>::iterator
         anIt = aCompSolidsObjects.begin();
       for(; anIt != aCompSolidsObjects.end(); anIt++) {
         if(anIt->first->isEqual(aContextShape)) {
@@ -65,7 +65,7 @@ void FeaturesPlugin_Union::execute()
   // Collecting solids from compsolids which will not be modified in
   // boolean operation and will be added to result.
   ListOfShape aShapesToAdd;
-  for(std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape>::iterator 
+  for(std::map<std::shared_ptr<GeomAPI_Shape>, ListOfShape>::iterator
     anIt = aCompSolidsObjects.begin();
     anIt != aCompSolidsObjects.end(); anIt++) {
     std::shared_ptr<GeomAPI_Shape> aCompSolid = anIt->first;
@@ -150,7 +150,7 @@ void FeaturesPlugin_Union::execute()
   const int aModifyTag = 1;
   const int aDeletedTag = 2;
   /// sub solids will be placed at labels 3, 4, etc. if result is compound of solids
-  const int aSubsolidsTag = 3; 
+  const int aSubsolidsTag = 3;
   const std::string aModName = "Modified";
 
   std::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data());
index c7a92abe0770665841df82b4a868d8ca0bbb50f6..23d0c1b6873431a38401fef41d876ae4283516d8 100755 (executable)
@@ -22,7 +22,7 @@ bool FeaturesPlugin_ValidatorTransform::isValid(const AttributePtr& theAttribute
     return false;
   }
 
-  std::shared_ptr<ModelAPI_AttributeSelectionList> aCurSelList = 
+  std::shared_ptr<ModelAPI_AttributeSelectionList> aCurSelList =
                            std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
 
   DocumentPtr aDocument = theAttribute->owner()->document();
index 107815387167cc41b77a3484e754f0eaeb1f4f2b..5f27c10ce8af8fc3a349e28e890b610f396bff35 100644 (file)
@@ -44,7 +44,7 @@ bool FeaturesPlugin_ValidatorPipePath::isValid(const AttributePtr& theAttribute,
                                                const std::list<std::string>& theArguments,
                                                Events_InfoMessage& theError) const
 {
-  AttributeSelectionPtr aPathAttrSelection = 
+  AttributeSelectionPtr aPathAttrSelection =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
   if(!aPathAttrSelection.get()) {
     theError = "Error: This validator can only work with path selector in \"Pipe\" feature.";
@@ -58,7 +58,7 @@ bool FeaturesPlugin_ValidatorPipePath::isValid(const AttributePtr& theAttribute,
     return false;
   }
   GeomShapePtr aContextShape = aContext->shape();
-  if(aPathShape.get() && aPathShape->shapeType() == GeomAPI_Shape::WIRE && 
+  if(aPathShape.get() && aPathShape->shapeType() == GeomAPI_Shape::WIRE &&
       !aPathShape->isEqual(aContextShape)) {
     theError = "Error: Local selection of wires not allowed.";
     return false;
@@ -108,7 +108,7 @@ bool FeaturesPlugin_ValidatorPipeLocations::isValid(
     return false;
   }
 
-  if(aLocationsSelectionList->size() > 0 && 
+  if(aLocationsSelectionList->size() > 0 &&
      aLocationsSelectionList->size() != aBaseObjectsSelectionList->size()) {
     theError = "Error: Number of locations should be the same as base objects.";
     return false;
@@ -118,7 +118,7 @@ bool FeaturesPlugin_ValidatorPipeLocations::isValid(
 }
 
 //==================================================================================================
-bool FeaturesPlugin_ValidatorPipeLocations::isNotObligatory(std::string theFeature, 
+bool FeaturesPlugin_ValidatorPipeLocations::isNotObligatory(std::string theFeature,
                                                             std::string theAttribute)
 {
   return false;
@@ -157,10 +157,10 @@ bool FeaturesPlugin_ValidatorBaseForGeneration::isValid(const AttributePtr& theA
         return false;
       }
 
-      ResultConstructionPtr aResultConstruction = 
+      ResultConstructionPtr aResultConstruction =
         std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
       if(!aResultConstruction.get()) {
-        // It is not a result construction. 
+        // It is not a result construction.
         // If shape is compound check that it contains only faces and edges.
         GeomShapePtr aShape = aSelectionAttr->value();
         if(!aShape.get()) {
@@ -209,7 +209,7 @@ bool FeaturesPlugin_ValidatorBaseForGeneration::isValid(const AttributePtr& theA
           }
 
           if(aSelectedWiresFromObjects.isBound(aWire)) {
-            theError = 
+            theError =
               "Error: Objects with such wire already selected. Don't allow to select this object.";
             return false;
           }
@@ -236,7 +236,7 @@ bool FeaturesPlugin_ValidatorBaseForGeneration::isValidAttribute(const Attribute
 
   std::string anAttributeType = theAttribute->attributeType();
   if(anAttributeType == ModelAPI_AttributeSelectionList::typeId()) {
-    AttributeSelectionListPtr aListAttr = 
+    AttributeSelectionListPtr aListAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
     for(int anIndex = 0; anIndex < aListAttr->size(); ++anIndex) {
       // If at least one attribute is invalid, the result is false.
@@ -246,7 +246,7 @@ bool FeaturesPlugin_ValidatorBaseForGeneration::isValidAttribute(const Attribute
     }
   } else if(anAttributeType == ModelAPI_AttributeSelection::typeId()) {
     // Getting context.
-    AttributeSelectionPtr anAttr = 
+    AttributeSelectionPtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
     ResultPtr aContext = anAttr->context();
     if(!aContext.get()) {
@@ -264,7 +264,7 @@ bool FeaturesPlugin_ValidatorBaseForGeneration::isValidAttribute(const Attribute
       return false;
     }
 
-    ResultConstructionPtr aConstruction = 
+    ResultConstructionPtr aConstruction =
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
     if(aConstruction.get()) {
       // Construciotn selected. Check that is is not infinite.
@@ -280,7 +280,7 @@ bool FeaturesPlugin_ValidatorBaseForGeneration::isValidAttribute(const Attribute
         }
       } else {
         // Shape on construction selected. Check that it is a face or wire.
-        if(aShape->shapeType() == GeomAPI_Shape::WIRE || 
+        if(aShape->shapeType() == GeomAPI_Shape::WIRE ||
            aShape->shapeType() == GeomAPI_Shape::FACE) {
           return true;
         }
@@ -380,7 +380,7 @@ bool FeaturesPlugin_ValidatorExtrusionDir::isValid(
     return false;
   }
 
-  std::list<std::string>::const_iterator 
+  std::list<std::string>::const_iterator
     anArgsIt = theArguments.begin(), aLast = theArguments.end();
 
   AttributePtr aCheckAttribute = theFeature->attribute(*anArgsIt);
@@ -413,7 +413,7 @@ bool FeaturesPlugin_ValidatorExtrusionDir::isValid(
   std::shared_ptr<GeomAPI_Edge> aDirEdge(new GeomAPI_Edge(aDirShape));
 
   // If faces selected check that direction not parallel with them.
-  AttributeSelectionListPtr aListAttr = 
+  AttributeSelectionListPtr aListAttr =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aCheckAttribute);
   for(int anIndex = 0; anIndex < aListAttr->size(); ++anIndex) {
     AttributeSelectionPtr anAttr = aListAttr->value(anIndex);
@@ -422,9 +422,9 @@ bool FeaturesPlugin_ValidatorExtrusionDir::isValid(
       aShapeInList = anAttr->context()->shape();
     }
     bool isParallel = true;
-    if(aShapeInList->shapeType() == GeomAPI_Shape::FACE || 
+    if(aShapeInList->shapeType() == GeomAPI_Shape::FACE ||
        aShapeInList->shapeType() == GeomAPI_Shape::SHELL) {
-      for(GeomAPI_ShapeExplorer 
+      for(GeomAPI_ShapeExplorer
           anExp(aShapeInList, GeomAPI_Shape::FACE); anExp.more(); anExp.next()) {
         std::shared_ptr<GeomAPI_Face> aFace(new GeomAPI_Face(anExp.current()));
         isParallel = GeomAlgoAPI_ShapeTools::isParallel(aDirEdge, aFace);
@@ -433,7 +433,7 @@ bool FeaturesPlugin_ValidatorExtrusionDir::isValid(
         }
       }
     } else if(aShapeInList->shapeType() == GeomAPI_Shape::COMPOUND) {
-      std::shared_ptr<GeomAPI_PlanarEdges> aPlanarEdges = 
+      std::shared_ptr<GeomAPI_PlanarEdges> aPlanarEdges =
         std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aShapeInList);
       if(aPlanarEdges.get()) {
         std::shared_ptr<GeomAPI_Dir> aSketchDir = aPlanarEdges->norm();
@@ -450,7 +450,7 @@ bool FeaturesPlugin_ValidatorExtrusionDir::isValid(
       isParallel = false;
     }
     if(isParallel) {
-      theError = 
+      theError =
         "Error: Direction is parallel to one of the selected face or face on selected shell.";
       return false;
     }
@@ -460,7 +460,7 @@ bool FeaturesPlugin_ValidatorExtrusionDir::isValid(
 }
 
 //==================================================================================================
-bool FeaturesPlugin_ValidatorExtrusionDir::isNotObligatory(std::string theFeature, 
+bool FeaturesPlugin_ValidatorExtrusionDir::isNotObligatory(std::string theFeature,
                                                            std::string theAttribute)
 {
   return false;
@@ -476,7 +476,7 @@ bool FeaturesPlugin_ValidatorExtrusionDir::isShapesCanBeEmpty(const AttributePtr
 
   std::string anAttributeType = theAttribute->attributeType();
   if(anAttributeType == ModelAPI_AttributeSelectionList::typeId()) {
-    AttributeSelectionListPtr aListAttr = 
+    AttributeSelectionListPtr aListAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
     for(int anIndex = 0; anIndex < aListAttr->size(); ++anIndex) {
       // If at least one attribute is invalid, the result is false.
@@ -486,7 +486,7 @@ bool FeaturesPlugin_ValidatorExtrusionDir::isShapesCanBeEmpty(const AttributePtr
     }
   } else if(anAttributeType == ModelAPI_AttributeSelection::typeId()) {
     // Getting context.
-    AttributeSelectionPtr anAttr = 
+    AttributeSelectionPtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
     ResultPtr aContext = anAttr->context();
     if(!aContext.get()) {
@@ -519,10 +519,10 @@ bool FeaturesPlugin_ValidatorBooleanSelection::isValid(const AttributePtr& theAt
                                                        const std::list<std::string>& theArguments,
                                                        Events_InfoMessage& theError) const
 {
-  AttributeSelectionListPtr anAttrSelectionList = 
+  AttributeSelectionListPtr anAttrSelectionList =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
   if(!anAttrSelectionList.get()) {
-    theError = 
+    theError =
       "Error: This validator can only work with selection list attributes in \"Boolean\" feature.";
     return false;
   }
@@ -589,7 +589,7 @@ bool FeaturesPlugin_ValidatorPartitionSelection::isValid(const AttributePtr& the
                                                        const std::list<std::string>& theArguments,
                                                        Events_InfoMessage& theError) const
 {
-  AttributeSelectionListPtr anAttrSelectionList = 
+  AttributeSelectionListPtr anAttrSelectionList =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
   if(!anAttrSelectionList.get()) {
     theError = "Error: This validator can only work with selection list in \"Partition\" feature.";
@@ -610,14 +610,14 @@ bool FeaturesPlugin_ValidatorPartitionSelection::isValid(const AttributePtr& the
     }
 
     ResultPtr aContext = aSelectAttr->context();
-    ResultConstructionPtr aResultConstruction = 
+    ResultConstructionPtr aResultConstruction =
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
     if(aResultConstruction.get()) {
       theError = "Error: Only body shapes and construction planes are allowed for selection.";
       return false;
     }
 
-    ResultCompSolidPtr aResultCompsolid = 
+    ResultCompSolidPtr aResultCompsolid =
       std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aContext);
     if(aResultCompsolid.get()) {
       continue;
@@ -636,10 +636,10 @@ bool FeaturesPlugin_ValidatorRemoveSubShapesSelection::isValid(const AttributePt
                                                      const std::list<std::string>& theArguments,
                                                      Events_InfoMessage& theError) const
 {
-  AttributeSelectionListPtr aSubShapesAttrList = 
+  AttributeSelectionListPtr aSubShapesAttrList =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
   if(!aSubShapesAttrList.get()) {
-    theError = 
+    theError =
       "Error: This validator can only work with selection list in \"Remove Sub-Shapes\" feature.";
     return false;
   }
@@ -752,7 +752,7 @@ bool FeaturesPlugin_ValidatorUnionSelection::isValid(const AttributePtr& theAttr
                                                      const std::list<std::string>& theArguments,
                                                      Events_InfoMessage& theError) const
 {
-  AttributeSelectionListPtr aBaseObjectsAttrList = 
+  AttributeSelectionListPtr aBaseObjectsAttrList =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
   if(!aBaseObjectsAttrList.get()) {
     theError = "Error: This validator can only work with selection list in \"%1\" feature.";
@@ -763,7 +763,7 @@ bool FeaturesPlugin_ValidatorUnionSelection::isValid(const AttributePtr& theAttr
   for(int anIndex = 0; anIndex < aBaseObjectsAttrList->size(); ++anIndex) {
     bool isSameFound = false;
     AttributeSelectionPtr anAttrSelectionInList = aBaseObjectsAttrList->value(anIndex);
-    ResultCompSolidPtr aResult = 
+    ResultCompSolidPtr aResult =
       std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(anAttrSelectionInList->context());
     if(!aResult.get()) {
       continue;
@@ -791,7 +791,7 @@ bool FeaturesPlugin_ValidatorUnionArguments::isValid(
   }
 
   // Get base objects attribute list.
-  AttributeSelectionListPtr aBaseObejctsAttrList = 
+  AttributeSelectionListPtr aBaseObejctsAttrList =
     theFeature->selectionList(FeaturesPlugin_Union::BASE_OBJECTS_ID());
   if(!aBaseObejctsAttrList.get()) {
     theError = "Error: Could not get \"%1\" attribute.";
index bc6aa29a49c0e3ad432790cdc30b10d72b3d3cf0..7f2fd801116d550a4a2752e46ab45659a217ef85 100644 (file)
@@ -44,7 +44,7 @@ GeomAPI_AISObject::GeomAPI_AISObject()
 GeomAPI_AISObject::~GeomAPI_AISObject()
 {
   if (!empty()) {
-    // This is necessary for correct deletion of Handle entity. 
+    // This is necessary for correct deletion of Handle entity.
     // Without this Handle does not decremented counter to 0
     Handle(AIS_InteractiveObject) *anAIS = implPtr<Handle(AIS_InteractiveObject)>();
     anAIS->Nullify();
@@ -75,7 +75,7 @@ void GeomAPI_AISObject::createShape(std::shared_ptr<GeomAPI_Shape> theShape)
     // Set default point as a '+' symbol
     Handle(AIS_Shape) aShape = new AIS_Shape(aTDS);
     Handle(Prs3d_Drawer) aDrawer = aShape->Attributes();
-    if (aDrawer->HasOwnPointAspect()) 
+    if (aDrawer->HasOwnPointAspect())
       aDrawer->PointAspect()->SetTypeOfMarker(Aspect_TOM_PLUS);
     else
       aDrawer->SetPointAspect(new Prs3d_PointAspect(Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.));
@@ -181,7 +181,7 @@ void GeomAPI_AISObject::createRadius(std::shared_ptr<GeomAPI_Circ> theCircle,
   // TODO: a bug in AIS_RadiusDimension:
   // The anchor point can't be myCirc.Location() - an exception is raised.
   // But we need exactly this case...
-  // We want to show a radius dimension starting from the circle centre and 
+  // We want to show a radius dimension starting from the circle centre and
   // ending at the user-defined point.
   // Also, if anchor point coincides with myP2, the radius dimension is not displayed at all.
   std::shared_ptr<GeomAPI_Pnt> anAnchor = theCircle->project(theFlyoutPoint);
index 1030aa06b278050920d546d74d4ccbc27fd51ed9..70e06b9beae47857b236e600bd9fb2e9c14f0112 100644 (file)
@@ -26,14 +26,14 @@ class GeomAPI_AISObject : public GeomAPI_Interface
 {
  public:
   /// \brief Creation of empty AIS object
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_AISObject();
 
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   ~GeomAPI_AISObject();
 
   /// \brief Creates AIS_Shape object using specified shape
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void createShape(std::shared_ptr<GeomAPI_Shape> theShape);
 
   /// Reyirns shape used for the presentation creation (can be NULL)
@@ -46,7 +46,7 @@ class GeomAPI_AISObject : public GeomAPI_Interface
    *  \param[in] thePlane       the plane which contains all points above
    *  \param[in] theDistance    value of the distance to be shown
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void createDistance(std::shared_ptr<GeomAPI_Pnt> theStartPoint,
                       std::shared_ptr<GeomAPI_Pnt> theEndPoint,
                       std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
@@ -57,7 +57,7 @@ class GeomAPI_AISObject : public GeomAPI_Interface
    * e.g. the distance points are equal.
    * \return a boolean result
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool isEmptyDistanceGeometry();
 
   /** \brief Creates AIS_RadiusDimension object
@@ -65,7 +65,7 @@ class GeomAPI_AISObject : public GeomAPI_Interface
    *  \param[in] theFlyoutPoint the flyout of dimension
    *  \param[in] theRadius      value of the radius to be shown
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void createRadius(std::shared_ptr<GeomAPI_Circ> theCircle,
                     std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint, double theRadius);
 
@@ -75,7 +75,7 @@ class GeomAPI_AISObject : public GeomAPI_Interface
    *  \param[in] theFlyoutPoint the flyout point for relation
    *  \param[in] thePlane       the plane which contains the lines
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void createParallel(std::shared_ptr<GeomAPI_Shape> theLine1,
                       std::shared_ptr<GeomAPI_Shape> theLine2,
                       std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
@@ -86,7 +86,7 @@ class GeomAPI_AISObject : public GeomAPI_Interface
    *  \param[in] theLine2       second parallel line
    *  \param[in] thePlane       the plane which contains the lines
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void createPerpendicular(std::shared_ptr<GeomAPI_Shape> theLine1,
                            std::shared_ptr<GeomAPI_Shape> theLine2,
                            std::shared_ptr<GeomAPI_Pln> thePlane);
@@ -95,14 +95,14 @@ class GeomAPI_AISObject : public GeomAPI_Interface
    *  \param[in] theShape       the object
    *  \param[in] thePlane       the plane which contains the lines
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void createFixed(std::shared_ptr<GeomAPI_Shape> theShape,
                    std::shared_ptr<GeomAPI_Pln> thePlane);
 
   /** \brief Assigns the color for the shape
    *  \param[in] theColor index of the color
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setColor(const int& theColor);
 
   /** \brief Assigns the color for the shape
@@ -111,7 +111,7 @@ class GeomAPI_AISObject : public GeomAPI_Interface
    *  \param[in] theB value of the blue component
    *  \returns true if the presentation color is changed
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool setColor(int theR, int theG, int theB);
 
   /** \brief Returns the color for the shape
@@ -119,52 +119,52 @@ class GeomAPI_AISObject : public GeomAPI_Interface
    *  \param[in] theG value of the green component
    *  \param[in] theB value of the blue component
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void getColor(int& theR, int& theG, int& theB);
 
   /** \brief Assigns the deflection to the shape
    *  \param[in] theDeflection value of deflection
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool setDeflection(const double theDeflection);
 
   /** \brief Returns deflection for the shape
    *  \return double value
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double getDeflection() const;
 
   /// \return Current width of the lines of shape
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double width();
 
   /// \brief Assigns the width of the lines of shape
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool setWidth(const double& theWidth);
 
   /// \brief Checks if the object is empty
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool empty() const;
 
   /// Return shape type according to TopAbs_ShapeEnum if the AIS is AIS_Shape
   /// Otherwise returns -1
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   int getShapeType() const;
 
   /// Sets marker type for vertex.
   /// The type has to be defined according to Acpect_TypeOfMarker
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setPointMarker(int theType, double theScale);
 
   /// Set line type of edges
   /// Has to be defined according to Aspect_TypeOfLine
   /// \returns true if the object value differs from the current
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool setLineStyle(int theStyle);
 
   /// Set transparency of the presentation (theVal = 0 ... 1)
   /// \returns true if the object value differs from the current
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool setTransparensy(double theVal);
 };
 
index f7000e0a9d2683b981a9e68e7f2b12c0e7cf8946..8f7ee596f9ee1b07a3a53710fcade8e8a2617667 100644 (file)
@@ -47,7 +47,7 @@ public:
   GEOMAPI_EXPORT double angleRadian();
 
   /// Returns \c true if the line is reversed during angle calculation.
-  /// If theIndex = 0, the result corresponds to the first line, 
+  /// If theIndex = 0, the result corresponds to the first line,
   /// if theIndex = 1, the to the second line
   GEOMAPI_EXPORT bool isReversed(int theIndex);
 };
index 8abe3e8967e27ca414df3a32bc49f5718a47d063..ecd9911e6d59fa39be95b65c7ffeaf84663f4940 100644 (file)
@@ -18,39 +18,39 @@ class GeomAPI_Ax1 : public GeomAPI_Interface
 {
 public:
   /// Default constructor.
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Ax1();
 
   /** \brief Constructor.
    *  \param[in] theOrigin point of origin.
    *  \param[in] theDir direction of axis.
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Ax1(std::shared_ptr<GeomAPI_Pnt> theOrigin,
               std::shared_ptr<GeomAPI_Dir> theDir);
 
   /// Sets origin point.
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
 
   /// \return the plane origin point.
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt> origin() const;
 
   /// Sets direction vector.
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setDir(const std::shared_ptr<GeomAPI_Dir>& theDir);
 
   /// \return direction vector.
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Dir> dir() const;
 
   /// Reverses the unit vector of this axis and assigns the result to this axis.
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void reverse();
 
   /// \return reversed unit vector of this axis.
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Ax1> reversed();
 };
 
index e190f78b28b3ab65009e672778457fa15a4e39a8..1ad5bcc1a90f9f4bd7f10a6c33c56c9a69a4c9df 100644 (file)
@@ -18,7 +18,7 @@ class GeomAPI_Ax2 : public GeomAPI_Interface
 {
 public:
   /// Default constructor.
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Ax2();
 
   /** \brief Constructor.
@@ -26,7 +26,7 @@ public:
    *  \param[in] theN direction of axis.
    *  \param[in] theVX x direction of axis.
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Ax2(std::shared_ptr<GeomAPI_Pnt> theOrigin,
               std::shared_ptr<GeomAPI_Dir> theN,
               std::shared_ptr<GeomAPI_Dir> theVX);
@@ -35,24 +35,24 @@ public:
    *  \param[in] theOrigin point of origin.
    *  \param[in] theDir direction of axis.
    */
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Ax2(std::shared_ptr<GeomAPI_Pnt> theOrigin,
               std::shared_ptr<GeomAPI_Dir> theDir);
 
   /// Sets origin point.
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
 
   /// \return the plane origin point.
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt> origin() const;
 
   /// Sets direction vector.
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setDir(const std::shared_ptr<GeomAPI_Dir>& theDir);
 
   /// \return direction vector.
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Dir> dir() const;
 };
 
index 7dd2632ce3d8dad238250dd6d5c6ec2fb87d54a5..c2de37372339ad686f71e466173a7ae19a80f61f 100644 (file)
@@ -26,8 +26,8 @@ GeomAPI_Ax3::GeomAPI_Ax3()
 GeomAPI_Ax3::GeomAPI_Ax3(std::shared_ptr<GeomAPI_Pnt> theOrigin,
                          std::shared_ptr<GeomAPI_Dir> theDirX,
                          std::shared_ptr<GeomAPI_Dir> theNorm)
-: GeomAPI_Interface(new gp_Ax3(theOrigin->impl<gp_Pnt>(), 
-                               theNorm->impl<gp_Dir>(), 
+: GeomAPI_Interface(new gp_Ax3(theOrigin->impl<gp_Pnt>(),
+                               theNorm->impl<gp_Dir>(),
                                theDirX->impl<gp_Dir>()))
  {
  }
index 589fbf70dd4f8ba79c556f696ace79c7e780ecfa..47cbb2a4a2128414187b9d52fc101e30ca9d8430 100644 (file)
@@ -20,61 +20,61 @@ class GeomAPI_Ax3 : public GeomAPI_Interface
 {
 public:
   /// Default constructor
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Ax3();
 
   /// Constructor
   /// \param theOrigin point of origin
   /// \param theDirX direction of X axis
   /// \param theNorm direction of normal vector
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Ax3(std::shared_ptr<GeomAPI_Pnt> theOrigin,
               std::shared_ptr<GeomAPI_Dir> theDirX,
               std::shared_ptr<GeomAPI_Dir> theNorm);
 
   /// Sets origin point
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
 
   /// Returns the plane origin point
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt> origin() const;
 
   /// Sets X direction vector
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setDirX(const std::shared_ptr<GeomAPI_Dir>& theDirX);
 
   /// Returns X direction vector
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Dir> dirX() const;
 
   /// Sets Y direction vector
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setDirY(const std::shared_ptr<GeomAPI_Dir>& theDirY);
 
   /// Returns Y direction vector
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Dir> dirY() const;
 
   /// Sets Z direction vector
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setNormal(const std::shared_ptr<GeomAPI_Dir>& theNorm);
 
   /// Returns Z direction vector
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Dir> normal() const;
 
   /// Converts 2d coordinates from the plane to 3d space point
   /// \param theX X coordinate
   /// \param theY Y coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt> to3D(double theX, double theY) const;
 
   /// Converts 3d  to 2d coordinates of the plane
   /// \param theX X coordinate
   /// \param theY Y coordinate
   /// \param theZ Z coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt2d> to2D(double theX, double theY, double theZ) const;
 
 };
index 8988870caa4353d03e5cbeb454513e61837cd08a..02683098d24acc4ca10c194e00ea4ac6847befa7 100644 (file)
@@ -90,7 +90,7 @@ const bool GeomAPI_Circ::parameter(const std::shared_ptr<GeomAPI_Pnt> thePoint,
                                    double& theParameter) const
 {
   Handle(Geom_Circle) aCurve = new Geom_Circle(*MY_CIRC);
-  return GeomLib_Tool::Parameter(aCurve, thePoint->impl<gp_Pnt>(), 
+  return GeomLib_Tool::Parameter(aCurve, thePoint->impl<gp_Pnt>(),
                                  theTolerance, theParameter) == Standard_True;
 }
 
index d6ad5c7553a1bb606a88d8bb055e66d9863c9dfc..df362c3e87d6c1e2a7c98bafdecd116924ffcdeb 100644 (file)
@@ -22,12 +22,12 @@ class GeomAPI_Circ2d : public GeomAPI_Interface
 {
  public:
   /// Creation of circle defined by center point and circle radius
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Circ2d(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
                  const std::shared_ptr<GeomAPI_Pnt2d>& theCirclePoint);
 
   /// Creation of circle defined by center point, direction and circle radius
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Circ2d(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
                  const std::shared_ptr<GeomAPI_Dir2d>& theDir, double theRadius);
 
@@ -38,15 +38,15 @@ class GeomAPI_Circ2d : public GeomAPI_Interface
                  const std::shared_ptr<GeomAPI_Pnt2d>& theThirdPoint);
 
   /// Return center of the circle
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_Pnt2d> center() const;
 
   /// Return radius of the circle
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double radius() const;
 
   /// Project point on line
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_Pnt2d> project(
       const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
 
index ecb8a79f80196665eb6cd7741b652bdd1184070e..c258f1fc6d919ed39e7611ac4f5000f6bc9dd292 100644 (file)
@@ -21,36 +21,36 @@ class GeomAPI_Curve : public GeomAPI_Interface
 {
  public:
   /// Creation of empty (null) shape
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Curve();
 
   /// Creates a curve from the shape (edge)
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Curve(const std::shared_ptr<GeomAPI_Shape>& theShape);
 
   /// Returns true if curve is not initialized
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool isNull() const;
 
   /// Returns whether the curve is linear
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   virtual bool isLine() const;
 
   /// Returns whether the curve is circular
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   virtual bool isCircle() const;
 
   /// Returns start parameter of the curve
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double startParam() const { return myStart; }
 
   /// Returns end parameter of the curve
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double endParam() const { return myEnd; }
 
   /// Returns point on the curve by parameter
   /// \param theParam parameter on the curve
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt> getPoint(double theParam);
 
 private:
index a2c020c2767e6cdce1327bbc58f6912c0a93e146..ce6ae9133cd868a8fc6e226750304ada9d84c60e 100644 (file)
@@ -22,7 +22,7 @@ public:
 
   /// \brief Binds list of shapes to the key shape.
   /// \param[in] theKey key shape.
-  /// \param[in] theItems list of shapes. 
+  /// \param[in] theItems list of shapes.
   ///                     If shapes have duplications in list only one will be stored.
   /// \returns true if items bound successfully.
   GEOMAPI_EXPORT bool bind(const std::shared_ptr<GeomAPI_Shape> theKey,
index a5b88c5223fe0d328fc77f099f253c51b448777d..e71acbbe0b25b137b21f35e7565ab311671d0f19 100644 (file)
@@ -25,11 +25,11 @@ int GeomAPI_DataMapOfShapeShape::size()
   return implPtr<TopTools_DataMapOfShapeShape>()->Extent();
 }
 
-bool GeomAPI_DataMapOfShapeShape::bind(std::shared_ptr<GeomAPI_Shape> theKey, 
+bool GeomAPI_DataMapOfShapeShape::bind(std::shared_ptr<GeomAPI_Shape> theKey,
                                        std::shared_ptr<GeomAPI_Shape> theItem)
 {
   bool flag(false);
-  if (implPtr<TopTools_DataMapOfShapeShape>()->Bind(theKey->impl<TopoDS_Shape>(), 
+  if (implPtr<TopTools_DataMapOfShapeShape>()->Bind(theKey->impl<TopoDS_Shape>(),
                                                     theItem->impl<TopoDS_Shape>()))
     flag = true;
   return flag;
@@ -60,14 +60,14 @@ bool GeomAPI_DataMapOfShapeShape::isBound (std::shared_ptr<GeomAPI_Shape> theKey
   return flag;
 }
 
-const std::shared_ptr<GeomAPI_Shape> 
+const std::shared_ptr<GeomAPI_Shape>
   GeomAPI_DataMapOfShapeShape::find(std::shared_ptr<GeomAPI_Shape> theKey)
 {
-  std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());  
+  std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
   aShape->setImpl(
     new TopoDS_Shape(impl<TopTools_DataMapOfShapeShape>().Find(theKey->impl<TopoDS_Shape>())));
   return aShape;
-}  
+}
 
 bool GeomAPI_DataMapOfShapeShape::unBind(std::shared_ptr<GeomAPI_Shape> theKey)
 {
index a507f6ed27ca96574e34f5e603c7505749501b76..545608fdef8b26f2bc821165a17e2487e5e9ce49 100644 (file)
@@ -33,7 +33,7 @@ class GeomAPI_DataMapOfShapeShape : public GeomAPI_Interface
 
   /// Adds \a theKey to me with \a theItem. Returns True if the Key  was not already in the map.
   GEOMAPI_EXPORT
-  bool bind (const std::shared_ptr<GeomAPI_Shape> theKey, 
+  bool bind (const std::shared_ptr<GeomAPI_Shape> theKey,
              const std::shared_ptr<GeomAPI_Shape> theItem);
 
   /// Merges two maps.
index 52cab10c0794dec65413957b979aefd33d9ab9a3..cbd8880a0977d0f4719a437897fcebbe47d3b591 100644 (file)
@@ -63,7 +63,7 @@ double GeomAPI_Dir::angle(const std::shared_ptr<GeomAPI_Dir>& theArg) const
   return MY_DIR->Angle(theArg->impl<gp_Dir>());
 }
 
-bool GeomAPI_Dir::isParallel(const std::shared_ptr<GeomAPI_Dir> theDir, 
+bool GeomAPI_Dir::isParallel(const std::shared_ptr<GeomAPI_Dir> theDir,
                              const double theTolerance) const
 {
   return MY_DIR->IsParallel(theDir->impl<gp_Dir>(), theTolerance) == Standard_True;
index 6a84d1c4068a0d7598e1929ab1f8f27f4bc0672d..9231e58f785ac33bcf55dcb664ec3da7b8411444 100644 (file)
@@ -21,44 +21,44 @@ class GeomAPI_Dir : public GeomAPI_Interface
 {
  public:
   /// Creation of direction by coordinates
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Dir(const double theX, const double theY, const double theZ);
   /// Creation of direction by coordinates
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Dir(const std::shared_ptr<GeomAPI_XYZ>& theCoords);
 
   /// returns X coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double x() const;
   /// returns Y coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double y() const;
   /// returns Z coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double z() const;
 
   /// returns coordinates of the direction
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_XYZ> xyz();
 
   /// inverses the direction
   GEOMAPI_EXPORT void reverse();
 
   /// result is a scalar product of directions
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double dot(const std::shared_ptr<GeomAPI_Dir>& theArg) const;
   /// result is a cross product of two directions
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_XYZ> cross(const std::shared_ptr<GeomAPI_Dir>& theArg) const;
 
   /// calculates angle between two directions
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double angle(const std::shared_ptr<GeomAPI_Dir>& theArg) const;
 
-  /// \return true if the angle between this unit vector and 
+  /// \return true if the angle between this unit vector and
   /// theDir unit vector is equal to 0 or to Pi.
-  GEOMAPI_EXPORT 
-  bool isParallel(const std::shared_ptr<GeomAPI_Dir> theDir, 
+  GEOMAPI_EXPORT
+  bool isParallel(const std::shared_ptr<GeomAPI_Dir> theDir,
                   const double theTolerance = 1.e-7) const;
 
 
index 2e8cc227edcd8b3dee098e78d33de18f7322118b..812904d721a1c93b3122689645f7aeacc8dd8fd0 100644 (file)
@@ -21,35 +21,35 @@ class GeomAPI_Dir2d : public GeomAPI_Interface
 {
  public:
   /// Creation of direction by coordinates
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Dir2d(const double theX, const double theY);
   /// Creation of direction by coordinates
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Dir2d(const std::shared_ptr<GeomAPI_XY>& theCoords);
 
   /// returns X coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double x() const;
   /// returns Y coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double y() const;
 
   /// returns coordinates of the direction
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_XY> xy();
 
   /// inverses the direction
   GEOMAPI_EXPORT void reverse();
 
   /// result is a scalar product of directions
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double dot(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;
   /// result is a cross product of two directions
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double cross(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;
 
   /// calculates angle between two directions
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double angle(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;
 };
 
index 0a590bd9909a3de505c52741e7975800d5ad8678..21aa2c5eda234030ebe7eebed5edc733133ef618 100644 (file)
@@ -175,7 +175,7 @@ bool GeomAPI_Edge::isEqual(const std::shared_ptr<GeomAPI_Shape> theEdge) const
   gp_Pnt aInPnt1 = aInAdaptor.Value(aInStart);
   gp_Pnt aInPnt2 = aInAdaptor.Value(aInEnd);
 
-  if ((!aMyPnt1.IsEqual(aInPnt1, Precision::Confusion())) || 
+  if ((!aMyPnt1.IsEqual(aInPnt1, Precision::Confusion())) ||
     (!aMyPnt2.IsEqual(aInPnt2, Precision::Confusion())))
     return false;
 
index afe8243eaf3b5edee49122aeb07ad38d5f78d4ad..83eaad634607b56497c191ea5914512ce18ce2f9 100644 (file)
@@ -23,47 +23,47 @@ class GeomAPI_Edge : public GeomAPI_Shape
 {
 public:
    /// Makes an undefined Edge (no geometry).
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
    GeomAPI_Edge();
 
    /// Creation of edge by the edge-shape
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
    GeomAPI_Edge(const std::shared_ptr<GeomAPI_Shape>& theShape);
 
   /// Verifies that the edge is a line
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool isLine() const;
 
   /// Verifies that the edge is a circle
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool isCircle() const;
 
   /// Verifies that the edge is an arc of circle
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool isArc() const;
 
-  /// Returns the first vertex coordinates of the edge 
-  GEOMAPI_EXPORT 
+  /// Returns the first vertex coordinates of the edge
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt> firstPoint();
 
-  /// Returns the Last vertex coordinates of the edge 
-  GEOMAPI_EXPORT 
+  /// Returns the Last vertex coordinates of the edge
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt> lastPoint();
 
   /// Returns a circle if edge is based on the circle curve
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Circ> circle();
 
   /// Returns a line if edge is based on the linear curve
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Lin> line();
 
   /// Returns true if the current edge is geometrically equal to the given edge
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool isEqual(const std::shared_ptr<GeomAPI_Shape> theEdge) const;
 
   /// Returns range of parameter on the curve
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void getRange(double& theFirst, double& theLast) const;
 
   /// Returns true, if the edge is fully placed in the specified plane
index 096c4bd16821b6eec38a1282082c5703bcb58712..e6453787e9ba54ee047f995dd6d7e06f86125b87 100644 (file)
@@ -77,7 +77,7 @@ bool GeomAPI_Face::isCylindrical() const
 {
   const TopoDS_Shape& aShape = const_cast<GeomAPI_Face*>(this)->impl<TopoDS_Shape>();
   Handle(Geom_Surface) aSurf = BRep_Tool::Surface(TopoDS::Face(aShape));
-  Handle(Geom_RectangularTrimmedSurface) aTrimmed = 
+  Handle(Geom_RectangularTrimmedSurface) aTrimmed =
     Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurf);
   if (!aTrimmed.IsNull())
     aSurf = aTrimmed->BasisSurface();
index c47bc036aff475045e083f65eacc0009ca71bab1..54fb506c109b6d4c0cda79c9b39f6125c40fe83f 100644 (file)
@@ -19,23 +19,23 @@ class GeomAPI_Face : public GeomAPI_Shape
 {
 public:
   /// Creation of empty (null) shape
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Face();
 
   /// Creation of face by the face-shape
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Face(const std::shared_ptr<GeomAPI_Shape>& theShape);
 
   /// Returns true if the current face is geometrically equal to the given face
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   virtual bool isEqual(const std::shared_ptr<GeomAPI_Shape> theFace) const;
 
   /// Returns true if the face is a cylindrical face
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool isCylindrical() const;
 
   /// Returns the base plane of the face (if it is planar) with location in the center of the face
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pln> getPlane() const;
 };
 
index 1129c1014003383f8632cb93076913369dd01be3..c249b11c3d3022cc9cf9358ac3532a00ff00c3c5 100644 (file)
@@ -26,7 +26,7 @@ public:
   GEOMAPI_EXPORT virtual ~GeomAPI_ICustomPrs();
 
   /// Modifies the given presentation in the custom way.
-  virtual bool customisePresentation(std::shared_ptr<ModelAPI_Result> theResult, 
+  virtual bool customisePresentation(std::shared_ptr<ModelAPI_Result> theResult,
                                      AISObjectPtr thePrs,
                                      std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs) = 0;
 };
index 1c980e01733dbbb97b91cb07d6eee77a6f96437d..348bf01a803c5b2d43e10934bc77c689c451aab3 100644 (file)
@@ -117,7 +117,7 @@ bool GeomAPI_Lin::contains(const std::shared_ptr<GeomAPI_Pnt> thePoint,
 
 bool GeomAPI_Lin::isParallel(const std::shared_ptr<GeomAPI_Lin> theLin) const
 {
-  return MY_LIN->Direction().IsParallel(theLin->impl<gp_Lin>().Direction(), 
+  return MY_LIN->Direction().IsParallel(theLin->impl<gp_Lin>().Direction(),
                                         Precision::Confusion()) == Standard_True;
 }
 
index 520c87a91fc53d9744a1b9006d8bb99ddb59d6bf..f2eaebfb267f3d90cd85f31f89f619bd6c112053 100644 (file)
@@ -22,11 +22,11 @@ class GeomAPI_Lin : public GeomAPI_Interface
 {
  public:
   /// Creation of line defined by cordinates of start and end points
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Lin(const double theStartX, const double theStartY, const double theStartZ,
               const double theEndX, const double theEndY, const double theEndZ);
   /// Creation of line defined by start and end points
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Lin(const std::shared_ptr<GeomAPI_Pnt>& theStart,
               const std::shared_ptr<GeomAPI_Pnt>& theEnd);
   /// Creation of line defined by origin and direction
@@ -35,26 +35,26 @@ class GeomAPI_Lin : public GeomAPI_Interface
               const std::shared_ptr<GeomAPI_Dir>& theDirection);
 
   /// Returns point on the line (first point)
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt> location();
 
   /// Returns a line direction
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Dir> direction();
 
   /// Distance between two points
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double distance(const std::shared_ptr<GeomAPI_Pnt>& thePoint) const;
   /// Intersection of two lines
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_Pnt> intersect(
       const std::shared_ptr<GeomAPI_Lin>& theLine) const;
   /// Project point on line
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_Pnt> project(
       const std::shared_ptr<GeomAPI_Pnt>& thePoint) const;
 
-  /// \return true if this line contains thePoint, that is, 
+  /// \return true if this line contains thePoint, that is,
   /// if the distance between thePoint and this line
   ///         is less than or equal to theLinearTolerance.
   GEOMAPI_EXPORT
index 51849328db187b0e2647f65da3d11937e9ac6cd8..3f956050f4d6bcb7b50b15b77f6fe99981a6ebb5 100644 (file)
@@ -103,6 +103,6 @@ std::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Lin2d::shiftedLocation(double theShift) c
   aVec.Reverse();
   aVec.Scale(theShift);
   gp_Lin2d aLin = MY_LIN2D->Translated(aVec);
-  return std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aLin.Location().X(), 
+  return std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aLin.Location().X(),
                                                           aLin.Location().Y()));
 }
index 91cc546b71a224c1d12e346ae7d9c8c29fd8f3ed..6619c4ff72b552680780ff009fc36636bad4215d 100644 (file)
@@ -22,11 +22,11 @@ class GeomAPI_Lin2d : public GeomAPI_Interface
 {
  public:
   /// Creation of line defined by cordinates of start and end points
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Lin2d(const double theStartX, const double theStartY, const double theEndX,
                 const double theEndY);
   /// Creation of line defined by start and end points
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Lin2d(const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
                 const std::shared_ptr<GeomAPI_Pnt2d>& theEnd);
   /// Creation of line defined by origin and direction
@@ -35,31 +35,31 @@ class GeomAPI_Lin2d : public GeomAPI_Interface
                 const std::shared_ptr<GeomAPI_Dir2d>& theDirection);
 
   /// Returns point on the line (first point)
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt2d> location();
 
   /// Returns a line direction
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Dir2d> direction();
 
   /// Distance between two points
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double distance(const std::shared_ptr<GeomAPI_Pnt2d>& theOther) const;
   /// Intersection of two lines
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_Pnt2d> intersect(
       const std::shared_ptr<GeomAPI_Lin2d>& theLine) const;
   /// Project point on line
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_Pnt2d> project(
       const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
-  /// Computes the cross product of the line direction and a vector 
+  /// Computes the cross product of the line direction and a vector
   /// from the line start point to the point
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool isRight(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
 
   /// Returns a location point shifted on theShift in perpendicular direction
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt2d> shiftedLocation(double theShift) const;
 };
 
index e49d39e6d58b8add07b4318d6024e33d367b61ec..26e91026a57c218e7a4c923885bde99983555204 100644 (file)
@@ -62,28 +62,28 @@ bool GeomAPI_PlanarEdges::isEdge() const {
   return false;
 }
 
-std::shared_ptr<GeomAPI_Pnt> GeomAPI_PlanarEdges::origin() const 
+std::shared_ptr<GeomAPI_Pnt> GeomAPI_PlanarEdges::origin() const
 {
   if (hasPlane())
     return myPlane->origin();
   return std::shared_ptr<GeomAPI_Pnt>();
 }
 
-std::shared_ptr<GeomAPI_Dir> GeomAPI_PlanarEdges::dirX() const 
+std::shared_ptr<GeomAPI_Dir> GeomAPI_PlanarEdges::dirX() const
 {
   if (hasPlane())
     return myPlane->dirX();
   return std::shared_ptr<GeomAPI_Dir>();
 }
 
-std::shared_ptr<GeomAPI_Dir> GeomAPI_PlanarEdges::dirY() const 
+std::shared_ptr<GeomAPI_Dir> GeomAPI_PlanarEdges::dirY() const
 {
   if (hasPlane())
     return myPlane->dirY();
   return std::shared_ptr<GeomAPI_Dir>();
 }
 
-std::shared_ptr<GeomAPI_Dir> GeomAPI_PlanarEdges::norm() const 
+std::shared_ptr<GeomAPI_Dir> GeomAPI_PlanarEdges::norm() const
 {
   if (hasPlane())
     return myPlane->normal();
index 15fb093f01b4dd26682fc26e91919ebc23208796..b32559adc5f9ab8f2122fb0b821b5a1ebf23ae24 100644 (file)
@@ -66,7 +66,7 @@ class GeomAPI_PlanarEdges : public GeomAPI_Shape
                                const std::shared_ptr<GeomAPI_Dir>& theNorm);
 
   /// Returns whether the shapes are equal
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   virtual bool isEqual(const std::shared_ptr<GeomAPI_Shape> theShape) const;
 
 private:
index 41bf4e1c45de4cb3ac099c818e350da862a8b0d5..ba5960e876fc082a2aab11ca7674b4c4cb816804 100644 (file)
@@ -56,7 +56,7 @@ void GeomAPI_Pln::coefficients(double& theA, double& theB, double& theC, double&
   impl<gp_Pln>().Coefficients(theA, theB, theC, theD);
 }
 
-bool GeomAPI_Pln::isCoincident(const std::shared_ptr<GeomAPI_Pln> thePlane, 
+bool GeomAPI_Pln::isCoincident(const std::shared_ptr<GeomAPI_Pln> thePlane,
                                const double theTolerance)
 {
   if(!thePlane.get()) {
@@ -65,7 +65,7 @@ bool GeomAPI_Pln::isCoincident(const std::shared_ptr<GeomAPI_Pln> thePlane,
 
   const gp_Pln& aMyPln = impl<gp_Pln>();
   const gp_Pln& anOtherPln = thePlane->impl<gp_Pln>();
-  return (aMyPln.Contains(anOtherPln.Location(), theTolerance) && 
+  return (aMyPln.Contains(anOtherPln.Location(), theTolerance) &&
     aMyPln.Axis().IsParallel(anOtherPln.Axis(), theTolerance));
 }
 
@@ -81,7 +81,7 @@ bool GeomAPI_Pln::isParallel(const std::shared_ptr<GeomAPI_Lin> theLine)
   return Abs(aDot) < Precision::SquareConfusion();
 }
 
-std::shared_ptr<GeomAPI_Pnt> 
+std::shared_ptr<GeomAPI_Pnt>
   GeomAPI_Pln::intersect(const std::shared_ptr<GeomAPI_Lin>& theLine) const
 {
   std::shared_ptr<GeomAPI_XYZ> aLineDir = theLine->direction()->xyz();
@@ -99,7 +99,7 @@ std::shared_ptr<GeomAPI_Pnt>
     new GeomAPI_Pnt(aLineLoc->added(aLineDir->multiplied(aParam))));
 }
 
-std::shared_ptr<GeomAPI_Pnt> 
+std::shared_ptr<GeomAPI_Pnt>
   GeomAPI_Pln::project(const std::shared_ptr<GeomAPI_Pnt>& thePoint) const
 {
   std::shared_ptr<GeomAPI_XYZ> aNormal = direction()->xyz();
@@ -107,7 +107,7 @@ std::shared_ptr<GeomAPI_Pnt>
 
   std::shared_ptr<GeomAPI_XYZ> aVec = thePoint->xyz()->decreased(aLocation);
   double aDot = aNormal->dot(aVec);
-  std::shared_ptr<GeomAPI_XYZ> aProjection = 
+  std::shared_ptr<GeomAPI_XYZ> aProjection =
       aLocation->added(aVec->decreased(aNormal->multiplied(aDot)));
   return std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aProjection));
 }
index d97fefc977d9b7afb7a6e231054834ce75e5d23f..704c2a0ce0ce0c9b7fcbd1b25529edede0ddeeb0 100644 (file)
@@ -24,32 +24,32 @@ class GeomAPI_Pln : public GeomAPI_Interface
 {
  public:
   /// Creation of plane by the axis placement
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Pln(const std::shared_ptr<GeomAPI_Ax3>& theAxis);
 
   /// Creation of plane by the point and normal
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Pln(const std::shared_ptr<GeomAPI_Pnt>& thePoint,
               const std::shared_ptr<GeomAPI_Dir>& theNormal);
 
   /// Creation of plane by coefficients (Ax+By+Cz+D=0)
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Pln(const double theA, const double theB, const double theC, const double theD);
 
   /// Returns a point of this plane
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt> location() const;
 
   /// Returns a plane normal
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Dir> direction() const;
 
   /// Returns a plane x direction
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Dir> xDirection() const;
 
   /// Returns the plane coefficients (Ax+By+Cz+D=0)
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void coefficients(double& theA, double& theB, double& theC, double& theD);
 
   /// Returns true if planes are coincident.
index 17c2c0db81f000b8f5f4b1f0a4bf6be8aa2dadd7..137b6f72958b0c50074d8eae3ae9e2b55c9390f5 100644 (file)
@@ -24,56 +24,56 @@ class GeomAPI_Pnt : public GeomAPI_Interface
 {
  public:
   /// Creation of point by coordinates
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Pnt(const double theX, const double theY, const double theZ);
   /// Creation of point by coordinates
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Pnt(const std::shared_ptr<GeomAPI_XYZ>& theCoords);
 
   /// returns X coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double x() const;
   /// returns Y coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double y() const;
   /// returns Z coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double z() const;
 
   /// sets X coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setX(const double theX);
   /// sets Y coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setY(const double theY);
   /// sets Z coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setZ(const double theZ);
 
   /// returns coordinates of the point
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_XYZ> xyz();
 
   /// Distance between two points
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double distance(const std::shared_ptr<GeomAPI_Pnt>& theOther) const;
 
   /// Returns whether the distance between two points is less then precision confusion
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool isEqual(const std::shared_ptr<GeomAPI_Pnt>& theOther) const;
 
   /// Projects a point to the plane defined by the origin and 2 axes vectors in this plane
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
                                         const std::shared_ptr<GeomAPI_Dir>& theDirX,
                                         const std::shared_ptr<GeomAPI_Dir>& theDirY);
 
   /// Projects a point to the plane defined by the origin and 2 axes vectors in this plane
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pln>& thePln) const;
 
   /// Translates the point along direction theDir on distance theDist
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void translate(const std::shared_ptr<GeomAPI_Dir>& theDir, double theDist);
 };
 
index d3b3426cdca61c9bbbc6436f6820681b2750c79a..2ab01f2a35a7836cd2ab089ec3415a0c6298eec6 100644 (file)
@@ -23,42 +23,42 @@ class GeomAPI_Pnt2d : public GeomAPI_Interface
 {
  public:
   /// Creation of point by coordinates
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Pnt2d(const double theX, const double theY);
   /// Creation of point by coordinates
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Pnt2d(const std::shared_ptr<GeomAPI_XY>& theCoords);
 
   /// returns X coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double x() const;
   /// returns Y coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double y() const;
 
   /// sets X coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setX(const double theX);
   /// sets Y coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setY(const double theY);
 
   /// Returns the 3D point
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::shared_ptr<GeomAPI_Pnt> to3D(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
                                       const std::shared_ptr<GeomAPI_Dir>& theDirX,
                                       const std::shared_ptr<GeomAPI_Dir>& theDirY);
 
   /// returns coordinates of the point
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_XY> xy();
 
   /// Distance between two points
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double distance(const std::shared_ptr<GeomAPI_Pnt2d>& theOther) const;
 
   /// Returns whether the distance between two points is less then precision confusion
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool isEqual(const std::shared_ptr<GeomAPI_Pnt2d>& theOther) const;
 };
 
index 31cb110865df2e86b133897fbad114647aa0c2fb..8472939eb4dfe94be5c337db7adbe5cd47a85d20 100644 (file)
@@ -118,7 +118,7 @@ bool GeomAPI_Shape::isConnectedTopology() const
   if (aShape.IsNull() || aShape.ShapeType() != TopAbs_COMPOUND)
     return false;
   // list of simple elements that are not detected in connection to others
-  NCollection_List<TopoDS_Shape> aNotConnected; 
+  NCollection_List<TopoDS_Shape> aNotConnected;
   addSimpleToList(aShape, aNotConnected);
   if (aNotConnected.IsEmpty()) // an empty compound
     return false;
@@ -141,7 +141,7 @@ bool GeomAPI_Shape::isConnectedTopology() const
       bool aConnected =  false;
       NCollection_List<TopoDS_Shape>::Iterator aNewIter(aNewConnected);
       for(; !aConnected && aNewIter.More(); aNewIter.Next()) {
-        // checking topological connecion of aNotIter and aNewIter 
+        // checking topological connecion of aNotIter and aNewIter
         // (if shapes are connected, vertices are connected for sure)
         TopExp_Explorer anExp2(aNewIter.Value(), TopAbs_VERTEX);
         for(; !aConnected && anExp2.More(); anExp2.Next()) {
index 9d2b8b278292dbfd435b1528846960c6f0d8b926..6c6e9a95416873b5559e43ee23f03482b2bf9e81 100644 (file)
@@ -35,7 +35,7 @@ public:
 
  public:
   /// Creation of empty (null) shape
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_Shape();
 
   /// \return a new Shape with the same Orientation and Location and a new TShape with the same
@@ -43,39 +43,39 @@ public:
   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Shape> emptyCopied() const;
 
   /// Returns true if the underlied shape is null
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool isNull() const;
 
   /// Returns whether the shapes are equal
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   virtual bool isEqual(const std::shared_ptr<GeomAPI_Shape> theShape) const;
 
   /// Returns whether the shape is a vertex
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   virtual bool isVertex() const;
 
   /// Returns whether the shape is an edge
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   virtual bool isEdge() const;
 
   /// Returns whether the shape is a face
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   virtual bool isFace() const;
 
   /// Returns whether the shape is a compound
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   virtual bool isCompound() const;
 
   /// Returns whether the shape is a compound of solids
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   virtual bool isCompoundOfSolids() const;
 
   /// Returns whether the shape is a compound where all elements are topologically connected
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   virtual bool isConnectedTopology() const;
 
   /// Returns whether the shape is a solid
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   virtual bool isSolid() const;
 
   /// Returns whether the shape is a compsolid
@@ -106,12 +106,12 @@ public:
 
   /// Computes boundary dimensions of the shape
   /// Returns False if it is not possible
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   bool computeSize(double& theXmin, double& theYmin, double& theZmin,
                    double& theXmax, double& theYmax, double& theZmax) const;
 
   /// Returns the shape as BRep stream
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   std::string getShapeStream() const;
 };
 
index 25a40590de6cd056068836d6be1ca9c7e345405b..fc67172d594de75cdec5b6169eb71408143db0e9 100644 (file)
@@ -12,7 +12,7 @@
 
 /// \class GeomAPI_ShapeIterator
 /// \ingroup DataModel
-/// \brief Iterates on the underlying shape underlying a given GeomAPI_Shape object, 
+/// \brief Iterates on the underlying shape underlying a given GeomAPI_Shape object,
 ///        providing access
 ///        to its component sub-shapes. Each component shape is returned as a GeomAPI_Shape with
 ///        an orientation, and a compound of the original values and the relative values.
index 8fdf2853eacf5e51ea377e7ddfba5c24a893834c..c685c6ec07baf398b15a44d0e2068cff480b66f2 100644 (file)
@@ -19,42 +19,42 @@ class GeomAPI_XY : public GeomAPI_Interface
 {
  public:
   /// Creation by coordinates
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_XY(const double theX, const double theY);
 
   /// returns X coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double x() const;
   /// returns Y coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double y() const;
 
   /// sets X coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setX(const double theX);
   /// sets Y coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setY(const double theY);
 
   /// result is sum of coordinates of this and the given argument
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_XY> added(const std::shared_ptr<GeomAPI_XY>& theArg);
   /// result is difference between coordinates of this and the given argument
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_XY> decreased(const std::shared_ptr<GeomAPI_XY>& theArg);
   /// result is coordinates multiplied by the argument
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_XY> multiplied(const double theArg);
 
   /// result is a scalar product of two triplets
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double dot(const std::shared_ptr<GeomAPI_XY>& theArg) const;
   /// result is a cross product of two triplets
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double cross(const std::shared_ptr<GeomAPI_XY>& theArg) const;
 
   /// Distance between two pairs
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double distance(const std::shared_ptr<GeomAPI_XY>& theOther) const;
 };
 
index 38f189db6b3d0c722a8ca6d93ffe4671f0bd8378..de2f98903498a80650b3988df8350232e3e9a57d 100644 (file)
@@ -19,48 +19,48 @@ class GeomAPI_XYZ : public GeomAPI_Interface
 {
  public:
   /// Creation by coordinates
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   GeomAPI_XYZ(const double theX, const double theY, const double theZ);
 
   /// returns X coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double x() const;
   /// returns Y coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double y() const;
   /// returns Z coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double z() const;
 
   /// sets X coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setX(const double theX);
   /// sets Y coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setY(const double theY);
   /// sets Z coordinate
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   void setZ(const double theZ);
 
   /// result is sum of coordinates of this and the given argument
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_XYZ> added(const std::shared_ptr<GeomAPI_XYZ>& theArg);
   /// result is difference between coordinates of this and the given argument
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_XYZ> decreased(const std::shared_ptr<GeomAPI_XYZ>& theArg);
   /// result is coordinates multiplied by the argument
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_XYZ> multiplied(const double theArg);
 
   /// result is a scalar product of two triplets
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double dot(const std::shared_ptr<GeomAPI_XYZ>& theArg) const;
   /// result is a cross product of two triplets
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   const std::shared_ptr<GeomAPI_XYZ> cross(const std::shared_ptr<GeomAPI_XYZ>& theArg) const;
 
   /// Distance between two triplets
-  GEOMAPI_EXPORT 
+  GEOMAPI_EXPORT
   double distance(const std::shared_ptr<GeomAPI_XYZ>& theOther) const;
 };
 
index d198302d7f13106d1f698f6dd4b404835f0e101e..edf07536095315320d190d5644981b0775de760c 100644 (file)
@@ -32,7 +32,7 @@ void GeomAlgoAPI_Boolean::build(const ListOfShape& theObjects,
 
   // Getting objects.
   TopTools_ListOfShape anObjects;
-  for(ListOfShape::const_iterator 
+  for(ListOfShape::const_iterator
     anObjectsIt = theObjects.begin(); anObjectsIt != theObjects.end(); anObjectsIt++)
   {
     anObjects.Append((*anObjectsIt)->impl<TopoDS_Shape>());
@@ -40,7 +40,7 @@ void GeomAlgoAPI_Boolean::build(const ListOfShape& theObjects,
 
   // Getting tools.
   TopTools_ListOfShape aTools;
-  for(ListOfShape::const_iterator 
+  for(ListOfShape::const_iterator
     aToolsIt = theTools.begin(); aToolsIt != theTools.end(); aToolsIt++)
   {
     aTools.Append((*aToolsIt)->impl<TopoDS_Shape>());
index ee03a2224f3323a8362afc5a5fcc00322a30446c..c8b7baa94a4273f21ab94c8c786890f51c575a28 100644 (file)
@@ -42,30 +42,30 @@ bool GeomAlgoAPI_Box::check()
 void GeomAlgoAPI_Box::build()
 {
   myCreatedFaces.clear();
-  
+
   // Construct the box
   BRepPrimAPI_MakeBox *aBoxMaker = new BRepPrimAPI_MakeBox(myDx, myDy, myDz);
   aBoxMaker->Build();
-    
+
   // Test the algorithm
   if (!aBoxMaker->IsDone()) {
     myError = "Box builder with dimensions  :: algorithm failed.";
     return;
   }
-  
+
   TopoDS_Shape aResult = aBoxMaker->Shape();
   std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
   aShape->setImpl(new TopoDS_Shape(aResult));
   setShape(aShape);
-  
+
   // Test on the shapes
   if (!aShape.get() || aShape->isNull()) {
     myError = "Box builder with dimensions  :: resulting shape is null.";
     return;
   }
-  
+
   setImpl(aBoxMaker);
-  
+
   setDone(true);
 }
 
@@ -79,16 +79,16 @@ void GeomAlgoAPI_Box::prepareNamingFaces()
   std::shared_ptr<GeomAPI_Shape> aShapeBack(new GeomAPI_Shape);
   aShapeBack->setImpl(new TopoDS_Shape(aBoxMaker.BackFace()));
   myCreatedFaces["Back"] = aShapeBack;
-  std::shared_ptr<GeomAPI_Shape> aShapeTop(new GeomAPI_Shape); 
+  std::shared_ptr<GeomAPI_Shape> aShapeTop(new GeomAPI_Shape);
   aShapeTop->setImpl(new TopoDS_Shape(aBoxMaker.TopFace()));
   myCreatedFaces["Top"] = aShapeTop;
-  std::shared_ptr<GeomAPI_Shape> aShapeBottom(new GeomAPI_Shape); 
+  std::shared_ptr<GeomAPI_Shape> aShapeBottom(new GeomAPI_Shape);
   aShapeBottom->setImpl(new TopoDS_Shape(aBoxMaker.BottomFace()));
   myCreatedFaces["Bottom"] = aShapeBottom;
-  std::shared_ptr<GeomAPI_Shape> aShapeLeft(new GeomAPI_Shape); 
+  std::shared_ptr<GeomAPI_Shape> aShapeLeft(new GeomAPI_Shape);
   aShapeLeft->setImpl(new TopoDS_Shape(aBoxMaker.LeftFace()));
   myCreatedFaces["Left"] = aShapeLeft;
-  std::shared_ptr<GeomAPI_Shape> aShapeRight(new GeomAPI_Shape); 
+  std::shared_ptr<GeomAPI_Shape> aShapeRight(new GeomAPI_Shape);
   aShapeRight->setImpl(new TopoDS_Shape(aBoxMaker.RightFace()));
   myCreatedFaces["Right"] = aShapeRight;
 }
index 23bcb8d350c40b66532c8cea836d9c20a069129e..4f772eed40cea54cee2e38c8ae1780abef0ff87b 100644 (file)
  */
 class GeomAlgoAPI_Box : public GeomAlgoAPI_MakeShape
 {
- public: 
+ public:
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Box();
-  
+
   /// Creates a box using the dimensions.
   /// \param theDx The dimension on X
   /// \param theDy The dimension on Y
   /// \param theDz The dimension on Z
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Box(const double theDx, const double theDy, const double theDz);
-  
+
   /// Checks if each dimension "Dx", Dy" and "Dz" for the box construction is OK.
   GEOMALGOAPI_EXPORT bool check();
-  
+
   /// Builds the box with the dimensions "Dx", "Dy" and "Dz".
   GEOMALGOAPI_EXPORT void build();
-  
+
   /// Prepare the naming (redifined because it is specific for a box).
   GEOMALGOAPI_EXPORT void prepareNamingFaces();
-  
+
  private:
   double myDx; /// Dimension on X to create a box.
   double myDy; /// Dimension on Y to create a box.
index dcfd835c5625779719afd0a52c2a6065faad56b3..c177f86ee7e0210a6c17ec42ba85681fa9bf0e79 100644 (file)
@@ -33,33 +33,33 @@ bool GeomAlgoAPI_BoxPoints::check()
 void GeomAlgoAPI_BoxPoints::build()
 {
   myCreatedFaces.clear();
-  
+
   const gp_Pnt& aFirstPoint = myFirstPoint->impl<gp_Pnt>();
   const gp_Pnt& aSecondPoint = mySecondPoint->impl<gp_Pnt>();
 
   // Construct the box
   BRepPrimAPI_MakeBox *aBoxMaker = new  BRepPrimAPI_MakeBox(aFirstPoint, aSecondPoint);
   aBoxMaker->Build();
-  
+
   // Test the algorithm
   if(!aBoxMaker->IsDone()) {
     myError = "Box builder with two points  :: algorithm failed.";
     return;
   }
-    
+
   TopoDS_Shape aResult = aBoxMaker->Shape();
-  
+
   std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
   aShape->setImpl(new TopoDS_Shape(aResult));
   setShape(aShape);
-  
+
   // Tests on the shape
   if (!aShape.get() || aShape->isNull()) {
     myError = "Box builder with two points  :: resulting shape is null.";
     return;
   }
-  
+
   setImpl(aBoxMaker);
-  
+
   setDone(true);
 }
index 159715f21c10167ed54ffcf89e89366af0a481b7..f6cedd3aac89d4f025f130e783a7022ce8e91e5c 100644 (file)
  */
 class GeomAlgoAPI_BoxPoints : public GeomAlgoAPI_Box
 {
- public: 
+ public:
   /// Creates a box using the two points that defined a diagonal.
   /// \param theFirstPoint One extermity of the diagonal
   /// \param theSecondPoint The other extremity of the diagonal
   GEOMALGOAPI_EXPORT GeomAlgoAPI_BoxPoints(std::shared_ptr<GeomAPI_Pnt> theFirstPoint,
                                            std::shared_ptr<GeomAPI_Pnt> theSecondPoint);
-  
+
   /// \return true if the data of the construction of the box were correct.
   GEOMALGOAPI_EXPORT bool check();
-  
+
   /// Builds the box.
   GEOMALGOAPI_EXPORT void build();
-  
+
  private:
   std::shared_ptr<GeomAPI_Pnt> myFirstPoint; /// First point to create a box.
   std::shared_ptr<GeomAPI_Pnt> mySecondPoint; /// Second point to create a box.
index 36caf87794da032c67ffc031e8565bc367081ac1..594729ad9c45b15f79361acc851fde2f6009e100 100644 (file)
@@ -28,7 +28,7 @@ class GEOMALGOAPI_EXPORT GeomAlgoAPI_CompoundBuilder
   static std::shared_ptr<GeomAPI_Shape> compound(
       std::list<std::shared_ptr<GeomAPI_Shape> > theShapes);
 
-  /// Produces the integerr identifier of the shape theSub in theContext (needed for 
+  /// Produces the integerr identifier of the shape theSub in theContext (needed for
   /// groups export to old GEOM)
   /// \returns zero if theSub not found in theContext
   static int id(
index e5ac0f25468ea3293f44e1aa83d9dc4cf1dd3022..ceae16de92bd6b680df347d3628cabd485de21cc 100644 (file)
@@ -13,7 +13,7 @@
  * \ingroup DataAlgo
  * \brief Defines several static methods useful for Data Framework filling
  */
-class GEOMALGOAPI_EXPORT GeomAlgoAPI_DFLoader 
+class GEOMALGOAPI_EXPORT GeomAlgoAPI_DFLoader
 {
  public:
   /// Refine result
index 1f8b01832171df75f38897ad147ed9e16b714fd7..fed51bda42259a13c5fd7b044fec652012b84b46 100644 (file)
@@ -39,7 +39,7 @@ std::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::line(
 std::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::line(
     double theDX, double theDY, double theDZ)
 {
-  
+
   const gp_Pnt& aStart = gp_Pnt(0, 0, 0);
   const gp_Pnt& anEnd = gp_Pnt(theDX, theDY, theDZ);
 
@@ -68,7 +68,7 @@ std::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::cylinderAxis(
   Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace, aLoc);
   if (aSurf.IsNull())
     return aResult;
-  Handle(Geom_RectangularTrimmedSurface) aTrimmed = 
+  Handle(Geom_RectangularTrimmedSurface) aTrimmed =
     Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurf);
   if (!aTrimmed.IsNull())
     aSurf = aTrimmed->BasisSurface();
@@ -86,7 +86,7 @@ std::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::cylinderAxis(
   for(int aX = 0; aX < 2; aX++) {
     for(int aY = 0; aY < 2; aY++) {
       for(int aZ = 0; aZ < 2; aZ++) {
-        gp_XYZ aBoxVertex(aX == 0 ? aBoxMin.X() : aBoxMax.X(), 
+        gp_XYZ aBoxVertex(aX == 0 ? aBoxMin.X() : aBoxMax.X(),
           aY == 0 ? aBoxMin.Y() : aBoxMax.Y(), aZ == 0 ? aBoxMin.Z() : aBoxMax.Z());
         gp_XYZ aVec(aBoxVertex - anAxis.Location().XYZ());
         double aProjParam = aVec.Dot(anAxis.Direction().XYZ());
@@ -117,7 +117,7 @@ std::shared_ptr<GeomAPI_Edge> GeomAlgoAPI_EdgeBuilder::cylinderAxis(
   gp_Pnt anEnd(anAxis.Location().XYZ() - anAxis.Direction().XYZ() * 100.);
   anEnd.Transform(aLoc.Transformation());
   */
-  
+
   BRepBuilderAPI_MakeEdge anEdgeBuilder(aStart, anEnd);
   std::shared_ptr<GeomAPI_Edge> aRes(new GeomAPI_Edge);
   TopoDS_Edge anEdge = anEdgeBuilder.Edge();
index 53338dae756f1d4e6040f7c7ece1c67967892b8d..b5b9cd5d706171c25eab351063f814d899389fb9 100755 (executable)
@@ -19,6 +19,6 @@ GeomAlgoAPI_Exception::~GeomAlgoAPI_Exception() throw()
 
 //=================================================================================================
 const char* GeomAlgoAPI_Exception::what() const throw()
-{ 
+{
   return myMessageError.c_str();
 }
\ No newline at end of file
index 790af42b543df0dc8a5d103cc7d6b824e6871ca5..df0e54abd6c821ea806d0e8de49d4669134e8e51 100644 (file)
  */
 class GeomAlgoAPI_Exception : public std::exception
 {
- public: 
+ public:
   /// Create an exception
   /// \param theMessageError Error message to be displayed
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Exception(std::string theMessageError);
-  /// Destroyer 
+  /// Destroyer
   GEOMALGOAPI_EXPORT ~GeomAlgoAPI_Exception() throw();
-  /// Allows to collet the error 
+  /// Allows to collet the error
   GEOMALGOAPI_EXPORT const char* what() const throw();
+
 private:
   std::string myMessageError; /// Error message to be displayed.
 };
index e0aff60b9769d6c2d104c3a8e0b93a38acc38455..0dce2f9f99cfd1010f8ee45e5d0803e29ef94f6b 100644 (file)
@@ -78,7 +78,7 @@ std::shared_ptr<GeomAPI_Face> GeomAlgoAPI_FaceBuilder::planarFace(
   gp_Pln aPlane(aA, aB, aC, aD);
 
   // half of the size in each direction from the center
-  BRepBuilderAPI_MakeFace aFaceBuilder(aPlane, theX, theX + theWidth, 
+  BRepBuilderAPI_MakeFace aFaceBuilder(aPlane, theX, theX + theWidth,
                                        theY, theY + theHeight);
   std::shared_ptr<GeomAPI_Face> aRes(new GeomAPI_Face());
   aRes->setImpl(new TopoDS_Face(aFaceBuilder.Face()));
index 273937e2de2f9fedad49e4e673b6d4539ee7ed1d..41ef88765f9287cf5c456caeb79776811f22b16f 100644 (file)
@@ -37,7 +37,7 @@ void GeomAlgoAPI_Intersection::build(const ListOfShape& theObjects,
 
   // Getting objects.
   TopTools_ListOfShape anObjects;
-  for (ListOfShape::const_iterator 
+  for (ListOfShape::const_iterator
     anObjectsIt = theObjects.begin(); anObjectsIt != theObjects.end(); anObjectsIt++) {
     const TopoDS_Shape& aShape = (*anObjectsIt)->impl<TopoDS_Shape>();
     if(!aShape.IsNull()) {
@@ -48,7 +48,7 @@ void GeomAlgoAPI_Intersection::build(const ListOfShape& theObjects,
 
   // Getting tools.
   TopTools_ListOfShape aTools;
-  for (ListOfShape::const_iterator 
+  for (ListOfShape::const_iterator
     aToolsIt = theTools.begin(); aToolsIt != theTools.end(); aToolsIt++) {
     const TopoDS_Shape& aShape = (*aToolsIt)->impl<TopoDS_Shape>();
     if(!aShape.IsNull()) {
index 28942716421fa41806d5ef60835ebd3ba018c9cc..dad018f0cee8d427301db1e382540b5df2e37a49 100644 (file)
@@ -238,13 +238,13 @@ bool GeomAlgoAPI_MakeShape::checkValid(std::string theMessage){
   for(TopExp_Explorer anExp(aTopoDSShape,TopAbs_SOLID); anExp.More(); anExp.Next()) {
     aNbVolumes ++;
   }
-  
+
   if (aNbVolumes != 1) {
     myError = theMessage +
       " :: connexity error, the resulting shape is made of several separate solids.";
     return false;
   }
-  
+
   return true ;
 }
-  
+
index 649684ee05dd479c9870972d80b876c519171401..91b9781c60f81bf468c14461e45003a3bbbea256 100644 (file)
@@ -37,7 +37,7 @@ public:
   /// \brief Constructor by builder and builder type.
   /// \param[in] theBuilder pointer to the builder.
   /// \param[in] theBuilderType builder type.
-  template<class T> explicit GeomAlgoAPI_MakeShape(T* theBuilder, 
+  template<class T> explicit GeomAlgoAPI_MakeShape(T* theBuilder,
     const BuilderType theBuilderType = OCCT_BRepBuilderAPI_MakeShape)
   : GeomAPI_Interface(theBuilder),
     myBuilderType(theBuilderType)
@@ -48,7 +48,7 @@ public:
   /// \brief Initializes internals.
   /// \param[in] theBuilder pointer to the builder.
   /// \param[in] theBuilderType builder type.
-  template<class T> void initialize(T* theBuilder, 
+  template<class T> void initialize(T* theBuilder,
     const BuilderType theBuilderType = OCCT_BRepBuilderAPI_MakeShape)
   {
     setImpl(theBuilder);
@@ -122,8 +122,8 @@ protected:
   /// Error occurred during the execution of an algorithm.
   std::string myError;
   /// Map of created faces with their name for naming.
-  std::map< std::string, std::shared_ptr<GeomAPI_Shape> > myCreatedFaces; 
-  
+  std::map< std::string, std::shared_ptr<GeomAPI_Shape> > myCreatedFaces;
+
 private:
   /// \brief Initializes internals.
   void initialize();
index 86a01cf6a75482fed36edf2d8a2704837521b178..96c663b412a12b89be05071ea86f7b14352b45f7 100644 (file)
@@ -79,7 +79,7 @@ void GeomAlgoAPI_MakeShapeList::modified(const std::shared_ptr<GeomAPI_Shape> th
 
 bool GeomAlgoAPI_MakeShapeList::isDeleted(const std::shared_ptr<GeomAPI_Shape> theShape)
 {
-  for(ListOfMakeShape::iterator aBuilderIt = myListOfMakeShape.begin(); 
+  for(ListOfMakeShape::iterator aBuilderIt = myListOfMakeShape.begin();
       aBuilderIt != myListOfMakeShape.end(); aBuilderIt++) {
     std::shared_ptr<GeomAlgoAPI_MakeShape> aMakeShape = *aBuilderIt;
     if(aMakeShape->isDeleted(theShape)) {
@@ -105,7 +105,7 @@ void GeomAlgoAPI_MakeShapeList::result(const std::shared_ptr<GeomAPI_Shape> theS
   aResultShapesMap.Add(theShape->impl<TopoDS_Shape>());
   aResultShapesList.Append(theShape->impl<TopoDS_Shape>());
 
-  for(ListOfMakeShape::iterator aBuilderIt = myListOfMakeShape.begin(); 
+  for(ListOfMakeShape::iterator aBuilderIt = myListOfMakeShape.begin();
       aBuilderIt != myListOfMakeShape.end(); aBuilderIt++) {
     std::shared_ptr<GeomAlgoAPI_MakeShape> aMakeShape = *aBuilderIt;
     NCollection_Map<TopoDS_Shape> aTempShapes;
@@ -127,7 +127,7 @@ void GeomAlgoAPI_MakeShapeList::result(const std::shared_ptr<GeomAPI_Shape> theS
       }
       ListOfShape aModifiedShapes;
       aMakeShape->modified(aShape, aModifiedShapes);
-      for(ListOfShape::const_iterator 
+      for(ListOfShape::const_iterator
           anIt = aModifiedShapes.cbegin(); anIt != aModifiedShapes.cend(); anIt++) {
         const TopoDS_Shape& anItShape = (*anIt)->impl<TopoDS_Shape>();
         aTempShapes.Add(anItShape);
@@ -139,7 +139,7 @@ void GeomAlgoAPI_MakeShapeList::result(const std::shared_ptr<GeomAPI_Shape> theS
       if(hasResults) {
         const TopoDS_Shape& aTopoDSShape = aShapeIt.Value();
         if(aResultShapesMap.Remove(aTopoDSShape) == Standard_True) {
-          for(NCollection_List<TopoDS_Shape>::Iterator 
+          for(NCollection_List<TopoDS_Shape>::Iterator
               aResIt(aResultShapesList); aResIt.More(); aResIt.Next()) {
             if(aTopoDSShape.IsEqual(aResIt.Value())) {
               aResultShapesList.Remove(aResIt);
@@ -152,7 +152,7 @@ void GeomAlgoAPI_MakeShapeList::result(const std::shared_ptr<GeomAPI_Shape> theS
     anAlgoShapes.Unite(aTempShapes);
   }
 
-  for(NCollection_List<TopoDS_Shape>::Iterator 
+  for(NCollection_List<TopoDS_Shape>::Iterator
       aShapeIt(aResultShapesList); aShapeIt.More(); aShapeIt.Next()) {
     std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
     aShape->setImpl(new TopoDS_Shape(aShapeIt.Value()));
index a19419b7394b4fdfb7c6c4af884ac0a2bcb68a91..eeb832f2f4f5be26796a580606b7fa6fcc5d6560 100644 (file)
@@ -47,14 +47,14 @@ void GeomAlgoAPI_Partition::build(const ListOfShape& theObjects,
   this->setBuilderType(OCCT_BOPAlgo_Builder);
 
   // Getting objects.
-  for (ListOfShape::const_iterator 
+  for (ListOfShape::const_iterator
        anObjectsIt = theObjects.begin(); anObjectsIt != theObjects.end(); anObjectsIt++) {
     const TopoDS_Shape& aShape = (*anObjectsIt)->impl<TopoDS_Shape>();
     anOperation->AddArgument(aShape);
   }
 
   // Getting tools.
-  for (ListOfShape::const_iterator 
+  for (ListOfShape::const_iterator
        aToolsIt = theTools.begin(); aToolsIt != theTools.end(); aToolsIt++) {
     const TopoDS_Shape& aShape = (*aToolsIt)->impl<TopoDS_Shape>();
     anOperation->AddTool(aShape);
index 76df6cbb93dc0510e0c8fec5f3840d37afce968b..2718e5c98ef35b538fbd56d77eafd49106677d05 100644 (file)
@@ -15,7 +15,7 @@
 #include <TopoDS_Iterator.hxx>
 
 //=================================================================================================
-GeomAlgoAPI_PaveFiller::GeomAlgoAPI_PaveFiller(const ListOfShape& theListOfShape, 
+GeomAlgoAPI_PaveFiller::GeomAlgoAPI_PaveFiller(const ListOfShape& theListOfShape,
                                                const bool theIsMakeCompSolids)
 {
   build(theListOfShape, theIsMakeCompSolids);
@@ -28,7 +28,7 @@ void GeomAlgoAPI_PaveFiller::build(const ListOfShape& theListOfShape,
 {
   BOPAlgo_PaveFiller aPaveFiller;
   BOPCol_ListOfShape aListOfShape;
-  for(ListOfShape::const_iterator 
+  for(ListOfShape::const_iterator
     anIt = theListOfShape.cbegin(); anIt != theListOfShape.cend(); anIt++) {
     const TopoDS_Shape& aShape = (*anIt)->impl<TopoDS_Shape>();
     if(aShape.ShapeType() == TopAbs_COMPOUND) {
index 5a63fbf5e4d67a1eb61747e2d275d7950d9fa21a..3df2e330b0b8ced3d79bbcffcaa475025cb31091 100644 (file)
@@ -14,7 +14,7 @@
 
 /// \class GeomAlgoAPI_PaveFiller
 /// \ingroup DataAlgo
-/// \brief Finds the common parts from the list of shapes and 
+/// \brief Finds the common parts from the list of shapes and
 ///  breaks it to shapes with shared subshapes.
 class GeomAlgoAPI_PaveFiller : public GeomAlgoAPI_MakeShape
 {
@@ -22,7 +22,7 @@ public:
   /// \brief Constructor.
   /// \param[in] theListOfShape list of shape which should be splitted.
   /// \param[in] theIsMakeCompSolids if true gather shapes with shared faces to compsolids.
-  GEOMALGOAPI_EXPORT GeomAlgoAPI_PaveFiller(const ListOfShape& theListOfShape, 
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_PaveFiller(const ListOfShape& theListOfShape,
                                             const bool theIsMakeCompSolids = false);
 
 private:
index ca7b81140cf61a90f799688251e681f6af628c46..8c1bef7bdd460eb2dda4bd366906cead2d5f84e6 100644 (file)
@@ -183,7 +183,7 @@ void GeomAlgoAPI_Pipe::build(const ListOfShape& theBaseShapes,
                              const ListOfShape& theLocations,
                              const GeomShapePtr thePathShape)
 {
-  if(theBaseShapes.empty() || 
+  if(theBaseShapes.empty() ||
      (!theLocations.empty() && theLocations.size() != theBaseShapes.size())) {
     return;
   }
index fb0f0b6c0aa3e3aa17ed62c7c0f42bf232dffec2..6f00852258162fbe73d2e8c4949123385f5564d1 100644 (file)
@@ -15,7 +15,7 @@
 
 /// \class GeomAlgoAPI_Pipe
 /// \ingroup DataAlgo
-/// \brief Allows to create extrusion of objects along a path. 
+/// \brief Allows to create extrusion of objects along a path.
 /// It produces the following results from objects:\n
 /// Vertex -> Edge\n
 /// Edge -> Face\n
index af06ddd819a1d2374fc20b96c893ec1e38845e06..58128437f08beed518f8d23b05305ca277580a6f 100644 (file)
@@ -123,7 +123,7 @@ void GeomAlgoAPI_Placement::build(const std::shared_ptr<GeomAPI_Shape>& theSourc
             gp_Vec(aSrcDstPoints[1 - anInd], aSrcDstPoints[anInd]));
           if (aVec.SquareMagnitude() < Precision::SquareConfusion()) {
             // normal and points direction are collinear
-            if (Abs(aSrcDstNormals[1 - anInd].Y()) >= Precision::Confusion() || 
+            if (Abs(aSrcDstNormals[1 - anInd].Y()) >= Precision::Confusion() ||
               Abs(aSrcDstNormals[1 - anInd].Z()) >= Precision::Confusion())
               aVec = gp::DX();
             else
@@ -163,7 +163,7 @@ void GeomAlgoAPI_Placement::build(const std::shared_ptr<GeomAPI_Shape>& theSourc
         gp_Vec aVec(aSrcDstPoints[anInd], aSrcDstPoints[1 - anInd]);
         aVec.Cross(aSrcDstDirections[anInd]);
         if (aVec.SquareMagnitude() < Precision::SquareConfusion()) { // point is on line
-          if (Abs(aSrcDstDirections[1 - anInd].Y()) >= Precision::Confusion() || 
+          if (Abs(aSrcDstDirections[1 - anInd].Y()) >= Precision::Confusion() ||
             Abs(aSrcDstDirections[1 - anInd].Z()) >= Precision::Confusion())
             aVec = gp::DX();
           else
index b152493407358d6a8bef757568e91c912697c488..aa24acab6d140d34b9eb40b9163ae5c172ce15a1 100644 (file)
@@ -25,10 +25,10 @@ public:
   /// \param[in] theDestSolid    invariant shape
   /// \param[in] theSourceShape  a shape on the solid to be made coincident with destination object
   /// \param[in] theDestShape    destination object
-  /// \param[in] theIsReverse    indicates that the solid materials should be on the same side 
+  /// \param[in] theIsReverse    indicates that the solid materials should be on the same side
   ///                            against the destination plane
   /// \param[in] theIsCentering  indicates the planes should be centered
-  /// \param[in] theSimpleTransform makes just transformation of shape 
+  /// \param[in] theSimpleTransform makes just transformation of shape
   ///                               without changing of topology or geometry
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Placement(const std::shared_ptr<GeomAPI_Shape> theSourceSolid,
                                            const std::shared_ptr<GeomAPI_Shape> theDestSolid,
index 69cdabbfd501378ff9c9bbd728fc5f9f6abcb1a3..cad4bc3cc01b927fb79fe2d86d32be679d8c75a5 100644 (file)
@@ -26,7 +26,7 @@
 #include <TopoDS_Vertex.hxx>
 
 //==================================================================================================
-std::shared_ptr<GeomAPI_Vertex> 
+std::shared_ptr<GeomAPI_Vertex>
   GeomAlgoAPI_PointBuilder::vertex(const std::shared_ptr<GeomAPI_Pnt> thePoint)
 {
   const gp_Pnt& aPnt = thePoint->impl<gp_Pnt>();
@@ -51,7 +51,7 @@ std::shared_ptr<GeomAPI_Vertex> GeomAlgoAPI_PointBuilder::vertex(const double th
 }
 
 //==================================================================================================
-std::shared_ptr<GeomAPI_Pnt> 
+std::shared_ptr<GeomAPI_Pnt>
   GeomAlgoAPI_PointBuilder::point(const std::shared_ptr<GeomAPI_Shape> theVertex)
 {
   TopoDS_Shape aShape = theVertex->impl<TopoDS_Shape>();
index be219a503065c4ae09230352493c8d6c48cc7bc8..0d5287acf3ebe9e84192450f7b6e3fe0ca666f7e 100644 (file)
@@ -33,7 +33,7 @@ public:
   /// \brief Creates vertex by edge and distance on it.
   /// \param[in] theEdge edge.
   /// \param[in] theValue distance value.
-  /// \param[in] theIsPercent if true theValue will be treated 
+  /// \param[in] theIsPercent if true theValue will be treated
   ///                         as a percentage of theEdge total length.
   /// \param[in] theIsReverse if true the distance will be measured from the edge end point.
   /// \return created vertex.
@@ -62,7 +62,7 @@ public:
   /// \param[in] theEdge linear edge.
   /// \param[in] theFace planar face.
   /// \return created vertex.
-  static std::shared_ptr<GeomAPI_Vertex> 
+  static std::shared_ptr<GeomAPI_Vertex>
     vertexByIntersection(const std::shared_ptr<GeomAPI_Edge> theEdge,
                          const std::shared_ptr<GeomAPI_Face> theFace);
 
index acc94d25f49ffdebd396b10a5a46d8dee5225667..55db84bdfb75f933aeb5a3161b4cfd95d9c91517 100644 (file)
@@ -77,7 +77,7 @@ GeomAlgoAPI_Prism::GeomAlgoAPI_Prism(const GeomShapePtr theBaseShape,
                                      const GeomShapePtr theFromShape,
                                      const double       theFromSize)
 {
-  build(theBaseShape, std::shared_ptr<GeomAPI_Dir>(), theToShape, 
+  build(theBaseShape, std::shared_ptr<GeomAPI_Dir>(), theToShape,
         theToSize, theFromShape, theFromSize);
 }
 
@@ -101,7 +101,7 @@ void GeomAlgoAPI_Prism::build(const GeomShapePtr&                theBaseShape,
                               const double                       theFromSize)
 {
   if(!theBaseShape.get() ||
-    (((!theFromShape.get() && !theToShape.get()) || 
+    (((!theFromShape.get() && !theToShape.get()) ||
     (theFromShape.get() && theToShape.get() && theFromShape->isEqual(theToShape)))
     && (theFromSize == -theToSize))) {
     return;
@@ -190,7 +190,7 @@ void GeomAlgoAPI_Prism::build(const GeomShapePtr&                theBaseShape,
     // Moving base shape.
     gp_Trsf aTrsf;
     aTrsf.SetTranslation(aDirVec * -theFromSize);
-    BRepBuilderAPI_Transform* aTransformBuilder = 
+    BRepBuilderAPI_Transform* aTransformBuilder =
       new BRepBuilderAPI_Transform(aBaseShape, aTrsf);
     if(!aTransformBuilder) {
       return;
@@ -203,7 +203,7 @@ void GeomAlgoAPI_Prism::build(const GeomShapePtr&                theBaseShape,
     TopoDS_Shape aMovedBase = aTransformBuilder->Shape();
 
     // Making prism.
-    BRepPrimAPI_MakePrism* aPrismBuilder = 
+    BRepPrimAPI_MakePrism* aPrismBuilder =
       new BRepPrimAPI_MakePrism(aMovedBase, aDirVec * (theFromSize + theToSize));
     if(!aPrismBuilder) {
       return;
@@ -303,7 +303,7 @@ void GeomAlgoAPI_Prism::build(const GeomShapePtr&                theBaseShape,
     TopoDS_Shape aMovedBase = aTransformBuilder->Shape();
 
     // Making prism.
-    BRepPrimAPI_MakePrism* aPrismBuilder = 
+    BRepPrimAPI_MakePrism* aPrismBuilder =
       new BRepPrimAPI_MakePrism(aMovedBase, aDirVec * 2 * aPrismLength);
     if(!aPrismBuilder) {
       return;
@@ -471,12 +471,12 @@ void storeGenerationHistory(GeomAlgoAPI_Prism* thePrismAlgo,
     if(theType == TopAbs_VERTEX) {
       gp_Pnt aPnt = BRep_Tool::Pnt(TopoDS::Vertex(aShape));
       IntTools_Context anIntTools;
-      if(anIntTools.IsValidPointForFace(aPnt, 
+      if(anIntTools.IsValidPointForFace(aPnt,
           theToFace, Precision::Confusion()) == Standard_True) {
         aGeomSh->setImpl(new TopoDS_Shape(aShape));
         thePrismAlgo->addToShape(aGeomSh);
       }
-      if(anIntTools.IsValidPointForFace(aPnt, 
+      if(anIntTools.IsValidPointForFace(aPnt,
           theFromFace, Precision::Confusion()) == Standard_True) {
         aGeomSh->setImpl(new TopoDS_Shape(aShape));
         thePrismAlgo->addFromShape(aGeomSh);
index af7f4501b620c25d24898a65fc96c11521c64058..d751d41222d980e8fed05c755d3cbf47ceb4992d 100644 (file)
@@ -34,7 +34,7 @@ public:
 
   /// \brief Creates extrusion for the given shape along the normal for this shape.
   /// \param[in] theBaseShape vertex, edge, wire, face or shell.
-  /// \param[in] theDirection direction of extrusion. 
+  /// \param[in] theDirection direction of extrusion.
   ///                         Can be empty if theBaseShape is planar wire or face.
   /// \param[in] theToSize offset for "to" plane.
   /// \param[in] theFromSize offset for "from" plane.
@@ -45,10 +45,10 @@ public:
 
   /// \brief Creates extrusion for the given shape along the normal for this shape.
   /// \param[in] theBaseShape planar face or wire to be extruded.
-  /// \param[in] theToShape top bounding shape. Can be empty. 
+  /// \param[in] theToShape top bounding shape. Can be empty.
   ///                       In this case offset will be applied to the basis.
   /// \param[in] theToSize offset for "to" plane.
-  /// \param[in] theFromShape bottom bounding shape. Can be empty. 
+  /// \param[in] theFromShape bottom bounding shape. Can be empty.
   ///                         In this case offset will be applied to the basis.
   /// \param[in] theFromSize offset for "from" plane.
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(const GeomShapePtr theBaseShape,
@@ -59,7 +59,7 @@ public:
 
   /// \brief Creates extrusion for the given shape along the normal for this shape.
   /// \param[in] theBaseShape planar face or wire to be extruded.
-  /// \param[in] theDirection direction of extrusion. 
+  /// \param[in] theDirection direction of extrusion.
   ///                         Can be empty if theBaseShape is planar wire or face.
   /// \param[in] theToShape top bounding shape. Can be empty.
   ///                       In this case offset will be applied to the basis.
index 82c9b6ab46cad369c68f421a42a261b8c32225e6..feed9c76554e1a45d1045f550956e36eb1b4eb30 100644 (file)
@@ -104,7 +104,7 @@ void GeomAlgoAPI_Revolution::build(const GeomShapePtr&                 theBaseSh
                                    const double                        theFromAngle)
 {
   if(!theBaseShape || !theAxis ||
-    (((!theFromShape && !theToShape) || 
+    (((!theFromShape && !theToShape) ||
     (theFromShape && theToShape && theFromShape->isEqual(theToShape)))
     && (theFromAngle == -theToAngle))) {
     return;
@@ -220,7 +220,7 @@ void GeomAlgoAPI_Revolution::build(const GeomShapePtr&                 theBaseSh
     }
   } else if(theFromShape && theToShape) { // Case 2: When both bounding planes were set.
     // Making revolution to the 360 angle.
-    BRepPrimAPI_MakeRevol* aRevolBuilder = 
+    BRepPrimAPI_MakeRevol* aRevolBuilder =
       new BRepPrimAPI_MakeRevol(aBaseShape, anAxis, 2 * M_PI, Standard_True);
     if(!aRevolBuilder) {
       return;
@@ -262,10 +262,10 @@ void GeomAlgoAPI_Revolution::build(const GeomShapePtr&                 theBaseSh
     // Rotating bounding planes to the specified angle.
     gp_Trsf aFromTrsf;
     gp_Trsf aToTrsf;
-    double aFromRotAngle = 
-      ((aFromPln.Axis().Direction() * aBasePlane->Axis().Direction()) > 0) ? -theFromAngle : 
+    double aFromRotAngle =
+      ((aFromPln.Axis().Direction() * aBasePlane->Axis().Direction()) > 0) ? -theFromAngle :
                                                                               theFromAngle;
-    double aToRotAngle = 
+    double aToRotAngle =
       ((aToPln.Axis().Direction() * aBasePlane->Axis().Direction()) > 0) ? -theToAngle :
                                                                             theToAngle;
     aFromTrsf.SetRotation(anAxis,aFromRotAngle / 180.0 * M_PI);
@@ -317,7 +317,7 @@ void GeomAlgoAPI_Revolution::build(const GeomShapePtr&                 theBaseSh
       aResult = aGeomShape->impl<TopoDS_Shape>();
     }
 
-    // If after cut we got more than one solids then take closest 
+    // If after cut we got more than one solids then take closest
     // to the center of mass of the base face.
     aResult = findClosest(aResult, aBaseCentre);
 
@@ -330,7 +330,7 @@ void GeomAlgoAPI_Revolution::build(const GeomShapePtr&                 theBaseSh
     }
   } else { //Case 3: When only one bounding plane was set.
     // Making revolution to the 360 angle.
-    BRepPrimAPI_MakeRevol* aRevolBuilder = 
+    BRepPrimAPI_MakeRevol* aRevolBuilder =
       new BRepPrimAPI_MakeRevol(aBaseShape, anAxis, 2 * M_PI, Standard_True);
     if(!aRevolBuilder) {
       return;
@@ -485,18 +485,18 @@ void GeomAlgoAPI_Revolution::build(const GeomShapePtr&                 theBaseSh
       aResult = aGeomShape->impl<TopoDS_Shape>();
     }
 
-    // If after cut we got more than one solids then take 
+    // If after cut we got more than one solids then take
     // closest to the center of mass of the base face.
     aResult = findClosest(aResult, aBaseCentre);
 
     // Setting naming.
     if(aShapeTypeToExp == TopAbs_COMPOUND) {
-      storeGenerationHistory(this, aResult, TopAbs_EDGE, 
+      storeGenerationHistory(this, aResult, TopAbs_EDGE,
         aRotatedBoundingFace, aModifiedBaseShape, isFromFaceSet);
-      storeGenerationHistory(this, aResult, TopAbs_FACE, 
+      storeGenerationHistory(this, aResult, TopAbs_FACE,
         aRotatedBoundingFace, aModifiedBaseShape, isFromFaceSet);
     } else {
-      storeGenerationHistory(this, aResult, aShapeTypeToExp, 
+      storeGenerationHistory(this, aResult, aShapeTypeToExp,
         aRotatedBoundingFace, aModifiedBaseShape, isFromFaceSet);
     }
   }
@@ -669,16 +669,16 @@ void storeGenerationHistory(GeomAlgoAPI_Revolution* theRevolutionAlgo,
     if(theType == TopAbs_VERTEX) {
       gp_Pnt aPnt = BRep_Tool::Pnt(TopoDS::Vertex(aShape));
       IntTools_Context anIntTools;
-      if(anIntTools.IsValidPointForFace(aPnt, TopoDS::Face(theRotatedBoundingFace), 
+      if(anIntTools.IsValidPointForFace(aPnt, TopoDS::Face(theRotatedBoundingFace),
           Precision::Confusion()) == Standard_True) {
         aGeomSh->setImpl(new TopoDS_Shape(aShape));
-        theIsFromFaceSet ? theRevolutionAlgo->addFromShape(aGeomSh) : 
+        theIsFromFaceSet ? theRevolutionAlgo->addFromShape(aGeomSh) :
                            theRevolutionAlgo->addToShape(aGeomSh);
       }
       if(anIntTools.IsValidPointForFace(aPnt, TopoDS::Face(theModifiedBaseShape),
          Precision::Confusion()) == Standard_True) {
         aGeomSh->setImpl(new TopoDS_Shape(aShape));
-        theIsFromFaceSet ? theRevolutionAlgo->addToShape(aGeomSh) : 
+        theIsFromFaceSet ? theRevolutionAlgo->addToShape(aGeomSh) :
                            theRevolutionAlgo->addFromShape(aGeomSh);
       }
     } else if(theType == TopAbs_EDGE) {
@@ -687,29 +687,29 @@ void storeGenerationHistory(GeomAlgoAPI_Revolution* theRevolutionAlgo,
       anEdgeCheck.Perform();
       if(anEdgeCheck.MaxDistance() < Precision::Confusion()) {
         aGeomSh->setImpl(new TopoDS_Shape(aShape));
-        theIsFromFaceSet ? theRevolutionAlgo->addFromShape(aGeomSh) : 
+        theIsFromFaceSet ? theRevolutionAlgo->addFromShape(aGeomSh) :
                            theRevolutionAlgo->addToShape(aGeomSh);
       }
       anEdgeCheck.Init(anEdge, TopoDS::Face(theModifiedBaseShape));
       anEdgeCheck.Perform();
       if(anEdgeCheck.MaxDistance() < Precision::Confusion()) {
         aGeomSh->setImpl(new TopoDS_Shape(aShape));
-        theIsFromFaceSet ? theRevolutionAlgo->addToShape(aGeomSh) : 
+        theIsFromFaceSet ? theRevolutionAlgo->addToShape(aGeomSh) :
                            theRevolutionAlgo->addFromShape(aGeomSh);
       }
     } else {
       Handle(Geom_Surface) aFaceSurface = BRep_Tool::Surface(TopoDS::Face(aShape));
-      Handle(Geom_Surface) aBoundingSurface = 
+      Handle(Geom_Surface) aBoundingSurface =
         BRep_Tool::Surface(TopoDS::Face(theRotatedBoundingFace));
       Handle(Geom_Surface) aBaseSurface = BRep_Tool::Surface(TopoDS::Face(theModifiedBaseShape));
       if(aFaceSurface == aBoundingSurface) {
         aGeomSh->setImpl(new TopoDS_Shape(aShape));
-        theIsFromFaceSet ? theRevolutionAlgo->addFromShape(aGeomSh) : 
+        theIsFromFaceSet ? theRevolutionAlgo->addFromShape(aGeomSh) :
                            theRevolutionAlgo->addToShape(aGeomSh);
       }
       if(aFaceSurface == aBaseSurface) {
         aGeomSh->setImpl(new TopoDS_Shape(aShape));
-        theIsFromFaceSet ? theRevolutionAlgo->addToShape(aGeomSh) : 
+        theIsFromFaceSet ? theRevolutionAlgo->addToShape(aGeomSh) :
                            theRevolutionAlgo->addFromShape(aGeomSh);
       }
     }
index 7bb8530e4428090d86c64d3168c48345bfefa1bd..b429437c1a119bdb61794fc269e9d2ff3cdab8be 100644 (file)
@@ -39,10 +39,10 @@ public:
   /// \brief Creates revolution for the given shape.
   /// \param[in] theBaseShape face for revolution.
   /// \param[in] theAxis axis for revolution.
-  /// \param[in] theToShape to bounding shape. Can be empty. 
+  /// \param[in] theToShape to bounding shape. Can be empty.
   ///                       In this case offset will be applied to the basis.
   /// \param[in] theToAngle to angle.
-  /// \param[in] theFromShape from bounding shape. Can be empty. 
+  /// \param[in] theFromShape from bounding shape. Can be empty.
   ///                       In this case offset will be applied to the basis.
   /// \param[in] theFromAngle from angle.
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Revolution(const GeomShapePtr                 theBaseShape,
index 19ae526612d0e49d36043a30c312a3d0fc2e6026..363d8b936b18cbf4fd0ed22e18d779bdc41c0203 100644 (file)
@@ -14,7 +14,7 @@
 
 /// \class GeomAlgoAPI_Sewing
 /// \ingroup DataAlgo
-/// \brief Allows creation of connected topology (shells) 
+/// \brief Allows creation of connected topology (shells)
 ///        from a set of separate topological elements (faces).
 class GeomAlgoAPI_Sewing : public GeomAlgoAPI_MakeShape
 {
index 8112334bbcf12969222405b5a3b8f7112ab7bbcb..f6126bddc624a5b5da408939bf354ce669b48c22 100644 (file)
@@ -22,13 +22,13 @@ namespace GeomAlgoAPI_ShapeAPI
     const double theDz) throw (GeomAlgoAPI_Exception)
   {
     GeomAlgoAPI_Box aBoxAlgo(theDx,theDy,theDz);
-    
+
     if (!aBoxAlgo.check()) {
       throw GeomAlgoAPI_Exception(aBoxAlgo.getError());
     }
-    
+
     aBoxAlgo.build();
-    
+
     if(!aBoxAlgo.isDone()) {
       throw GeomAlgoAPI_Exception(aBoxAlgo.getError());
     }
@@ -37,20 +37,20 @@ namespace GeomAlgoAPI_ShapeAPI
     }
     return aBoxAlgo.shape();
   }
-  
+
   //======================================================================================
   std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeBox(
     std::shared_ptr<GeomAPI_Pnt> theFirstPoint,
     std::shared_ptr<GeomAPI_Pnt> theSecondPoint) throw (GeomAlgoAPI_Exception)
   {
     GeomAlgoAPI_BoxPoints aBoxAlgo(theFirstPoint, theSecondPoint);
-    
+
     if (!aBoxAlgo.check()) {
       throw GeomAlgoAPI_Exception(aBoxAlgo.getError());
     }
-    
+
     aBoxAlgo.build();
-    
+
     if(!aBoxAlgo.isDone()) {
       throw GeomAlgoAPI_Exception(aBoxAlgo.getError());
     }
index dc9328be14ea5b12a927781e4ddddca71904a371..e016a3c942bcd87367fc9953b4f04c770e7c94db 100644 (file)
@@ -27,9 +27,9 @@ public:
   /// \param theDy The dimension on Y
   /// \param theDz The dimension on Z
   /// \return a shape
-  static std::shared_ptr<GeomAPI_Shape> makeBox(const double theDx, const double theDy, 
+  static std::shared_ptr<GeomAPI_Shape> makeBox(const double theDx, const double theDy,
                                                 const double theDz) throw (GeomAlgoAPI_Exception);
-  
+
   /// Creates a box using the two points that defined a diagonal.
   /// \param theFirstPoint One extermity of the diagonal
   /// \param theSecondPoint The other extremity of the diagonal
index cc3e24bfec990acc9f50c406944e82b2661f3bdd..bb00981c25d4b88c011b4a34cca344040ed5ab33 100644 (file)
@@ -128,7 +128,7 @@ void GeomAlgoAPI_ShapeBuilder::addInternal(const std::shared_ptr<GeomAPI_Shape>
   // Copy sub-shapes from list to new shape.
   BRep_Builder aBuilder;
   std::shared_ptr<GeomAlgoAPI_MakeShapeCustom> aMakeShapeCustom(new GeomAlgoAPI_MakeShapeCustom());
-  for(ListOfShape::const_iterator 
+  for(ListOfShape::const_iterator
       anIt = theShapesToAdd.cbegin(); anIt != theShapesToAdd.cend(); ++anIt) {
     TopoDS_Shape aShapeToAdd = (*anIt)->impl<TopoDS_Shape>();
     TopoDS_Shape aModShapeToAdd = aShapeToAdd;
@@ -160,7 +160,7 @@ void GeomAlgoAPI_ShapeBuilder::addInternal(const std::shared_ptr<GeomAPI_Shape>
     if(aBaseShapeType == TopAbs_WIRE) {
       if(aShapeToAddType == TopAbs_VERTEX) {
         // Find on which edge vertex is lie and add to this edge.
-        for(TopExp_Explorer 
+        for(TopExp_Explorer
             aResultExp(aResultShape, TopAbs_EDGE); aResultExp.More(); aResultExp.Next()) {
           TopoDS_Shape anEdge = aResultExp.Current();
           BRepExtrema_DistShapeShape aDist(anEdge, aShapeToAdd);
index 3258f959042fe9dcfe8c13a2ceb3a4b4b191c4a7..5bc4fe03f4acefa8e70af55bfcafe3b06df42d5c 100644 (file)
@@ -146,7 +146,7 @@ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeTools::combineShapes(
   // Get all shapes with common subshapes and free shapes.
   NCollection_Map<TopoDS_Shape> aFreeShapes;
   NCollection_Vector<NCollection_Map<TopoDS_Shape>> aShapesWithCommonSubshapes;
-  for(BOPCol_IndexedDataMapOfShapeListOfShape::Iterator 
+  for(BOPCol_IndexedDataMapOfShapeListOfShape::Iterator
       anIter(aMapSA); anIter.More(); anIter.Next()) {
     const TopoDS_Shape& aShape = anIter.Key();
     BOPCol_ListOfShape& aListOfShape = anIter.ChangeValue();
@@ -169,10 +169,10 @@ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeTools::combineShapes(
       aFreeShapes.Remove(aF);
       aFreeShapes.Remove(aL);
       aListOfShape.Clear();
-      for(NCollection_List<TopoDS_Shape>::Iterator 
+      for(NCollection_List<TopoDS_Shape>::Iterator
           aTempIter(aTempList); aTempIter.More(); aTempIter.Next()) {
         const TopoDS_Shape& aTempShape = aTempIter.Value();
-        for(BOPCol_IndexedDataMapOfShapeListOfShape::Iterator 
+        for(BOPCol_IndexedDataMapOfShapeListOfShape::Iterator
             anIter(aMapSA); anIter.More(); anIter.Next()) {
           BOPCol_ListOfShape& aTempListOfShape = anIter.ChangeValue();
           if(aTempListOfShape.IsEmpty()) {
@@ -203,24 +203,24 @@ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeTools::combineShapes(
   }
 
   // Combine shapes with common subshapes.
-  for(NCollection_Vector<NCollection_Map<TopoDS_Shape>>::Iterator 
+  for(NCollection_Vector<NCollection_Map<TopoDS_Shape>>::Iterator
       anIter(aShapesWithCommonSubshapes); anIter.More(); anIter.Next()) {
     TopoDS_Shell aShell;
     TopoDS_CompSolid aCSolid;
     TopoDS_Builder aBuilder;
-    theType == 
+    theType ==
       GeomAPI_Shape::COMPSOLID ? aBuilder.MakeCompSolid(aCSolid) : aBuilder.MakeShell(aShell);
     NCollection_Map<TopoDS_Shape>& aShapesMap = anIter.ChangeValue();
     for(TopExp_Explorer anExp(aShapesComp, aTA); anExp.More(); anExp.Next()) {
       const TopoDS_Shape& aShape = anExp.Current();
       if(aShapesMap.Contains(aShape)) {
-        theType == 
+        theType ==
           GeomAPI_Shape::COMPSOLID ? aBuilder.Add(aCSolid, aShape) : aBuilder.Add(aShell, aShape);
         aShapesMap.Remove(aShape);
       }
     }
     std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape);
-    TopoDS_Shape* aSh = theType == GeomAPI_Shape::COMPSOLID ? new TopoDS_Shape(aCSolid) : 
+    TopoDS_Shape* aSh = theType == GeomAPI_Shape::COMPSOLID ? new TopoDS_Shape(aCSolid) :
                                                               new TopoDS_Shape(aShell);
     aGeomShape->setImpl<TopoDS_Shape>(aSh);
     theCombinedShapes.push_back(aGeomShape);
@@ -244,11 +244,11 @@ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeTools::combineShapes(
     TopoDS_Compound aResultComp;
     TopoDS_Builder aBuilder;
     aBuilder.MakeCompound(aResultComp);
-    for(ListOfShape::const_iterator anIter = theCombinedShapes.cbegin(); 
+    for(ListOfShape::const_iterator anIter = theCombinedShapes.cbegin();
         anIter != theCombinedShapes.cend(); anIter++) {
       aBuilder.Add(aResultComp, (*anIter)->impl<TopoDS_Shape>());
     }
-    for(ListOfShape::const_iterator anIter = theFreeShapes.cbegin(); 
+    for(ListOfShape::const_iterator anIter = theFreeShapes.cbegin();
         anIter != theFreeShapes.cend(); anIter++) {
       aBuilder.Add(aResultComp, (*anIter)->impl<TopoDS_Shape>());
     }
@@ -259,7 +259,7 @@ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeTools::combineShapes(
 }
 
 //==================================================================================================
-static void addSimpleShapeToList(const TopoDS_Shape& theShape, 
+static void addSimpleShapeToList(const TopoDS_Shape& theShape,
                                  NCollection_List<TopoDS_Shape>& theList)
 {
   if(theShape.IsNull()) {
@@ -309,17 +309,17 @@ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeTools::groupSharedTopology(
     NCollection_List<TopoDS_Shape> aGroupedShapes;
     aGroupedShapes.Append(anUngroupedShapes.First());
     anUngroupedShapes.RemoveFirst();
-    for(NCollection_List<TopoDS_Shape>::Iterator aGroupIt(aGroupedShapes); 
+    for(NCollection_List<TopoDS_Shape>::Iterator aGroupIt(aGroupedShapes);
         aGroupIt.More(); aGroupIt.Next()) {
       const TopoDS_Shape& aGroupShape = aGroupIt.Value();
-      for(NCollection_List<TopoDS_Shape>::Iterator anUngroupedIt(anUngroupedShapes); 
+      for(NCollection_List<TopoDS_Shape>::Iterator anUngroupedIt(anUngroupedShapes);
           anUngroupedIt.More(); anUngroupedIt.Next()) {
         const TopoDS_Shape& anUngroupedShape = anUngroupedIt.Value();
         bool isFound = false;
-        for(TopExp_Explorer aGroupShapeExp(aGroupShape, TopAbs_VERTEX); 
+        for(TopExp_Explorer aGroupShapeExp(aGroupShape, TopAbs_VERTEX);
             aGroupShapeExp.More(); aGroupShapeExp.Next()) {
           const TopoDS_Shape& aVertex1 = aGroupShapeExp.Current();
-          for(TopExp_Explorer anUngroupedShapeExp(anUngroupedShape, TopAbs_VERTEX); 
+          for(TopExp_Explorer anUngroupedShapeExp(anUngroupedShape, TopAbs_VERTEX);
               anUngroupedShapeExp.More(); anUngroupedShapeExp.Next()) {
             const TopoDS_Shape& aVertex2 = anUngroupedShapeExp.Current();
             if(aVertex1.IsSame(aVertex2)) {
@@ -345,7 +345,7 @@ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeTools::groupSharedTopology(
   BRep_Builder aBuilder;
   aBuilder.MakeCompound(aCompound);
   ListOfShape aCompSolids, aFreeSolids;
-  for(NCollection_Vector<NCollection_List<TopoDS_Shape>>::Iterator 
+  for(NCollection_Vector<NCollection_List<TopoDS_Shape>>::Iterator
       anIt(aGroups); anIt.More(); anIt.Next()) {
     NCollection_List<TopoDS_Shape> aGroup = anIt.Value();
     GeomShapePtr aGeomShape(new GeomAPI_Shape());
@@ -376,7 +376,7 @@ std::list<std::shared_ptr<GeomAPI_Pnt> >
   Bnd_Box aBndBox;
 
   // Getting box.
-  for (ListOfShape::const_iterator 
+  for (ListOfShape::const_iterator
     anObjectsIt = theShapes.begin(); anObjectsIt != theShapes.end(); anObjectsIt++) {
     const TopoDS_Shape& aShape = (*anObjectsIt)->impl<TopoDS_Shape>();
     BRepBndLib::Add(aShape, aBndBox);
@@ -405,7 +405,7 @@ std::list<std::shared_ptr<GeomAPI_Pnt> >
 }
 
 //==================================================================================================
-std::shared_ptr<GeomAPI_Shape> 
+std::shared_ptr<GeomAPI_Shape>
   GeomAlgoAPI_ShapeTools::faceToInfinitePlane(const std::shared_ptr<GeomAPI_Shape> theFace)
 {
   if (!theFace.get())
@@ -463,7 +463,7 @@ std::shared_ptr<GeomAPI_Face> GeomAlgoAPI_ShapeTools::fitPlaneToBox(
   IntAna_Quadric aQuadric(aFacePln);
   Standard_Real UMin, UMax, VMin, VMax;
   UMin = UMax = VMin = VMax = 0;
-  for (std::list<std::shared_ptr<GeomAPI_Pnt> >::const_iterator 
+  for (std::list<std::shared_ptr<GeomAPI_Pnt> >::const_iterator
        aPointsIt = thePoints.begin(); aPointsIt != thePoints.end(); aPointsIt++) {
     const gp_Pnt& aPnt = (*aPointsIt)->impl<gp_Pnt>();
     gp_Lin aLin(aPnt, aFacePln.Axis().Direction());
@@ -620,7 +620,7 @@ bool GeomAlgoAPI_ShapeTools::isSubShapeInsideShape(
       // No intersections found. Edge is inside or outside face. Check it.
       BRepAdaptor_Curve aCurveAdaptor(anEdge);
       gp_Pnt aPointToCheck =
-        aCurveAdaptor.Value((aCurveAdaptor.FirstParameter() + 
+        aCurveAdaptor.Value((aCurveAdaptor.FirstParameter() +
                               aCurveAdaptor.LastParameter()) / 2.0);
       Handle(Geom_Surface) aSurface = BRep_Tool::Surface(aFace);
       ShapeAnalysis_Surface aSAS(aSurface);
@@ -652,7 +652,7 @@ bool GeomAlgoAPI_ShapeTools::isShapeValid(const std::shared_ptr<GeomAPI_Shape> t
 }
 
 //==================================================================================================
-std::shared_ptr<GeomAPI_Shape> 
+std::shared_ptr<GeomAPI_Shape>
   GeomAlgoAPI_ShapeTools::getFaceOuterWire(const std::shared_ptr<GeomAPI_Shape> theFace)
 {
   GeomShapePtr anOuterWire;
@@ -719,7 +719,7 @@ void GeomAlgoAPI_ShapeTools::splitShape(const std::shared_ptr<GeomAPI_Shape>& th
   aBOP.Perform();
   if (aBOP.ErrorStatus())
     return;
-  
+
   // Collect splits
   const TopTools_ListOfShape& aSplits = aBOP.Modified(aBaseEdge);
   TopTools_ListIteratorOfListOfShape anIt(aSplits);
index 49aaef252d44938c9e40279d3a05d486f01fd381..22c8867870bc64c40eb835092d90ecc918d406f4 100644 (file)
@@ -30,11 +30,11 @@ public:
   /// \return the total volume of the solids of the current shape or 0.0 if it can be computed.
   GEOMALGOAPI_EXPORT static double volume(const std::shared_ptr<GeomAPI_Shape> theShape);
 
-  /// \return the centre of mass of the current face. 
+  /// \return the centre of mass of the current face.
   /// The coordinates returned for the center of mass
-  /// are expressed in the absolute Cartesian coordinate system. 
+  /// are expressed in the absolute Cartesian coordinate system.
   /// (This function works only for surfaces).
-  GEOMALGOAPI_EXPORT static std::shared_ptr<GeomAPI_Pnt> 
+  GEOMALGOAPI_EXPORT static std::shared_ptr<GeomAPI_Pnt>
     centreOfMass(const std::shared_ptr<GeomAPI_Shape> theShape);
 
   /// \brief Combines faces with common edges to shells, or solids to compsolids.
@@ -51,19 +51,19 @@ public:
   /// \brief Groups shapes with shared topology to compounds.
   /// \param[in] theCompound compound of shapes.
   /// \return compound of compounds with shared topology.
-  GEOMALGOAPI_EXPORT static std::shared_ptr<GeomAPI_Shape> 
+  GEOMALGOAPI_EXPORT static std::shared_ptr<GeomAPI_Shape>
     groupSharedTopology(const std::shared_ptr<GeomAPI_Shape> theCompound);
 
   /// \brief Calculates bounding box for theShapes
   /// \return list of eight points.
   /// \param[in] theShapes list of shapes.
   /// \param[in] theEnlarge enlarges bounding box size.
-  GEOMALGOAPI_EXPORT static 
-    std::list<std::shared_ptr<GeomAPI_Pnt> > getBoundingBox(const ListOfShape& theShapes, 
+  GEOMALGOAPI_EXPORT static
+    std::list<std::shared_ptr<GeomAPI_Pnt> > getBoundingBox(const ListOfShape& theShapes,
                                                             const double theEnlarge = 0.0);
 
   /// \return infinite plane received from theFace plane.
-  GEOMALGOAPI_EXPORT static std::shared_ptr<GeomAPI_Shape> 
+  GEOMALGOAPI_EXPORT static std::shared_ptr<GeomAPI_Shape>
     faceToInfinitePlane(const std::shared_ptr<GeomAPI_Shape> theFace);
 
   /// \brief Enlarges or reduces plane to fit bounding box.
@@ -109,7 +109,7 @@ public:
   GEOMALGOAPI_EXPORT static bool isShapeValid(const std::shared_ptr<GeomAPI_Shape> theShape);
 
   /// \return outer wire for face. If theShape has different type returns empty pointer.
-  GEOMALGOAPI_EXPORT static 
+  GEOMALGOAPI_EXPORT static
     std::shared_ptr<GeomAPI_Shape> getFaceOuterWire(const std::shared_ptr<GeomAPI_Shape> theFace);
 
   /// \return true if edge is parallel to face.
index 2bd7775e3cc83019cea1c3ce53451263c73a5668..3b3b4d5489c9180e3863883ad115cedc53a44bdd 100644 (file)
@@ -149,7 +149,7 @@ void GeomAlgoAPI_SketchBuilder::createFaces(const std::shared_ptr<GeomAPI_Pnt>&
                                             const std::shared_ptr<GeomAPI_Shape>& theWire,
                                 std::list<std::shared_ptr<GeomAPI_Shape> >& theResultFaces)
 {
-  std::shared_ptr<GeomAPI_PlanarEdges> aWire = 
+  std::shared_ptr<GeomAPI_PlanarEdges> aWire =
     std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(theWire);
   if(aWire) {
     // Filter wires, return only faces.
index 7f39131444e28e113e54633ad270d27f51c0c74b..418ff026dfae679c317d413b8db6a85b13212478 100644 (file)
@@ -19,7 +19,7 @@ class GeomAlgoAPI_WireBuilder
  public:
    /// \brief Creates a wire from edges and wires.
    /// \param[in] theShapes list of shapes. Only edges and wires allowed.
-   /// The edges are not to be consecutive. 
+   /// The edges are not to be consecutive.
    /// But they are to be all connected geometrically or topologically.
    /// \return wire created from theShapes. Empty in case of error or bad input.
    GEOMALGOAPI_EXPORT static std::shared_ptr<GeomAPI_Shape> wire(const ListOfShape& theShapes);
index e6dc4ba55f8411abc90c2c3f5d8771376f236615..2aa587a1d8f0819a5e8f5e9b4cf86c3752a3a41b 100644 (file)
@@ -21,8 +21,8 @@ class ModelAPI_ExpressionDouble;
 class GeomData_Point : public GeomDataAPI_Point
 {
   enum { NUM_COMPONENTS = 3 };
-  /// Expressions for X, Y and Z 
-  std::shared_ptr<ModelAPI_ExpressionDouble> myExpression[NUM_COMPONENTS]; 
+  /// Expressions for X, Y and Z
+  std::shared_ptr<ModelAPI_ExpressionDouble> myExpression[NUM_COMPONENTS];
  public:
   /// Defines the double value
   GEOMDATA_EXPORT virtual void setValue(const double theX, const double theY, const double theZ);
@@ -39,7 +39,7 @@ class GeomData_Point : public GeomDataAPI_Point
   GEOMDATA_EXPORT virtual std::shared_ptr<GeomAPI_Pnt> pnt();
 
   /// Defines the calculated double value
-  GEOMDATA_EXPORT virtual 
+  GEOMDATA_EXPORT virtual
     void setCalculatedValue(const double theX, const double theY, const double theZ);
 
   /// Defines the text values
@@ -67,7 +67,7 @@ class GeomData_Point : public GeomDataAPI_Point
   GEOMDATA_EXPORT virtual std::string expressionError(int theComponent);
 
   /// Defines the used parameters
-  GEOMDATA_EXPORT virtual void setUsedParameters(int theComponent, 
+  GEOMDATA_EXPORT virtual void setUsedParameters(int theComponent,
     const std::set<std::string>& theUsedParameters);
 
   /// Returns the used parameters
index 6873674b073f3cb9b0d0dfc718dd38f91ac8e42a..30b47115db5de6be77771f18910dac0cb8c6b8c6 100644 (file)
@@ -114,7 +114,7 @@ std::string GeomData_Point2D::expressionError(int theComponent)
   return myExpression[theComponent]->error();
 }
 
-void GeomData_Point2D::setUsedParameters(int theComponent, 
+void GeomData_Point2D::setUsedParameters(int theComponent,
                                          const std::set<std::string>& theUsedParameters)
 {
   assert(theComponent >= 0 && theComponent < NUM_COMPONENTS);
index 017802d5f50c889fb6b93f1dfb59a84c6a200435..a4864c6c45a52e7c6998b5c39286122bdc7211be 100644 (file)
@@ -60,7 +60,7 @@ class GeomData_Point2D : public GeomDataAPI_Point2D
   GEOMDATA_EXPORT virtual std::string expressionError(int theComponent);
 
   /// Defines the used parameters
-  GEOMDATA_EXPORT virtual void setUsedParameters(int theComponent, 
+  GEOMDATA_EXPORT virtual void setUsedParameters(int theComponent,
     const std::set<std::string>& theUsedParameters);
 
   /// Returns the used parameters
index a68e0762b7e734deeae3e0f1bbb686599e6077c2..126c28001202f94acad872dc9305ee620083f90a 100644 (file)
@@ -23,7 +23,7 @@ class GeomDataAPI_Point : public ModelAPI_Attribute
 {
  public:
   /// Defines the double value
-  GEOMDATAAPI_EXPORT virtual 
+  GEOMDATAAPI_EXPORT virtual
     void setValue(const double theX, const double theY, const double theZ) = 0;
   /// Defines the point
   GEOMDATAAPI_EXPORT virtual void setValue(const std::shared_ptr<GeomAPI_Pnt>& thePoint) = 0;
@@ -38,9 +38,9 @@ class GeomDataAPI_Point : public ModelAPI_Attribute
   GEOMDATAAPI_EXPORT virtual std::shared_ptr<GeomAPI_Pnt> pnt() = 0;
 
   /// Defines the calculated double value
-  GEOMDATAAPI_EXPORT virtual 
+  GEOMDATAAPI_EXPORT virtual
     void setCalculatedValue(const double theX, const double theY, const double theZ) = 0;
-  
+
   /// Defines the text values
   GEOMDATAAPI_EXPORT virtual void setText(const std::string& theX,
                                           const std::string& theY,
@@ -66,14 +66,14 @@ class GeomDataAPI_Point : public ModelAPI_Attribute
   GEOMDATAAPI_EXPORT virtual bool expressionInvalid(int theComponent) = 0;
 
   /// Allows to set expression (text) error (by the parameters listener)
-  GEOMDATAAPI_EXPORT virtual 
+  GEOMDATAAPI_EXPORT virtual
     void setExpressionError(int theComponent, const std::string& theError) = 0;
 
   /// Returns an expression error
   GEOMDATAAPI_EXPORT virtual std::string expressionError(int theComponent) = 0;
 
   /// Defines the used parameters
-  GEOMDATAAPI_EXPORT virtual void setUsedParameters(int theComponent, 
+  GEOMDATAAPI_EXPORT virtual void setUsedParameters(int theComponent,
     const std::set<std::string>& theUsedParameters) = 0;
 
   /// Returns the used parameters
index fa8a571585f04aa8cfc2e9592c68ad31081f60c8..ae11ff5f60e2f94d32aac8706e286c33bf39433c 100644 (file)
@@ -59,14 +59,14 @@ class GeomDataAPI_Point2D : public ModelAPI_Attribute
   GEOMDATAAPI_EXPORT virtual bool expressionInvalid(int theComponent) = 0;
 
   /// Allows to set expression (text) error (by the parameters listener)
-  GEOMDATAAPI_EXPORT virtual 
+  GEOMDATAAPI_EXPORT virtual
     void setExpressionError(int theComponent, const std::string& theError) = 0;
 
   /// Returns an expression error
   GEOMDATAAPI_EXPORT virtual std::string expressionError(int theComponent) = 0;
 
   /// Defines the used parameters
-  GEOMDATAAPI_EXPORT virtual void setUsedParameters(int theComponent, 
+  GEOMDATAAPI_EXPORT virtual void setUsedParameters(int theComponent,
     const std::set<std::string>& theUsedParameters) = 0;
 
   /// Returns the used parameters
index 92a598c7b722a9a0dc36f504613ff1cf98e52be8..c22b7abd318d07d7ae67cc67cab5cbba7b547ba0 100644 (file)
@@ -54,7 +54,7 @@ bool GeomValidators_BooleanArguments::isValid(const std::shared_ptr<ModelAPI_Fea
 }
 
 //=================================================================================================
-bool GeomValidators_BooleanArguments::isNotObligatory(std::string theFeature, 
+bool GeomValidators_BooleanArguments::isNotObligatory(std::string theFeature,
                                                       std::string theAttribute)
 {
   if(theAttribute == "main_objects" || theAttribute == "tool_objects") {
index 645eee951ca915db616da56a94d8d1e3aafebcbe..507aa45d5c32ba1a14b70eea32556e88b08538ed 100644 (file)
@@ -29,7 +29,7 @@ public:
                                              Events_InfoMessage& theError) const;
 
   /// \return true if the attribute in feature is not obligatory for the feature execution.
-  GEOMVALIDATORS_EXPORT virtual 
+  GEOMVALIDATORS_EXPORT virtual
     bool isNotObligatory(std::string theFeature, std::string theAttribute);
 };
 
index 8ae2b2dbf769cc9af7a7b132bd8f2f11feb752e9..f2dc96a9b9133061cba89e0b9c1b3e74fea97c71 100644 (file)
@@ -34,7 +34,7 @@ bool GeomValidators_ConstructionComposite::isValid(const AttributePtr& theAttrib
     GeomShapePtr aShape = aSelectionAttr->value();
     GeomShapePtr aShapePtr = aResult->shape();
     // it is important to call isEqual of the shape of result.
-    // It is a GeomAPI_Vertex shape for the point. The shape of the parameter is 
+    // It is a GeomAPI_Vertex shape for the point. The shape of the parameter is
     // GeomAPI_Shape. It is important to use the realization of the isEqual method from
     // GeomAPI_Vertex class
     if (!aShape.get()) {
index 1f75317b3885af38e613e6ac227e5989bbe9fc3f..1e3ce31ad15063f7972b5606291e30359306e6e3 100644 (file)
@@ -33,7 +33,7 @@ bool isEqual(const AttributePoint2DPtr& theLeft, const AttributePoint2DPtr& theR
 
 bool isEqualAttributes(const AttributePtr& theLeft, const AttributePtr& theRight)
 {
-  if (theLeft->attributeType() == GeomDataAPI_Point2D::typeId() && 
+  if (theLeft->attributeType() == GeomDataAPI_Point2D::typeId() &&
       theRight->attributeType() == GeomDataAPI_Point2D::typeId())
     return isEqual(std::dynamic_pointer_cast<GeomDataAPI_Point2D>(theLeft),
                    std::dynamic_pointer_cast<GeomDataAPI_Point2D>(theRight));
@@ -60,8 +60,8 @@ bool GeomValidators_Different::isValid(const std::shared_ptr<ModelAPI_Feature>&
                                        Events_InfoMessage& theError) const
 {
   std::map<std::string, std::list<AttributePtr> > anAttributesMap;
-  // For all attributes referred by theArguments 
-  // sort it using attributeType() and store into anAttributesMap 
+  // For all attributes referred by theArguments
+  // sort it using attributeType() and store into anAttributesMap
   std::list<std::string>::const_iterator anArgumentIt = theArguments.begin();
   for (; anArgumentIt != theArguments.end(); ++anArgumentIt) {
     AttributePtr anAttribute = theFeature->attribute(*anArgumentIt);
@@ -69,7 +69,7 @@ bool GeomValidators_Different::isValid(const std::shared_ptr<ModelAPI_Feature>&
   }
 
   // Search differences inside each attribute list
-  std::map<std::string, std::list<AttributePtr> >::const_iterator 
+  std::map<std::string, std::list<AttributePtr> >::const_iterator
     anAttributesMapIt = anAttributesMap.begin();
   for (; anAttributesMapIt != anAttributesMap.end(); ++anAttributesMapIt) {
     const std::list<AttributePtr>& anAttributes = anAttributesMapIt->second;
@@ -82,12 +82,12 @@ bool GeomValidators_Different::isValid(const std::shared_ptr<ModelAPI_Feature>&
         std::list<AttributePtr>::const_iterator aFindIt =
             std::find_if(aNextIt, anAttributes.end(), IsEqual(*anAttributeIt));
         if (aFindIt != anAttributes.end()) {
-          theError = "Attributes " + (*anAttributeIt)->id() + " and " + 
+          theError = "Attributes " + (*anAttributeIt)->id() + " and " +
             (*aFindIt)->id() + " are equal." ;
           return false;
         }
         ++anAttributeIt;
-        ++aNextIt; 
+        ++aNextIt;
       }
     }
   }
index 61fbeb0d760e98d5ab1622f341a3a736159107f8..f7771c197128139164b7a7d6469daa09ba62cbaa 100644 (file)
@@ -28,7 +28,7 @@ public:
                                              const std::list<std::string>& theArguments,
                                              Events_InfoMessage& theError) const;
 
-  GEOMVALIDATORS_EXPORT virtual 
+  GEOMVALIDATORS_EXPORT virtual
     bool isNotObligatory(std::string theFeature, std::string theAttribute);
 };
 
index 7eefe262663b1b5f9040fc9ad404c48e531aa227..01eb0409a75857c9c14d2d6614ebc9d804a80a5d 100644 (file)
@@ -16,7 +16,7 @@ bool GeomValidators_DifferentShapes::isValid(const AttributePtr& theAttribute,
                                       Events_InfoMessage& theError) const
 {
   FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
-  AttributeSelectionPtr aSelectionAttribute = 
+  AttributeSelectionPtr aSelectionAttribute =
                      std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
   GeomShapePtr aShape = aSelectionAttribute->value();
   if (!aShape.get()) {
@@ -27,7 +27,7 @@ bool GeomValidators_DifferentShapes::isValid(const AttributePtr& theAttribute,
 
   std::string aCurrentAttributeId = theAttribute->id();
   // get all feature attributes
-  std::list<AttributePtr> anAttrs = 
+  std::list<AttributePtr> anAttrs =
       aFeature->data()->attributes(ModelAPI_AttributeSelection::typeId());
   if (anAttrs.size() > 0 && aShape.get() != NULL) {
     std::list<AttributePtr>::iterator anAttr = anAttrs.begin();
@@ -35,7 +35,7 @@ bool GeomValidators_DifferentShapes::isValid(const AttributePtr& theAttribute,
       AttributePtr anAttribute = *anAttr;
       // take into concideration only other attributes
       if (anAttribute.get() != NULL && anAttribute->id() != aCurrentAttributeId) {
-        aSelectionAttribute = 
+        aSelectionAttribute =
           std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(anAttribute);
         // the shape of the attribute should be not the same
         if (aSelectionAttribute.get() != NULL) {
index dd415526378ab07ea1531b9d0558641f260fb1b2..1979d7d7152a0bca99baa02936f0aa95f83e2ed9 100644 (file)
@@ -27,7 +27,7 @@ GeomAbs_SurfaceType faceType(const std::string& theType)
   std::string aType = std::string(theType.c_str());
   if (MyFaceTypes.find(aType) != MyFaceTypes.end())
     return MyFaceTypes[aType];
-  
+
   Events_InfoMessage("GeomValidators_Face", "Face type defined in XML is not implemented!").send();
   return GeomAbs_Plane;
 }
index c6036e4146ea560d54edc4f75b5e94d266ba1ac3..25fcc90cee45abaada8f2c30e2ebd6ad5ced9d8c 100755 (executable)
@@ -36,7 +36,7 @@ bool GeomValidators_FeatureKind::isValid(const AttributePtr& theAttribute,
 
   std::string anAttributeType = theAttribute->attributeType();
   if (anAttributeType == ModelAPI_AttributeSelectionList::typeId()) {
-    AttributeSelectionListPtr aSelectionListAttr = 
+    AttributeSelectionListPtr aSelectionListAttr =
                       std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
     // all context objects should be sketch entities
     for (int i = 0, aSize = aSelectionListAttr->size(); i < aSize && isSketchEntities; i++) {
@@ -60,7 +60,7 @@ bool GeomValidators_FeatureKind::isValid(const AttributePtr& theAttribute,
     }
   }
   if (anAttributeType == ModelAPI_AttributeSelection::typeId()) {
-    AttributeSelectionPtr aSelectAttr = 
+    AttributeSelectionPtr aSelectAttr =
                       std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
     ObjectPtr anObject = aSelectAttr->context();
     // a context of the selection attribute is a feature result. It can be a case when the result
@@ -93,7 +93,7 @@ bool GeomValidators_FeatureKind::isValid(const AttributePtr& theAttribute,
     }
   }
   if (anAttributeType == ModelAPI_AttributeRefAttr::typeId()) {
-    std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = 
+    std::shared_ptr<ModelAPI_AttributeRefAttr> aRef =
                      std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
     isSketchEntities = false;
     if (aRef->isObject()) {
@@ -106,7 +106,7 @@ bool GeomValidators_FeatureKind::isValid(const AttributePtr& theAttribute,
     }
   }
   if (anAttributeType == ModelAPI_AttributeReference::typeId()) {
-    AttributeReferencePtr aRefAttr = 
+    AttributeReferencePtr aRefAttr =
                       std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
     ObjectPtr anObject = aRefAttr->value();
     // a context of the selection attribute is a feature result. It can be a case when the result
index c8f5d02ad17121e3a4707accc5f64f789fa9607d..2c871d43874ef3ec91c8f2ec57bac7e1c0b860ee 100755 (executable)
@@ -20,23 +20,23 @@ bool GeomValidators_Finite::isValid(const AttributePtr& theAttribute,
   const std::string anAttributeType = theAttribute->attributeType();
 
   if(anAttributeType == ModelAPI_AttributeSelection::typeId()) {
-    AttributeSelectionPtr aSelectionAttr = 
+    AttributeSelectionPtr aSelectionAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
     ResultPtr aResult = aSelectionAttr->context();
-    ResultConstructionPtr aConstruction = 
+    ResultConstructionPtr aConstruction =
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aResult);
     if (aConstruction.get() && aConstruction->isInfinite()) {
       aValid = false;
       theError = "Infinite result is selected.";
     }
   } else if(anAttributeType == ModelAPI_AttributeSelectionList::typeId()) {
-    AttributeSelectionListPtr aSelectionListAttr = 
+    AttributeSelectionListPtr aSelectionListAttr =
                       std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
     for (int i = 0, aSize = aSelectionListAttr->size(); i < aSize; i++) {
       AttributeSelectionPtr aSelectAttr = aSelectionListAttr->value(i);
       ResultPtr aResult = aSelectAttr->context();
       if (aResult.get() && aResult->groupName() == ModelAPI_ResultConstruction::group()) {
-        ResultConstructionPtr aConstruction = 
+        ResultConstructionPtr aConstruction =
           std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aResult);
         if (aConstruction.get() && aConstruction->isInfinite()) {
           aValid = false;
index 9e108be806edc1d468a64d67ac231cb8cfbe8170..7ecbf5f3876d67e136e604caf4076174cedeb992 100644 (file)
@@ -21,7 +21,7 @@ bool GeomValidators_IntersectionSelection::isValid(const AttributePtr& theAttrib
     return false;
   }
   FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
-  AttributeSelectionListPtr anAttrSelectionList = 
+  AttributeSelectionListPtr anAttrSelectionList =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
   for(int anIndex = 0; anIndex < anAttrSelectionList->size(); ++anIndex) {
     AttributeSelectionPtr anAttrSelection = anAttrSelectionList->value(anIndex);
index 31f8d0c3d79fe05047d7d418a111841238ef700c..3c44a2ddc84fc1ea7b64f00575ca1e649065bc00 100644 (file)
@@ -17,7 +17,7 @@ bool GeomValidators_MinObjectsSelected::isValid(const std::shared_ptr<ModelAPI_F
                                                 Events_InfoMessage& theError) const
 {
   if(theArguments.size() != 2) {
-    theError = 
+    theError =
       "Error: Wrong number of arguments (expected 2): selection list id and min number of objects";
     return false;
   }
@@ -43,7 +43,7 @@ bool GeomValidators_MinObjectsSelected::isValid(const std::shared_ptr<ModelAPI_F
 }
 
 //================================================================================================
-bool GeomValidators_MinObjectsSelected::isNotObligatory(std::string theFeature, 
+bool GeomValidators_MinObjectsSelected::isNotObligatory(std::string theFeature,
                                                         std::string theAttribute)
 {
   return false;
index ab60b8ea682887d51bd02b71a4eba105cb3263ac..f4482579ff1ee6cb8fccfe8ee40761731667d08c 100644 (file)
@@ -43,7 +43,7 @@ bool GeomValidators_PartitionArguments::isValid(const std::shared_ptr<ModelAPI_F
     isCombine = anAttrBool->value();
   }
 
-  if((anObjectsNb > 0 && aToolsNb > 0) || 
+  if((anObjectsNb > 0 && aToolsNb > 0) ||
      (isCombine && anObjectsNb != 0 && (anObjectsNb + aToolsNb > 1))) {
     return true;
   }
@@ -53,7 +53,7 @@ bool GeomValidators_PartitionArguments::isValid(const std::shared_ptr<ModelAPI_F
 }
 
 //=================================================================================================
-bool GeomValidators_PartitionArguments::isNotObligatory(std::string theFeature, 
+bool GeomValidators_PartitionArguments::isNotObligatory(std::string theFeature,
                                                         std::string theAttribute)
 {
   if(theAttribute == "tool_objects") {
index 23397a117b526cfc0a578341f1c354b2d3dd1f4a..5f14adae3c4b7fc564680583c3446014c94d9863 100644 (file)
@@ -29,7 +29,7 @@ public:
                                              Events_InfoMessage& theError) const;
 
   /// \return true if the attribute in feature is not obligatory for the feature execution.
-  GEOMVALIDATORS_EXPORT virtual 
+  GEOMVALIDATORS_EXPORT virtual
     bool isNotObligatory(std::string theFeature, std::string theAttribute);
 };
 
index e231c32a78b48678933b778a5683ce577ae7f93e..858e05845254f012407cdc95fa4123798a032bb5 100644 (file)
@@ -42,10 +42,10 @@ GeomValidators_Plugin::GeomValidators_Plugin()
                               new GeomValidators_PartitionArguments);
   aFactory->registerValidator("GeomValidators_ShapeType", new GeomValidators_ShapeType);
   aFactory->registerValidator("GeomValidators_ZeroOffset", new GeomValidators_ZeroOffset);
-  aFactory->registerValidator("GeomValidators_IntersectionSelection", 
+  aFactory->registerValidator("GeomValidators_IntersectionSelection",
                               new GeomValidators_IntersectionSelection);
   aFactory->registerValidator("GeomValidators_FeatureKind", new GeomValidators_FeatureKind);
-  aFactory->registerValidator("GeomValidators_MinObjectsSelected", 
+  aFactory->registerValidator("GeomValidators_MinObjectsSelected",
                               new GeomValidators_MinObjectsSelected);
 
   // register this plugin
index 17c38fb19035600799d5bb7808f814aa15b43347..6737f289aaba4e180b893edfb664971858f2c7ee 100644 (file)
@@ -26,7 +26,7 @@ GeomValidators_Positive::GeomValidators_Positive()
   aFactory->registerValidator("GeomValidators_Positive", this);
 }
 
-bool GeomValidators_Positive::isValid(const AttributePtr& theAttribute, 
+bool GeomValidators_Positive::isValid(const AttributePtr& theAttribute,
                                       const std::list<std::string>& theArguments,
                                       Events_InfoMessage& theError) const
 {
index 4a417818a236dec7c0f450a964a1536095218dbe..6c0077c6a9d0f074eecd053e9de5c86dfea794e9 100755 (executable)
@@ -22,7 +22,7 @@
 typedef std::map<std::string, GeomValidators_ShapeType::TypeOfShape> EdgeTypes;
 
 static EdgeTypes MyShapeTypes;
-GeomValidators_ShapeType::TypeOfShape 
+GeomValidators_ShapeType::TypeOfShape
   GeomValidators_ShapeType::shapeType(const std::string& theType)
 {
   if (MyShapeTypes.size() == 0) {
@@ -52,7 +52,7 @@ std::string getShapeTypeDescription(const GeomValidators_ShapeType::TypeOfShape&
   std::string aValue = "";
 
   if (MyShapeTypes.size() != 0) {
-    std::map<std::string, GeomValidators_ShapeType::TypeOfShape>::const_iterator 
+    std::map<std::string, GeomValidators_ShapeType::TypeOfShape>::const_iterator
       anIt = MyShapeTypes.begin(), aLast = MyShapeTypes.end();
     for (; anIt != aLast; anIt++) {
       if (anIt->second == theType)
@@ -107,7 +107,7 @@ bool GeomValidators_ShapeType::isValidAttribute(const AttributePtr& theAttribute
 
   std::string anAttributeType = theAttribute->attributeType();
   if (anAttributeType == ModelAPI_AttributeSelection::typeId()) {
-    AttributeSelectionPtr anAttr = 
+    AttributeSelectionPtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
     GeomShapePtr aShape = anAttr->value();
     if (aShape.get())
@@ -178,7 +178,7 @@ bool GeomValidators_ShapeType::isValidObject(const ObjectPtr& theObject,
     ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
     if( theShapeType==Plane )
     {
-      ResultConstructionPtr aResultConstruction = 
+      ResultConstructionPtr aResultConstruction =
         std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(theObject);
       FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
       const std::string& aKind = aFeature->getKind();
index d9136fe2fa4b1121f611102f8c3f19584aced617..a364bf0d336698e28dce94804aa1bf8fc650edd4 100644 (file)
@@ -19,19 +19,19 @@ namespace GeomValidators_Tools {
     ObjectPtr anObject;
     std::string anAttrType = theAttribute->attributeType();
     if (anAttrType == ModelAPI_AttributeRefAttr::typeId()) {
-      AttributeRefAttrPtr anAttr = 
+      AttributeRefAttrPtr anAttr =
         std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
       if (anAttr != NULL && anAttr->isObject())
         anObject = anAttr->object();
     }
     if (anAttrType == ModelAPI_AttributeSelection::typeId()) {
-      AttributeSelectionPtr anAttr = 
+      AttributeSelectionPtr anAttr =
         std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
       if (anAttr != NULL)
         anObject = anAttr->context();
     }
     if (anAttrType == ModelAPI_AttributeReference::typeId()) {
-      AttributeReferencePtr anAttr = 
+      AttributeReferencePtr anAttr =
         std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
       if (anAttr.get() != NULL)
         anObject = anAttr->value();
index 3912db484c4dd4aa4616c65f785b81a9d4599b70..b4a44fe58a550d9e3501107db4db689660e17875 100644 (file)
@@ -17,7 +17,7 @@
 namespace GeomValidators_Tools
 {
   // Returns the object from the attribute
-  /// \param theObj an object 
+  /// \param theObj an object
   GEOMVALIDATORS_EXPORT ObjectPtr getObject(const AttributePtr& theAttribute);
 
 };
index 34aec623f19c73f82b40afca3c36832132c64af2..0c98260fa61610476326caaa30e9b2149304378c 100644 (file)
@@ -43,12 +43,12 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr<ModelAPI_Feature>&
   ListOfShape aFacesList;
   if(theFeature->selection(*anIt)) {
     AttributeSelectionPtr aFaceSelection = theFeature->selection(*anIt);
-    ResultConstructionPtr aConstruction = 
+    ResultConstructionPtr aConstruction =
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aFaceSelection->context());
     if(aConstruction.get()) {
       int aSketchFacesNum = aConstruction->facesNum();
       for(int aFaceIndex = 0; aFaceIndex < aSketchFacesNum; aFaceIndex++) {
-        std::shared_ptr<GeomAPI_Shape> aFace = 
+        std::shared_ptr<GeomAPI_Shape> aFace =
           std::dynamic_pointer_cast<GeomAPI_Shape>(aConstruction->face(aFaceIndex));
         if(aFace->isFace() && aFace->isPlanar()) {
           aFacesList.push_back(aFace);
@@ -70,7 +70,7 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr<ModelAPI_Feature>&
         if(!aContextShape.get()) {
           break;
         }
-        ResultConstructionPtr aConstruction = 
+        ResultConstructionPtr aConstruction =
           std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
         if(!aConstruction.get()) {
           break;
@@ -178,7 +178,7 @@ bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr<ModelAPI_Feature>&
     }
     std::shared_ptr<GeomAPI_Pln> aPln = aFace->getPlane();
     if(aPln.get()) {
-      for(ListOfShape::const_iterator 
+      for(ListOfShape::const_iterator
           anIter = aFacesList.cbegin(); anIter != aFacesList.cend(); anIter++) {
         std::shared_ptr<GeomAPI_Shape> aSketchShape = *anIter;
         std::shared_ptr<GeomAPI_Face> aSketchFace(new GeomAPI_Face(aSketchShape));
index 06348e14592087157a74534cdfa331f081d806f7..8fbb9e28a4c19d6ff36cb0bbb5c5f18709f7a92b 100644 (file)
@@ -29,7 +29,7 @@ public:
                                              Events_InfoMessage& theError) const;
 
   /// \return true if the attribute in feature is not obligatory for the feature execution.
-  GEOMVALIDATORS_EXPORT virtual 
+  GEOMVALIDATORS_EXPORT virtual
     bool isNotObligatory(std::string theFeature, std::string theAttribute);
 };
 
index a82ff65e4d2ea442416b9dd2c7b0d6d6831e6984..ee76b04d279dac93553611358e09753611dc9bcb 100644 (file)
@@ -153,7 +153,7 @@ FeaturePtr InitializationPlugin_Plugin::createAxis(DocumentPtr theDoc, FeaturePt
     aAxis->data()->setName("OZ");
   }
    // don't show automatically created feature in the features history
-  aAxis->setInHistory(aAxis, false); 
+  aAxis->setInHistory(aAxis, false);
   aAxis->execute();
   aAxis->data()->execState(ModelAPI_StateDone);
   aAxis->firstResult()->data()->execState(ModelAPI_StateDone);
index 64d4c951f60be5c23921d54807c20d49722525d6..6f06f059fed721e2843871f487319ec1eff83d21 100644 (file)
@@ -40,7 +40,7 @@ class InitializationPlugin_Plugin : public Events_Listener
   /// \param theX - X coordinate
   /// \param theY - Y coordinate
   /// \param theZ - Z coordinate
-  FeaturePtr createPoint(DocumentPtr theDoc, const std::string& theName, 
+  FeaturePtr createPoint(DocumentPtr theDoc, const std::string& theName,
                          double theX, double theY, double theZ);
 
   /// Creates an axis which is started from origin point
@@ -49,7 +49,7 @@ class InitializationPlugin_Plugin : public Events_Listener
   /// \param theX - X of direction point
   /// \param theY - Y of direction point
   /// \param theZ - Z of direction point
-  FeaturePtr createAxis(DocumentPtr theDoc, FeaturePtr theOrigin, 
+  FeaturePtr createAxis(DocumentPtr theDoc, FeaturePtr theOrigin,
                         double theX, double theY, double theZ);
 };
 
index 728c2a807a66771979f9f5f7a0b373ff8441970f..3593decbadfb2bd9826181201c7902b18fc9d908 100644 (file)
@@ -8,11 +8,11 @@
 #ifndef Model_Application_H_
 #define Model_Application_H_
 
-#include <Model_Document.h> 
+#include <Model_Document.h>
 #include <TDocStd_Application.hxx>
 #include <map>
 
-// Define handle class 
+// Define handle class
 DEFINE_STANDARD_HANDLE(Model_Application, TDocStd_Application)
 
 /**\class Model_Application
@@ -32,7 +32,7 @@ public:
   /// \param Model_Application is the class name that is covered by the OCCT Handle
   DEFINE_STANDARD_RTTI(Model_Application);
 
-  //! Retuns the application: one per process    
+  //! Retuns the application: one per process
   MODEL_EXPORT static Handle_Model_Application getApplication();
   //! Returns the document by the identifier
   //! \returns false of document is not yet created/not loaded
@@ -79,7 +79,7 @@ public:
   //! \param theFormats sequence of allowed formats for input/output
   virtual void Formats(TColStd_SequenceOfExtendedString& theFormats);
   //! Constructor
-  //! Use method GetInstance() method to obtain 
+  //! Use method GetInstance() method to obtain
   //! the static instance of the object (or derive your own application)
   Model_Application();
 
index d6403fef8324205f14a78634227c887bd26580ae..cf7d1c4453825e7783479da7863b2eaf87b8c8b6 100644 (file)
@@ -20,7 +20,7 @@
 class Model_AttributeDocRef : public ModelAPI_AttributeDocRef
 {
   /// persistent and unique identifier of the document in the application
-  Handle(TDataStd_Integer) myID; 
+  Handle(TDataStd_Integer) myID;
  public:
 
   /// Defines the document referenced from this attribute
index c05a9e19c32a108725d0175bfd922768da0ca161..15e84ece98aadfd62ea0d9ceafc44db141318904 100644 (file)
@@ -77,6 +77,6 @@ Model_AttributeIntArray::Model_AttributeIntArray(TDF_Label& theLabel)
 void Model_AttributeIntArray::reinit()
 {
   // check the attribute could be already presented in this doc (after load document)
-  myIsInitialized = 
+  myIsInitialized =
     myLab.FindAttribute(TDataStd_IntegerArray::GetID(), myArray) == Standard_True;
 }
index 190d3d5a6dd62463d232f59e62e24ae3a88dd714..cef3477fab5a7532657de248691b4e1ad49c8fb8 100644 (file)
@@ -24,7 +24,7 @@
 
 class Model_AttributeIntArray : public ModelAPI_AttributeIntArray
 {
-  /// The OCCT array that keeps all values. 
+  /// The OCCT array that keeps all values.
   Handle_TDataStd_IntegerArray myArray;
   /// Stores the label as a field to set array if size is not null (null array is buggy in OCAF)
   TDF_Label myLab;
index 2b56f8b787140691d5803cca66d45db65f4e304d..7da878e8714f88b34137a0c10cfa7b4a96131b3c 100755 (executable)
@@ -28,7 +28,7 @@ void Model_AttributeRefAttrList::append(ObjectPtr theObject)
 
 void Model_AttributeRefAttrList::append(AttributePtr theAttr)
 {
-  std::shared_ptr<Model_Data> aData = 
+  std::shared_ptr<Model_Data> aData =
     std::dynamic_pointer_cast<Model_Data>(theAttr->owner()->data());
   myRef->Append(aData->label().Father());  // store label of the object
   myIDs->Append(theAttr->id().c_str()); // store the ID of the referenced attribute
@@ -45,7 +45,7 @@ void Model_AttributeRefAttrList::remove(ObjectPtr theObject)
   if (theObject.get() != NULL) {
     aTheObjLab = std::dynamic_pointer_cast<Model_Data>(theObject->data())->label().Father();
   }
-  std::shared_ptr<Model_Document> aDoc = 
+  std::shared_ptr<Model_Document> aDoc =
     std::dynamic_pointer_cast<Model_Document>(owner()->document());
   // remove from the both lists by clearing the list and then appending one by one
   // TODO: in OCCT 7.0 there are methods for removing by index, seems will be more optimal
@@ -78,7 +78,7 @@ void Model_AttributeRefAttrList::remove(AttributePtr theAttr)
   if (theAttr->owner().get() != NULL) {
     aTheObjLab = std::dynamic_pointer_cast<Model_Data>(theAttr->owner()->data())->label().Father();
   }
-  std::shared_ptr<Model_Document> aDoc = 
+  std::shared_ptr<Model_Document> aDoc =
     std::dynamic_pointer_cast<Model_Document>(owner()->document());
   // remove from the both lists by clearing the list and then appending one by one
   // TODO: in OCCT 7.0 there are methods for removing by index, seems will be more optimal
@@ -90,7 +90,7 @@ void Model_AttributeRefAttrList::remove(AttributePtr theAttr)
   TDF_ListIteratorOfLabelList aRefIter(aRefList);
   TDataStd_ListIteratorOfListOfExtendedString anIDIter(anIDList);
   for (; aRefIter.More(); aRefIter.Next(), anIDIter.Next()) {
-    if (aOneisDeleted || anIDIter.Value() != theAttr->id().c_str() ||  
+    if (aOneisDeleted || anIDIter.Value() != theAttr->id().c_str() ||
         // append now only not removed
         aRefIter.Value() != aTheObjLab || // append now only not removed
         (aTheObjLab.IsNull() && aDoc->objects()->object(aRefIter.Value()) != NULL)) {
@@ -145,7 +145,7 @@ std::list<std::pair<ObjectPtr, AttributePtr> > Model_AttributeRefAttrList::list(
       ObjectPtr anObj;
       if (!aLIter.Value().IsNull()) {
         anObj = aDoc->objects()->object(aLIter.Value());
-        aResult.push_back(std::pair<ObjectPtr, AttributePtr>(anObj, 
+        aResult.push_back(std::pair<ObjectPtr, AttributePtr>(anObj,
           anObj->data()->attribute(TCollection_AsciiString(anIDIter.Value()).ToCString())));
       } else {
         aResult.push_back(std::pair<ObjectPtr, AttributePtr>(ObjectPtr(), AttributePtr()));
@@ -190,7 +190,7 @@ bool Model_AttributeRefAttrList::isInList(const AttributePtr& theAttr)
   std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(
       owner()->document());
   if (aDoc) {
-    std::shared_ptr<Model_Data> aData = 
+    std::shared_ptr<Model_Data> aData =
       std::dynamic_pointer_cast<Model_Data>(theAttr->owner()->data());
     if (aData.get() && aData->isValid()) {
       TDF_Label anObjLab = aData->label().Father();
index bb7a1dd265ece2fb7c2bbfa0df073269f59c67d3..388c4dfd589a4516888f3b5d4805077add926c20 100644 (file)
@@ -137,7 +137,7 @@ bool Model_AttributeRefList::isInitialized()
 }
 
 ObjectPtr Model_AttributeRefList::iteratedObject(TDF_ListIteratorOfLabelList& theLIter,
-    TDataStd_ListIteratorOfListOfExtendedString& theExtIter, 
+    TDataStd_ListIteratorOfListOfExtendedString& theExtIter,
     std::shared_ptr<Model_Document> theDoc) const
 {
   ObjectPtr anObj;
@@ -224,7 +224,7 @@ bool Model_AttributeRefList::isInList(const ObjectPtr& theObj)
 
 ObjectPtr Model_AttributeRefList::object(const int theIndex, const bool theWithEmpty) const
 {
-  std::shared_ptr<Model_Document> aDoc = 
+  std::shared_ptr<Model_Document> aDoc =
     std::dynamic_pointer_cast<Model_Document>(owner()->document());
   if (aDoc) {
     int anIndex = -1;
@@ -254,7 +254,7 @@ void Model_AttributeRefList::substitute(const ObjectPtr& theCurrent, const Objec
       TDF_Label aCurrentLab = aData->label().Father();
       TDF_Label aNewLab;
       if (theNew.get() && theNew->data()->isValid()) { // the new may be null
-        std::shared_ptr<Model_Data> aNewData = 
+        std::shared_ptr<Model_Data> aNewData =
           std::dynamic_pointer_cast<Model_Data>(theNew->data());
         aNewLab = aNewData->label().Father();
       } else {
@@ -280,7 +280,7 @@ void Model_AttributeRefList::exchange(const ObjectPtr& theObject1, const ObjectP
     if (aData1.get() && aData1->isValid()) {
       TDF_Label aLab1 = aData1->label().Father();
       if (theObject2.get() && theObject2->data()->isValid()) { // the new may be null
-        std::shared_ptr<Model_Data> aData2 = 
+        std::shared_ptr<Model_Data> aData2 =
           std::dynamic_pointer_cast<Model_Data>(theObject2->data());
         if (aData2.get() && aData2->isValid()) {
           TDF_Label aLab2 = aData2->label().Father();
index 0d502ded0a34a1c24d6e79c1df5e22b4f2d98db7..4d08bb209ab5c5bc9547a2900915792bce476091 100644 (file)
@@ -72,7 +72,7 @@ ObjectPtr Model_AttributeReference::value()
       if (myRef->Label().FindAttribute(TDataStd_AsciiString::GetID(), anEntry)) {
         std::shared_ptr<Model_Document> aDR = std::dynamic_pointer_cast<Model_Document>(aRefDoc);
         TDF_Label aRefLab;
-        TDF_Tool::Label(aDR->objects()->featuresLabel().Data(), 
+        TDF_Tool::Label(aDR->objects()->featuresLabel().Data(),
           anEntry->Get().ToCString(), aRefLab);
         if (!aRefLab.IsNull()) {
           return aDR->objects()->object(aRefLab);
index 54b3d0f834a54e4f83c83a9228a1fc661e05cfb3..3dadaf30bd061459bafc4cadc5b4dc0468ad8754 100644 (file)
@@ -130,7 +130,7 @@ void Model_AttributeSelection::setValue(const ResultPtr& theContext,
   if (theContext->groupName() == ModelAPI_ResultBody::group()) {
     // do not select the whole shape for body:it is already must be in the data framework
     // equal and null selected objects mean the same: object is equal to context,
-    if (theContext->shape().get() && 
+    if (theContext->shape().get() &&
         (theContext->shape()->isEqual(theSubShape) || !theSubShape.get())) {
       aSelLab.ForgetAllAttributes(true);
       TDataStd_UAttribute::Set(aSelLab, kSIMPLE_REF_ID);
@@ -142,14 +142,14 @@ void Model_AttributeSelection::setValue(const ResultPtr& theContext,
       // to sub, so the whole result is selected
       aSelLab.ForgetAllAttributes(true);
       TDataStd_UAttribute::Set(aSelLab, kCONSTUCTION_SIMPLE_REF_ID);
-      ResultConstructionPtr aConstruction = 
+      ResultConstructionPtr aConstruction =
         std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(theContext);
       if (aConstruction->isInfinite()) {
         // For correct naming selection, put the shape into the naming structure.
         // It seems sub-shapes are not needed: only this shape is (and can be ) selected.
         TNaming_Builder aBuilder(aSelLab);
         aBuilder.Generated(theContext->shape()->impl<TopoDS_Shape>());
-        std::shared_ptr<Model_Document> aMyDoc = 
+        std::shared_ptr<Model_Document> aMyDoc =
           std::dynamic_pointer_cast<Model_Document>(owner()->document());
         //std::string aName = contextName(theContext);
         // for selection in different document, add the document name
@@ -209,7 +209,7 @@ std::shared_ptr<GeomAPI_Shape> Model_AttributeSelection::value()
   if (myRef.isInitialized()) {
     if (aSelLab.IsAttribute(kSIMPLE_REF_ID)) { // it is just reference to shape, not sub-shape
       ResultPtr aContext = context();
-      if (!aContext.get()) 
+      if (!aContext.get())
         return aResult; // empty result
       return aContext->shape();
     }
@@ -247,7 +247,7 @@ std::shared_ptr<GeomAPI_Shape> Model_AttributeSelection::value()
       aResult = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape);
       aResult->setImpl(new TopoDS_Shape(aSelShape));
     } else { // for simple construction element: just shape of this construction element
-      ResultConstructionPtr aConstr = 
+      ResultConstructionPtr aConstr =
         std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(context());
       if (aConstr) {
         return aConstr->shape();
@@ -272,7 +272,7 @@ bool Model_AttributeSelection::isInitialized()
         ResultPtr aContext = context();
         return aContext.get() != NULL;
       }
-      if (aSelLab.IsAttribute(kCONSTUCTION_SIMPLE_REF_ID)) { 
+      if (aSelLab.IsAttribute(kCONSTUCTION_SIMPLE_REF_ID)) {
         // it is just reference to construction, nothing is in value
           return true;
       }
@@ -281,7 +281,7 @@ bool Model_AttributeSelection::isInitialized()
       if (selectionLabel().FindAttribute(TNaming_NamedShape::GetID(), aSelection)) {
         return !aSelection->Get().IsNull();
       } else { // for simple construction element: just shape of this construction element
-        ResultConstructionPtr aConstr = 
+        ResultConstructionPtr aConstr =
           std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(context());
         if (aConstr.get()) {
           return aConstr->shape().get() != NULL;
@@ -343,7 +343,7 @@ TDF_LabelMap& Model_AttributeSelection::scope()
     std::list<std::shared_ptr<ModelAPI_Feature> > allFeatures = aMyDoc->allFeatures();
     std::list<std::shared_ptr<ModelAPI_Feature> >::iterator aFIter = allFeatures.begin();
     bool aMePassed = false;
-    CompositeFeaturePtr aComposite = 
+    CompositeFeaturePtr aComposite =
       std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(owner());
     FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(owner());
     CompositeFeaturePtr aCompositeOwner, aCompositeOwnerOwner;
@@ -362,7 +362,7 @@ TDF_LabelMap& Model_AttributeSelection::scope()
       }
       if (isGroup) aMePassed = false;
       bool isInScope = !aMePassed;
-      if (!isInScope && aComposite.get()) { 
+      if (!isInScope && aComposite.get()) {
         // try to add sub-elements of composite if this is composite
         if (aComposite->isSub(*aFIter))
           isInScope = true;
@@ -402,15 +402,15 @@ bool Model_AttributeSelection::update()
 {
   TDF_Label aSelLab = selectionLabel();
   ResultPtr aContext = context();
-  if (!aContext.get()) 
+  if (!aContext.get())
     return setInvalidIfFalse(aSelLab, false);
   if (aSelLab.IsAttribute(kSIMPLE_REF_ID)) { // it is just reference to shape, not sub-shape
     return setInvalidIfFalse(aSelLab, aContext->shape() && !aContext->shape()->isNull());
   }
-  if (aSelLab.IsAttribute(kCONSTUCTION_SIMPLE_REF_ID)) { 
+  if (aSelLab.IsAttribute(kCONSTUCTION_SIMPLE_REF_ID)) {
     // it is just reference to construction, not sub-shape
     // if there is a sketch, the sketch-naming must be updated
-    ResultConstructionPtr aConstruction = 
+    ResultConstructionPtr aConstruction =
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
     if (!aConstruction->isInfinite()) {
       BRep_Builder aCompoundBuilder;
@@ -428,7 +428,7 @@ bool Model_AttributeSelection::update()
       // It seems sub-shapes are not needed: only this shape is (and can be ) selected.
       TNaming_Builder aBuilder(aSelLab);
       aBuilder.Generated(aContext->shape()->impl<TopoDS_Shape>());
-      std::shared_ptr<Model_Document> aMyDoc = 
+      std::shared_ptr<Model_Document> aMyDoc =
         std::dynamic_pointer_cast<Model_Document>(owner()->document());
       //std::string aName = contextName(aContext);
       //aMyDoc->addNamingName(aSelLab, aName);
@@ -468,11 +468,11 @@ bool Model_AttributeSelection::update()
   } else if (aContext->groupName() == ModelAPI_ResultConstruction::group()) {
     // construction: identification by the results indexes, recompute faces and
     // take the face that more close by the indexes
-    ResultConstructionPtr aConstructionContext = 
+    ResultConstructionPtr aConstructionContext =
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
     FeaturePtr aContextFeature = aContext->document()->feature(aContext);
     // sketch sub-element
-    if (aConstructionContext && 
+    if (aConstructionContext &&
         std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aContextFeature).get())
     {
       TDF_Label aLab = myRef.myRef->Label();
@@ -485,16 +485,16 @@ bool Model_AttributeSelection::update()
       // selected indexes will be needed in each "if"
       Handle(TDataStd_IntPackedMap) aSubIds;
       std::shared_ptr<GeomAPI_Shape> aNewSelected;
-      bool aNoIndexes = 
+      bool aNoIndexes =
         !aLab.FindAttribute(TDataStd_IntPackedMap::GetID(), aSubIds) || aSubIds->Extent() == 0;
       // for now working only with composite features
-      CompositeFeaturePtr aComposite = 
+      CompositeFeaturePtr aComposite =
         std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aContextFeature);
       if (!aComposite.get() || aComposite->numberOfSubs() == 0) {
         return setInvalidIfFalse(aSelLab, false);
       }
 
-      if (aShapeType == TopAbs_FACE || aShapeType == TopAbs_WIRE) { 
+      if (aShapeType == TopAbs_FACE || aShapeType == TopAbs_WIRE) {
         // compound is for the whole sketch selection
         // If this is a wire with plane defined then it is a sketch-like object
         if (!aConstructionContext->facesNum()) // no faces, update can not work correctly
@@ -506,7 +506,7 @@ bool Model_AttributeSelection::update()
         } else { // searching for most looks-like initial face by the indexes
           // prepare edges of the current result for the fast searching
           // curves and orientations of edges
-          NCollection_DataMap<Handle(Geom_Curve), int> allCurves; 
+          NCollection_DataMap<Handle(Geom_Curve), int> allCurves;
           const int aSubNum = aComposite->numberOfSubs();
           for(int a = 0; a < aSubNum; a++) {
             int aSubID = aComposite->subFeatureId(a);
@@ -515,7 +515,7 @@ bool Model_AttributeSelection::update()
               const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = aSub->results();
               std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRes;
               for(aRes = aResults.cbegin(); aRes != aResults.cend(); aRes++) {
-                ResultConstructionPtr aConstr = 
+                ResultConstructionPtr aConstr =
                   std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aRes);
                 if (aConstr->shape() && aConstr->shape()->isEdge()) {
                   const TopoDS_Shape& aResShape = aConstr->shape()->impl<TopoDS_Shape>();
@@ -543,8 +543,8 @@ bool Model_AttributeSelection::update()
           setInvalidIfFalse(aSelLab, true);
           owner()->data()->sendAttributeUpdated(this);
           return true;
-        } else { 
-          // if the selection is not found, put the empty shape: 
+        } else {
+          // if the selection is not found, put the empty shape:
           // it's better to have disappeared shape, than the old, the lost one
           TNaming_Builder anEmptyBuilder(selectionLabel());
           return setInvalidIfFalse(aSelLab, false);
@@ -560,7 +560,7 @@ bool Model_AttributeSelection::update()
             std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aResIter =
               aFeature->results().cbegin();
             for(;aResIter != aFeature->results().cend(); aResIter++) {
-              ResultConstructionPtr aRes = 
+              ResultConstructionPtr aRes =
                 std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aResIter);
               if (aRes && aRes->shape() && aRes->shape()->isEdge()) { // found!
                 selectConstruction(aContext, aRes->shape());
@@ -589,7 +589,7 @@ bool Model_AttributeSelection::update()
               std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aResIter =
                 aFeature->results().cbegin();
               for(;aResIter != aFeature->results().cend(); aResIter++) {
-                ResultConstructionPtr aRes = 
+                ResultConstructionPtr aRes =
                   std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aResIter);
                 if (aRes && aRes->shape()) {
                   if (aRes->shape()->isVertex() && aVertexNum == 0) { // found!
@@ -638,7 +638,7 @@ void Model_AttributeSelection::selectBody(
   if (aBody) {
     aContext = aBody->shape()->impl<TopoDS_Shape>();
   } else {
-    ResultPtr aResult = 
+    ResultPtr aResult =
       std::dynamic_pointer_cast<ModelAPI_Result>(myRef.value());
     if (aResult) {
       aContext = aResult->shape()->impl<TopoDS_Shape>();
@@ -656,7 +656,7 @@ void Model_AttributeSelection::selectBody(
   while(!aNewContext.IsNull() && isUpdated) {
     // searching for the very last shape that was produced from this one
     isUpdated = false;
-    if (!TNaming_Tool::HasLabel(aSelLab, aNewContext)) 
+    if (!TNaming_Tool::HasLabel(aSelLab, aNewContext))
       // to avoid crash of TNaming_SameShapeIterator if pure shape does not exists
       break;
     for(TNaming_SameShapeIterator anIter(aNewContext, aSelLab); anIter.More(); anIter.Next()) {
@@ -696,7 +696,7 @@ void Model_AttributeSelection::selectBody(
     }
     if (!isFound) { // sub-shape is not found in the up-to-date instance of the context shape
       setInvalidIfFalse(aSelLab, false);
-      Events_InfoMessage("Model_AttributeSelection", 
+      Events_InfoMessage("Model_AttributeSelection",
         "Failed to select sub-shape already modified").send();
       return;
     }
@@ -708,20 +708,20 @@ void Model_AttributeSelection::selectBody(
   if (aFeatureOwner.get())
     aFeatureOwner->eraseResults();
   if (!aContext.IsNull()) {
-    aSel.Select(aNewSub, aNewContext); 
+    aSel.Select(aNewSub, aNewContext);
   }
 }
 
 /// registers the name of the shape in the label (theID == 0) of sub label (theID is a tag)
-/// if theID is zero, 
+/// if theID is zero,
 /// theOrientation is additional information about the positioning of edge relatively to face
-///    it is stored in the integer attribute of the edge sub-label: 
+///    it is stored in the integer attribute of the edge sub-label:
 ///    -1 is out, 1 is in, 0 is not needed
 static void registerSubShape(TDF_Label theMainLabel, TopoDS_Shape theShape,
   const int theID, const FeaturePtr& theContextFeature, std::shared_ptr<Model_Document> theDoc,
   std::map<int, int>& theOrientations,
   // name of sub-elements by ID to be exported instead of indexes
-  std::map<int, std::string>& theSubNames, 
+  std::map<int, std::string>& theSubNames,
   Handle(TDataStd_IntPackedMap) theRefs = Handle(TDataStd_IntPackedMap)(),
   const int theOrientation = 0)
 {
@@ -768,10 +768,10 @@ static void registerSubShape(TDF_Label theMainLabel, TopoDS_Shape theShape,
 void Model_AttributeSelection::selectConstruction(
   const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape)
 {
-  std::shared_ptr<Model_Document> aMyDoc = 
+  std::shared_ptr<Model_Document> aMyDoc =
     std::dynamic_pointer_cast<Model_Document>(owner()->document());
   FeaturePtr aContextFeature = theContext->document()->feature(theContext);
-  CompositeFeaturePtr aComposite = 
+  CompositeFeaturePtr aComposite =
     std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aContextFeature);
   const TopoDS_Shape& aSubShape = theSubShape->impl<TopoDS_Shape>();
   if (!aComposite || aComposite->numberOfSubs() == 0) {
@@ -793,7 +793,7 @@ void Model_AttributeSelection::selectConstruction(
   TColStd_MapOfTransient allCurves;
   if (aShapeType == TopAbs_VERTEX) { // compare positions
     aVertexPos = BRep_Tool::Pnt(TopoDS::Vertex(aSubShape));
-  } else { 
+  } else {
     for(TopExp_Explorer anEdgeExp(aSubShape, TopAbs_EDGE); anEdgeExp.More(); anEdgeExp.Next()) {
       TopoDS_Edge anEdge = TopoDS::Edge(anEdgeExp.Current());
       Standard_Real aFirst, aLast;
@@ -813,7 +813,7 @@ void Model_AttributeSelection::selectConstruction(
     std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRes = aResults.cbegin();
     // there may be many shapes (circle and center): register if at least one is in selection
     for(; aRes != aResults.cend(); aRes++) {
-      ResultConstructionPtr aConstr = 
+      ResultConstructionPtr aConstr =
         std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aRes);
       if (!aConstr->shape()) {
         continue;
@@ -873,7 +873,7 @@ void Model_AttributeSelection::selectConstruction(
                 for(; anEdgeExp.More(); anEdgeExp.Next(), aTagIndex += kSTART_VERTEX_DELTA) {
                   TopoDS_Vertex aV = TopoDS::Vertex(anEdgeExp.Current());
 
-                  std::stringstream anAdditionalName; 
+                  std::stringstream anAdditionalName;
                   registerSubShape(
                     selectionLabel(), aV, aTagIndex, aContextFeature, aMyDoc, anOrientations,
                     aSubNames);
@@ -889,7 +889,7 @@ void Model_AttributeSelection::selectConstruction(
   TNaming_Builder aBuilder(selectionLabel());
   aBuilder.Generated(aSubShape);
     registerSubShape(
-      selectionLabel(), aSubShape, 0, aContextFeature, aMyDoc, anOrientations, aSubNames, aRefs); 
+      selectionLabel(), aSubShape, 0, aContextFeature, aMyDoc, anOrientations, aSubNames, aRefs);
 }
 
 bool Model_AttributeSelection::selectPart(
@@ -901,7 +901,7 @@ bool Model_AttributeSelection::selectPart(
     return true; // postponed naming
   if (theUpdate) {
     Handle(TDataStd_Integer) anIndex;
-    if (selectionLabel().FindAttribute(TDataStd_Integer::GetID(), anIndex)) { 
+    if (selectionLabel().FindAttribute(TDataStd_Integer::GetID(), anIndex)) {
       // by internal selection
       if (anIndex->Get() > 0) {
         // update the selection by index
@@ -974,7 +974,7 @@ void Model_AttributeSelection::selectSubShape(
   }
 
   Model_SelectionNaming aSelNaming(selectionLabel());
-  std::shared_ptr<Model_Document> aDoc = 
+  std::shared_ptr<Model_Document> aDoc =
     std::dynamic_pointer_cast<Model_Document>(owner()->document());
   std::shared_ptr<GeomAPI_Shape> aShapeToBeSelected;
   ResultPtr aCont;
@@ -1105,7 +1105,7 @@ void Model_AttributeSelection::updateInHistory()
   Handle(TNaming_NamedShape) aContNS;
   if (!aContLab.FindAttribute(TNaming_NamedShape::GetID(), aContNS))
     return;
-  std::shared_ptr<Model_Document> aDoc = 
+  std::shared_ptr<Model_Document> aDoc =
     std::dynamic_pointer_cast<Model_Document>(aContext->document());
   FeaturePtr aThisFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(owner());
   FeaturePtr aCurrentModifierFeat = aDoc->feature(aContext);
@@ -1133,7 +1133,7 @@ void Model_AttributeSelection::updateInHistory()
         break;
       if (aModifierFeat == aThisFeature || aDoc->objects()->isLater(aModifierFeat, aThisFeature))
         continue; // the modifier feature is later than this, so, should not be used
-      if (aCurrentModifierFeat == aModifierFeat || 
+      if (aCurrentModifierFeat == aModifierFeat ||
         aDoc->objects()->isLater(aCurrentModifierFeat, aModifierFeat))
         continue; // the current modifier is later than the found, so, useless
       Handle(TNaming_NamedShape) aNewNS;
index 40868009298e94e9c8049fa10dce26f178fd1820..144ff01c957ce0593f39263db3d45c2ae988fdd9 100644 (file)
@@ -54,7 +54,7 @@ public:
   /// Returns a textual string of the selection
   /// \param theDefaultValue a name, which is returned if the naming name can not be obtained
   MODEL_EXPORT virtual std::string namingName(const std::string& theDefaultValue = "");
-  
+
   /// Returns an Id of the selection
   /// NOTE: This method has been added for temporary export of groups towards old GEOM
   /// It should then be removed when a direct use of objects from SHAPER
@@ -66,7 +66,7 @@ public:
   MODEL_EXPORT virtual void setId(int theID);
 
   /// Selects (i.e. creates Naming data structure) of sub-shape specifed by textual name
-  MODEL_EXPORT virtual void selectSubShape(const std::string& theType, 
+  MODEL_EXPORT virtual void selectSubShape(const std::string& theType,
                                            const std::string& theSubShapeName);
 
   /// Returns true if attribute was  initialized by some value
index 4f9bfb7107539ae4aceba29495985257c5e74098..aa9ff1cc08ea092e2434733f1bc08d13c6ab79b8 100644 (file)
@@ -43,7 +43,7 @@ void Model_AttributeSelectionList::append(
   int aNewTag = mySize->Get() + 1;
   TDF_Label aNewLab = mySize->Label().FindChild(aNewTag);
 
-  std::shared_ptr<Model_AttributeSelection> aNewAttr = 
+  std::shared_ptr<Model_AttributeSelection> aNewAttr =
     std::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aNewLab));
   if (owner()) {
     aNewAttr->setObject(owner());
@@ -53,7 +53,7 @@ void Model_AttributeSelectionList::append(
   aNewAttr->setValue(theContext, theSubShape, theTemporarily);
   if (theTemporarily)
     myTmpAttr = aNewAttr;
-  else 
+  else
     myTmpAttr.reset();
   owner()->data()->sendAttributeUpdated(this);
 }
@@ -64,7 +64,7 @@ void Model_AttributeSelectionList::append(
   int aNewTag = mySize->Get() + 1;
   TDF_Label aNewLab = mySize->Label().FindChild(aNewTag);
 
-  std::shared_ptr<Model_AttributeSelection> aNewAttr = 
+  std::shared_ptr<Model_AttributeSelection> aNewAttr =
     std::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aNewLab));
   if (owner()) {
     aNewAttr->setObject(owner());
@@ -82,13 +82,13 @@ void Model_AttributeSelectionList::removeTemporaryValues()
   }
 }
 
-void Model_AttributeSelectionList::removeLast() 
+void Model_AttributeSelectionList::removeLast()
 {
   int anOldSize = mySize->Get();
   if (anOldSize != 0) {
     mySize->Set(anOldSize - 1);
     TDF_Label aLab = mySize->Label().FindChild(anOldSize);
-    std::shared_ptr<Model_AttributeSelection> aOldAttr = 
+    std::shared_ptr<Model_AttributeSelection> aOldAttr =
       std::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aLab));
     aOldAttr->setObject(owner());
     REMOVE_BACK_REF(aOldAttr->context());
@@ -98,10 +98,10 @@ void Model_AttributeSelectionList::removeLast()
   }
 }
 
-// copies named shapes: we need the implementation of this 
+// copies named shapes: we need the implementation of this
 static void CopyNS(const Handle(TNaming_NamedShape)& theFrom,
   const Handle(TDF_Attribute)& theTo)
-{ 
+{
   TDF_Label aLab = theTo->Label();
   TNaming_Builder B(aLab);
 
@@ -129,10 +129,10 @@ static void CopyNS(const Handle(TNaming_NamedShape)& theFrom,
     case TNaming_GENERATED :
       B.Generated(aOldIter.Value(), aNewIter.Value());
       break;
-    case TNaming_MODIFY : 
+    case TNaming_MODIFY :
       B.Modify(aOldIter.Value(), aNewIter.Value());
       break;
-    case TNaming_DELETE : 
+    case TNaming_DELETE :
       B.Delete (aOldIter.Value());
       break;
     case TNaming_SELECTED :
@@ -158,7 +158,7 @@ static void copyAttrs(TDF_Label theSource, TDF_Label theDestination) {
     Handle(TNaming_NamedShape) aNS = Handle(TNaming_NamedShape)::DownCast(anAttrIter.Value());
     if (aNS.IsNull()) {
       // no relocation, empty map
-      Handle(TDF_RelocationTable) aRelocTable = new TDF_RelocationTable(); 
+      Handle(TDF_RelocationTable) aRelocTable = new TDF_RelocationTable();
       anAttrIter.Value()->Paste(aTargetAttr, aRelocTable);
     } else {
       CopyNS(aNS, aTargetAttr);
@@ -187,7 +187,7 @@ void Model_AttributeSelectionList::remove(const std::set<int>& theIndices)
       }
     } else { // this is removed, so remove everything from this label
       TDF_Label aLab = mySize->Label().FindChild(aCurrent + 1);
-      std::shared_ptr<Model_AttributeSelection> aOldAttr = 
+      std::shared_ptr<Model_AttributeSelection> aOldAttr =
         std::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aLab));
       aOldAttr->setObject(owner());
       REMOVE_BACK_REF(aOldAttr->context());
@@ -259,7 +259,7 @@ void Model_AttributeSelectionList::setSelectionType(const std::string& theType)
   mySelectionType->Set(theType.c_str());
 }
 
-std::shared_ptr<ModelAPI_AttributeSelection> 
+std::shared_ptr<ModelAPI_AttributeSelection>
   Model_AttributeSelectionList::value(const int theIndex)
 {
   if (myTmpAttr.get() && theIndex == size() - 1) {
@@ -269,7 +269,7 @@ std::shared_ptr<ModelAPI_AttributeSelection>
   // create a new attribute each time, by demand
   // supporting of old attributes is too slow (synch each time) and buggy on redo
   // (if attribute is deleted and created, the abort updates attriute and makes the Attr invalid)
-  std::shared_ptr<Model_AttributeSelection> aNewAttr = 
+  std::shared_ptr<Model_AttributeSelection> aNewAttr =
     std::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aLabel));
   aNewAttr->setID(id());
   if (owner()) {
@@ -286,7 +286,7 @@ void Model_AttributeSelectionList::clear()
     TDF_ChildIterator aSubIter(mySize->Label());
     for(; aSubIter.More(); aSubIter.Next()) {
       TDF_Label aLab = aSubIter.Value();
-      std::shared_ptr<Model_AttributeSelection> aNewAttr = 
+      std::shared_ptr<Model_AttributeSelection> aNewAttr =
         std::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aLab));
       if (owner()) {
         aNewAttr->setObject(owner());
index 0f7c48082c4625626bb2f0d45cb0c376ba50104a..83188ebe4bccd0dfc95ee93dce53445480344963 100644 (file)
@@ -14,8 +14,8 @@
 #include <GeomDataAPI_Point.h>
 #include <GeomDataAPI_Point2D.h>
 
-bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute, 
-                                       const std::list<std::string>& theArguments, 
+bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute,
+                                       const std::list<std::string>& theArguments,
                                        Events_InfoMessage& theError) const
 {
   if (theAttribute->attributeType() == ModelAPI_AttributeInteger::typeId()) {
@@ -28,7 +28,7 @@ bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute,
     }
   } else
   if (theAttribute->attributeType() == ModelAPI_AttributeDouble::typeId()) {
-    AttributeDoublePtr anAttribue = 
+    AttributeDoublePtr anAttribue =
         std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(theAttribute);
     if (!anAttribue->expressionError().empty()) {
       theError = "Expression error: %1";
@@ -37,7 +37,7 @@ bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute,
     }
   } else
   if (theAttribute->attributeType() == GeomDataAPI_Point::typeId()) {
-    AttributePointPtr anAttribue = 
+    AttributePointPtr anAttribue =
         std::dynamic_pointer_cast<GeomDataAPI_Point>(theAttribute);
 
     const char* aComponent[] = {"X", "Y", "Z"};
@@ -54,7 +54,7 @@ bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute,
     }
   } else
   if (theAttribute->attributeType() == GeomDataAPI_Point2D::typeId()) {
-    AttributePoint2DPtr anAttribue = 
+    AttributePoint2DPtr anAttribue =
         std::dynamic_pointer_cast<GeomDataAPI_Point2D>(theAttribute);
 
     const char* aComponent[] = {"X", "Y"};
index 193014737f2f3a13a232b8becc579a7e1ed35616..38b1543485ada04f857505b35b742b7109ee447d 100755 (executable)
@@ -66,7 +66,7 @@ static void evolutionToSelectionRec(TDF_Label theLab, const bool theFlag) {
     } else {
       TDataStd_Integer::Set(theLab, anEvolution);
     }
-    
+
     for(TNaming_Iterator anIter(aName); anIter.More(); anIter.Next()) {
       // iterator goes in reversed order relatively to the Builder, to, make the list reversed
       aShapePairs.push_front(std::pair<TopoDS_Shape, TopoDS_Shape>
@@ -115,7 +115,7 @@ void Model_BodyBuilder::store(const std::shared_ptr<GeomAPI_Shape>& theShape,
   if (aData) {
     TDF_Label& aShapeLab = aData->shapeLab();
     // clean builders
-    clean();   
+    clean();
     // store the new shape as primitive
     TNaming_Builder aBuilder(aShapeLab);
     if (!theShape)
@@ -135,7 +135,7 @@ void Model_BodyBuilder::store(const std::shared_ptr<GeomAPI_Shape>& theShape,
       }
     }
 
-    aBuilder.Generated(aShape);        
+    aBuilder.Generated(aShape);
     // register name
     aShapeLab.ForgetAttribute(TDF_Reference::GetID());
     if(!aBuilder.NamedShape()->IsEmpty()) {
@@ -159,7 +159,7 @@ void Model_BodyBuilder::storeGenerated(const std::shared_ptr<GeomAPI_Shape>& the
   if (aData) {
     TDF_Label& aShapeLab = aData->shapeLab();
     // clean builders
-    clean();   
+    clean();
     // store the new shape as primitive
     TNaming_Builder aBuilder(aShapeLab);
     if (!theFromShape || !theToShape)
@@ -193,7 +193,7 @@ void Model_BodyBuilder::storeModified(const std::shared_ptr<GeomAPI_Shape>& theO
   if (aData) {
     TDF_Label& aShapeLab = aData->shapeLab();
     // clean builders
-    clean();   
+    clean();
     // store the new shape as primitive
     TNaming_Builder aBuilder(aShapeLab);
     if (!theOldShape || !theNewShape)
@@ -205,7 +205,7 @@ void Model_BodyBuilder::storeModified(const std::shared_ptr<GeomAPI_Shape>& theO
     if (aShapeNew.IsNull())
       return;  // null shape inside
     aBuilder.Modify(aShapeOld, aShapeNew);
-    if (theDecomposeSolidsTag && aShapeNew.ShapeType() == TopAbs_COMPOUND) { 
+    if (theDecomposeSolidsTag && aShapeNew.ShapeType() == TopAbs_COMPOUND) {
       // make sub elements as subs
 
       // register name if it is possible
@@ -230,12 +230,12 @@ void Model_BodyBuilder::storeModified(const std::shared_ptr<GeomAPI_Shape>& theO
         if(!aName.IsEmpty()) {
           TCollection_AsciiString aShapeType = aShape.ShapeType() == TopAbs_EDGE ? "_Edge_" :
                                                aShape.ShapeType() == TopAbs_FACE ? "_Face_" :
-                                               aShape.ShapeType() == TopAbs_SOLID ? "_Solid_" : 
+                                               aShape.ShapeType() == TopAbs_SOLID ? "_Solid_" :
                                                "_Shape_";
-          std::string aSolidName = 
+          std::string aSolidName =
             (aName + aShapeType + TCollection_AsciiString(aTag - theDecomposeSolidsTag))
             .ToCString();
-          std::shared_ptr<Model_Document> aDoc = 
+          std::shared_ptr<Model_Document> aDoc =
             std::dynamic_pointer_cast<Model_Document>(document());
           aDoc->addNamingName(aSubBuilder.NamedShape()->Label(), aSolidName);
           TDataStd_Name::Set(aSubBuilder.NamedShape()->Label(), aSolidName.c_str());
@@ -246,7 +246,7 @@ void Model_BodyBuilder::storeModified(const std::shared_ptr<GeomAPI_Shape>& theO
       if(aBuilder.NamedShape()->Label().FindAttribute(TDataStd_Name::GetID(),anAttr)) {
         std::string aName (TCollection_AsciiString(anAttr->Get()).ToCString());
         if(!aName.empty()) {
-          std::shared_ptr<Model_Document> aDoc = 
+          std::shared_ptr<Model_Document> aDoc =
             std::dynamic_pointer_cast<Model_Document>(document());
           aDoc->addNamingName(aBuilder.NamedShape()->Label(), aName);
         }
@@ -259,7 +259,7 @@ void  Model_BodyBuilder::storeWithoutNaming(const std::shared_ptr<GeomAPI_Shape>
 {
   std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(data());
   if (aData) {
-    clean();   
+    clean();
     if (!theShape.get())
       return; // bad shape
     TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
@@ -309,7 +309,7 @@ void Model_BodyBuilder::generated(
 {
   TopoDS_Shape aShape = theNewShape->impl<TopoDS_Shape>();
   builder(theTag)->Generated(aShape);
-  if(!theName.empty()) 
+  if(!theName.empty())
     buildName(theTag, theName);
 }
 
@@ -319,7 +319,7 @@ void Model_BodyBuilder::generated(const std::shared_ptr<GeomAPI_Shape>& theOldSh
   TopoDS_Shape anOldShape = theOldShape->impl<TopoDS_Shape>();
   TopoDS_Shape aNewShape = theNewShape->impl<TopoDS_Shape>();
   builder(theTag)->Generated(anOldShape, aNewShape);
-  if(!theName.empty()) 
+  if(!theName.empty())
     buildName(theTag, theName);
   TopAbs_ShapeEnum aGenShapeType = aNewShape.ShapeType();
   if(aGenShapeType == TopAbs_WIRE || aGenShapeType == TopAbs_SHELL) {
@@ -346,7 +346,7 @@ void Model_BodyBuilder::modified(const std::shared_ptr<GeomAPI_Shape>& theOldSha
   TopoDS_Shape anOldShape = theOldShape->impl<TopoDS_Shape>();
   TopoDS_Shape aNewShape = theNewShape->impl<TopoDS_Shape>();
   builder(theTag)->Modify(anOldShape, aNewShape);
-  if(!theName.empty()) 
+  if(!theName.empty())
     buildName(theTag, theName);
 }
 
@@ -449,7 +449,7 @@ void Model_BodyBuilder::loadAndOrientGeneratedShapes (
     std::shared_ptr<GeomAPI_Shape> aRShape(new GeomAPI_Shape());
     aRShape->setImpl((new TopoDS_Shape(aRoot)));
     theMS->generated(aRShape, aList);
-    std::list<std::shared_ptr<GeomAPI_Shape> >::const_iterator 
+    std::list<std::shared_ptr<GeomAPI_Shape> >::const_iterator
       anIt = aList.begin(), aLast = aList.end();
     for (; anIt != aLast; anIt++) {
       TopoDS_Shape aNewShape = (*anIt)->impl<TopoDS_Shape>();
@@ -464,17 +464,17 @@ void Model_BodyBuilder::loadAndOrientGeneratedShapes (
       }
       TopAbs_ShapeEnum aGenShapeType = aNewShape.ShapeType();
       if(aGenShapeType == TopAbs_WIRE || aGenShapeType == TopAbs_SHELL) {
-        TopAbs_ShapeEnum anExplodeShapeType = 
+        TopAbs_ShapeEnum anExplodeShapeType =
           aGenShapeType == TopAbs_WIRE ? TopAbs_EDGE : TopAbs_FACE;
         const TDF_Label aLabel = builder(theTag)->NamedShape()->Label();
         int aTag = 1;
-        std::shared_ptr<Model_Document> aDoc = 
+        std::shared_ptr<Model_Document> aDoc =
           std::dynamic_pointer_cast<Model_Document>(document());
         for(TopExp_Explorer anExp(aNewShape, anExplodeShapeType); anExp.More(); anExp.Next()) {
           TDF_Label aChildLabel = aLabel.FindChild(aTag);
           TNaming_Builder aBuilder(aChildLabel);
           aBuilder.Generated(aRoot, anExp.Current());
-          TCollection_AsciiString aChildName = 
+          TCollection_AsciiString aChildName =
             TCollection_AsciiString((theName + "_").c_str()) + aTag;
           TDataStd_Name::Set(aChildLabel, aChildName.ToCString());
           aTag++;
@@ -485,9 +485,9 @@ void Model_BodyBuilder::loadAndOrientGeneratedShapes (
 }
 
 //=======================================================================
-int getDangleShapes(const TopoDS_Shape&           theShapeIn, 
+int getDangleShapes(const TopoDS_Shape&           theShapeIn,
   const TopAbs_ShapeEnum        theGeneratedFrom,
-  TopTools_DataMapOfShapeShape& theDangles) 
+  TopTools_DataMapOfShapeShape& theDangles)
 {
   theDangles.Clear();
   TopTools_IndexedDataMapOfShapeListOfShape subShapeAndAncestors;
@@ -513,21 +513,21 @@ void loadGeneratedDangleShapes(
   TopTools_DataMapOfShapeShape dangles;
   if (!getDangleShapes(theShapeIn, theGeneratedFrom, dangles)) return;
   TopTools_DataMapIteratorOfDataMapOfShapeShape itr(dangles);
-  for (; itr.More(); itr.Next()) 
+  for (; itr.More(); itr.Next())
     theBuilder->Generated(itr.Key(), itr.Value());
 }
 
 //=======================================================================
-void Model_BodyBuilder::loadNextLevels(std::shared_ptr<GeomAPI_Shape> theShape, 
+void Model_BodyBuilder::loadNextLevels(std::shared_ptr<GeomAPI_Shape> theShape,
   const std::string& theName, int&  theTag)
 {
   if(theShape->isNull()) return;
-  TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();    
+  TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
   std::string aName;
-  if (aShape.ShapeType() == TopAbs_SOLID) {                
+  if (aShape.ShapeType() == TopAbs_SOLID) {
     TopExp_Explorer expl(aShape, TopAbs_FACE);
-    for (; expl.More(); expl.Next()) {  
-      builder(theTag)->Generated(expl.Current()); 
+    for (; expl.More(); expl.Next()) {
+      builder(theTag)->Generated(expl.Current());
       TCollection_AsciiString aStr(theTag);
       aName = theName + aStr.ToCString();
       buildName(theTag, aName);
@@ -541,7 +541,7 @@ void Model_BodyBuilder::loadNextLevels(std::shared_ptr<GeomAPI_Shape> theShape,
     if (Faces.Extent() > 1 || (aShape.ShapeType() == TopAbs_SHELL && Faces.Extent() == 1)) {
       TopExp_Explorer expl(aShape, TopAbs_FACE);
       for (; expl.More(); expl.Next()) {
-        builder(theTag)->Generated(expl.Current());          
+        builder(theTag)->Generated(expl.Current());
         TCollection_AsciiString aStr(theTag);
         aName = theName + aStr.ToCString();
         buildName(theTag, aName);
@@ -550,7 +550,7 @@ void Model_BodyBuilder::loadNextLevels(std::shared_ptr<GeomAPI_Shape> theShape,
     }
     TopTools_IndexedDataMapOfShapeListOfShape anEdgeAndNeighbourFaces;
     TopExp::MapShapesAndAncestors(aShape, TopAbs_EDGE, TopAbs_FACE, anEdgeAndNeighbourFaces);
-    for (Standard_Integer i = 1; i <= anEdgeAndNeighbourFaces.Extent(); i++) 
+    for (Standard_Integer i = 1; i <= anEdgeAndNeighbourFaces.Extent(); i++)
     {
       const TopTools_ListOfShape& aLL = anEdgeAndNeighbourFaces.FindFromIndex(i);
       if (aLL.Extent() < 2) {
@@ -588,25 +588,25 @@ void Model_BodyBuilder::loadNextLevels(std::shared_ptr<GeomAPI_Shape> theShape,
         theTag++;
       }
     } else {
-      TopExp_Explorer expl(aShape, TopAbs_EDGE); 
-      for (; expl.More(); expl.Next()) {       
+      TopExp_Explorer expl(aShape, TopAbs_EDGE);
+      for (; expl.More(); expl.Next()) {
         builder(theTag)->Generated(expl.Current());
         TCollection_AsciiString aStr(theTag);
         aName = theName + aStr.ToCString();
         buildName(theTag, aName);
         theTag++;
-      }   
+      }
       // and load generated vertices.
       TopTools_DataMapOfShapeShape generated;
-      if (getDangleShapes(aShape, TopAbs_EDGE, generated)) 
+      if (getDangleShapes(aShape, TopAbs_EDGE, generated))
       {
         TNaming_Builder* pBuilder = builder(theTag++);
-        loadGeneratedDangleShapes(aShape, TopAbs_EDGE, pBuilder);  
+        loadGeneratedDangleShapes(aShape, TopAbs_EDGE, pBuilder);
       }
     }
   } else if (aShape.ShapeType() == TopAbs_EDGE) {
     TopExp_Explorer expl(aShape, TopAbs_VERTEX);
-    for (; expl.More(); expl.Next()) {      
+    for (; expl.More(); expl.Next()) {
       builder(theTag)->Generated(expl.Current());
       TCollection_AsciiString aStr(theTag);
       aName = theName + aStr.ToCString();
@@ -617,8 +617,8 @@ void Model_BodyBuilder::loadNextLevels(std::shared_ptr<GeomAPI_Shape> theShape,
 }
 
 //=======================================================================
-int findAmbiguities(const TopoDS_Shape&           theShapeIn,                                  
-  TopTools_ListOfShape&   theList) 
+int findAmbiguities(const TopoDS_Shape&           theShapeIn,
+  TopTools_ListOfShape&   theList)
 {
   int aNumEdges(0);
   theList.Clear();
@@ -641,21 +641,21 @@ int findAmbiguities(const TopoDS_Shape&           theShapeIn,
       if(ancestors1.Extent() == ancestors2.Extent() && ancestors1.Extent() > 1) {
         int aNum (ancestors2.Extent());
         TopTools_ListIteratorOfListOfShape it(ancestors2);
-        for(;it.More();it.Next()) 
+        for(;it.More();it.Next())
           if(aMap1.Contains(it.Value())) aNum--;
         if(aNum == 0) {
-          if(aMap2.Add(aKeyEdge1)) 
+          if(aMap2.Add(aKeyEdge1))
             aKeyList.Append(aKeyEdge1);
           if(aMap2.Add(aKeyEdge2))
             aKeyList.Append(aKeyEdge2);
         }
       }
-    } // at the end ==> List of edges to be named in addition  
+    } // at the end ==> List of edges to be named in addition
   }
   aNumEdges = aKeyList.Extent();
   if(aNumEdges)
-    theList.Assign(aKeyList);  
-  return aNumEdges; 
+    theList.Assign(aKeyList);
+  return aNumEdges;
 }
 
 //=======================================================================
@@ -663,7 +663,7 @@ void Model_BodyBuilder::loadFirstLevel(
   std::shared_ptr<GeomAPI_Shape> theShape, const std::string& theName, int&  theTag)
 {
   if(theShape->isNull()) return;
-  TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>(); 
+  TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
   std::string aName;
   if (aShape.ShapeType() == TopAbs_COMPOUND || aShape.ShapeType() == TopAbs_COMPSOLID) {
     TopoDS_Iterator itr(aShape);
@@ -673,22 +673,22 @@ void Model_BodyBuilder::loadFirstLevel(
       aName = theName + aStr.ToCString();
       buildName(theTag, aName);
       if(!theName.empty()) buildName(theTag, aName);
-      if (itr.Value().ShapeType() == TopAbs_COMPOUND || 
-        itr.Value().ShapeType() == TopAbs_COMPSOLID) 
+      if (itr.Value().ShapeType() == TopAbs_COMPOUND ||
+        itr.Value().ShapeType() == TopAbs_COMPSOLID)
       {
         std::shared_ptr<GeomAPI_Shape> itrShape(new GeomAPI_Shape());
         itrShape->setImpl(new TopoDS_Shape(itr.Value()));
         loadFirstLevel(itrShape, theName, theTag);
       } else {
         std::shared_ptr<GeomAPI_Shape> itrShape(new GeomAPI_Shape());
-        itrShape->setImpl(new TopoDS_Shape(itr.Value()));              
+        itrShape->setImpl(new TopoDS_Shape(itr.Value()));
         loadNextLevels(itrShape, theName, theTag);
       }
     }
   } else {
     std::shared_ptr<GeomAPI_Shape> itrShape(new GeomAPI_Shape());
     itrShape->setImpl(new TopoDS_Shape(aShape));
-    loadNextLevels(itrShape, theName, theTag); 
+    loadNextLevels(itrShape, theName, theTag);
   }
   TopTools_ListOfShape   aList;
   if(findAmbiguities(aShape, aList)) {
@@ -707,7 +707,7 @@ void Model_BodyBuilder::loadDisconnectedEdges(
   std::shared_ptr<GeomAPI_Shape> theShape, const std::string& theName, int&  theTag)
 {
   if(theShape->isNull()) return;
-  TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();  
+  TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
   TopTools_DataMapOfShapeListOfShape edgeNaborFaces;
   TopTools_ListOfShape empty;
   TopExp_Explorer explF(aShape, TopAbs_FACE);
@@ -725,13 +725,13 @@ void Model_BodyBuilder::loadDisconnectedEdges(
           break;
         }
       }
-      if (faceIsNew) 
-        edgeNaborFaces.ChangeFind(anEdge).Append(aFace);      
+      if (faceIsNew)
+        edgeNaborFaces.ChangeFind(anEdge).Append(aFace);
     }
   }
 
   TopTools_MapOfShape anEdgesToDelete;
-  TopExp_Explorer anEx(aShape,TopAbs_EDGE); 
+  TopExp_Explorer anEx(aShape,TopAbs_EDGE);
   std::string aName;
   for(;anEx.More();anEx.Next()) {
     Standard_Boolean aC0 = Standard_False;
@@ -761,27 +761,27 @@ void Model_BodyBuilder::loadDisconnectedEdges(
             theTag++;
           }
         }
-      }      
+      }
       TopTools_MapIteratorOfMapOfShape itDelete(anEdgesToDelete);
-      for(;itDelete.More();itDelete.Next()) 
-        edgeNaborFaces.UnBind(itDelete.Key());      
+      for(;itDelete.More();itDelete.Next())
+        edgeNaborFaces.UnBind(itDelete.Key());
       edgeNaborFaces.UnBind(anEdge1);
     }
     if (aC0) {
       builder(theTag)->Generated(anEdge1);
       TCollection_AsciiString aStr(theTag);
       aName = theName + aStr.ToCString();
-      buildName(theTag, aName);         
+      buildName(theTag, aName);
       theTag++;
     }
-  }  
+  }
 }
 
 void Model_BodyBuilder::loadDisconnectedVertexes(std::shared_ptr<GeomAPI_Shape> theShape,
                                                  const std::string& theName, int&  theTag)
 {
   if(theShape->isNull()) return;
-  TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();  
+  TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
   TopTools_DataMapOfShapeListOfShape vertexNaborEdges;
   TopTools_ListOfShape empty;
   TopExp_Explorer explF(aShape, TopAbs_EDGE);
@@ -808,11 +808,11 @@ void Model_BodyBuilder::loadDisconnectedVertexes(std::shared_ptr<GeomAPI_Shape>
   TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itr(vertexNaborEdges);
   for (; itr.More(); itr.Next()) {
     const TopTools_ListOfShape& naborEdges = itr.Value();
-    if (naborEdges.Extent() < 2) {             
+    if (naborEdges.Extent() < 2) {
       builder(theTag)->Generated(itr.Key());
       TCollection_AsciiString aStr(theTag);
       aName = theName + aStr.ToCString();
-      buildName(theTag, aName);         
+      buildName(theTag, aName);
       theTag++;
     }
   }
@@ -843,7 +843,7 @@ std::shared_ptr<GeomAPI_Shape> Model_BodyBuilder::shape()
 bool Model_BodyBuilder::isLatestEqual(const std::shared_ptr<GeomAPI_Shape>& theShape)
 {
   if (theShape.get()) {
-    TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();  
+    TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
     std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(data());
     if (aData) {
       TDF_Label& aShapeLab = aData->shapeLab();
index 2b8a629908a4104782d0400aca607b8d01c38ec0..6f2f868eb14c87e9724cc2d453f2b97632c90215 100755 (executable)
@@ -22,7 +22,7 @@ class TNaming_Builder;
  */
 class Model_BodyBuilder : public ModelAPI_BodyBuilder
 {
-  /// builders that tores the naming history: one per label to allow store several shapes to one 
+  /// builders that tores the naming history: one per label to allow store several shapes to one
   /// label; index in vector corresponds to the label tag
   std::vector<TNaming_Builder*> myBuilders;
 public:
@@ -37,7 +37,7 @@ public:
   /// Stores the modified shape (called by the execution method).
   /// \param theOldShape shape that produces result
   /// \param theNewShape resulting shape
-  /// \param theDecomposeSolidsTag tag for starting of solids sub-elements placement in case 
+  /// \param theDecomposeSolidsTag tag for starting of solids sub-elements placement in case
   ///          theNewShape is compound of solids, if zero it is not used
   MODEL_EXPORT virtual void storeModified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
                                                const std::shared_ptr<GeomAPI_Shape>& theNewShape,
@@ -52,21 +52,21 @@ public:
 
   /// Records the subshape newShape which was generated during a topological construction.
   /// As an example, consider the case of a face generated in construction of a box.
-  MODEL_EXPORT virtual void generated(const std::shared_ptr<GeomAPI_Shape>& theNewShape, 
+  MODEL_EXPORT virtual void generated(const std::shared_ptr<GeomAPI_Shape>& theNewShape,
     const std::string& theName, const int theTag = 1);
 
   /// Records the shape newShape which was generated from the shape oldShape during a topological
-  /// construction. As an example, consider the case of a face generated from an edge in 
+  /// construction. As an example, consider the case of a face generated from an edge in
   /// construction of a prism.
   MODEL_EXPORT virtual void generated(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
-    const std::shared_ptr<GeomAPI_Shape>& theNewShape, 
+    const std::shared_ptr<GeomAPI_Shape>& theNewShape,
     const std::string& theName, const int theTag = 1);
 
 
   /// Records the shape newShape which is a modification of the shape oldShape.
   /// As an example, consider the case of a face split or merged in a Boolean operation.
   MODEL_EXPORT virtual void modified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
-    const std::shared_ptr<GeomAPI_Shape>& theNewShape, 
+    const std::shared_ptr<GeomAPI_Shape>& theNewShape,
     const std::string& theName, const int theTag = 1);
 
   /// Records the shape oldShape which was deleted from the current label.
@@ -96,23 +96,23 @@ public:
                                                const int  theTag,
                                                                                           const std::string& theName,
                                                GeomAPI_DataMapOfShapeShape& theSubShapes);
-  
+
   /// Loads shapes of the first level (to be used during shape import)
   MODEL_EXPORT virtual void loadFirstLevel(std::shared_ptr<GeomAPI_Shape> theShape,
                                            const std::string& theName, int&  theTag);
-  
+
   /// Loads disconnected edges
   MODEL_EXPORT virtual void loadDisconnectedEdges(std::shared_ptr<GeomAPI_Shape> theShape,
                                                   const std::string& theName, int&  theTag);
 
   /// Loads disconnected vetexes
-  MODEL_EXPORT virtual void loadDisconnectedVertexes(std::shared_ptr<GeomAPI_Shape> theShape, 
+  MODEL_EXPORT virtual void loadDisconnectedVertexes(std::shared_ptr<GeomAPI_Shape> theShape,
                                                      const std::string& theName, int&  theTag);
 
   /// Removes the stored builders
   MODEL_EXPORT virtual ~Model_BodyBuilder();
 
-  /// Converts evolution of sub-shapes stored in naming structure to selection 
+  /// Converts evolution of sub-shapes stored in naming structure to selection
   /// (theFlag = true) and back (theFlag = false)
   MODEL_EXPORT virtual void evolutionToSelection(const bool theFlag);
 
@@ -132,10 +132,10 @@ protected:
 
 private:
   /// Loads shapes of the next level (to be used during shape import)
-  void loadNextLevels(std::shared_ptr<GeomAPI_Shape> theShape, 
+  void loadNextLevels(std::shared_ptr<GeomAPI_Shape> theShape,
                       const std::string& theName, int&  theTag);
 
-  /// builds name for the shape kept at the specified tag 
+  /// builds name for the shape kept at the specified tag
   void buildName(const int theTag, const std::string& theName);
 
   friend class Model_ResultBody;
index 9f69e4bddcdd4d58f018c0923c506bd6b00b0a2c..ce5ab2f908c02104274998c03cbd34023df1cbb2 100644 (file)
@@ -83,9 +83,9 @@ void Model_Data::setLabel(TDF_Label theLab)
     Standard_Boolean aFlag2 = myFlags->Upper() >= 2 ? myFlags->Value(2) : Standard_True;
     Handle(TColStd_HArray1OfByte) aNewArray = new TColStd_HArray1OfByte(0, 2);
     myFlags->SetInternalArray(aNewArray);
-    myFlags->SetValue(0, aFlag0); 
-    myFlags->SetValue(1, aFlag1); 
-    myFlags->SetValue(2, aFlag2); 
+    myFlags->SetValue(0, aFlag0);
+    myFlags->SetValue(1, aFlag1);
+    myFlags->SetValue(2, aFlag2);
   }
 }
 
@@ -180,7 +180,7 @@ AttributePtr Model_Data::addAttribute(const std::string& theID, const std::strin
     anAttr->setObject(myObject);
     anAttr->setID(theID);
   } else {
-    Events_InfoMessage("Model_Data", 
+    Events_InfoMessage("Model_Data",
       "Can not create unknown type of attribute %1").arg(theAttrType).send();
   }
   return aResult;
@@ -222,7 +222,7 @@ std::shared_ptr<ModelAPI_Attribute> Model_Data::attribute(const std::string& the
 
 const std::string& Model_Data::id(const std::shared_ptr<ModelAPI_Attribute>& theAttr)
 {
-  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr =
     myAttrs.begin();
   for (; anAttr != myAttrs.end(); anAttr++) {
     if (anAttr->second == theAttr)
@@ -249,7 +249,7 @@ bool Model_Data::isValid()
 std::list<std::shared_ptr<ModelAPI_Attribute> > Model_Data::attributes(const std::string& theType)
 {
   std::list<std::shared_ptr<ModelAPI_Attribute> > aResult;
-  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttrsIter = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttrsIter =
     myAttrs.begin();
   for (; anAttrsIter != myAttrs.end(); anAttrsIter++) {
     if (theType.empty() || anAttrsIter->second->attributeType() == theType) {
@@ -259,10 +259,10 @@ std::list<std::shared_ptr<ModelAPI_Attribute> > Model_Data::attributes(const std
   return aResult;
 }
 
-std::list<std::string> Model_Data::attributesIDs(const std::string& theType) 
+std::list<std::string> Model_Data::attributesIDs(const std::string& theType)
 {
   std::list<std::string> aResult;
-  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttrsIter = 
+  std::map<std::string, std::shared_ptr<ModelAPI_Attribute> >::iterator anAttrsIter =
     myAttrs.begin();
   for (; anAttrsIter != myAttrs.end(); anAttrsIter++) {
     if (theType.empty() || anAttrsIter->second->attributeType() == theType) {
@@ -297,7 +297,7 @@ void Model_Data::blockSendAttributeUpdated(const bool theBlock, const bool theSe
     if (mySendAttributeUpdated && !myWasChangedButBlocked.empty()) {
       // so, now it is ok to send the update signal
       if (theSendMessage) {
-        // make a copy to avoid iteration on modified list 
+        // make a copy to avoid iteration on modified list
         // (may be cleared by attribute changed call)
         std::list<ModelAPI_Attribute*> aWasChangedButBlocked = myWasChangedButBlocked;
         myWasChangedButBlocked.clear();
@@ -321,13 +321,13 @@ void Model_Data::erase()
       // remove in order to clear back references in other objects
       std::list<std::pair<std::string, std::list<ObjectPtr> > > aRefs;
       referencesToObjects(aRefs);
-      std::list<std::pair<std::string, std::list<ObjectPtr> > >::iterator 
+      std::list<std::pair<std::string, std::list<ObjectPtr> > >::iterator
         anAttrIter = aRefs.begin();
       for(; anAttrIter != aRefs.end(); anAttrIter++) {
         std::list<ObjectPtr>::iterator aReferenced = anAttrIter->second.begin();
         for(; aReferenced != anAttrIter->second.end(); aReferenced++) {
           if (aReferenced->get() && (*aReferenced)->data()->isValid()) {
-            std::shared_ptr<Model_Data> aData = 
+            std::shared_ptr<Model_Data> aData =
               std::dynamic_pointer_cast<Model_Data>((*aReferenced)->data());
             aData->removeBackReference(myAttrs[anAttrIter->first]);
           }
@@ -412,7 +412,7 @@ int Model_Data::featureId() const
 void Model_Data::eraseBackReferences()
 {
   myRefsToMe.clear();
-  std::shared_ptr<ModelAPI_Result> aRes = 
+  std::shared_ptr<ModelAPI_Result> aRes =
     std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
   if (aRes)
     aRes->setIsConcealed(false);
@@ -439,7 +439,7 @@ void Model_Data::removeBackReference(AttributePtr theAttr)
   }
 }
 
-void Model_Data::addBackReference(FeaturePtr theFeature, std::string theAttrID, 
+void Model_Data::addBackReference(FeaturePtr theFeature, std::string theAttrID,
    const bool theApplyConcealment)
 {
   // it is possible to add the same attribute twice: may be last time the owner was not Stable...
@@ -447,14 +447,14 @@ void Model_Data::addBackReference(FeaturePtr theFeature, std::string theAttrID,
   if (myRefsToMe.find(anAttribute) == myRefsToMe.end())
     myRefsToMe.insert(theFeature->data()->attribute(theAttrID));
 
-  if (theApplyConcealment &&  theFeature->isStable() && 
+  if (theApplyConcealment &&  theFeature->isStable() &&
       ModelAPI_Session::get()->validators()->isConcealed(theFeature->getKind(), theAttrID)) {
-    std::shared_ptr<ModelAPI_Result> aRes = 
+    std::shared_ptr<ModelAPI_Result> aRes =
       std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
     // the second condition is for history upper than concealment causer, so the feature result may
     // be displayed and previewed; also for avoiding of quick show/hide on history
     // moving deep down
-    if (aRes && !theFeature->isDisabled() && 
+    if (aRes && !theFeature->isDisabled() &&
         !ModelAPI_Session::get()->validators()->isUnconcealed(aRes, theFeature)) {
       aRes->setIsConcealed(true);
     }
@@ -470,7 +470,7 @@ void Model_Data::updateConcealmentFlag()
       if (aFeature.get() && !aFeature->isDisabled() && aFeature->isStable()) {
         if (ModelAPI_Session::get()->validators()->isConcealed(
               aFeature->getKind(), (*aRefsIter)->id())) {
-          std::shared_ptr<ModelAPI_Result> aRes = 
+          std::shared_ptr<ModelAPI_Result> aRes =
             std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
           if (aRes.get()) {
             if (!ModelAPI_Session::get()->validators()->isUnconcealed(aRes, aFeature)) {
@@ -482,14 +482,14 @@ void Model_Data::updateConcealmentFlag()
       }
     }
   }
-  std::shared_ptr<ModelAPI_Result> aRes = 
+  std::shared_ptr<ModelAPI_Result> aRes =
     std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
   if (aRes.get()) {
     aRes->setIsConcealed(false);
   }
 }
 
-std::set<std::string> set_union(const std::set<std::string>& theLeft, 
+std::set<std::string> set_union(const std::set<std::string>& theLeft,
                                 const std::set<std::string>& theRight)
 {
   std::set<std::string> aResult;
@@ -522,7 +522,7 @@ std::list<ResultParameterPtr> findVariables(const std::set<std::string>& thePara
     const std::string& aName = *aParamIt;
     double aValue;
     ResultParameterPtr aParam;
-    // theSearcher is not needed here: in expressions 
+    // theSearcher is not needed here: in expressions
     // of features the parameters history is not needed
     if (ModelAPI_Tools::findVariable(FeaturePtr(), aName, aValue, aParam))
       aResult.push_back(aParam);
@@ -533,7 +533,7 @@ std::list<ResultParameterPtr> findVariables(const std::set<std::string>& thePara
 void Model_Data::referencesToObjects(
   std::list<std::pair<std::string, std::list<ObjectPtr> > >& theRefs)
 {
-  static Model_ValidatorsFactory* aValidators = 
+  static Model_ValidatorsFactory* aValidators =
     static_cast<Model_ValidatorsFactory*>(ModelAPI_Session::get()->validators());
   FeaturePtr aMyFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(myObject);
 
index c41f1a5ab58b34f4ac22eac1baf811149d8341ba..f78f2d26303861d3c3a29546ceedc7362087de55 100644 (file)
@@ -101,7 +101,7 @@ class Model_Data : public ModelAPI_Data
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeSelection>
     selection(const std::string& theID);
   /// Returns the attribute that contains selection to a shape
-  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeSelectionList> 
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeSelectionList>
     selectionList(const std::string& theID);
   /// Returns the attribute that contains reference to an attribute of a feature
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeRefAttr>
@@ -153,7 +153,7 @@ class Model_Data : public ModelAPI_Data
   /// \param theID identifier of the attribute that can be referenced by this ID later
   /// \param theAttrType type of the created attribute (received from the type method)
   /// \returns the just created attribute
-  MODEL_EXPORT virtual AttributePtr 
+  MODEL_EXPORT virtual AttributePtr
     addAttribute(const std::string& theID, const std::string theAttrType);
 
   /// Useful method for "set" methods of the attributes: sends an UPDATE event and
@@ -201,7 +201,7 @@ class Model_Data : public ModelAPI_Data
   MODEL_EXPORT virtual const std::set<AttributePtr>& refsToMe() {return myRefsToMe;}
 
   /// returns all references by attributes of this data
-  /// \param theRefs returned list of pairs: 
+  /// \param theRefs returned list of pairs:
   ///                id of referenced attribute and list of referenced objects
   MODEL_EXPORT virtual void referencesToObjects(
     std::list<std::pair<std::string, std::list<ObjectPtr> > >& theRefs);
@@ -253,7 +253,7 @@ private:
   /// \param theFeature feature referenced to this
   /// \param theAttrID identifier of the attribute that is references from theFeature to this
   /// \param theApplyConcealment applies consealment flag changes
-  void addBackReference(FeaturePtr theFeature, std::string theAttrID, 
+  void addBackReference(FeaturePtr theFeature, std::string theAttrID,
     const bool theApplyConcealment = true);
 
   /// Makes the concealment flag up to date for this object-owner.
index a722215158f29d45cdd3423a88d2ba0fc764135a..61331514c539ed8b772b7178ec315ebc1a6f7141 100755 (executable)
@@ -79,7 +79,7 @@ Model_Document::Model_Document(const int theID, const std::string theKind)
   CDF_Session::CurrentSession()->Directory()->Add(myDoc);
 #endif
   myObjs = new Model_Objects(myDoc->Main());
-  myDoc->SetUndoLimit(UNDO_LIMIT);  
+  myDoc->SetUndoLimit(UNDO_LIMIT);
   myTransactionSave = 0;
   myExecuteFeatures = true;
   // to have something in the document and avoid empty doc open/save problem
@@ -101,7 +101,7 @@ static TCollection_ExtendedString DocFileName(const char* theDirName, const std:
 {
   TCollection_ExtendedString aPath((const Standard_CString) theDirName);
   // remove end-separators
-  while(aPath.Length() && 
+  while(aPath.Length() &&
         (aPath.Value(aPath.Length()) == '\\' || aPath.Value(aPath.Length()) == '/'))
     aPath.Remove(aPath.Length());
   aPath += _separator_;
@@ -142,15 +142,15 @@ bool Model_Document::load(const char* theDirName, const char* theFileName, Docum
         Events_InfoMessage("Model_Document", "Can not open document: already opened").send();
         break;
       case PCDM_RS_AlreadyRetrievedAndModified:
-        Events_InfoMessage("Model_Document", 
+        Events_InfoMessage("Model_Document",
             "Can not open document: already opened and modified").send();
         break;
       case PCDM_RS_NoDriver:
-        Events_InfoMessage("Model_Document", 
+        Events_InfoMessage("Model_Document",
                            "Can not open document: driver library is not found").send();
         break;
       case PCDM_RS_UnknownFileDriver:
-        Events_InfoMessage("Model_Document", 
+        Events_InfoMessage("Model_Document",
                            "Can not open document: unknown driver for opening").send();
         break;
       case PCDM_RS_OpenError:
@@ -172,7 +172,7 @@ bool Model_Document::load(const char* theDirName, const char* theFileName, Docum
         Events_InfoMessage("Model_Document", "Can not open document: invalid object").send();
         break;
       case PCDM_RS_UnrecognizedFileFormat:
-        Events_InfoMessage("Model_Document", 
+        Events_InfoMessage("Model_Document",
                            "Can not open document: unrecognized file format").send();
         break;
       case PCDM_RS_MakeFailure:
@@ -189,7 +189,7 @@ bool Model_Document::load(const char* theDirName, const char* theFileName, Docum
         break;
     }
   }
-  std::shared_ptr<Model_Session> aSession = 
+  std::shared_ptr<Model_Session> aSession =
     std::dynamic_pointer_cast<Model_Session>(Model_Session::get());
   if (!isError) {
     myDoc = aLoaded;
@@ -220,7 +220,7 @@ bool Model_Document::load(const char* theDirName, const char* theFileName, Docum
 
   } else { // open failed, but new documnet was created to work with it: inform the model
     aSession->setActiveDocument(Model_Session::get()->moduleDocument(), false);
-  } 
+  }
   return !isError;
 }
 
@@ -243,7 +243,7 @@ bool Model_Document::save(
     aStatus = anApp->SaveAs(myDoc, aPath);
   } catch (Standard_Failure) {
     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
-    Events_InfoMessage("Model_Document", 
+    Events_InfoMessage("Model_Document",
         "Exception in saving of document: %1").arg(aFail->GetMessageString()).send();
     return false;
   }
@@ -251,7 +251,7 @@ bool Model_Document::save(
   if (!isDone) {
     switch (aStatus) {
       case PCDM_SS_DriverFailure:
-        Events_InfoMessage("Model_Document", 
+        Events_InfoMessage("Model_Document",
                            "Can not save document: save driver-library failure").send();
         break;
       case PCDM_SS_WriteFailure:
@@ -286,7 +286,7 @@ bool Model_Document::save(
             aFile.Copy(aDestination);
             theResults.push_back(aDestinationDir.ToCString());
           } else {
-            Events_InfoMessage("Model_Document", 
+            Events_InfoMessage("Model_Document",
               "Can not open file %1 for saving").arg(aSubPath.ToCString()).send();
           }
         }
@@ -343,7 +343,7 @@ void Model_Document::startOperation()
 {
   incrementTransactionID(); // outside of transaction in order to avoid empty transactions keeping
   if (myDoc->HasOpenCommand()) {  // start of nested command
-    if (myDoc->CommitCommand()) { 
+    if (myDoc->CommitCommand()) {
       // commit the current: it will contain all nested after compactification
       myTransactions.rbegin()->myOCAFNum++; // if has open command, the list is not empty
     }
@@ -464,7 +464,7 @@ static bool isEqualContent(Handle(TDF_Attribute) theAttr1, Handle(TDF_Attribute)
   return false;
 }
 
-/// Returns true if the last transaction is actually empty: modification to te same values 
+/// Returns true if the last transaction is actually empty: modification to te same values
 /// were performed only
 static bool isEmptyTransaction(const Handle(TDocStd_Document)& theDoc) {
   Handle(TDF_Delta) aDelta;
@@ -486,7 +486,7 @@ static bool isEmptyTransaction(const Handle(TDocStd_Document)& theDoc) {
           if (isEqualContent(anADelta->Attribute(), aCurrentAttr)) {
             continue; // attribute is not changed actually
           }
-        } else 
+        } else
           if (Standard_GUID::IsEqual(anADelta->Attribute()->ID(), TDataStd_AsciiString::GetID())) {
             continue; // error message is disappeared
         }
@@ -500,17 +500,17 @@ static bool isEmptyTransaction(const Handle(TDocStd_Document)& theDoc) {
 bool Model_Document::finishOperation()
 {
   bool isNestedClosed = !myDoc->HasOpenCommand() && !myNestedNum.empty();
-  static std::shared_ptr<Model_Session> aSession = 
+  static std::shared_ptr<Model_Session> aSession =
     std::static_pointer_cast<Model_Session>(Model_Session::get());
 
-  // open transaction if nested is closed to fit inside 
+  // open transaction if nested is closed to fit inside
   // all synchronizeBackRefs and flushed consequences
   if (isNestedClosed) {
     myDoc->OpenCommand();
   }
   // do it before flashes to enable and recompute nesting features correctly
   if (myNestedNum.empty() || (isNestedClosed && myNestedNum.size() == 1)) {
-    // if all nested operations are closed, make current the higher level objects (to perform 
+    // if all nested operations are closed, make current the higher level objects (to perform
     // it in the python scripts correctly): sketch become current after creation ofsub-elements
     FeaturePtr aCurrent = currentFeature(false);
     CompositeFeaturePtr aMain, aNext = ModelAPI_Tools::compositeOwner(aCurrent);
@@ -532,7 +532,7 @@ bool Model_Document::finishOperation()
     if (myDoc->CommitCommand())
       myTransactions.rbegin()->myOCAFNum++;
   }
-  
+
   // this must be here just after everything is finished but before real transaction stop
   // to avoid messages about modifications outside of the transaction
   // and to rebuild everything after all updates and creates
@@ -555,7 +555,7 @@ bool Model_Document::finishOperation()
       aResult = true;
 
   // transaction may be empty if this document was created during this transaction (create part)
-  if (!myTransactions.empty() && myDoc->CommitCommand()) { 
+  if (!myTransactions.empty() && myDoc->CommitCommand()) {
     // if commit is successfull, just increment counters
     if (isEmptyTransaction(myDoc)) { // erase this transaction
       myDoc->Undo();
@@ -593,7 +593,7 @@ static void modifiedLabels(const Handle(TDocStd_Document)& theDoc, TDF_LabelList
   Handle(TDF_Delta) aDelta;
   if (isRedo)
     aDelta = theDoc->GetRedos().First();
-  else 
+  else
     aDelta = theDoc->GetUndos().Last();
   TDF_LabelList aDeltaList;
   aDelta->Labels(aDeltaList); // it clears list, so, use new one and then append to the result
@@ -603,17 +603,17 @@ static void modifiedLabels(const Handle(TDocStd_Document)& theDoc, TDF_LabelList
   // add also label of the modified attributes
   const TDF_AttributeDeltaList& anAttrs = aDelta->AttributeDeltas();
   /// named shape evolution also modifies integer on this label: exclude it
-  TDF_LabelMap anExcludedInt; 
+  TDF_LabelMap anExcludedInt;
   for (TDF_ListIteratorOfAttributeDeltaList anAttr(anAttrs); anAttr.More(); anAttr.Next()) {
     if (anAttr.Value()->Attribute()->ID() == TDataStd_BooleanArray::GetID()) {
       // Boolean array is used for feature auxiliary attributes only, feature args are not modified
-      continue; 
+      continue;
     }
     if (anAttr.Value()->Attribute()->ID() == TNaming_NamedShape::GetID()) {
       anExcludedInt.Add(anAttr.Value()->Label());
-      // named shape evolution is changed in history update => skip them, 
+      // named shape evolution is changed in history update => skip them,
       // they are not the features arguents
-      continue; 
+      continue;
     }
     if (anAttr.Value()->Attribute()->ID() == TDataStd_Integer::GetID()) {
       if (anExcludedInt.Contains(anAttr.Value()->Label()))
@@ -692,9 +692,9 @@ bool Model_Document::canUndo()
 {
   // issue 406 : if transaction is opened, but nothing to undo behind, can not undo
   int aCurrentNum = isOperation() ? 1 : 0;
-  if (myDoc->GetAvailableUndos() > 0 && 
+  if (myDoc->GetAvailableUndos() > 0 &&
       // there is something to undo in nested
-      (myNestedNum.empty() || *myNestedNum.rbegin() - aCurrentNum > 0) && 
+      (myNestedNum.empty() || *myNestedNum.rbegin() - aCurrentNum > 0) &&
       myTransactions.size() - aCurrentNum > 0 /* for omitting the first useless transaction */)
     return true;
   // check other subs contains operation that can be undoed
@@ -825,7 +825,7 @@ void Model_Document::operationId(const std::string& theId)
 
 FeaturePtr Model_Document::addFeature(std::string theID, const bool theMakeCurrent)
 {
-  std::shared_ptr<Model_Session> aSession = 
+  std::shared_ptr<Model_Session> aSession =
     std::dynamic_pointer_cast<Model_Session>(ModelAPI_Session::get());
   FeaturePtr aFeature = aSession->createFeature(theID, this);
   if (!aFeature)
@@ -847,7 +847,7 @@ FeaturePtr Model_Document::addFeature(std::string theID, const bool theMakeCurre
     FeaturePtr aCurrent = aDocToAdd->currentFeature(false);
     bool isModified = true;
     for(CompositeFeaturePtr aComp = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aCurrent);
-        aComp.get() && isModified; 
+        aComp.get() && isModified;
         aComp = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aCurrent)) {
       isModified =  false;
       int aSubs = aComp->numberOfSubs(false);
@@ -901,9 +901,9 @@ void Model_Document::moveFeature(FeaturePtr theMoved, FeaturePtr theAfterThis)
   if (aCurrentUp) {
     setCurrentFeatureUp();
   }
-  // if user adds after high-level feature with nested, 
+  // if user adds after high-level feature with nested,
   // add it after all nested (otherwise the nested will be disabled)
-  CompositeFeaturePtr aCompositeAfter = 
+  CompositeFeaturePtr aCompositeAfter =
     std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(theAfterThis);
   if (aCompositeAfter.get()) {
     FeaturePtr aSub = aCompositeAfter;
@@ -1023,9 +1023,9 @@ void Model_Document::setCurrentFeature(
     }
   }
 
-  if (theVisible && !theCurrent.get()) { 
+  if (theVisible && !theCurrent.get()) {
     // needed to avoid disabling of PartSet initial constructions
-    FeaturePtr aNext = 
+    FeaturePtr aNext =
       theCurrent.get() ? myObjs->nextFeature(theCurrent) : myObjs->firstFeature();
     for (; aNext.get(); aNext = myObjs->nextFeature(theCurrent)) {
       if (aNext->isInHistory()) {
@@ -1068,7 +1068,7 @@ void Model_Document::setCurrentFeature(
     if (aMain.get()) {
       if (isSub(aMain, anIter)) // sub-elements of not-disabled feature are not disabled
         aDisabledFlag = false;
-      else if (anOwners.find(anIter) != anOwners.end()) 
+      else if (anOwners.find(anIter) != anOwners.end())
         // disable the higher-level feature is the nested is the current
         aDisabledFlag = true;
     }
@@ -1078,7 +1078,7 @@ void Model_Document::setCurrentFeature(
       // due to the issue 1491 all parameters are kept enabled any time
       //if (!isCurrentParameter)
         aDisabledFlag = false;
-    } else if (isCurrentParameter) { 
+    } else if (isCurrentParameter) {
       // if paramater is active, all other features become enabled (issue 1307)
       aDisabledFlag = false;
     }
@@ -1086,8 +1086,8 @@ void Model_Document::setCurrentFeature(
     if (anIter->setDisabled(aDisabledFlag)) {
       static Events_ID anUpdateEvent = aLoop->eventByName(EVENT_OBJECT_UPDATED);
       // state of feature is changed => so inform that it must be updated if it has such state
-      if (!aDisabledFlag && 
-          (anIter->data()->execState() == ModelAPI_StateMustBeUpdated || 
+      if (!aDisabledFlag &&
+          (anIter->data()->execState() == ModelAPI_StateMustBeUpdated ||
            anIter->data()->execState() == ModelAPI_StateInvalidArgument))
         ModelAPI_EventCreator::get()->sendUpdated(anIter, anUpdateEvent);
       // flush is in the end of this method
@@ -1116,7 +1116,7 @@ void Model_Document::setCurrentFeature(
 
 void Model_Document::setCurrentFeatureUp()
 {
-  // on remove just go up for minimum step: highlight external objects in sketch causes 
+  // on remove just go up for minimum step: highlight external objects in sketch causes
   // problems if it is true: here and in "setCurrentFeature"
   FeaturePtr aCurrent = currentFeature(false);
   if (aCurrent.get()) { // if not, do nothing because null is the upper
@@ -1124,9 +1124,9 @@ void Model_Document::setCurrentFeatureUp()
     // make the higher level composite as current (sketch becomes disabled if line is enabled)
     if (aPrev.get()) {
       FeaturePtr aComp = ModelAPI_Tools::compositeOwner(aPrev);
-      // without cycle (issue 1555): otherwise extrusion fuse 
+      // without cycle (issue 1555): otherwise extrusion fuse
       // will be enabled and displayed whaen inside sketch
-      if (aComp.get()) 
+      if (aComp.get())
           aPrev = aComp;
     }
     // do not flush: it is called only on remove, it will be flushed in the end of transaction
@@ -1322,12 +1322,12 @@ std::shared_ptr<ModelAPI_Feature> Model_Document::featureById(const int theId)
 
 void Model_Document::synchronizeTransactions()
 {
-  Model_Document* aRoot = 
+  Model_Document* aRoot =
     std::dynamic_pointer_cast<Model_Document>(ModelAPI_Session::get()->moduleDocument()).get();
   if (aRoot == this)
     return; // don't need to synchronise root with root
 
-  std::shared_ptr<Model_Session> aSession = 
+  std::shared_ptr<Model_Session> aSession =
     std::dynamic_pointer_cast<Model_Session>(Model_Session::get());
   while(myRedos.size() > aRoot->myRedos.size()) { // remove redos in this
     aSession->setCheckTransactions(false);
@@ -1367,7 +1367,7 @@ AttributeSelectionListPtr Model_Document::selectionInPartFeature()
   if (!mySelectionFeature.get() || !mySelectionFeature->data()->isValid()) {
     // create a new one
     mySelectionFeature = FeaturePtr(new Model_SelectionInPartFeature);
-  
+
     TDF_Label aFeatureLab = generalLabel().FindChild(TAG_SELECTION_FEATURE);
     std::shared_ptr<Model_Data> aData(new Model_Data);
     aData->setLabel(aFeatureLab.FindChild(1));
@@ -1405,7 +1405,7 @@ static Handle(TNaming_NamedShape) searchForOriginalShape(TopoDS_Shape theShape,
       Handle(TNaming_NamedShape) aNS;
       if (aNSLab.FindAttribute(TNaming_NamedShape::GetID(), aNS)) {
         for(TNaming_Iterator aShapesIter(aNS); aShapesIter.More(); aShapesIter.Next()) {
-          if (aShapesIter.Evolution() == TNaming_SELECTED || 
+          if (aShapesIter.Evolution() == TNaming_SELECTED ||
               aShapesIter.Evolution() == TNaming_DELETE)
             continue; // don't use the selection evolution
           if (aShapesIter.NewShape().IsSame(aShape)) { // found the original shape
@@ -1413,7 +1413,7 @@ static Handle(TNaming_NamedShape) searchForOriginalShape(TopoDS_Shape theShape,
             if (aResult->Evolution() == TNaming_MODIFY)
               theShape = aShapesIter.OldShape();
             // otherwise may me searching for another item of this shape with longer history
-            if (!theShape.IsNull()) 
+            if (!theShape.IsNull())
               break;
           }
         }
@@ -1472,7 +1472,7 @@ std::shared_ptr<ModelAPI_Feature> Model_Document::producedByFeature(
         if (aCandidatInThis->Evolution() == TNaming_MODIFY)
           anOldShape = aShapesIter.OldShape();
         // otherwise may me searching for another item of this shape with longer history
-        if (!anOldShape.IsNull()) 
+        if (!anOldShape.IsNull())
           break;
       }
       // check that the shape contains aShape as sub-shape to fill container
@@ -1496,7 +1496,7 @@ std::shared_ptr<ModelAPI_Feature> Model_Document::producedByFeature(
     }
   }
   if (aCandidatInThis.IsNull()) {
-    // to fix 1512: searching for original shape of this shape 
+    // to fix 1512: searching for original shape of this shape
     // if modification of it is not in this result
     aCandidatInThis = searchForOriginalShape(aShape, myDoc->Main());
     if (aCandidatInThis.IsNull()) {
index 5cedc56a3da01a7de798b504029ef7fbf6d615b5..0fe3b29888a770b0a253bc6d402f648dd98419df 100644 (file)
@@ -52,7 +52,7 @@ class Model_Document : public ModelAPI_Document
     const char* theDirName, const char* theFileName, std::list<std::string>& theResults);
 
   //! Removes document data
-  //! \param theForever if it is false, document is just hiden 
+  //! \param theForever if it is false, document is just hiden
   //!                   (to keep possibility make it back on Undo/Redo)
   MODEL_EXPORT virtual void close(const bool theForever = false);
 
@@ -61,7 +61,7 @@ class Model_Document : public ModelAPI_Document
   //! Finishes the previously started operation (closes the transaction)
   //! \returns true if transaction in this document is not empty and really was performed
   MODEL_EXPORT virtual bool finishOperation();
-  //! Aborts the operation 
+  //! Aborts the operation
   MODEL_EXPORT virtual void abortOperation();
   //! Returns true if operation has been started, but not yet finished or aborted
   MODEL_EXPORT virtual bool isOperation() const;
@@ -150,7 +150,7 @@ class Model_Document : public ModelAPI_Document
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Feature> internalFeature(const int theIndex);
   //! Performs synchronization of transactions with the module document:
   //! If some document is not active (by undo of activation) but in memory,
-  //! on activation the transactions must be synchronised because all redos performed 
+  //! on activation the transactions must be synchronised because all redos performed
   //! wihtout this participation
   MODEL_EXPORT virtual void synchronizeTransactions();
 
@@ -273,7 +273,7 @@ class Model_Document : public ModelAPI_Document
   //! Returns true if this document is currently active
   virtual bool isActive() const;
 
-  //! Returns the selection attribute that is used 
+  //! Returns the selection attribute that is used
   //! for calculation of selection externally from the document
   std::shared_ptr<ModelAPI_AttributeSelectionList> selectionInPartFeature();
 
index 34d9522d86c42182630f13c92a9a121754a634d8..3a060d43f01fac344c320019bf1acb6543e0bf5e 100644 (file)
@@ -63,7 +63,7 @@ std::shared_ptr<Events_MessageGroup> Model_ObjectUpdatedMessage::newEmpty()
 
 void Model_ObjectUpdatedMessage::Join(const std::shared_ptr<Events_MessageGroup>& theJoined)
 {
-  std::shared_ptr<Model_ObjectUpdatedMessage> aJoined = 
+  std::shared_ptr<Model_ObjectUpdatedMessage> aJoined =
     std::dynamic_pointer_cast<Model_ObjectUpdatedMessage>(theJoined);
   std::set<ObjectPtr>::iterator aFIter = aJoined->myObjects.begin();
   for (; aFIter != aJoined->myObjects.end(); aFIter++) {
@@ -94,7 +94,7 @@ const Events_ID Model_ObjectDeletedMessage::messageId()
 
 void Model_ObjectDeletedMessage::Join(const std::shared_ptr<Events_MessageGroup>& theJoined)
 {
-  std::shared_ptr<Model_ObjectDeletedMessage> aJoined = 
+  std::shared_ptr<Model_ObjectDeletedMessage> aJoined =
     std::dynamic_pointer_cast<Model_ObjectDeletedMessage>(theJoined);
   std::set<std::string>::iterator aGIter = aJoined->myGroups.begin();
   for (; aGIter != aJoined->myGroups.end(); aGIter++) {
index 3a1d62ab25642c774dab95588c636644c3a99d8d..f2f348243f58a975449e063b42c28dbf55b35793 100644 (file)
@@ -42,7 +42,7 @@ void Model_Expression::setText(const std::string& theValue)
   setError(text().empty() ? "" : "Not a double value.");
 }
 
-std::string Model_Expression::text() const 
+std::string Model_Expression::text() const
 {
   return TCollection_AsciiString(myText->Get()).ToCString();
 }
index c8a204e29db52dda1f1d4f613b37392c24bd87e8..eab3761b1afae4cef4db4961a51dabcb45d103bf 100644 (file)
@@ -22,11 +22,11 @@ bool Model_FeatureValidator::isValid(const std::shared_ptr<ModelAPI_Feature>& th
                                      const std::list<std::string>& theArguments,
                                      Events_InfoMessage& theError) const
 {
-  static Model_ValidatorsFactory* aValidators = 
+  static Model_ValidatorsFactory* aValidators =
     static_cast<Model_ValidatorsFactory*>(ModelAPI_Session::get()->validators());
 
   std::shared_ptr<ModelAPI_Data> aData = theFeature->data();
-  // "Action" features has no data, but still valid. e.g "Remove Part"  
+  // "Action" features has no data, but still valid. e.g "Remove Part"
   if (!aData->isValid()) {
     if (!theFeature->isAction())
       theError = "There is no data.";
@@ -40,7 +40,7 @@ bool Model_FeatureValidator::isValid(const std::shared_ptr<ModelAPI_Feature>& th
     if (!aValidators->isCase(theFeature, anAttr->id()))
       continue; // this attribute is not participated in the current case
     if (!anAttr->isInitialized()) { // attribute is not initialized
-      std::map<std::string, std::set<std::string> >::const_iterator aFeatureFind = 
+      std::map<std::string, std::set<std::string> >::const_iterator aFeatureFind =
         myNotObligatory.find(theFeature->getKind());
       if (aFeatureFind == myNotObligatory.end() || // and it is obligatory for filling
           aFeatureFind->second.find(*it) == aFeatureFind->second.end()) {
index 1f14f1e00257aa31abe820f755e08b4f7bb661a0..715bc6896794871c6d61e8b00568d637303eb65a 100644 (file)
@@ -126,7 +126,7 @@ void Model_Objects::addFeature(FeaturePtr theFeature, const FeaturePtr theAfterT
     // in initData it creates new features, appeared later than this
     TDF_Label aPrevFeateureLab;
     if (theAfterThis.get()) { // searching for the previous feature label
-      std::shared_ptr<Model_Data> aPrevData = 
+      std::shared_ptr<Model_Data> aPrevData =
         std::dynamic_pointer_cast<Model_Data>(theAfterThis->data());
       if (aPrevData.get()) {
         aPrevFeateureLab = aPrevData->label().Father();
@@ -161,7 +161,7 @@ void Model_Objects::addFeature(FeaturePtr theFeature, const FeaturePtr theAfterT
 /// Appends to the array of references a new referenced label.
 /// If theIndex is not -1, removes element at this index, not theReferenced.
 /// \returns the index of removed element
-static int RemoveFromRefArray(TDF_Label theArrayLab, TDF_Label theReferenced, 
+static int RemoveFromRefArray(TDF_Label theArrayLab, TDF_Label theReferenced,
   const int theIndex = -1)
 {
   int aResult = -1;  // no returned
@@ -200,7 +200,7 @@ void Model_Objects::refsToFeature(FeaturePtr theFeature,
   std::list<ResultPtr>::const_iterator aResIter = aResults.cbegin();
   for (; aResIter != aResults.cend(); aResIter++) {
     ResultPtr aResult = (*aResIter);
-    std::shared_ptr<Model_Data> aData = 
+    std::shared_ptr<Model_Data> aData =
         std::dynamic_pointer_cast<Model_Data>(aResult->data());
     if (aData.get() != NULL) {
       const std::set<AttributePtr>& aRefs = aData->refsToMe();
@@ -213,7 +213,7 @@ void Model_Objects::refsToFeature(FeaturePtr theFeature,
     }
   }
   // the dependencies can be in the feature itself
-  std::shared_ptr<Model_Data> aData = 
+  std::shared_ptr<Model_Data> aData =
       std::dynamic_pointer_cast<Model_Data>(theFeature->data());
   if (aData.get() && !aData->refsToMe().empty()) {
     const std::set<AttributePtr>& aRefs = aData->refsToMe();
@@ -226,7 +226,7 @@ void Model_Objects::refsToFeature(FeaturePtr theFeature,
   }
 
   if (!theRefs.empty() && isSendError) {
-    Events_InfoMessage("Model_Objects", 
+    Events_InfoMessage("Model_Objects",
       "Feature '%1' is used and can not be deleted").arg(theFeature->data()->name()).send();
   }
 }
@@ -240,7 +240,7 @@ void Model_Objects::removeFeature(FeaturePtr theFeature)
     refsToFeature(theFeature, aRefs, false);
     std::set<std::shared_ptr<ModelAPI_Feature> >::iterator aRefIter = aRefs.begin();
     for(; aRefIter != aRefs.end(); aRefIter++) {
-      std::shared_ptr<ModelAPI_CompositeFeature> aComposite = 
+      std::shared_ptr<ModelAPI_CompositeFeature> aComposite =
         std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(*aRefIter);
       if (aComposite.get() && aComposite->isSub(theFeature)) {
         aComposite->removeFeature(theFeature);
@@ -275,12 +275,12 @@ void Model_Objects::moveFeature(FeaturePtr theMoved, FeaturePtr theAfterThis)
   Handle(TDataStd_ReferenceArray) aRefs;
   if (!aFeaturesLab.FindAttribute(TDataStd_ReferenceArray::GetID(), aRefs))
     return;
-  TDF_Label anAfterLab, aMovedLab = 
+  TDF_Label anAfterLab, aMovedLab =
     std::dynamic_pointer_cast<Model_Data>(theMoved->data())->label().Father();
   if (theAfterThis.get())
     anAfterLab = std::dynamic_pointer_cast<Model_Data>(theAfterThis->data())->label().Father();
 
-  Handle(TDataStd_HLabelArray1) aNewArray = 
+  Handle(TDataStd_HLabelArray1) aNewArray =
     new TDataStd_HLabelArray1(aRefs->Lower(), aRefs->Upper());
   int aPassedMovedFrom = 0; // the prev feature location is found and passed
   int aPassedMovedTo = 0; // the feature is added and this location is passed
@@ -332,7 +332,7 @@ void Model_Objects::clearHistory(ObjectPtr theObj)
       FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theObj);
       std::string aResultGroup = featureResultGroup(aFeature);
       if (!aResultGroup.empty()) {
-        std::map<std::string, std::vector<ObjectPtr> >::iterator aHIter = 
+        std::map<std::string, std::vector<ObjectPtr> >::iterator aHIter =
           myHistory.find(aResultGroup);
         if (aHIter != myHistory.end())
           myHistory.erase(aHIter); // erase from map => this means that it is not synchronized
@@ -353,7 +353,7 @@ void Model_Objects::createHistory(const std::string& theGroupID)
       for(int a = aRefs->Lower(); a <= aRefs->Upper(); a++) {
         FeaturePtr aFeature = feature(aRefs->Value(a));
         if (aFeature.get()) {
-          // if feature is in sub-component, remove it from history: 
+          // if feature is in sub-component, remove it from history:
           // it is in sub-tree of sub-component
           bool isSub = ModelAPI_Tools::compositeOwner(aFeature).get() != NULL;
           if (isFeature) { // here may be also disabled features
@@ -365,7 +365,7 @@ void Model_Objects::createHistory(const std::string& theGroupID)
             if (!isSub || theGroupID != ModelAPI_ResultConstruction::group()) {
               // do not use reference to the list here since results can be changed by "isConcealed"
               const std::list<std::shared_ptr<ModelAPI_Result> > aResults = aFeature->results();
-              std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator 
+              std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator
                 aRIter = aResults.begin();
               for (; aRIter != aResults.cend(); aRIter++) {
                 ResultPtr aRes = *aRIter;
@@ -476,7 +476,7 @@ std::shared_ptr<ModelAPI_Object> Model_Objects::objectByName(
         if (aRIter->get() && (*aRIter)->groupName() == theGroupID) {
           if ((*aRIter)->data()->name() == theName)
             return *aRIter;
-          ResultCompSolidPtr aCompRes = 
+          ResultCompSolidPtr aCompRes =
             std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(*aRIter);
           if (aCompRes.get()) {
             int aNumSubs = aCompRes->numberOfSubs();
@@ -610,7 +610,7 @@ std::shared_ptr<ModelAPI_Feature> Model_Objects::featureById(const int theId)
 }
 
 void Model_Objects::synchronizeFeatures(
-  const TDF_LabelList& theUpdated, const bool theUpdateReferences, 
+  const TDF_LabelList& theUpdated, const bool theUpdateReferences,
   const bool theOpen, const bool theFlush)
 {
   Model_Document* anOwner = std::dynamic_pointer_cast<Model_Document>(myDoc).get();
@@ -648,7 +648,7 @@ void Model_Objects::synchronizeFeatures(
       aFeature = std::dynamic_pointer_cast<Model_Session>(ModelAPI_Session::get())->createFeature(
         TCollection_AsciiString(Handle(TDataStd_Comment)::DownCast(aLabIter.Value())->Get())
         .ToCString(), anOwner);
-      if (!aFeature.get()) {  
+      if (!aFeature.get()) {
         // somethig is wrong, most probably, the opened document has invalid structure
         Events_InfoMessage("Model_Objects", "Invalid type of object in the document").send();
         aLabIter.Value()->Label().ForgetAllAttributes();
@@ -668,7 +668,7 @@ void Model_Objects::synchronizeFeatures(
       aKeptFeatures.insert(aFeature);
       if (anUpdatedMap.Contains(aFeatureLabel)) {
         if (!theOpen) { // on abort/undo/redo reinitialize attributes is something is changed
-          std::list<std::shared_ptr<ModelAPI_Attribute> > anAttrs = 
+          std::list<std::shared_ptr<ModelAPI_Attribute> > anAttrs =
             aFeature->data()->attributes("");
           std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
           for(; anAttr != anAttrs.end(); anAttr++)
@@ -706,7 +706,7 @@ void Model_Objects::synchronizeFeatures(
         updateHistory(aFeature);
         aFeature->erase();
 
-        // unbind after the "erase" call: on abort sketch 
+        // unbind after the "erase" call: on abort sketch
         // is removes sub-objects that corrupts aFIter
         myFeatures.UnBind(aFIter.Key());
         // reinitialize iterator because unbind may corrupt the previous order in the map
@@ -718,9 +718,9 @@ void Model_Objects::synchronizeFeatures(
   if (theUpdateReferences) {
     synchronizeBackRefs();
   }
-  // update results of the features (after features created because 
+  // update results of the features (after features created because
   // they may be connected, like sketch and sub elements)
-  // After synchronisation of back references because sketch 
+  // After synchronisation of back references because sketch
   // must be set in sub-elements before "execute" by updateResults
   std::list<FeaturePtr> aComposites; // composites must be updated after their subs (issue 360)
   TDF_ChildIDIterator aLabIter2(featuresLabel(), TDataStd_Comment::GetID());
@@ -739,7 +739,7 @@ void Model_Objects::synchronizeFeatures(
     updateResults(*aComposite);
   }
 
-  // the synchronize should be done after updateResults 
+  // the synchronize should be done after updateResults
   // in order to correct back references of updated results
   if (theUpdateReferences) {
     synchronizeBackRefs();
@@ -756,7 +756,7 @@ void Model_Objects::synchronizeFeatures(
   if (theFlush) {
     aLoop->flush(aDeleteEvent);
     // delete should be emitted before create to reacts to aborted feature
-    aLoop->flush(aCreateEvent); 
+    aLoop->flush(aCreateEvent);
     aLoop->flush(anUpdateEvent);
     aLoop->flush(aCreateEvent); // after update of features, there could be results created
     aLoop->flush(aDeleteEvent); // or deleted
@@ -769,7 +769,7 @@ void Model_Objects::synchronizeFeatures(
 
 /// synchronises back references for the given object basing on the collected data
 void Model_Objects::synchronizeBackRefsForObject(const std::set<AttributePtr>& theNewRefs,
-  ObjectPtr theObject) 
+  ObjectPtr theObject)
 {
   if (!theObject.get() || !theObject->data()->isValid())
     return; // invalid
@@ -786,9 +786,9 @@ void Model_Objects::synchronizeBackRefsForObject(const std::set<AttributePtr>& t
     std::set<AttributePtr>::iterator aCurrentIter = aData->refsToMe().begin();
     while(aCurrentIter != aData->refsToMe().end()) {
       if (theNewRefs.find(*aCurrentIter) == theNewRefs.end()) {
-        // for external references from other documents this system 
+        // for external references from other documents this system
         // is not working: refs are collected from
-        // different Model_Objects, so before remove check this 
+        // different Model_Objects, so before remove check this
         // external object exists and still referenced
         bool aLeaveIt = false;
         if ((*aCurrentIter)->owner().get() && (*aCurrentIter)->owner()->document() != myDoc &&
@@ -883,7 +883,7 @@ void Model_Objects::synchronizeBackRefs()
       (*aRIter)->isConcealed();
     }
   }
-  // the rest all refs means that feature references to the external document feature: 
+  // the rest all refs means that feature references to the external document feature:
   // process also them
   std::map<ObjectPtr, std::set<AttributePtr> >::iterator anExtIter = allRefs.begin();
   for(; anExtIter != allRefs.end(); anExtIter++) {
@@ -892,9 +892,9 @@ void Model_Objects::synchronizeBackRefs()
 }
 
 TDF_Label Model_Objects::resultLabel(
-  const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theResultIndex) 
+  const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theResultIndex)
 {
-  const std::shared_ptr<Model_Data>& aData = 
+  const std::shared_ptr<Model_Data>& aData =
     std::dynamic_pointer_cast<Model_Data>(theFeatureData);
   return aData->label().Father().FindChild(TAG_FEATURE_RESULTS).FindChild(theResultIndex + 1);
 }
@@ -906,11 +906,11 @@ void Model_Objects::storeResult(std::shared_ptr<ModelAPI_Data> theFeatureData,
   theResult->init();
   theResult->setDoc(myDoc);
   initData(theResult, resultLabel(theFeatureData, theResultIndex), TAG_FEATURE_ARGUMENTS);
-  if (theResult->data()->name().empty()) {  
+  if (theResult->data()->name().empty()) {
     // if was not initialized, generate event and set a name
     std::stringstream aNewName;
     aNewName<<theFeatureData->name();
-    // if there are several results (issue #899: any number of result), 
+    // if there are several results (issue #899: any number of result),
     // add unique prefix starting from second
     if (theResultIndex > 0 || theResult->groupName() == ModelAPI_ResultBody::group())
       aNewName<<"_"<<theResultIndex + 1;
@@ -939,7 +939,7 @@ std::shared_ptr<ModelAPI_ResultBody> Model_Objects::createBody(
     const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex)
 {
   TDF_Label aLab = resultLabel(theFeatureData, theIndex);
-  // for feature create compsolid, but for result sub create body: 
+  // for feature create compsolid, but for result sub create body:
   // only one level of recursion is supported now
   ResultPtr aResultOwner = std::dynamic_pointer_cast<ModelAPI_Result>(theFeatureData->owner());
   ObjectPtr anOldObject;
@@ -1067,7 +1067,7 @@ void Model_Objects::updateResults(FeaturePtr theFeature)
     ResultPtr aBody = std::dynamic_pointer_cast<ModelAPI_Result>(*aResIter);
     if (aBody.get()) {
       std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(aBody->data());
-      if (!aData.get() || !aData->isValid() || (!aBody->isDisabled() && aData->isDeleted())) { 
+      if (!aData.get() || !aData->isValid() || (!aBody->isDisabled() && aData->isDeleted())) {
         // found a disappeared result => remove it
         theFeature->eraseResultFromList(aBody);
         // start iterate from beginning because iterator is corrupted by removing
@@ -1091,15 +1091,15 @@ void Model_Objects::updateResults(FeaturePtr theFeature)
       TDF_Label anArgLab = aLabIter.Value();
       Handle(TDataStd_Comment) aGroup;
       if (anArgLab.FindAttribute(TDataStd_Comment::GetID(), aGroup)) {
-        if (aGroup->Get() == ModelAPI_ResultBody::group().c_str() || 
+        if (aGroup->Get() == ModelAPI_ResultBody::group().c_str() ||
             aGroup->Get() == ModelAPI_ResultCompSolid::group().c_str()) {
           aNewBody = createBody(theFeature->data(), aResIndex);
         } else if (aGroup->Get() == ModelAPI_ResultPart::group().c_str()) {
-          std::shared_ptr<ModelAPI_ResultPart> aNewP = createPart(theFeature->data(), aResIndex); 
+          std::shared_ptr<ModelAPI_ResultPart> aNewP = createPart(theFeature->data(), aResIndex);
           theFeature->setResult(aNewP, aResIndex);
           if (!aNewP->partDoc().get())
             // create the part result: it is better to restore the previous result if it is possible
-            theFeature->execute(); 
+            theFeature->execute();
           break;
         } else if (aGroup->Get() == ModelAPI_ResultConstruction::group().c_str()) {
           theFeature->execute(); // construction shapes are needed for sketch solver
index 86cf46e34cf0e8f495dfbc69f8e226d0970d0cfd..23ae72453252cbcd35df21c2aae225fd35f317d2 100644 (file)
@@ -36,7 +36,7 @@ class Model_Objects
  public:
   //! Registers the fieature in the data structure
   //! \param theFeature feature that must be added to the data structure
-  //! \param theAfterThis the feature will be added after this feature; 
+  //! \param theAfterThis the feature will be added after this feature;
   //!        if it is null, the added feature will be the first
   void addFeature(FeaturePtr theFeature, const FeaturePtr theAfterThis);
 
@@ -87,7 +87,7 @@ class Model_Objects
   //! Returns the number of features in the group
   int size(const std::string& theGroupID);
 
-  //! Returns all (and disabled) results of the given type. 
+  //! Returns all (and disabled) results of the given type.
   //! Not fast method (iterates all features).
   void allResults(const std::string& theGroupID, std::list<ResultPtr>& theResults);
 
@@ -138,7 +138,7 @@ class Model_Objects
   //! Returns (creates if needed) the features label
   TDF_Label featuresLabel() const;
 
-  //! Initializes feature with a unique name in this group (unique name is generated as 
+  //! Initializes feature with a unique name in this group (unique name is generated as
   //! feature type + "_" + index
   void setUniqueName(FeaturePtr theFeature);
 
@@ -158,7 +158,7 @@ class Model_Objects
   //! Initializes the data fields of the feature
   void initData(ObjectPtr theObj, TDF_Label theLab, const int theTag);
 
-  //! Allows to store the result in the data tree of the document 
+  //! Allows to store the result in the data tree of the document
   //! (attaches 'data' of result to tree)
   void storeResult(std::shared_ptr<ModelAPI_Data> theFeatureData,
                    std::shared_ptr<ModelAPI_Result> theResult,
@@ -194,7 +194,7 @@ class Model_Objects
   /// Returns true if theLater is in history of features creation later than theCurrent
   bool isLater(FeaturePtr theLater, FeaturePtr theCurrent) const;
 
-  /// Returns the result group identifier of the given feature (for this at least one result must 
+  /// Returns the result group identifier of the given feature (for this at least one result must
   /// be created before)
   std::string featureResultGroup(FeaturePtr theFeature);
 
index 80bce61ab64f34182544043f4b18c45e0ef3132e..0cd0fd5d2a472092f02532c07451c2bb6349b5cb 100644 (file)
@@ -63,7 +63,7 @@ bool Model_ResultBody::isConcealed()
     if (aResult) { // hidden unit must be redisplayed (hidden)
       ModelAPI_EventCreator::get()->sendDeleted(document(), this->groupName());
       // redisplay for the viewer (it must be disappeared also)
-      static Events_ID EVENT_DISP = 
+      static Events_ID EVENT_DISP =
         Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
       ModelAPI_EventCreator::get()->sendUpdated(data()->owner(), EVENT_DISP);
     } else { // was not concealed become concealed => delete event
index e0ae333671812a38b5535a93aca20fb3113e9099..1cc546efb91b8d4e989d7ce963cd85dc9ea842da 100644 (file)
@@ -25,7 +25,7 @@
  */
 class Model_ResultBody : public ModelAPI_ResultBody
 {
-  /// builders that tores the naming history: one per label to allow store several shapes to one 
+  /// builders that tores the naming history: one per label to allow store several shapes to one
   /// label; index in vector corresponds to the label tag
   //std::vector<TNaming_Builder*> myBuilders;
 
index 687b0ea087c94c4c73b15f4ccab4067a6210a473..aa771929e56c3b4bab2fc043041ebca8a906c87d 100755 (executable)
@@ -79,13 +79,13 @@ void Model_ResultCompSolid::colorConfigInfo(std::string& theSection, std::string
   theDefault = DEFAULT_COLOR();
 }
 
-bool Model_ResultCompSolid::setDisabled(std::shared_ptr<ModelAPI_Result> theThis, 
+bool Model_ResultCompSolid::setDisabled(std::shared_ptr<ModelAPI_Result> theThis,
                                         const bool theFlag)
 {
   bool aChanged = ModelAPI_ResultBody::setDisabled(theThis, theFlag);
   if (aChanged) { // state is changed, so modifications are needed
     myBuilder->evolutionToSelection(theFlag);
-    updateSubs(shape()); // to set disabled/enabled 
+    updateSubs(shape()); // to set disabled/enabled
   }
   return aChanged;
 }
@@ -113,7 +113,7 @@ bool Model_ResultCompSolid::isConcealed()
         if (aResult) { // hidden unit must be redisplayed (hidden)
           ModelAPI_EventCreator::get()->sendDeleted(document(), (*aSubIter)->groupName());
           // redisplay for the viewer (it must be disappeared also)
-          static Events_ID EVENT_DISP = 
+          static Events_ID EVENT_DISP =
             Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
           ModelAPI_EventCreator::get()->sendUpdated(*aSubIter, EVENT_DISP);
         } else { // was not concealed become concealed => delete event
@@ -135,7 +135,7 @@ void Model_ResultCompSolid::setIsConcealed(const bool theValue)
         if (theValue) { // hidden unit must be redisplayed (hidden)
           ModelAPI_EventCreator::get()->sendDeleted(document(), (*aSubIter)->groupName());
           // redisplay for the viewer (it must be disappeared also)
-          static Events_ID EVENT_DISP = 
+          static Events_ID EVENT_DISP =
             Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
           ModelAPI_EventCreator::get()->sendUpdated(*aSubIter, EVENT_DISP);
         } else { // was not concealed become concealed => delete event
index c1fea070837f1854f1be7aeb0b692dd846724ebb..d48fd305bce7b7df2f7fb8829923f3f91b1ebd01 100644 (file)
@@ -53,7 +53,7 @@ void Model_ResultConstruction::setIsInHistory(const bool isInHistory)
 int Model_ResultConstruction::facesNum()
 {
   if (!myFacesUpToDate) {
-    std::shared_ptr<GeomAPI_PlanarEdges> aWirePtr = 
+    std::shared_ptr<GeomAPI_PlanarEdges> aWirePtr =
       std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(myShape);
     if (aWirePtr.get()) {
       std::list<std::shared_ptr<GeomAPI_Shape> > aFaces;
index 0a4422ad125769af3799c094179083b46d3bb313..74e2b22a19b74419e14c219b339ebe9bcf86744b 100644 (file)
@@ -65,11 +65,11 @@ void Model_ResultPart::activate()
   }
 
   std::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->document(DOC_REF());
-  
+
   // activation may cause changes in current features in document, so it must be in transaction
   bool isNewTransaction = false;
   SessionPtr aMgr = ModelAPI_Session::get();
-  if (!aMgr->isOperation()) { 
+  if (!aMgr->isOperation()) {
     // open transaction even document is not created to set current docs in setActiveDocument
     aMgr->startOperation("Activation");
     isNewTransaction = true;
@@ -103,7 +103,7 @@ std::shared_ptr<ModelAPI_ResultPart> Model_ResultPart::original()
   return std::dynamic_pointer_cast<ModelAPI_ResultPart>(data()->owner());
 }
 
-bool Model_ResultPart::isActivated() 
+bool Model_ResultPart::isActivated()
 {
   if (myTrsf.get()) {
     if (!baseRef().get()) // may be on close
@@ -244,7 +244,7 @@ std::string Model_ResultPart::nameInPart(const std::shared_ptr<GeomAPI_Shape>& t
   if (!aDoc.get()) // the part document is not presented for the moment
     return "";
   TDF_Label anAccessLabel = aDoc->generalLabel();
-  // make the selection attribute anyway: 
+  // make the selection attribute anyway:
   // otherwise just by name it is not stable to search the result
   std::string aName;
   // for this the context result is needed
@@ -356,7 +356,7 @@ void Model_ResultPart::updateShape()
   myTrsf.reset();
 }
 
-void Model_ResultPart::setTrsf(std::shared_ptr<ModelAPI_Result> theThis, 
+void Model_ResultPart::setTrsf(std::shared_ptr<ModelAPI_Result> theThis,
     const std::shared_ptr<GeomAPI_Trsf>& theTransformation)
 {
   updateShape();
index fabaacab51ce19723b9c62fe02111dde046bc17b..6657705d56cf2c9567d3e7c75b1efcaa683d188f 100644 (file)
@@ -22,9 +22,9 @@
 class Model_ResultPart : public ModelAPI_ResultPart
 {
   /// shape of this part created from bodies (updated only of Part deactivation)
-  TopoDS_Shape myShape; 
+  TopoDS_Shape myShape;
   /// if it is just copy of original shape, keep just transformation
-  std::shared_ptr<gp_Trsf> myTrsf; 
+  std::shared_ptr<gp_Trsf> myTrsf;
  public:
 
   /// the reference to the base result document, may be null if this is the root,
@@ -39,7 +39,7 @@ class Model_ResultPart : public ModelAPI_ResultPart
   /// Returns the part-document of this result
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Document> partDoc();
 
-  /// Returns the original part result: for transfomration features results this is 
+  /// Returns the original part result: for transfomration features results this is
   /// the original Part feature result
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_ResultPart> original();
 
@@ -68,7 +68,7 @@ class Model_ResultPart : public ModelAPI_ResultPart
   /// Updates the shape-result of the part (called on Part feature execution)
   MODEL_EXPORT virtual void updateShape();
   /// Applies the additional transformation of the part
-  MODEL_EXPORT virtual void setTrsf(std::shared_ptr<ModelAPI_Result> theThis, 
+  MODEL_EXPORT virtual void setTrsf(std::shared_ptr<ModelAPI_Result> theThis,
     const std::shared_ptr<GeomAPI_Trsf>& theTransformation);
 
   /// Returns the parameters of color definition in the resources config manager
index 72a660ccbf987f64a482e05ab457bfe36163813b..39b32c5e4b268a742be2d1611eec4c31a9206704 100644 (file)
@@ -52,14 +52,14 @@ std::string Model_SelectionNaming::getShapeName(
   ResultPtr& theContext, const bool theAnotherDoc, const bool theWholeContext)
 {
   std::string aName;
-  // add the result name to the name of the shape 
+  // add the result name to the name of the shape
   // (it was in BodyBuilder, but did not work on Result rename)
   bool isNeedContextName = theContext->shape().get() != NULL;
   // && !theContext->shape()->isEqual(theSubSh);
   // check if the subShape is already in DF
   Handle(TNaming_NamedShape) aNS = TNaming_Tool::NamedShape(theShape, myLab);
   Handle(TDataStd_Name) anAttr;
-  if(!aNS.IsNull() && !aNS->IsEmpty()) { // in the document    
+  if(!aNS.IsNull() && !aNS->IsEmpty()) { // in the document
     if(aNS->Label().FindAttribute(TDataStd_Name::GetID(), anAttr)) {
       std::shared_ptr<Model_Data> aData =
         std::dynamic_pointer_cast<Model_Data>(theContext->data());
@@ -67,7 +67,7 @@ std::string Model_SelectionNaming::getShapeName(
         // do nothing because this context name will be added later in this method
       } else {
         aName = TCollection_AsciiString(anAttr->Get()).ToCString();
-        // indexes are added to sub-shapes not primitives 
+        // indexes are added to sub-shapes not primitives
         // (primitives must not be located at the same label)
         if(!aName.empty() && aNS->Evolution() != TNaming_PRIMITIVE && isNeedContextName) {
           const TDF_Label& aLabel = aNS->Label();//theDoc->findNamingName(aName);
@@ -143,18 +143,18 @@ std::string Model_SelectionNaming::namingName(ResultPtr& theContext,
   const bool theAnotherDoc)
 {
   std::string aName("Undefined name");
-  if(!theContext.get() || theContext->shape()->isNull()) 
+  if(!theContext.get() || theContext->shape()->isNull())
     return !theDefaultName.empty() ? theDefaultName : aName;
-  
+
   // if it is in result of another part
-  std::shared_ptr<Model_Document> aDoc = 
+  std::shared_ptr<Model_Document> aDoc =
     std::dynamic_pointer_cast<Model_Document>(theContext->document());
   if (theContext->groupName() == ModelAPI_ResultPart::group()) {
     ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(theContext);
     int anIndex;
     if (theSubSh.get())
       return aPart->data()->name() + "/" + aPart->nameInPart(theSubSh, anIndex);
-    else 
+    else
       return aPart->data()->name();
   }
 
@@ -173,24 +173,24 @@ std::string Model_SelectionNaming::namingName(ResultPtr& theContext,
     BRepTools::Write(aContext, "Context.brep");
   }
 #endif
-  aName = getShapeName(aDoc, aSubShape, theContext, theAnotherDoc, 
+  aName = getShapeName(aDoc, aSubShape, theContext, theAnotherDoc,
     theContext->shape()->isEqual(theSubSh));
 
   if(aName.empty() ) { // not in the document!
     TopAbs_ShapeEnum aType = aSubShape.ShapeType();
     switch (aType) {
     case TopAbs_FACE:
-      // the Face should be in DF. If it is not the case, it is an error ==> to be debugged            
+      // the Face should be in DF. If it is not the case, it is an error ==> to be debugged
       break;
     case TopAbs_EDGE:
       {
         // name structure: F1 & F2 [& F3 & F4],
         // where F1 & F2 the faces which gives the Edge in trivial case
-        // if it is not atrivial case we use localization by neighbours. F3 & F4 - neighbour faces     
+        // if it is not atrivial case we use localization by neighbours. F3 & F4 - neighbour faces
         if (BRep_Tool::Degenerated(TopoDS::Edge(aSubShape))) {
           aName = "Degenerated_Edge";
           break;
-        }    
+        }
         TopTools_IndexedDataMapOfShapeListOfShape aMap;
         TopExp::MapShapesAndAncestors(aContext, TopAbs_EDGE, TopAbs_FACE, aMap);
         TopTools_IndexedMapOfShape aSMap; // map for ancestors of the sub-shape
@@ -198,8 +198,8 @@ std::string Model_SelectionNaming::namingName(ResultPtr& theContext,
         if(aMap.Contains(aSubShape)) {
           const TopTools_ListOfShape& anAncestors = aMap.FindFromKey(aSubShape);
           // check that it is not a trivial case (F1 & F2: aNumber = 1)
-          isTrivialCase = isTrivial(anAncestors, aSMap);               
-        } else 
+          isTrivialCase = isTrivial(anAncestors, aSMap);
+        } else
           break;
         TopTools_ListOfShape aListOfNbs;
         if(!isTrivialCase) { // find Neighbors
@@ -226,27 +226,27 @@ std::string Model_SelectionNaming::namingName(ResultPtr& theContext,
           std::string aFaceName = getShapeName(aDoc, aFace, theContext, theAnotherDoc, false);
           if(i == 1)
             aName = aFaceName;
-          else 
+          else
             aName += "&" + aFaceName;
         }
         TopTools_ListIteratorOfListOfShape itl(aListOfNbs);
         for (;itl.More();itl.Next()) {
           std::string aFaceName = getShapeName(aDoc, itl.Value(), theContext, theAnotherDoc, false);
           aName += "&" + aFaceName;
-        }                
+        }
       }
       break;
 
     case TopAbs_VERTEX:
-      // name structure (Monifold Topology): 
+      // name structure (Monifold Topology):
       // 1) F1 | F2 | F3 - intersection of 3 faces defines a vertex - trivial case.
-      // 2) F1 | F2 | F3 [|F4 [|Fn]] - redundant definition, 
+      // 2) F1 | F2 | F3 [|F4 [|Fn]] - redundant definition,
       //                               but it should be kept as is to obtain safe recomputation
       // 2) F1 | F2      - intersection of 2 faces definses a vertex - applicable for case
       //                   when 1 faces is cylindrical, conical, spherical or revolution and etc.
       // 3) E1 | E2 | E3 - intersection of 3 edges defines a vertex - when we have case of a shell
       //                   or compound of 2 open faces.
-      // 4) E1 | E2      - intesection of 2 edges defines a vertex - when we have a case of 
+      // 4) E1 | E2      - intesection of 2 edges defines a vertex - when we have a case of
       //                   two independent edges (wire or compound)
       // implemented 2 first cases
       {
@@ -289,14 +289,14 @@ std::string Model_SelectionNaming::namingName(ResultPtr& theContext,
               }
               if(i == 1)
                 aName = anEdgeName;
-              else 
+              else
                 aName += "&" + anEdgeName;
             }
           }//reg
           else { // dangle vertex: if(aList22.Extent() == 1)
             //it should be already in DF
           }
-        } 
+        }
         if (isByFaces) {
           TopTools_ListIteratorOfListOfShape itl(aList);
           for (int i = 1;itl.More();itl.Next(),i++) {
@@ -304,7 +304,7 @@ std::string Model_SelectionNaming::namingName(ResultPtr& theContext,
             std::string aFaceName = getShapeName(aDoc, aFace, theContext, theAnotherDoc, false);
             if(i == 1)
               aName = aFaceName;
-            else 
+            else
               aName += "&" + aFaceName;
           }
         }
@@ -357,7 +357,7 @@ TopAbs_ShapeEnum translateType (const std::string& theType)
   }
   if (aShapeTypes.find(theType) != aShapeTypes.end())
     return aShapeTypes[theType];
-  Events_InfoMessage("Model_SelectionNaming", 
+  Events_InfoMessage("Model_SelectionNaming",
     "Shape type defined in XML is not implemented!").send();
   return TopAbs_SHAPE;
 }
@@ -366,12 +366,12 @@ const TopoDS_Shape getShapeFromNS(
   const std::string& theSubShapeName, Handle(TNaming_NamedShape) theNS)
 {
   TopoDS_Shape aSelection;
-  std::string::size_type n = theSubShapeName.rfind('/');                       
+  std::string::size_type n = theSubShapeName.rfind('/');
   if (n == std::string::npos) n = -1;
   std::string aSubString = theSubShapeName.substr(n + 1);
   n = aSubString.rfind('_');
   int indx = 1;
-  if (n != std::string::npos) {// for primitives this is a first 
+  if (n != std::string::npos) {// for primitives this is a first
     // if we have here the same name as theSubShapeName, there is no index in compound, it is whole
     Handle(TDataStd_Name) aName;
     if (!theNS->Label().FindAttribute(TDataStd_Name::GetID(), aName) ||
@@ -387,14 +387,14 @@ const TopoDS_Shape getShapeFromNS(
       return anItL.NewShape();
     }
   }
-  return aSelection;   
+  return aSelection;
 }
 
 const TopoDS_Shape findFaceByName(
   const std::string& theSubShapeName, std::shared_ptr<Model_Document> theDoc)
 {
   TopoDS_Shape aFace;
-  //std::string::size_type n, nb = theSubShapeName.rfind('/');                 
+  //std::string::size_type n, nb = theSubShapeName.rfind('/');
   //if (nb == std::string::npos) nb = 0;
   //std::string aSubString = theSubShapeName.substr(nb + 1);
   std::string aSubString = theSubShapeName;
@@ -422,7 +422,7 @@ size_t ParseName(const std::string& theSubShapeName,   std::list<std::string>& t
   size_t n1(0), n2(0); // n1 - start position, n2 - position of the delimiter
   while ((n2 = aName.find('&', n1)) != std::string::npos) {
     const std::string aName1 = aName.substr(n1, n2 - n1); //name of face
-    theList.push_back(aName1); 
+    theList.push_back(aName1);
     n1 = n2 + 1;
     aLastName = aName.substr(n1);
   }
@@ -453,7 +453,7 @@ const TopoDS_Shape findCommonShape(
   //fill maps
   TopTools_ListIteratorOfListOfShape it(theList);
   for(int i = 0;it.More();it.Next(),i++) {
-    const TopoDS_Shape& aFace = it.Value();            
+    const TopoDS_Shape& aFace = it.Value();
     if(i < 2) {
       TopExp_Explorer anExp (aFace, theType);
       for(;anExp.More();anExp.Next()) {
@@ -478,11 +478,11 @@ const TopoDS_Shape findCommonShape(
       aShape = it2.Key();
       if(theList.Extent() == 2)
         break;
-      else 
+      else
         aList.Append(it2.Key());
     }
   }
-  if(aList.Extent() && aVec.size() > 3) {// list of common edges ==> search ny neighbors 
+  if(aList.Extent() && aVec.size() > 3) {// list of common edges ==> search ny neighbors
     if(aVec[2].Extent() && aVec[3].Extent()) {
       TopTools_ListIteratorOfListOfShape it(aList);
       for(;it.More();it.Next()) {
@@ -520,17 +520,17 @@ const TopoDS_Shape findCommonShape(
 std::string getContextName(const std::string& theSubShapeName)
 {
   std::string aName;
-  std::string::size_type n = theSubShapeName.find('/');                        
+  std::string::size_type n = theSubShapeName.find('/');
   if (n == std::string::npos) return theSubShapeName;
   aName = theSubShapeName.substr(0, n);
   return aName;
 }
 
-/// Parses naming name of sketch sub-elements: takes indices and orientation 
-/// (if theOriented = true) from this name. Map theIDs constains indices -> 
+/// Parses naming name of sketch sub-elements: takes indices and orientation
+/// (if theOriented = true) from this name. Map theIDs constains indices ->
 /// orientations and start/end vertices: negative is reversed, 2 - start, 3 - end
 bool parseSubIndices(CompositeFeaturePtr theComp, //< to iterate names
-  const std::string& theName, const char* theShapeType, 
+  const std::string& theName, const char* theShapeType,
   std::map<int, int>& theIDs, const bool theOriented = false)
 {
   // collect all IDs in the name
@@ -542,7 +542,7 @@ bool parseSubIndices(CompositeFeaturePtr theComp, //< to iterate names
     std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRes = aResults.cbegin();
     // there may be many shapes (circle and center)
     for(; aRes != aResults.cend(); aRes++) {
-      ResultConstructionPtr aConstr = 
+      ResultConstructionPtr aConstr =
         std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aRes);
       if (aConstr.get()) {
         aNames[Model_SelectionNaming::shortName(aConstr)] = theComp->subFeatureId(a);
@@ -590,27 +590,27 @@ int Model_SelectionNaming::edgeOrientation(const TopoDS_Shape& theContext, TopoD
 {
   if (theContext.ShapeType() != TopAbs_FACE && theContext.ShapeType() != TopAbs_WIRE)
     return 0;
-  if (theEdge.Orientation() == TopAbs_FORWARD) 
+  if (theEdge.Orientation() == TopAbs_FORWARD)
     return 1;
-  if (theEdge.Orientation() == TopAbs_REVERSED) 
+  if (theEdge.Orientation() == TopAbs_REVERSED)
     return -1;
   return 0; // unknown
 }
 
 std::shared_ptr<GeomAPI_Shape> Model_SelectionNaming::findAppropriateFace(
-  std::shared_ptr<ModelAPI_Result>& theConstr, 
+  std::shared_ptr<ModelAPI_Result>& theConstr,
   NCollection_DataMap<Handle(Geom_Curve), int>& theCurves, const bool theIsWire)
 {
   int aBestFound = 0; // best number of found edges (not percentage: issue 1019)
   int aBestOrient = 0; // for the equal "BestFound" additional parameter is orientation
   std::shared_ptr<GeomAPI_Shape> aResult;
-  ResultConstructionPtr aConstructionContext = 
+  ResultConstructionPtr aConstructionContext =
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(theConstr);
   if (!aConstructionContext.get())
     return aResult;
   for(int aFaceIndex = 0; aFaceIndex < aConstructionContext->facesNum(); aFaceIndex++) {
     int aFound = 0, aNotFound = 0, aSameOrientation = 0;
-    TopoDS_Face aFace = 
+    TopoDS_Face aFace =
       TopoDS::Face(aConstructionContext->face(aFaceIndex)->impl<TopoDS_Shape>());
     std::list<TopoDS_Shape> aFacesWires; // faces or wires to iterate
     if (theIsWire) {
@@ -645,7 +645,7 @@ std::shared_ptr<GeomAPI_Shape> Model_SelectionNaming::findAppropriateFace(
         }
       }
       if (aFound + aNotFound != 0) {
-        if (aFound > aBestFound || 
+        if (aFound > aBestFound ||
           (aFound == aBestFound && aSameOrientation > aBestOrient)) {
             aBestFound = aFound;
             aBestOrient = aSameOrientation;
@@ -689,7 +689,7 @@ std::string Model_SelectionNaming::shortName(
 }
 
 // type ::= COMP | COMS | SOLD | SHEL | FACE | WIRE | EDGE | VERT
-bool Model_SelectionNaming::selectSubShape(const std::string& theType, 
+bool Model_SelectionNaming::selectSubShape(const std::string& theType,
   const std::string& theSubShapeName, std::shared_ptr<Model_Document> theDoc,
   std::shared_ptr<GeomAPI_Shape>& theShapeToBeSelected, std::shared_ptr<ModelAPI_Result>& theCont)
 {
@@ -717,7 +717,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
         }
       }
     }
-    if (aDoc != theDoc) { 
+    if (aDoc != theDoc) {
       // so, the first word is the document name => reduce the string for the next manips
       aSubShapeName = theSubShapeName.substr(aSlash + 1);
       if (aSubShapeName.empty() && aFoundPart.get()) { // the whole Part result
@@ -733,7 +733,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
    // possible this is body where postfix is added to distinguish several shapes on the same label
   int aSubShapeId = -1; // -1 means sub shape not found
   // for result body the name wihtout "_" has higher priority than with it: it is always added
-  if ((!aCont.get()/* || (aCont->groupName() == ModelAPI_ResultBody::group())*/) && 
+  if ((!aCont.get()/* || (aCont->groupName() == ModelAPI_ResultBody::group())*/) &&
        aContName == aSubShapeName) {
     size_t aPostIndex = aContName.rfind('_');
     if (aPostIndex != std::string::npos) {
@@ -756,7 +756,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
 
 
   TopoDS_Shape aSelection;
-  switch (aType) 
+  switch (aType)
   {
   case TopAbs_FACE:
   case TopAbs_WIRE:
@@ -765,7 +765,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
     }
     break;
   case TopAbs_EDGE:
-    {  
+    {
       const TDF_Label& aLabel = aDoc->findNamingName(aSubShapeName);
       if(!aLabel.IsNull()) {
         Handle(TNaming_NamedShape) aNS;
@@ -791,7 +791,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
   case TopAbs_SOLID:
   case TopAbs_SHELL:
   default: {//TopAbs_SHAPE
-    /// case when the whole sketch is selected, so, 
+    /// case when the whole sketch is selected, so,
     /// selection type is compound, but there is no value
     if (aCont.get() && aCont->shape().get()) {
       if (aCont->shape()->impl<TopoDS_Shape>().ShapeType() == aType) {
@@ -824,7 +824,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
       for(; it != aListofNames.end(); it++){
         const TopoDS_Shape aFace = findFaceByName(*it, aDoc);
         if(!aFace.IsNull())
-          aList.Append(aFace);         
+          aList.Append(aFace);
       }
       aSelection = findCommonShape(aType, aList);
     }
@@ -844,13 +844,13 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
         return true;
       }
       // for sketch sub-elements selected
-      CompositeFeaturePtr aComposite = 
+      CompositeFeaturePtr aComposite =
         std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aDoc->feature(aConstr));
       if (aComposite.get()) {
         if (aType == TopAbs_VERTEX || aType == TopAbs_EDGE) {
           // collect all IDs in the name
           std::map<int, int> anIDs;
-          if (!parseSubIndices(aComposite, aSubShapeName, 
+          if (!parseSubIndices(aComposite, aSubShapeName,
               aType == TopAbs_EDGE ? "Edge" : "Vertex", anIDs))
             return false;
 
@@ -863,7 +863,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
               std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIt = aResults.cbegin();
               // there may be many shapes (circle and center)
               for(; aRIt != aResults.cend(); aRIt++) {
-                ResultConstructionPtr aRes = 
+                ResultConstructionPtr aRes =
                   std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aRIt);
                 if (aRes) {
                   int anOrientation = abs(anIDs[aCompID]);
@@ -892,12 +892,12 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
           // sketch faces is identified by format "Sketch_1/Face-2f-8f-11r"
         } else if (aType == TopAbs_FACE || aType == TopAbs_WIRE) {
           std::map<int, int> anIDs;
-          if (!parseSubIndices(aComposite, aSubShapeName, 
+          if (!parseSubIndices(aComposite, aSubShapeName,
               aType == TopAbs_FACE ? "Face" : "Wire", anIDs, true))
             return false;
 
           // curves and orientations of edges
-          NCollection_DataMap<Handle(Geom_Curve), int> allCurves; 
+          NCollection_DataMap<Handle(Geom_Curve), int> allCurves;
           const int aSubNum = aComposite->numberOfSubs();
           for(int a = 0; a < aSubNum; a++) {
             int aSubID = aComposite->subFeatureId(a);
@@ -906,7 +906,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
               const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = aSub->results();
               std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRes;
               for(aRes = aResults.cbegin(); aRes != aResults.cend(); aRes++) {
-                ResultConstructionPtr aConstr = 
+                ResultConstructionPtr aConstr =
                   std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aRes);
                 if (aConstr->shape() && aConstr->shape()->isEdge()) {
                   const TopoDS_Shape& aResShape = aConstr->shape()->impl<TopoDS_Shape>();
@@ -926,7 +926,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
             theShapeToBeSelected = aFoundFW;
             return true;
           }
-        } else if (aType == TopAbs_WIRE) { 
+        } else if (aType == TopAbs_WIRE) {
           // sketch faces is identified by format "Sketch_1/Face-2f-8f-11r"
           std::map<int, int> anIDs;
           if (!parseSubIndices(aComposite, aSubShapeName, "Wire", anIDs))
@@ -942,7 +942,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
               const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = aSub->results();
               std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRes;
               for(aRes = aResults.cbegin(); aRes != aResults.cend(); aRes++) {
-                ResultConstructionPtr aConstr = 
+                ResultConstructionPtr aConstr =
                   std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aRes);
                 if (aConstr->shape() && aConstr->shape()->isEdge()) {
                   const TopoDS_Shape& aResShape = aConstr->shape()->impl<TopoDS_Shape>();
@@ -956,7 +956,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
               }
             }
           }
-          std::shared_ptr<GeomAPI_Shape> aFoundFW = 
+          std::shared_ptr<GeomAPI_Shape> aFoundFW =
             findAppropriateFace(aConstr, allCurves, aType == TopAbs_WIRE);
           if (aFoundFW.get()) {
             theShapeToBeSelected = aFoundFW;
@@ -967,7 +967,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
     }
   }
   if (!aSelection.IsNull()) {
-    // Select it (must be after N=0 checking, 
+    // Select it (must be after N=0 checking,
     // since for simple constructions the shape must be null)
     std::shared_ptr<GeomAPI_Shape> aShapeToBeSelected(new GeomAPI_Shape());
     aShapeToBeSelected->setImpl(new TopoDS_Shape(aSelection));
index f97e284fd47fc5a495d1fa7a40a633c3aaa46b5b..e9973deb3c3d6f8ee48ba0f7d60d6d27d8ac73e4 100644 (file)
@@ -31,7 +31,7 @@ public:
   /// Produces the string-name for the selected shape
   std::string namingName(ResultPtr& theContext, std::shared_ptr<GeomAPI_Shape> theSubSh,
     const std::string& theDefaultName, const bool theAnotherDoc);
-  
+
   /// Makes a selection by the string-name
   /// \param theType string of the type of the shape
   /// \param theSubShapeName string-identifier of the selected shape
@@ -42,16 +42,16 @@ public:
     std::shared_ptr<Model_Document> theDoc, std::shared_ptr<GeomAPI_Shape>& theShapeToBeSelected,
     std::shared_ptr<ModelAPI_Result>& theCont);
 
-  /// Searches the face more appropriate to the given curves 
+  /// Searches the face more appropriate to the given curves
   /// (with higher level of matched parameters)
   /// \param theConstr construction result that contains one or several  faces
-  /// \param theCurves map from the face edges curves to orientation 
+  /// \param theCurves map from the face edges curves to orientation
   ///                  (-1 reversed, 0 unknown, 1 forward)
-  /// \param theIsWire for wire algorithm isquite the same, 
+  /// \param theIsWire for wire algorithm isquite the same,
   ///                  but if in face several wires, it returns the needed wire
   /// \returns faces fron this construction if found
   static std::shared_ptr<GeomAPI_Shape> findAppropriateFace(
-    std::shared_ptr<ModelAPI_Result>& theConstr, 
+    std::shared_ptr<ModelAPI_Result>& theConstr,
     NCollection_DataMap<Handle(Geom_Curve), int>& theCurves, const bool theIsWire);
 
   /// Returns orientation of the edge in the context shape
index 567dba4d4afcb617c8ae88f13f6dbbe2a600bf0a..75cb32ee044bc5eb327ba56372f7ce2dff19de79 100644 (file)
@@ -191,7 +191,7 @@ std::shared_ptr<ModelAPI_Document> Model_Session::moduleDocument()
   Handle(Model_Application) anApp = Model_Application::getApplication();
   bool aFirstCall = !anApp->hasRoot();
   if (aFirstCall) {
-    // to be sure that plugins are loaded, 
+    // to be sure that plugins are loaded,
     // even before the first "createFeature" call (in unit tests)
     LoadPluginsInfo();
     // creation of the root document is always outside of the transaction, so, avoid checking it
@@ -343,7 +343,7 @@ Model_Session::Model_Session()
   ModelAPI_Session::setSession(std::shared_ptr<ModelAPI_Session>(this));
   // register the configuration reading listener
   Events_Loop* aLoop = Events_Loop::loop();
-  static const Events_ID kFeatureEvent = 
+  static const Events_ID kFeatureEvent =
     Events_Loop::eventByName(Config_FeatureMessage::MODEL_EVENT());
   aLoop->registerListener(this, kFeatureEvent);
   aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED), 0, true);
@@ -354,11 +354,11 @@ Model_Session::Model_Session()
 
 void Model_Session::processEvent(const std::shared_ptr<Events_Message>& theMessage)
 {
-  static const Events_ID kFeatureEvent = 
+  static const Events_ID kFeatureEvent =
     Events_Loop::eventByName(Config_FeatureMessage::MODEL_EVENT());
   static const Events_ID kValidatorEvent = Events_Loop::eventByName(EVENT_VALIDATOR_LOADED);
   if (theMessage->eventID() == kFeatureEvent) {
-    const std::shared_ptr<Config_FeatureMessage> aMsg = 
+    const std::shared_ptr<Config_FeatureMessage> aMsg =
       std::dynamic_pointer_cast<Config_FeatureMessage>(theMessage);
     if (aMsg) {
 
@@ -368,7 +368,7 @@ void Model_Session::processEvent(const std::shared_ptr<Events_Message>& theMessa
           aMsg->pluginLibrary(), aMsg->documentKind());
       }
     } else {
-      const std::shared_ptr<Config_AttributeMessage> aMsgAttr = 
+      const std::shared_ptr<Config_AttributeMessage> aMsgAttr =
         std::dynamic_pointer_cast<Config_AttributeMessage>(theMessage);
       if (aMsgAttr) {
 
@@ -387,7 +387,7 @@ void Model_Session::processEvent(const std::shared_ptr<Events_Message>& theMessa
     // plugins information was started to load, so, it will be loaded
     myPluginsInfoLoaded = true;
   } else if (theMessage->eventID() == kValidatorEvent) {
-    std::shared_ptr<Config_ValidatorMessage> aMsg = 
+    std::shared_ptr<Config_ValidatorMessage> aMsg =
       std::dynamic_pointer_cast<Config_ValidatorMessage>(theMessage);
     if (aMsg) {
       if (aMsg->attributeId().empty()) {  // feature validator
@@ -406,7 +406,7 @@ void Model_Session::processEvent(const std::shared_ptr<Events_Message>& theMessa
     if (theMessage->eventID() == kDeletedEvent) {
       std::shared_ptr<ModelAPI_ObjectDeletedMessage> aDeleted =
         std::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(theMessage);
-      if (aDeleted && 
+      if (aDeleted &&
           aDeleted->groups().find(ModelAPI_ResultPart::group()) != aDeleted->groups().end())
       {
          // check that the current feature of the session is still the active Part (even disabled)
index 09a79a3d2976850b69ab5656142187ba3bbb9e95..2afa84a26b292305e6aa4c143f7bd792028cf110 100644 (file)
@@ -26,13 +26,13 @@ class Model_Session : public ModelAPI_Session, public Events_Listener
 {
   bool myPluginsInfoLoaded;  ///< it true if plugins information is loaded
   /// map of feature IDs to plugin name and document kind
-  std::map<std::string, std::pair<std::string, std::string> > myPlugins; 
+  std::map<std::string, std::pair<std::string, std::string> > myPlugins;
   std::map<std::string, ModelAPI_Plugin*> myPluginObjs;  ///< instances of the already plugins
   std::string myCurrentPluginName;  ///< name of the plugin that must be loaded currently
   std::shared_ptr<ModelAPI_Document> myCurrentDoc;  ///< current working document
-  
+
   /// if true, generates error if document is updated outside of transaction
-  bool myCheckTransactions; 
+  bool myCheckTransactions;
   bool myOperationAttachedToNext; ///< the current operation must be committed twice, with nested
  public:
 
@@ -52,14 +52,14 @@ class Model_Session : public ModelAPI_Session, public Events_Listener
 
   //! Starts a new operation (opens a transaction)
   //! \param theId string-identifier of the started transaction
-  //! \param theAttachedToNested if it is true, 
-  //!                            it means that this transaction is attached to the nested 
+  //! \param theAttachedToNested if it is true,
+  //!                            it means that this transaction is attached to the nested
   //!          where it is located and will be committed on the next commit with the nested
   MODEL_EXPORT virtual void startOperation(
     const std::string& theId = "", const bool theAttachedToNested = false);
   //! Finishes the previously started operation (closes the transaction)
   MODEL_EXPORT virtual void finishOperation();
-  //! Aborts the operation 
+  //! Aborts the operation
   MODEL_EXPORT virtual void abortOperation();
   //! Returns true if operation has been started, but not yet finished or aborted
   MODEL_EXPORT virtual bool isOperation();
@@ -102,7 +102,7 @@ class Model_Session : public ModelAPI_Session, public Events_Listener
   MODEL_EXPORT virtual bool isLoadByDemand(const std::string theDocID);
 
   /// Registers the plugin that creates features.
-  /// It is obligatory for each plugin to call this function on loading to be found by 
+  /// It is obligatory for each plugin to call this function on loading to be found by
   /// the plugin manager on call of the feature)
   MODEL_EXPORT virtual void registerPlugin(ModelAPI_Plugin* thePlugin);
 
index 0f0fb1335c346eb8034c57d89d799e6763b2e547..31160251c373016b8fc36c3fd2f4f36f59ae7448 100755 (executable)
@@ -156,7 +156,7 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) {
     if (theFeature->data()->execState() == ModelAPI_StateDone ||
         theFeature->data()->execState() == ModelAPI_StateExecFailed) // fix issue 1819
       theFeature->data()->execState(ModelAPI_StateMustBeUpdated);
-    else 
+    else
       return true; // do not need iteration deeply if it is already marked as modified or so
 #ifdef DEB_UPDATE
     //std::cout<<"*** Set modified state "<<theFeature->name()<<std::endl;
@@ -239,7 +239,7 @@ void Model_Update::processEvent(const std::shared_ptr<Events_Message>& theMessag
         std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
     updateSelection(aMsg->objects());
   }
-  // creation is added to "update" to avoid recomputation twice: 
+  // creation is added to "update" to avoid recomputation twice:
   // on create and immediately after on update
   if (theMessage->eventID() == kCreatedEvent) {
     std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aMsg =
@@ -248,7 +248,7 @@ void Model_Update::processEvent(const std::shared_ptr<Events_Message>& theMessag
     std::set<ObjectPtr>::const_iterator anObjIter = anObjs.cbegin();
     for(; anObjIter != anObjs.cend(); anObjIter++) {
       if (std::dynamic_pointer_cast<Model_Document>((*anObjIter)->document())->executeFeatures()) {
-        if ((*anObjIter)->groupName() == ModelAPI_Feature::group()) { 
+        if ((*anObjIter)->groupName() == ModelAPI_Feature::group()) {
           // results creation means enabling, not update
           ModelAPI_EventCreator::get()->sendUpdated(*anObjIter, kUpdatedEvent);
         } else {
@@ -279,9 +279,9 @@ void Model_Update::processEvent(const std::shared_ptr<Events_Message>& theMessag
       if (anUpdated.get()) {
         if (addModified(anUpdated, FeaturePtr()))
           aSomeModified = true;
-      } else { 
+      } else {
         // process the updated result as update of features that refers to this result
-        const std::set<std::shared_ptr<ModelAPI_Attribute> >& 
+        const std::set<std::shared_ptr<ModelAPI_Attribute> >&
           aRefs = (*anObjIter)->data()->refsToMe();
         std::set<std::shared_ptr<ModelAPI_Attribute> >::const_iterator aRefIter = aRefs.cbegin();
         for(; aRefIter != aRefs.cend(); aRefIter++) {
@@ -313,7 +313,7 @@ void Model_Update::processEvent(const std::shared_ptr<Events_Message>& theMessag
       myIsFinish = false;
     }
     // processed features must be only on finish, so clear anyway (to avoid reimport on load)
-    myProcessOnFinish.clear(); 
+    myProcessOnFinish.clear();
 
     if (!(theMessage->eventID() == kOpStartEvent)) {
       processFeatures(false);
@@ -338,7 +338,7 @@ void Model_Update::processEvent(const std::shared_ptr<Events_Message>& theMessag
         anUpdatedIter++;
       }
     }
-    // the redisplay signal should be flushed in order 
+    // the redisplay signal should be flushed in order
     // to erase the feature presentation in the viewer
     // if should be done after removeFeature() of document,
     // by this reason, upper processFeatures() do not perform this flush
@@ -348,7 +348,7 @@ void Model_Update::processEvent(const std::shared_ptr<Events_Message>& theMessag
     myIsParamUpdated = false;
     myWaitForFinish.clear();
   } else if (theMessage->eventID() == kReorderEvent) {
-    std::shared_ptr<ModelAPI_OrderUpdatedMessage> aMsg = 
+    std::shared_ptr<ModelAPI_OrderUpdatedMessage> aMsg =
       std::dynamic_pointer_cast<ModelAPI_OrderUpdatedMessage>(theMessage);
     if (aMsg->reordered().get())
       addModified(aMsg->reordered(), aMsg->reordered()); // to update all attributes
@@ -443,7 +443,7 @@ bool Model_Update::processFeature(FeaturePtr theFeature)
     myProcessed[theFeature] = 0;
   } else {
     int aCount = myProcessed[theFeature];
-    if (aCount > 100) { 
+    if (aCount > 100) {
       // too many repetition of processing (in VS it may crash on 330 with stack overflow)
       Events_InfoMessage("Model_Update",
         "Feature '%1' is updated in infinitive loop").arg(theFeature->data()->name()).send();
@@ -459,7 +459,7 @@ bool Model_Update::processFeature(FeaturePtr theFeature)
       aIsModified = true;
       std::set<std::shared_ptr<ModelAPI_Feature> > aNewSet;
       // contains itself, so, we don't know which was the reason and the reason is any
-      aNewSet.insert(theFeature); 
+      aNewSet.insert(theFeature);
       myModified[theFeature] = aNewSet;
     }
   }
@@ -495,7 +495,7 @@ bool Model_Update::processFeature(FeaturePtr theFeature)
     return false;
   }
 
-  // evaluate parameter before the sub-elements update: 
+  // evaluate parameter before the sub-elements update:
   // it updates dependencies on evaluation (#1085)
   if (theFeature->getKind() == "Parameter") {
     theFeature->execute();
@@ -505,12 +505,12 @@ bool Model_Update::processFeature(FeaturePtr theFeature)
   // check all features this feature depended on (recursive call of updateFeature)
   std::set<FeaturePtr>& aReasons = myModified[theFeature];
   bool allSubsUsed = aReasons.find(theFeature) != aReasons.end();
-  if (allSubsUsed) { 
+  if (allSubsUsed) {
     // add all subs in aReasons and temporary remove "theFeature" to avoid processing itself
     allReasons(theFeature, aReasons);
     aReasons.erase(theFeature);
   }
-  // take reasons one by one (they may be added during the feature process 
+  // take reasons one by one (they may be added during the feature process
   // (circle by the radius of sketch)
   std::set<FeaturePtr> aProcessedReasons;
   while(!aReasons.empty()) {
@@ -538,7 +538,7 @@ bool Model_Update::processFeature(FeaturePtr theFeature)
   bool isPostponedMain = false;
   CompositeFeaturePtr aCompos = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(theFeature);
   if (theFeature->getKind() == "ExtrusionSketch" && aCompos.get()) {
-    CompositeFeaturePtr aCurrentOwner = 
+    CompositeFeaturePtr aCurrentOwner =
       ModelAPI_Tools::compositeOwner(theFeature->document()->currentFeature(false));
     isPostponedMain = aCurrentOwner.get() && aCompos->isSub(aCurrentOwner);
   }
@@ -562,8 +562,8 @@ bool Model_Update::processFeature(FeaturePtr theFeature)
 
   // this checking must be after the composite feature sub-elements processing:
   // composite feature status may depend on it's subelements
-  if ((theFeature->data()->execState() == ModelAPI_StateInvalidArgument || isReferencedInvalid) && 
-    theFeature->getKind() != "Part") { 
+  if ((theFeature->data()->execState() == ModelAPI_StateInvalidArgument || isReferencedInvalid) &&
+    theFeature->getKind() != "Part") {
       // don't disable Part because it will make disabled all the features
       // (performance and problems with the current feature)
   #ifdef DEB_UPDATE
@@ -601,7 +601,7 @@ void Model_Update::redisplayWithResults(FeaturePtr theFeature, const ModelAPI_Ex
   for (; aRIter != allResults.cend(); aRIter++) {
     std::shared_ptr<ModelAPI_Result> aRes = *aRIter;
     if (!aRes->isDisabled()) {
-      // update state only for enabled results 
+      // update state only for enabled results
       // (Placement Result Part may make the original Part Result as invalid)
       aRes->data()->execState(theState);
     }
@@ -687,7 +687,7 @@ void Model_Update::updateArguments(FeaturePtr theFeature) {
     for(; anIter != anAttributes.end(); anIter++) {
       AttributePointPtr aPointAttribute =
         std::dynamic_pointer_cast<GeomDataAPI_Point>(*anIter);
-      if (aPointAttribute.get() && (!aPointAttribute->textX().empty() || 
+      if (aPointAttribute.get() && (!aPointAttribute->textX().empty() ||
           !aPointAttribute->textY().empty() || !aPointAttribute->textZ().empty())) {
         if (myIsParamUpdated) {
           ModelAPI_AttributeEvalMessage::send(aPointAttribute, this);
@@ -708,7 +708,7 @@ void Model_Update::updateArguments(FeaturePtr theFeature) {
       AttributePoint2DPtr aPoint2DAttribute =
         std::dynamic_pointer_cast<GeomDataAPI_Point2D>(*anIter);
       if (aPoint2DAttribute.get()) {
-        if (myIsParamUpdated && (!aPoint2DAttribute->textX().empty() || 
+        if (myIsParamUpdated && (!aPoint2DAttribute->textX().empty() ||
             !aPoint2DAttribute->textY().empty())) {
           ModelAPI_AttributeEvalMessage::send(aPoint2DAttribute, this);
         }
@@ -719,7 +719,7 @@ void Model_Update::updateArguments(FeaturePtr theFeature) {
     }
   }
   // update the selection attributes if any
-  list<AttributePtr> aRefs = 
+  list<AttributePtr> aRefs =
     theFeature->data()->attributes(ModelAPI_AttributeSelection::typeId());
   list<AttributePtr>::iterator aRefsIter = aRefs.begin();
   for (; aRefsIter != aRefs.end(); aRefsIter++) {
@@ -779,8 +779,8 @@ void Model_Update::updateArguments(FeaturePtr theFeature) {
     theFeature->data()->execState(aState);
 }
 
-bool Model_Update::isReason(std::shared_ptr<ModelAPI_Feature>& theFeature, 
-     std::shared_ptr<ModelAPI_Object> theReason) 
+bool Model_Update::isReason(std::shared_ptr<ModelAPI_Feature>& theFeature,
+     std::shared_ptr<ModelAPI_Object> theReason)
 {
   std::map<std::shared_ptr<ModelAPI_Feature>, std::set<std::shared_ptr<ModelAPI_Feature> > >
     ::iterator aReasonsIt = myModified.find(theFeature);
@@ -811,7 +811,7 @@ bool Model_Update::isReason(std::shared_ptr<ModelAPI_Feature>& theFeature,
   }
 
   // this case only for not-previewed items update state, nothing is changed in args for it
-  return false; 
+  return false;
 }
 
 void Model_Update::executeFeature(FeaturePtr theFeature)
@@ -834,7 +834,7 @@ void Model_Update::executeFeature(FeaturePtr theFeature)
     Events_InfoMessage("Model_Update",
       "Feature %1 has failed during the execution").arg(theFeature->getKind()).send();
   }
-  // The macro feature has to be deleted in any case even its execution is failed 
+  // The macro feature has to be deleted in any case even its execution is failed
   myWaitForFinish.insert(theFeature);
   if (aState != ModelAPI_StateDone) {
     theFeature->eraseResults();
@@ -850,10 +850,10 @@ void Model_Update::updateStability(void* theSender)
     bool added = false; // object may be was crated
     ModelAPI_Object* aSender = static_cast<ModelAPI_Object*>(theSender);
     if (aSender && aSender->document()) {
-      FeaturePtr aFeatureSender = 
+      FeaturePtr aFeatureSender =
         std::dynamic_pointer_cast<ModelAPI_Feature>(aSender->data()->owner());
       if (aFeatureSender.get()) {
-        Model_Objects* aDocObjects = 
+        Model_Objects* aDocObjects =
           std::dynamic_pointer_cast<Model_Document>(aSender->document())->objects();
         if (aDocObjects) {
           //aDocObjects->synchronizeBackRefs();
@@ -864,17 +864,17 @@ void Model_Update::updateStability(void* theSender)
             aRefIt = aRefs.begin();
           for(; aRefIt != aRefs.end(); aRefIt++) {
             if (!aFactory->isConcealed(aFeatureSender->getKind(), aRefIt->first))
-              // take into account only concealed references 
+              // take into account only concealed references
               // (do not remove the sketch constraint and the edge on constraint edit)
-              continue; 
+              continue;
             std::list<ObjectPtr>& aRefFeaturesList = aRefIt->second;
             std::list<ObjectPtr>::iterator aReferenced = aRefFeaturesList.begin();
             for(; aReferenced != aRefFeaturesList.end(); aReferenced++) {
-               // stability is only on results: feature to feature reference mean nested 
+               // stability is only on results: feature to feature reference mean nested
               // features, that will remove nesting references
-              if (aReferenced->get() && (*aReferenced)->data()->isValid() && 
+              if (aReferenced->get() && (*aReferenced)->data()->isValid() &&
                 (*aReferenced)->groupName() != ModelAPI_Feature::group()) {
-                std::shared_ptr<Model_Data> aData = 
+                std::shared_ptr<Model_Data> aData =
                   std::dynamic_pointer_cast<Model_Data>((*aReferenced)->data());
                 if (aFeatureSender->isStable()) {
                   aData->addBackReference(aFeatureSender, aRefIt->first);
@@ -900,7 +900,7 @@ void Model_Update::updateSelection(const std::set<std::shared_ptr<ModelAPI_Objec
 {
   std::set<std::shared_ptr<ModelAPI_Object> >::iterator anObj = theObjects.begin();
   for(; anObj != theObjects.end(); anObj++) {
-    list<AttributePtr> aRefs = 
+    list<AttributePtr> aRefs =
       (*anObj)->data()->attributes(ModelAPI_AttributeSelection::typeId());
     list<AttributePtr>::iterator aRefsIter = aRefs.begin();
     for (; aRefsIter != aRefs.end(); aRefsIter++) {
index c5f27713841c6346db681b1140a9f777f6ae4155..1e49688278abd74c64a157cf92e4a06a368dabb9 100644 (file)
@@ -30,7 +30,7 @@ class Model_Update : public Events_Listener
   std::map<std::shared_ptr<ModelAPI_Feature>, std::set<std::shared_ptr<ModelAPI_Feature> > >
     myModified;
   /// Features which arguments were modified by not-persistent changes.
-  /// So, these referencing arguments must be updated 
+  /// So, these referencing arguments must be updated
   /// due to these features info also before execution).
   std::map<std::shared_ptr<ModelAPI_Feature>, std::set<std::shared_ptr<ModelAPI_Feature> > >
     myNotPersistentRefs;
@@ -46,7 +46,7 @@ class Model_Update : public Events_Listener
   std::set<std::shared_ptr<ModelAPI_Feature> > myProcessOnFinish;
   /// to avoid infinitive cycling: feature -> count of the processing periods during this update
   std::map<std::shared_ptr<ModelAPI_Feature>, int > myProcessed;
-  /// if preview in hte property panel is blocked and 
+  /// if preview in hte property panel is blocked and
   /// any update is postponed until the end of operation
   bool myIsPreviewBlocked;
 
@@ -74,7 +74,7 @@ protected:
   void updateArguments(std::shared_ptr<ModelAPI_Feature> theFeature);
 
   /// Sends the redisplay events for feature and results, updates the updated status
-  void redisplayWithResults(std::shared_ptr<ModelAPI_Feature> theFeature, 
+  void redisplayWithResults(std::shared_ptr<ModelAPI_Feature> theFeature,
     const ModelAPI_ExecState theState);
 
   /// On operation start/end/abort the "Just" fileds must be cleared and processed in the right way
@@ -88,7 +88,7 @@ protected:
   /// Updates the properties of object because of stability state changes
   void updateStability(void* theSender);
 
-  /// Returns true if theFeature modification was caused by theReason 
+  /// Returns true if theFeature modification was caused by theReason
   /// (may be feature of result of this feature)
   bool isReason(
     std::shared_ptr<ModelAPI_Feature>& theFeature, std::shared_ptr<ModelAPI_Object> theReason);
index 0aa279fcb18ad8cf89718d04402dbe309290e4c2..0b7a6ea3a23e77c07b6f3a96cfed3ba840526dbd 100644 (file)
@@ -35,7 +35,7 @@ void Model_ValidatorsFactory::assignValidator(const std::string& theID,
     myFeatures[theFeatureID] = AttrValidators();
   }
   if (myFeatures[theFeatureID].find(theID) != myFeatures[theFeatureID].end()) {
-    //Events_Error::send(std::string("Validator ") + theID + 
+    //Events_Error::send(std::string("Validator ") + theID +
     //  " for feature " + theFeatureID + "is already registered");
   } else {
     myFeatures[theFeatureID][theID] = std::list<std::string>();
@@ -51,7 +51,7 @@ void Model_ValidatorsFactory::assignValidator(const std::string& theID,
   }
 
   if (myFeatures[theFeatureID].find(theID) != myFeatures[theFeatureID].end()) {
-    //Events_Error::send(std::string("Validator ") + theID + 
+    //Events_Error::send(std::string("Validator ") + theID +
     //  " for feature " + theFeatureID + "is already registered");
   } else {
     myFeatures[theFeatureID][theID] = theArguments;
@@ -81,7 +81,7 @@ void Model_ValidatorsFactory::assignValidator(const std::string& theID,
 void Model_ValidatorsFactory::validators(const std::string& theFeatureID,
                                          Validators& theValidators) const
 {
-  std::map<std::string, AttrValidators>::const_iterator aFeatureIt = 
+  std::map<std::string, AttrValidators>::const_iterator aFeatureIt =
       myFeatures.find(theFeatureID);
   if (aFeatureIt != myFeatures.cend()) {
     AttrValidators::const_iterator aValidatorsIt = aFeatureIt->second.cbegin();
@@ -97,11 +97,11 @@ void Model_ValidatorsFactory::validators(const std::string& theFeatureID,
   addDefaultValidators(theValidators);
 }
 
-void Model_ValidatorsFactory::validators(const std::string& theFeatureID, 
+void Model_ValidatorsFactory::validators(const std::string& theFeatureID,
                                          const std::string& theAttrID,
                                          Validators& theValidators) const
 {
-  std::map<std::string, std::map<std::string, AttrValidators> >::const_iterator aFeatureIt = 
+  std::map<std::string, std::map<std::string, AttrValidators> >::const_iterator aFeatureIt =
       myAttrs.find(theFeatureID);
   if (aFeatureIt != myAttrs.cend()) {
     std::map<std::string, AttrValidators>::const_iterator anAttrIt =
@@ -177,7 +177,7 @@ bool Model_ValidatorsFactory::validate(const std::shared_ptr<ModelAPI_Feature>&
       //  Events_Error::send(std::string("Validator ") + aValidatorID + " was not registered");
       //  continue;
       //}
-      const ModelAPI_FeatureValidator* aFValidator = 
+      const ModelAPI_FeatureValidator* aFValidator =
         dynamic_cast<const ModelAPI_FeatureValidator*>(validator(aValidatorID));
       if (aFValidator) {
         Events_InfoMessage anError;
@@ -197,7 +197,7 @@ bool Model_ValidatorsFactory::validate(const std::shared_ptr<ModelAPI_Feature>&
   //std::map<std::string, ModelAPI_Validator*>::const_iterator aDefaultVal = myIDs.find(kDefaultId);
   //if(aDefaultVal != myIDs.end()) {
   //  static const std::list<std::string> anEmptyArgList;
-  //  const ModelAPI_FeatureValidator* aFValidator = 
+  //  const ModelAPI_FeatureValidator* aFValidator =
   //    dynamic_cast<const ModelAPI_FeatureValidator*>(aDefaultVal->second);
   //  if (aFValidator) {
   //    std::string anError;
@@ -220,7 +220,7 @@ bool Model_ValidatorsFactory::validate(const std::shared_ptr<ModelAPI_Feature>&
   std::list<std::string> aLtAttributes = aData->attributesIDs(kAllTypes);
   std::list<std::string>::const_iterator anAttrIt = aLtAttributes.cbegin();
   for (; anAttrIt != aLtAttributes.cend(); anAttrIt++) {
-    const std::string& anAttributeID = *anAttrIt; 
+    const std::string& anAttributeID = *anAttrIt;
     AttributePtr anAttribute = theFeature->data()->attribute(anAttributeID);
 
     std::string aValidatorID;
@@ -232,7 +232,7 @@ bool Model_ValidatorsFactory::validate(const std::shared_ptr<ModelAPI_Feature>&
       theFeature->setError(anError.messageString(), false);
       theFeature->data()->execState(ModelAPI_StateInvalidArgument);
       return false;
-    } 
+    }
   }
 
   return true;
@@ -267,13 +267,13 @@ bool Model_ValidatorsFactory::validate(const std::shared_ptr<ModelAPI_Attribute>
     if (!anAttrValidator->isValid(theAttribute, anArguments, theError)) {
       theValidator = aValidatorID;
       return false;
-    } 
+    }
   }
 
   return true;
 }
 
-void Model_ValidatorsFactory::registerNotObligatory(std::string theFeature, 
+void Model_ValidatorsFactory::registerNotObligatory(std::string theFeature,
                                                     std::string theAttribute)
 {
   const static std::string kDefaultId = "Model_FeatureValidator";
index bda886ec9509c4811f497a27b17456991a6857ab..5ac63fd1b88f7c3e29e84402113cfe6f470e6c28 100644 (file)
@@ -34,7 +34,7 @@ class Model_ValidatorsFactory : public ModelAPI_ValidatorsFactory
   std::map<std::string, AttrValidators> myFeatures;
   /// validators IDs and arguments by feature and attribute IDs
   std::map<std::string, std::map<std::string, AttrValidators> > myAttrs;
-  /// Stores the registered attributes that leads to the concealment of referenced objects in 
+  /// Stores the registered attributes that leads to the concealment of referenced objects in
   /// data tree. Map from feature kind to set of attribute IDs.
   std::map<std::string, std::set<std::string> > myConcealed;
   /// Stored the unconcealed results and features that caused the canceled concealment (Recover).
@@ -42,7 +42,7 @@ class Model_ValidatorsFactory : public ModelAPI_ValidatorsFactory
   std::map<std::shared_ptr<ModelAPI_Result>, std::list<std::shared_ptr<ModelAPI_Feature> > >
     myUnconcealed;
   /// Stores the registered attributes must be checked only if the particular case is activated
-  /// Map from feature kind to map of attribute IDs to pair 
+  /// Map from feature kind to map of attribute IDs to pair
   // (switchId (ID of the attribute) and case Ids (possible values of the switch attribute))
   std::map<std::string, std::map<std::string,
           std::map<std::string, std::set<std::string> > > > myCases;
@@ -71,7 +71,7 @@ class Model_ValidatorsFactory : public ModelAPI_ValidatorsFactory
   MODEL_EXPORT virtual void validators(const std::string& theFeatureID,
                                        Validators& theResult) const;
   /// Provides a validator for the attribute, returns NULL if no validator
-  MODEL_EXPORT virtual void validators(const std::string& theFeatureID, 
+  MODEL_EXPORT virtual void validators(const std::string& theFeatureID,
     const std::string& theAttrID, Validators& theResult) const;
 
   /// Returns registered validator by its Id
index dd704bd31d22b15454ff35fcd87717ba559b916a..97373a087e11705e2c1eb7ad23f4f3bc0ef11d95 100644 (file)
@@ -37,7 +37,7 @@ void ModelAPI_Attribute::setInitialized()
 bool ModelAPI_Attribute::blockSetInitialized(const bool theBlock)
 {
   bool aBlocked = mySetInitializedBlocked;
-  
+
   mySetInitializedBlocked = theBlock;
 
   return aBlocked;
index e742ff8d5b3cce09aec39581e8f06956bad24232..1ea1523b74c9304f4d05cc3b4965cf52d8eea40d 100644 (file)
@@ -54,7 +54,7 @@ class ModelAPI_Attribute
   /// \return the previous block value
   MODELAPI_EXPORT bool blockSetInitialized(const bool theBlock);
 
-  /// Set this attribute is argument for result 
+  /// Set this attribute is argument for result
   /// (change of this attribute requires update of result).
   /// By default it is true.
   MODELAPI_EXPORT void setIsArgument(const bool theFlag);
index 927d45a680859a89617b6336610a9400b8adb42a..fbb95fcf2c28959c6d95d5c658fb94f33145c52c 100644 (file)
@@ -48,7 +48,7 @@ class ModelAPI_AttributeDouble : public ModelAPI_Attribute
   MODELAPI_EXPORT virtual std::string expressionError() = 0;
 
   /// Defines the used parameters
-  MODELAPI_EXPORT virtual 
+  MODELAPI_EXPORT virtual
     void setUsedParameters(const std::set<std::string>& theUsedParameters) = 0;
 
   /// Returns the used parameters
index 41d2bc9a3cf8d18d64f36c8b054be108feac9ded..285bd3df42db60f7efef3d3440c2434cedd7c163 100644 (file)
@@ -48,7 +48,7 @@ class ModelAPI_AttributeInteger : public ModelAPI_Attribute
   MODELAPI_EXPORT virtual std::string expressionError() = 0;
 
   /// Defines the used parameters
-  MODELAPI_EXPORT virtual 
+  MODELAPI_EXPORT virtual
     void setUsedParameters(const std::set<std::string>& theUsedParameters) = 0;
 
   /// Returns the used parameters
index 39c3f0d6c6460c92f3c959e33255d5a65e2ec170..d3216d15e8863d51d5f9521455099021f37f2dd1 100755 (executable)
@@ -49,27 +49,27 @@ public:
   /// Records the subshape newShape which was generated during a topological construction.
   /// As an example, consider the case of a face generated in construction of a box.
   virtual void generated(
-    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName, 
+    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName,
     const int theTag = 1) = 0;
 
   /// Records the shape newShape which was generated from the shape oldShape during a topological
-  /// construction. As an example, consider the case of a face generated from an edge in 
+  /// construction. As an example, consider the case of a face generated from an edge in
   /// construction of a prism.
   virtual void generated(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
-    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName, 
+    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName,
     const int theTag = 1) = 0;
 
   /// Records the shape newShape which is a modification of the shape oldShape.
   /// As an example, consider the case of a face split or merged in a Boolean operation.
   virtual void modified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
-    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName, 
+    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName,
     const int theTag = 1) = 0;
 
   /// Records the shape oldShape which was deleted from the current label.
   /// As an example, consider the case of a face removed by a Boolean operation.
   virtual void deleted(
     const std::shared_ptr<GeomAPI_Shape>& theOldShape, const int theTag = 1) = 0;
-  
+
   /// load deleted shapes
   virtual void loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
                                                std::shared_ptr<GeomAPI_Shape>  theShapeIn,
@@ -94,18 +94,18 @@ public:
                                                GeomAPI_DataMapOfShapeShape& theSubShapes) = 0;
 
   /// load shapes of the first level (to be used during shape import)
-  virtual void loadFirstLevel(std::shared_ptr<GeomAPI_Shape> theShape, 
+  virtual void loadFirstLevel(std::shared_ptr<GeomAPI_Shape> theShape,
                               const std::string& theName, int&  theTag) = 0;
-  
+
   /// load disconnected edges
-  virtual void loadDisconnectedEdges(std::shared_ptr<GeomAPI_Shape> theShape, 
+  virtual void loadDisconnectedEdges(std::shared_ptr<GeomAPI_Shape> theShape,
                                      const std::string& theName, int&  theTag) = 0;
 
   /// load disconnected vetexes
-  virtual void loadDisconnectedVertexes(std::shared_ptr<GeomAPI_Shape> theShape, 
+  virtual void loadDisconnectedVertexes(std::shared_ptr<GeomAPI_Shape> theShape,
                                         const std::string& theName,int&  theTag) = 0;
 
-  /// Converts evolution of sub-shapes stored in naming structure to selection 
+  /// Converts evolution of sub-shapes stored in naming structure to selection
   /// (theFlag = true) and back (theFlag = false)
   virtual void evolutionToSelection(const bool theFlag) = 0;
 
index 1dadf03d71694007563b6d148c4f73bf5c55c5a7..b5ee9cadd67e079f96b0f303785bd727e75ab0a1 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef ModelAPI_Data_H_
 #define ModelAPI_Data_H_
 
-#ifdef _WINDOWS // to avoid too long decorated name warning 
+#ifdef _WINDOWS // to avoid too long decorated name warning
 #pragma warning( disable : 4503 )
 #endif
 
@@ -75,7 +75,7 @@ class MODELAPI_EXPORT ModelAPI_Data
   /// Returns the attribute that contains selection to a shape
   virtual std::shared_ptr<ModelAPI_AttributeSelection> selection(const std::string& theID) = 0;
   /// Returns the attribute that contains selection to a shape
-  virtual std::shared_ptr<ModelAPI_AttributeSelectionList> 
+  virtual std::shared_ptr<ModelAPI_AttributeSelectionList>
     selectionList(const std::string& theID) = 0;
   /// Returns the attribute that contains reference to an attribute of a feature
   virtual std::shared_ptr<ModelAPI_AttributeRefAttr> refattr(const std::string& theID) = 0;
@@ -152,7 +152,7 @@ class MODELAPI_EXPORT ModelAPI_Data
   virtual const std::set<std::shared_ptr<ModelAPI_Attribute> >& refsToMe() = 0;
 
   /// returns all references by attributes of this data
-  /// \param theRefs returned list of pairs: id of referenced attribute and 
+  /// \param theRefs returned list of pairs: id of referenced attribute and
   ///                list of referenced objects
   virtual void referencesToObjects(
     std::list<std::pair<std::string, std::list<std::shared_ptr<ModelAPI_Object> > > >& theRefs) =0;
index de5ec340e20a066a66497a6f32402a4dacd4b685..8e6f138ad28f901b58ca6dfac58a60a272608ffc 100644 (file)
@@ -49,7 +49,7 @@ public:
   //! Adds to the document the new feature of the given feature id
   //! \param theID creates feature and puts it in the document (if it is not action)
   //! \param theMakeCurrent to make current this new feature in this document
-  virtual std::shared_ptr<ModelAPI_Feature> addFeature(std::string theID, 
+  virtual std::shared_ptr<ModelAPI_Feature> addFeature(std::string theID,
     const bool theMakeCurrent = true) = 0;
 
   //! Return a list of features, which refers to the feature
@@ -65,7 +65,7 @@ public:
   virtual void removeFeature(std::shared_ptr<ModelAPI_Feature> theFeature) = 0;
 
   //! Moves the feature to make it after the given one in the history.
-  virtual void moveFeature(std::shared_ptr<ModelAPI_Feature> theMoved, 
+  virtual void moveFeature(std::shared_ptr<ModelAPI_Feature> theMoved,
                            std::shared_ptr<ModelAPI_Feature> theAfterThis) = 0;
 
   ///! Returns the id of the document
@@ -114,7 +114,7 @@ public:
   virtual std::shared_ptr<ModelAPI_Feature> internalFeature(const int theIndex) = 0;
   //! Performs synchronization of transactions with the module document:
   //! If some document is not active (by undo of activation) but in memory,
-  //! on activation the transactions must be synchronised because all redos performed 
+  //! on activation the transactions must be synchronised because all redos performed
   //! wihtout this participation
   virtual void synchronizeTransactions() = 0;
 
@@ -166,7 +166,7 @@ public:
     const std::shared_ptr<GeomAPI_Shape>& theShape) = 0;
 
   /// Returns true if theLater is in history of features creation later than theCurrent
-  virtual bool isLater(std::shared_ptr<ModelAPI_Feature> theLater, 
+  virtual bool isLater(std::shared_ptr<ModelAPI_Feature> theLater,
                        std::shared_ptr<ModelAPI_Feature> theCurrent) const = 0;
 
   //! Internally makes document know that feature was removed or added in history after creation
index 1eeb029cf9bacd7a68f796fa3ad6462de43ac011..1cdf805119d98c69b1947f42312506f26a6a1ca2 100644 (file)
@@ -229,7 +229,7 @@ void ModelAPI_ReplaceParameterMessage::setObject(ObjectPtr theObject)
 
 
 // =====   ModelAPI_SolverFailedMessage   =====
-ModelAPI_SolverFailedMessage::ModelAPI_SolverFailedMessage(const Events_ID theID, 
+ModelAPI_SolverFailedMessage::ModelAPI_SolverFailedMessage(const Events_ID theID,
                                                            const void* theSender)
   : Events_Message(theID, theSender),
     myDOF(-1)
index 9c1718acb612b19b498409832171e734d27b2c76..f162734b18a14c2cf3338af525b20ba430cb9bf2 100644 (file)
@@ -39,7 +39,7 @@ static const char * EVENT_PLUGIN_LOADED = "PluginLoaded";
 /// The active document becomes another one
 static const char * EVENT_DOCUMENT_CHANGED = "CurrentDocumentChanged";
 
-/// Event ID that order of objects in group is changed, 
+/// Event ID that order of objects in group is changed,
 /// so, tree must be fully rectreated (movement of feature)
 static const char * EVENT_ORDER_UPDATED = "OrderUpdated";
 /// Event ID that the sketch is prepared and all grouped messages for the solver may be flushed
@@ -125,7 +125,7 @@ public:
 class MODELAPI_EXPORT ModelAPI_OrderUpdatedMessage : public Events_Message
 {
 protected:
-  /// Creates a message: 
+  /// Creates a message:
   ModelAPI_OrderUpdatedMessage(const Events_ID theID, const void* theSender = 0);
   /// The virtual destructor
   virtual ~ModelAPI_OrderUpdatedMessage();
index 00e8acc718dc64009bc342673a1413b19a84f439..fd00670cc7618efe8a9260f50b4ff010fde77013 100644 (file)
@@ -48,7 +48,7 @@ class ModelAPI_Expression
   MODELAPI_EXPORT virtual std::string error() = 0;
 
   /// Defines the used parameters (by the parameters listener)
-  MODELAPI_EXPORT virtual 
+  MODELAPI_EXPORT virtual
     void setUsedParameters(const std::set<std::string>& theUsedParameters) = 0;
 
   /// Returns the used parameters
index b275f308feea46b6eb0f8c30f203f682de68551a..3f30c57c7ced69f322ed942666723156a8bdaa82 100644 (file)
@@ -26,7 +26,7 @@ class ModelAPI_Result : public ModelAPI_Object
  public:
 
   /// Reference to the color of the result.
-  /// The integer array is used. It contains tree values for red green and blue values. 
+  /// The integer array is used. It contains tree values for red green and blue values.
   /// The values are in [0, 255] range
   inline static const std::string& COLOR_ID()
   {
@@ -49,7 +49,7 @@ class ModelAPI_Result : public ModelAPI_Object
   MODELAPI_EXPORT virtual void setIsConcealed(const bool theValue);
 
   /// Enables/disables the result. The disabled result does not participate in any calculation
-  /// and visualization: like it was removed. But it keeps the general parameters: colors, 
+  /// and visualization: like it was removed. But it keeps the general parameters: colors,
   /// visibility, etc.
   /// \param theThis pointer to this object, needed to generate all events if it is necessary
   /// \param theFlag makes disabled if it is true
index eb5067d4092727579471efaf5ce6bafd28aaa2a8..e5f023f11c46af0cfd20166a1094dd9af6060b62 100644 (file)
@@ -86,7 +86,7 @@ void ModelAPI_ResultBody::generated(const std::shared_ptr<GeomAPI_Shape>& theNew
 }
 
 void ModelAPI_ResultBody::generated(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
-    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName, 
+    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName,
     const int theTag)
 {
   myBuilder->generated(theOldShape, theNewShape, theName, theTag);
@@ -105,7 +105,7 @@ void ModelAPI_ResultBody::deleted(
 {
   myBuilder->deleted(theOldShape, theTag);
 }
-  
+
 void ModelAPI_ResultBody::loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
                                   std::shared_ptr<GeomAPI_Shape>  theShapeIn,
                                   const int  theKindOfShape,
@@ -116,7 +116,7 @@ void ModelAPI_ResultBody::loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
 
 void ModelAPI_ResultBody::loadAndOrientModifiedShapes (GeomAlgoAPI_MakeShape* theMS,
     std::shared_ptr<GeomAPI_Shape>  theShapeIn, const int  theKindOfShape, const int  theTag,
-    const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes, 
+    const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes,
     const bool theIsStoreSeparate)
 {
   myBuilder->loadAndOrientModifiedShapes(
@@ -131,7 +131,7 @@ void ModelAPI_ResultBody::loadAndOrientGeneratedShapes (GeomAlgoAPI_MakeShape* t
     theMS, theShapeIn, theKindOfShape, theTag, theName, theSubShapes);
 }
 
-void ModelAPI_ResultBody::loadFirstLevel(std::shared_ptr<GeomAPI_Shape> theShape, 
+void ModelAPI_ResultBody::loadFirstLevel(std::shared_ptr<GeomAPI_Shape> theShape,
     const std::string& theName, int&  theTag)
 {
   myBuilder->loadFirstLevel(theShape, theName, theTag);
index 8b532746d234950b1a916716037fef7a51d2a4c3..959259934aa286c0424db13db1969b1f976d8c2a 100644 (file)
@@ -61,7 +61,7 @@ public:
 
   /// \brief Stores the shape (called by the execution method).
   /// param[in] theShape shape to store.
-  /// param[in] theIsStoreSameShapes if false stores reference to the same shape 
+  /// param[in] theIsStoreSameShapes if false stores reference to the same shape
   ///                                if it is already in document.
   MODELAPI_EXPORT virtual void store(const std::shared_ptr<GeomAPI_Shape>& theShape,
                                      const bool theIsStoreSameShapes = true);
@@ -86,11 +86,11 @@ public:
   MODELAPI_EXPORT virtual void generated(const std::shared_ptr<GeomAPI_Shape>& theNewShape,
     const std::string& theName, const int theTag = 1);
 
-  /// Records the shape newShape which was generated from the shape oldShape during a topological 
-  /// construction. As an example, consider the case of a face generated from an edge in 
+  /// Records the shape newShape which was generated from the shape oldShape during a topological
+  /// construction. As an example, consider the case of a face generated from an edge in
   /// construction of a prism.
   MODELAPI_EXPORT virtual void generated(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
-    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName, 
+    const std::shared_ptr<GeomAPI_Shape>& theNewShape, const std::string& theName,
     const int theTag = 1);
 
   /// Records the shape newShape which is a modification of the shape oldShape.
@@ -103,7 +103,7 @@ public:
   /// As an example, consider the case of a face removed by a Boolean operation.
   MODELAPI_EXPORT virtual void deleted(
     const std::shared_ptr<GeomAPI_Shape>& theOldShape, const int theTag = 1);
-  
+
   /// load deleted shapes
   MODELAPI_EXPORT virtual void loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
                                   std::shared_ptr<GeomAPI_Shape>  theShapeIn,
@@ -112,7 +112,7 @@ public:
   /// load and orient modified shapes
   MODELAPI_EXPORT virtual void loadAndOrientModifiedShapes (GeomAlgoAPI_MakeShape* theMS,
     std::shared_ptr<GeomAPI_Shape>  theShapeIn, const int  theKindOfShape, const int  theTag,
-    const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes, 
+    const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes,
     const bool theIsStoreSeparate = false);
   /// load and orient generated shapes
   MODELAPI_EXPORT virtual void loadAndOrientGeneratedShapes (GeomAlgoAPI_MakeShape* theMS,
@@ -120,9 +120,9 @@ public:
     const int  theTag, const std::string& theName, GeomAPI_DataMapOfShapeShape& theSubShapes);
 
   /// load shapes of the first level (to be used during shape import)
-  MODELAPI_EXPORT virtual void loadFirstLevel(std::shared_ptr<GeomAPI_Shape> theShape, 
+  MODELAPI_EXPORT virtual void loadFirstLevel(std::shared_ptr<GeomAPI_Shape> theShape,
     const std::string& theName, int&  theTag);
-  
+
   /// load disconnected edges
   MODELAPI_EXPORT virtual void loadDisconnectedEdges(std::shared_ptr<GeomAPI_Shape> theShape,
     const std::string& theName, int&  theTag);
index 1d66dba1885b03b0d1e751aa403a26abd721de7d..4345f303c81fa33de5942164ce5b79db8b39daad 100644 (file)
@@ -52,7 +52,7 @@ class ModelAPI_ResultPart : public ModelAPI_Result
   /// Returns the part-document of this result
   virtual std::shared_ptr<ModelAPI_Document> partDoc() = 0;
 
-  /// Returns the original part result: for transfomration features results this is 
+  /// Returns the original part result: for transfomration features results this is
   /// the original Part feature result
   virtual std::shared_ptr<ModelAPI_ResultPart> original() = 0;
 
@@ -69,7 +69,7 @@ class ModelAPI_ResultPart : public ModelAPI_Result
   virtual bool updateInPart(const int theIndex) = 0;
 
   /// Applies the additional transformation of the part
-  virtual void setTrsf(std::shared_ptr<ModelAPI_Result> theThis, 
+  virtual void setTrsf(std::shared_ptr<ModelAPI_Result> theThis,
     const std::shared_ptr<GeomAPI_Trsf>& theTransformation) = 0;
 
   /// Returns the shape by the name in the part
index cd2e11acf5300b5d0a07ed21aea5302b50024650..11f3df4c2c55e59316b766a4222ff377f68a0bad 100644 (file)
@@ -60,7 +60,7 @@ std::shared_ptr<ModelAPI_Session> ModelAPI_Session::get()
 }
 
 /// instance of the events creator, one pre application
-const ModelAPI_EventCreator* MY_API_CREATOR = 0;  
+const ModelAPI_EventCreator* MY_API_CREATOR = 0;
 
 const ModelAPI_EventCreator* ModelAPI_EventCreator::get()
 {
index 3b0c4d413ddee0ea7346c415680103899676d307..40984fb03469e9981ef4db83520a3a21f43b5cb3 100644 (file)
@@ -46,14 +46,14 @@ class MODELAPI_EXPORT ModelAPI_Session
 
   //! Starts a new operation (opens a transaction)
   //! \param theId of operation for history (optional)
-  //! \param theAttachedToNested if it is true, 
-  //!          it means that this transaction is attached to the nested 
+  //! \param theAttachedToNested if it is true,
+  //!          it means that this transaction is attached to the nested
   //!          where it is located and will be committed on the next commit with the nested
   virtual void startOperation(
     const std::string& theId = "", const bool theAttachedToNested = false) = 0;
   //! Finishes the previously started operation (closes the transaction)
   virtual void finishOperation() = 0;
-  //! Aborts the operation 
+  //! Aborts the operation
   virtual void abortOperation() = 0;
   //! Returns true if operation has been started, but not yet finished or aborted
   virtual bool isOperation() = 0;
@@ -74,7 +74,7 @@ class MODELAPI_EXPORT ModelAPI_Session
   virtual std::list<std::string> redoList() = 0;
 
   /// Registers the plugin that creates features.
-  /// It is obligatory for each plugin to call this function on loading to be found by 
+  /// It is obligatory for each plugin to call this function on loading to be found by
   /// the plugin manager on call of the feature)
   virtual void registerPlugin(ModelAPI_Plugin* thePlugin) = 0;
 
index 90b84bc9817a919a6abb33d943ddc5235fd7f13e..cc56c2a37f0c38d75aaf5301001fb4a60bbd1df4 100755 (executable)
@@ -104,7 +104,7 @@ void shapesOfType(const FeaturePtr& theFeature,
   }
 }
 
-const char* toString(ModelAPI_ExecState theExecState) 
+const char* toString(ModelAPI_ExecState theExecState)
 {
 #define TO_STRING(__NAME__) case __NAME__: return #__NAME__;
   switch (theExecState) {
@@ -159,7 +159,7 @@ std::string getFeatureError(const FeaturePtr& theFeature)
   return anError;
 }
 
-ObjectPtr objectByName(const DocumentPtr& theDocument, const std::string& theGroup, 
+ObjectPtr objectByName(const DocumentPtr& theDocument, const std::string& theGroup,
                        const std::string& theName)
 {
   for (int anIndex = 0; anIndex < theDocument->size(theGroup); ++anIndex) {
@@ -186,7 +186,7 @@ bool findVariable(const DocumentPtr& theDocument, FeaturePtr theSearcher,
   return true;
 }
 
-bool findVariable(FeaturePtr theSearcher, const std::string& theName, double& outValue, 
+bool findVariable(FeaturePtr theSearcher, const std::string& theName, double& outValue,
                   ResultParameterPtr& theParam, const DocumentPtr& theDocument)
 {
   SessionPtr aSession = ModelAPI_Session::get();
@@ -205,9 +205,9 @@ bool findVariable(FeaturePtr theSearcher, const std::string& theName, double& ou
 
 ResultPtr findPartResult(const DocumentPtr& theMain, const DocumentPtr& theSub)
 {
-  // to optimize and avoid of crash on partset document close 
+  // to optimize and avoid of crash on partset document close
   // (don't touch the sub-document structure)
-  if (theMain != theSub) { 
+  if (theMain != theSub) {
     for (int a = theMain->size(ModelAPI_ResultPart::group()) - 1; a >= 0; a--) {
       ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(
           theMain->object(ModelAPI_ResultPart::group(), a));
@@ -221,7 +221,7 @@ ResultPtr findPartResult(const DocumentPtr& theMain, const DocumentPtr& theSub)
 
 FeaturePtr findPartFeature(const DocumentPtr& theMain, const DocumentPtr& theSub)
 {
-  // to optimize and avoid of crash on partset document close 
+  // to optimize and avoid of crash on partset document close
   // (don't touch the sub-document structure)
   if (theMain != theSub) {
     for (int a = theMain->size(ModelAPI_Feature::group()) - 1; a >= 0; a--) {
@@ -264,7 +264,7 @@ ResultCompSolidPtr compSolidOwner(const ResultPtr& theSub)
   if (aBody.get()) {
     FeaturePtr aFeatureOwner = aBody->document()->feature(aBody);
     if (aFeatureOwner.get()) {
-      std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aResIter = 
+      std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aResIter =
         aFeatureOwner->results().cbegin();
       for(; aResIter != aFeatureOwner->results().cend(); aResIter++) {
         ResultCompSolidPtr aComp = std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(*aResIter);
@@ -369,7 +369,7 @@ bool removeFeatures(const std::set<FeaturePtr>& theFeatures,
     }
   }
   if (isDone && theFlushRedisplay) {
-    // the redisplay signal should be flushed in order to erase 
+    // the redisplay signal should be flushed in order to erase
     // the feature presentation in the viewer
     // if should be done after removeFeature() of document
     Events_Loop::loop()->flush(Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY));
@@ -418,7 +418,7 @@ void addRefsToFeature(const FeaturePtr& theFeature,
 #endif
     if (theReferences.find(aRefFeature) == theReferences.end())
       theReferences.insert(aRefFeature);
-    addRefsToFeature(aRefFeature, theReferencesMap, theProcessedReferences, 
+    addRefsToFeature(aRefFeature, theReferencesMap, theProcessedReferences,
                      theRecLevel, theReferences);
   }
 }
@@ -452,7 +452,7 @@ void findReferences(const std::set<FeaturePtr>& theFeatures,
                                              aLast = aSelRefFeatures.end();
         for (; anIt != aLast; anIt++) {
           FeaturePtr aCFeature = *anIt;
-          CompositeFeaturePtr aComposite = 
+          CompositeFeaturePtr aComposite =
             std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aCFeature);
           if (aComposite.get() && aComposite->isSub(aFeature))
             continue; /// composite of the current feature should be skipped
@@ -462,7 +462,7 @@ void findReferences(const std::set<FeaturePtr>& theFeatures,
       }
       if (theUseRecursion) {
 #ifdef DEBUG_CYCLING_1550
-        findReferences(aSelRefFeatures, theReferences, theUseComposite, 
+        findReferences(aSelRefFeatures, theReferences, theUseComposite,
                        theUseRecursion, theRecLevel);
 #else
         findReferences(theReferences[aFeature], theReferences, theUseComposite, theUseRecursion,
@@ -527,7 +527,7 @@ void findAllReferences(const std::set<FeaturePtr>& theFeatures,
       std::cout << " Ref: " << getFeatureInfo(aFeature) << std::endl;
 #endif
       aRecLevel++;
-      addRefsToFeature(aFeature, aMainList, theReferences, 
+      addRefsToFeature(aFeature, aMainList, theReferences,
                        aRecLevel, aResultRefList/*aMainRefList*/);
     }
     theReferences[aMainListFeature] = aResultRefList;
@@ -555,7 +555,7 @@ void findRefsToFeatures(const std::set<FeaturePtr>& theFeatures,
     std::set<FeaturePtr>::const_iterator aRefIt = aRefList.begin(), aRefLast = aRefList.end();
     for (; aRefIt != aRefLast; aRefIt++) {
       FeaturePtr aRefFeature = *aRefIt;
-      CompositeFeaturePtr aComposite = 
+      CompositeFeaturePtr aComposite =
         std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aRefFeature);
       if (aComposite.get() && aComposite->isSub(aFeature))
         continue; /// composite of the current feature should not be removed
index 2060572394512a05f00a6cc8bcf58e09b1790865..0ee9df16eb88099f48d7db718381ed19f1f2e93c 100755 (executable)
@@ -203,10 +203,10 @@ namespace ModelGeomAlgo_Point2D {
     std::string aValue = "not defined";
     std::string aType = theAttribute->attributeType();
     if (aType == GeomDataAPI_Point2D::typeId()) {
-      std::shared_ptr<GeomDataAPI_Point2D> aPoint = 
+      std::shared_ptr<GeomDataAPI_Point2D> aPoint =
         std::dynamic_pointer_cast<GeomDataAPI_Point2D>(theAttribute);
       if (aPoint.get() && aPoint->isInitialized()) {
-        aValue = std::string("(" + doubleToString(aPoint->x()) + ", "+ 
+        aValue = std::string("(" + doubleToString(aPoint->x()) + ", "+
                              doubleToString(aPoint->y()) + ")");
       }
     }
index aee0ec81176caa341681a879b1fcf057d47ec199..c0b77a6a04c1d24d662b1665852b726884451d15 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Double.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 29/03/16 - Sergey POKHODENKO - Creation of the file
index 3e3b0fee5fdb1d7c9f7547253d8becdeb55a6cbe..a7f20f475837830370ba2c38a192af4c02973315 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Double.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 29/03/16 - Sergey POKHODENKO - Creation of the file
@@ -48,4 +48,4 @@ private:
 
 //--------------------------------------------------------------------------------------
 //--------------------------------------------------------------------------------------
-#endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_DOUBLE_H_ */ 
+#endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_DOUBLE_H_ */
index 2216f59f537b4cc0e4bf1650292e131140097308..2764c17982a162a8a6e7817010128dd8be516513 100644 (file)
@@ -230,13 +230,13 @@ bool ModelHighAPI_Dumper::process(const std::shared_ptr<ModelAPI_Document>& theD
     CompositeFeaturePtr aCompFeat = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(*aFeatIt);
     if (aCompFeat) // iteratively process composite features
       isOk = process(aCompFeat) && isOk;
-    else if (!isDumped(*aFeatIt)) // dump common feature 
+    else if (!isDumped(*aFeatIt)) // dump common feature
       dumpFeature(*aFeatIt);
   }
   return isOk;
 }
 
-bool ModelHighAPI_Dumper::process(const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite, 
+bool ModelHighAPI_Dumper::process(const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite,
                                   bool isForce)
 {
   // increase composite features stack
@@ -351,7 +351,7 @@ bool ModelHighAPI_Dumper::exportTo(const std::string& theFileName)
   for (ModulesMap::const_iterator aModIt = myModules.begin();
        aModIt != myModules.end(); ++aModIt) {
     aFile << "from " << aModIt->first << " import ";
-    if (aModIt->second.empty() || 
+    if (aModIt->second.empty() ||
         aModIt->second.find(std::string()) != aModIt->second.end())
       aFile << "*"; // import whole module
     else {
@@ -426,7 +426,7 @@ void ModelHighAPI_Dumper::dumpEntitySetName()
     }
     // set result deflection
     if (!isDefaultDeflection(*aResIt)) {
-      AttributeDoublePtr aDeflectionAttr = 
+      AttributeDoublePtr aDeflectionAttr =
         (*aResIt)->data()->real(ModelAPI_Result::DEFLECTION_ID());
       if(aDeflectionAttr.get() && aDeflectionAttr->isInitialized()) {
         *this << *aResIt;
@@ -646,7 +646,7 @@ ModelHighAPI_Dumper& ModelHighAPI_Dumper::operator<<(const ResultPtr& theResult)
   FeaturePtr aFeature = ModelAPI_Feature::feature(theResult);
   int anIndex = 0;
   std::list<ResultPtr> aResults = aFeature->results();
-  for(std::list<ResultPtr>::const_iterator 
+  for(std::list<ResultPtr>::const_iterator
       anIt = aResults.cbegin(); anIt != aResults.cend(); ++anIt, ++anIndex) {
     if(theResult->isSame(*anIt)) {
       break;
@@ -788,7 +788,7 @@ ModelHighAPI_Dumper& ModelHighAPI_Dumper::operator<<(
     return *this;
   }
 
-  myDumpBuffer << "\"" << aShape->shapeTypeStr() << "\", \"" << 
+  myDumpBuffer << "\"" << aShape->shapeTypeStr() << "\", \"" <<
     theAttrSelect->namingName() << "\")";
   return *this;
 }
@@ -819,7 +819,7 @@ ModelHighAPI_Dumper& ModelHighAPI_Dumper::operator<<(
     } else {
       isAdded = true;
     }
-    myDumpBuffer << "model.selection(\"" << 
+    myDumpBuffer << "model.selection(\"" <<
       aShape->shapeTypeStr() << "\", \"" << anAttribute->namingName() << "\")";
   }
 
index ace8be67aa5eef858e7157cf15a33445b96928dc..d124548611d8e0d98541c0164c5500b11d310fed 100644 (file)
@@ -76,7 +76,7 @@ public:
 
   /// Add module to list of imported modules
   /// \param theModuleName  name of the module to be imported
-  /// \param theObject      name of the entity to be imported 
+  /// \param theObject      name of the entity to be imported
   ///                       from the module (if empty, while module will be imported)
   MODELHIGHAPI_EXPORT
   void importModule(const std::string& theModuleName,
@@ -84,13 +84,13 @@ public:
 
   /// Returns name of specified entity
   /// \param theEntity        [in] named entity
-  /// \param theSaveNotDumped [in] 
+  /// \param theSaveNotDumped [in]
   ///    if \c true, the entity should be stored as not dumped (will be dumped automatically)
-  /// \param theUseEntityName [in] 
+  /// \param theUseEntityName [in]
   ///    if \c true, the entity name should be used "as is" without changing default name
   /// \return name of the entity
   MODELHIGHAPI_EXPORT
-  const std::string& name(const EntityPtr& theEntity, bool theSaveNotDumped = true, 
+  const std::string& name(const EntityPtr& theEntity, bool theSaveNotDumped = true,
                           bool theUseEntityName = false);
 
   /// Returns name of parent composite feature for specified entity
@@ -188,31 +188,31 @@ public:
   ModelHighAPI_Dumper& operator<<(const ResultPtr& theResult);
 
   /// Dump Attribute
-  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper&
     operator<<(const std::shared_ptr<ModelAPI_Attribute>& theAttr);
   /// Dump Object
-  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper&
     operator<<(const std::shared_ptr<ModelAPI_Object>& theObject);
 
   /// Dump AttributeRefAttr
-  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper&
     operator<<(const std::shared_ptr<ModelAPI_AttributeRefAttr>& theRefAttr);
   /// Dump AttributeRefAttrList as follows:
   /// "[obj1, obj2, obj3, ...]"
-  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper&
     operator<<(const std::shared_ptr<ModelAPI_AttributeRefAttrList>& theRefAttrList);
   /// Dump AttributeRefList as follows:
   /// "[obj1, obj2, obj3, ...]"
-  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper&
     operator<<(const std::shared_ptr<ModelAPI_AttributeRefList>& theRefList);
   /// Dump AttributeSelection
-  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper&
     operator<<(const std::shared_ptr<ModelAPI_AttributeSelection>& theAttrSelect);
   /// Dump AttributeSelectionList
-  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper&
     operator<<(const std::shared_ptr<ModelAPI_AttributeSelectionList>& theAttrSelList);
   /// Dump AttributeReference
-  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper& 
+  MODELHIGHAPI_EXPORT ModelHighAPI_Dumper&
   operator<<(const std::shared_ptr<ModelAPI_AttributeReference>& theReference);
 
   /// Clear dump buffer
@@ -233,14 +233,14 @@ private:
   bool process(const std::shared_ptr<ModelAPI_Document>& theDoc);
 
   /// Dump composite feature and all it sub-features
-  bool process(const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite, 
+  bool process(const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite,
                bool isForce = false);
 
   /// Iterate all features in composite feature and dump them into intermediate buffer
   /// \param theComposite   [in] parent composite feature
   /// \param theDumpModelDo [in] shows that command "model.do()" should be written at the end
   MODELHIGHAPI_EXPORT
-  bool processSubs(const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite, 
+  bool processSubs(const std::shared_ptr<ModelAPI_CompositeFeature>& theComposite,
                    bool theDumpModelDo = false);
 
   /// Check the entity is already dumped
@@ -276,9 +276,9 @@ private:
     EntityPtr            myEntity;   ///< last dumped entity
     bool                 myUserName; ///< the entity hase user-defined name
     /// results of this entity, which has user-defined names or specific colors
-    std::list<ResultPtr> myResults;  
+    std::list<ResultPtr> myResults;
 
-    LastDumpedEntity(EntityPtr theEntity, bool theUserName, 
+    LastDumpedEntity(EntityPtr theEntity, bool theUserName,
       const std::list<ResultPtr>& theResults)
       : myEntity(theEntity), myUserName(theUserName), myResults(theResults)
     {}
@@ -298,7 +298,7 @@ private:
 
 protected:
    /// list of entities, used by other features but not dumped yet
-  std::set<EntityPtr> myNotDumpedEntities; 
+  std::set<EntityPtr> myNotDumpedEntities;
 
   friend class SketchAPI_Sketch;
 };
index 6417e52413adaaba5e0a8716cf63384a6082a657..99f992f49712a81d700b23f259128ac981521f13 100644 (file)
@@ -64,7 +64,7 @@ std::string ModelHighAPI_FeatureStore::compare(FeaturePtr theFeature) {
   for(; aRes != allResults.end() && aResIter != myRes.end(); aRes++, aResIter++) {
     anError = compareData((*aRes)->data(), *aResIter);
     if (!anError.empty())
-      return "Results of feature '" + theFeature->name() + "' '" + (*aRes)->data()->name() + 
+      return "Results of feature '" + theFeature->name() + "' '" + (*aRes)->data()->name() +
       "' differ:" + anError;
   }
   if (aRes != allResults.end()) {
@@ -76,11 +76,11 @@ std::string ModelHighAPI_FeatureStore::compare(FeaturePtr theFeature) {
   return ""; // ok
 }
 
-void ModelHighAPI_FeatureStore::storeData(std::shared_ptr<ModelAPI_Data> theData, 
+void ModelHighAPI_FeatureStore::storeData(std::shared_ptr<ModelAPI_Data> theData,
   std::map<std::string, std::string>& theAttrs)
 {
   // store name to keep also this information and output if needed
-  theAttrs["__name__"] = theData->name(); 
+  theAttrs["__name__"] = theData->name();
   std::list<std::shared_ptr<ModelAPI_Attribute> > allAttrs = theData->attributes("");
   std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = allAttrs.begin();
   for(; anAttr != allAttrs.end(); anAttr++) {
@@ -93,7 +93,7 @@ void ModelHighAPI_FeatureStore::storeData(std::shared_ptr<ModelAPI_Data> theData
   }
 }
 
-std::string ModelHighAPI_FeatureStore::compareData(std::shared_ptr<ModelAPI_Data> theData, 
+std::string ModelHighAPI_FeatureStore::compareData(std::shared_ptr<ModelAPI_Data> theData,
   std::map<std::string, std::string>& theAttrs)
 {
   std::map<std::string, std::string> aThis;
@@ -104,7 +104,7 @@ std::string ModelHighAPI_FeatureStore::compareData(std::shared_ptr<ModelAPI_Data
       return "original model had no attribute '" + aThisIter->first + "'";
     }
     if (theAttrs[aThisIter->first] != aThisIter->second) {
-      return "attribute '" + aThisIter->first + "' is different (original != current) '" + 
+      return "attribute '" + aThisIter->first + "' is different (original != current) '" +
         theAttrs[aThisIter->first] + "' != '" + aThisIter->second + "'";
     }
   }
@@ -118,7 +118,7 @@ std::string ModelHighAPI_FeatureStore::compareData(std::shared_ptr<ModelAPI_Data
   return "";
 }
 
-static void dumpArray(std::ostringstream& theOutput, const double theArray[], 
+static void dumpArray(std::ostringstream& theOutput, const double theArray[],
                       int theSize, int thePrecision = PRECISION)
 {
   for (int i = 0; i < theSize; ++i) {
@@ -144,7 +144,7 @@ std::string ModelHighAPI_FeatureStore::dumpAttr(const AttributePtr& theAttr) {
       return aResult.str();
     } else if (aType == ModelAPI_AttributeString::typeId()) {
       // special case for attribute "SolverError"
-      if (theAttr->id() == "SolverError" && 
+      if (theAttr->id() == "SolverError" &&
           std::dynamic_pointer_cast<ModelAPI_Feature>(theAttr->owner())->getKind() == "Sketch")
         return "";
     }
@@ -195,11 +195,11 @@ std::string ModelHighAPI_FeatureStore::dumpAttr(const AttributePtr& theAttr) {
       aResult<<"__empty__";
     }
   } else if (aType == ModelAPI_AttributeSelection::typeId()) {
-    AttributeSelectionPtr anAttr = 
+    AttributeSelectionPtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttr);
     aResult<<anAttr->namingName();
   } else if (aType == ModelAPI_AttributeSelectionList::typeId()) {
-    AttributeSelectionListPtr anAttr = 
+    AttributeSelectionListPtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttr);
     for(int a = 0; a < anAttr->size(); a++) {
       if (a != 0)
@@ -207,7 +207,7 @@ std::string ModelHighAPI_FeatureStore::dumpAttr(const AttributePtr& theAttr) {
       aResult<<anAttr->value(a)->namingName();
     }
   } else if (aType == ModelAPI_AttributeRefAttr::typeId()) {
-    AttributeRefAttrPtr anAttr = 
+    AttributeRefAttrPtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttr);
     ObjectPtr anObj = anAttr->isObject() ? anAttr->object() : anAttr->attr()->owner();
     if (anObj.get()) {
@@ -219,10 +219,10 @@ std::string ModelHighAPI_FeatureStore::dumpAttr(const AttributePtr& theAttr) {
       aResult<<"__empty__";
     }
   } else if (aType == ModelAPI_AttributeRefList::typeId()) {
-    AttributeRefListPtr anAttr = 
+    AttributeRefListPtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(theAttr);
     // for sketch sub-features the empty values may be skipped and order is not important
-    bool isSketchFeatures = anAttr->id() == "Features" && 
+    bool isSketchFeatures = anAttr->id() == "Features" &&
       std::dynamic_pointer_cast<ModelAPI_Feature>(anAttr->owner())->getKind() == "Sketch";
     std::list<ObjectPtr> aList = anAttr->list();
     std::list<std::string> aResList; // list of resulting strings
@@ -239,7 +239,7 @@ std::string ModelHighAPI_FeatureStore::dumpAttr(const AttributePtr& theAttr) {
       aResult<<*aR<<" ";
     }
   } else if (aType == ModelAPI_AttributeRefAttrList::typeId()) {
-    AttributeRefAttrListPtr anAttr = 
+    AttributeRefAttrListPtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefAttrList>(theAttr);
     std::list<std::pair<ObjectPtr, AttributePtr> > aList = anAttr->list();
     std::list<std::pair<ObjectPtr, AttributePtr> >::iterator aL = aList.begin();
@@ -257,12 +257,12 @@ std::string ModelHighAPI_FeatureStore::dumpAttr(const AttributePtr& theAttr) {
       }
     }
   } else if (aType == ModelAPI_AttributeIntArray::typeId()) {
-    AttributeIntArrayPtr anAttr = 
+    AttributeIntArrayPtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeIntArray>(theAttr);
     for(int a = 0; a < anAttr->size(); a++)
       aResult<<anAttr->value(a)<<" ";
   } else if (aType == ModelAPI_AttributeDoubleArray::typeId()) {
-    AttributeDoubleArrayPtr anAttr = 
+    AttributeDoubleArrayPtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(theAttr);
     for(int a = 0; a < anAttr->size(); a++)
       aResult<<anAttr->value(a)<<" ";
index fbe83c0153a0e3152bdc4188be322eec37effefb..4cd0d0f4c20374d92c2e9bcb2327329c6637e498 100644 (file)
@@ -41,11 +41,11 @@ public:
 
 private:
   /// stores the information about all attributes of data in map
-  void storeData(std::shared_ptr<ModelAPI_Data> theData, 
+  void storeData(std::shared_ptr<ModelAPI_Data> theData,
                  std::map<std::string, std::string>& theAttrs);
   /// compares the information about all attributes of data with map
   /// returns not empty string with error if something is different
-  std::string compareData(std::shared_ptr<ModelAPI_Data> theData, 
+  std::string compareData(std::shared_ptr<ModelAPI_Data> theData,
                  std::map<std::string, std::string>& theAttrs);
   /// dumps the attribute content to the string
   std::string dumpAttr(const AttributePtr& theAttr);
index 047b31abb1e7502fa51bd72dce071ed076454e33..3742dc5fad7487d457225106c3ff0b6bc123f724 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Integer.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 29/03/16 - Sergey POKHODENKO - Creation of the file
index 36be4ca20b705f5fea5acaa7d629ef45535eea4e..35fb0d77f20fd0be0f4cb532b04ab062a812646b 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Integer.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 29/03/16 - Sergey POKHODENKO - Creation of the file
index 4cb6f5293edc191247df1179cf2a90a0fdb54a4c..07fd0249a3df782b9b9226a52924584a1dffb086 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Interface.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 17/05/16 - Sergey POKHODENKO - Creation of the file
index 9cf22791e697fa53bf29e0b066cbcbb60366de91..3c95aa90394fe06f7f20613dcfd05e37a47f1998 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Interface.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 17/05/16 - Sergey POKHODENKO - Creation of the file
index 2b9297018607325021b0cc25d7c050b1906a99c6..e37b2efbb5c36bed6f20fd65f9948a67a5caa9c5 100644 (file)
@@ -44,7 +44,7 @@
   public:
 
 //--------------------------------------------------------------------------------------
-// Used in INTERFACE_N inside START_INIT/END_INIT for 
+// Used in INTERFACE_N inside START_INIT/END_INIT for
 // set variable with attribute received from feature
 #define SET_ATTRIBUTE(NAME, TYPE, ATT_NAME) \
   VAR_NAME(NAME) = std::dynamic_pointer_cast<TYPE>(feature()->attribute(ATT_NAME)); \
index 6d76c152b69ddb6105c4cc70ebd7ee9dfd1dfa68..776f40f4b4adf0226283866f8214d57c470eb7ce 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_RefAttr.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 08/06/16 - Sergey POKHODENKO - Creation of the file
index 3d48f9f5dc04cba03dcbb28959668cfd0cdd8469..d2ada9e9087b21e7d8836b7ed508a9768091310c 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_RefAttr.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 08/06/16 - Sergey POKHODENKO - Creation of the file
@@ -44,11 +44,11 @@ public:
   virtual ~ModelHighAPI_RefAttr();
 
   /// Fill attribute values
-  MODELHIGHAPI_EXPORT virtual 
+  MODELHIGHAPI_EXPORT virtual
     void fillAttribute(const std::shared_ptr<ModelAPI_AttributeRefAttr> & theAttribute) const;
 
   /// Append to list attribute
-  MODELHIGHAPI_EXPORT virtual 
+  MODELHIGHAPI_EXPORT virtual
     void appendToList(const std::shared_ptr<ModelAPI_AttributeRefAttrList> & theAttribute) const;
 
   /// Check the object is empty
index e25d33d4d33965d804f4ed259ae20e1c03441648..5dd16ec3abf4451b0114c5b3bbc81bfa0f57cbba 100644 (file)
@@ -41,7 +41,7 @@ public:
   virtual ~ModelHighAPI_Reference();
 
   /// Fill attribute values
-  MODELHIGHAPI_EXPORT virtual 
+  MODELHIGHAPI_EXPORT virtual
     void fillAttribute(const std::shared_ptr<ModelAPI_AttributeReference> & theAttribute) const;
 
   /// Append to list attribute
index 72bfdff590b80ac694a7cf688e70d0ac2142610a..fb0697635dd2b855552aa3ebd974c3a54e6a6524 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Selection.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 06/06/16 - Sergey POKHODENKO - Creation of the file
@@ -44,10 +44,10 @@ void ModelHighAPI_Selection::fillAttribute(
 {
   switch(myVariantType) {
     case VT_Empty: return;
-    case VT_ResultSubShapePair: 
-      theAttribute->setValue(myResultSubShapePair.first, myResultSubShapePair.second); 
+    case VT_ResultSubShapePair:
+      theAttribute->setValue(myResultSubShapePair.first, myResultSubShapePair.second);
       return;
-    case VT_TypeSubShapeNamePair: 
+    case VT_TypeSubShapeNamePair:
       theAttribute->selectSubShape(myTypeSubShapeNamePair.first, myTypeSubShapeNamePair.second);
       return;
   }
@@ -59,8 +59,8 @@ void ModelHighAPI_Selection::appendToList(
 {
   switch(myVariantType) {
     case VT_Empty: return;
-    case VT_ResultSubShapePair: 
-      theAttribute->append(myResultSubShapePair.first, myResultSubShapePair.second); 
+    case VT_ResultSubShapePair:
+      theAttribute->append(myResultSubShapePair.first, myResultSubShapePair.second);
       return;
     case VT_TypeSubShapeNamePair:
       // Note: the reverse order (first - type, second - sub-shape name)
@@ -91,8 +91,8 @@ TypeSubShapeNamePair ModelHighAPI_Selection::typeSubShapeNamePair() const
 std::string ModelHighAPI_Selection::shapeType() const
 {
   switch(myVariantType) {
-  case VT_ResultSubShapePair: 
-    return myResultSubShapePair.second.get() ? myResultSubShapePair.second->shapeTypeStr() : 
+  case VT_ResultSubShapePair:
+    return myResultSubShapePair.second.get() ? myResultSubShapePair.second->shapeTypeStr() :
                                                myResultSubShapePair.first->shape()->shapeTypeStr();
   case VT_TypeSubShapeNamePair: return myTypeSubShapeNamePair.first;
   }
@@ -125,7 +125,7 @@ void ModelHighAPI_Selection::setDeflection(double theValue)
   if (myVariantType != VT_ResultSubShapePair)
     return;
 
-  AttributeDoublePtr aDeflectionAttr = 
+  AttributeDoublePtr aDeflectionAttr =
     myResultSubShapePair.first->data()->real(ModelAPI_Result::DEFLECTION_ID());
 
   aDeflectionAttr->setValue(theValue);
index c0c65f26e80f442e93424f89f6bd620e956bffdd..db78cb69ee7c3911d1b2ca6cd3bc0e19a7397c46 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Selection.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 06/06/16 - Sergey POKHODENKO - Creation of the file
@@ -20,7 +20,7 @@ class ModelAPI_AttributeSelection;
 class ModelAPI_AttributeSelectionList;
 class ModelAPI_Result;
 //--------------------------------------------------------------------------------------
-typedef std::pair<std::shared_ptr<ModelAPI_Result>, std::shared_ptr<GeomAPI_Shape> > 
+typedef std::pair<std::shared_ptr<ModelAPI_Result>, std::shared_ptr<GeomAPI_Shape> >
   ResultSubShapePair;
 typedef std::pair<std::string, std::string> TypeSubShapeNamePair;
 //--------------------------------------------------------------------------------------
@@ -45,7 +45,7 @@ public:
   /// Constructor for result and sub-shape
   MODELHIGHAPI_EXPORT
   ModelHighAPI_Selection(const std::shared_ptr<ModelAPI_Result>& theContext,
-                         const std::shared_ptr<GeomAPI_Shape>& theSubShape = 
+                         const std::shared_ptr<GeomAPI_Shape>& theSubShape =
                          std::shared_ptr<GeomAPI_Shape>());
   /// Constructor for sub-shape by the textual Name
   MODELHIGHAPI_EXPORT
@@ -56,11 +56,11 @@ public:
   virtual ~ModelHighAPI_Selection();
 
   /// Fill attribute values
-  MODELHIGHAPI_EXPORT virtual 
+  MODELHIGHAPI_EXPORT virtual
     void fillAttribute(const std::shared_ptr<ModelAPI_AttributeSelection> & theAttribute) const;
 
   /// Append to list attribute
-  MODELHIGHAPI_EXPORT virtual 
+  MODELHIGHAPI_EXPORT virtual
     void appendToList(const std::shared_ptr<ModelAPI_AttributeSelectionList> & theAttribute) const;
 
   /// \return variant type.
index 47f432041cb026bf1944ad9e3749c70699c0ba14..db14a4601929044d5ca650fa5af690784a91ef5f 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Services.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 17/06/16 - Sergey POKHODENKO - Creation of the file
@@ -58,7 +58,7 @@ std::string defaultPlane(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
     return std::string();
 
   // XOY or XOZ
-  if (fabs(theNormal->x()) < aTol && 
+  if (fabs(theNormal->x()) < aTol &&
       fabs(theDirX->x() - 1.0) < aTol && fabs(theDirX->y()) < aTol && fabs(theDirX->z()) < aTol) {
     // XOY
     if (fabs(theNormal->y()) < aTol && fabs(theNormal->z() - 1.0) < aTol)
@@ -67,9 +67,9 @@ std::string defaultPlane(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
       return std::string("XOZ");
   }
   // YOZ
-  else if (fabs(theNormal->x() - 1.0) < aTol && 
+  else if (fabs(theNormal->x() - 1.0) < aTol &&
            fabs(theNormal->y()) < aTol && fabs(theNormal->z()) < aTol &&
-           fabs(theDirX->x()) < aTol && fabs(theDirX->y() - 1.0) < aTol && 
+           fabs(theDirX->x()) < aTol && fabs(theDirX->y() - 1.0) < aTol &&
            fabs(theDirX->z()) < aTol)
     return std::string("YOZ");
 
index abb75c38bb4ba6086c27985a56d5db18f005b569..76b914b19ab3d0ba9d588e5426da67e674612f29 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Tools.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 07/06/16 - Sergey POKHODENKO - Creation of the file
@@ -205,7 +205,7 @@ GeomAPI_Shape::ShapeType shapeTypeByStr(std::string theShapeTypeStr)
 {
   GeomAPI_Shape::ShapeType aShapeType = GeomAPI_Shape::SHAPE;
 
-  std::transform(theShapeTypeStr.begin(), theShapeTypeStr.end(), 
+  std::transform(theShapeTypeStr.begin(), theShapeTypeStr.end(),
                  theShapeTypeStr.begin(), ::tolower);
 
   if(theShapeTypeStr == "compound") {
@@ -280,7 +280,7 @@ std::string storeFeatures(const std::string& theDocName, DocumentPtr theDoc,
   for(; allIter != allFeatures.end(); allIter++) {
     FeaturePtr aFeat = *allIter;
     if (theCompare) {
-      std::map<std::string, ModelHighAPI_FeatureStore>::iterator 
+      std::map<std::string, ModelHighAPI_FeatureStore>::iterator
         aFeatFind = aDocFind->second.find(aFeat->name());
       if (aFeatFind == aDocFind->second.end()) {
         return "Document '" + theDocName + "' feature '" + aFeat->name() + "' not found";
@@ -300,7 +300,7 @@ std::string storeFeatures(const std::string& theDocName, DocumentPtr theDoc,
     std::list<ResultPtr>::iterator aRes = allResults.begin();
     for(; aRes != allResults.end(); aRes++) {
       // recoursively store features of sub-documents
-      if ((*aRes)->groupName() == ModelAPI_ResultPart::group()) { 
+      if ((*aRes)->groupName() == ModelAPI_ResultPart::group()) {
         DocumentPtr aDoc = std::dynamic_pointer_cast<ModelAPI_ResultPart>(*aRes)->partDoc();
         if (aDoc.get()) {
           std::string anError = storeFeatures((*aRes)->data()->name(), aDoc, theStore, theCompare);
@@ -321,7 +321,7 @@ std::string storeFeatures(const std::string& theDocName, DocumentPtr theDoc,
           aLostName = aLostIter->first;
         }
       }
-      return "For document '" + theDocName + 
+      return "For document '" + theDocName +
         "' the number of features is decreased, there is no feature '" + aLostName + "'";
     }
   }
index e999efdfcfb6037b7b42f3c35f2cddc1de9389df..74198a3cfb3d31c3f41ef8703d7f40a4a87f3068 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : ModelHighAPI_Tools.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 07/06/16 - Sergey POKHODENKO - Creation of the file
@@ -138,4 +138,4 @@ bool checkPythonDump();
 
 //--------------------------------------------------------------------------------------
 //--------------------------------------------------------------------------------------
-#endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_TOOLS_H_ */ 
+#endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_TOOLS_H_ */
index 436de02dd04df9391cdec8efdbee192c587cd7bc..c3cc22039bf2defbb1ebbe07d10b1e51f68a6a22 100644 (file)
@@ -17,4 +17,4 @@
 #endif
 #endif
 
-#endif //MODULEBASE_H\r
\ No newline at end of file
+#endif //MODULEBASE_H
index d796eb4b3437598f2c6db5ead3edf2f5163e31cd..af40d1607645b1185549cb6701178e57315a83c6 100644 (file)
@@ -31,7 +31,7 @@ struct MODULEBASE_EXPORT ModuleBase_ActionInfo
   bool visible; //!< action's visibility state
 
   //! = true if the acton is a modal dialog box else property panel (==false by default)
-  bool modal;   
+  bool modal;
   QIcon icon; //!< action's icon
   QString text; //!< action's text
   QString iconText; //!< action's descriptive icon text
index 1e148ac72aaad07adc83eef581fd75d43dbe77cc..2e255c1614df078991d062893133c4dcbbafcfab 100644 (file)
 #include <QPushButton>
 
 
-ModuleBase_Dialog::ModuleBase_Dialog(ModuleBase_IWorkshop* theParent, const QString& theId, 
-                                     const std::string& theDescription) : 
-                                     QDialog(theParent->desktop()), 
-                                     myId(theId), 
-                                     myDescription(theDescription), 
+ModuleBase_Dialog::ModuleBase_Dialog(ModuleBase_IWorkshop* theParent, const QString& theId,
+                                     const std::string& theDescription) :
+                                     QDialog(theParent->desktop()),
+                                     myId(theId),
+                                     myDescription(theDescription),
                                      myWorkshop(theParent),
                                      myActiveWidget(0)
 {
index 6112c407a84d88ef6ff5612fc6a332208380f0e4..ac34dd1b729c74772d03fb699c6807ebc9bbdb0c 100644 (file)
@@ -27,7 +27,7 @@ public:
   /// \param theParent a workshop object instance
   /// \param theId an Id of a feature
   /// \param theDescription an XML description of the feature
-  ModuleBase_Dialog(ModuleBase_IWorkshop* theParent, const QString& theId, 
+  ModuleBase_Dialog(ModuleBase_IWorkshop* theParent, const QString& theId,
                     const std::string& theDescription);
 
   /// Redefinition of virtual method
index 89b15fa1402f7e902bf899673188ca019ef4cf57..090cf58f313f407e85842105dde7982de2254806 100644 (file)
@@ -64,12 +64,12 @@ ModuleBase_DoubleSpinBox::ModuleBase_DoubleSpinBox(QWidget* theParent, int thePr
   // VSR 01/07/2010: Disable thousands separator for spin box
   // (to avoid inconsistency of double-2-string and string-2-double conversion)
   QLocale loc;
-  loc.setNumberOptions(loc.numberOptions() | 
-                       QLocale::OmitGroupSeparator | 
+  loc.setNumberOptions(loc.numberOptions() |
+                       QLocale::OmitGroupSeparator |
                        QLocale::RejectGroupSeparator);
   setLocale(loc);
 
-  // MPV 15/09/2014: this must be set before setDecimals; 
+  // MPV 15/09/2014: this must be set before setDecimals;
   // otherwise in release mode setDecimals may crash
   myPrecision = thePrecision;
 
@@ -293,8 +293,8 @@ QValidator::State ModuleBase_DoubleSpinBox::validate(QString& str, int& pos) con
   if (overhead == 0)
     state = v.validate(str, pos);
   else {
-    if ((uint)(str.length()) >= overhead && 
-         str.startsWith(pref) && 
+    if ((uint)(str.length()) >= overhead &&
+         str.startsWith(pref) &&
          str.right(suff.length()) == suff) {
       QString core = str.mid(pref.length(), str.length() - overhead);
       int corePos = pos - pref.length();
@@ -364,7 +364,7 @@ bool ModuleBase_DoubleSpinBox::enableKeyPressEvent(const bool& theEnable)
 void ModuleBase_DoubleSpinBox::setValueEnabled(const bool& theEnable)
 {
   setReadOnly(!theEnable);
-  
+
   QPalette aPal = palette();
   aPal.setColor(QPalette::All, QPalette::Base,
                 theEnable? myEnabledBaseColor : aPal.color(QPalette::Disabled, QPalette::Base));
index c26d17f038ecc4627ca46c3f128ea8bb5c9a93f6..982b1088d264ec4a9d1d5fea2e636ae913e9c164 100644 (file)
@@ -57,7 +57,7 @@ Q_OBJECT
   bool enableKeyPressEvent(const bool& theEnable);
 
   /// Imitation of disable control value. If theEnable is false, the control becomes
-  /// read only and base color is disabled. 
+  /// read only and base color is disabled.
   void setValueEnabled(const bool& theEnable);
 
 signals:
index e7a1a639bf486472b99f4dca491f80599c9084e7..d3a58db9a24240e03658097de450ed72e9bb77a7 100644 (file)
@@ -48,7 +48,7 @@ protected:
 
 protected:
   /// current instance of the OCC selection filter
-  Handle(SelectMgr_Filter) myFilter; 
+  Handle(SelectMgr_Filter) myFilter;
 };
 
 #endif //ModuleBase_Filter
index 7337c22591bfed26c3425f1e1bb0d9a9146aaff5..b30ad90f5e356c36665a2055acee23c1cbca8008 100644 (file)
@@ -19,7 +19,7 @@ void ModuleBase_FilterFactory::registerFilter(const std::string& theID,
                                               ModuleBase_Filter* theFilter)
 {
   if (myIDs.find(theID) != myIDs.end()) {
-    Events_InfoMessage("ModuleBase_FilterFactory", 
+    Events_InfoMessage("ModuleBase_FilterFactory",
       "Filter %1 is already registered").arg(theID).send();
   } else {
     myIDs[theID] = theFilter;
@@ -54,7 +54,7 @@ void ModuleBase_FilterFactory::filters(const std::string& theFeatureID,
 {
   SelectMgr_ListOfFilter aFilters;
 
-  std::map<std::string, std::map<std::string, AttrFilters> >::const_iterator aFeature = 
+  std::map<std::string, std::map<std::string, AttrFilters> >::const_iterator aFeature =
     myAttrs.find(theFeatureID);
   if (aFeature != myAttrs.cend()) {
     std::map<std::string, AttrFilters>::const_iterator anAttr = aFeature->second.find(theAttrID);
index ac8de70791714f1e38e95b6d31b285abcea9e9ab..2d7f92f8334d35c75c51e68bd6aaf58bcc7ff364 100644 (file)
@@ -39,7 +39,7 @@ public:
    * \param theOwner the result of selection
    * \return whether the owner is selectable in the viewer
   */
-  Standard_EXPORT virtual 
+  Standard_EXPORT virtual
     Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
   DEFINE_STANDARD_RTTI(ModuleBase_FilterValidated)
index 293c2b80f9b98a78ada27b13871953b8ff1d61e5..d33d88992f5a4a469c707f13c806b73585825621 100644 (file)
@@ -23,7 +23,7 @@ ModuleBase_IErrorMgr::~ModuleBase_IErrorMgr()
 
 void ModuleBase_IErrorMgr::setPropertyPanel(ModuleBase_IPropertyPanel* theProp)
 {
-  myPropertyPanel = theProp; 
+  myPropertyPanel = theProp;
 
   if (myPropertyPanel) {
     foreach(const ModuleBase_ModelWidget* aWgt, myPropertyPanel->modelWidgets()) {
index 6327f8c100843697de958302c04cd0596f2d66e0..a96d676e5fb28ea55f560b954a9d06ecaaedf8d1 100644 (file)
@@ -32,7 +32,7 @@
 #include <QPushButton>
 
 ModuleBase_IModule::ModuleBase_IModule(ModuleBase_IWorkshop* theParent)
-  : QObject(theParent), myWorkshop(theParent) 
+  : QObject(theParent), myWorkshop(theParent)
 {
   connect(myWorkshop, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged()));
 
@@ -72,11 +72,11 @@ void ModuleBase_IModule::launchModal(const QString& theCmdId)
 void ModuleBase_IModule::launchOperation(const QString& theCmdId)
 {
   /// selection should be obtained from workshop before ask if the operation can be started as
-  /// the canStartOperation method performs commit/abort of previous operation. 
+  /// the canStartOperation method performs commit/abort of previous operation.
   /// Sometimes commit/abort may cause selection clear(Sketch operation) as a result
   /// it will be lost and is not used for preselection.
   ModuleBase_ISelection* aSelection = myWorkshop->selection();
-  QList<ModuleBase_ViewerPrsPtr> aPreSelected = 
+  QList<ModuleBase_ViewerPrsPtr> aPreSelected =
     aSelection->getSelected(ModuleBase_ISelection::AllControls);
 
   if (!myWorkshop->canStartOperation(theCmdId))
@@ -235,7 +235,7 @@ bool ModuleBase_IModule::canActivateSelection(const ObjectPtr& theObject) const
   return !aFOperation || !aFOperation->hasObject(theObject);
 }
 
-void ModuleBase_IModule::operationResumed(ModuleBase_Operation* theOperation) 
+void ModuleBase_IModule::operationResumed(ModuleBase_Operation* theOperation)
 {
   emit resumed(theOperation);
 }
index d4393e3ac361146f619c848f2cb3bdcc74810409..b74ea6c074942d7998c0f57d6b212942f6783540 100755 (executable)
@@ -66,13 +66,13 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject
   /// Restores the current selection
   virtual void restoreSelection() {};
 
-  /// Reads description of features from XML file 
+  /// Reads description of features from XML file
   virtual void createFeatures();
 
   /// Called on creation of menu item in desktop
   virtual void actionCreated(QAction*);
 
-  /// Launching of a edit operation on the feature 
+  /// Launching of a edit operation on the feature
   /// \param theFeature feature for editing
   virtual void editFeature(FeaturePtr theFeature);
 
@@ -126,9 +126,9 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject
   /// Creates custom widgets for property panel
   /// \param theType a type of widget
   /// \param theParent the parent object
-  /// \param theWidgetApi the widget configuration. 
+  /// \param theWidgetApi the widget configuration.
   ///                     The attribute of the model widget is obtained from
-  virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType, 
+  virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType,
                                                      QWidget* theParent,
                                                      Config_WidgetAPI* theWidgetApi)
   {
@@ -145,7 +145,7 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject
   /// It is called as on clearing of property panel as on filling with new widgets
   virtual void propertyPanelDefined(ModuleBase_Operation* theOperation) {}
 
-  /// Have an opportunity to create widgets for the current operation 
+  /// Have an opportunity to create widgets for the current operation
   /// instead of standard creation in workshop
   /// \param theOperation a started operation
   /// \param theWidgets a list of created widgets
@@ -207,7 +207,7 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject
   /// Return true if the custom presentation is activated
   /// \param theFlag a flag of level of customization, which means that only part of sub-elements
   /// \return boolean value
-  virtual bool isCustomPrsActivated(const ModuleBase_CustomizeFlag& theFlag) const 
+  virtual bool isCustomPrsActivated(const ModuleBase_CustomizeFlag& theFlag) const
   { return false; };
 
   /// Activate custom presentation for the object. Default realization is empty.
@@ -225,7 +225,7 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject
                                    const bool theUpdateViewer) {}
 
   /// Modifies the given presentation in the custom way.
-  virtual bool customisePresentation(std::shared_ptr<ModelAPI_Result> theResult, 
+  virtual bool customisePresentation(std::shared_ptr<ModelAPI_Result> theResult,
                                      AISObjectPtr thePrs,
                                      GeomCustomPrsPtr theCustomPrs) { return false; };
 
index 3d4e7cefddded08acd1b920dc654137d5c43f956..78e6e5fe9f4d326f9325c28863dc1ed2aeb4c76c 100644 (file)
@@ -36,7 +36,7 @@ public:
   * \param theName - name of the resource
   * Returns Id of the ctreated item
   */
-  virtual int addPreference(const QString& theLbl, int pId, 
+  virtual int addPreference(const QString& theLbl, int pId,
                             SUIT_PreferenceMgr::PrefItemType theType,
                             const QString& theSection, const QString& theName ) = 0;
 
index f463cefbed9bf7fd657e2eecc3d90455d9859da9..58683af4178d1b6233eb92ab437acf469f182f6b 100644 (file)
@@ -64,11 +64,11 @@ public:
   /// Sets widget processed by preselection
   virtual void setPreselectionWidget(ModuleBase_ModelWidget* theWidget) = 0;
 
-  /// Returns the first widget, where canAcceptFocus returns true 
+  /// Returns the first widget, where canAcceptFocus returns true
   /// \return a widget or null
   ModuleBase_ModelWidget* findFirstAcceptingValueWidget();
 
-  /// Returns the first widget, where canAcceptFocus returns true 
+  /// Returns the first widget, where canAcceptFocus returns true
   /// \return a widget or null
   static ModuleBase_ModelWidget* findFirstAcceptingValueWidget(
                           const QList<ModuleBase_ModelWidget*>& theWidgets);
index a8c2707c4337285afb4329c206c7571c7c0a0db9..62e017eea23fe6376e83122eb9f3b0f8bd5f7f04 100644 (file)
@@ -37,10 +37,10 @@ class ModuleBase_ISelection
 
   /// Returns a list of viewer selected presentations
   /// \return list of presentations
-  virtual QList<std::shared_ptr<ModuleBase_ViewerPrs>> 
+  virtual QList<std::shared_ptr<ModuleBase_ViewerPrs>>
     getSelected(const SelectionPlace& thePlace = Browser) const = 0;
 
-  /// The values are appended to the first parameter list if the first list does not contain 
+  /// The values are appended to the first parameter list if the first list does not contain
   /// an item with the same object
   /// \param theValues a list of new values
   /// \param theValuesTo a list, that will be changed
@@ -95,7 +95,7 @@ class ModuleBase_ISelection
   //! Return the IO from the viewer presentation.
   //! \param thePrs a selected object
   //! \return an interactive object
-  virtual MODULEBASE_EXPORT 
+  virtual MODULEBASE_EXPORT
     Handle(AIS_InteractiveObject) getIO(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs) = 0;
 
   //! Wraps the object list into the viewer prs list
index 597d884a35c9596accb00dc3337b37efbec19374..ed767e03269c4d24885190d49b5029aade615cb2 100644 (file)
@@ -20,7 +20,7 @@ public:
   ModuleBase_IViewWindow();
   /// Virtual destructor
   virtual ~ModuleBase_IViewWindow();
-  
+
   /// Returns OCCT object which contains 3d view object
   virtual Handle(V3d_View) v3dView() const = 0;
 
index d8a20cb428668a0fa90cf712597c3f13dab210cc..c2f46ed9cd9980c441bcc929cfe0abf8ddd08f7f 100644 (file)
@@ -101,10 +101,10 @@ Q_OBJECT
   /// Remember a scale factor for the view object
   /// \param theView a view object
   /// \param theVal a scale factor
-  void SetScale(const Handle(V3d_View)& theView, const double theVal) 
+  void SetScale(const Handle(V3d_View)& theView, const double theVal)
   { myWindowScale[theView] = theVal; }
 
-  /// Method returns True if the viewer can process editing objects 
+  /// Method returns True if the viewer can process editing objects
   /// by mouse drugging. If this is impossible thet it has to return False.
   virtual bool canDragByMouse() const { return true; }
 
index 5588ef63c044a4847b1549242a94f97bbebd6349..356196f0c99c477a29a169e9238013d35c44a09c 100644 (file)
@@ -69,7 +69,7 @@ Q_OBJECT
 
   //! Returns the factory of selection filters : the only one instance per application
   ModuleBase_FilterFactory* selectionFilters() const;
-  
+
   //! Returns currently active operation
   virtual ModuleBase_Operation* currentOperation() const = 0;
 
@@ -102,7 +102,7 @@ Q_OBJECT
   //! \param theAIS a presentation
   virtual ObjectPtr findPresentedObject(const AISObjectPtr& theAIS) const = 0;
 
-  //! Select features clearing previous selection. 
+  //! Select features clearing previous selection.
   //! If the list is empty then selection will be cleared
   //! \param theValues a list of presentations
   virtual void setSelected(const QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues) = 0;
index 06d3729e56f890e060714f711100b2ef1727e81a..91c83708ba3768d4d5c1690037fdb7a3d2ea8bf7 100644 (file)
@@ -44,7 +44,7 @@ Q_OBJECT
    enum EnableState { On,  /// the widget value is always enabled
                       Off, /// the widget value is always disabled
                       /// the widget value enable state is defined in preferences
-                      DefinedInPreferences }; 
+                      DefinedInPreferences };
 
   /// Constructor
   /// \param theParent the parent object
@@ -77,13 +77,13 @@ Q_OBJECT
   /// \return the boolean result
   bool isInternal() const { return myIsInternal; }
 
-  /// Returns true, if the obligatory value of the widget is 
+  /// Returns true, if the obligatory value of the widget is
   /// not defined in the XML or has true value
   /// \return the boolean result
   bool isObligatory() const { return myIsObligatory; }
 
-  /// Returns true, if the widget value is enabled and might be modified manualy. 
-  /// It returns false if the application preferences allow having disabled value 
+  /// Returns true, if the widget value is enabled and might be modified manualy.
+  /// It returns false if the application preferences allow having disabled value
   /// and the internal state tells to disable
   /// \return the boolean result
   virtual bool isValueEnabled() const;
@@ -130,7 +130,7 @@ Q_OBJECT
   /// \param theValues a list of presentations
   virtual void getHighlighted(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues) {};
 
-  /// Checks if the selection presentation is valid in widget 
+  /// Checks if the selection presentation is valid in widget
   /// \param theValue a selected presentation in the view
   /// \return a boolean value
   virtual bool isValidSelectionCustom(const std::shared_ptr<ModuleBase_ViewerPrs>& theValue)
@@ -139,7 +139,7 @@ Q_OBJECT
   /// Returns widget validator, by default it is NULL. To be created in a child if necessary
   ModuleBase_WidgetValidator* widgetValidator() { return myWidgetValidator; }
 
-  /// Restore value from attribute data to the widget's control. 
+  /// Restore value from attribute data to the widget's control.
   /// Emits signals before and after store
   /// \return True in success
   bool restoreValue();
@@ -148,7 +148,7 @@ Q_OBJECT
   /// \return True in success
   bool storeValue();
 
-  /// Set focus to the first control of the current widget. 
+  /// Set focus to the first control of the current widget.
   /// The focus policy of the control is checked.
   /// If the widget has the NonFocus focus policy, it is skipped.
   /// \return the state whether the widget can accept the focus
@@ -320,7 +320,7 @@ protected slots:
   FeaturePtr myFeature;
 
   /// Flag which shows that current operation is in editing mode
-  bool myIsEditing; 
+  bool myIsEditing;
 
   /// Flag which shows whether current widget is obligatory
   /// The non-obligatory widgets should not accept the focus in the property panel
@@ -336,7 +336,7 @@ private:
   /// Value should be computed on execute, like radius for circle's constraint (can not be zero)
   bool myIsComputedDefault;
 
-  /// the default value, which is defined in the XML for this attribute    
+  /// the default value, which is defined in the XML for this attribute
   std::string myDefaultValue;
 
   /// an XML internal state
index af08c48fd0d23ab1fe601447a8c084a49e278dd5..853d9fc5fd6503ac65c83b7d8cd0fa8204ad9984 100644 (file)
@@ -153,9 +153,9 @@ void ModuleBase_Operation::onValueStateChanged(int thePreviousState)
   }
 }
 
-void ModuleBase_Operation::setPropertyPanel(ModuleBase_IPropertyPanel* theProp) 
-{ 
-  myPropertyPanel = theProp; 
+void ModuleBase_Operation::setPropertyPanel(ModuleBase_IPropertyPanel* theProp)
+{
+  myPropertyPanel = theProp;
 }
 
 bool ModuleBase_Operation::isGranted(QString theId) const
index 2e04b5b07f8f5fc1f5cb49ebd792b31418951a0d..fb47d268b9b122286682f8149b9c2081f24e6cb4 100644 (file)
@@ -64,7 +64,7 @@ Q_OBJECT
   void setGrantedOperationIds(const QStringList& theList);
 
   /// Must return true if this operation can be launched as nested for any current operation
-  /// and it is not necessary to check this operation on validity. By default 
+  /// and it is not necessary to check this operation on validity. By default
   /// the operation is not granted.
   /// The method has to be redefined for granted operations.
   virtual bool isGranted(QString theId) const;
index ed025343d2532de5eae9bfe1f216e7fd67b0b406..953b86727fef6ab36da0e2313652dce14dcbc3b9 100755 (executable)
@@ -20,7 +20,7 @@ ModuleBase_OperationAction::~ModuleBase_OperationAction()
 
 bool ModuleBase_OperationAction::commit()
 {
-  // the action is supposed to perform a single modification, 
+  // the action is supposed to perform a single modification,
   // so the operation returns modified state
   setIsModified(true);
 
index 3fdc27b1d32f95254e013d9cfd0053daf5a0119e..18fde94b4e4088e0b68d6962e7d4e66c88e8f0c3 100644 (file)
@@ -62,13 +62,13 @@ class MODULEBASE_EXPORT ModuleBase_OperationDescription
  private:
   //!< Next fields could be extracted into a subclass;
    /// the operation identifier
-  QString myOperationId;  
+  QString myOperationId;
 
   /// the short description of the opertaion
-  QString myDescription;  
+  QString myDescription;
 
   /// the xml definition
-  QString myXmlRepresentation;  
+  QString myXmlRepresentation;
 };
 
 #endif //ModuleBase_OperationDescription_H
index 406d8b3a918b1eb06879950ce5f7487cf50b5ab8..099d42b6fc282dd0aa6c0a9ba782fa260136be53 100755 (executable)
@@ -206,13 +206,13 @@ bool ModuleBase_OperationFeature::hasObject(ObjectPtr theObj) const
     }
 #ifdef DEBUG_DO_NOT_ACTIVATE_SUB_FEATURE
     if (aFeature->isMacro()) {
-      // macro feature may refers to sub-features, 
+      // macro feature may refers to sub-features,
       // which also should be deactivated when the operation
       // is active, e.g. rectangle'lines.
       FeaturePtr anObjectFeature = ModelAPI_Feature::feature(theObj);
       std::list<AttributePtr> anAttributes = aFeature->data()->attributes(
                                               ModelAPI_AttributeRefList::typeId());
-      std::list<AttributePtr>::const_iterator 
+      std::list<AttributePtr>::const_iterator
         anIt = anAttributes.begin(), aLast = anAttributes.end();
       bool aFoundObject = false;
       for (; anIt != aLast && !aFoundObject; anIt++) {
@@ -464,7 +464,7 @@ void ModuleBase_OperationFeature::initSelection(
     for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt)
       aCurrentFeatureResults.append(*aIt);
   }
-  
+
   if (aCurrentFeatureResults.empty()) /// filtering of selection is not necessary
     setPreselection(thePreSelected);
   else { // create preselection list without results of current feature
@@ -488,7 +488,7 @@ void ModuleBase_OperationFeature::clearPreselection()
   myPreSelection.clear();
 }
 
-void ModuleBase_OperationFeature::setPropertyPanel(ModuleBase_IPropertyPanel* theProp) 
+void ModuleBase_OperationFeature::setPropertyPanel(ModuleBase_IPropertyPanel* theProp)
 {
   ModuleBase_Operation::setPropertyPanel(theProp);
 
@@ -505,7 +505,7 @@ void ModuleBase_OperationFeature::setPropertyPanel(ModuleBase_IPropertyPanel* th
   }
 
   // Do not activate widgets by default if the current operation is editing operation
-  // Because we don't know which widget is going to be edited. 
+  // Because we don't know which widget is going to be edited.
   if (!isEditOperation()) {
     // 4. activate the first obligatory widget
     theProp->activateNextWidget(NULL);
index 7e1ffb291a4d600b7787bbd7a392810f5eaab918..a13b2fa80e5b49c24a542b909a2ed96852a64c2d 100755 (executable)
@@ -114,7 +114,7 @@ Q_OBJECT
   virtual ModuleBase_ModelWidget* activateByPreselection(const std::string& theGreedAttributeId);
 
   /// If the operation works with feature which is sub-feature of another one
-  /// then this variable has to be initialised by parent feature 
+  /// then this variable has to be initialised by parent feature
   /// before operation feature creating
   void setParentFeature(CompositeFeaturePtr theParent);
 
@@ -175,11 +175,11 @@ Q_OBJECT
   /// Editing feature flag
   bool myIsEditing;
 
-  /// List of pre-selected object 
+  /// List of pre-selected object
   QList<std::shared_ptr<ModuleBase_ViewerPrs>> myPreSelection;
 
   /// If the operation works with feature which is sub-feature of another one
-  /// then this variable has to be initialised by parent feature 
+  /// then this variable has to be initialised by parent feature
   /// before operation feature creating
   CompositeFeaturePtr myParentFeature;
 
index 272cb38472994fa70181a6ea05e83a285fa41c66..daf1bd034e5dbf61f8b64047e6d61f51659e161b 100644 (file)
@@ -59,9 +59,9 @@ void ModuleBase_PageBase::clearPage()
 
   // Issue #460: this patch is necessary since the row stretch information
   // is stored independently on the items: when the items are removed
-  // from the layout the stretch information is kept, so in the next 
+  // from the layout the stretch information is kept, so in the next
   // filling of the layout some "additional" (old) rows may be stretched
-  // without necessity. 
+  // without necessity.
   // In this patch we clear the stretch information specifying the default value: 0.
   QGridLayout* aLayout = dynamic_cast<QGridLayout*>( pageLayout() );
   if( aLayout )
index 0ae12a1fa4590e39a743ade107a91be35c7edcf8..42d48907f6a4cead710bdbf9253e6de3be06e751 100644 (file)
@@ -18,7 +18,7 @@
 #include <QVBoxLayout>
 
 
-ModuleBase_PagedContainer::ModuleBase_PagedContainer(QWidget* theParent, 
+ModuleBase_PagedContainer::ModuleBase_PagedContainer(QWidget* theParent,
                                                      const Config_WidgetAPI* theData)
 : ModuleBase_ModelWidget(theParent, theData),
   myIsFocusOnCurrentPage(false)
index e26cf8d34f02ef2850d1a0f33012e0ea8ef20d53..998665852f2e888f6d9a26d91379df4dc6319f7d 100644 (file)
@@ -189,7 +189,7 @@ public:
   /// \param theMgr a preferences manager
   ModuleBase_PrefMgr(ModuleBase_PreferencesMgr* theMgr):myMgr(theMgr) {}
 
-  virtual int addPreference(const QString& theLbl, int pId, 
+  virtual int addPreference(const QString& theLbl, int pId,
                             SUIT_PreferenceMgr::PrefItemType theType,
                             const QString& theSection, const QString& theName )
   {
@@ -210,7 +210,7 @@ private:
 //**********************************************************
 //**********************************************************
 //**********************************************************
-ModuleBase_PreferencesDlg::ModuleBase_PreferencesDlg(SUIT_ResourceMgr* theResurces, 
+ModuleBase_PreferencesDlg::ModuleBase_PreferencesDlg(SUIT_ResourceMgr* theResurces,
   QWidget* theParent)
     : QDialog(theParent),
       myIsChanged(false)
@@ -294,13 +294,13 @@ void ModuleBase_PreferencesDlg::createViewerPage(int thePageId)
   // Create other parameters group in viewer tab
   int selectionGroup = myPreferences->addItem(tr("Default selection"), viewTab);
   myPreferences->setItemProperty("columns", 3, selectionGroup);
-  myPreferences->addItem(tr("Faces"), selectionGroup, 
+  myPreferences->addItem(tr("Faces"), selectionGroup,
                          SUIT_PreferenceMgr::Bool,
                          ModuleBase_Preferences::VIEWER_SECTION, "face-selection");
-  myPreferences->addItem(tr("Edges"), selectionGroup, 
+  myPreferences->addItem(tr("Edges"), selectionGroup,
                          SUIT_PreferenceMgr::Bool,
                          ModuleBase_Preferences::VIEWER_SECTION, "edge-selection");
-  myPreferences->addItem(tr("Vertices"), selectionGroup, 
+  myPreferences->addItem(tr("Vertices"), selectionGroup,
                          SUIT_PreferenceMgr::Bool,
                          ModuleBase_Preferences::VIEWER_SECTION, "vertex-selection");
 
@@ -320,7 +320,7 @@ void ModuleBase_PreferencesDlg::createMenuPage(int thePageId)
   myPreferences->setItemProperty("columns", 1, aSizeGroup);
 
   int aRowsNb = myPreferences->addItem(tr("Number of rows"), aSizeGroup,
-                                       SUIT_PreferenceMgr::IntSpin, 
+                                       SUIT_PreferenceMgr::IntSpin,
                                        ModuleBase_Preferences::MENU_SECTION,
                                        "rows_number");
   myPreferences->setItemProperty("min", 1, aRowsNb);
index cae9af663199dc61fb451c767a5dbf844a4db024..d666868a579481ce300f881d528a7b9df3ae1c55 100644 (file)
@@ -146,7 +146,7 @@ protected slots:
 
    /// Create a viewer page in dialog box
    void createViewerPage(int thePageId);
-   
+
    /// Create menu properties page in the dialog box
    void createMenuPage(int thePageId);
 
index 3a29f95aac8f4063c494af477f8e75dcab820395..19ceb3e9b7374306d4f57c0cb6f898772d671836 100755 (executable)
@@ -52,7 +52,7 @@ ModuleBase_ResultPrs::ModuleBase_ResultPrs(ResultPtr theResult)
   TopoDS_Shape aShape = aShapePtr->impl<TopoDS_Shape>();
   Set(aShape);
   Handle(Prs3d_Drawer) aDrawer = Attributes();
-  if (aDrawer->HasOwnPointAspect()) 
+  if (aDrawer->HasOwnPointAspect())
     aDrawer->PointAspect()->SetTypeOfMarker(Aspect_TOM_PLUS);
   else
     aDrawer->SetPointAspect(new Prs3d_PointAspect(Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.));
@@ -71,7 +71,7 @@ void ModuleBase_ResultPrs::setAdditionalSelectionPriority(const int thePriority)
 
 void ModuleBase_ResultPrs::Compute(
           const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-          const Handle(Prs3d_Presentation)& thePresentation, 
+          const Handle(Prs3d_Presentation)& thePresentation,
           const Standard_Integer theMode)
 {
   std::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(myResult);
@@ -86,7 +86,7 @@ void ModuleBase_ResultPrs::Compute(
   AIS_Shape::Compute(thePresentationManager, thePresentation, theMode);
 
   if (!aReadyToDisplay) {
-    Events_InfoMessage("ModuleBase_ResultPrs", 
+    Events_InfoMessage("ModuleBase_ResultPrs",
                        "An empty AIS presentation: ModuleBase_ResultPrs").send();
     static const Events_ID anEvent = Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION);
     ModelAPI_EventCreator::get()->sendUpdated(myResult, anEvent);
@@ -123,13 +123,13 @@ void ModuleBase_ResultPrs::ComputeSelection(const Handle(SelectMgr_Selection)& a
         TopoDS_Shape aShape = aShapePtr->impl<TopoDS_Shape>();
         int aPriority = StdSelect_BRepSelectionTool::GetStandardPriority(aShape, TopAbs_COMPSOLID);
         /// It is important to have priority for the shape of comp solid result less than priority
-        /// for the presentation shape which is a sub-result. 
+        /// for the presentation shape which is a sub-result.
         /// Reason is to select the sub-objects before: #1592
         aPriority = aPriority - 1;
         double aDeflection = Prs3d::GetDeflection(aShape, myDrawer);
 
         Handle(ModuleBase_BRepOwner) aOwner = new ModuleBase_BRepOwner(aShape, aPriority);
-        StdSelect_BRepSelectionTool::ComputeSensitive(aShape, aOwner, aSelection, 
+        StdSelect_BRepSelectionTool::ComputeSensitive(aShape, aOwner, aSelection,
           aDeflection, myDrawer->HLRAngle(), 9, 500);
 
         for (aSelection->Init(); aSelection->More(); aSelection->Next()) {
@@ -142,12 +142,12 @@ void ModuleBase_ResultPrs::ComputeSelection(const Handle(SelectMgr_Selection)& a
       }
     }
     //AIS_Shape::ComputeSelection(aSelection, 0);
-  } 
+  }
   AIS_Shape::ComputeSelection(aSelection, aMode);
 
   if (myAdditionalSelectionPriority > 0) {
     for (aSelection->Init(); aSelection->More(); aSelection->Next()) {
-      Handle(SelectBasics_EntityOwner) aBasicsOwner = 
+      Handle(SelectBasics_EntityOwner) aBasicsOwner =
         aSelection->Sensitive()->BaseSensitive()->OwnerId();
       if (!aBasicsOwner.IsNull())
         aBasicsOwner->Set(aBasicsOwner->Priority() + myAdditionalSelectionPriority);
@@ -174,7 +174,7 @@ void ModuleBase_ResultPrs::appendWiresSelection(const Handle(SelectMgr_Selection
   }
 }
 
-void ModuleBase_ResultPrs::HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM, 
+void ModuleBase_ResultPrs::HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM,
                                            const SelectMgr_SequenceOfOwner& theOwners)
 {
   Handle(SelectMgr_EntityOwner) anOwner;
@@ -198,9 +198,9 @@ void ModuleBase_ResultPrs::HilightSelected(const Handle(PrsMgr_PresentationManag
     }
   }
 }
-  
-void ModuleBase_ResultPrs::HilightOwnerWithColor(const Handle(PrsMgr_PresentationManager3d)& thePM, 
-                                                 const Quantity_NameOfColor theColor, 
+
+void ModuleBase_ResultPrs::HilightOwnerWithColor(const Handle(PrsMgr_PresentationManager3d)& thePM,
+                                                 const Quantity_NameOfColor theColor,
                                                  const Handle(SelectMgr_EntityOwner)& theOwner)
 {
   Handle(StdSelect_BRepOwner) aOwner = Handle(StdSelect_BRepOwner)::DownCast(theOwner);
index 597b3b8e70f067f8c3e31ac78b053fba2223ff50..dc7aff38dee85d571fd75bde9b6441de6cd02445 100644 (file)
@@ -31,8 +31,8 @@ public:
   /// \param aShape an owner shape
   /// \param aPriority drawig priority
   /// \param ComesFromDecomposition decomposition flag
-  ModuleBase_BRepOwner(const TopoDS_Shape& aShape, 
-    const Standard_Integer aPriority = 0, 
+  ModuleBase_BRepOwner(const TopoDS_Shape& aShape,
+    const Standard_Integer aPriority = 0,
     const Standard_Boolean ComesFromDecomposition = Standard_False)
     : StdSelect_BRepOwner(aShape, aPriority, ComesFromDecomposition) {}
 
@@ -40,7 +40,7 @@ public:
   /// \param aPM a presentations manager
   /// \param aCol a color
   /// \param aMode a drawing mode
-  virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& aPM, 
+  virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& aPM,
     const Quantity_NameOfColor aCol, const Standard_Integer aMode = 0)
   {  Selectable()->HilightOwnerWithColor(aPM, aCol, this); }
 
@@ -73,7 +73,7 @@ public:
   //! Method which draws selected owners ( for fast presentation draw )
   Standard_EXPORT virtual void HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM,
                                                const SelectMgr_SequenceOfOwner& theOwners);
-  
+
   //! Method which hilight an owner belonging to
   //! this selectable object  ( for fast presentation draw )
   Standard_EXPORT virtual void HilightOwnerWithColor(
@@ -85,7 +85,7 @@ public:
 
   /// Returns selection priorities that will be added to created selection owner
   /// \return integer value
-  Standard_EXPORT int getAdditionalSelectionPriority() const 
+  Standard_EXPORT int getAdditionalSelectionPriority() const
   { return myAdditionalSelectionPriority; }
 
   /// Appends a special priority for the mode of selection
@@ -117,7 +117,7 @@ private:
   /// Original shape of the result object
   TopoDS_Shape myOriginalShape;
 
-  /// selection priority that will be added to the standard 
+  /// selection priority that will be added to the standard
   /// selection priority of the selection entity
   int myAdditionalSelectionPriority;
 };
index 1f686f0cf3ecd426723b1c4c8c3f917ad2dbaf00..e88994c85cf2d9fdb319108773f0b0a0924ad024 100644 (file)
@@ -26,7 +26,7 @@ public:
    /// Returns True if selection is valid
    /// \param theSelection selection instance
    /// \param theOperation - current operation (can be 0)
-  virtual bool isValid(const ModuleBase_ISelection* theSelection, 
+  virtual bool isValid(const ModuleBase_ISelection* theSelection,
                        ModuleBase_Operation* theOperation) const;
 };
 
index adf14c58af0f6941f5d8e53946903b1cb8bd744f..29a44fd5e02043c0602e3a877d54b8dc488d702b 100755 (executable)
@@ -221,7 +221,7 @@ QPixmap lighter(const QString& theIcon, const int theLighterValue)
 
 void setSpinText(ModuleBase_ParamSpinBox* theSpin, const QString& theText)
 {
-  if (theSpin->text() == theText) 
+  if (theSpin->text() == theText)
     return;
   // In order to avoid extra text setting because it will
   // reset cursor position in control
@@ -445,7 +445,7 @@ QString activeOwners(Handle(AIS_InteractiveContext)& theContext, const bool theS
     aPtrStr << "[" << anOwner.Access() << "]";
     anInfo += aPtrStr.str().c_str();
 
-    Handle(AIS_InteractiveObject) aAISObj = 
+    Handle(AIS_InteractiveObject) aAISObj =
           Handle(AIS_InteractiveObject)::DownCast(anOwner->Selectable());
     if (!aAISObj.IsNull()) {
       std::ostringstream aPtrStr;
@@ -469,7 +469,7 @@ QString activeOwners(Handle(AIS_InteractiveContext)& theContext, const bool theS
   return aValue;
 }
 
-QString selectedOwners(Handle(AIS_InteractiveContext)& theContext, 
+QString selectedOwners(Handle(AIS_InteractiveContext)& theContext,
                               const bool theShapeInfoOnly = true)
 {
   QStringList anObjects;
@@ -564,7 +564,7 @@ void checkObjects(const QObjectPtrList& theObjects, bool& hasResult, bool& hasFe
     hasResult |= (aResult.get() != NULL);
     hasFeature |= (aFeature.get() != NULL);
     hasParameter |= (aConstruction.get() != NULL);
-    if (hasFeature) 
+    if (hasFeature)
       hasCompositeOwner |= (ModelAPI_Tools::compositeOwner(aFeature) != NULL);
     if (hasFeature && hasResult  && hasParameter && hasCompositeOwner)
       break;
@@ -651,7 +651,7 @@ ObjectPtr getObject(const AttributePtr& theAttribute)
       anObject = anAttr->context();
   }
   if (anAttrType == ModelAPI_AttributeReference::typeId()) {
-    AttributeReferencePtr anAttr = 
+    AttributeReferencePtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
     if (anAttr.get() != NULL)
       anObject = anAttr->value();
@@ -709,7 +709,7 @@ void getParameters(QStringList& theParameters)
   }
 }
 
-std::string findGreedAttribute(ModuleBase_IWorkshop* theWorkshop, 
+std::string findGreedAttribute(ModuleBase_IWorkshop* theWorkshop,
                                const FeaturePtr& theFeature)
 {
   std::string anAttributeId;
@@ -735,7 +735,7 @@ bool hasObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
 
   std::string aType = theAttribute->attributeType();
   if (aType == ModelAPI_AttributeReference::typeId()) {
-    AttributeReferencePtr aRef = 
+    AttributeReferencePtr aRef =
       std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
     ObjectPtr aObject = aRef->value();
     aHasObject = aObject && aObject->isSame(theObject);
@@ -743,7 +743,7 @@ bool hasObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
     //  aRef->setValue(theObject);
     //}
   } else if (aType == ModelAPI_AttributeRefAttr::typeId()) {
-    AttributeRefAttrPtr aRefAttr = 
+    AttributeRefAttrPtr aRefAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
 
     AttributePtr anAttribute = theWorkshop->module()->findAttribute(theObject, theShape);
@@ -772,14 +772,14 @@ bool hasObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
     aHasObject = aSelectionListAttr->isInList(aResult, theShape, theTemporarily);
   }
   else if (aType == ModelAPI_AttributeRefList::typeId()) {
-    AttributeRefListPtr aRefListAttr = 
+    AttributeRefListPtr aRefListAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(theAttribute);
     aHasObject = aRefListAttr->isInList(theObject);
     //if (!theCheckIfAttributeHasObject || !aRefListAttr->isInList(theObject))
     //  aRefListAttr->append(theObject);
   }
   else if (aType == ModelAPI_AttributeRefAttrList::typeId()) {
-    AttributeRefAttrListPtr aRefAttrListAttr = 
+    AttributeRefAttrListPtr aRefAttrListAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefAttrList>(theAttribute);
     AttributePtr anAttribute = theWorkshop->module()->findAttribute(theObject, theShape);
 
@@ -807,14 +807,14 @@ bool setObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
   bool isDone = true;
   std::string aType = theAttribute->attributeType();
   if (aType == ModelAPI_AttributeReference::typeId()) {
-    AttributeReferencePtr aRef = 
+    AttributeReferencePtr aRef =
       std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
     ObjectPtr aObject = aRef->value();
     if (!(aObject && aObject->isSame(theObject))) {
       aRef->setValue(theObject);
     }
   } else if (aType == ModelAPI_AttributeRefAttr::typeId()) {
-    AttributeRefAttrPtr aRefAttr = 
+    AttributeRefAttrPtr aRefAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
 
     AttributePtr anAttribute = theWorkshop->module()->findAttribute(theObject, theShape);
@@ -838,12 +838,12 @@ bool setObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
     AttributeSelectionListPtr aSelectionListAttr =
                          std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
     ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
-    if (!theCheckIfAttributeHasObject || 
+    if (!theCheckIfAttributeHasObject ||
         !aSelectionListAttr->isInList(aResult, theShape, theTemporarily))
       aSelectionListAttr->append(aResult, theShape, theTemporarily);
   }
   else if (aType == ModelAPI_AttributeRefList::typeId()) {
-    AttributeRefListPtr aRefListAttr = 
+    AttributeRefListPtr aRefListAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(theAttribute);
     if (!theCheckIfAttributeHasObject || !aRefListAttr->isInList(theObject)) {
       if (theObject.get())
@@ -853,7 +853,7 @@ bool setObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
     }
   }
   else if (aType == ModelAPI_AttributeRefAttrList::typeId()) {
-    AttributeRefAttrListPtr aRefAttrListAttr = 
+    AttributeRefAttrListPtr aRefAttrListAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefAttrList>(theAttribute);
     AttributePtr anAttribute = theWorkshop->module()->findAttribute(theObject, theShape);
 
@@ -882,7 +882,7 @@ GeomShapePtr getShape(const AttributePtr& theAttribute, ModuleBase_IWorkshop* th
   std::string aType = theAttribute->attributeType();
   if (aType == ModelAPI_AttributeReference::typeId()) {
   } else if (aType == ModelAPI_AttributeRefAttr::typeId()) {
-    AttributeRefAttrPtr aRefAttr = 
+    AttributeRefAttrPtr aRefAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
     if (aRefAttr.get() && !aRefAttr->isObject()) {
       AttributePtr anAttribute = aRefAttr->attr();
@@ -966,7 +966,7 @@ QString wrapTextByWords(const QString& theValue, QWidget* theWidget,
 }
 
 //**************************************************************
-void refsToFeatureInFeatureDocument(const ObjectPtr& theObject, 
+void refsToFeatureInFeatureDocument(const ObjectPtr& theObject,
                                     std::set<FeaturePtr>& theRefFeatures)
 {
   FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
@@ -1067,11 +1067,11 @@ bool askToDelete(const std::set<FeaturePtr> theFeatures,
   std::string aNotActivatedNames;
   if (!ModelAPI_Tools::allDocumentsActivated(aNotActivatedNames)) {
     if (ModuleBase_Tools::hasModuleDocumentFeature(theFeatures))
-      aNotActivatedDocWrn = 
+      aNotActivatedDocWrn =
         QObject::tr("Selected objects can be used in Part documents which are not loaded:%1.\n")
                             .arg(aNotActivatedNames.c_str());
   }
-  
+
   std::set<FeaturePtr> aFeaturesRefsTo;
   std::set<FeaturePtr> aFeaturesRefsToParameter;
   std::set<FeaturePtr> aParameterFeatures;
@@ -1161,7 +1161,7 @@ bool askToDelete(const std::set<FeaturePtr> theFeatures,
                        "be deleted.\nOr parameters could be replaced by their values.\n";
     aText += QString(QObject::tr(aMsg))
                      .arg(aParamFeatureNames.join(aSep));
-    QPushButton *aReplaceButton = 
+    QPushButton *aReplaceButton =
       aMessageBox.addButton(QObject::tr("Replace"), QMessageBox::ActionRole);
   }
 
@@ -1179,7 +1179,7 @@ bool askToDelete(const std::set<FeaturePtr> theFeatures,
         ModelAPI_ReplaceParameterMessage::send(aObj, 0);
     }
     else
-      theReferencesToDelete.insert(aFeaturesRefsToParameterOnly.begin(), 
+      theReferencesToDelete.insert(aFeaturesRefsToParameterOnly.begin(),
                                    aFeaturesRefsToParameterOnly.end());
   }
   return true;
@@ -1233,7 +1233,7 @@ void setPointBallHighlighting(AIS_Shape* theAIS)
     aPixMap = new Image_AlienPixMap();
     if(!aPixMap->Load(aFile.c_str())) {
       // The icon for constraint is not found
-      static const std::string aMsg = 
+      static const std::string aMsg =
         "Error: Point market not found by path: \"" + aFile + "\". Falling back.";
       //Events_InfoMessage("ModuleBase_Tools::setPointBallHighlighting", aMsg).send();
     }
index 6e4e89b416d43c14259290bd6f00efaa94832aa6..1f53c21b8b0d96b6859a9e048132015b5616db56 100755 (executable)
@@ -70,7 +70,7 @@ MODULEBASE_EXPORT void setShadowEffect(QWidget* theWidget, const bool isSetEffec
 /// \ingroup GUI
 /// Methods to modify a resource pixmap
 
-/// Create composite pixmap. 
+/// Create composite pixmap.
 /// Pixmap \a theAdditionalIcon is drawn over pixmap \a dest with coordinates
 /// specified relatively to the upper left corner of \a theIcon.
 
@@ -79,10 +79,10 @@ MODULEBASE_EXPORT void setShadowEffect(QWidget* theWidget, const bool isSetEffec
 /// \return resulting pixmap
 MODULEBASE_EXPORT QPixmap composite(const QString& theAdditionalIcon, const QString& theIcon);
 
-/// Generates the pixmap lighter than the resources pixmap. 
+/// Generates the pixmap lighter than the resources pixmap.
 /// Pixmap \a theIcon is lighted according to the given value.
 /// If the lighter value is greater than 100, this functions returns a lighter pixmap.
-/// Setting lighter value to 150 returns a color that is 50% brighter. 
+/// Setting lighter value to 150 returns a color that is 50% brighter.
 /// If the factor is less than 100,
 /// the return pixmap is darker. If the factor is 0 or negative, the return pixmap is unspecified.
 
@@ -134,7 +134,7 @@ MODULEBASE_EXPORT QAction* createAction(const QIcon& theIcon, const QString& the
 /// \param theObj an object
 /// \param isUseAttributesInfo a flag whether the attribute values information is used
 /// \return a string
-MODULEBASE_EXPORT QString objectInfo(const ObjectPtr& theObj, 
+MODULEBASE_EXPORT QString objectInfo(const ObjectPtr& theObj,
                                      const bool isUseAttributesInfo = false);
 
 /// Converts the AIS context information in a string information.
@@ -172,7 +172,7 @@ MODULEBASE_EXPORT void checkObjects(const QObjectPtrList& theObjects, bool& hasR
 
 /// Sets the default coeffient into the driver calculated accordingly the shape type.
 /// It provides 1.e-4 for a shape withe Edge shape type
-/// \param theShape a shape to define the deviation coeffient, 
+/// \param theShape a shape to define the deviation coeffient,
 /// \param theDrawer a drawer
 MODULEBASE_EXPORT void setDefaultDeviationCoefficient(const TopoDS_Shape& theShape,
                                                       const Handle(Prs3d_Drawer)& theDrawer);
@@ -295,7 +295,7 @@ bool MODULEBASE_EXPORT hasModuleDocumentFeature(const std::set<FeaturePtr>& theF
 /// \param theReferencesToDelete an out set for references features to be removed
 /// \return true if in message box answer is Yes
 bool MODULEBASE_EXPORT askToDelete(const std::set<FeaturePtr> aFeatures,
-                                   const std::map<FeaturePtr, 
+                                   const std::map<FeaturePtr,
                                    std::set<FeaturePtr> >& theReferences,
                                    QWidget* theParent,
                                    std::set<FeaturePtr>& theReferencesToDelete,
@@ -306,12 +306,12 @@ bool MODULEBASE_EXPORT askToDelete(const std::set<FeaturePtr> aFeatures,
 /// of this parameter is to be removed
 /// \param theObjects a list of objects
 /// \param theFeatures an out conteiner of features
-void MODULEBASE_EXPORT convertToFeatures(const QObjectPtrList& theObjects, 
+void MODULEBASE_EXPORT convertToFeatures(const QObjectPtrList& theObjects,
                                          std::set<FeaturePtr>& theFeatures);
 
 
 /// Returns translation from the given data.
-/// If translation is not exists then it returns a string 
+/// If translation is not exists then it returns a string
 /// from the info data without translation
 /// \param theContext context of the message (Feature Id)
 /// \param theMessage a message which dave to be translated
index d2639b44670ea4484e6f21589ec18c226e71e5ad..ce421b15cc71b316585633a6144f7e34bc189390 100644 (file)
@@ -32,13 +32,13 @@ class ModuleBase_ShapeDocumentFilter: public SelectMgr_Filter
 public:
   /// Constructor
   /// \param theWorkshop instance of workshop interface
-  Standard_EXPORT 
+  Standard_EXPORT
     ModuleBase_ShapeDocumentFilter(ModuleBase_IWorkshop* theWorkshop): SelectMgr_Filter(),
     myWorkshop(theWorkshop) {}
 
   /// Returns True if the given owner is acceptable for selection
   /// \param theOwner the selected owner
-  Standard_EXPORT virtual 
+  Standard_EXPORT virtual
     Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
   DEFINE_STANDARD_RTTI(ModuleBase_ShapeDocumentFilter)
@@ -70,7 +70,7 @@ public:
 
   /// Returns True if the given owner is acceptable for selection
   /// \param theOwner the selected owner
-  Standard_EXPORT virtual 
+  Standard_EXPORT virtual
     Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
   DEFINE_STANDARD_RTTI(ModuleBase_ShapeInPlaneFilter)
index 38e4c71a3d7f274a74451544d89e25e9b344e7f1..0aa2182e128c436cd77f64ab07e28b1448356616 100644 (file)
@@ -8,9 +8,9 @@
 
 #include <ModuleBase_ResultPrs.h>
 
-ModuleBase_ViewerPrs::ModuleBase_ViewerPrs(ObjectPtr theResult, 
-                                           const GeomShapePtr& theShape, 
-                                           Handle_SelectMgr_EntityOwner theOwner) 
+ModuleBase_ViewerPrs::ModuleBase_ViewerPrs(ObjectPtr theResult,
+                                           const GeomShapePtr& theShape,
+                                           Handle_SelectMgr_EntityOwner theOwner)
 : myResult(theResult),
   myShape(theShape),
   myOwner(theOwner)
@@ -52,7 +52,7 @@ bool ModuleBase_ViewerPrs::isEqual(ModuleBase_ViewerPrs* thePrs) const
     // and set in the sub-solid AIS. ViewerPrs of these fictive owners are accepted as equal
     // as they use the same shape and result(of compsolid)
     Handle(StdSelect_BRepOwner) aCSolidOwner1 = Handle(StdSelect_BRepOwner)::DownCast(myOwner);
-    Handle(StdSelect_BRepOwner) aCSolidOwner2 = 
+    Handle(StdSelect_BRepOwner) aCSolidOwner2 =
       Handle(StdSelect_BRepOwner)::DownCast(thePrs->owner());
     isEqualIO = !aCSolidOwner1.IsNull() && !aCSolidOwner2.IsNull();
     if (!aCSolidOwner1.IsNull() && !aCSolidOwner2.IsNull())
@@ -94,7 +94,7 @@ bool ModuleBase_ViewerPrs::operator==(const ModuleBase_ViewerPrs& thePrs)
     // and set in the sub-solid AIS. ViewerPrs of these fictive owners are accepted as equal
     // as they use the same shape and result(of compsolid)
     Handle(StdSelect_BRepOwner) aCSolidOwner1 = Handle(StdSelect_BRepOwner)::DownCast(myOwner);
-    Handle(StdSelect_BRepOwner) aCSolidOwner2 = 
+    Handle(StdSelect_BRepOwner) aCSolidOwner2 =
       Handle(StdSelect_BRepOwner)::DownCast(thePrs.owner());
     isEqualIO = !aCSolidOwner1.IsNull() && !aCSolidOwner2.IsNull();
     if (!aCSolidOwner1.IsNull() && !aCSolidOwner1.IsNull())
index 5797e7cc8de201b0882d34a9a37610fe44bdf8cd..49e73a24301f10aced4c5b06bfaf4711c15cd52f 100644 (file)
@@ -22,7 +22,7 @@
 #include <QToolButton>
 
 
-ModuleBase_WidgetChoice::ModuleBase_WidgetChoice(QWidget* theParent, 
+ModuleBase_WidgetChoice::ModuleBase_WidgetChoice(QWidget* theParent,
                                                  const Config_WidgetAPI* theData)
 : ModuleBase_ModelWidget(theParent, theData), myCombo(0), myButtons(0)
 {
@@ -49,7 +49,7 @@ ModuleBase_WidgetChoice::ModuleBase_WidgetChoice(QWidget* theParent,
     std::string aWgtDir = theData->getProperty("buttons_dir");
     if (aWgtDir == "horizontal")
       aBtnLayout = new QHBoxLayout(aGroupBox);
-    else 
+    else
       aBtnLayout = new QVBoxLayout(aGroupBox);
     ModuleBase_Tools::adjustMargins(aBtnLayout);
 
@@ -66,7 +66,7 @@ ModuleBase_WidgetChoice::ModuleBase_WidgetChoice(QWidget* theParent,
         QPixmap aIcon = ModuleBase_IconFactory::loadPixmap(aIconList.at(aId));
         aBtn->setIcon(aIcon);
         aBtn->setIconSize(aIcon.size());
-        
+
         aBtnLayout->addWidget(aBtn);
         myButtons->addButton(aBtn, aId++);
       }
@@ -94,7 +94,7 @@ ModuleBase_WidgetChoice::ModuleBase_WidgetChoice(QWidget* theParent,
 
     myCombo = new QComboBox(this);
     aLayout->addWidget(myCombo, 1);
+
     myCombo->addItems(aList);
 
     connect(myCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onCurrentIndexChanged(int)));
@@ -104,7 +104,7 @@ ModuleBase_WidgetChoice::ModuleBase_WidgetChoice(QWidget* theParent,
 ModuleBase_WidgetChoice::~ModuleBase_WidgetChoice()
 {
 }
-  
+
 bool ModuleBase_WidgetChoice::storeValueCustom()
 {
   DataPtr aData = myFeature->data();
index 0624b58441e75ec165be2ad854f3ccd585d4a34d..9da48c21c141f4859b9706191fbe44754bd1adf3 100644 (file)
@@ -89,7 +89,7 @@ bool ModuleBase_WidgetConcealedObjects::restoreValueCustom()
       }
     }
   }
-  
+
   DataPtr aData = myFeature->data();
   AttributeRefListPtr anAttributeList = aData->reflist(attributeID());
   int aSize = anAttributeList->size();
index 27697fef8aafd7280b3945875d6e1d5c343e4810..d9f10f31ce9df6d5a50c760aadd8bbfc4b9c3690 100755 (executable)
@@ -19,7 +19,7 @@ std::shared_ptr<ModuleBase_WidgetCreatorFactory> MY_WIDGET_CREATOR_FACTORY;
 std::shared_ptr<ModuleBase_WidgetCreatorFactory> ModuleBase_WidgetCreatorFactory::get()
 {
   if (!MY_WIDGET_CREATOR_FACTORY) {
-    MY_WIDGET_CREATOR_FACTORY =  
+    MY_WIDGET_CREATOR_FACTORY =
       std::shared_ptr<ModuleBase_WidgetCreatorFactory>(new ModuleBase_WidgetCreatorFactory());
   }
   return MY_WIDGET_CREATOR_FACTORY;
@@ -44,7 +44,7 @@ void ModuleBase_WidgetCreatorFactory::registerCreator(const WidgetCreatorPtr& th
     if (!myPanelToCreator.contains(aKey))
       myPanelToCreator[aKey] = theCreator;
     else {
-      Events_InfoMessage("ModuleBase_WidgetCreatorFactory", 
+      Events_InfoMessage("ModuleBase_WidgetCreatorFactory",
         "The %1 panel XML definition has been already used by another widget creator")
         .arg(aKey).send();
     }
index 42f6f06d0ea436f4bc947d4a886d69a121b73096..cb99f708445bc4dd4c5a18554e46ee6d09ce876a 100755 (executable)
@@ -38,7 +38,7 @@ class MODULEBASE_EXPORT ModuleBase_WidgetCreatorFactory
   /// Destructor
   virtual ~ModuleBase_WidgetCreatorFactory();
 
-  /// The creator is added to the internal container 
+  /// The creator is added to the internal container
   /// to be used when the createWidgetByType is called
   /// \param theCreator a new widget creator
   void registerCreator(const WidgetCreatorPtr& theCreator);
@@ -64,7 +64,7 @@ class MODULEBASE_EXPORT ModuleBase_WidgetCreatorFactory
   /// Create page by its type
   /// \param theType a type
   /// \param theParent a parent widget
-  /// \param theWidgetApi the widget configuration. 
+  /// \param theWidgetApi the widget configuration.
   ///                     The attribute of the model widget is obtained from XML
   /// \return a created page or null
   ModuleBase_PageBase* createPageByType(const std::string& theType,
@@ -74,7 +74,7 @@ class MODULEBASE_EXPORT ModuleBase_WidgetCreatorFactory
   /// Create widget by its type
   /// \param theType a type
   /// \param theParent a parent widget
-  /// \param theWidgetApi the widget configuration. 
+  /// \param theWidgetApi the widget configuration.
   ///                     The attribute of the model widget is obtained from XML
   /// \param theWorkshop a workshop object instance
   /// \return a created widget or null
index 9e4a2041e1f19fd0d7b156229f408c0bbbf763ad..a490c4d2515b1cf0fd8d104f489817e296723fe4 100644 (file)
@@ -26,7 +26,7 @@
 #include <cfloat>
 
 #ifndef DBL_MAX
-#define DBL_MAX 1.7976931348623158e+308 
+#define DBL_MAX 1.7976931348623158e+308
 #endif
 #ifdef _DEBUG
 #include <iostream>
index 97a01ac3b5417b2337adc6d68182779138718fba..51d7eff6095781c08fcc254a43c4fcb298bdf3d6 100644 (file)
@@ -36,7 +36,7 @@ Q_OBJECT
   /// Destructor
   virtual ~ModuleBase_WidgetEditor();
 
-  /// Set focus to the first control of the current widget. 
+  /// Set focus to the first control of the current widget.
   /// The focus policy of the control is checked.
   /// If the widget has the NonFocus focus policy, it is skipped.
   /// \return the state whether the widget can accept the focus
@@ -62,10 +62,10 @@ private:
 
  private:
    ///< the current widget feature
-   FeaturePtr myFeature;  
+   FeaturePtr myFeature;
 
    ///< the kinds of possible features
-   QStringList myFeatureKinds;  
+   QStringList myFeatureKinds;
 
    int myXPosition, myYPosition;
 };
index cf5b6fc5527e78aaf5b90aa22df4dd105f35072a..1fb6bf1aa8e735af11c357b3f5df4ff3abe6bac1 100644 (file)
@@ -194,7 +194,7 @@ void ExpressionEditor::paintEvent( QPaintEvent* theEvent )
     QPen anOldpen = aPainter.pen();
     aPainter.setPen( aColor );
     lineRect.adjust(minLB, 0, 0, 0);
-    QString elidedText = 
+    QString elidedText =
       aFontMetrics.elidedText( myPlaceHolderText, Qt::ElideRight, lineRect.width() );
     aPainter.drawText( lineRect, va, elidedText );
     aPainter.setPen( anOldpen );
@@ -251,7 +251,7 @@ void ModuleBase_WidgetExprEditor::initializeValueByActivate()
 
 bool ModuleBase_WidgetExprEditor::storeValueCustom()
 {
-  // A rare case when plugin was not loaded. 
+  // A rare case when plugin was not loaded.
   if(!myFeature)
     return false;
   DataPtr aData = myFeature->data();
@@ -284,7 +284,7 @@ bool ModuleBase_WidgetExprEditor::storeValueCustom()
 
 bool ModuleBase_WidgetExprEditor::restoreValueCustom()
 {
-  // A rare case when plugin was not loaded. 
+  // A rare case when plugin was not loaded.
   if(!myFeature)
     return false;
   DataPtr aData = myFeature->data();
index 3b43d76646326ab5a4b610db5b6e2fdcbf111a18..d4c1b9ef45dd19471cde84189f6e9d5454e07df1 100644 (file)
@@ -121,7 +121,7 @@ void ModuleBase_WidgetFactory::createWidget(ModuleBase_PageBase* thePage, bool a
             ModuleBase_PageBase* aPage = new ModuleBase_PageWidget(aWidget);
             createWidget(aPage);
             if (aWdgType == WDG_SWITCH || aWdgType == WDG_TOOLBOX) {
-              ModuleBase_PagedContainer* aContainer = 
+              ModuleBase_PagedContainer* aContainer =
                 qobject_cast<ModuleBase_PagedContainer*>(aWidget);
 
               QString anIconPath = qs( myWidgetApi->getProperty( CONTAINER_PAGE_ICON ) );
@@ -180,7 +180,7 @@ void ModuleBase_WidgetFactory::getAttributeTitle(const std::string& theAttribute
   if (aFound) {
     theTitle = QString::fromStdString(myWidgetApi->widgetLabel()).toStdString().c_str();
     if (theTitle.empty())
-      theTitle = 
+      theTitle =
       QString::fromStdString(myWidgetApi->getProperty(CONTAINER_PAGE_NAME)).toStdString().c_str();
   }
 }
index a181d9e0c4d54d9bc34b94bb9e08491b12ad2d89..f7bbe4e783d3ffccf64f1a518f9da95921b823d3 100644 (file)
@@ -110,7 +110,7 @@ void ModuleBase_WidgetFeatureSelector::activateCustom()
 {
   connect(myWorkshop, SIGNAL(selectionChanged()), this,
           SLOT(onSelectionChanged()), Qt::UniqueConnection);
-  
+
   activateFilters(true);
 
   QIntList aShapeTypes;
@@ -126,7 +126,7 @@ void ModuleBase_WidgetFeatureSelector::activateCustom()
 //********************************************************************
 bool ModuleBase_WidgetFeatureSelector::storeValueCustom()
 {
-  // the value is stored on the selection changed signal processing 
+  // the value is stored on the selection changed signal processing
   return true;
 }
 
@@ -218,7 +218,7 @@ void ModuleBase_WidgetFeatureSelector::onSelectionChanged()
 //********************************************************************
 void ModuleBase_WidgetFeatureSelector::updateOnSelectionChanged(const bool theDone)
 {
-  // "false" flag should be used here, it connects to the #26658 OCC bug, when the user click in 
+  // "false" flag should be used here, it connects to the #26658 OCC bug, when the user click in
   // the same place repeatedly without mouse moved. In the case validation by filters is not
   // perfromed, so an invalid object is selected. E.g. distance constraint, selection of a point.
   // the 3rd click in the same point allow using this point.
index be91840732b4aaaea150a6ec468399a73ddff41c..d0d00aebb5ad0d1d3b7a148e411e2e79830a93ba 100644 (file)
@@ -67,7 +67,7 @@ ModuleBase_WidgetFileSelector::~ModuleBase_WidgetFileSelector()
 
 bool ModuleBase_WidgetFileSelector::storeValueCustom()
 {
-  // A rare case when plugin was not loaded. 
+  // A rare case when plugin was not loaded.
   if (!myFeature)
     return false;
   DataPtr aData = myFeature->data();
@@ -80,7 +80,7 @@ bool ModuleBase_WidgetFileSelector::storeValueCustom()
 
 bool ModuleBase_WidgetFileSelector::restoreValueCustom()
 {
-  // A rare case when plugin was not loaded. 
+  // A rare case when plugin was not loaded.
   if (!myFeature)
     return false;
   DataPtr aData = myFeature->data();
index dae84951aaad0b9154d8c5177f2723923c1a433f..8b69bac5638e5a8566509d85b2d31b300d57c71b 100644 (file)
@@ -28,7 +28,7 @@
 #include <math.h>
 
 #ifndef INT_MAX
-#define INT_MAX   2147483647 
+#define INT_MAX   2147483647
 #endif
 
 #ifdef _DEBUG
index bab0894cb1f93c92c993f8c613754aef6053a7e2..170fb7c5099d42002f6e39eef8f046387f0af625 100644 (file)
@@ -61,8 +61,8 @@ bool ModuleBase_WidgetLabel::restoreValueCustom()
   return true;
 }
 
-bool ModuleBase_WidgetLabel::focusTo() 
-{ 
+bool ModuleBase_WidgetLabel::focusTo()
+{
   restoreValue();
-  return false; 
+  return false;
 }
index ef869fdcd3bc606aac71187115743b54646a6e36..e8da69f1745cd679ff589506e1a44e0d636030d5 100644 (file)
@@ -108,7 +108,7 @@ ModuleBase_WidgetLineEdit::~ModuleBase_WidgetLineEdit()
 
 bool ModuleBase_WidgetLineEdit::storeValueCustom()
 {
-  // A rare case when plugin was not loaded. 
+  // A rare case when plugin was not loaded.
   if(!myFeature)
     return false;
   DataPtr aData = myFeature->data();
@@ -121,7 +121,7 @@ bool ModuleBase_WidgetLineEdit::storeValueCustom()
 
 bool ModuleBase_WidgetLineEdit::restoreValueCustom()
 {
-  // A rare case when plugin was not loaded. 
+  // A rare case when plugin was not loaded.
   if(!myFeature)
     return false;
   DataPtr aData = myFeature->data();
index 6b30c97d40e4d390dc05dc88c981831932fdf375..8064ae31f94fccc33d268b151972452ab5b1241e 100755 (executable)
@@ -121,7 +121,7 @@ ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParen
   QLabel* aListLabel = new QLabel(!aLabelText.empty() ? aLabelText.c_str()
                                                       : tr("Selected objects:"), this);
   aMainLay->addWidget(aListLabel, 1, 0);
-  // if the xml definition contains one type, an information label 
+  // if the xml definition contains one type, an information label
   // should be shown near to the latest
   if (aShapeTypes.size() <= 1) {
     QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
@@ -188,8 +188,8 @@ void ModuleBase_WidgetMultiSelector::deactivate()
 //********************************************************************
 bool ModuleBase_WidgetMultiSelector::storeValueCustom()
 {
-  // the value is stored on the selection changed signal processing 
-  // A rare case when plugin was not loaded. 
+  // the value is stored on the selection changed signal processing
+  // A rare case when plugin was not loaded.
   if (!myFeature)
     return false;
 
@@ -205,7 +205,7 @@ bool ModuleBase_WidgetMultiSelector::storeValueCustom()
 //********************************************************************
 bool ModuleBase_WidgetMultiSelector::restoreValueCustom()
 {
-  // A rare case when plugin was not loaded. 
+  // A rare case when plugin was not loaded.
   if (!myFeature)
     return false;
 
@@ -423,7 +423,7 @@ void ModuleBase_WidgetMultiSelector::onSelectionChanged()
 
 void ModuleBase_WidgetMultiSelector::updateFocus()
 {
-  // Set focus to List control in order to make possible 
+  // Set focus to List control in order to make possible
   // to use Tab key for transfer the focus to next widgets
   myListControl->setCurrentRow(myListControl->model()->rowCount() - 1);
   ModuleBase_Tools::setFocus(myListControl,
@@ -454,7 +454,7 @@ QIntList ModuleBase_WidgetMultiSelector::shapeTypes() const
 void ModuleBase_WidgetMultiSelector::setCurrentShapeType(const int theShapeType)
 {
   QString aShapeTypeName;
-  
+
   for (int idx = 0; idx < myTypeCombo->count(); ++idx) {
     aShapeTypeName = myTypeCombo->itemText(idx);
     int aRefType = ModuleBase_Tools::shapeType(aShapeTypeName);
@@ -576,7 +576,7 @@ void ModuleBase_WidgetMultiSelector::onListSelection()
   QList<QListWidgetItem*> aItems = myListControl->selectedItems();
   myCopyAction->setEnabled(!aItems.isEmpty());
   myDeleteAction->setEnabled(!aItems.isEmpty());
-  
+
   myWorkshop->module()->customizeObject(myFeature, ModuleBase_IModule::CustomizeHighlightedObjects,
                                         true);
 }
@@ -685,7 +685,7 @@ bool ModuleBase_WidgetMultiSelector::removeUnusedAttributeObjects
   }
   else if (aType == ModelAPI_AttributeRefAttrList::typeId()) {
     std::set<AttributePtr> anAttributes;
-    QList<ModuleBase_ViewerPrsPtr>::const_iterator 
+    QList<ModuleBase_ViewerPrsPtr>::const_iterator
       anIt = theValues.begin(), aLast = theValues.end();
     ObjectPtr anObject;
     GeomShapePtr aShape;
index 3b38acb5d4371e70f7e2380e45dfdf68c57fe3b7..d502e1506f1a7588c5663350fce3ac2d26c005f6 100755 (executable)
@@ -139,7 +139,7 @@ protected:
   std::string validatorType(const QString& theType) const;
 
 protected:
-  /// Returns attribute indices selected in the widget selection list 
+  /// Returns attribute indices selected in the widget selection list
   /// \param theIndices a list of indices
   void getSelectedAttributeIndices(std::set<int>& theIndices);
 
index 3dfcd8e43f62ecef7354940e71290acdacb8b395..a7b536db16c973eb6ed451ad07f18b71cd33312c 100755 (executable)
@@ -60,7 +60,7 @@ void ModuleBase_WidgetSelector::onSelectionChanged()
 //********************************************************************
 void ModuleBase_WidgetSelector::updateOnSelectionChanged(const bool theDone)
 {
-  // "false" flag should be used here, it connects to the #26658 OCC bug, when the user click in 
+  // "false" flag should be used here, it connects to the #26658 OCC bug, when the user click in
   // the same place repeatedly without mouse moved. In the case validation by filters is not
   // perfromed, so an invalid object is selected. E.g. distance constraint, selection of a point.
   // the 3rd click in the same point allow using this point.
@@ -81,7 +81,7 @@ QIntList ModuleBase_WidgetSelector::getShapeTypes() const
 {
   QIntList aShapeTypes = shapeTypes();
   // this type should be mentioned in XML, poor selection otherwise
-  if (/*aShapeTypes.contains(TopAbs_SOLID) ||*/ 
+  if (/*aShapeTypes.contains(TopAbs_SOLID) ||*/
       aShapeTypes.contains(ModuleBase_ResultPrs::Sel_Result/*TopAbs_SHAPE*/)) {
     // it should be selectable for both, "solids" and "objects" types
     aShapeTypes.append(TopAbs_COMPSOLID);
@@ -165,7 +165,7 @@ void ModuleBase_WidgetSelector::activateCustom()
 {
   connect(myWorkshop, SIGNAL(selectionChanged()), this,
           SLOT(onSelectionChanged()), Qt::UniqueConnection);
-  
+
   activateSelectionAndFilters(true);
 
   // Restore selection in the viewer by the attribute selection list
@@ -198,7 +198,7 @@ bool ModuleBase_WidgetSelector::setSelectionCustom(const ModuleBase_ViewerPrsPtr
   getGeomSelection(thePrs, anObject, aShape);
 
   // the last flag is to be depending on hasObject is called before. To be corrected later
-  return ModuleBase_Tools::setObject(attribute(), anObject, aShape, 
+  return ModuleBase_Tools::setObject(attribute(), anObject, aShape,
                                      myWorkshop, myIsInValidate, true);
 }
 
index d9ed9a3667230915424e70dbd0bad1134cf757fc..8c8c9b259c7f01416380926928a7fd5addda32eb 100755 (executable)
@@ -61,7 +61,7 @@ void ModuleBase_WidgetSelectorStore::restoreAttributeValue(const AttributePtr& t
 {
   std::string aType = theAttribute->attributeType();
   if (aType == ModelAPI_AttributeSelectionList::typeId()) {
-    AttributeSelectionListPtr aSelectionListAttr = 
+    AttributeSelectionListPtr aSelectionListAttr =
                    std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
     aSelectionListAttr->setSelectionType(mySelectionType);
     // restore selection in the attribute. Indeed there is only one stored object
@@ -70,7 +70,7 @@ void ModuleBase_WidgetSelectorStore::restoreAttributeValue(const AttributePtr& t
       aSelectionListAttr->removeLast();
   }
   else if (aType == ModelAPI_AttributeRefList::typeId()) {
-    AttributeRefListPtr aRefListAttr = 
+    AttributeRefListPtr aRefListAttr =
                          std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(theAttribute);
     // restore objects in the attribute. Indeed there is only one stored object
     int aCountAppened = aRefListAttr->size() - mySelectionCount;
@@ -87,7 +87,7 @@ void ModuleBase_WidgetSelectorStore::restoreAttributeValue(const AttributePtr& t
   }
   else {
     ModuleBase_Tools::setObject(theAttribute, myObject, myShape, theWorkshop, true, true);
-    AttributeRefAttrPtr aRefAttr = 
+    AttributeRefAttrPtr aRefAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
     if (aRefAttr) {
       if (!myIsObject)
index 91a77ba94abf48e94bead31f3082490452e98a68..e002826d1e1270fd78d9229b48465055dfa1b66e 100755 (executable)
@@ -43,7 +43,7 @@ class ModuleBase_WidgetSelectorStore
 
 private:
   /// backup parameters of the model attribute. The class processes three types of attribute:
-  /// Reference, RefAttr and Selection. 
+  /// Reference, RefAttr and Selection.
   /// Depending on the attribute type, only the attribute parameter
   /// values are reserved in the backup
   /// An attribute object
index 4652227a84a180fd7921b20d6c9ef52974fc1881..8b07d585103bc4bfa081025d1275d10307b767f8 100644 (file)
@@ -103,7 +103,7 @@ ModuleBase_WidgetShapeSelector::~ModuleBase_WidgetShapeSelector()
 //********************************************************************
 bool ModuleBase_WidgetShapeSelector::storeValueCustom()
 {
-  // the value is stored on the selection changed signal processing 
+  // the value is stored on the selection changed signal processing
   return true;
 }
 
index 894b442b210e858407c2ca40ebc4316c81913587..b17759e5a3b45fd3a3a6234053c55b8b3de4eefe 100644 (file)
@@ -18,7 +18,7 @@
 #include <QStackedLayout>
 #include <QVBoxLayout>
 
-ModuleBase_WidgetSwitch::ModuleBase_WidgetSwitch(QWidget* theParent, 
+ModuleBase_WidgetSwitch::ModuleBase_WidgetSwitch(QWidget* theParent,
   const Config_WidgetAPI* theData)
 : ModuleBase_PagedContainer(theParent, theData)
 {
index 81b92a04469ea5377a18636a6ad5c25e45d268bd..16a00dabe7846bd4b58a6120f90f82e6d5a057c9 100644 (file)
@@ -19,7 +19,7 @@
 #include <QVBoxLayout>
 #include <QIcon>
 
-ModuleBase_WidgetToolbox::ModuleBase_WidgetToolbox(QWidget* theParent, 
+ModuleBase_WidgetToolbox::ModuleBase_WidgetToolbox(QWidget* theParent,
                                                    const Config_WidgetAPI* theData)
 : ModuleBase_PagedContainer(theParent, theData)
 {
index e3cf651f0850a3d624cb07aa32543a0209ae9016..b0d69053ef2767afacbb20aabc1031709ea2d541 100644 (file)
@@ -249,7 +249,7 @@ void ModuleBase_WidgetValidated::blockAttribute(const AttributePtr& theAttribute
 }
 
 //********************************************************************
-void ModuleBase_WidgetValidated::storeValidState(const ModuleBase_ViewerPrsPtr& theValue, 
+void ModuleBase_WidgetValidated::storeValidState(const ModuleBase_ViewerPrsPtr& theValue,
                                                  const bool theValid)
 {
   GeomShapePtr aShape = theValue.get() ? theValue->shape() : GeomShapePtr();
@@ -295,7 +295,7 @@ void ModuleBase_WidgetValidated::storeValidState(const ModuleBase_ViewerPrsPtr&
 }
 
 //********************************************************************
-bool ModuleBase_WidgetValidated::getValidState(const ModuleBase_ViewerPrsPtr& theValue, 
+bool ModuleBase_WidgetValidated::getValidState(const ModuleBase_ViewerPrsPtr& theValue,
                                                bool& theValid)
 {
   if (!theValue.get())
@@ -382,7 +382,7 @@ void ModuleBase_WidgetValidated::filterCompSolids(QList<ModuleBase_ViewerPrsPtr>
   for (; anIt != aLast; anIt++) {
     const ModuleBase_ViewerPrsPtr& aViewerPrs = *anIt;
     ObjectPtr anObject = aViewerPrs->object();
-    ResultCompSolidPtr aResultCompSolid = 
+    ResultCompSolidPtr aResultCompSolid =
       std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(anObject);
     if(aResultCompSolid.get()) {
       aCompSolids.insert(aResultCompSolid);
index 2271c2be1407878bf0b25dfc961dcd98e7b4f10e..d31bfe768136dfadb894b9aa63c92799e6bda76a 100644 (file)
@@ -137,7 +137,7 @@ private:
   bool isValidAttribute(const AttributePtr& theAttribute) const;
 
 protected:
-  /// Gets the validity state of the presentation in an internal map. 
+  /// Gets the validity state of the presentation in an internal map.
   /// Returns true if the valid state of value is stored
   /// \param theValue a viewer presentation
   /// \param theValid a valid state
@@ -168,10 +168,10 @@ private:
   ObjectPtr myPresentedObject; /// back up of the filtered object
 #ifdef LIST_OF_VALID_PRS
   /// cash of valid selection presentations
-  QList<std::shared_ptr<ModuleBase_ViewerPrs>> myValidPrs; 
+  QList<std::shared_ptr<ModuleBase_ViewerPrs>> myValidPrs;
 
   /// cash of invalid selection presentations
-  QList<std::shared_ptr<ModuleBase_ViewerPrs>> myInvalidPrs; 
+  QList<std::shared_ptr<ModuleBase_ViewerPrs>> myInvalidPrs;
 #else
   // assume that one presentation selection presentation corresponds only one shape
   NCollection_DataMap<TopoDS_Shape, std::shared_ptr<ModuleBase_ViewerPrs> > myValidPrs;
index e4b1a4fdd04950e4bf6c1633abf0e23a387ec1c2..35d8fca626d4928de85d619eb04d27c3c4e3d398 100755 (executable)
@@ -63,7 +63,7 @@ void ModuleBase_WidgetValidator::clearValidatedCash()
   myInvalidPrs.clear();
 }
 
-bool ModuleBase_WidgetValidator::getValidState(const ModuleBase_ViewerPrsPtr& theValue, 
+bool ModuleBase_WidgetValidator::getValidState(const ModuleBase_ViewerPrsPtr& theValue,
                                                bool& theValid)
 {
   bool aValidPrs = myValidPrs.contains(theValue);
@@ -78,7 +78,7 @@ bool ModuleBase_WidgetValidator::getValidState(const ModuleBase_ViewerPrsPtr& th
 }
 
 //********************************************************************
-void ModuleBase_WidgetValidator::storeValidState(const ModuleBase_ViewerPrsPtr& theValue, 
+void ModuleBase_WidgetValidator::storeValidState(const ModuleBase_ViewerPrsPtr& theValue,
                                                  const bool theValid)
 {
   bool aValidPrs = myInvalidPrs.contains(theValue);
index 912a1985897e122e89031fe58070c12dea1246da..ee8d6151b38719e917aa6a37787bbdf80ad10fdc 100755 (executable)
@@ -52,7 +52,7 @@ private:
   //! Clear all validated cash in the widget
   void clearValidatedCash();
 
-  /// Gets the validity state of the presentation in an internal map. 
+  /// Gets the validity state of the presentation in an internal map.
   /// Returns true if the valid state of value is stored
   /// \param theValue a viewer presentation
   /// \param theValid a valid state
@@ -69,10 +69,10 @@ protected:
   ModuleBase_IWorkshop* myWorkshop; ///< the active workshop
 
   /// cash of valid selection presentations
-  QList<std::shared_ptr<ModuleBase_ViewerPrs>> myValidPrs; 
-  
+  QList<std::shared_ptr<ModuleBase_ViewerPrs>> myValidPrs;
+
   /// cash of invalid selection presentations
-  QList<std::shared_ptr<ModuleBase_ViewerPrs>> myInvalidPrs; 
+  QList<std::shared_ptr<ModuleBase_ViewerPrs>> myInvalidPrs;
 };
 
 #endif /* ModuleBase_WidgetValidator_H_ */
index 0f86e784f7df33f62ae6767f4b52719bddc007ae..d562cf325fcbe48a6f311f999864be01a45bec39 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
 // Name   : ParametersAPI_Parameter.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
index cdf66c71ec61528e5823892d3386f897edc47e29..e9122a10777ac836e71788c37279f923a1b3c6f3 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
 // Name   : ParametersAPI_Parameter.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
@@ -39,7 +39,7 @@ public:
   virtual ~ParametersAPI_Parameter();
 
   INTERFACE_3(ParametersPlugin_Parameter::ID(),
-              name, ParametersPlugin_Parameter::VARIABLE_ID(), 
+              name, ParametersPlugin_Parameter::VARIABLE_ID(),
               ModelAPI_AttributeString, /** Name */,
               expression, ParametersPlugin_Parameter::EXPRESSION_ID(),
               ModelAPI_AttributeString, /** Expression */,
index 791af81bfcc99b449882429b10c933619f662e2b..dbd603f195a7de1062b563cb50f3abb253e547d5 100644 (file)
@@ -92,7 +92,7 @@ void ParametersPlugin_EvalListener::processEvent(
   } else if (theMessage->eventID() == kReplaceParameterEvent) {
     processReplaceParameterEvent(theMessage);
   } else {
-    Events_InfoMessage("ParametersPlugin_EvalListener", 
+    Events_InfoMessage("ParametersPlugin_EvalListener",
       "ParametersPlugin python interpreter, unhandled message caught: ")
       .arg(theMessage->eventID().eventText()).send();
   }
@@ -111,7 +111,7 @@ double ParametersPlugin_EvalListener::evaluate(FeaturePtr theParameter,
     // If variable does not exist python interpreter will generate an error. It is OK.
     // But due to the issue 1479 it should not check the history position of parameters relatively
     // to feature that contains expression
-    if (!ModelAPI_Tools::findVariable(/*theParameter*/ FeaturePtr(), 
+    if (!ModelAPI_Tools::findVariable(/*theParameter*/ FeaturePtr(),
       *it, aValue, aParamRes, theParameter->document()))
       continue;
 
@@ -129,7 +129,7 @@ void ParametersPlugin_EvalListener::processEvaluationEvent(
   std::shared_ptr<ModelAPI_AttributeEvalMessage> aMessage =
       std::dynamic_pointer_cast<ModelAPI_AttributeEvalMessage>(theMessage);
 
-  FeaturePtr aParamFeature = 
+  FeaturePtr aParamFeature =
     std::dynamic_pointer_cast<ModelAPI_Feature>(aMessage->attribute()->owner());
   if (aMessage->attribute()->attributeType() == ModelAPI_AttributeInteger::typeId()) {
     AttributeIntegerPtr anAttribute =
@@ -139,7 +139,7 @@ void ParametersPlugin_EvalListener::processEvaluationEvent(
     bool isValid = anError.empty();
     if (isValid)
       anAttribute->setCalculatedValue(aValue);
-    anAttribute->setUsedParameters(isValid ? 
+    anAttribute->setUsedParameters(isValid ?
       toSet(myInterp->compile(anAttribute->text())) : std::set<std::string>());
     anAttribute->setExpressionInvalid(!isValid);
     anAttribute->setExpressionError(anAttribute->text().empty() ? "" : anError);
@@ -152,7 +152,7 @@ void ParametersPlugin_EvalListener::processEvaluationEvent(
     bool isValid = anError.empty();
     if (isValid)
       anAttribute->setCalculatedValue(aValue);
-    anAttribute->setUsedParameters(isValid ? 
+    anAttribute->setUsedParameters(isValid ?
       toSet(myInterp->compile(anAttribute->text())) : std::set<std::string>());
     anAttribute->setExpressionInvalid(!isValid);
     anAttribute->setExpressionError(anAttribute->text().empty() ? "" : anError);
@@ -175,7 +175,7 @@ void ParametersPlugin_EvalListener::processEvaluationEvent(
       double aValue = evaluate(aParamFeature, aText[i], anError);
       bool isValid = anError.empty();
       if (isValid) aCalculatedValue[i] = aValue;
-      anAttribute->setUsedParameters(i, 
+      anAttribute->setUsedParameters(i,
         isValid ? toSet(myInterp->compile(aText[i])) : std::set<std::string>());
       anAttribute->setExpressionInvalid(i, !isValid);
       anAttribute->setExpressionError(i, aText[i].empty() ? "" : anError);
@@ -200,7 +200,7 @@ void ParametersPlugin_EvalListener::processEvaluationEvent(
       double aValue = evaluate(aParamFeature, aText[i], anError);
       bool isValid = anError.empty();
       if (isValid) aCalculatedValue[i] = aValue;
-      anAttribute->setUsedParameters(i, 
+      anAttribute->setUsedParameters(i,
         isValid ? toSet(myInterp->compile(aText[i])) : std::set<std::string>());
       anAttribute->setExpressionInvalid(i, !isValid);
       anAttribute->setExpressionError(i, aText[i].empty() ? "" : anError);
@@ -260,7 +260,7 @@ void ParametersPlugin_EvalListener::renameInParameter(
   anExpressionString = renameInPythonExpression(anExpressionString,
                                                 theOldName,
                                                 theNewName);
-  // Issue #588. No need for reevaluating expression. 
+  // Issue #588. No need for reevaluating expression.
   // Moreover, current history may not contain necessary parameters.
   anExpressionAttribute->owner()->data()->blockSendAttributeUpdated(true);
   anExpressionAttribute->setValue(anExpressionString);
@@ -355,7 +355,7 @@ void setParameterName(ResultParameterPtr theResultParameter, const std::string&
   theResultParameter->data()->setName(theName);
   theResultParameter->data()->blockSendAttributeUpdated(false, false);
 
-  std::shared_ptr<ParametersPlugin_Parameter> aParameter = 
+  std::shared_ptr<ParametersPlugin_Parameter> aParameter =
       std::dynamic_pointer_cast<ParametersPlugin_Parameter>(
           ModelAPI_Feature::feature(theResultParameter));
 
@@ -379,7 +379,7 @@ void ParametersPlugin_EvalListener::processObjectRenamedEvent(
   // check if the renamed object is a result parameter
   ResultParameterPtr aResultParameter =
       std::dynamic_pointer_cast<ModelAPI_ResultParameter>(aMessage->object());
-  if (!aResultParameter.get()) 
+  if (!aResultParameter.get())
     return;
 
   // get parameter feature for the result
@@ -403,8 +403,8 @@ void ParametersPlugin_EvalListener::processObjectRenamedEvent(
 
   // try to update the parameter feature according the new name
   setParameterName(aResultParameter, aMessage->newName());
-  // TODO(spo): replace with 
-  // ModelAPI_Session::get()->validators()->validate(aParameter, 
+  // TODO(spo): replace with
+  // ModelAPI_Session::get()->validators()->validate(aParameter,
   //                                                 ParametersPlugin_Parameter::VARIABLE_ID())
   // when ModelAPI_ValidatorsFactory::validate(const std::shared_ptr<ModelAPI_Feature>& theFeature,
   //                                           const std::string& theAttribute) const
index 3b870a879711cda42188a997f64e8a7b3b4aa306..440904783ce857809d48e600352c7d099055e3df 100644 (file)
@@ -31,7 +31,7 @@ class ParametersPlugin_EvalListener : public Events_Listener
   PARAMETERSPLUGIN_EXPORT virtual ~ParametersPlugin_EvalListener();
 
   /// Reimplemented from Events_Listener::processEvent().
-  PARAMETERSPLUGIN_EXPORT 
+  PARAMETERSPLUGIN_EXPORT
     virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
 
  protected:
index cc1946413fd43bbd4c6bae302e0f0d0a552dbdc7..364e189c6f7896d6967eea347abcb3abd0122ccd 100644 (file)
@@ -34,7 +34,7 @@ ParametersPlugin_Plugin::ParametersPlugin_Plugin()
   aFactory->registerValidator("Parameters_ExpressionValidator",
                               new ParametersPlugin_ExpressionValidator);
 
-  myEvalListener = 
+  myEvalListener =
     std::shared_ptr<ParametersPlugin_EvalListener>(new ParametersPlugin_EvalListener());
 }
 
index b15dc2ac7e74d744e9ef300a25fc7833100cb9c0..a513b1070489ccd6ca2c3f41332fd6fede1d301a 100644 (file)
@@ -43,7 +43,7 @@ ParametersPlugin_PyInterp::positions(const std::string& theExpression,
   PyObject* aBuiltinModule = PyImport_AddModule("__builtin__");
   PyDict_SetItemString(aContext, "__builtins__", aBuiltinModule);
 
-  // extend aContext with variables 
+  // extend aContext with variables
   PyDict_SetItemString(aContext, "expression", PyString_FromString(theExpression.c_str()));
   PyDict_SetItemString(aContext, "name", PyString_FromString(theName.c_str()));
   PyDict_SetItemString(aContext, "positions", Py_BuildValue("[]"));
@@ -82,7 +82,7 @@ std::list<std::string> ParametersPlugin_PyInterp::compile(const std::string& the
   }
 
   PyObject *aCodePyObj =
-    PyObject_CallMethod(aCodeopModule, (char*)"compile_command", (char*)"(s)", 
+    PyObject_CallMethod(aCodeopModule, (char*)"compile_command", (char*)"(s)",
                         theExpression.c_str());
 
   if(!aCodePyObj || aCodePyObj == Py_None || !PyCode_Check(aCodePyObj)) {
@@ -160,7 +160,7 @@ double ParametersPlugin_PyInterp::evaluate(const std::string& theExpression, std
   } catch (const std::invalid_argument&) {
     theError = "Unable to eval " + anEvalStr;
   }
-  
+
   return result;
 }
 
index f1bb988a6ef676a1c3e1e2a5e97b01dde72d32c0..c5804aeaed66fa06eed53648552635101f3e7b3a 100644 (file)
@@ -45,7 +45,7 @@ bool ParametersPlugin_VariableValidator::isValid(const AttributePtr& theAttribut
   if (!ModelAPI_Expression::isVariable(aStrAttr->value())) {
     theError = "Incorrect variable name.";
     return false;
-  } 
+  }
   if (!isUnique(theAttribute, aStrAttr->value())) {
     theError = "Variable name is not unique.";
     return false;
index f78e8a247fb10ad7c9bf34badd46a8e04fcc582b..de7690be5e516d4c31a8a86e25a766447fb247f1 100644 (file)
@@ -21,7 +21,7 @@ void ParametersPlugin_WidgetCreator::widgetTypes(std::set<std::string>& theTypes
 }
 
 
-ModuleBase_ModelWidget* 
+ModuleBase_ModelWidget*
   ParametersPlugin_WidgetCreator::createWidgetByType(const std::string& theType,
                                                      QWidget* theParent,
                                                      Config_WidgetAPI* theWidgetApi,
index 485ad91297a7ccd2b0ec05679ff71631389c9a6b..7087b1b9cd2fad45e2903b526af13761cef3d085 100644 (file)
@@ -55,23 +55,23 @@ class ParametersPlugin_ItemDelegate : public QStyledItemDelegate
 public:
   /// Constructor
   /// \param thaParent a parent
-  ParametersPlugin_ItemDelegate(QObject* thaParent) : 
+  ParametersPlugin_ItemDelegate(QObject* thaParent) :
       QStyledItemDelegate(thaParent) {}
 
   /// Redefinition of virtual method
   /// \param painter a painter object
   /// \param option the item options
   /// \param index the current index
-  virtual void paint(QPainter* painter, 
-    const QStyleOptionViewItem& option, 
+  virtual void paint(QPainter* painter,
+    const QStyleOptionViewItem& option,
     const QModelIndex& index ) const;
-  
+
   /// Redefinition of virtual method
   /// \param parent a parent widget
   /// \param option the item options
   /// \param index the current index
-  virtual QWidget* createEditor(QWidget* parent, 
-                                const QStyleOptionViewItem& option, 
+  virtual QWidget* createEditor(QWidget* parent,
+                                const QStyleOptionViewItem& option,
                                 const QModelIndex& index) const;
 
   /// Returns True if the given index is editable item
@@ -96,8 +96,8 @@ bool ParametersPlugin_ItemDelegate::isEditable(const QModelIndex& theIndex) cons
   return true;
 }
 
-void ParametersPlugin_ItemDelegate::paint(QPainter* painter, 
-                                          const QStyleOptionViewItem& option, 
+void ParametersPlugin_ItemDelegate::paint(QPainter* painter,
+                                          const QStyleOptionViewItem& option,
                                           const QModelIndex& index ) const
 {
   QBrush aBrush = painter->brush();
@@ -114,8 +114,8 @@ void ParametersPlugin_ItemDelegate::paint(QPainter* painter,
   painter->setBrush(aBrush);
 }
 
-QWidget* ParametersPlugin_ItemDelegate::createEditor(QWidget* parent, 
-                                                     const QStyleOptionViewItem& option, 
+QWidget* ParametersPlugin_ItemDelegate::createEditor(QWidget* parent,
+                                                     const QStyleOptionViewItem& option,
                                                      const QModelIndex& index) const
 {
   myEditingIdx = index;
@@ -123,7 +123,7 @@ QWidget* ParametersPlugin_ItemDelegate::createEditor(QWidget* parent,
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
-void ParametersPlugin_TreeWidget::closeEditor(QWidget* theEditor, 
+void ParametersPlugin_TreeWidget::closeEditor(QWidget* theEditor,
                                               QAbstractItemDelegate::EndEditHint theHint)
 {
   if (theHint == QAbstractItemDelegate::EditNextItem) {
@@ -159,7 +159,7 @@ void ParametersPlugin_TreeWidget::closeEditor(QWidget* theEditor,
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
 
-ParametersPlugin_WidgetParamsMgr::ParametersPlugin_WidgetParamsMgr(QWidget* theParent, 
+ParametersPlugin_WidgetParamsMgr::ParametersPlugin_WidgetParamsMgr(QWidget* theParent,
   const Config_WidgetAPI* theData)
   : ModuleBase_ModelDialogWidget(theParent, theData)
 {
@@ -183,7 +183,7 @@ ParametersPlugin_WidgetParamsMgr::ParametersPlugin_WidgetParamsMgr(QWidget* theP
   connect(myTable, SIGNAL(itemSelectionChanged()), SLOT(onSelectionChanged()));
 
   myDelegate = new ParametersPlugin_ItemDelegate(myTable);
-  connect(myDelegate, SIGNAL(closeEditor(QWidget*, QAbstractItemDelegate::EndEditHint)), 
+  connect(myDelegate, SIGNAL(closeEditor(QWidget*, QAbstractItemDelegate::EndEditHint)),
           SLOT(onCloseEditor(QWidget*, QAbstractItemDelegate::EndEditHint)));
 
   myTable->setItemDelegate(myDelegate);
@@ -246,7 +246,7 @@ void ParametersPlugin_WidgetParamsMgr::selectItemScroll(QTreeWidgetItem* aItem)
   QModelIndex aParent = myTable->model()->index(0, 0);
   int aChildIdx = myParameters->indexOfChild(aItem);
   QModelIndex aIndex = myTable->model()->index(aChildIdx, Col_Name, aParent);
-  myTable->selectionModel()->select(aIndex, 
+  myTable->selectionModel()->select(aIndex,
     QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
   myTable->scrollToItem(aItem);
 }
@@ -409,7 +409,7 @@ void ParametersPlugin_WidgetParamsMgr::onDoubleClick(const QModelIndex& theIndex
   }
 }
 
-void ParametersPlugin_WidgetParamsMgr::onCloseEditor(QWidget* theEditor, 
+void ParametersPlugin_WidgetParamsMgr::onCloseEditor(QWidget* theEditor,
                                                      QAbstractItemDelegate::EndEditHint theHint)
 {
   FeaturePtr aFeature = myParametersList.at(myDelegate->editIndex().row());
@@ -433,12 +433,12 @@ void ParametersPlugin_WidgetParamsMgr::onCloseEditor(QWidget* theEditor,
         }
         aStringAttr->setValue(aText.toStdString());
         isModified = true;
-      } 
+      }
     }
     break;
   case Col_Equation:
     {
-      AttributeStringPtr aStringAttr = 
+      AttributeStringPtr aStringAttr =
         aFeature->string(ParametersPlugin_Parameter::EXPRESSION_ID());
       if (!aText.isEmpty()) {
         if (aText != aStringAttr->value().c_str()) {
@@ -468,19 +468,19 @@ void ParametersPlugin_WidgetParamsMgr::onCloseEditor(QWidget* theEditor,
   if (aColumn != Col_Comment)
     updateParametersPart();
   updateFeaturesPart();
-          
+
   onSelectionChanged();
 }
 
-void ParametersPlugin_WidgetParamsMgr::updateItem(QTreeWidgetItem* theItem, 
+void ParametersPlugin_WidgetParamsMgr::updateItem(QTreeWidgetItem* theItem,
                                                   const QList<QStringList>& theFeaturesList)
 {
   if (theFeaturesList.count() != theItem->childCount()) {
     if (theItem->childCount()  < theFeaturesList.count()) {
-      while (theItem->childCount() != theFeaturesList.count()) 
+      while (theItem->childCount() != theFeaturesList.count())
         theItem->addChild(createNewItem(theItem));
     } else {
-      while (theItem->childCount() != theFeaturesList.count()) 
+      while (theItem->childCount() != theFeaturesList.count())
         theItem->removeChild(theItem->child(theItem->childCount() - 1));
     }
   }
@@ -521,7 +521,7 @@ QTreeWidgetItem* ParametersPlugin_WidgetParamsMgr::createNewItem(QTreeWidgetItem
   QTreeWidgetItem* aItem = new QTreeWidgetItem(aValues);
   if (theParent == myParameters)
     aItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled);
-  else 
+  else
     aItem->setFlags(Qt::NoItemFlags);
   return aItem;
 }
@@ -534,7 +534,7 @@ void ParametersPlugin_WidgetParamsMgr::onAdd()
     return;
 
   myParametersList.append(aFeature);
-  updateParametersPart();    
+  updateParametersPart();
 
   QTreeWidgetItem* aItem = myParameters->child(myParameters->childCount() - 1);
 
@@ -742,7 +742,7 @@ void ParametersPlugin_WidgetParamsMgr::onSelectionChanged()
 void ParametersPlugin_WidgetParamsMgr::enableButtons(bool theEnable)
 {
   myAddBtn->setEnabled(theEnable);
-  if (theEnable) 
+  if (theEnable)
     onSelectionChanged();
   else {
     myInsertBtn->setEnabled(theEnable);
@@ -759,7 +759,7 @@ bool ParametersPlugin_WidgetParamsMgr::isValid()
   bool aIsValid = true;
   for(int i = 0; i < myParameters->childCount(); i++) {
     aItem = myParameters->child(i);
-    if ((aItem->text(Col_Name) == NoName) || 
+    if ((aItem->text(Col_Name) == NoName) ||
         (aItem->text(Col_Equation) == NoValue) ||
         (!ModelAPI_Expression::isVariable(aItem->text(Col_Name).toStdString())) ) {
       aIsValid = false;
index 74ae279627ece880070d98e06565a2d908c2f1d8..4946ca1a362e54d7e02e4e3fd5606cf9f68d82f9 100644 (file)
@@ -128,7 +128,7 @@ private:
   /// Enable or disable buttons for parameters managemnt
   void enableButtons(bool theEnable);
 
-  QList<QStringList> featuresItems(const QList<FeaturePtr>& theFeatures, 
+  QList<QStringList> featuresItems(const QList<FeaturePtr>& theFeatures,
                                    QList<FeaturePtr>& theFeatureList) const;
   QList<QStringList> parametersItems(const QList<FeaturePtr>& theFeatures) const;
 
index fa6e6647c43a34eb6b75a486b27122499923aa4d..4752d7776c221872b43530f3c1ec985fc56152ef 100644 (file)
@@ -17,4 +17,4 @@
 #endif
 #endif
 
-#endif //PARTSET_H\r
\ No newline at end of file
+#endif //PARTSET_H
index c313ef059c9544e51e879e967145b429a85ce28e..0235e1e5d97ab755a201e7347248976ddf1622ad 100755 (executable)
@@ -184,7 +184,7 @@ AISObjectPtr PartSet_CustomPrs::getPresentation(
   AISObjectPtr anOperationPrs;
   if (myPresentations.contains(theFlag))
     anOperationPrs = myPresentations[theFlag];
-  
+
   if (!anOperationPrs.get() && theToCreate) {
     initPresentation(theFlag);
     anOperationPrs = myPresentations[theFlag];
@@ -203,7 +203,7 @@ bool PartSet_CustomPrs::redisplay(const ObjectPtr& theObject,
   bool aRedisplayed = false;
   if (myIsActive[theFlag])
     aRedisplayed = displayPresentation(theFlag, theUpdateViewer);
-  
+
   return aRedisplayed;
 }
 
index 17ecdeda6f9bff42672d2eda711ea7f37e66eede..2c8ac1d08880d41f2e62c96411ee7aeeb74dd75f 100755 (executable)
@@ -22,13 +22,13 @@ PartSet_ExternalObjectsMgr::PartSet_ExternalObjectsMgr(const std::string& theExt
   QString aIsExternal(theExternal.c_str());
   if (!aIsExternal.isEmpty()) {
     QString aStr = aIsExternal.toUpper();
-    myUseExternal = (aStr == "TRUE") || (aStr == "YES"); 
+    myUseExternal = (aStr == "TRUE") || (aStr == "YES");
   }
 
   QString aCanCreateExternal(theCanCreateExternal.c_str());
   if (!aCanCreateExternal.isEmpty()) {
     QString aStr = aCanCreateExternal.toUpper();
-    myCanCreateExternal = (aStr == "TRUE") || (aStr == "YES"); 
+    myCanCreateExternal = (aStr == "TRUE") || (aStr == "YES");
   }
 }
 
@@ -37,7 +37,7 @@ bool PartSet_ExternalObjectsMgr::isValidObject(const ObjectPtr& theObject)
   bool aValid = true;
   FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
   // Do check using of external feature
-  std::shared_ptr<SketchPlugin_Feature> aSPFeature = 
+  std::shared_ptr<SketchPlugin_Feature> aSPFeature =
           std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
 
   // Do check that we can use external feature
@@ -96,7 +96,7 @@ void PartSet_ExternalObjectsMgr::removeExternalObject(const ObjectPtr& theObject
     if (aFeature.get() != NULL) {
       QObjectPtrList anObjects;
       anObjects.append(aFeature);
-      // the external feature should be removed with all references, 
+      // the external feature should be removed with all references,
       // composite sketch feature will be ignored
       workshop(theWorkshop)->deleteFeatures(anObjects);
     }
index 33e6cfd2f9893fca72f7115191ee353e024e1bdb..22ad88b992db11eab0df313d9828a095a3174d5b 100755 (executable)
@@ -34,7 +34,7 @@ Standard_Boolean PartSet_FilterInfinite::IsOk(const Handle(SelectMgr_EntityOwner
   ResultPtr aResult = myWorkshop->selection()->getResult(aPrs);
   // to filter infinite construction results
   if (aResult.get() && aResult->groupName() == ModelAPI_ResultConstruction::group()) {
-    ResultConstructionPtr aConstruction = 
+    ResultConstructionPtr aConstruction =
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aResult);
     if (aConstruction.get() && aConstruction->isInfinite()) {
       Handle(StdSelect_BRepOwner) aBRepOwner = Handle(StdSelect_BRepOwner)::DownCast(theOwner);
@@ -48,9 +48,9 @@ Standard_Boolean PartSet_FilterInfinite::IsOk(const Handle(SelectMgr_EntityOwner
           TopoDS_Shape aResultTopoShape = aResultShape->impl<TopoDS_Shape>();
           aResultShapeType = aResultTopoShape.ShapeType();
         }
-        // for infinite object, the selection is possible only 
+        // for infinite object, the selection is possible only
         // for shapes of owners, which are coincide
-        // to the shape of corresponded AIS object. 
+        // to the shape of corresponded AIS object.
         // In other words, for axis, only edge can be selected
         // (vertices are not selectable), for planes,
         // only faces can be selected (not edges or vertices)
index 2e14b81ba48e66b3e4ec8949424f22d771977eac..c58ca058c2b945e0061fe823c18d520b5506c968 100755 (executable)
@@ -28,7 +28,7 @@ public:
 
   /// Returns True if selected presentation can be selected
   /// \param theOwner an owner of the persentation
-  Standard_EXPORT virtual Standard_Boolean 
+  Standard_EXPORT virtual Standard_Boolean
     IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
   DEFINE_STANDARD_RTTI(PartSet_FilterInfinite)
index 6c4e5e1b2cf8464dafbce67b3771f0021e793149..8d66327f8cf6549617ba16f5968839c958efc4a8 100644 (file)
@@ -33,7 +33,7 @@ Standard_Boolean PartSet_GlobalFilter::IsOk(const Handle(SelectMgr_EntityOwner)&
     if (ModuleBase_ShapeDocumentFilter::IsOk(theOwner)) {
       std::shared_ptr<GeomAPI_AISObject> aAISObj = AISObjectPtr(new GeomAPI_AISObject());
       if (theOwner->HasSelectable()) {
-        Handle(AIS_InteractiveObject) aAisObj = 
+        Handle(AIS_InteractiveObject) aAisObj =
           Handle(AIS_InteractiveObject)::DownCast(theOwner->Selectable());
         if (!aAisObj.IsNull()) {
           aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aAisObj));
@@ -52,7 +52,7 @@ Standard_Boolean PartSet_GlobalFilter::IsOk(const Handle(SelectMgr_EntityOwner)&
           FeaturePtr aFeature = ModelAPI_Feature::feature(aObj);
           if (aFeature) {
             aValid = aFeature->getKind() != "Group";
-          } else 
+          } else
             aValid = Standard_True;
         }
       } else
@@ -69,7 +69,7 @@ Standard_Boolean PartSet_GlobalFilter::IsOk(const Handle(SelectMgr_EntityOwner)&
 IMPLEMENT_STANDARD_HANDLE(PartSet_CirclePointFilter, SelectMgr_Filter);
 IMPLEMENT_STANDARD_RTTIEXT(PartSet_CirclePointFilter, SelectMgr_Filter);
 
-Standard_Boolean 
+Standard_Boolean
   PartSet_CirclePointFilter::IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const
 {
   ModuleBase_Operation* anOperation = myWorkshop->module()->currentOperation();
@@ -91,7 +91,7 @@ Standard_Boolean
     return Standard_True;
   }
 
-  Handle(ModuleBase_ResultPrs) aResultPrs = 
+  Handle(ModuleBase_ResultPrs) aResultPrs =
     Handle(ModuleBase_ResultPrs)::DownCast(theOwner->Selectable());
   if(aResultPrs.IsNull()) {
     return Standard_True;
index 71d60fe4c663d4afa80a4cd259560938a1358231..c1bd7dee454ba16b25dd2257233b99a9d873eecf 100644 (file)
@@ -26,7 +26,7 @@ public:
 
   /// Returns True if selected presentation can be selected
   /// \param theOwner an owner of the persentation
-  Standard_EXPORT virtual Standard_Boolean 
+  Standard_EXPORT virtual Standard_Boolean
     IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
   DEFINE_STANDARD_RTTI(PartSet_GlobalFilter)
@@ -50,7 +50,7 @@ public:
 
   /// Returns True if the given owner is acceptable for selection
   /// \param theOwner the selected owner
-  Standard_EXPORT virtual Standard_Boolean 
+  Standard_EXPORT virtual Standard_Boolean
     IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
   DEFINE_STANDARD_RTTI(PartSet_CirclePointFilter)
index bf3fcebb355181b20a589a4fe609a5d99749473d..f6b27be574f981a428b45be7c3ed7d5e75b06b36 100644 (file)
@@ -19,7 +19,7 @@ QMap<QString, QString> PartSet_IconFactory::myIcons;
 
 PartSet_IconFactory::PartSet_IconFactory():ModuleBase_IconFactory()
 {
-  Events_Loop::loop()->registerListener(this, 
+  Events_Loop::loop()->registerListener(this,
     Events_Loop::eventByName(Config_FeatureMessage::GUI_EVENT()));
 }
 
@@ -60,9 +60,9 @@ QIcon PartSet_IconFactory::getIcon(ObjectPtr theObj)
                                              anIconString);
       }
       break;
-      default: break;  
+      default: break;
     }
-  } 
+  }
 
   if (theObj->data() && theObj->data()->execState() == ModelAPI_StateMustBeUpdated)
     return QIcon(":pictures/constr_object_modified.png");
@@ -100,7 +100,7 @@ QIcon PartSet_IconFactory::getIcon(ObjectPtr theObj)
 
 void PartSet_IconFactory::processEvent(const std::shared_ptr<Events_Message>& theMessage)
 {
-  if (theMessage->eventID() == 
+  if (theMessage->eventID() ==
       Events_Loop::loop()->eventByName(Config_FeatureMessage::GUI_EVENT())) {
     std::shared_ptr<Config_FeatureMessage> aFeatureMsg =
        std::dynamic_pointer_cast<Config_FeatureMessage>(theMessage);
index 640c1b897fed0483b21f92d6794bfcccbf2bb14c..ce600a203909e271b23a8f3f7d436059cbcdc6ef 100644 (file)
@@ -178,7 +178,7 @@ bool PartSet_MenuMgr::addViewerMenu(const QMap<QString, QAction*>& theStdActions
             connect(aSubMenu, SIGNAL(hovered(QAction*)), SLOT(onLineHighlighted(QAction*)));
             connect(aSubMenu, SIGNAL(aboutToHide()), SLOT(onDetachMenuHide()));
             connect(aSubMenu, SIGNAL(triggered(QAction*)), SLOT(onLineDetach(QAction*)));
-          } 
+          }
         }
       }
     }
@@ -246,7 +246,7 @@ QColor PartSet_MenuMgr::setLineColor(int theId, const QColor theColor, bool theU
 }
 
 
-void addRefCoincidentFeatures(const std::set<AttributePtr>& theRefList, 
+void addRefCoincidentFeatures(const std::set<AttributePtr>& theRefList,
   std::shared_ptr<GeomAPI_Pnt2d>& theRefPnt,
   QObjectPtrList& theOutList)
 {
@@ -254,14 +254,14 @@ void addRefCoincidentFeatures(const std::set<AttributePtr>& theRefList,
   for (aIt = theRefList.cbegin(); aIt != theRefList.cend(); ++aIt) {
     std::shared_ptr<ModelAPI_Attribute> aAttr = (*aIt);
     FeaturePtr aConstrFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aAttr->owner());
-    if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) { 
+    if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) {
       std::shared_ptr<GeomAPI_Pnt2d> aPnt = PartSet_Tools::getCoincedencePoint(aConstrFeature);
       if (aPnt.get() == NULL)
         return;
       gp_Pnt aP = aPnt->impl<gp_Pnt>();
       if (theRefPnt->isEqual(aPnt) && (!theOutList.contains(aConstrFeature))) {
         theOutList.append(aConstrFeature);
-      } 
+      }
     }
   }
 }
@@ -273,7 +273,7 @@ void PartSet_MenuMgr::onLineDetach(QAction* theAction)
   std::shared_ptr<GeomAPI_Pnt2d> aOrig = PartSet_Tools::getCoincedencePoint(mySelectedFeature);
   if (!aOrig.get())
     return;
-  
+
   const std::set<AttributePtr>& aRefsList = aLine->data()->refsToMe();
 
   QObjectPtrList aToDelFeatures;
@@ -304,7 +304,7 @@ void PartSet_MenuMgr::onLineDetach(QAction* theAction)
 
     anOpMgr->startOperation(anOpAction);
     aWorkshop->deleteFeatures(aToDelFeatures);
-    
+
     anOpMgr->commitOperation();
   }
   myCoinsideLines.clear();
@@ -321,7 +321,7 @@ void PartSet_MenuMgr::onDetachMenuHide()
   myPrevId = -1;
 }
 
-  
+
 void PartSet_MenuMgr::setAuxiliary(const bool isChecked)
 {
   ModuleBase_Operation* anOperation = myModule->workshop()->currentOperation();
@@ -373,7 +373,7 @@ void PartSet_MenuMgr::setAuxiliary(const bool isChecked)
         if (aSketchFeature.get() != NULL) {
           std::string anAttribute = SketchPlugin_SketchEntity::AUXILIARY_ID();
 
-          std::shared_ptr<ModelAPI_AttributeBoolean> anAuxiliaryAttr = 
+          std::shared_ptr<ModelAPI_AttributeBoolean> anAuxiliaryAttr =
             std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(
             aSketchFeature->data()->attribute(anAttribute));
           if (anAuxiliaryAttr)
@@ -430,7 +430,7 @@ bool PartSet_MenuMgr::canSetAuxiliary(bool& theValue) const
         if (aSketchFeature.get() != NULL) {
           std::string anAttribute = SketchPlugin_SketchEntity::AUXILIARY_ID();
 
-          std::shared_ptr<ModelAPI_AttributeBoolean> anAuxiliaryAttr = 
+          std::shared_ptr<ModelAPI_AttributeBoolean> anAuxiliaryAttr =
             std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(
             aSketchFeature->data()->attribute(anAttribute));
           if (anAuxiliaryAttr)
@@ -496,7 +496,7 @@ void PartSet_MenuMgr::onEdit(bool)
   QObjectPtrList aObjects = myModule->workshop()->selection()->selectedObjects();
   FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObjects.first());
   if (aFeature == NULL) {
-    ResultParameterPtr aParam = 
+    ResultParameterPtr aParam =
       std::dynamic_pointer_cast<ModelAPI_ResultParameter>(aObjects.first());
     if (aParam.get() != NULL) {
       aFeature = ModelAPI_Feature::feature(aParam);
index 661226ef62dad02115713c8b5ca2f93b175076c2..5061b1fec3fdaf0f9f3d59b94b30b49834a76ace 100644 (file)
@@ -39,7 +39,7 @@ public:
 
   /// Add menu items for viewer into the actions map
   /// \param theStdActions a map of standard actions
-  /// \param theParent a parent widget for the 
+  /// \param theParent a parent widget for the
   /// \param theMenuActions map of action/menu for the desirable index in the viewer menu
   /// \return true if items are added and there is no necessity to provide standard menu
   bool addViewerMenu(const QMap<QString, QAction*>& theStdActions,
@@ -48,7 +48,7 @@ public:
 
   /// Update state of pop-up menu items in viewer
   /// \param theStdActions - a map of standard actions
-  void updateViewerMenu(const QMap<QString, QAction*>& theStdActions); 
+  void updateViewerMenu(const QMap<QString, QAction*>& theStdActions);
 
   /// Activates a PartSet document
   void activatePartSet() const;
@@ -94,7 +94,7 @@ private:
   /// \param theValue the current auxiliary value
   /// \return the boolean result
   bool canSetAuxiliary(bool& theValue) const;
-  
+
   /// Changes the sketcher entity construction argument value
   /// \param isChecked if true, the feature is a construction
   void setAuxiliary(const bool isChecked);
@@ -119,7 +119,7 @@ private:
   PartSet_Module* myModule;
 
   /// the popup menu actions
-  QMap<QString, QAction*> myActions; 
+  QMap<QString, QAction*> myActions;
 
   /// List of lines coincided in a one point
   mutable QList<FeaturePtr> myCoinsideLines;
@@ -130,7 +130,7 @@ private:
   /// Id of menu item in Detach menu previously selected
   int myPrevId;
 
-  /// Original color of highlighted line 
+  /// Original color of highlighted line
   QColor myColor;
 };
 
index 04c57f58a69602f7176e9205148a7811a06dd4ba..4a74d99f3c73767f3e4eea0ff28de5d845a7a17d 100755 (executable)
@@ -244,17 +244,17 @@ void PartSet_Module::registerProperties()
                                    PLANE_SIZE);
   Config_PropManager::registerProp(SKETCH_TAB_NAME, "planes_thickness", "Thickness",
                                    Config_Prop::Integer, SKETCH_WIDTH);
-  Config_PropManager::registerProp(SKETCH_TAB_NAME, "rotate_to_plane", 
+  Config_PropManager::registerProp(SKETCH_TAB_NAME, "rotate_to_plane",
     "Rotate to plane when selected", Config_Prop::Boolean, "false");
 }
 
-void PartSet_Module::connectToPropertyPanel(ModuleBase_ModelWidget* theWidget, 
+void PartSet_Module::connectToPropertyPanel(ModuleBase_ModelWidget* theWidget,
                                             const bool isToConnect)
 {
   mySketchMgr->connectToPropertyPanel(theWidget, isToConnect);
 }
 
-void PartSet_Module::operationCommitted(ModuleBase_Operation* theOperation) 
+void PartSet_Module::operationCommitted(ModuleBase_Operation* theOperation)
 {
   if (sketchMgr()->isNestedSketchOperation(theOperation)) {
     mySketchMgr->commitNestedSketch(theOperation);
@@ -263,7 +263,7 @@ void PartSet_Module::operationCommitted(ModuleBase_Operation* theOperation)
   /// Restart sketcher operations automatically
   if (!mySketchReentrantMgr->operationCommitted(theOperation)) {
 
-    ModuleBase_OperationFeature* aFOperation = 
+    ModuleBase_OperationFeature* aFOperation =
       dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
     if (aFOperation && !aFOperation->isEditOperation()) {
       // the selection is cleared after commit the create operation
@@ -305,7 +305,7 @@ void PartSet_Module::operationStarted(ModuleBase_Operation* theOperation)
     bool isOperationCommitted = false;
     if (!aFOperation->isEditOperation()) {
       std::string aGreedAttributeId = ModuleBase_Tools::findGreedAttribute(workshop(), aFeature);
-      // if there is a greed attribute, automatic commit by preselection 
+      // if there is a greed attribute, automatic commit by preselection
       // for this feature is prohibited
       aFilledWidget = aFOperation->activateByPreselection(aGreedAttributeId);
       if (currentOperation() != aFOperation)
@@ -313,8 +313,8 @@ void PartSet_Module::operationStarted(ModuleBase_Operation* theOperation)
       else {
         if (aGreedAttributeId.empty()) {
           // a signal should be emitted before the next widget activation
-          // because, the activation of the next widget will give a focus to the widget. 
-          // As a result the value of the widget is initialized. 
+          // because, the activation of the next widget will give a focus to the widget.
+          // As a result the value of the widget is initialized.
           // And commit may happens until the value is entered.
           if (aFilledWidget) {
             if (mySketchReentrantMgr->canBeCommittedByPreselection())
@@ -388,7 +388,7 @@ void PartSet_Module::operationResumed(ModuleBase_Operation* theOperation)
 {
   ModuleBase_IModule::operationResumed(theOperation);
 
-  ModuleBase_OperationFeature* aFOperation = 
+  ModuleBase_OperationFeature* aFOperation =
     dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
   if (aFOperation) {
     myCustomPrs->activate(aFOperation->feature(), ModuleBase_IModule::CustomizeArguments, true);
@@ -415,7 +415,7 @@ void PartSet_Module::operationStopped(ModuleBase_Operation* theOperation)
     aDisplayer->updateViewer();
   }
 
-  QMap<PartSet_Tools::ConstraintVisibleState, bool>::const_iterator 
+  QMap<PartSet_Tools::ConstraintVisibleState, bool>::const_iterator
     anIt = myHasConstraintShown.begin(), aLast = myHasConstraintShown.end();
   for (; anIt != aLast; anIt++) {
     mySketchMgr->updateBySketchParameters(anIt.key(), anIt.value());
@@ -495,7 +495,7 @@ bool PartSet_Module::canActivateSelection(const ObjectPtr& theObject) const
   if (isSketchOp || isNestedOp) {
     // in active sketch operation it is possible to activate operation object in selection
     // in the edit operation, e.g. points of the line can be moved when the line is edited
-    ModuleBase_OperationFeature* aFOperation = 
+    ModuleBase_OperationFeature* aFOperation =
       dynamic_cast<ModuleBase_OperationFeature*>(anOperation);
     aCanActivate = aCanActivate || (aFOperation && aFOperation->isEditOperation());
   }
@@ -606,7 +606,7 @@ bool PartSet_Module::createWidgets(ModuleBase_Operation* theOperation,
 {
   bool aProcessed = false;
 
-  ModuleBase_OperationFeature* aFOperation = 
+  ModuleBase_OperationFeature* aFOperation =
     dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
   XGUI_Workshop* aWorkshop = getWorkshop();
   XGUI_PropertyPanel* aPropertyPanel = aWorkshop->propertyPanel();
@@ -621,7 +621,7 @@ bool PartSet_Module::createWidgets(ModuleBase_Operation* theOperation,
       FeaturePtr aFeature = ModelAPI_Feature::feature(anObject);
       FeaturePtr anOpFeature = aFOperation->feature();
       GeomShapePtr aShape = aSelectedPrs->shape();
-      // click on the digit of dimension constrain comes here 
+      // click on the digit of dimension constrain comes here
       // with an empty shape, so we need the check
       if (aFeature == anOpFeature && aShape.get() && !aShape->isNull()) {
         const TopoDS_Shape& aTDShape = aShape->impl<TopoDS_Shape>();
@@ -669,14 +669,14 @@ void PartSet_Module::onSelectionChanged()
       if (aFeature) {
         std::string aId = aFeature->getKind();
         if ((aId == SketchPlugin_ConstraintRadius::ID()) ||
-            (aId == SketchPlugin_ConstraintLength::ID()) || 
+            (aId == SketchPlugin_ConstraintLength::ID()) ||
             (aId == SketchPlugin_ConstraintDistance::ID()) ||
             (aId == SketchPlugin_ConstraintAngle::ID())) {
           editFeature(aFeature);
         }
       }
     }
-  } 
+  }
 }
 
 void PartSet_Module::onKeyRelease(ModuleBase_IViewWindow* theWnd, QKeyEvent* theEvent)
@@ -820,9 +820,9 @@ bool PartSet_Module::deleteObjects()
     anOpMgr->startOperation(anOpAction);
 
     // WORKAROUND, should be done to avoid viewer highlight update after deletetion of objects
-    // the problem is in AIS Dimensions recompute 
+    // the problem is in AIS Dimensions recompute
     // if a line and the dim are removed, line is the first
-    // it causes the AIS recompute, where the base line is null, 
+    // it causes the AIS recompute, where the base line is null,
     // the result is empty AIS in the viewer
     XGUI_Tools::workshop(myWorkshop)->selector()->clearSelection();
 
@@ -883,7 +883,7 @@ void PartSet_Module::launchOperation(const QString& theCmdId)
 
 void PartSet_Module::storeConstraintsState(const std::string& theFeatureKind)
 {
-  if (myWorkshop->currentOperation() && 
+  if (myWorkshop->currentOperation() &&
       myWorkshop->currentOperation()->id().toStdString() == SketchPlugin_Sketch::ID()) {
     const QMap<PartSet_Tools::ConstraintVisibleState, bool>& aShownStates =
                                                   mySketchMgr->showConstraintStates();
@@ -903,7 +903,7 @@ void PartSet_Module::updateConstraintsState(const std::string& theFeatureKind)
   }
 }
 
-void PartSet_Module::onObjectDisplayed(ObjectPtr theObject, AISObjectPtr theAIS) 
+void PartSet_Module::onObjectDisplayed(ObjectPtr theObject, AISObjectPtr theAIS)
 {
   Handle(AIS_InteractiveObject) anAIS = theAIS->impl<Handle(AIS_InteractiveObject)>();
   if (!anAIS.IsNull()) {
@@ -946,8 +946,8 @@ void PartSet_Module::onViewTransformed(int theTrsfType)
   Handle(V3d_Viewer) aV3dViewer = aContext->CurrentViewer();
   Handle(V3d_View) aView;
   double aScale = 0;
-  for (aV3dViewer->InitDefinedViews(); 
-       aV3dViewer->MoreDefinedViews(); 
+  for (aV3dViewer->InitDefinedViews();
+       aV3dViewer->MoreDefinedViews();
        aV3dViewer->NextDefinedViews()) {
     Handle(V3d_View) aV = aV3dViewer->DefinedView();
     double aS = aV->Scale();
@@ -987,7 +987,7 @@ bool PartSet_Module::isCustomPrsActivated(const ModuleBase_CustomizeFlag& theFla
   return myCustomPrs->isActive(theFlag);
 }
 
-void PartSet_Module::activateCustomPrs(const FeaturePtr& theFeature, 
+void PartSet_Module::activateCustomPrs(const FeaturePtr& theFeature,
                                        const ModuleBase_CustomizeFlag& theFlag,
                                        const bool theUpdateViewer)
 {
@@ -1071,13 +1071,13 @@ void PartSet_Module::customizeObjectBrowser(QWidget* theObjectBrowser)
   if (aOB) {
     QLabel* aLabel = aOB->activeDocLabel();
     aLabel->installEventFilter(myMenuMgr);
-    connect(aLabel, SIGNAL(customContextMenuRequested(const QPoint&)), 
+    connect(aLabel, SIGNAL(customContextMenuRequested(const QPoint&)),
           SLOT(onActiveDocPopup(const QPoint&)));
     //QPalette aPalet = aLabel->palette();
     //aPalet.setColor(QPalette::Text, QColor(0, 72, 140));
     //aLabel->setPalette(aPalet);
     aOB->treeView()->setExpandsOnDoubleClick(false);
-    connect(aOB->treeView(), SIGNAL(doubleClicked(const QModelIndex&)), 
+    connect(aOB->treeView(), SIGNAL(doubleClicked(const QModelIndex&)),
       SLOT(onTreeViewDoubleClick(const QModelIndex&)));
   }
 }
@@ -1115,7 +1115,7 @@ ObjectPtr PartSet_Module::findPresentedObject(const AISObjectPtr& theAIS) const
       // if there is an active widget, find the presented object in it
       if (!anActiveWidget)
         anActiveWidget = aPanel->preselectionWidget();
-    
+
       ModuleBase_WidgetValidated* aWidgetValidated = dynamic_cast<ModuleBase_WidgetValidated*>
                                                                              (anActiveWidget);
       if (aWidgetValidated)
@@ -1130,7 +1130,7 @@ bool PartSet_Module::canBeShaded(Handle(AIS_InteractiveObject) theAIS) const
   bool aCanBeShaged = true;
 
   Handle(PartSet_ResultSketchPrs) aPrs = Handle(PartSet_ResultSketchPrs)::DownCast(theAIS);
-  if (!aPrs.IsNull()) 
+  if (!aPrs.IsNull())
     aCanBeShaged = false;
 
   return aCanBeShaged;
@@ -1155,7 +1155,7 @@ void PartSet_Module::addObjectBrowserMenu(QMenu* theMenu) const
     if (aObject) {
       ResultPartPtr aPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObject);
       FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObject);
-      bool isPart = aPart.get() || 
+      bool isPart = aPart.get() ||
         (aFeature.get() && (aFeature->getKind() == PartSetPlugin_Part::ID()));
       if (isPart) {
         DocumentPtr aPartDoc;
@@ -1164,7 +1164,7 @@ void PartSet_Module::addObjectBrowserMenu(QMenu* theMenu) const
         }
         if (aPart.get()) // this may be null is Part feature is disabled
           aPartDoc = aPart->partDoc();
-          
+
         theMenu->addAction(aActivatePartAction);
         aActivatePartAction->setEnabled((aMgr->activeDocument() != aPartDoc));
 
@@ -1196,11 +1196,11 @@ void PartSet_Module::processEvent(const std::shared_ptr<Events_Message>& theMess
     // Do not change activation of parts if an operation active
     static QStringList aAllowActivationList;
     if (aAllowActivationList.isEmpty())
-      aAllowActivationList << 
-      QString(PartSetPlugin_Part::ID().c_str()) << 
+      aAllowActivationList <<
+      QString(PartSetPlugin_Part::ID().c_str()) <<
       QString(PartSetPlugin_Duplicate::ID().c_str()) <<
       QString(PartSetPlugin_Remove::ID().c_str());
-    if (myWorkshop->currentOperation() && 
+    if (myWorkshop->currentOperation() &&
       (!aAllowActivationList.contains(myWorkshop->currentOperation()->id())))
       return;
     XGUI_Workshop* aWorkshop = getWorkshop();
@@ -1226,7 +1226,7 @@ void PartSet_Module::processEvent(const std::shared_ptr<Events_Message>& theMess
     bool aHidden;
     foreach(ObjectPtr aObj, aObjects) {
       //TODO: replace by redisplay event.
-      aHidden = !aObj->data() || !aObj->data()->isValid() || 
+      aHidden = !aObj->data() || !aObj->data()->isValid() ||
         aObj->isDisabled() || (!aObj->isDisplayed());
       if (!aHidden)
         aDisplayer->redisplay(aObj, false);
@@ -1302,7 +1302,7 @@ void PartSet_Module::onViewCreated(ModuleBase_IViewWindow*)
   if (aOperation) {
     ModuleBase_ModelWidget* anActiveWidget = activeWidget();
     if (anActiveWidget) {
-      ModuleBase_WidgetSelector* aWSelector = 
+      ModuleBase_WidgetSelector* aWSelector =
         dynamic_cast<ModuleBase_WidgetSelector*>(anActiveWidget);
       if (aWSelector)
         aWSelector->activateSelectionAndFilters(true);
@@ -1358,7 +1358,7 @@ AttributePtr PartSet_Module::findAttribute(const ObjectPtr& theObject,
 
   if (aGeomShape.get()) {
     TopoDS_Shape aTDSShape = aGeomShape->impl<TopoDS_Shape>();
-    return PartSet_Tools::findAttributeBy2dPoint(theObject, aTDSShape, 
+    return PartSet_Tools::findAttributeBy2dPoint(theObject, aTDSShape,
                                                  mySketchMgr->activeSketch());
   }
   return anAttribute;
index 6687e7aa65338a0456023f8aacbb0a10212d1536..aeae3414671177d6ca1ac61738b66172ce09be08 100755 (executable)
@@ -51,7 +51,7 @@ Q_OBJECT
 enum RestartingMode {
   RM_None, /// the operation should not be restarted
   RM_Forbided, /// the operation should not be restarted after there is no active widget
-  RM_LastFeatureUsed, /// the operation is restarted and use the previous feature 
+  RM_LastFeatureUsed, /// the operation is restarted and use the previous feature
                       /// for own initialization
   RM_EmptyFeatureUsed /// the operation is restarted and does not use the previous feature
 };
@@ -85,7 +85,7 @@ public:
   /// Call back forlast tuning of property panel before operation performance
   virtual void propertyPanelDefined(ModuleBase_Operation* theOperation);
 
-  /// If there is found selected attribute, widgets are created and contains 
+  /// If there is found selected attribute, widgets are created and contains
   /// only a widget for the attribute
   /// It is important for Property Panel filling by sketch point attribute
   /// \param theOperation a started operation
@@ -94,7 +94,7 @@ public:
   virtual bool createWidgets(ModuleBase_Operation* theOperation,
                              QList<ModuleBase_ModelWidget*>& theWidgets) const;
 
-  /// Launching of a edit operation on the feature 
+  /// Launching of a edit operation on the feature
   /// \param theFeature feature for editing
   virtual void editFeature(FeaturePtr theFeature);
 
@@ -286,7 +286,7 @@ public:
 
   /// Update state of pop-up menu items in viewer
   /// \param theStdActions - a map of standard actions
-  virtual void updateViewerMenu(const QMap<QString, QAction*>& theStdActions); 
+  virtual void updateViewerMenu(const QMap<QString, QAction*>& theStdActions);
 
   /// Returns true if the action should be always enabled
   /// \param theActionId an action index: Accept or Accept All
index 0ef59ef8ddc1b8308dda47905e5181a8ce91db5c..6a123df60e3a513880e4a17c4b24ea7e40a4cb87 100755 (executable)
@@ -32,12 +32,12 @@ public:
   /// Processing the mouse release event in the viewer
   /// \param theWindow a view window
   /// \param theEvent a mouse event
-  PARTSET_EXPORT virtual void mouseReleased(ModuleBase_IViewWindow* theWindow, 
+  PARTSET_EXPORT virtual void mouseReleased(ModuleBase_IViewWindow* theWindow,
                                             QMouseEvent* theEvent) {}
   /// Processing the mouse double click event in the viewer
   /// \param theWindow a view window
   /// \param theEvent a mouse event
-  PARTSET_EXPORT virtual void mouseDoubleClick(ModuleBase_IViewWindow* theWindow, 
+  PARTSET_EXPORT virtual void mouseDoubleClick(ModuleBase_IViewWindow* theWindow,
                                                QMouseEvent* theEvent) {}
 };
 
index 3204fa097413a71ff10e2b67a2e578ff8a8a5c08..2724a329767607262bcd8a98729562067551ee3f 100755 (executable)
@@ -91,7 +91,7 @@ void PartSet_OperationPrs::useAISWidth()
 
 void PartSet_OperationPrs::Compute(
             const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-            const Handle(Prs3d_Presentation)& thePresentation, 
+            const Handle(Prs3d_Presentation)& thePresentation,
             const Standard_Integer theMode)
 {
 #ifdef DEBUG_OPERATION_PRS
@@ -108,7 +108,7 @@ void PartSet_OperationPrs::Compute(
   BRep_Builder aBuilder;
   TopoDS_Compound aComp;
   aBuilder.MakeCompound(aComp);
-  for(NCollection_DataMap<TopoDS_Shape, Handle(AIS_InteractiveObject)>::Iterator 
+  for(NCollection_DataMap<TopoDS_Shape, Handle(AIS_InteractiveObject)>::Iterator
       anIter(myShapeToPrsMap); anIter.More(); anIter.Next()) {
     const TopoDS_Shape& aShape = anIter.Key();
     aBuilder.Add(aComp, aShape);
@@ -132,7 +132,7 @@ void PartSet_OperationPrs::Compute(
   }
   Set(aComp);
   if (!aReadyToDisplay) {
-    Events_InfoMessage("PartSet_OperationPrs", 
+    Events_InfoMessage("PartSet_OperationPrs",
       "An empty AIS presentation: PartSet_OperationPrs").send();
     std::shared_ptr<Events_Message> aMsg = std::shared_ptr<Events_Message>(
                 new Events_Message(Events_Loop::eventByName(EVENT_EMPTY_OPERATION_PRESENTATION)));
@@ -171,7 +171,7 @@ void PartSet_OperationPrs::addValue(const ObjectPtr& theObject, const GeomShapeP
   if (theObject.get()) {
     ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
     if (aResult.get()) {
-      ResultCompSolidPtr aCompsolidResult = 
+      ResultCompSolidPtr aCompsolidResult =
         std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(theObject);
       if (aCompsolidResult.get()) {
         if (aCompsolidResult->numberOfSubs() > 0) {
@@ -189,7 +189,7 @@ void PartSet_OperationPrs::addValue(const ObjectPtr& theObject, const GeomShapeP
       else {
         FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
         if (aFeature.get()) {
-          AttributeBooleanPtr aCopyAttr = 
+          AttributeBooleanPtr aCopyAttr =
             aFeature->data()->boolean(SketchPlugin_SketchEntity::COPY_ID());
           if (aCopyAttr.get()) {
             bool isCopy = aCopyAttr->value();
@@ -260,7 +260,7 @@ void PartSet_OperationPrs::getFeatureShapes(const FeaturePtr& theFeature,
     std::string anAttrType = anAttribute->attributeType();
 
     if (anAttrType == ModelAPI_AttributeSelectionList::typeId()) {
-      std::shared_ptr<ModelAPI_AttributeSelectionList> aCurSelList = 
+      std::shared_ptr<ModelAPI_AttributeSelectionList> aCurSelList =
               std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(anAttribute);
       for(int i = 0; i < aCurSelList->size(); i++) {
         std::shared_ptr<ModelAPI_AttributeSelection> aSelAttribute = aCurSelList->value(i);
@@ -294,7 +294,7 @@ void PartSet_OperationPrs::getFeatureShapes(const FeaturePtr& theFeature,
       ObjectPtr anObject;
       GeomShapePtr aShape;
       if (anAttrType == ModelAPI_AttributeRefAttr::typeId()) {
-        AttributeRefAttrPtr anAttr = 
+        AttributeRefAttrPtr anAttr =
           std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(anAttribute);
         if (anAttr->isObject()) {
           anObject = anAttr->object();
@@ -310,13 +310,13 @@ void PartSet_OperationPrs::getFeatureShapes(const FeaturePtr& theFeature,
         }
       }
       if (anAttrType == ModelAPI_AttributeSelection::typeId()) {
-        AttributeSelectionPtr anAttr = 
+        AttributeSelectionPtr anAttr =
           std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(anAttribute);
         anObject = anAttr->context();
         aShape = anAttr->value();
       }
       if (anAttrType == ModelAPI_AttributeReference::typeId()) {
-        AttributeReferencePtr anAttr = 
+        AttributeReferencePtr anAttr =
           std::dynamic_pointer_cast<ModelAPI_AttributeReference>(anAttribute);
         anObject = anAttr->value();
       }
@@ -350,7 +350,7 @@ void PartSet_OperationPrs::getResultShapes(const FeaturePtr& theFeature,
 }
 
 void PartSet_OperationPrs::getHighlightedShapes(ModuleBase_IWorkshop* theWorkshop,
-                                                QMap<ObjectPtr, 
+                                                QMap<ObjectPtr,
                                                 QList<GeomShapePtr> >& theObjectShapes)
 {
   theObjectShapes.clear();
@@ -393,7 +393,7 @@ bool PartSet_OperationPrs::isSelectionAttribute(const AttributePtr& theAttribute
 void PartSet_OperationPrs::fillShapeList(
                             const QMap<ObjectPtr, QList<GeomShapePtr> >& theFeatureShapes,
                             ModuleBase_IWorkshop* theWorkshop,
-                            NCollection_DataMap<TopoDS_Shape, 
+                            NCollection_DataMap<TopoDS_Shape,
                             Handle(AIS_InteractiveObject)>& theShapeToPrsMap)
 {
   theShapeToPrsMap.Clear();
index 39ee53259572a4c29fa2b1caf666986ecc48fd77..ba05d9bd713a503b9dd67467d8a33a6ad173392c 100755 (executable)
@@ -111,7 +111,7 @@ bool PartSet_OverconstraintListener::appendConflictingObjects(
   getConflictingColor(aColor);
 
   // set error state for new objects and append them in the internal map of objects
-  std::set<ObjectPtr>::const_iterator 
+  std::set<ObjectPtr>::const_iterator
     anIt = theConflictingObjects.begin(), aLast = theConflictingObjects.end();
   for (; anIt != aLast; anIt++) {
     ObjectPtr anObject = *anIt;
@@ -133,7 +133,7 @@ bool PartSet_OverconstraintListener::repairConflictingObjects(
   std::set<ObjectPtr> aModifiedObjects;
   // erase error state of absent current objects in the parameter list
   std::set<ObjectPtr>::const_iterator anIt, aLast;
-  for (anIt = theConflictingObjects.begin(), aLast = theConflictingObjects.end(); 
+  for (anIt = theConflictingObjects.begin(), aLast = theConflictingObjects.end();
        anIt != aLast; anIt++) {
     ObjectPtr anObject = *anIt;
     if (theConflictingObjects.find(anObject) != theConflictingObjects.end()) { // it is found
index c636920afb4039e283e44c0298cb0704c028ea2f..dd7df2002115bdeda9b4dc3097975b38b3cfe283 100755 (executable)
@@ -42,7 +42,7 @@ public:
   /// \param theObject an object to be checked
   /// \return boolean result
   bool isConflictingObject(const ObjectPtr& theObject);
-  
+
   /// Returns values of conflicting color
   /// \param theColor the output container to be filled in [red, green, blue] values
   void getConflictingColor(std::vector<int>& theColor);
index 71ddfdb3a70d56edddfce2d3a75e968ee3d7179d..32126f2cb992f798cae18b84b0e6cf72b93da96e 100755 (executable)
@@ -119,12 +119,12 @@ void PartSet_PreviewPlanes::showPreviewPlanes(ModuleBase_IWorkshop* theWorkshop)
   myPreviewDisplayed = true;
 }
 
-AISObjectPtr PartSet_PreviewPlanes::createPreviewPlane(std::shared_ptr<GeomAPI_Pnt> theOrigin, 
-                                                       std::shared_ptr<GeomAPI_Dir> theNorm, 
+AISObjectPtr PartSet_PreviewPlanes::createPreviewPlane(std::shared_ptr<GeomAPI_Pnt> theOrigin,
+                                                       std::shared_ptr<GeomAPI_Dir> theNorm,
                                                        const int theRGB[3])
 {
   double aSize = Config_PropManager::integer(SKETCH_TAB_NAME, "planes_size", PLANE_SIZE);
-  std::shared_ptr<GeomAPI_Shape> aFace = 
+  std::shared_ptr<GeomAPI_Shape> aFace =
     GeomAlgoAPI_FaceBuilder::squareFace(theOrigin, theNorm, aSize);
   AISObjectPtr aAIS = AISObjectPtr(new GeomAPI_AISObject());
   aAIS->createShape(aFace);
index 6ea902663defde7cbefcb878abdf6709e8d5e679..e6ee2b9df124136f6e31817de56067a59a769105 100755 (executable)
@@ -60,8 +60,8 @@ private:
    /// \param theOrigin an origin of the plane
    /// \param theNorm a normal vector of the plane
    /// \param theRGB a color of plane presentation [r, g, b] array
-  AISObjectPtr createPreviewPlane(std::shared_ptr<GeomAPI_Pnt> theOrigin, 
-                                  std::shared_ptr<GeomAPI_Dir> theNorm, 
+  AISObjectPtr createPreviewPlane(std::shared_ptr<GeomAPI_Pnt> theOrigin,
+                                  std::shared_ptr<GeomAPI_Dir> theNorm,
                                   const int theRGB[3]);
 
 private:
index e0d6010c50e896e62382c1b21899bcc53ed5a11a..9cd8bace74fc822549207a7a7db812af9f3e1e23 100755 (executable)
@@ -54,7 +54,7 @@ PartSet_ResultSketchPrs::PartSet_ResultSketchPrs(ResultPtr theResult)
   TopoDS_Shape aShape = aShapePtr->impl<TopoDS_Shape>();
   Set(aShape);
   Handle(Prs3d_Drawer) aDrawer = Attributes();
-  if (aDrawer->HasOwnPointAspect()) 
+  if (aDrawer->HasOwnPointAspect())
     aDrawer->PointAspect()->SetTypeOfMarker(Aspect_TOM_PLUS);
   else
     aDrawer->SetPointAspect(new Prs3d_PointAspect(Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.));
@@ -68,7 +68,7 @@ PartSet_ResultSketchPrs::PartSet_ResultSketchPrs(ResultPtr theResult)
 
 void PartSet_ResultSketchPrs::Compute(
                       const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-                      const Handle(Prs3d_Presentation)& thePresentation, 
+                      const Handle(Prs3d_Presentation)& thePresentation,
                       const Standard_Integer theMode)
 {
   thePresentation->Clear();
@@ -103,7 +103,7 @@ void PartSet_ResultSketchPrs::Compute(
   }
 
   if (!aReadyToDisplay) {
-    Events_InfoMessage("PartSet_ResultSketchPrs", 
+    Events_InfoMessage("PartSet_ResultSketchPrs",
                        "An empty AIS presentation: PartSet_ResultSketchPrs").send();
     static const Events_ID anEvent = Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION);
     ModelAPI_EventCreator::get()->sendUpdated(myResult, anEvent);
@@ -116,7 +116,7 @@ void debugInfo(const TopoDS_Shape& theShape, const TopAbs_ShapeEnum theType)
   TopTools_IndexedMapOfShape aSubShapes;
   TopExp::MapShapes (theShape, theType, aSubShapes);
 
-  Standard_Boolean 
+  Standard_Boolean
     isComesFromDecomposition = !((aSubShapes.Extent() == 1) && (theShape == aSubShapes (1)));
   int anExtent = aSubShapes.Extent();
   for (Standard_Integer aShIndex = 1; aShIndex <= aSubShapes.Extent(); ++aShIndex)
@@ -155,7 +155,7 @@ void PartSet_ResultSketchPrs::ComputeSelection(const Handle(SelectMgr_Selection)
     TopoDS_Compound aComp;
     aBuilder.MakeCompound(aComp);
     aBuilder.Add(aComp, myOriginalShape);
-    
+
     for(NCollection_List<TopoDS_Shape>::Iterator anIt(mySketchFaceList); anIt.More(); anIt.Next()) {
       const TopoDS_Shape& aFace = anIt.Value();
       aBuilder.Add(aComp, aFace);
@@ -211,8 +211,8 @@ void PartSet_ResultSketchPrs::appendShapeSelection(const Handle(SelectMgr_Select
 
 void PartSet_ResultSketchPrs::setAuxiliaryPresentationStyle(const bool isAuxiliary)
 {
-  Standard_Integer aLineStyle = isAuxiliary? 
-    SketchPlugin_SketchEntity::SKETCH_LINE_STYLE_AUXILIARY() : 
+  Standard_Integer aLineStyle = isAuxiliary?
+    SketchPlugin_SketchEntity::SKETCH_LINE_STYLE_AUXILIARY() :
     SketchPlugin_SketchEntity::SKETCH_LINE_STYLE();
 
   Handle(Prs3d_Drawer) aDrawer = Attributes();
@@ -247,7 +247,7 @@ void PartSet_ResultSketchPrs::fillShapes(TopoDS_Shape& theResultShape,
     return;
 
   theFaceList.Clear();
-  ResultConstructionPtr aConstruction = 
+  ResultConstructionPtr aConstruction =
     std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(myResult);
   if (aConstruction.get()) {
     int aFacesNum = aConstruction->facesNum();
index bb816a81b6d1203347ab02ea08dd817ff70963be..2eaa6bff0c3d7ceb421f4f47a607b3e94ccaf365 100755 (executable)
@@ -46,7 +46,7 @@ private:
   /// \param theShape a shape
   /// \param theTypeOfSelection type of selection: VERTEX, EDGE, WIRE
   void appendShapeSelection(const Handle(SelectMgr_Selection)& theSelection,
-                            const TopoDS_Shape& theShape, 
+                            const TopoDS_Shape& theShape,
                             const TopAbs_ShapeEnum& theTypeOfSelection);
 
   /// Sets color/line style/width of the presentation depending on the parameter state
index e91a551705ab76b362ac93c8b90fe342aa4db1c1..32a636598fa3dcc26caabb5a33918ae4add34d36 100755 (executable)
@@ -98,7 +98,7 @@
 //#define DEBUG_CURSOR
 
 /// Fills attribute and result lists by the selected owner. In case if the attribute is found,
-/// by the owner shape, it is put to the list. Otherwise if type of owner shape is edge, 
+/// by the owner shape, it is put to the list. Otherwise if type of owner shape is edge,
 /// put the function result as is to the list of results.
 /// \param theOwner a viewer selected owner
 /// \param theFeature a feature, where the attribute is searched
@@ -291,7 +291,7 @@ void PartSet_SketcherMgr::onAfterValuesChangedInPropertyPanel()
   restoreSelection();
   myCurrentSelection.clear();
 
-  // 3. the flag to disable the update viewer should be set in order to avoid blinking in the 
+  // 3. the flag to disable the update viewer should be set in order to avoid blinking in the
   // viewer happens by deselect/select the modified objects. The flag should be restored after
   // the selection processing. The update viewer should be also called.
   ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
@@ -380,14 +380,14 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE
       restoreSelection();
       launchEditing();
       if (aFeature.get() != NULL) {
-        std::shared_ptr<SketchPlugin_Feature> aSPFeature = 
+        std::shared_ptr<SketchPlugin_Feature> aSPFeature =
                   std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
-        if (aSPFeature.get() && 
+        if (aSPFeature.get() &&
           (aSPFeature->getKind() == SketchPlugin_ConstraintRadius::ID() ||
            aSPFeature->getKind() == SketchPlugin_ConstraintAngle::ID())) {
           DataPtr aData = aSPFeature->data();
           AttributePtr aAttr = aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT());
-          std::shared_ptr<GeomDataAPI_Point2D> aFPAttr = 
+          std::shared_ptr<GeomDataAPI_Point2D> aFPAttr =
             std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aAttr);
           aFPAttr->setValue(myCurrentPoint.myCurX, myCurrentPoint.myCurY);
         }
@@ -405,14 +405,14 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE
       restoreSelection();
       launchEditing();
       if (aFeature.get() != NULL) {
-        std::shared_ptr<SketchPlugin_Feature> aSPFeature = 
+        std::shared_ptr<SketchPlugin_Feature> aSPFeature =
                   std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
-        if (aSPFeature.get() && 
+        if (aSPFeature.get() &&
           (aSPFeature->getKind() == SketchPlugin_ConstraintRadius::ID() ||
            aSPFeature->getKind() == SketchPlugin_ConstraintAngle::ID())) {
           DataPtr aData = aSPFeature->data();
           AttributePtr aAttr = aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT());
-          std::shared_ptr<GeomDataAPI_Point2D> aFPAttr = 
+          std::shared_ptr<GeomDataAPI_Point2D> aFPAttr =
             std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aAttr);
           aFPAttr->setValue(myCurrentPoint.myCurX, myCurrentPoint.myCurY);
         }
@@ -517,7 +517,7 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve
     ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
     XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(aWorkshop);
     XGUI_Displayer* aDisplayer = aConnector->workshop()->displayer();
-    // 3. the flag to disable the update viewer should be set in order to avoid blinking in the 
+    // 3. the flag to disable the update viewer should be set in order to avoid blinking in the
     // viewer happens by deselect/select the modified objects. The flag should be restored after
     // the selection processing. The update viewer should be also called.
     bool isEnableUpdateViewer = aDisplayer->enableUpdateViewer(false);
@@ -543,7 +543,7 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve
           std::string aAttrId = anAttr->id();
           DataPtr aData = aFeature->data();
           if (aData->isValid()) {
-            std::shared_ptr<GeomDataAPI_Point2D> aPoint = 
+            std::shared_ptr<GeomDataAPI_Point2D> aPoint =
               std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(aAttrId));
             if (aPoint.get() != NULL) {
               bool isImmutable = aPoint->setImmutable(true);
@@ -664,7 +664,7 @@ void PartSet_SketcherMgr::onAfterContextMenu()
   myIsPopupMenuActive = false;
 }
 
-void PartSet_SketcherMgr::get2dPoint(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent, 
+void PartSet_SketcherMgr::get2dPoint(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent,
                                      Point& thePoint)
 {
   Handle(V3d_View) aView = theWnd->v3dView();
@@ -678,7 +678,7 @@ void PartSet_SketcherMgr::launchEditing()
 {
   if (!myCurrentSelection.empty()) {
     FeaturePtr aFeature = myCurrentSelection.begin().key();
-    std::shared_ptr<SketchPlugin_Feature> aSPFeature = 
+    std::shared_ptr<SketchPlugin_Feature> aSPFeature =
               std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
     if (aSPFeature && (!aSPFeature->isExternal())) {
       myModule->editFeature(aSPFeature);
@@ -926,7 +926,7 @@ void PartSet_SketcherMgr::startSketch(ModuleBase_Operation* theOperation)
 
   myModule->workshop()->viewer()->addSelectionFilter(myCirclePointFilter);
 
-  if (myPlaneFilter.IsNull()) 
+  if (myPlaneFilter.IsNull())
     myPlaneFilter = new ModuleBase_ShapeInPlaneFilter();
 
   myModule->workshop()->viewer()->addSelectionFilter(myPlaneFilter);
@@ -997,7 +997,7 @@ void PartSet_SketcherMgr::stopSketch(ModuleBase_Operation* theOperation)
     }
     if (!aFOperation->isDisplayedOnStart(myCurrentSketch))
       myCurrentSketch->setDisplayed(true);
-    
+
     myCurrentSketch = CompositeFeaturePtr();
 
     myModule->workshop()->viewer()->removeSelectionFilter(myCirclePointFilter);
@@ -1119,7 +1119,7 @@ bool PartSet_SketcherMgr::canDisplayObject(const ObjectPtr& theObject) const
   bool aHasActiveSketch = activeSketch().get() != NULL;
   if (aHasActiveSketch) {
     // 1. the sketch feature should not be displayed during the sketch active operation
-    // it is hidden by a sketch operation start and shown by a sketch stop, just the sketch 
+    // it is hidden by a sketch operation start and shown by a sketch stop, just the sketch
     // nested features can be visualized
     FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
     if (aFeature.get() != NULL && aFeature == activeSketch()) {
@@ -1173,12 +1173,12 @@ bool PartSet_SketcherMgr::canDisplayObject(const ObjectPtr& theObject) const
       #ifndef DEBUG_DO_NOT_BY_ENTER
       if (isNestedCreateOperation(getCurrentOperation(), activeSketch())) {
         ModuleBase_ModelWidget* anActiveWidget = getActiveWidget();
-        ModuleBase_WidgetEditor* anEditorWdg = 
+        ModuleBase_WidgetEditor* anEditorWdg =
           anActiveWidget ? dynamic_cast<ModuleBase_WidgetEditor*>(anActiveWidget) : 0;
         // the active widget editor should not influence here. The presentation should be visible
         // always when this widget is active.
         if (!anEditorWdg && !myIsPopupMenuActive) {
-          // during a nested create operation, the feature is redisplayed only 
+          // during a nested create operation, the feature is redisplayed only
           // if the mouse over view
           // of there was a value modified in the property panel after the mouse left the view
           aCanDisplay = canDisplayCurrentCreatedFeature();
@@ -1364,7 +1364,7 @@ bool PartSet_SketcherMgr::isObjectOfSketch(const ObjectPtr& theObject) const
 
 void PartSet_SketcherMgr::onPlaneSelected(const std::shared_ptr<GeomAPI_Pln>& thePln)
 {
-  if (myPlaneFilter.IsNull()) 
+  if (myPlaneFilter.IsNull())
    myPlaneFilter = new ModuleBase_ShapeInPlaneFilter();
 
   myPlaneFilter->setPlane(thePln);
@@ -1486,20 +1486,20 @@ void PartSet_SketcherMgr::getSelectionOwners(const FeaturePtr& theFeature,
     ResultPtr aResult = *aIt;
     AISObjectPtr aAISObj = aDisplayer->getAISObject(aResult);
     if (aAISObj.get() == NULL)
-      continue; 
+      continue;
     Handle(AIS_InteractiveObject) anAISIO = aAISObj->impl<Handle(AIS_InteractiveObject)>();
 
-    SelectMgr_IndexedMapOfOwner aSelectedOwners;  
+    SelectMgr_IndexedMapOfOwner aSelectedOwners;
     aConnector->workshop()->selector()->selection()->entityOwners(anAISIO, aSelectedOwners);
     for  ( Standard_Integer i = 1, n = aSelectedOwners.Extent(); i <= n; i++ ) {
-      Handle(StdSelect_BRepOwner) anOwner = 
+      Handle(StdSelect_BRepOwner) anOwner =
         Handle(StdSelect_BRepOwner)::DownCast(aSelectedOwners(i));
       if ( anOwner.IsNull() || !anOwner->HasShape() )
         continue;
       const TopoDS_Shape& aShape = anOwner->Shape();
       TopAbs_ShapeEnum aShapeType = aShape.ShapeType();
       if (aShapeType == TopAbs_VERTEX) {
-        AttributePtr aPntAttr = 
+        AttributePtr aPntAttr =
           PartSet_Tools::findAttributeBy2dPoint(theFeature, aShape, theSketch);
         if (aPntAttr.get() != NULL &&
             aSelectedAttributes.find(aPntAttr) != aSelectedAttributes.end()) {
@@ -1516,7 +1516,7 @@ void PartSet_SketcherMgr::getSelectionOwners(const FeaturePtr& theFeature,
   }
 }
 
-void PartSet_SketcherMgr::connectToPropertyPanel(ModuleBase_ModelWidget* theWidget, 
+void PartSet_SketcherMgr::connectToPropertyPanel(ModuleBase_ModelWidget* theWidget,
                                                  const bool isToConnect)
 {
   if (isToConnect) {
@@ -1643,7 +1643,7 @@ void PartSet_SketcherMgr::storeSelection(const bool theHighlightedOnly)
   // 1. it is necessary to save current selection in order to restore it after the features moving
   myCurrentSelection.clear();
 
-  QList<ModuleBase_ViewerPrsPtr>::const_iterator anIt = aStoredPrs.begin(), 
+  QList<ModuleBase_ViewerPrsPtr>::const_iterator anIt = aStoredPrs.begin(),
                                                 aLast = aStoredPrs.end();
 
   CompositeFeaturePtr aSketch = activeSketch();
@@ -1664,7 +1664,7 @@ void PartSet_SketcherMgr::storeSelection(const bool theHighlightedOnly)
     std::set<AttributePtr> aSelectedAttributes;
     std::set<ResultPtr> aSelectedResults;
     if (myCurrentSelection.find(aFeature) != myCurrentSelection.end()) {
-      std::pair<std::set<AttributePtr>, std::set<ResultPtr> > aPair = 
+      std::pair<std::set<AttributePtr>, std::set<ResultPtr> > aPair =
         myCurrentSelection.find(aFeature).value();
       aSelectedAttributes = aPair.first;
       aSelectedResults = aPair.second;
@@ -1777,7 +1777,7 @@ void PartSet_SketcherMgr::updateSelectionPriority(ObjectPtr theObject,
       // 3. External objects (violet color)
       // 4. Auxiliary segments (dotted)
       // StdSelect_BRepSelectionTool::Load uses priority calculating:
-      // Standard_Integer aPriority = 
+      // Standard_Integer aPriority =
       // (thePriority == -1) ? GetStandardPriority (theShape, theType) : thePriority;
       // Priority of Vertex is 8, edge(segment) is 7.
       // It might be not corrected as provides the condition above.
index 06b553b57f2275322a0881d1e6f1bfa645bf44be..b6cf959d351886a44b32f47d9a0bda2a144f7972 100644 (file)
@@ -204,7 +204,7 @@ public:
   /// \param theOperation an operation
   bool canChangeCursor(ModuleBase_Operation* theOperation) const;
 
-  /// Returns state of constraints showing flag 
+  /// Returns state of constraints showing flag
   const QMap<PartSet_Tools::ConstraintVisibleState, bool>& showConstraintStates();
 
   /// Returns true if the object is a current sketch sub feature of a result of the feature
@@ -213,7 +213,7 @@ public:
   bool isObjectOfSketch(const ObjectPtr& theObject) const;
 
   /// Saves the current selection in the viewer into an internal container
-  /// It obtains the selected attributes. 
+  /// It obtains the selected attributes.
   /// The highlighted objects can be processes as the selected ones
   /// \param theHighlightedOnly a boolean flag
   void storeSelection(const bool theHighlightedOnly = false);
@@ -285,7 +285,7 @@ private slots:
   void onLeaveViewPort();
   /// Listens to the value changed signal and display the current operation feature
   void onBeforeValuesChangedInPropertyPanel();
-  /// Listens to the signal about the modification of the values 
+  /// Listens to the signal about the modification of the values
   /// have been done in the property panel
   void onAfterValuesChangedInPropertyPanel();
 
@@ -303,9 +303,9 @@ private:
   /// Launches the operation from current highlighting
   void launchEditing();
 
-  /// Converts mouse position to 2d coordinates. 
+  /// Converts mouse position to 2d coordinates.
   /// Member myCurrentSketch has to be correctly defined
-  void get2dPoint(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent, 
+  void get2dPoint(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent,
                   Point& thePoint);
 
   /// Show distance value editor if it is a distance operation and all attribute references
@@ -318,7 +318,7 @@ private:
   typedef QMap<FeaturePtr, std::pair<std::set<AttributePtr>, std::set<ResultPtr> > >
                                                                        FeatureToSelectionMap;
 
-  /// Applyes the current selection to the object in the workshop viewer 
+  /// Applyes the current selection to the object in the workshop viewer
   /// It includes the selection in all modes of activation, even local context - vertexes, edges
   /// It gets all results of the feature, find an AIS object in the viewer and takes all BRep
   /// selection owners. If the owner is vertex, the corresponded attribute is seached in
@@ -337,7 +337,7 @@ private:
                                   SelectMgr_IndexedMapOfOwner& anOwnersToSelect);
 
   /// Returns true if the created feature is visible
-  /// \param 
+  /// \param
   bool isVisibleCreatedFeature() const;
 
   /// Returns a current operation
@@ -349,7 +349,7 @@ private:
 
   /// Erase or display the feature of the current operation. If the mouse over the active view or
   /// a current value is changed by property panel, the feature is displayed otherwise it is hidden
-  /// \param theOperation an operation which feature is to be displayed, 
+  /// \param theOperation an operation which feature is to be displayed,
   ///                     it is nested create operation
   /// \param isToDisplay a flag about the display or erase the feature
   void visualizeFeature(const FeaturePtr& theFeature, const bool isEditOperation,
@@ -373,7 +373,7 @@ private:
   bool myDragDone;
   bool myIsMouseOverWindow; /// the state that the mouse over the view
   /// the state whether the over view state is processed by mouseMove method
-  bool myIsMouseOverViewProcessed; 
+  bool myIsMouseOverViewProcessed;
   bool myIsPopupMenuActive; /// the state of the popup menu is shown
   Point myCurrentPoint;
   //Point myClickedPoint;
index cb2bc68ccc164b810a145e737c31b65e2f423ead..6f8ba11fda00bca4ca418f3967dc0cd2313981a7 100755 (executable)
@@ -220,10 +220,10 @@ bool PartSet_SketcherReetntrantMgr::processMouseReleased(ModuleBase_IViewWindow*
       /// selection should be obtained from workshop before ask if the operation can be started as
       /// the canStartOperation method performs commit/abort of previous operation.
       /// Sometimes commit/abort
-      /// may cause selection clear(Sketch operation) as a result 
+      /// may cause selection clear(Sketch operation) as a result
       /// it will be lost and is not used for preselection.
       ModuleBase_ISelection* aSelection = myWorkshop->selection();
-      QList<ModuleBase_ViewerPrsPtr> aPreSelected = 
+      QList<ModuleBase_ViewerPrsPtr> aPreSelected =
         aSelection->getSelected(ModuleBase_ISelection::AllControls);
 
       restartOperation();
@@ -233,7 +233,7 @@ bool PartSet_SketcherReetntrantMgr::processMouseReleased(ModuleBase_IViewWindow*
       // fill the first widget by the mouse event point
       // if the active widget is not the first, it means that the restarted operation is filled by
       // the current preselection.
-      PartSet_WidgetPoint2D* aPoint2DWdg = 
+      PartSet_WidgetPoint2D* aPoint2DWdg =
         dynamic_cast<PartSet_WidgetPoint2D*>(module()->activeWidget());
       ModuleBase_ModelWidget* aFirstWidget = aPanel->findFirstAcceptingValueWidget();
       if (aPoint2DWdg && aPoint2DWdg == aFirstWidget) {
@@ -273,7 +273,7 @@ void PartSet_SketcherReetntrantMgr::onNoMoreWidgets(const std::string& thePrevio
   if (!isActiveMgr())
     return;
 
-  // we should avoid processing of the signal about no more widgets attributes and 
+  // we should avoid processing of the signal about no more widgets attributes and
   // do this after the restart operaion is finished if it was called
   // onNoMoreWidgets depends on myIsFlagsBlocked and fill myNoMoreWidgetsAttribute
   // if it should be called after restart
@@ -447,7 +447,7 @@ bool PartSet_SketcherReetntrantMgr::startInternalEdit(const std::string& thePrev
             // if there is no the next widget to be automatically activated,
             // the Ok button in property
             // panel should accept the focus(example is parallel constraint on sketch lines)
-            QToolButton* anOkBtn = 
+            QToolButton* anOkBtn =
               dynamic_cast<XGUI_PropertyPanel*>(aPanel)->findButton(PROP_PANEL_OK);
             if (anOkBtn)
               anOkBtn->setFocus(Qt::TabFocusReason);
@@ -485,7 +485,7 @@ void PartSet_SketcherReetntrantMgr::restartOperation()
       module()->launchOperation(aFOperation->id());
       myIsFlagsBlocked = false;
       resetFlags();
-      // we should avoid processing of the signal about no more widgets attributes and 
+      // we should avoid processing of the signal about no more widgets attributes and
       // do this after the restart operaion is finished if it was called
       // onNoMoreWidgets depends on myIsFlagsBlocked and fill myNoMoreWidgetsAttribute
       // if it should be called after restart
@@ -543,7 +543,7 @@ void PartSet_SketcherReetntrantMgr::createInternalFeature()
 void PartSet_SketcherReetntrantMgr::deleteInternalFeature()
 {
   if (myInternalActiveWidget) {
-    ModuleBase_WidgetSelector* aWSelector = 
+    ModuleBase_WidgetSelector* aWSelector =
       dynamic_cast<ModuleBase_WidgetSelector*>(myInternalActiveWidget);
     if (aWSelector)
       aWSelector->activateSelectionAndFilters(false);
@@ -614,7 +614,7 @@ bool PartSet_SketcherReetntrantMgr::copyReetntrantAttributes(const FeaturePtr& t
     if (anArcType == SketchPlugin_Arc::ARC_TYPE_TANGENT()) {
       // get the last point of the previuos arc feature(geom point 2d)
       std::shared_ptr<ModelAPI_Data> aSData = theSourceFeature->data();
-      std::shared_ptr<GeomDataAPI_Point2D> aSPointAttr = 
+      std::shared_ptr<GeomDataAPI_Point2D> aSPointAttr =
                                       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
                                       aSData->attribute(SketchPlugin_Arc::END_ID()));
       // get point attribute on the current feature
@@ -622,7 +622,7 @@ bool PartSet_SketcherReetntrantMgr::copyReetntrantAttributes(const FeaturePtr& t
                                                     SketchPlugin_Arc::TANGENT_POINT_ID());
       aTangentPointAttr->setAttr(aSPointAttr);
 
-      std::shared_ptr<GeomDataAPI_Point2D> aNPointAttr = 
+      std::shared_ptr<GeomDataAPI_Point2D> aNPointAttr =
                                     std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
                                     theNewFeature->data()->attribute(SketchPlugin_Arc::END_ID()));
       aNPointAttr->setValue(aSPointAttr->x(), aSPointAttr->y());
index 647d214eed91f79f0bdac0ac078eea7567c0086c..5ae8a76b7e13381ad10529b13e2145cf1e0d55e9 100755 (executable)
@@ -29,7 +29,7 @@ class PartSet_Module;
 /// ('internal' edit operation), with the ability to simultaneously create the next entity
 /// of same type (re-entrance of the operation).
 /// OK valids the current edition and exits from the operation (no re-entrance).
-/// Cancel removes (undo) the entity currently edited and 
+/// Cancel removes (undo) the entity currently edited and
 /// exits from the operation (no re-entrance).
 class PARTSET_EXPORT PartSet_SketcherReetntrantMgr : public QObject
 {
@@ -39,7 +39,7 @@ Q_OBJECT
 enum RestartingMode {
   RM_None, /// the operation should not be restarted
   RM_Forbided, /// the operation should not be restarted after there is no active widget
-  RM_LastFeatureUsed, /// the operation is restarted and use 
+  RM_LastFeatureUsed, /// the operation is restarted and use
                       /// the previous feature for own initialization
   RM_EmptyFeatureUsed /// the operation is restarted and does not use the previous feature
 };
@@ -166,7 +166,7 @@ private:
   bool isTangentArc(ModuleBase_Operation* theOperation,
                     const std::shared_ptr<ModelAPI_CompositeFeature>& /*theSketch*/) const;
 
-  /// Accept All action is enabled if an internal edit is started. 
+  /// Accept All action is enabled if an internal edit is started.
   /// It updates the state of the button
   void updateAcceptAllAction();
 
index 425e1b5b56533685df8adc68d578433408d93c95..ba73f12ae2df9f831e27b4942a1e68c0c04d45ec 100755 (executable)
@@ -158,7 +158,7 @@ Handle(V3d_View) theView,
   theY = aVec.X() * anY->x() + aVec.Y() * anY->y() + aVec.Z() * anY->z();
 }
 
-std::shared_ptr<GeomAPI_Pnt2d> PartSet_Tools::convertTo2D(FeaturePtr theSketch, 
+std::shared_ptr<GeomAPI_Pnt2d> PartSet_Tools::convertTo2D(FeaturePtr theSketch,
                                                     const std::shared_ptr<GeomAPI_Pnt>& thePnt)
 {
   std::shared_ptr<GeomAPI_Pnt2d> aRes;
@@ -188,7 +188,7 @@ std::shared_ptr<GeomAPI_Pnt> PartSet_Tools::convertTo3D(const double theX, const
       aData->attribute(SketchPlugin_Sketch::NORM_ID()));
   std::shared_ptr<GeomAPI_Dir> aY(new GeomAPI_Dir(aNorm->dir()->cross(aX->dir())));
 
-  std::shared_ptr<GeomAPI_Pnt2d> aPnt2d = 
+  std::shared_ptr<GeomAPI_Pnt2d> aPnt2d =
     std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(theX, theY));
 
   return aPnt2d->to3D(aC->pnt(), aX->dir(), aY);
@@ -341,7 +341,7 @@ std::shared_ptr<GeomDataAPI_Point2D> PartSet_Tools::findFirstEqualPoint(
   ModelAPI_ValidatorsFactory* aValidators = ModelAPI_Session::get()->validators();
 
   for (; anIt != aLast && !aFPoint; anIt++) {
-    std::shared_ptr<GeomDataAPI_Point2D> aCurPoint = 
+    std::shared_ptr<GeomDataAPI_Point2D> aCurPoint =
                                              std::dynamic_pointer_cast<GeomDataAPI_Point2D>(*anIt);
     if (aCurPoint && aCurPoint->isInitialized() &&
         aValidators->isCase(theFeature, aCurPoint->id()) &&
@@ -451,8 +451,8 @@ ResultPtr PartSet_Tools::findFixedObjectByExternal(const TopoDS_Shape& theShape,
   return aResult;
 }
 
-ResultPtr PartSet_Tools::createFixedObjectByExternal(const TopoDS_Shape& theShape, 
-                                                     const ObjectPtr& theObject, 
+ResultPtr PartSet_Tools::createFixedObjectByExternal(const TopoDS_Shape& theShape,
+                                                     const ObjectPtr& theObject,
                                                      CompositeFeaturePtr theSketch,
                                                      const bool theTemporary)
 {
@@ -476,10 +476,10 @@ ResultPtr PartSet_Tools::createFixedObjectByExternal(const TopoDS_Shape& theShap
         std::shared_ptr<GeomAPI_Pnt2d> aPnt2d2 = convertTo2D(theSketch, aPnt2);
 
         std::shared_ptr<ModelAPI_Data> aData = aMyFeature->data();
-        std::shared_ptr<GeomDataAPI_Point2D> aPoint1 = 
+        std::shared_ptr<GeomDataAPI_Point2D> aPoint1 =
           std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
           aData->attribute(SketchPlugin_Line::START_ID()));
-        std::shared_ptr<GeomDataAPI_Point2D> aPoint2 = 
+        std::shared_ptr<GeomDataAPI_Point2D> aPoint2 =
           std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
           aData->attribute(SketchPlugin_Line::END_ID()));
 
@@ -516,20 +516,20 @@ ResultPtr PartSet_Tools::createFixedObjectByExternal(const TopoDS_Shape& theShap
     }
     if (aMyFeature) {
       DataPtr aData = aMyFeature->data();
-      AttributeSelectionPtr anAttr = 
+      AttributeSelectionPtr anAttr =
         std::dynamic_pointer_cast<ModelAPI_AttributeSelection>
         (aData->attribute(SketchPlugin_SketchEntity::EXTERNAL_ID()));
 
       ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
       // selection shape has no result owner => the trihedron axis
-      // TODO: make reference to the real axes when 
+      // TODO: make reference to the real axes when
       // they are implemented in the initialization plugin
       if (!aRes.get()) {
         ObjectPtr aPointObj = ModelAPI_Session::get()->moduleDocument()->objectByName(
           ModelAPI_ResultConstruction::group(), "Origin");
         if (aPointObj.get()) { // if initialization plugin performed well
           aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aPointObj);
-        }     
+        }
       }
       if (!aRes.get()) {
         aRes = aMyFeature->firstResult();
@@ -558,37 +558,37 @@ ResultPtr PartSet_Tools::createFixedObjectByExternal(const TopoDS_Shape& theShap
 
     if (aMyFeature) {
       DataPtr aData = aMyFeature->data();
-      AttributeSelectionPtr anAttr = 
+      AttributeSelectionPtr anAttr =
         std::dynamic_pointer_cast<ModelAPI_AttributeSelection>
         (aData->attribute(SketchPlugin_SketchEntity::EXTERNAL_ID()));
 
       ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
-      // if there is no object, 
+      // if there is no object,
       // it means that this is the origin point: search it in the module document
       if (!aRes.get()) {
         ObjectPtr aPointObj = ModelAPI_Session::get()->moduleDocument()->objectByName(
           ModelAPI_ResultConstruction::group(), "Origin");
         if (aPointObj.get()) { // if initialization plugin performed well
           aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aPointObj);
-        }     
+        }
       }
       // reference to itself with name "Origin" (but this may cause the infinitive cycling)
       if (!aRes.get()) {
         // If the point is selected not from Result object
-        std::shared_ptr<GeomAPI_Shape> aShape = 
+        std::shared_ptr<GeomAPI_Shape> aShape =
           std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
         aShape->setImpl(new TopoDS_Shape(theShape));
 
-        std::shared_ptr<GeomAPI_Vertex> aVertex = 
+        std::shared_ptr<GeomAPI_Vertex> aVertex =
           std::shared_ptr<GeomAPI_Vertex>(new GeomAPI_Vertex(aShape));
         std::shared_ptr<GeomAPI_Pnt> aPnt = aVertex->point();
 
         std::shared_ptr<GeomAPI_Pnt2d> aPnt2d = convertTo2D(theSketch, aPnt);
-        std::shared_ptr<GeomDataAPI_Point2D> aPoint = 
+        std::shared_ptr<GeomDataAPI_Point2D> aPoint =
           std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
           aData->attribute(SketchPlugin_Point::COORD_ID()));
         aPoint->setValue(aPnt2d);
-        if ((aPnt->x() < Precision::Confusion()) && 
+        if ((aPnt->x() < Precision::Confusion()) &&
             (aPnt->y() < Precision::Confusion()) &&
             (aPnt->z() < Precision::Confusion()))
           aData->setName("Origin");
@@ -628,12 +628,12 @@ bool PartSet_Tools::isContainPresentation(const QList<ModuleBase_ViewerPrsPtr>&
   return false;
 }
 
-ResultPtr PartSet_Tools::findExternalEdge(CompositeFeaturePtr theSketch, 
+ResultPtr PartSet_Tools::findExternalEdge(CompositeFeaturePtr theSketch,
                                           std::shared_ptr<GeomAPI_Edge> theEdge)
 {
   for (int i = 0; i < theSketch->numberOfSubs(); i++) {
     FeaturePtr aFeature = theSketch->subFeature(i);
-    std::shared_ptr<SketchPlugin_Feature> aSketchFea = 
+    std::shared_ptr<SketchPlugin_Feature> aSketchFea =
       std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
     // not displayed result of feature projection should not be returned as external edge
     if (aSketchFea && aSketchFea->canBeDisplayed()) {
@@ -641,7 +641,7 @@ ResultPtr PartSet_Tools::findExternalEdge(CompositeFeaturePtr theSketch,
         std::list<ResultPtr> aResults = aSketchFea->results();
         std::list<ResultPtr>::const_iterator aIt;
         for (aIt = aResults.cbegin(); aIt != aResults.cend(); ++aIt) {
-          ResultConstructionPtr aRes = 
+          ResultConstructionPtr aRes =
             std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aIt);
           if (aRes) {
             std::shared_ptr<GeomAPI_Shape> aShape = aRes->shape();
@@ -658,19 +658,19 @@ ResultPtr PartSet_Tools::findExternalEdge(CompositeFeaturePtr theSketch,
 }
 
 
-ResultPtr PartSet_Tools::findExternalVertex(CompositeFeaturePtr theSketch, 
+ResultPtr PartSet_Tools::findExternalVertex(CompositeFeaturePtr theSketch,
                                             std::shared_ptr<GeomAPI_Vertex> theVert)
 {
   for (int i = 0; i < theSketch->numberOfSubs(); i++) {
     FeaturePtr aFeature = theSketch->subFeature(i);
-    std::shared_ptr<SketchPlugin_Feature> aSketchFea = 
+    std::shared_ptr<SketchPlugin_Feature> aSketchFea =
       std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
     if (aSketchFea) {
       if (aSketchFea->isExternal()) {
         std::list<ResultPtr> aResults = aSketchFea->results();
         std::list<ResultPtr>::const_iterator aIt;
         for (aIt = aResults.cbegin(); aIt != aResults.cend(); ++aIt) {
-          ResultConstructionPtr aRes = 
+          ResultConstructionPtr aRes =
             std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aIt);
           if (aRes) {
             std::shared_ptr<GeomAPI_Shape> aShape = aRes->shape();
@@ -767,7 +767,7 @@ std::shared_ptr<GeomAPI_Pnt2d> PartSet_Tools::getPoint(
   return std::shared_ptr<GeomAPI_Pnt2d>();
 }
 
-FeaturePtr findFirstCoincidenceByData(const DataPtr& theData, 
+FeaturePtr findFirstCoincidenceByData(const DataPtr& theData,
                                       std::shared_ptr<GeomAPI_Pnt2d> thePoint)
 {
   FeaturePtr aCoincident;
@@ -777,16 +777,16 @@ FeaturePtr findFirstCoincidenceByData(const DataPtr& theData,
   for (aIt = aRefsList.cbegin(); aIt != aRefsList.cend(); ++aIt) {
     std::shared_ptr<ModelAPI_Attribute> aAttr = (*aIt);
     FeaturePtr aConstrFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aAttr->owner());
-    if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) { 
-      std::shared_ptr<GeomAPI_Pnt2d> a2dPnt = 
+    if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) {
+      std::shared_ptr<GeomAPI_Pnt2d> a2dPnt =
         PartSet_Tools::getPoint(aConstrFeature, SketchPlugin_ConstraintCoincidence::ENTITY_A());
-      if (a2dPnt.get() && thePoint->isEqual(a2dPnt)) { 
+      if (a2dPnt.get() && thePoint->isEqual(a2dPnt)) {
         aCoincident = aConstrFeature;
         break;
       } else {
         a2dPnt = PartSet_Tools::getPoint(aConstrFeature,
                                           SketchPlugin_ConstraintCoincidence::ENTITY_B());
-        if (a2dPnt.get() && thePoint->isEqual(a2dPnt)) { 
+        if (a2dPnt.get() && thePoint->isEqual(a2dPnt)) {
           aCoincident = aConstrFeature;
           break;
         }
@@ -808,16 +808,16 @@ FeaturePtr PartSet_Tools::findFirstCoincidence(const FeaturePtr& theFeature,
   for (aIt = aRefsList.cbegin(); aIt != aRefsList.cend(); ++aIt) {
     std::shared_ptr<ModelAPI_Attribute> aAttr = (*aIt);
     FeaturePtr aConstrFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aAttr->owner());
-    if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) { 
-      std::shared_ptr<GeomAPI_Pnt2d> a2dPnt = 
+    if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) {
+      std::shared_ptr<GeomAPI_Pnt2d> a2dPnt =
         PartSet_Tools::getPoint(aConstrFeature, SketchPlugin_ConstraintCoincidence::ENTITY_A());
-      if (a2dPnt.get() && thePoint->isEqual(a2dPnt)) { 
+      if (a2dPnt.get() && thePoint->isEqual(a2dPnt)) {
         aCoincident = aConstrFeature;
         break;
       } else {
         a2dPnt = PartSet_Tools::getPoint(aConstrFeature,
                                           SketchPlugin_ConstraintCoincidence::ENTITY_B());
-        if (a2dPnt.get() && thePoint->isEqual(a2dPnt)) { 
+        if (a2dPnt.get() && thePoint->isEqual(a2dPnt)) {
           aCoincident = aConstrFeature;
           break;
         }
@@ -847,7 +847,7 @@ void PartSet_Tools::findCoincidences(FeaturePtr theStartCoin, QList<FeaturePtr>&
     return;
 
   AttributeRefAttrPtr aPnt = theStartCoin->refattr(theAttr);
-  if (!aPnt) 
+  if (!aPnt)
     return;
   ObjectPtr aObj = aPnt->object();
   FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObj);
@@ -860,13 +860,13 @@ void PartSet_Tools::findCoincidences(FeaturePtr theStartCoin, QList<FeaturePtr>&
       for (aIt = aRefsList.cbegin(); aIt != aRefsList.cend(); ++aIt) {
         std::shared_ptr<ModelAPI_Attribute> aAttr = (*aIt);
         FeaturePtr aConstrFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aAttr->owner());
-        if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) { 
+        if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) {
           if (!theCoincidencies.contains(aConstrFeature)) {
             std::shared_ptr<GeomAPI_Pnt2d> aPnt = getCoincedencePoint(aConstrFeature);
             if (aPnt.get() && aOrig->isEqual(aPnt)) {
-              findCoincidences(aConstrFeature, theList, theCoincidencies, 
+              findCoincidences(aConstrFeature, theList, theCoincidencies,
                 SketchPlugin_ConstraintCoincidence::ENTITY_A());
-              findCoincidences(aConstrFeature, theList, theCoincidencies, 
+              findCoincidences(aConstrFeature, theList, theCoincidencies,
                 SketchPlugin_ConstraintCoincidence::ENTITY_B());
             }
           }
@@ -878,7 +878,7 @@ void PartSet_Tools::findCoincidences(FeaturePtr theStartCoin, QList<FeaturePtr>&
     ResultConstructionPtr aResult = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aObj);
     if (aResult.get()) {
       FeaturePtr aFeature = ModelAPI_Feature::feature(aPnt->object());
-      if (!theList.contains(aFeature)) 
+      if (!theList.contains(aFeature))
         theList.append(aFeature);
       theCoincidencies.append(theStartCoin);
 
@@ -887,13 +887,13 @@ void PartSet_Tools::findCoincidences(FeaturePtr theStartCoin, QList<FeaturePtr>&
       for (aIt = aRefsList.cbegin(); aIt != aRefsList.cend(); ++aIt) {
         std::shared_ptr<ModelAPI_Attribute> aAttr = (*aIt);
         FeaturePtr aConstrFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aAttr->owner());
-        if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) { 
+        if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID()) {
           if (!theCoincidencies.contains(aConstrFeature)) {
             std::shared_ptr<GeomAPI_Pnt2d> aPnt = getCoincedencePoint(aConstrFeature);
             if (aPnt.get() && aOrig->isEqual(aPnt)) {
-              findCoincidences(aConstrFeature, theList, theCoincidencies, 
+              findCoincidences(aConstrFeature, theList, theCoincidencies,
                 SketchPlugin_ConstraintCoincidence::ENTITY_A());
-              findCoincidences(aConstrFeature, theList, theCoincidencies, 
+              findCoincidences(aConstrFeature, theList, theCoincidencies,
                 SketchPlugin_ConstraintCoincidence::ENTITY_B());
             }
           }
@@ -905,15 +905,15 @@ void PartSet_Tools::findCoincidences(FeaturePtr theStartCoin, QList<FeaturePtr>&
 
 std::shared_ptr<GeomAPI_Pnt2d> PartSet_Tools::getCoincedencePoint(FeaturePtr theStartCoin)
 {
-  std::shared_ptr<GeomAPI_Pnt2d> aPnt = SketcherPrs_Tools::getPoint(theStartCoin.get(), 
+  std::shared_ptr<GeomAPI_Pnt2d> aPnt = SketcherPrs_Tools::getPoint(theStartCoin.get(),
                                                         SketchPlugin_Constraint::ENTITY_A());
   if (aPnt.get() == NULL)
     aPnt = SketcherPrs_Tools::getPoint(theStartCoin.get(), SketchPlugin_Constraint::ENTITY_B());
   return aPnt;
 }
 
-AttributePtr PartSet_Tools::findAttributeBy2dPoint(ObjectPtr theObj, 
-                                                   const TopoDS_Shape theShape, 
+AttributePtr PartSet_Tools::findAttributeBy2dPoint(ObjectPtr theObj,
+                                                   const TopoDS_Shape theShape,
                                                    FeaturePtr theSketch)
 {
 
@@ -928,17 +928,17 @@ AttributePtr PartSet_Tools::findAttributeBy2dPoint(ObjectPtr theObj,
             new GeomAPI_Pnt(aPoint.X(), aPoint.Y(), aPoint.Z()));
 
         // find the given point in the feature attributes
-        std::list<AttributePtr> anAttiributes = 
+        std::list<AttributePtr> anAttiributes =
           aFeature->data()->attributes(GeomDataAPI_Point2D::typeId());
-        std::list<AttributePtr>::const_iterator anIt = anAttiributes.begin(), 
+        std::list<AttributePtr>::const_iterator anIt = anAttiributes.begin(),
                                                 aLast = anAttiributes.end();
         for (; anIt != aLast && !anAttribute; anIt++) {
-          std::shared_ptr<GeomDataAPI_Point2D> aCurPoint = 
+          std::shared_ptr<GeomDataAPI_Point2D> aCurPoint =
             std::dynamic_pointer_cast<GeomDataAPI_Point2D>(*anIt);
           if (!aCurPoint->isInitialized())
             continue;
 
-          std::shared_ptr<GeomAPI_Pnt> aPnt = 
+          std::shared_ptr<GeomAPI_Pnt> aPnt =
             convertTo3D(aCurPoint->x(), aCurPoint->y(), theSketch);
           if (aPnt && (aPnt->distance(aValue) < Precision::Confusion())) {
             anAttribute = aCurPoint;
index 7e92c4d24adedc6bede4bcbc1e1261f9ecf41a73..7826014e1f44a48caba6558711459f22b76a5a08 100755 (executable)
@@ -78,14 +78,14 @@ public:
   /// \param theSketch the sketch feature
   /// \param thePnt the 3D point in the viewer
   /// \returns the converted point object
-  static std::shared_ptr<GeomAPI_Pnt2d> convertTo2D(FeaturePtr theSketch, 
+  static std::shared_ptr<GeomAPI_Pnt2d> convertTo2D(FeaturePtr theSketch,
                                                     const std::shared_ptr<GeomAPI_Pnt>& thePnt);
 
   /// \brief Converts the 2D projected coodinates on the sketch plane to the 3D point.
   /// \param theX the X coordinate
   /// \param theY the Y coordinate
   /// \param theSketch the sketch feature
-  static std::shared_ptr<GeomAPI_Pnt> convertTo3D(const double theX, const double theY, 
+  static std::shared_ptr<GeomAPI_Pnt> convertTo3D(const double theX, const double theY,
                                                   FeaturePtr theSketch);
 
   /// Returns pointer to the root document.
@@ -135,7 +135,7 @@ public:
   static std::shared_ptr<GeomDataAPI_Point2D> findFirstEqualPoint(const FeaturePtr& theFeature,
                                        const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
 
-  /// Creates constrains of the current 
+  /// Creates constrains of the current
   /// \param theSketch a sketch feature
   /// \param theFeature a source feature
   /// \param theAttribute a name of the requried attribute attribute
@@ -164,7 +164,7 @@ public:
   /// \return result of found feature or NULL
   static std::shared_ptr<ModelAPI_Result> findFixedObjectByExternal(
                                              const TopoDS_Shape& theShape,
-                                             const ObjectPtr& theObject, 
+                                             const ObjectPtr& theObject,
                                              CompositeFeaturePtr theSketch);
 
   /// Creates a line (arc or circle) by given edge
@@ -175,8 +175,8 @@ public:
   /// \param theTemporary the created external object is temporary, execute is not performed for it
   /// \return result of created feature
   static std::shared_ptr<ModelAPI_Result> createFixedObjectByExternal(
-                                               const TopoDS_Shape& theShape, 
-                                               const ObjectPtr& theObject, 
+                                               const TopoDS_Shape& theShape,
+                                               const ObjectPtr& theObject,
                                                CompositeFeaturePtr theSketch,
                                                const bool theTemporary = false);
 
@@ -207,7 +207,7 @@ public:
   /// \param theView a 3D view
   /// \param theX the output horizontal coordinate of the point
   /// \param theY the output vertical coordinate of the point
-  static bool hasVertexShape(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs, 
+  static bool hasVertexShape(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs,
                              FeaturePtr theSketch,
                              Handle_V3d_View theView, double& theX, double& theY);
 
index 6cd04eb542d909dcf254a9aaedf52297b8c4fe5e..b31ef035a9416ab98ab9d441120e1a937c57a2c1 100755 (executable)
@@ -85,19 +85,19 @@ std::shared_ptr<GeomAPI_Pln> sketcherPlane(ModuleBase_Operation* theOperation)
     ModuleBase_OperationFeature* aFeatureOp =
       dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
     if (aFeatureOp) {
-      CompositeFeaturePtr aFeature = 
+      CompositeFeaturePtr aFeature =
         std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aFeatureOp->feature());
       if (aFeature && (aFeature->getKind() == SketchPlugin_Sketch::ID()))
         return PartSet_Tools::sketchPlane(aFeature);
     }
   }
-  return aEmptyPln; 
+  return aEmptyPln;
 }
 
 
 bool isEmptySelectionValid(ModuleBase_Operation* theOperation)
 {
-  ModuleBase_OperationFeature* aFeatureOp = 
+  ModuleBase_OperationFeature* aFeatureOp =
     dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
   // during the create operation empty selection is always valid
   if (!aFeatureOp->isEditOperation()) {
@@ -108,7 +108,7 @@ bool isEmptySelectionValid(ModuleBase_Operation* theOperation)
       std::shared_ptr<GeomAPI_Pln> aPlane = sketcherPlane(theOperation);
       if (aPlane.get())
         return true;
-      else 
+      else
         return false;
     }
     else
@@ -167,7 +167,7 @@ bool PartSet_RadiusSelection::isValid(const ModuleBase_ISelection* theSelection,
   if (theSelection->getSelected(ModuleBase_ISelection::Viewer).size() == 0) {
     return isEmptySelectionValid(theOperation);
   } else {
-    QList<ModuleBase_ViewerPrsPtr> aList = 
+    QList<ModuleBase_ViewerPrsPtr> aList =
       theSelection->getSelected(ModuleBase_ISelection::Viewer);
     int aCount = 0;
     foreach (ModuleBase_ViewerPrsPtr aPrs, aList) {
@@ -194,7 +194,7 @@ bool PartSet_RigidSelection::isValid(const ModuleBase_ISelection* theSelection,
   if (theSelection->getSelected(ModuleBase_ISelection::Viewer).size() == 0) {
     return isEmptySelectionValid(theOperation);
   } else {
-    QList<ModuleBase_ViewerPrsPtr> aList = 
+    QList<ModuleBase_ViewerPrsPtr> aList =
       theSelection->getSelected(ModuleBase_ISelection::Viewer);
     return (aList.count() == 1);
   }
@@ -285,7 +285,7 @@ bool PartSet_AngleSelection::isValid(const ModuleBase_ISelection* theSelection,
   }
 }
 
-bool PartSet_EqualSelection::isValid(const ModuleBase_ISelection* theSelection, 
+bool PartSet_EqualSelection::isValid(const ModuleBase_ISelection* theSelection,
                                      ModuleBase_Operation* theOperation) const
 {
   if (theSelection->getSelected(ModuleBase_ISelection::Viewer).size() == 0) {
@@ -374,20 +374,20 @@ std::string PartSet_DifferentObjectsValidator::errorMessage(
   return anError;
 }
 
-bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute, 
+bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute,
                                                 const std::list<std::string>& theArguments,
                                                 Events_InfoMessage& theError) const
 {
   FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
 
-  // the type of validated attributes should be equal, attributes with 
+  // the type of validated attributes should be equal, attributes with
   // different types are not validated
   // Check RefAttr attributes
   std::string anAttrType = theAttribute->attributeType();
   std::list<std::shared_ptr<ModelAPI_Attribute> > anAttrs;
 
   if (anAttrType == ModelAPI_AttributeRefAttr::typeId()) {
-    AttributeRefAttrPtr anAttr = 
+    AttributeRefAttrPtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
     bool isObject = anAttr->isObject();
     ObjectPtr anObject = anAttr->object();
@@ -422,7 +422,7 @@ bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute
     }
   }
   else if (anAttrType == ModelAPI_AttributeSelection::typeId()) {
-    AttributeSelectionPtr anAttr = 
+    AttributeSelectionPtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
     ResultPtr aContext = anAttr->context();
     GeomShapePtr aShape = anAttr->value();
@@ -448,7 +448,7 @@ bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute
     }
   }
   else if (anAttrType == ModelAPI_AttributeReference::typeId()) {
-    AttributeReferencePtr anAttr = 
+    AttributeReferencePtr anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
     ObjectPtr anObject = anAttr->value();
     // Check selection attributes
@@ -471,14 +471,14 @@ bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute
     }
   }
   else if(anAttrType == ModelAPI_AttributeSelectionList::typeId()) {
-    std::shared_ptr<ModelAPI_AttributeSelectionList> aCurSelList = 
+    std::shared_ptr<ModelAPI_AttributeSelectionList> aCurSelList =
             std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
     anAttrs = aFeature->data()->attributes(ModelAPI_AttributeSelectionList::typeId());
     if(anAttrs.size() > 0) {
       std::list<std::shared_ptr<ModelAPI_Attribute>>::iterator anAttrItr = anAttrs.begin();
       for(; anAttrItr != anAttrs.end(); anAttrItr++){
         if ((*anAttrItr).get() && (*anAttrItr)->id() != theAttribute->id()){
-          std::shared_ptr<ModelAPI_AttributeSelectionList> aRefSelList = 
+          std::shared_ptr<ModelAPI_AttributeSelectionList> aRefSelList =
             std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(*anAttrItr);
           for(int i = 0; i < aCurSelList->size(); i++) {
             std::shared_ptr<ModelAPI_AttributeSelection> aCurSel = aCurSelList->value(i);
@@ -491,7 +491,7 @@ bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute
             for(int j = 0; j < aRefSelList->size(); j++) {
               std::shared_ptr<ModelAPI_AttributeSelection> aRefSel = aRefSelList->value(j);
               ResultPtr aRefSelContext = aRefSel->context();
-              ResultCompSolidPtr aRefSelCompSolidPtr = 
+              ResultCompSolidPtr aRefSelCompSolidPtr =
                 ModelAPI_Tools::compSolidOwner(aRefSelContext);
               std::shared_ptr<GeomAPI_Shape> aRefSelCompSolid;
               if(aRefSelCompSolidPtr.get()) {
@@ -549,7 +549,7 @@ bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute
   return true;
 }
 
-bool PartSet_CoincidentAttr::isValid(const AttributePtr& theAttribute, 
+bool PartSet_CoincidentAttr::isValid(const AttributePtr& theAttribute,
                                      const std::list<std::string>& theArguments,
                                      Events_InfoMessage& theError) const
 {
index aa2a5d7e6be3e0667589e05bacfbac5b0dcdedee..64c61c9b9052823016cf99c6d8ca5074a674ef99 100644 (file)
@@ -23,7 +23,7 @@
 class PartSet_DistanceSelection : public ModuleBase_SelectionValidator
 {
 public:
-  PARTSET_EXPORT virtual bool isValid(const ModuleBase_ISelection* theSelection, 
+  PARTSET_EXPORT virtual bool isValid(const ModuleBase_ISelection* theSelection,
                                       ModuleBase_Operation* theOperation) const;
 };
 
@@ -32,7 +32,7 @@ public:
 class PartSet_LengthSelection : public ModuleBase_SelectionValidator
 {
 public:
-  PARTSET_EXPORT virtual bool isValid(const ModuleBase_ISelection* theSelection, 
+  PARTSET_EXPORT virtual bool isValid(const ModuleBase_ISelection* theSelection,
                                       ModuleBase_Operation* theOperation) const;
 };
 
@@ -41,7 +41,7 @@ public:
 class PartSet_PerpendicularSelection : public ModuleBase_SelectionValidator
 {
 public:
-  PARTSET_EXPORT virtual bool isValid(const ModuleBase_ISelection* theSelection, 
+  PARTSET_EXPORT virtual bool isValid(const ModuleBase_ISelection* theSelection,
                                       ModuleBase_Operation* theOperation) const;
 };
 
@@ -172,7 +172,7 @@ class PartSet_DifferentObjectsValidator : public ModelAPI_AttributeValidator
 private:
   //! Returns error message for the error type
   //! \param theType a type of error
-  //! \param thEqualObjectInfo an 
+  //! \param thEqualObjectInfo an
   std::string errorMessage(const PartSet_DifferentObjectsValidator::ErrorType& theType,
                            const std::string& thEqualObject, const std::string& theFirstAttribute,
                            const std::string& theSecondAttribute) const;
index d83bc3643a7b06b42dc492b63614447e2f077eed..6c70e7f7d311fabb617ca4e617170e7b9b23133c 100644 (file)
@@ -22,7 +22,7 @@ Q_OBJECT
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuation. The attribute of the model widget is obtained from
-  PartSet_WidgetChoice(QWidget* theParent, const Config_WidgetAPI* theData) 
+  PartSet_WidgetChoice(QWidget* theParent, const Config_WidgetAPI* theData)
     : ModuleBase_WidgetChoice(theParent, theData) {}
 };
 
index c1bf231f2042b32d61a833bc66bd7c6bb85df94f..ca4f9635545f5c3df014a3349d95eb9add223170 100644 (file)
@@ -29,7 +29,7 @@ bool PartSet_WidgetFileSelector::restoreValueCustom()
 
   DataPtr aData = myFeature->data();
   AttributeStringPtr aStringAttr = aData->string(ExchangePlugin_ExportFeature::FILE_PATH_ID());
-  mySelectedFilter = 
+  mySelectedFilter =
     formatToFilter(shortFormatToFullFormat(QString::fromStdString(aStringAttr->value())));
 
   return ModuleBase_WidgetFileSelector::restoreValueCustom();
index 60fffb15d3728f5c68fd37dbcd854275953b09d5..322864def53255c89d57168cd4e65cf3358f7c6f 100755 (executable)
@@ -71,7 +71,7 @@ void PartSet_WidgetMultiSelector::getGeomSelection(const ModuleBase_ViewerPrsPtr
   ModuleBase_WidgetMultiSelector::getGeomSelection(thePrs, theObject, theShape);
 
   FeaturePtr aSelectedFeature = ModelAPI_Feature::feature(theObject);
-  std::shared_ptr<SketchPlugin_Feature> aSPFeature = 
+  std::shared_ptr<SketchPlugin_Feature> aSPFeature =
           std::dynamic_pointer_cast<SketchPlugin_Feature>(aSelectedFeature);
   // there is no a sketch feature is selected, but the shape exists, try to create an exernal object
   // TODO: unite with the same functionality in PartSet_WidgetShapeSelector
@@ -87,7 +87,7 @@ void PartSet_WidgetMultiSelector::getGeomSelection(const ModuleBase_ViewerPrsPtr
             aShape = aResult->shape();
         }
         if (aShape.get() != NULL && !aShape->isNull())
-          anExternalObject = 
+          anExternalObject =
             myExternalObjectMgr->externalObject(theObject, aShape, sketch(), myIsInValidate);
       }
       else {
index 4ec5e13505fdeee5e22395529da5e6003ab2c978..3bf11d9739d97ae95628b8d4dcc6f79beff52b1c 100644 (file)
@@ -70,7 +70,7 @@ protected:
   /// Manager of external objects
   PartSet_ExternalObjectsMgr* myExternalObjectMgr;
 
-  /// Pointer to a sketch 
+  /// Pointer to a sketch
   CompositeFeaturePtr mySketch;
 };
 
index f02e6a2b75d4b04da084641cd824152a3fdf8da7..3563e950edfc90d1dddfc2182e2b556e2598ae4f 100755 (executable)
@@ -18,7 +18,7 @@
 #include <QWidget>
 
 
-PartSet_WidgetPoint2DFlyout::PartSet_WidgetPoint2DFlyout(QWidget* theParent, 
+PartSet_WidgetPoint2DFlyout::PartSet_WidgetPoint2DFlyout(QWidget* theParent,
                                                          ModuleBase_IWorkshop* theWorkshop,
                                                          const Config_WidgetAPI* theData)
  : PartSet_WidgetPoint2D(theParent, theWorkshop, theData)
index f6eeb7af374b4c6798784705df78a9385d52874c..8b1a87cb7ea7f2cd540de22812be8faf1dcb608c 100755 (executable)
@@ -30,7 +30,7 @@ public:
   /// Destructor
   virtual ~PartSet_WidgetPoint2DFlyout() {};
 
-  /// Checks if the selection presentation is valid in widget 
+  /// Checks if the selection presentation is valid in widget
   /// \param theValue a selected presentation in the view
   /// \return a boolean value
   virtual bool isValidSelectionCustom(const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);
index c07953f446fb45c63087776591043673b12c43e4..df82c9b5f53c7206c70830319f0b8e1dbab66126 100644 (file)
@@ -62,7 +62,7 @@ const double MaxCoordinate = 1e12;
 
 static QStringList MyFeaturesForCoincedence;
 
-PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent, 
+PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent,
                                              ModuleBase_IWorkshop* theWorkshop,
                                              const Config_WidgetAPI* theData)
 : ModuleBase_ModelWidget(theParent, theData), myWorkshop(theWorkshop),
@@ -131,7 +131,7 @@ bool PartSet_WidgetPoint2D::isValidSelectionCustom(const ModuleBase_ViewerPrsPtr
   bool aValid = true;
 
   PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(myWorkshop->module());
-  if (aModule->sketchReentranceMgr()->isInternalEditActive()) 
+  if (aModule->sketchReentranceMgr()->isInternalEditActive())
     return true; /// when internal edit is started a new feature is created. I has not results, AIS
 
   /// the selection is not possible if the current feature has no presentation for the current
@@ -381,8 +381,8 @@ void PartSet_WidgetPoint2D::deactivate()
   myWorkshop->deactivateSubShapesSelection();
 }
 
-bool PartSet_WidgetPoint2D::getPoint2d(const Handle(V3d_View)& theView, 
-                                       const TopoDS_Shape& theShape, 
+bool PartSet_WidgetPoint2D::getPoint2d(const Handle(V3d_View)& theView,
+                                       const TopoDS_Shape& theShape,
                                        double& theX, double& theY) const
 {
   if (!theShape.IsNull()) {
@@ -449,7 +449,7 @@ void PartSet_WidgetPoint2D::mouseReleased(ModuleBase_IViewWindow* theWindow, QMo
   Handle(V3d_View) aView = theWindow->v3dView();
 
   QList<ModuleBase_ViewerPrsPtr> aList = aSelection->getSelected(ModuleBase_ISelection::Viewer);
-  ModuleBase_ViewerPrsPtr aFirstValue = 
+  ModuleBase_ViewerPrsPtr aFirstValue =
     aList.size() > 0 ? aList.first() : ModuleBase_ViewerPrsPtr();
   if (!aFirstValue.get() && myPreSelected.get()) {
     aFirstValue = myPreSelected;
@@ -487,7 +487,7 @@ void PartSet_WidgetPoint2D::mouseReleased(ModuleBase_IViewWindow* theWindow, QMo
                                isOrphanPoint(aSelectedFeature, mySketch, aX, aY);
           if (anExternal) {
             // we should not stop reentrant operation on external objects because
-            anOrphanPoint = true; 
+            anOrphanPoint = true;
             // they are not participate in the contour creation excepting external vertices
             if (aShape.ShapeType() == TopAbs_VERTEX) {
               FeaturePtr aFixedFeature = ModelAPI_Feature::feature(aFixedObject);
@@ -496,9 +496,9 @@ void PartSet_WidgetPoint2D::mouseReleased(ModuleBase_IViewWindow* theWindow, QMo
               }
             }
             else {
-              // point is taken from mouse event and set in attribute. 
+              // point is taken from mouse event and set in attribute.
               // It should be done before setting
-              // coinident constraint to the external line. If a point is created, it should be 
+              // coinident constraint to the external line. If a point is created, it should be
               // in the mouse clicked point
               gp_Pnt aPoint =
                 PartSet_Tools::convertClickToPoint(theEvent->pos(), theWindow->v3dView());
@@ -509,7 +509,7 @@ void PartSet_WidgetPoint2D::mouseReleased(ModuleBase_IViewWindow* theWindow, QMo
           }
           if (aFixedObject.get())
             setConstraintWith(aFixedObject);
-          // fignal updated should be flushed in order to visualize possible created 
+          // fignal updated should be flushed in order to visualize possible created
           // external objects e.g. selection of trihedron axis when input end arc point
           updateObject(feature());
 
@@ -540,7 +540,7 @@ void PartSet_WidgetPoint2D::mouseReleased(ModuleBase_IViewWindow* theWindow, QMo
         }
         else if (aShape.ShapeType() == TopAbs_EDGE) {
           // point is taken from mouse event and set in attribute. It should be done before setting
-          // coinident constraint to the external line. If a point is created, it should be in 
+          // coinident constraint to the external line. If a point is created, it should be in
           // the mouse clicked point
           gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), theWindow->v3dView());
           PartSet_Tools::convertTo2D(aPoint, mySketch, aView, aX, aY);
@@ -549,7 +549,7 @@ void PartSet_WidgetPoint2D::mouseReleased(ModuleBase_IViewWindow* theWindow, QMo
           setValueState(Stored); // in case of edge selection, Apply state should also be updated
           isAuxiliaryFeature = PartSet_Tools::isAuxiliarySketchEntity(aObject);
         }
-        // it is important to perform updateObject() in order to the current value is 
+        // it is important to perform updateObject() in order to the current value is
         // processed by Sketch Solver. Test case: line is created from a previous point
         // to some distance, but in the area of the highlighting of the point. Constraint
         // coincidence is created, after the solver is performed, the distance between the
@@ -580,7 +580,7 @@ void PartSet_WidgetPoint2D::mouseReleased(ModuleBase_IViewWindow* theWindow, QMo
     //aIgnore.append(feature());
 
     //double aTolerance = aView->Convert(7);
-    //std::shared_ptr<GeomDataAPI_Point2D> aAttrPnt = 
+    //std::shared_ptr<GeomDataAPI_Point2D> aAttrPnt =
     //  PartSet_Tools::findAttributePoint(mySketch, aX, anY, aTolerance, aIgnore);
     //if (aAttrPnt.get() != NULL) {
     //  aFeaturePoint->setValue(aAttrPnt->pnt());
@@ -611,7 +611,7 @@ void PartSet_WidgetPoint2D::mouseMoved(ModuleBase_IViewWindow* theWindow, QMouse
   PartSet_Tools::convertTo2D(aPoint, mySketch, theWindow->v3dView(), aX, anY);
   if (myState != ModifiedInViewer)
     storeCurentValue();
-  // we need to block the value state change 
+  // we need to block the value state change
   bool isBlocked = blockValueState(true);
   setPoint(aX, anY);
   blockValueState(isBlocked);
@@ -639,7 +639,7 @@ bool PartSet_WidgetPoint2D::isFeatureContainsPoint(const FeaturePtr& theFeature,
 
   AttributePtr aWidgetAttribute = myFeature->attribute(attributeID());
 
-  std::shared_ptr<GeomAPI_Pnt2d> aPnt2d = 
+  std::shared_ptr<GeomAPI_Pnt2d> aPnt2d =
                                     std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(theX, theY));
   std::list<AttributePtr> anAttributes =
                                 myFeature->data()->attributes(GeomDataAPI_Point2D::typeId());
index 3c9fc33a45d0a1c44aa9bca0cbee6e64524eeb56..a12e35d0fb875673dc0922527229a77eec33914a 100755 (executable)
@@ -50,7 +50,7 @@ Q_OBJECT
   /// Destructor
   virtual ~PartSet_WidgetPoint2D();
 
-  /// Checks if the selection presentation is valid in widget 
+  /// Checks if the selection presentation is valid in widget
   /// \param theValue a selected presentation in the view
   /// \return a boolean value
   virtual bool isValidSelectionCustom(const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);
@@ -152,7 +152,7 @@ protected:
 
   /// Compute the feature default value and fill the controls with it
   /// or store the control value to the feature
-  /// The widget is not initialize the attribute value in order to avoid the 
+  /// The widget is not initialize the attribute value in order to avoid the
   /// incorrect visualization in Sketch. E.g. by a line creation, the line should not
   /// be visualized immediatelly when the end point widget is activated.
   virtual void initializeValueByActivate();
@@ -163,7 +163,7 @@ protected:
    /// \param theShape a vertex shape
    /// \param theX an output value of X coordinate
    /// \param theY an output value of Y coordinate
-   bool getPoint2d(const Handle(V3d_View)& theView, const TopoDS_Shape& theShape, 
+   bool getPoint2d(const Handle(V3d_View)& theView, const TopoDS_Shape& theShape,
                    double& theX, double& theY) const;
 
    /// Create a coincidence constraint between the attribute and the parameter object
index 79d1217bc3330ffc29226312b7f30ecedbd1a2a9..2427983aceefc37af3ba3930061a27a94b188aaa 100644 (file)
@@ -79,7 +79,7 @@ void PartSet_WidgetPoint2dDistance::setPoint(FeaturePtr theFeature,
   AttributeDoublePtr aReal = aData->real(attributeID());
   if (aReal && (aReal->value() != aValue)) {
     aReal->setValue(aValue);
-    
+
     ModuleBase_Tools::setSpinValue(mySpinBox, aValue);
     storeValue();
   }
@@ -115,7 +115,7 @@ void PartSet_WidgetPoint2dDistance::mouseReleased(ModuleBase_IViewWindow* theWnd
     emit focusOutWidget(this);
 }
 
-void PartSet_WidgetPoint2dDistance::mouseMoved(ModuleBase_IViewWindow* theWnd, 
+void PartSet_WidgetPoint2dDistance::mouseMoved(ModuleBase_IViewWindow* theWnd,
                                                QMouseEvent* theEvent)
 {
   if (isEditingMode())
index 63fe24778f7b285cd31143a814dec69e4537575f..c6597a0aa80e5f206b195eaaab3eaae1d3ded47f 100644 (file)
@@ -50,7 +50,7 @@ Q_OBJECT
 
   virtual ~PartSet_WidgetPoint2dDistance();
 
-  /// Checks if the selection presentation is valid in widget 
+  /// Checks if the selection presentation is valid in widget
   /// \param theValue a selected presentation in the view
   /// \return a boolean value
   virtual bool isValidSelectionCustom(const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);
@@ -86,7 +86,7 @@ protected:
   /// \return true if the widget current value is reset
   virtual bool resetCustom();
 
-  /// Set the second point which defines a value in the widget as 
+  /// Set the second point which defines a value in the widget as
   /// a distance with a first point defined by feature
   void setPoint(FeaturePtr theFeature, const std::shared_ptr<GeomAPI_Pnt2d>& thePnt);
 
@@ -100,7 +100,7 @@ protected:
 protected:
   /// A reference to workshop
   ModuleBase_IWorkshop* myWorkshop;
-  
+
   /// A name of the first point
   std::string myFirstPntName;
 
index 42d4fb9b70e4d734136d3e89b04167d6b9641311..472b122e829813972c40327f8bc6bb3ccef2099b 100755 (executable)
@@ -75,9 +75,9 @@ void PartSet_WidgetShapeSelector::getGeomSelection(const ModuleBase_ViewerPrsPtr
   ModuleBase_WidgetShapeSelector::getGeomSelection(thePrs, theObject, theShape);
 
   FeaturePtr aSelectedFeature = ModelAPI_Feature::feature(theObject);
-  std::shared_ptr<SketchPlugin_Feature> aSPFeature = 
+  std::shared_ptr<SketchPlugin_Feature> aSPFeature =
           std::dynamic_pointer_cast<SketchPlugin_Feature>(aSelectedFeature);
-  // there is no a sketch feature is selected, but the shape exists, 
+  // there is no a sketch feature is selected, but the shape exists,
   // try to create an exernal object
   // TODO: unite with the same functionality in PartSet_WidgetShapeSelector
   if (aSPFeature.get() == NULL) {
@@ -92,7 +92,7 @@ void PartSet_WidgetShapeSelector::getGeomSelection(const ModuleBase_ViewerPrsPtr
             aShape = aResult->shape();
         }
         if (aShape.get() != NULL && !aShape->isNull())
-          anExternalObject = 
+          anExternalObject =
             myExternalObjectMgr->externalObject(theObject, aShape, sketch(), myIsInValidate);
       }
       else { /// use objects of found selection
index 8a0ee84de47fc5e3e690065adf7933064ea87c00..767528ead7107fb5288d9a5c4c80c922987b24bc 100644 (file)
@@ -70,7 +70,7 @@ protected:
   /// A reference to external objects manager
   PartSet_ExternalObjectsMgr* myExternalObjectMgr;
 
-  /// Pointer to a sketch 
+  /// Pointer to a sketch
   CompositeFeaturePtr mySketch;
 
   bool myUseSketchPlane; ///< state whether the sketch plane filter should be switched on
index 9e03258187a161f975b9913a4e88f6368200823b..8fb4042553d6ce5f279c065970495e817f52d213 100644 (file)
@@ -54,7 +54,7 @@
 
 #define DEBUG_UNDO_INVALID_SKETCH
 
-PartSet_WidgetSketchCreator::PartSet_WidgetSketchCreator(QWidget* theParent, 
+PartSet_WidgetSketchCreator::PartSet_WidgetSketchCreator(QWidget* theParent,
                                                          PartSet_Module* theModule,
                                                          const Config_WidgetAPI* theData)
 : ModuleBase_WidgetSelector(theParent, theModule->workshop(), theData),
@@ -265,7 +265,7 @@ bool PartSet_WidgetSketchCreator::setSelection(QList<ModuleBase_ViewerPrsPtr>& t
   bool aDone = false;
   if (!startSketchOperation(theValues)) {
     myIsCustomAttribute = true;
-    QList<ModuleBase_ViewerPrsPtr>::const_iterator 
+    QList<ModuleBase_ViewerPrsPtr>::const_iterator
       anIt = theValues.begin(), aLast = theValues.end();
     bool aProcessed = false;
     for (; anIt != aLast; anIt++) {
@@ -279,7 +279,7 @@ bool PartSet_WidgetSketchCreator::setSelection(QList<ModuleBase_ViewerPrsPtr>& t
       emit valuesChanged();
       updateObject(myFeature);
       setVisibleSelectionControl(false);
-      // manually deactivation because the widget was 
+      // manually deactivation because the widget was
       // not activated as has no focus acceptin controls
       deactivate();
       emit focusOutWidget(this);
@@ -316,7 +316,7 @@ bool PartSet_WidgetSketchCreator::startSketchOperation(
   /// sketch should not started by object(face) selected as global. If Local face is selected,
   /// sketch is started
   if (aResult.get() && aValue->shape().get() && aResult->shape()->isEqual(aValue->shape())) {
-    ResultConstructionPtr aConstruction = 
+    ResultConstructionPtr aConstruction =
       std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aResult);
     if (!aConstruction.get() || !aConstruction->isInfinite())
       return aSketchStarted;
@@ -329,7 +329,7 @@ bool PartSet_WidgetSketchCreator::startSketchOperation(
   myPreviewPlanes->erasePreviewPlanes(myWorkshop);
 
   // Launch Sketch operation
-  CompositeFeaturePtr aCompFeature = 
+  CompositeFeaturePtr aCompFeature =
     std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(myFeature);
 
   // start edit operation for the sketch
@@ -354,7 +354,7 @@ bool PartSet_WidgetSketchCreator::focusTo()
     return true;
   }
   else
-    connect(myModule, SIGNAL(resumed(ModuleBase_Operation*)), 
+    connect(myModule, SIGNAL(resumed(ModuleBase_Operation*)),
             SLOT(onResumed(ModuleBase_Operation*)));
 
   return true;
@@ -386,7 +386,7 @@ void PartSet_WidgetSketchCreator::onResumed(ModuleBase_Operation* theOp)
 
   // Validate the created sketch. If it is valid, it is set into the composite feature selection
   // list, otherwise it is removed
-  CompositeFeaturePtr aCompFeature = 
+  CompositeFeaturePtr aCompFeature =
     std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(myFeature);
   AttributeSelectionListPtr anAttrList = myFeature->data()->selectionList(myAttributeListID);
   if (aCompFeature->numberOfSubs() > 0) {
@@ -405,7 +405,7 @@ void PartSet_WidgetSketchCreator::onResumed(ModuleBase_Operation* theOp)
       aMgr->startOperation("Delete invalid Sketch feature", false);
 
       // delete invalid sketch
-      CompositeFeaturePtr aSketchFeature = 
+      CompositeFeaturePtr aSketchFeature =
               std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aCompFeature->subFeature(0));
       QObjectPtrList anObjects;
       anObjects.append(aSketchFeature);
@@ -445,7 +445,7 @@ void PartSet_WidgetSketchCreator::onResumed(ModuleBase_Operation* theOp)
     }
 
     // Hide sketcher result
-    CompositeFeaturePtr aSketchFeature = 
+    CompositeFeaturePtr aSketchFeature =
       std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aCompFeature->subFeature(0));
     std::list<ResultPtr> aResults = aSketchFeature->results();
     std::list<ResultPtr>::const_iterator aIt;
@@ -520,7 +520,7 @@ void PartSet_WidgetSketchCreator::setSketchObjectToList(
   }
 
   ResultPtr aSketchRes = aSketchFeature->results().front();
-  ResultConstructionPtr aConstruction = 
+  ResultConstructionPtr aConstruction =
     std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aSketchRes);
   if(!aConstruction.get()) {
     return;
index 5e8ed26e62c8b33e9f251d36d8f5b750d29a5e8e..a4c6ef494d35dabaa4b1741104a0e83d6c27bdde 100644 (file)
@@ -42,7 +42,7 @@ public:
   /// \return a control list
   virtual QList<QWidget*> getControls() const;
 
-  /// Set focus to the first control of the current widget. 
+  /// Set focus to the first control of the current widget.
   /// The focus policy of the control is checked.
   /// If the widget has the NonFocus focus policy, it is skipped.
   /// \return the state whether the widget can accept the focus
index 33872cf953c52049b9df41ba9d6b3b71c3aa2346..702fb6a11a2de3e9bfe7f8b3728cde54a702b737 100644 (file)
@@ -97,7 +97,7 @@ PartSet_WidgetSketchLabel::PartSet_WidgetSketchLabel(QWidget* theParent,
   myViewInverted = new QCheckBox(tr("Reversed"), aViewBox);
   aViewLayout->addWidget(myViewInverted);
 
-  QPushButton* aSetViewBtn = 
+  QPushButton* aSetViewBtn =
     new QPushButton(QIcon(":icons/plane_view.png"), tr("Set plane view"), aViewBox);
   connect(aSetViewBtn, SIGNAL(clicked(bool)), this, SLOT(onSetPlaneView()));
   aViewLayout->addWidget(aSetViewBtn);
@@ -285,7 +285,7 @@ void PartSet_WidgetSketchLabel::updateByPlaneSelected(const ModuleBase_ViewerPrs
   //myLabel->setText("");
   //myLabel->setToolTip("");
   XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(myWorkshop);
-  disconnect(aWorkshop->selector(), SIGNAL(selectionChanged()), 
+  disconnect(aWorkshop->selector(), SIGNAL(selectionChanged()),
               this, SLOT(onSelectionChanged()));
   // 4. deactivate face selection filter
   activateFilters(false);
@@ -388,7 +388,7 @@ bool PartSet_WidgetSketchLabel::fillSketchPlaneBySelection(const FeaturePtr& the
 
   if (thePrs->object() && (theFeature != thePrs->object())) {
     DataPtr aData = theFeature->data();
-    AttributeSelectionPtr aSelAttr = 
+    AttributeSelectionPtr aSelAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeSelection>
       (aData->attribute(SketchPlugin_SketchEntity::EXTERNAL_ID()));
     if (aSelAttr) {
index d2beed18e6b47e2eb6629dd2be8ee14df9d501da..3db87368e7acfb43d222b64c40b19f1e1cf94924 100755 (executable)
@@ -167,10 +167,10 @@ bool PartSet_WidgetSubShapeSelector::setSelection(
       FeaturePtr aBaseFeature = ModelAPI_Feature::feature(aBaseObject);
       std::list<AttributePtr> a2DPointAttributes = aBaseFeature->data()->attributes(
                                                         GeomDataAPI_Point2D::typeId());
-      std::list<AttributePtr>::const_iterator anIt = a2DPointAttributes.begin(), 
+      std::list<AttributePtr>::const_iterator anIt = a2DPointAttributes.begin(),
                                               aLast = a2DPointAttributes.end();
       for (; anIt != aLast; anIt++) {
-        std::shared_ptr<GeomDataAPI_Point2D> anAttributePoint = 
+        std::shared_ptr<GeomDataAPI_Point2D> anAttributePoint =
                                       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(*anIt);
         std::shared_ptr<GeomAPI_Pnt2d> aPoint2D = anAttributePoint->pnt();
         std::shared_ptr<GeomAPI_Pnt> aPoint3D = PartSet_Tools::convertTo3D(aPoint2D->x(),
@@ -183,7 +183,7 @@ bool PartSet_WidgetSubShapeSelector::setSelection(
 
       /// find the points in coincident features
       PntToAttributesMap aRefAttributes = myCashedReferences[aBaseObject];
-      PntToAttributesMap::const_iterator 
+      PntToAttributesMap::const_iterator
         aRIt = aRefAttributes.begin(), aRLast = aRefAttributes.end();
       for (; aRIt != aRLast; aRIt++) {
         std::shared_ptr<GeomDataAPI_Point2D> anAttribute = aRIt->first;
index b20cf882d50f55abe7a2e7951a2b9e38426810be..376ffb139fe863b2b7e6b989aa9ffce090063ce5 100644 (file)
@@ -119,7 +119,7 @@ protected:
                    std::shared_ptr<GeomAPI_Pnt> > PntToAttributesMap;
   std::map<ObjectPtr, PntToAttributesMap> myCashedReferences;
 
-  /// Pointer to a sketch 
+  /// Pointer to a sketch
   CompositeFeaturePtr mySketch;
 };
 
index 349651cf3d8241b039127239c808cbb6e9746ba1..6adbac25954ab4204bcd74ff0a3b33a50103f0fa 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : PartSetAPI_Part.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
index 4913e8195e51456bf9192faa71f7102126bb947d..ccdcfdb5a2fce2f6773dc577c6f7315f8d4fd0d1 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : PartSetAPI_Part.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
index 8553448bfa148a6a83efbd9d9668fed1a68317e2..dad1fe197af49e74192bef16ed10008e3a9dfddf 100644 (file)
@@ -17,7 +17,7 @@
 class PartSetPlugin_Duplicate : public ModelAPI_Feature
 {
  public:
+
   /// Duplicate kind
   inline static const std::string& ID()
   {
index 19ca7ae08e58261fd8813d8a89977193e8bdef27..bf54347099a38c2871a30476577c9ceae6537846 100644 (file)
@@ -33,7 +33,7 @@ void PartSetPlugin_Remove::execute()
       aRoot->refsToFeature(aFeature, aRefFeatures);
       if (aRefFeatures.empty()) {
         aRoot->removeFeature(aFeature);
-        // the redisplay signal should be flushed in order to erase the feature presentation 
+        // the redisplay signal should be flushed in order to erase the feature presentation
         // in the viewer after removeFeature from the document
         Events_Loop::loop()->flush(Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY));
       }
index a753ee92cc052a6739210658c420dec51b705d60..9dac5e2a86dc5b4acfec9f7c5fe86c7cda988330 100644 (file)
@@ -26,25 +26,25 @@ public:
   /// Constructor without values.
   PRIMITIVESAPI_EXPORT
   explicit PrimitivesAPI_Box(const std::shared_ptr<ModelAPI_Feature>& theFeature);
-  
+
   /// Constructor with values.
   PRIMITIVESAPI_EXPORT
   explicit PrimitivesAPI_Box(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                              const ModelHighAPI_Double& theDx,
                              const ModelHighAPI_Double& theDy,
                              const ModelHighAPI_Double& theDz);
-  
+
   /// Constructor with values.
   PRIMITIVESAPI_EXPORT
   explicit PrimitivesAPI_Box(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                              const ModelHighAPI_Selection& theFirstPoint,
                              const ModelHighAPI_Selection& theSecondPoint);
-  
+
   /// Destructor.
   PRIMITIVESAPI_EXPORT
   virtual ~PrimitivesAPI_Box();
-  
-  INTERFACE_6(PrimitivesPlugin_Box::ID(), 
+
+  INTERFACE_6(PrimitivesPlugin_Box::ID(),
              creationMethod, PrimitivesPlugin_Box::CREATION_METHOD(),
              ModelAPI_AttributeString, /** Creation method */,
              dx, PrimitivesPlugin_Box::DX_ID(),
@@ -53,17 +53,17 @@ public:
              ModelAPI_AttributeDouble, /** Dimension in Y */,
              dz, PrimitivesPlugin_Box::DZ_ID(),
              ModelAPI_AttributeDouble, /** Dimension in Z */,
-             firstPoint, PrimitivesPlugin_Box::POINT_FIRST_ID(), 
+             firstPoint, PrimitivesPlugin_Box::POINT_FIRST_ID(),
              ModelAPI_AttributeSelection, /** First point */,
-             secondPoint, PrimitivesPlugin_Box::POINT_SECOND_ID(), 
+             secondPoint, PrimitivesPlugin_Box::POINT_SECOND_ID(),
              ModelAPI_AttributeSelection, /** Second point */)
-  
+
   /// Set dimensions
   PRIMITIVESAPI_EXPORT
   void setDimensions(const ModelHighAPI_Double& theDx,
                      const ModelHighAPI_Double& theDy,
                      const ModelHighAPI_Double& theDz);
-  
+
   /// Set points
   PRIMITIVESAPI_EXPORT
   void setPoints(const ModelHighAPI_Selection& theFirstPoint,
index c3bbe6d35e50dfec61b65003991541bfd62cd278..87ba2a6d5b97d1e382692d58cc7c43578e6c2f22 100644 (file)
@@ -8,7 +8,7 @@
 #define PrimitivesAPI_swig_H_
 
   #include <ModelHighAPI_swig.h>
-  
+
   #include "PrimitivesAPI_Box.h"
 
 
index 35541e240fab56bef2599e907f7d29d1f48824f8..709c3c8d4dac20bb4877665a765cfcdd0a228d36 100644 (file)
@@ -30,7 +30,7 @@ void PrimitivesPlugin_Box::initAttributes()
   data()->addAttribute(PrimitivesPlugin_Box::DY_ID(), ModelAPI_AttributeDouble::typeId());
   data()->addAttribute(PrimitivesPlugin_Box::DZ_ID(), ModelAPI_AttributeDouble::typeId());
 
-  data()->addAttribute(PrimitivesPlugin_Box::POINT_FIRST_ID(), 
+  data()->addAttribute(PrimitivesPlugin_Box::POINT_FIRST_ID(),
                        ModelAPI_AttributeSelection::typeId());
   data()->addAttribute(PrimitivesPlugin_Box::POINT_SECOND_ID(),
                        ModelAPI_AttributeSelection::typeId());
@@ -41,11 +41,11 @@ void PrimitivesPlugin_Box::execute()
 {
   AttributeStringPtr aMethodTypeAttr = string(PrimitivesPlugin_Box::CREATION_METHOD());
   std::string aMethodType = aMethodTypeAttr->value();
-  
-  if (aMethodType == CREATION_METHOD_BY_DIMENSIONS()) 
+
+  if (aMethodType == CREATION_METHOD_BY_DIMENSIONS())
     createBoxByDimensions();
-  
-  if (aMethodType == CREATION_METHOD_BY_TWO_POINTS()) 
+
+  if (aMethodType == CREATION_METHOD_BY_TWO_POINTS())
     createBoxByTwoPoints();
 }
 
@@ -57,16 +57,16 @@ void PrimitivesPlugin_Box::createBoxByDimensions()
   double aDz = real(PrimitivesPlugin_Box::DZ_ID())->value();
 
   std::shared_ptr<GeomAlgoAPI_Box> aBoxAlgo(new GeomAlgoAPI_Box(aDx,aDy,aDz));
-  
-  // These checks should be made to the GUI for the feature but 
+
+  // These checks should be made to the GUI for the feature but
   // the corresponding validator does not exist yet.
   if (!aBoxAlgo->check()) {
     // The error is not displayed in a popup window. It must be in the status bar.
     setError(aBoxAlgo->getError(), false);
     return;
   }
-  
-  // Build the box 
+
+  // Build the box
   aBoxAlgo->build();
 
   // Check if the creation of the box
@@ -78,21 +78,21 @@ void PrimitivesPlugin_Box::createBoxByDimensions()
     setError(aBoxAlgo->getError());
     return;
   }
-  
+
   int aResultIndex = 0;
-  ResultBodyPtr aResultBox = document()->createBody(data(), aResultIndex); 
+  ResultBodyPtr aResultBox = document()->createBody(data(), aResultIndex);
   loadNamingDS(aBoxAlgo, aResultBox);
   setResult(aResultBox, aResultIndex);
 }
 
 //=================================================================================================
-void PrimitivesPlugin_Box::createBoxByTwoPoints() 
+void PrimitivesPlugin_Box::createBoxByTwoPoints()
 {
   AttributeSelectionPtr aRef1 = data()->selection(PrimitivesPlugin_Box::POINT_FIRST_ID());
   AttributeSelectionPtr aRef2 = data()->selection(PrimitivesPlugin_Box::POINT_SECOND_ID());
-  
+
   std::shared_ptr<GeomAlgoAPI_BoxPoints> aBoxAlgo;
-  
+
   if ((aRef1.get() != NULL) && (aRef2.get() != NULL)) {
     GeomShapePtr aShape1 = aRef1->value();
     if (!aShape1.get()) //If we can't get the points directly, try getting them from the context
@@ -107,16 +107,16 @@ void PrimitivesPlugin_Box::createBoxByTwoPoints()
                                   new GeomAlgoAPI_BoxPoints(aFirstPoint,aSecondPoint));
     }
   }
-  
-  // These checks should be made to the GUI for the feature but 
+
+  // These checks should be made to the GUI for the feature but
   // the corresponding validator does not exist yet.
   if (!aBoxAlgo->check()) {
     // The error is not displayed in a popup window. It must be in the message console.
     setError(aBoxAlgo->getError(), false);
     return;
   }
-  
-  // Build the box 
+
+  // Build the box
   aBoxAlgo->build();
 
   // Check if the creation of the box
@@ -130,9 +130,9 @@ void PrimitivesPlugin_Box::createBoxByTwoPoints()
     setError(aBoxAlgo->getError(), false);
     return;
   }
-  
+
   int aResultIndex = 0;
-  ResultBodyPtr aResultBox = document()->createBody(data(), aResultIndex); 
+  ResultBodyPtr aResultBox = document()->createBody(data(), aResultIndex);
   loadNamingDS(aBoxAlgo, aResultBox);
   setResult(aResultBox, aResultIndex);
 }
@@ -143,15 +143,15 @@ void PrimitivesPlugin_Box::loadNamingDS(std::shared_ptr<GeomAlgoAPI_Box> theBoxA
 {
   // Load the result
   theResultBox->store(theBoxAlgo->shape());
-  
+
   // Prepare the naming
   theBoxAlgo->prepareNamingFaces();
-  
+
   // Insert to faces
   int num = 1;
-  std::map< std::string, std::shared_ptr<GeomAPI_Shape> > listOfFaces = 
+  std::map< std::string, std::shared_ptr<GeomAPI_Shape> > listOfFaces =
     theBoxAlgo->getCreatedFaces();
-  for (std::map< std::string, std::shared_ptr<GeomAPI_Shape> >::iterator 
+  for (std::map< std::string, std::shared_ptr<GeomAPI_Shape> >::iterator
        it=listOfFaces.begin(); it!=listOfFaces.end(); ++it) {
     std::shared_ptr<GeomAPI_Shape> aFace = (*it).second;
     theResultBox->generated(aFace, (*it).first, num++);
index 8db0d54174d155331bde900fd55b8bce4e1df61e..c13403c9257d4bd0beff4ed80ba5974874cf2d1d 100644 (file)
@@ -39,14 +39,14 @@ class PrimitivesPlugin_Box : public ModelAPI_Feature
     static const std::string MY_CREATION_METHOD_ID("CreationMethod");
     return MY_CREATION_METHOD_ID;
   }
-  
+
   /// Attribute name for creation method
   inline static const std::string& CREATION_METHOD_BY_DIMENSIONS()
   {
     static const std::string MY_CREATION_METHOD_ID("BoxByDimensions");
     return MY_CREATION_METHOD_ID;
   }
-  
+
   /// Attribute name for creation method
   inline static const std::string& CREATION_METHOD_BY_TWO_POINTS()
   {
@@ -101,7 +101,7 @@ class PrimitivesPlugin_Box : public ModelAPI_Feature
 
   /// Request for initialization of data model of the feature: adding all attributes
   PRIMITIVESPLUGIN_EXPORT virtual void initAttributes();
-  
+
   /// Use plugin manager for features creation
   PrimitivesPlugin_Box();
 
@@ -112,7 +112,7 @@ class PrimitivesPlugin_Box : public ModelAPI_Feature
 
   ///Perform the creation of the box using two points defining a diagonal
   void createBoxByTwoPoints();
-  
+
   ///Perform the creation of the box using three cordinates
   void createBoxByDimensions();
 
index fd929836dbba36b008763e68da7ddcb12fb3e7d0..c670b01840f1e52f5612b8a0fb710d04ac2c7d13 100644 (file)
@@ -71,7 +71,7 @@ public:
   SHAPERGUI_PrefMgr(LightApp_Preferences* theMgr, const QString& theModName):
     myMgr(theMgr), myModName(theModName) {}
 
-  virtual int addPreference(const QString& theLbl, int pId, 
+  virtual int addPreference(const QString& theLbl, int pId,
                             SUIT_PreferenceMgr::PrefItemType theType,
                             const QString& theSection, const QString& theName )
   {
@@ -146,7 +146,7 @@ void SHAPERGUI::viewManagers(QStringList& theList) const
 void SHAPERGUI::connectToStudy(CAM_Study* theStudy)
 {
   // if there are created viewer managers, we should try to create viewer
-  // selector and initialize viewer with it. It sets interactive contect to the 
+  // selector and initialize viewer with it. It sets interactive contect to the
   // proxy viewer. If study is opened, CAM application calls this method before the open()
   // of data model
   // the SHAPER data model is specific and during open(load) redisplay signals are flushed, so
@@ -190,7 +190,7 @@ bool SHAPERGUI::activateModule(SUIT_Study* theStudy)
         mySelector = createSelector(OCCViewManagers.first());
       }
     }
-    // it should be pefromed after the selector creation in order to have AISContext 
+    // it should be pefromed after the selector creation in order to have AISContext
     myWorkshop->activateModule();
     //action(myEraseAll)->setEnabled(false);
 
@@ -384,7 +384,7 @@ QAction* SHAPERGUI::addFeature(const QString& theWBName, const ActionInfo& theIn
                     theInfo.id,
                     theInfo.text,
                     //Issue #650: in the SALOME mode the tooltip should be same as text
-                    theInfo.text, 
+                    theInfo.text,
                     theInfo.icon,
                     theInfo.shortcut,
                     theInfo.checkable,
@@ -592,16 +592,16 @@ void SHAPERGUI::createPreferences()
   // Create other parameters group in viewer tab
   int otherGroup = pref->addItem(tr("Default selection"), viewTab);
   pref->setItemProperty("columns", 3, otherGroup);
-  pref->addItem(tr("Faces"), otherGroup, 
+  pref->addItem(tr("Faces"), otherGroup,
                          SUIT_PreferenceMgr::Bool,
                          ModuleBase_Preferences::VIEWER_SECTION, "face-selection");
-  pref->addItem(tr("Edges"), otherGroup, 
+  pref->addItem(tr("Edges"), otherGroup,
                          SUIT_PreferenceMgr::Bool,
                          ModuleBase_Preferences::VIEWER_SECTION, "edge-selection");
-  pref->addItem(tr("Vertices"), otherGroup, 
+  pref->addItem(tr("Vertices"), otherGroup,
                          SUIT_PreferenceMgr::Bool,
                          ModuleBase_Preferences::VIEWER_SECTION, "vertex-selection");
-  
+
   int sensitivityGroup = pref->addItem(tr("Selection sensitivity"), viewTab);
   pref->setItemProperty("columns", 2, sensitivityGroup);
   pref->addItem(tr("Vertex"), sensitivityGroup, SUIT_PreferenceMgr::Double,
index 54097d4702597d8baba709dddc3c816a2ba1a73b..c9c9f91fafc82a4731853b10fc20f676412eab5d 100644 (file)
@@ -41,7 +41,7 @@ Q_OBJECT
   /// \brief Definition of module standard windows
   virtual void windows(QMap<int, int>& theWndMap) const;
 
-  /// \brief Definition of module viewer 
+  /// \brief Definition of module viewer
   virtual void viewManagers(QStringList& theList) const;
 
   /// \brief The method is called on selection changed event
@@ -112,16 +112,16 @@ Q_OBJECT
   //! Returns list of defined actions (just by SHAPER module)
   virtual QList<QAction*> commandList() const;
 
-  /// Redefinition of virtual function. 
+  /// Redefinition of virtual function.
   /// \param theClient name of pop-up client
   /// \param theMenu popup menu instance
   /// \param theTitle menu title.
   virtual void contextMenuPopup(const QString& theClient, QMenu* theMenu, QString& theTitle);
 
-  /// Redefinition of virtual function for preferences creation. 
+  /// Redefinition of virtual function for preferences creation.
   virtual void createPreferences();
 
-  /// Redefinition of virtual function for preferences changed event. 
+  /// Redefinition of virtual function for preferences changed event.
   virtual void preferencesChanged(const QString& theSection, const QString& theParam);
 
   //! Shows the given text in status bar as a permanent text
@@ -207,10 +207,10 @@ Q_OBJECT
   // the next parameters should be restored after this module deactivation
 
   /// The application value of the preferences parameter
-  bool myIsStorePositions; 
+  bool myIsStorePositions;
 
   /// The application value
-  bool myIsEditEnabled;    
+  bool myIsEditEnabled;
 
   /// Popup manager
   QtxPopupMgr* myPopupMgr;
index ac9a06edc83aca8e048e79dc0aed2db0ee98d145..3d8defd9248211582e07044099914c93ebdb7ce7 100644 (file)
@@ -159,7 +159,7 @@ void SHAPERGUI_DataModel::removeDirectory(const QString& theDirectoryName)
   Qtx::rmDir(theDirectoryName);
 }
 
-bool SHAPERGUI_DataModel::dumpPython(const QString& thePath, CAM_Study* theStudy, 
+bool SHAPERGUI_DataModel::dumpPython(const QString& thePath, CAM_Study* theStudy,
                                      bool isMultiFile,  QStringList& theListOfFiles)
 {
   LightApp_Study* aStudy = dynamic_cast<LightApp_Study*>(theStudy);
@@ -178,16 +178,16 @@ bool SHAPERGUI_DataModel::dumpPython(const QString& thePath, CAM_Study* theStudy
     }
 
     AttributeStringPtr aAttr = aFeature->string(ExchangePlugin_Dump::FILE_PATH_ID());
-    if (aAttr.get()) 
+    if (aAttr.get())
       aAttr->setValue(aFileName);
 
     aAttr = aFeature->string(ExchangePlugin_Dump::FILE_FORMAT_ID());
-    if (aAttr.get()) 
+    if (aAttr.get())
       aAttr->setValue(".py");
     ModelAPI_Session::get()->finishOperation();
 
     if (QFile::exists(aFileName.c_str())) {
-      if (isMultiFile) { 
+      if (isMultiFile) {
         QFile aInFile(aFileName.c_str());
         if (!aInFile.open(QIODevice::ReadOnly | QIODevice::Text))
           return false;
index 5672caae7e77b8b157d9ea39df0d236c43a0de02..5eb87cc86a065ce6292ff7ed8c69296a950dadb9 100644 (file)
@@ -76,7 +76,7 @@ protected:
   QString myStudyPath;
 
   /// a path to the temporary directory, created by opening a document file
-  QString myTmpDirectory; 
+  QString myTmpDirectory;
 
   /// it should be created because the files reading is postponed in the module. The directory
   // should be removed after the model document is closed.
index bf93cc66662592bc808ef640d7c9f8d400837119..1f269d5956a4ea08e68ff2cfc178d92e6ffc9912 100644 (file)
@@ -105,5 +105,5 @@ void SHAPERGUI_NestedButton::actionStateChanged()
   } else {
     QString s = "false";
   }
-  
+
 }
index 3665ac95d0defe767c17cfcb6d081654b5cb4634..158064c646104c7d072cb51b3f9580958458864c 100644 (file)
@@ -42,7 +42,7 @@ class SHAPERGUI_NestedButton : public QWidgetAction
   /// Creates the button representation
   /// \param theParent a parent widget
   virtual QWidget * createWidget(QWidget * theParent);
-  
+
   virtual bool event(QEvent* theEvent);
 
  private:
index b00b69648a4d2c965abbbcded9c0c4eaacd2abba..f2bd66cae87a648d5b7a691d2c2fa192584dc252 100644 (file)
@@ -133,13 +133,13 @@ void SHAPERGUI_SalomeViewer::setSelector(SHAPERGUI_OCCSelector* theSel)
   // TODO: Provide ModuleBase_IViewWindow interface
   connect(aMgr, SIGNAL(lastViewClosed(SUIT_ViewManager*)), this, SIGNAL(lastViewClosed()));
 
-  connect(aMgr, SIGNAL(tryCloseView(SUIT_ViewWindow*)), 
+  connect(aMgr, SIGNAL(tryCloseView(SUIT_ViewWindow*)),
           this, SLOT(onTryCloseView(SUIT_ViewWindow*)));
-  connect(aMgr, SIGNAL(deleteView(SUIT_ViewWindow*)), 
+  connect(aMgr, SIGNAL(deleteView(SUIT_ViewWindow*)),
           this, SLOT(onDeleteView(SUIT_ViewWindow*)));
-  connect(aMgr, SIGNAL(viewCreated(SUIT_ViewWindow*)), 
+  connect(aMgr, SIGNAL(viewCreated(SUIT_ViewWindow*)),
           this, SLOT(onViewCreated(SUIT_ViewWindow*)));
-  connect(aMgr, SIGNAL(activated(SUIT_ViewManager*)), 
+  connect(aMgr, SIGNAL(activated(SUIT_ViewManager*)),
           this, SLOT(onActivated(SUIT_ViewManager*)));
 
   connect(aMgr, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), this,
@@ -254,7 +254,7 @@ void SHAPERGUI_SalomeViewer::onViewCreated(SUIT_ViewWindow* theView)
   }
   reconnectActions(aWnd, true);
 
-  myWindowScale.insert(aView->getViewPort()->getView(), 
+  myWindowScale.insert(aView->getViewPort()->getView(),
                        aView->getViewPort()->getView()->Camera()->Scale());
 
   emit viewCreated(myView);
@@ -352,10 +352,10 @@ void SHAPERGUI_SalomeViewer::fitAll()
 }
 
 //**********************************************
-void SHAPERGUI_SalomeViewer::setViewProjection(double theX, double theY, 
+void SHAPERGUI_SalomeViewer::setViewProjection(double theX, double theY,
                                                double theZ, double theTwist)
 {
-  if (!mySelector) 
+  if (!mySelector)
     return;
 
   SUIT_ViewManager* aMgr = mySelector->viewer()->getViewManager();
@@ -455,7 +455,7 @@ void SHAPERGUI_SalomeViewer::activateViewer(bool toActivate)
     foreach (SUIT_ViewWindow* aView, aViews) {
       OCCViewer_ViewFrame* aOCCView = dynamic_cast<OCCViewer_ViewFrame*>(aView);
       OCCViewer_ViewWindow* aWnd = aOCCView->getView(OCCViewer_ViewFrame::MAIN_VIEW);
-      disconnect((OCCViewer_ViewWindow*)aWnd, 
+      disconnect((OCCViewer_ViewWindow*)aWnd,
                  SIGNAL(vpTransformationFinished(OCCViewer_ViewWindow::OperationType)),
         this, SLOT(onViewTransformed(OCCViewer_ViewWindow::OperationType)));
       reconnectActions(aWnd, false);
index 4aa14049eae28b257b2c6a5a26e1b120ad1c175b..1deee5167e017dd1132c81c5a6fd583d387d01d9 100644 (file)
@@ -141,7 +141,7 @@ Q_OBJECT
   /// Update current viewer
   virtual void update();
 
-  /// Method returns True if the viewer can process editing objects 
+  /// Method returns True if the viewer can process editing objects
   /// by mouse drugging. If this is impossible thet it has to return False.
   virtual bool canDragByMouse() const;
 
@@ -168,7 +168,7 @@ Q_OBJECT
   void onSelectionChanged();
   void onViewTransformed(OCCViewer_ViewWindow::OperationType);
 
-  /// Emit signal about trihedron visiblity change because SALOME sets 
+  /// Emit signal about trihedron visiblity change because SALOME sets
   /// the trihedron visible by this signal.
   /// It is necessary to activate the viewer trihedron in the current selection mode
   void onViewPortMapped();
index 8428bf78431237a6bf20aea7d8979a1f22dbf6be..63c1aa4f6bcfc4ea1dc9bec50b9fc378742f3794 100644 (file)
@@ -29,7 +29,7 @@ SketchAPI_Arc::SketchAPI_Arc(const std::shared_ptr<ModelAPI_Feature>& theFeature
 : SketchAPI_SketchEntity(theFeature)
 {
   if(initialize()) {
-    setByCenterStartEnd(theCenterX, theCenterY, theStartX, 
+    setByCenterStartEnd(theCenterX, theCenterY, theStartX,
                         theStartY, theEndX, theEndY, theInversed);
   }
 }
index d8ca207c4c513beaadd3f9649d793691278fa9b6..2bf24e02807e2ea9828c9ade47bc7629d3c2025b 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Constraint.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 08/08/16 - Artem ZHIDKOV - Creation of the file
@@ -140,7 +140,7 @@ void SketchAPI_Constraint::dump(ModelHighAPI_Dumper& theDumper) const
     FeaturePtr aFeature = ModelAPI_Feature::feature(aRefAttr->object());
     if (!aFeature)
       return;
-    AttributeSelectionPtr aAttr = 
+    AttributeSelectionPtr aAttr =
       aFeature->data()->selection(SketchPlugin_SketchEntity::EXTERNAL_ID());
     if (aAttr && aAttr->context().get() != NULL && !aAttr->isInvalid())
       return;
index 4885631164d38469126e7c23847595819d56128d..df8ec2d9e51f130cac8c76a4c5dc67ae76782190 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Constraint.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 08/08/16 - Artem ZHIDKOV - Creation of the file
index 7723dc240f20b07c215bf71be2a951547db2792e..6c1eb0640f40bd26613d25ec42cb97339cbed61f 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_IntersectionPoint.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
@@ -69,7 +69,7 @@ void SketchAPI_IntersectionPoint::dump(ModelHighAPI_Dumper& theDumper) const
   const std::string& aSketchName = theDumper.parentName(aBase);
 
   AttributeSelectionPtr aLine = externalLine();
-  theDumper << aBase << " = " << 
+  theDumper << aBase << " = " <<
     aSketchName << ".addIntersectionPoint(" << aLine << ")" << std::endl;
   // dump "auxiliary" flag if necessary
   SketchAPI_SketchEntity::dump(theDumper);
index 4d0b52c86137cbed88ae313ffa0055cc45afef67..bdd0be17c6641a1b64f12b1b87d50346e557f4d0 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_IntersectionPoint.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
@@ -40,9 +40,9 @@ public:
   virtual ~SketchAPI_IntersectionPoint();
 
   INTERFACE_2(SketchPlugin_IntersectionPoint::ID(),
-              coordinates, SketchPlugin_IntersectionPoint::COORD_ID(), 
+              coordinates, SketchPlugin_IntersectionPoint::COORD_ID(),
               GeomDataAPI_Point2D, /** IntersectionPoint coordinates */,
-              externalLine, SketchPlugin_IntersectionPoint::EXTERNAL_LINE_ID(), 
+              externalLine, SketchPlugin_IntersectionPoint::EXTERNAL_LINE_ID(),
               ModelAPI_AttributeSelection, /** External line */
   )
 
index b1ea975ee2b836109e14e44ab6785c61d80327eb..3bcf73ced5576c170f20bd39d7f3278b2dc161bb 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Line.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 07/06/16 - Sergey POKHODENKO - Creation of the file
index beec3cb8797ff0756ecbc8122e6125cd97b7b05c..ec5747bd0a7a0c8adb6e4abd0d234abf60ce2248 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Line.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 07/06/16 - Sergey POKHODENKO - Creation of the file
@@ -51,7 +51,7 @@ public:
   virtual ~SketchAPI_Line();
 
   INTERFACE_3(SketchPlugin_Line::ID(),
-              startPoint, SketchPlugin_Line::START_ID(), 
+              startPoint, SketchPlugin_Line::START_ID(),
               GeomDataAPI_Point2D, /** Start point */,
               endPoint, SketchPlugin_Line::END_ID(),
               GeomDataAPI_Point2D, /** End point */,
index 38c814fd80124da626997c16f43baa2bdcc78521..375bb457835d1908c4a52c8b8f4475e9f0b73f61 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Mirror.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
index 4c00c36844b50ab55ea81790ebd97763408220f2..518dd8b197acd4e38b962d0d51b0593a680d726f 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Mirror.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
@@ -41,13 +41,13 @@ public:
   virtual ~SketchAPI_Mirror();
 
   INTERFACE_4(SketchPlugin_ConstraintMirror::ID(),
-              mirrorLine, SketchPlugin_ConstraintMirror::ENTITY_A(), 
+              mirrorLine, SketchPlugin_ConstraintMirror::ENTITY_A(),
               ModelAPI_AttributeRefAttr, /** Mirror line */,
-              mirrorList, SketchPlugin_ConstraintMirror::MIRROR_LIST_ID(), 
+              mirrorList, SketchPlugin_ConstraintMirror::MIRROR_LIST_ID(),
               ModelAPI_AttributeRefList, /** Mirror list */,
-              referenceObjects, SketchPlugin_ConstraintMirror::ENTITY_B(), 
+              referenceObjects, SketchPlugin_ConstraintMirror::ENTITY_B(),
               ModelAPI_AttributeRefList, /** Reference objects */,
-              mirroredObjects, SketchPlugin_ConstraintMirror::ENTITY_C(), 
+              mirroredObjects, SketchPlugin_ConstraintMirror::ENTITY_C(),
               ModelAPI_AttributeRefList, /** Mirrored objects */
   )
 
index 2c8820a5367d07110f460ff8a20a9e2a6f472f9d..9958088bb7b3f48cdf24ccedd72c3ae42d6240ce 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Point.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 15/06/16 - Sergey POKHODENKO - Creation of the file
index 42d9da9305d63938e118b70722601d3fc69acbdc..d68064c9f9aa25a36093b79d03b78fbe4688755e 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Point.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 15/06/16 - Sergey POKHODENKO - Creation of the file
index 0c5c7f0bea448c2a1087473819aa991ee9a298ee..1291a8099710b26801dada088347409c04281963 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Projection.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
index 3906f60b72b30482421629524adae28198e2913f..b8c3ff3977ef1849134f4387bc76d3c8ee6898d1 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Projection.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
@@ -40,11 +40,11 @@ public:
   virtual ~SketchAPI_Projection();
 
   INTERFACE_3(SketchPlugin_Projection::ID(),
-              externalFeature, SketchPlugin_Projection::EXTERNAL_FEATURE_ID(), 
+              externalFeature, SketchPlugin_Projection::EXTERNAL_FEATURE_ID(),
               ModelAPI_AttributeSelection, /** External feature */,
-              projectedFeature, SketchPlugin_Projection::PROJECTED_FEATURE_ID(), 
+              projectedFeature, SketchPlugin_Projection::PROJECTED_FEATURE_ID(),
               ModelAPI_AttributeRefAttr, /** Projected feature */,
-              external, SketchPlugin_Projection::EXTERNAL_ID(), 
+              external, SketchPlugin_Projection::EXTERNAL_ID(),
               ModelAPI_AttributeSelection, /** External */
   )
 
index 88e5d5b22e5e2530612ab6b7bda8b9c6b29d0c39..ce60335d085650d38339662e9ba06e88c5f0ab18 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Rectangle.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 17/06/16 - Sergey POKHODENKO - Creation of the file
index 8aeda2a9821873bb64b3a90bdc53fb81dcfc0c3b..098d92ff3a26f0dd51b7ce1f817c1a1a3fe06dbf 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Rectangle.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 17/06/16 - Sergey POKHODENKO - Creation of the file
index ea2cea1ded7985a6223169cfe6271d13db338562..c53964912f02e75cd14f9cbc86cccfd19f89e580 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Rotation.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
index 2deebb5650c0c3d61f377d9a08c29cae5fcf5aa6..13817ca369bbbaf997b14741396e2f68cc16ccb8 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Rotation.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
@@ -54,11 +54,11 @@ public:
               ModelAPI_AttributeDouble, /** Angle */,
               numberOfObjects, SketchPlugin_MultiRotation::NUMBER_OF_OBJECTS_ID(),
               ModelAPI_AttributeInteger, /** Number of objects */,
-              valueType, SketchPlugin_MultiRotation::ANGLE_TYPE(), 
+              valueType, SketchPlugin_MultiRotation::ANGLE_TYPE(),
               ModelAPI_AttributeString, /** Value type */,
-              referenceObjects, SketchPlugin_MultiRotation::ENTITY_A(), 
+              referenceObjects, SketchPlugin_MultiRotation::ENTITY_A(),
               ModelAPI_AttributeRefList, /** Reference objects */,
-              rotatedObjects, SketchPlugin_MultiRotation::ENTITY_B(), 
+              rotatedObjects, SketchPlugin_MultiRotation::ENTITY_B(),
               ModelAPI_AttributeRefList, /** Rotated objects */
   )
 
index ce765e71bd9fb8961bb7032e23f026d76eb03283..60c8165ef0e7b6f605d903bb8055712c3cd7680a 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Sketch.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 07/06/16 - Sergey POKHODENKO - Creation of the file
@@ -190,27 +190,27 @@ SketchPtr addSketch(const std::shared_ptr<ModelAPI_Document> & thePart,
 std::shared_ptr<SketchAPI_Point> SketchAPI_Sketch::addPoint(
     double theX, double theY)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Point::ID());
   return PointPtr(new SketchAPI_Point(aFeature, theX, theY));
 }
 std::shared_ptr<SketchAPI_Point> SketchAPI_Sketch::addPoint(
     const std::shared_ptr<GeomAPI_Pnt2d> & thePoint)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Point::ID());
   return PointPtr(new SketchAPI_Point(aFeature, thePoint));
 }
-std::shared_ptr<SketchAPI_Point> 
+std::shared_ptr<SketchAPI_Point>
   SketchAPI_Sketch::addPoint(const ModelHighAPI_Selection & theExternal)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Point::ID());
   return PointPtr(new SketchAPI_Point(aFeature, theExternal));
 }
 std::shared_ptr<SketchAPI_Point> SketchAPI_Sketch::addPoint(const std::string & theExternalName)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Point::ID());
   return PointPtr(new SketchAPI_Point(aFeature, theExternalName));
 }
@@ -219,23 +219,23 @@ std::shared_ptr<SketchAPI_Point> SketchAPI_Sketch::addPoint(const std::string &
 std::shared_ptr<SketchAPI_IntersectionPoint> SketchAPI_Sketch::addIntersectionPoint(
     const ModelHighAPI_Selection & theExternal)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_IntersectionPoint::ID());
   return IntersectionPointPtr(new SketchAPI_IntersectionPoint(aFeature, theExternal));
 }
 std::shared_ptr<SketchAPI_IntersectionPoint> SketchAPI_Sketch::addIntersectionPoint(
     const std::string & theExternalName)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_IntersectionPoint::ID());
   return IntersectionPointPtr(new SketchAPI_IntersectionPoint(aFeature, theExternalName));
 }
 
 //--------------------------------------------------------------------------------------
-std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(double theX1, double theY1, 
+std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(double theX1, double theY1,
                                                           double theX2, double theY2)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Line::ID());
   return LinePtr(new SketchAPI_Line(aFeature, theX1, theY1, theX2, theY2));
 }
@@ -243,29 +243,29 @@ std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(
     const std::shared_ptr<GeomAPI_Pnt2d> & theStartPoint,
     const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Line::ID());
   return LinePtr(new SketchAPI_Line(aFeature, theStartPoint, theEndPoint));
 }
-std::shared_ptr<SketchAPI_Line> 
+std::shared_ptr<SketchAPI_Line>
   SketchAPI_Sketch::addLine(const ModelHighAPI_Selection & theExternal)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Line::ID());
   return LinePtr(new SketchAPI_Line(aFeature, theExternal));
 }
 std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(const std::string & theExternalName)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Line::ID());
   return LinePtr(new SketchAPI_Line(aFeature, theExternalName));
 }
 
 //--------------------------------------------------------------------------------------
-std::shared_ptr<SketchAPI_Rectangle> SketchAPI_Sketch::addRectangle(double theX1, double theY1, 
+std::shared_ptr<SketchAPI_Rectangle> SketchAPI_Sketch::addRectangle(double theX1, double theY1,
                                                                     double theX2, double theY2)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchAPI_Rectangle::ID());
   return RectanglePtr(new SketchAPI_Rectangle(aFeature, theX1, theY1, theX2, theY2));
 }
@@ -273,7 +273,7 @@ std::shared_ptr<SketchAPI_Rectangle> SketchAPI_Sketch::addRectangle(
     const std::shared_ptr<GeomAPI_Pnt2d> & theStartPoint,
     const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchAPI_Rectangle::ID());
   return RectanglePtr(new SketchAPI_Rectangle(aFeature, theStartPoint, theEndPoint));
 }
@@ -283,7 +283,7 @@ std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(double theCenterX,
                                                               double theCenterY,
                                                               double theRadius)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Circle::ID());
   return CirclePtr(new SketchAPI_Circle(aFeature, theCenterX, theCenterY, theRadius));
 }
@@ -292,7 +292,7 @@ std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(
                                     const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
                                     double theRadius)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Circle::ID());
   return CirclePtr(new SketchAPI_Circle(aFeature, theCenter, theRadius));
 }
@@ -301,7 +301,7 @@ std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(double theX1, doub
                                                               double theX2, double theY2,
                                                               double theX3, double theY3)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Circle::ID());
   return CirclePtr(new SketchAPI_Circle(aFeature, theX1, theY1, theX2, theY2, theX3, theY3));
 }
@@ -311,15 +311,15 @@ std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(
                                                 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint2,
                                                 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint3)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Circle::ID());
   return CirclePtr(new SketchAPI_Circle(aFeature, thePoint1, thePoint2, thePoint3));
 }
 
-std::shared_ptr<SketchAPI_Circle> 
+std::shared_ptr<SketchAPI_Circle>
   SketchAPI_Sketch::addCircle(const ModelHighAPI_Selection & theExternal)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Circle::ID());
   return CirclePtr(new SketchAPI_Circle(aFeature, theExternal));
 }
@@ -327,7 +327,7 @@ std::shared_ptr<SketchAPI_Circle>
 std::shared_ptr<SketchAPI_Circle> SketchAPI_Sketch::addCircle(const std::string & theExternalName)
 {
   // TODO(spo): Add constraint SketchConstraintRigid like in PythonAPI. Is it necessary?
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Circle::ID());
   return CirclePtr(new SketchAPI_Circle(aFeature, theExternalName));
 }
@@ -338,7 +338,7 @@ std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(double theCenterX, doubl
                                                         double theEndX, double theEndY,
                                                         bool theInversed)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature,
                                   theCenterX, theCenterY,
@@ -353,7 +353,7 @@ std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(
                                               const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
                                               bool theInversed)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature, theCenter, theStart, theEnd, theInversed));
 }
@@ -362,7 +362,7 @@ std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(double theStartX, double
                                                         double theEndX, double theEndY,
                                                         double thePassedX, double thePassedY)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature,
                                   theStartX, theStartY,
@@ -375,7 +375,7 @@ std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(
                                                 const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
                                                 const std::shared_ptr<GeomAPI_Pnt2d>& thePassed)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature, theStart, theEnd, thePassed));
 }
@@ -385,7 +385,7 @@ std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(
                                                 double theEndX, double theEndY,
                                                 bool theInversed)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature, theTangentPoint, theEndX, theEndY, theInversed));
 }
@@ -395,14 +395,14 @@ std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(
                                               const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
                                               bool theInversed)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature, theTangentPoint, theEnd, theInversed));
 }
 
 std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const ModelHighAPI_Selection & theExternal)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature, theExternal));
 }
@@ -410,7 +410,7 @@ std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const ModelHighAPI_Selec
 std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const std::string & theExternalName)
 {
   // TODO(spo): Add constraint SketchConstraintRigid like in PythonAPI. Is it necessary?
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Arc::ID());
   return ArcPtr(new SketchAPI_Arc(aFeature, theExternalName));
 }
@@ -419,7 +419,7 @@ std::shared_ptr<SketchAPI_Arc> SketchAPI_Sketch::addArc(const std::string & theE
 std::shared_ptr<SketchAPI_Projection> SketchAPI_Sketch::addProjection(
     const ModelHighAPI_Selection & theExternalFeature)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Projection::ID());
   return ProjectionPtr(new SketchAPI_Projection(aFeature, theExternalFeature));
 }
@@ -427,7 +427,7 @@ std::shared_ptr<SketchAPI_Projection> SketchAPI_Sketch::addProjection(
 std::shared_ptr<SketchAPI_Projection> SketchAPI_Sketch::addProjection(
     const std::string & theExternalName)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_Projection::ID());
   return ProjectionPtr(new SketchAPI_Projection(aFeature, theExternalName));
 }
@@ -437,7 +437,7 @@ std::shared_ptr<SketchAPI_Mirror> SketchAPI_Sketch::addMirror(
     const ModelHighAPI_RefAttr & theMirrorLine,
     const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_ConstraintMirror::ID());
   return MirrorPtr(new SketchAPI_Mirror(aFeature, theMirrorLine, theObjects));
 }
@@ -450,9 +450,9 @@ std::shared_ptr<SketchAPI_Translation> SketchAPI_Sketch::addTranslation(
     const ModelHighAPI_Integer & theNumberOfObjects,
     bool theFullValue)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_MultiTranslation::ID());
-  return TranslationPtr(new SketchAPI_Translation(aFeature, theObjects, thePoint1, 
+  return TranslationPtr(new SketchAPI_Translation(aFeature, theObjects, thePoint1,
                                                   thePoint2, theNumberOfObjects, theFullValue));
 }
 
@@ -464,10 +464,10 @@ std::shared_ptr<SketchAPI_Rotation> SketchAPI_Sketch::addRotation(
     const ModelHighAPI_Integer & theNumberOfObjects,
     bool theFullValue)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_MultiRotation::ID());
   return RotationPtr(
-    new SketchAPI_Rotation(aFeature, theObjects, theCenter, 
+    new SketchAPI_Rotation(aFeature, theObjects, theCenter,
                            theAngle, theNumberOfObjects, theFullValue));
 }
 
@@ -477,7 +477,7 @@ std::shared_ptr<ModelHighAPI_Interface> SketchAPI_Sketch::addSplit(
                                                     const ModelHighAPI_RefAttr& thePoint1,
                                                     const ModelHighAPI_RefAttr& thePoint2)
 {
-  std::shared_ptr<ModelAPI_Feature> aFeature = 
+  std::shared_ptr<ModelAPI_Feature> aFeature =
     compositeFeature()->addFeature(SketchPlugin_ConstraintSplit::ID());
   fillAttribute(theFeature, aFeature->reference(SketchPlugin_Constraint::VALUE()));
   fillAttribute(thePoint1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
@@ -729,7 +729,7 @@ void SketchAPI_Sketch::dump(ModelHighAPI_Dumper& theDumper) const
         theDumper << aBase << " = model.addSketch(" << aDocName
                   << ", model.standardPlane(\"" << aPlaneName << "\"))" << std::endl;
       } else { // some other plane
-        theDumper << aBase << " = model.addSketch(" << aDocName << 
+        theDumper << aBase << " = model.addSketch(" << aDocName <<
           ", " << anExternal<< ")" << std::endl;
       }
     } else {
index 60c5e4202bf0f2979ca4cf09c4cd88d64ea28b92..500c06a6872c35d192978c37fe55356a4ee73d17 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Sketch.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 07/06/16 - Sergey POKHODENKO - Creation of the file
@@ -70,9 +70,9 @@ public:
               GeomDataAPI_Dir, /** Direction of X */,
               normal, SketchPlugin_Sketch::NORM_ID(),
               GeomDataAPI_Dir, /** Normal */,
-              features, SketchPlugin_Sketch::FEATURES_ID(), 
+              features, SketchPlugin_Sketch::FEATURES_ID(),
               ModelAPI_AttributeRefList, /** Features */,
-              external, SketchPlugin_SketchEntity::EXTERNAL_ID(), 
+              external, SketchPlugin_SketchEntity::EXTERNAL_ID(),
               ModelAPI_AttributeSelection, /** External */,
               solverError, SketchPlugin_Sketch::SOLVER_ERROR(),
               ModelAPI_AttributeString, /** Solver error */,
@@ -109,11 +109,11 @@ public:
 
   /// Add intersection point
   SKETCHAPI_EXPORT
-  std::shared_ptr<SketchAPI_IntersectionPoint> 
+  std::shared_ptr<SketchAPI_IntersectionPoint>
     addIntersectionPoint(const ModelHighAPI_Selection & theExternal);
   /// Add point
   SKETCHAPI_EXPORT
-  std::shared_ptr<SketchAPI_IntersectionPoint> 
+  std::shared_ptr<SketchAPI_IntersectionPoint>
     addIntersectionPoint(const std::string & theExternalName);
 
   /// Add line
index b693505d1ab44df2e9e158acbc33f4d02eaf5d12..914c8baa24f92196214a9ba41b2024b9a093137e 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_SketchEntity.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 07/06/16 - Sergey POKHODENKO - Creation of the file
index fdd3b40a990893db300f983ec15e2de28c6a5013..edf8c665ef50437e59d7a916bc9c0a097167f67a 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_SketchEntity.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 07/06/16 - Sergey POKHODENKO - Creation of the file
index 67e8457e90ce68765c3385979da42ef4b2d55751..2d5eaa38cfa1fe4734c50ba273180bdf388b360b 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Translation.cpp
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
index aee6e38bfab883e8fcad08b2efe09378b89762ba..6c6bbc9adb4d96a7d9d8478219459741a0a47c8e 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 // Name   : SketchAPI_Translation.h
-// Purpose: 
+// Purpose:
 //
 // History:
 // 16/06/16 - Sergey POKHODENKO - Creation of the file
index ef74d2d0496c34b910ccbcdc155e17a50e0046a1..90801362d927793da818c1628b5b191837e312f6 100644 (file)
@@ -150,10 +150,10 @@ void SketchPlugin_Arc::execute()
 
     std::shared_ptr<GeomAPI_Shape> aCircleShape;
     if(!isInversed->value()) {
-      aCircleShape = 
+      aCircleShape =
         GeomAlgoAPI_EdgeBuilder::lineCircleArc(aCenter, aStartPoint, aEndPoint, aNormal);
     } else {
-      aCircleShape = 
+      aCircleShape =
         GeomAlgoAPI_EdgeBuilder::lineCircleArc(aCenter, aEndPoint, aStartPoint, aNormal);
     }
 
@@ -195,15 +195,15 @@ AISObjectPtr SketchPlugin_Arc::getAISObject(AISObjectPtr thePrevious)
           bool aHasPlane = aNDir && !(aNDir->x() == 0 && aNDir->y() == 0 && aNDir->z() == 0);
           if (aHasPlane) {
             std::shared_ptr<GeomAPI_Dir> aNormal = aNDir->dir();
-            std::shared_ptr<GeomAPI_Pnt> 
+            std::shared_ptr<GeomAPI_Pnt>
               aStartPoint(aSketch->to3D(aStartAttr->x(), aStartAttr->y()));
             std::shared_ptr<GeomAPI_Pnt> aEndPoint = aStartPoint;
             if (aTypeAttr && aTypeAttr->isInitialized() &&
                 aTypeAttr->value() == ARC_TYPE_THREE_POINTS()) {
-              if (aEndAttr->isInitialized() && // 
+              if (aEndAttr->isInitialized() && //
                   aEndAttr->pnt()->distance(aStartAttr->pnt()) > tolerance) {
                 aEndPoint = aSketch->to3D(aEndAttr->x(), aEndAttr->y());
-                std::shared_ptr<GeomDataAPI_Point2D> aPassedAttr = 
+                std::shared_ptr<GeomDataAPI_Point2D> aPassedAttr =
                   std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
                   data()->attribute(PASSED_POINT_ID()));
                 if (!aPassedAttr->isInitialized()) {
@@ -211,10 +211,10 @@ AISObjectPtr SketchPlugin_Arc::getAISObject(AISObjectPtr thePrevious)
                   // check that center is bad for the current start and end and must be recomputed
                   std::shared_ptr<GeomAPI_Circ2d> aCircleForArc(new GeomAPI_Circ2d(
                     aCenterAttr->pnt(), aStartAttr->pnt()));
-                  std::shared_ptr<GeomAPI_Pnt2d> aProjection = 
+                  std::shared_ptr<GeomAPI_Pnt2d> aProjection =
                     aCircleForArc->project(aEndAttr->pnt());
                   if (!aProjection.get() || aEndAttr->pnt()->distance(aProjection) > tolerance) {
-                    std::shared_ptr<GeomAPI_XY> aDir = 
+                    std::shared_ptr<GeomAPI_XY> aDir =
                       aEndAttr->pnt()->xy()->decreased(aStartAttr->pnt()->xy())->multiplied(0.5);
                     double x = aDir->x();
                     double y = aDir->y();
@@ -231,7 +231,7 @@ AISObjectPtr SketchPlugin_Arc::getAISObject(AISObjectPtr thePrevious)
             AttributeBooleanPtr isInversed =
               std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(attribute(INVERSED_ID()));
 
-            std::shared_ptr<GeomAPI_Shape> aCircleShape = 
+            std::shared_ptr<GeomAPI_Shape> aCircleShape =
               (isInversed->isInitialized() && isInversed->value()) ?
                 GeomAlgoAPI_EdgeBuilder::lineCircleArc(aCenter, aEndPoint, aStartPoint, aNormal) :
                 GeomAlgoAPI_EdgeBuilder::lineCircleArc(aCenter, aStartPoint, aEndPoint, aNormal);
@@ -241,7 +241,7 @@ AISObjectPtr SketchPlugin_Arc::getAISObject(AISObjectPtr thePrevious)
           }
         }
         // make a visible point
-        std::shared_ptr<GeomAPI_Shape> aCenterPointShape = 
+        std::shared_ptr<GeomAPI_Shape> aCenterPointShape =
           GeomAlgoAPI_PointBuilder::vertex(aCenter);
         aShapes.push_back(aCenterPointShape);
       }
@@ -319,10 +319,10 @@ bool SketchPlugin_Arc::isFeatureValid()
 
   bool isValid = false;
   if (anArcType == ARC_TYPE_THREE_POINTS())
-    isValid = aStartAttr->isInitialized() && 
+    isValid = aStartAttr->isInitialized() &&
       anEndAttr->isInitialized() && aPassedAttr->isInitialized();
   else
-    isValid = aCenterAttr->isInitialized() && 
+    isValid = aCenterAttr->isInitialized() &&
       aStartAttr->isInitialized() && anEndAttr->isInitialized();
 
   return isValid;
@@ -375,7 +375,7 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
       std::dynamic_pointer_cast<ModelAPI_AttributeString>(attribute(ARC_TYPE()));
 
   // this is before others since here end attribute may be changed, but with the special behavior
-  if (aTypeAttr->value() == ARC_TYPE_TANGENT() && 
+  if (aTypeAttr->value() == ARC_TYPE_TANGENT() &&
      (theID == TANGENT_POINT_ID() || theID == END_ID())) {
     SketchPlugin_Sketch* aSketch = sketch();
     AttributeRefAttrPtr aTangPtAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(
@@ -412,7 +412,7 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
       std::shared_ptr<GeomAPI_Pnt2d> aMidPnt(
           new GeomAPI_Pnt2d(aEndPntCoord->added(aTangPnt2d->xy())->multiplied(0.5)));
 
-      // compute center of arc by calculating intersection of 
+      // compute center of arc by calculating intersection of
       // orthogonal line and middle perpendicular
       std::shared_ptr<GeomAPI_Lin2d> anOrthoLine(new GeomAPI_Lin2d(aTangPnt2d, anOrthoDir));
       std::shared_ptr<GeomAPI_Lin2d> aMiddleLine(new GeomAPI_Lin2d(aMidPnt, aMidDir));
@@ -452,7 +452,7 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
       }
     }
     // update all other attributes due to the base attributes values
-    if (aTypeAttr->value() == ARC_TYPE_THREE_POINTS()) { 
+    if (aTypeAttr->value() == ARC_TYPE_THREE_POINTS()) {
       // update passed point due to start, end and center
       if (aCenter->distance(aStart) > tolerance && aCenter->distance(anEnd) > tolerance) {
         // project passed point t othe circle
@@ -477,7 +477,7 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
           std::shared_ptr<GeomAPI_Dir2d> aMidDir(new GeomAPI_Dir2d(aMidDirXY));
           if ((aStartDir->cross(aMidDir) > 0) ^ !isReversed())
             aMidDir->reverse();
-          std::shared_ptr<GeomAPI_XY> aPassedPnt = 
+          std::shared_ptr<GeomAPI_XY> aPassedPnt =
             aCenter->xy()->added(aMidDir->xy()->multiplied(aCenter->distance(aStart)));
           std::dynamic_pointer_cast<GeomDataAPI_Point2D>(data()->attribute(PASSED_POINT_ID()))->
             setValue(aPassedPnt->x(), aPassedPnt->y());
@@ -497,7 +497,7 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
     adjustPeriod(aStartParam);
     adjustPeriod(aEndParam);
     // use the passed point for the angle calculation
-    if (aTypeAttr->value() == ARC_TYPE_THREE_POINTS()) { 
+    if (aTypeAttr->value() == ARC_TYPE_THREE_POINTS()) {
       std::shared_ptr<GeomDataAPI_Point2D> aPassedAttr =
         std::dynamic_pointer_cast<GeomDataAPI_Point2D>(data()->attribute(PASSED_POINT_ID()));
       double aPassedParam;
@@ -558,7 +558,7 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
   }
 
   if (theID == RADIUS_ID()) {
-    if (!aStartAttr->isInitialized() || !anEndAttr->isInitialized() || 
+    if (!aStartAttr->isInitialized() || !anEndAttr->isInitialized() ||
         !aCenterAttr->isInitialized())
       return;
     // move center and passed point
@@ -572,14 +572,14 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
     double aRadius = aRadiusAttr->value();
 
     data()->blockSendAttributeUpdated(true);
-    std::shared_ptr<GeomAPI_Dir2d> 
+    std::shared_ptr<GeomAPI_Dir2d>
       aStartDir(new GeomAPI_Dir2d(aStart->xy()->decreased(aCenter->xy())));
-    std::shared_ptr<GeomAPI_XY> 
+    std::shared_ptr<GeomAPI_XY>
       aNewStart = aStartDir->xy()->multiplied(aRadius)->added(aCenter->xy());
     aStartAttr->setValue(aNewStart->x(), aNewStart->y());
-    std::shared_ptr<GeomAPI_Dir2d> 
+    std::shared_ptr<GeomAPI_Dir2d>
       anEndDir(new GeomAPI_Dir2d(anEnd->xy()->decreased(aCenter->xy())));
-    std::shared_ptr<GeomAPI_XY> 
+    std::shared_ptr<GeomAPI_XY>
       aNewEnd = anEndDir->xy()->multiplied(aRadius)->added(aCenter->xy());
     anEndAttr->setValue(aNewEnd->x(), aNewEnd->y());
     data()->blockSendAttributeUpdated(false);
index 812123b04e142af2de742fcb98d8353da923e622..50ccbf323e68aaed31a18ff770df0c9d02ff08fa 100644 (file)
@@ -21,7 +21,7 @@
  */
 class SketchPlugin_Arc : public SketchPlugin_SketchEntity, public GeomAPI_IPresentable
 {
-  /// to avoid cyclic dependencies in automatic updates: they mean that 
+  /// to avoid cyclic dependencies in automatic updates: they mean that
   /// update is performed right now and automatic updates are not needed
   bool myStartUpdate, myEndUpdate;
   /// to avoid (if possible) additional modification of changed coordinate (issue #855)
index 3df29fe2daec83cef53f8c631d19d0c5f0f4e6b7..d8b4c84414004f71195926a8a65ecdb7f8cd4278 100644 (file)
@@ -73,7 +73,7 @@ void SketchPlugin_Circle::execute()
     // compute a circle point in 3D view
     std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = std::dynamic_pointer_cast<
         GeomDataAPI_Point2D>(data()->attribute(CENTER_ID()));
-    AttributeDoublePtr aRadiusAttr = 
+    AttributeDoublePtr aRadiusAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(data()->attribute(RADIUS_ID()));
     if (aCenterAttr->isInitialized() && aRadiusAttr->isInitialized()) {
       std::shared_ptr<GeomAPI_Pnt> aCenter(aSketch->to3D(aCenterAttr->x(), aCenterAttr->y()));
@@ -107,7 +107,7 @@ AISObjectPtr SketchPlugin_Circle::getAISObject(AISObjectPtr thePrevious)
     // compute a circle point in 3D view
     std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = std::dynamic_pointer_cast<
         GeomDataAPI_Point2D>(data()->attribute(CENTER_ID()));
-    AttributeDoublePtr aRadiusAttr = 
+    AttributeDoublePtr aRadiusAttr =
         std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(attribute(RADIUS_ID()));
     if (aCenterAttr->isInitialized() && aRadiusAttr->isInitialized()) {
         std::shared_ptr<GeomAPI_Pnt> aCenter(aSketch->to3D(aCenterAttr->x(), aCenterAttr->y()));
@@ -123,7 +123,7 @@ AISObjectPtr SketchPlugin_Circle::getAISObject(AISObjectPtr thePrevious)
         if (aCircleShape && aRadius != 0) {
           std::list<std::shared_ptr<GeomAPI_Shape> > aShapes;
           // make a visible point
-          std::shared_ptr<GeomAPI_Shape> aCenterPointShape = 
+          std::shared_ptr<GeomAPI_Shape> aCenterPointShape =
             GeomAlgoAPI_PointBuilder::vertex(aCenter);
           aShapes.push_back(aCenterPointShape);
           aShapes.push_back(aCircleShape);
@@ -143,7 +143,7 @@ AISObjectPtr SketchPlugin_Circle::getAISObject(AISObjectPtr thePrevious)
 
 bool SketchPlugin_Circle::isFeatureValid()
 {
-  std::shared_ptr<GeomDataAPI_Point2D> aCenter = 
+  std::shared_ptr<GeomDataAPI_Point2D> aCenter =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(CENTER_ID()));
   bool aValid = aCenter->isInitialized();
 
@@ -204,7 +204,7 @@ void SketchPlugin_Circle::attributeChanged(const std::string& theID) {
     if (aSelection && !aSelection->isNull() && aSelection->isEdge()) {
       std::shared_ptr<GeomAPI_Edge> anEdge( new GeomAPI_Edge(aSelection));
       std::shared_ptr<GeomAPI_Circ> aCirc = anEdge->circle();
-      std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = 
+      std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr =
         std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(CENTER_ID()));
       aCenterAttr->setValue(sketch()->to2D(aCirc->center()));
       real(RADIUS_ID())->setValue(aCirc->radius());
@@ -233,7 +233,7 @@ void SketchPlugin_Circle::attributeChanged(const std::string& theID) {
 
     std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = std::dynamic_pointer_cast<
         GeomDataAPI_Point2D>(data()->attribute(CENTER_ID()));
-    AttributeDoublePtr aRadiusAttr = 
+    AttributeDoublePtr aRadiusAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(data()->attribute(RADIUS_ID()));
 
     if (aNbInitialized == 1)
@@ -272,7 +272,7 @@ void SketchPlugin_Circle::adjustThreePoints()
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(CENTER_ID()));
   if (!aCenterAttr->isInitialized())
     return;
-  AttributeDoublePtr aRadiusAttr = 
+  AttributeDoublePtr aRadiusAttr =
     std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(attribute(RADIUS_ID()));
   if (!aRadiusAttr->isInitialized())
     return;
index 432b28eb43903dd9eee6eb5d804d8e5c1075b564..e363ba32b14ee046fc487c36a42ee4f92b30dbf1 100644 (file)
@@ -42,14 +42,14 @@ void SketchPlugin_ConstraintAngle::initAttributes()
   data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
   data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
 
-  data()->addAttribute(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID(), 
+  data()->addAttribute(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID(),
                        ModelAPI_AttributeDouble::typeId());
-  data()->addAttribute(SketchPlugin_ConstraintAngle::TYPE_ID(), 
+  data()->addAttribute(SketchPlugin_ConstraintAngle::TYPE_ID(),
                        ModelAPI_AttributeInteger::typeId());
 
-  data()->addAttribute(SketchPlugin_ConstraintAngle::ANGLE_REVERSED_FIRST_LINE_ID(), 
+  data()->addAttribute(SketchPlugin_ConstraintAngle::ANGLE_REVERSED_FIRST_LINE_ID(),
                        ModelAPI_AttributeBoolean::typeId());
-  data()->addAttribute(SketchPlugin_ConstraintAngle::ANGLE_REVERSED_SECOND_LINE_ID(), 
+  data()->addAttribute(SketchPlugin_ConstraintAngle::ANGLE_REVERSED_SECOND_LINE_ID(),
                        ModelAPI_AttributeBoolean::typeId());
 }
 
@@ -65,9 +65,9 @@ void SketchPlugin_ConstraintAngle::execute()
 {
   std::shared_ptr<ModelAPI_Data> aData = data();
 
-  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttrA = 
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttrA =
     aData->refattr(SketchPlugin_Constraint::ENTITY_A());
-  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttrB = 
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttrB =
     aData->refattr(SketchPlugin_Constraint::ENTITY_B());
   if (!anAttrA->isInitialized() || !anAttrB->isInitialized())
     return;
@@ -80,7 +80,7 @@ void SketchPlugin_ConstraintAngle::execute()
     anAttrValue->setValue(anAngle);
     updateConstraintValueByAngleValue();
   }
-  // the value should to be computed here, not in the 
+  // the value should to be computed here, not in the
   // getAISObject in order to change the model value
   // inside the object transaction. This is important for creating a constraint by preselection.
   // The display of the presentation in this case happens after the transaction commit
@@ -110,13 +110,13 @@ void SketchPlugin_ConstraintAngle::attributeChanged(const std::string& theID)
   if (!aLineA || !aLineB)
     return;
 
-  if (theID == SketchPlugin_Constraint::ENTITY_A() || 
+  if (theID == SketchPlugin_Constraint::ENTITY_A() ||
       theID == SketchPlugin_Constraint::ENTITY_B()) {
     AttributeDoublePtr aValueAttr = real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID());
     AttributeDoublePtr aConstrValueAttr = real(SketchPlugin_Constraint::VALUE());
     // only if one of attributes is not initialized, try to compute the current value
     if (!aValueAttr->isInitialized() || !aConstrValueAttr->isInitialized()) {
-      if (aValueAttr->isInitialized() && !aConstrValueAttr->isInitialized()) 
+      if (aValueAttr->isInitialized() && !aConstrValueAttr->isInitialized())
         // initialize base value of constraint
         updateConstraintValueByAngleValue();
       double anAngle = calculateAngle();
@@ -132,9 +132,9 @@ void SketchPlugin_ConstraintAngle::attributeChanged(const std::string& theID)
 
     std::shared_ptr<ModelAPI_Data> aData = data();
     std::shared_ptr<GeomAPI_Ax3> aPlane = SketchPlugin_Sketch::plane(sketch());
-    FeaturePtr aLineA = 
+    FeaturePtr aLineA =
       SketcherPrs_Tools::getFeatureLine(aData, SketchPlugin_Constraint::ENTITY_A());
-    FeaturePtr aLineB = 
+    FeaturePtr aLineB =
       SketcherPrs_Tools::getFeatureLine(aData, SketchPlugin_Constraint::ENTITY_B());
 
     // Intersection of lines
@@ -217,7 +217,7 @@ double SketchPlugin_ConstraintAngle::getAngleForType(double theAngle, bool isPre
         anAngle = theAngle - 180.0;
       else
         anAngle = 180.0 - theAngle;
-      
+
       if (anAngle < 0.0)
         anAngle += 360.0;
     }
index 02931bcc29d08b662006c0df232b596a5584af3f..eef61d0a900e7802f6842308c7c96b7b2df725da 100644 (file)
@@ -71,7 +71,7 @@ AISObjectPtr SketchPlugin_ConstraintDistance::getAISObject(AISObjectPtr thePrevi
   if (!sketch())
     return thePrevious;
 
-  AISObjectPtr anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this, 
+  AISObjectPtr anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this,
                                                                       sketch()->coordinatePlane(),
                                                                       thePrevious);
   return anAIS;
@@ -166,12 +166,12 @@ double SketchPlugin_ConstraintDistance::calculateCurrentDistance()
 
 void SketchPlugin_ConstraintDistance::attributeChanged(const std::string& theID)
 {
-  if (theID == SketchPlugin_Constraint::ENTITY_A() || 
-      theID == SketchPlugin_Constraint::ENTITY_B()) 
+  if (theID == SketchPlugin_Constraint::ENTITY_A() ||
+      theID == SketchPlugin_Constraint::ENTITY_B())
   {
     std::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = std::dynamic_pointer_cast<
         ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_Constraint::VALUE()));
-    if (!aValueAttr->isInitialized()) { 
+    if (!aValueAttr->isInitialized()) {
       // only if it is not initialized, try to compute the current value
       double aDistance = calculateCurrentDistance();
       if (aDistance > 0) { // set as value the length of updated references
@@ -181,7 +181,7 @@ void SketchPlugin_ConstraintDistance::attributeChanged(const std::string& theID)
   } else if (theID == SketchPlugin_Constraint::FLYOUT_VALUE_PNT() && !myFlyoutUpdate) {
     myFlyoutUpdate = true;
     // Recalculate flyout point in local coordinates of the distance constraint:
-    // the X coordinate is a length of projection of the flyout point on the 
+    // the X coordinate is a length of projection of the flyout point on the
     //                  line binding two distanced points
     //                  or a line of projection of the distanced point onto the distanced segment
     // the Y coordinate is a distance from the flyout point to the line
index c2ad12f9924c30ad89a0f989a751ff00539fd8ba..4015ca52a1ba1f03e65402c4ac48c281ae225508 100644 (file)
@@ -69,7 +69,7 @@ SketchPlugin_ConstraintFillet::SketchPlugin_ConstraintFillet()
 void SketchPlugin_ConstraintFillet::initAttributes()
 {
   data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), 
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(),
                        ModelAPI_AttributeRefAttrList::typeId());
 }
 
@@ -99,7 +99,7 @@ void SketchPlugin_ConstraintFillet::execute()
       aPointsIter != myNewPoints.end();
       ++aPointsIter) {
     AttributePtr aPointAttr = *aPointsIter;
-    std::shared_ptr<GeomDataAPI_Point2D> aFilletPoint2d = 
+    std::shared_ptr<GeomDataAPI_Point2D> aFilletPoint2d =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aPointAttr);
     if(!aFilletPoint2d.get()) {
       setError("Error: One of the selected points is empty.");
@@ -110,7 +110,7 @@ void SketchPlugin_ConstraintFillet::execute()
     // Obtain base lines for fillet.
     bool anIsNeedNewObjects = true;
     FilletFeatures aFilletFeatures;
-    std::map<AttributePtr, FilletFeatures>::iterator aPrevPointsIter = 
+    std::map<AttributePtr, FilletFeatures>::iterator aPrevPointsIter =
       myPointFeaturesMap.find(aPointAttr);
     if(aPrevPointsIter != myPointFeaturesMap.end()) {
       anIsNeedNewObjects = false;
@@ -124,7 +124,7 @@ void SketchPlugin_ConstraintFillet::execute()
       // Obtain constraint coincidence for the fillet point.
       FeaturePtr aConstraintCoincidence;
       const std::set<AttributePtr>& aRefsList = aFilletPoint2d->owner()->data()->refsToMe();
-      for(std::set<AttributePtr>::const_iterator 
+      for(std::set<AttributePtr>::const_iterator
           anIt = aRefsList.cbegin(); anIt != aRefsList.cend(); ++anIt) {
         std::shared_ptr<ModelAPI_Attribute> anAttr = (*anIt);
         FeaturePtr aConstrFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(anAttr->owner());
@@ -166,11 +166,11 @@ void SketchPlugin_ConstraintFillet::execute()
       aBaseEdgeA = *aLinesIt++;
       aBaseEdgeB = *aLinesIt;
 
-      std::pair<FeaturePtr, bool> aBasePairA = 
-        std::make_pair(aBaseEdgeA, 
+      std::pair<FeaturePtr, bool> aBasePairA =
+        std::make_pair(aBaseEdgeA,
                        aBaseEdgeA->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value());
-      std::pair<FeaturePtr, bool> aBasePairB = 
-        std::make_pair(aBaseEdgeB, 
+      std::pair<FeaturePtr, bool> aBasePairB =
+        std::make_pair(aBaseEdgeB,
                        aBaseEdgeB->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value());
       aFilletFeatures.baseEdgesState.push_back(aBasePairA);
       aFilletFeatures.baseEdgesState.push_back(aBasePairB);
@@ -207,10 +207,10 @@ void SketchPlugin_ConstraintFillet::execute()
     FeaturePtr aBaseFeatures[aNbFeatures] = {aBaseEdgeA, aBaseEdgeB};
     FeaturePtr aResultFeatures[aNbFeatures] = {aResultEdgeA, aResultEdgeB};
     // tangent directions of the features in coincident point
-    std::shared_ptr<GeomAPI_Dir2d> aTangentDir[aNbFeatures]; 
+    std::shared_ptr<GeomAPI_Dir2d> aTangentDir[aNbFeatures];
     bool isStart[aNbFeatures]; // indicates which point the features share
     // first pair of points relate to first feature, second pair -  to second
-    std::shared_ptr<GeomAPI_Pnt2d> aStartEndPnt[aNbFeatures * 2]; 
+    std::shared_ptr<GeomAPI_Pnt2d> aStartEndPnt[aNbFeatures * 2];
     std::string aFeatAttributes[aNbFeatures * 2]; // attributes of features
     for (int i = 0; i < aNbFeatures; i++) {
       std::string aStartAttr, aEndAttr;
@@ -246,7 +246,7 @@ void SketchPlugin_ConstraintFillet::execute()
         if (!isStart[i])
           aDir = aDir->multiplied(-1.0);
       } else if (aResultFeatures[i]->getKind() == SketchPlugin_Arc::ID()) {
-        std::shared_ptr<GeomAPI_Pnt2d> aCenterPoint = 
+        std::shared_ptr<GeomAPI_Pnt2d> aCenterPoint =
           std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
           aResultFeatures[i]->attribute(SketchPlugin_Arc::CENTER_ID()))->pnt();
         aDir = isStart[i] ? aStartEndPnt[2*i]->xy() : aStartEndPnt[2*i+1]->xy();
@@ -256,7 +256,7 @@ void SketchPlugin_ConstraintFillet::execute()
         double y = aDir->y();
         aDir->setX(-y);
         aDir->setY(x);
-        if (isStart[i] == 
+        if (isStart[i] ==
             std::dynamic_pointer_cast<SketchPlugin_Arc>(aBaseFeatures[i])->isReversed())
           aDir = aDir->multiplied(-1.0);
       }
@@ -266,13 +266,13 @@ void SketchPlugin_ConstraintFillet::execute()
     // By default, the start point of fillet arc is connected to FeatureA,
     // and the end point - to FeatureB. But when the angle between TangentDirA and
     // TangentDirB greater 180 degree, the sequaence of features need to be reversed.
-    double cosBA = aTangentDir[0]->cross(aTangentDir[1]); // cos(B-A), 
+    double cosBA = aTangentDir[0]->cross(aTangentDir[1]); // cos(B-A),
     // where A and B - angles between corresponding tanget direction and the X axis
     bool isReversed = cosBA > 0.0;
 
     // Calculate fillet arc parameters
     std::shared_ptr<GeomAPI_XY> aCenter, aTangentPntA, aTangentPntB;
-    calculateFilletCenter(aBaseEdgeA, aBaseEdgeB, aFilletRadius, 
+    calculateFilletCenter(aBaseEdgeA, aBaseEdgeB, aFilletRadius,
                           isStart, aCenter, aTangentPntA, aTangentPntB);
     if(!aCenter.get() || !aTangentPntA.get() || !aTangentPntB.get()) {
       setError("Can not create fillet with the specified parameters.");
@@ -287,7 +287,7 @@ void SketchPlugin_ConstraintFillet::execute()
       aResultEdgeB->attribute(aFeatAttributes[2 + (isStart[1] ? 0 : 1)]))->
       setValue(aTangentPntB->x(), aTangentPntB->y());
     aResultEdgeB->execute();
-    // update fillet arc: make the arc correct for sure, so, it is not needed to 
+    // update fillet arc: make the arc correct for sure, so, it is not needed to
     // process the "attribute updated"
     // by arc; moreover, it may cause cyclicity in hte mechanism of updater
     aResultArc->data()->blockSendAttributeUpdated(true);
@@ -298,7 +298,7 @@ void SketchPlugin_ConstraintFillet::execute()
       aTangentPntA = aTangentPntB;
       aTangentPntB = aTmp;
     }
-    std::shared_ptr<GeomDataAPI_Point2D> aStartPoint = 
+    std::shared_ptr<GeomDataAPI_Point2D> aStartPoint =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aResultArc->attribute(SketchPlugin_Arc::START_ID()));
     std::shared_ptr<GeomDataAPI_Point2D> aEndPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
@@ -326,7 +326,7 @@ void SketchPlugin_ConstraintFillet::execute()
       int aFeatInd = isReversed ? 1 : 0;
       int anAttrInd = (isReversed ? 2 : 0) + (isStart[isReversed ? 1 : 0] ? 0 : 1);
       aRefAttr->setAttr(aResultFeatures[aFeatInd]->attribute(aFeatAttributes[anAttrInd]));
-      recalculateAttributes(aResultArc, SketchPlugin_Arc::START_ID(), 
+      recalculateAttributes(aResultArc, SketchPlugin_Arc::START_ID(),
                             aResultFeatures[aFeatInd], aFeatAttributes[anAttrInd]);
       aConstraint->execute();
       aFilletFeatures.resultConstraints.push_back(aConstraint);
@@ -341,7 +341,7 @@ void SketchPlugin_ConstraintFillet::execute()
       aFeatInd = isReversed ? 0 : 1;
       anAttrInd = (isReversed ? 0 : 2) + (isStart[isReversed ? 0 : 1] ? 0 : 1);
       aRefAttr->setAttr(aResultFeatures[aFeatInd]->attribute(aFeatAttributes[anAttrInd]));
-      recalculateAttributes(aResultArc, SketchPlugin_Arc::END_ID(), 
+      recalculateAttributes(aResultArc, SketchPlugin_Arc::END_ID(),
                             aResultFeatures[aFeatInd], aFeatAttributes[anAttrInd]);
       aConstraint->execute();
       aFilletFeatures.resultConstraints.push_back(aConstraint);
@@ -368,7 +368,7 @@ void SketchPlugin_ConstraintFillet::execute()
         aRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(
             aConstraint->attribute(SketchPlugin_Constraint::ENTITY_B()));
         bool isArc = aResultFeatures[i]->getKind() == SketchPlugin_Arc::ID();
-        aRefAttr->setObject(isArc ? aResultFeatures[i]->lastResult() : 
+        aRefAttr->setObject(isArc ? aResultFeatures[i]->lastResult() :
                                     aResultFeatures[i]->firstResult());
         aConstraint->execute();
         aFilletFeatures.resultConstraints.push_back(aConstraint);
@@ -467,7 +467,7 @@ void SketchPlugin_ConstraintFillet::attributeChanged(const std::string& theID)
     myNewPoints.clear();
 
     // Get list of points for fillets and current radius.
-    AttributeRefAttrListPtr aRefListOfFilletPoints = 
+    AttributeRefAttrListPtr aRefListOfFilletPoints =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefAttrList>(
       data()->attribute(SketchPlugin_Constraint::ENTITY_A()));
     AttributeDoublePtr aRadiusAttribute = real(VALUE());
@@ -482,7 +482,7 @@ void SketchPlugin_ConstraintFillet::attributeChanged(const std::string& theID)
 
     // Iterate over points to get base lines an calculate radius for fillets.
     double aMinimumRadius = 0;
-    std::list<std::pair<ObjectPtr, AttributePtr>> 
+    std::list<std::pair<ObjectPtr, AttributePtr>>
       aSelectedPointsList = aRefListOfFilletPoints->list();
     std::list<std::pair<ObjectPtr, AttributePtr>>::iterator anIter = aSelectedPointsList.begin();
     std::set<AttributePtr> aPointsToSkeep;
@@ -507,7 +507,7 @@ void SketchPlugin_ConstraintFillet::attributeChanged(const std::string& theID)
       // Obtain constraint coincidence for the fillet point.
       FeaturePtr aConstraintCoincidence;
       const std::set<AttributePtr>& aRefsList = aFilletPointAttr->owner()->data()->refsToMe();
-      for(std::set<AttributePtr>::const_iterator 
+      for(std::set<AttributePtr>::const_iterator
           anIt = aRefsList.cbegin(); anIt != aRefsList.cend(); ++anIt) {
         std::shared_ptr<ModelAPI_Attribute> anAttr = (*anIt);
         FeaturePtr aConstrFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(anAttr->owner());
@@ -550,11 +550,11 @@ void SketchPlugin_ConstraintFillet::attributeChanged(const std::string& theID)
                                            SketchPlugin_ConstraintCoincidence::ENTITY_B(),
                                            aCoincides);
 
-      // Remove points from set of coincides. 
+      // Remove points from set of coincides.
       // Also get all attributes which is equal to this point to exclude it.
       std::shared_ptr<GeomAPI_Pnt2d> aFilletPnt2d = aFilletPoint2D->pnt();
       std::set<FeaturePtr> aNewSetOfCoincides;
-      for(std::set<FeaturePtr>::iterator 
+      for(std::set<FeaturePtr>::iterator
           anIt = aCoincides.begin(); anIt != aCoincides.end(); ++anIt) {
         std::string aFeatureKind = (*anIt)->getKind();
         if(aFeatureKind == SketchPlugin_Point::ID()) {
@@ -606,7 +606,7 @@ void SketchPlugin_ConstraintFillet::attributeChanged(const std::string& theID)
       // If we still have more than two coincides remove auxilary entities from set of coincides.
       if(aCoincides.size() > 2) {
         aNewSetOfCoincides.clear();
-        for(std::set<FeaturePtr>::iterator 
+        for(std::set<FeaturePtr>::iterator
             anIt = aCoincides.begin(); anIt != aCoincides.end(); ++anIt) {
           if(!(*anIt)->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value()) {
             aNewSetOfCoincides.insert(*anIt);
@@ -643,7 +643,7 @@ void SketchPlugin_ConstraintFillet::attributeChanged(const std::string& theID)
         double aDistanceA = getProjectionDistance(anOldFeatureB, aPntA);
         double aDistanceB = getProjectionDistance(anOldFeatureA, aPntB);
         double aRadius = aDistanceA < aDistanceB ? aDistanceA / 2.0 : aDistanceB / 2.0;
-        aMinimumRadius = aMinimumRadius == 0 ? aRadius : 
+        aMinimumRadius = aMinimumRadius == 0 ? aRadius :
           aRadius < aMinimumRadius ? aRadius : aMinimumRadius;
       }
     }
@@ -817,14 +817,14 @@ void possibleFilletCenterArcArc(
       double aMedDist = (aRadA * aRadA - aRadB * aRadB + aCenterDist2) / (2.0 * aCenterDist);
       double aHeight = sqrt(aRadA * aRadA - aMedDist * aMedDist);
 
-      double x1 = theCenterA->x() + 
+      double x1 = theCenterA->x() +
         (aMedDist * aCenterDir->x() + aCenterDir->y() * aHeight) / aCenterDist;
-      double y1 = theCenterA->y() + 
+      double y1 = theCenterA->y() +
         (aMedDist * aCenterDir->y() - aCenterDir->x() * aHeight) / aCenterDist;
 
-      double x2 = theCenterA->x() + 
+      double x2 = theCenterA->x() +
         (aMedDist * aCenterDir->x() - aCenterDir->y() * aHeight) / aCenterDist;
-      double y2 = theCenterA->y() + 
+      double y2 = theCenterA->y() +
         (aMedDist * aCenterDir->y() + aCenterDir->x() * aHeight) / aCenterDist;
 
       std::shared_ptr<GeomAPI_XY> aPoint1(new GeomAPI_XY(x1, y1));
@@ -880,7 +880,7 @@ void calculateFilletCenter(FeaturePtr theFeatureA, FeaturePtr theFeatureB,
 
     // get and filter possible centers
     std::list< std::shared_ptr<GeomAPI_XY> > aSuspectCenters;
-    possibleFilletCenterLineLine(aStart[0], aDir[0], aStart[1], aDir[1], 
+    possibleFilletCenterLineLine(aStart[0], aDir[0], aStart[1], aDir[1],
                                  theRadius, aSuspectCenters);
     double aDot = 0.0;
     std::list< std::shared_ptr<GeomAPI_XY> >::iterator anIt = aSuspectCenters.begin();
@@ -898,7 +898,7 @@ void calculateFilletCenter(FeaturePtr theFeatureA, FeaturePtr theFeatureB,
       return;
     }
   } else if ((theFeatureA->getKind() == SketchPlugin_Arc::ID() &&
-      theFeatureB->getKind() == SketchPlugin_Line::ID()) || 
+      theFeatureB->getKind() == SketchPlugin_Line::ID()) ||
       (theFeatureA->getKind() == SketchPlugin_Line::ID() &&
       theFeatureB->getKind() == SketchPlugin_Arc::ID())) {
     int aLineInd = theFeatureA->getKind() == SketchPlugin_Line::ID() ? 0 : 1;
@@ -916,7 +916,7 @@ void calculateFilletCenter(FeaturePtr theFeatureA, FeaturePtr theFeatureB,
 
     // get possible centers and filter them
     std::list< std::shared_ptr<GeomAPI_XY> > aSuspectCenters;
-    possibleFilletCenterLineArc(aStart[aLineInd], aDirLine, aCenter[1-aLineInd], 
+    possibleFilletCenterLineArc(aStart[aLineInd], aDirLine, aCenter[1-aLineInd],
                                 anArcRadius, theRadius, aSuspectCenters);
     double aDot = 0.0;
     // the line is forward into the arc
@@ -973,7 +973,7 @@ void calculateFilletCenter(FeaturePtr theFeatureA, FeaturePtr theFeatureB,
 
     // get and filter possible centers
     std::list< std::shared_ptr<GeomAPI_XY> > aSuspectCenters;
-    possibleFilletCenterArcArc(aCenter[0], anArcRadius[0], aCenter[1], 
+    possibleFilletCenterArcArc(aCenter[0], anArcRadius[0], aCenter[1],
                                anArcRadius[1], theRadius, aSuspectCenters);
     double aDot = 0.0;
     std::shared_ptr<GeomAPI_XY> aLineTgPoint, anArcTgPoint;
@@ -1015,8 +1015,8 @@ void getPointOnEdge(const FeaturePtr theFeature,
       aPntEnd = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         theFeature->attribute(SketchPlugin_Line::START_ID()))->pnt();
     }
-    thePoint.reset( 
-      new GeomAPI_Pnt2d(aPntStart->xy()->added( 
+    thePoint.reset(
+      new GeomAPI_Pnt2d(aPntStart->xy()->added(
       aPntEnd->xy()->decreased( aPntStart->xy() )->multiplied(1.0 / 3.0) ) ) );
   } else {
     std::shared_ptr<GeomAPI_Pnt2d> aPntTemp;
@@ -1076,7 +1076,7 @@ std::set<FeaturePtr> getCoincides(const FeaturePtr& theConstraintCoincidence)
 {
   std::set<FeaturePtr> aCoincides;
 
-  std::shared_ptr<GeomAPI_Pnt2d> aFilletPnt = 
+  std::shared_ptr<GeomAPI_Pnt2d> aFilletPnt =
     SketchPlugin_Tools::getCoincidencePoint(theConstraintCoincidence);
 
   SketchPlugin_Tools::findCoincidences(theConstraintCoincidence,
@@ -1106,7 +1106,7 @@ std::set<FeaturePtr> getCoincides(const FeaturePtr& theConstraintCoincidence)
   // If we still have more than two coincides remove auxilary entities from set of coincides.
   if(aCoincides.size() > 2) {
     aNewSetOfCoincides.clear();
-    for(std::set<FeaturePtr>::iterator 
+    for(std::set<FeaturePtr>::iterator
         anIt = aCoincides.begin(); anIt != aCoincides.end(); ++anIt) {
       if(!(*anIt)->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value()) {
         aNewSetOfCoincides.insert(*anIt);
index d965eaff5a3d7d8849ef30b51f9f6f95a8127b8f..d860688dd1d65b8c5a9b17f2a1b638c8c7fe2d07 100644 (file)
@@ -30,7 +30,7 @@ class SketchPlugin_ConstraintFillet : public SketchPlugin_ConstraintBase
    /// \struct Struct to store base edges with states, result edges and constraints.
    struct FilletFeatures {
      /// list of objects the fillet is based and its states
-     std::list<std::pair<FeaturePtr, bool>> baseEdgesState; 
+     std::list<std::pair<FeaturePtr, bool>> baseEdgesState;
      std::list<FeaturePtr> resultEdges; ///< list of result edges
      std::list<FeaturePtr> resultConstraints; ///< list of constraints provided by the fillet
    };
@@ -81,7 +81,7 @@ private:
   std::set<AttributePtr> myNewPoints; ///< set of new points
 
   /// map of point and features for fillet
-  std::map<AttributePtr, FilletFeatures> myPointFeaturesMap; 
+  std::map<AttributePtr, FilletFeatures> myPointFeaturesMap;
   bool myListOfPointsChangedInCode; ///< flag to track that list of points changed in code
   bool myRadiusChangedByUser; ///< flag to track that radius changed by user
   bool myRadiusChangedInCode; ///< flag to track that radius changed in code
index 6b291b643c716b091dde66958d92d1bc0cadf8a4..3d37cf3aedcc2eba7a9b9c32a3cc02c661526036 100644 (file)
@@ -68,11 +68,11 @@ void SketchPlugin_ConstraintLength::execute()
     //  aValueAttr->setValue(aLenght);
     //}
 
-    // the value should to be computed here, not in the getAISObject 
+    // the value should to be computed here, not in the getAISObject
     // in order to change the model value
     // inside the object transaction. This is important for creating a constraint by preselection.
     // The display of the presentation in this case happens after the transaction commit
-    AttributePtr aFlyOutAttribute = 
+    AttributePtr aFlyOutAttribute =
       data()->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT());
     if (!aFlyOutAttribute->isInitialized()) {
       compute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT());
@@ -93,9 +93,9 @@ bool SketchPlugin_ConstraintLength::compute(const std::string& theAttributeId)
   std::shared_ptr<GeomDataAPI_Point2D> aFlyOutAttr = std::dynamic_pointer_cast<
       GeomDataAPI_Point2D>(data()->attribute(theAttributeId));
 
-  std::shared_ptr<GeomAPI_Lin2d> aLine = 
+  std::shared_ptr<GeomAPI_Lin2d> aLine =
     std::shared_ptr<GeomAPI_Lin2d>(new GeomAPI_Lin2d(aStartPoint->pnt(), anEndPoint->pnt()));
-  if (!aFlyOutAttr->isInitialized() || 
+  if (!aFlyOutAttr->isInitialized() ||
       (fabs(aFlyOutAttr->x()) < tolerance && fabs(aFlyOutAttr->y()) < tolerance)) {
     double aDist = aPoint1->distance(aPoint2)/5.;
     std::shared_ptr<GeomAPI_Pnt2d> aFPnt = aLine->shiftedLocation(aDist);
@@ -147,7 +147,7 @@ AISObjectPtr SketchPlugin_ConstraintLength::getAISObject(AISObjectPtr thePreviou
   if (!sketch())
     return thePrevious;
 
-  AISObjectPtr anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this, 
+  AISObjectPtr anAIS = SketcherPrs_Factory::lengthDimensionConstraint(this,
     sketch()->coordinatePlane(), thePrevious);
   return anAIS;
 }
@@ -184,7 +184,7 @@ void SketchPlugin_ConstraintLength::move(double theDeltaX, double theDeltaY)
 }
 
 void SketchPlugin_ConstraintLength::attributeChanged(const std::string& theID) {
-  if (theID == SketchPlugin_Constraint::ENTITY_A()) 
+  if (theID == SketchPlugin_Constraint::ENTITY_A())
   {
     std::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = std::dynamic_pointer_cast<
       ModelAPI_AttributeDouble>(attribute(SketchPlugin_Constraint::VALUE()));
index 797d293e33fdaa597204721252577e5fe07a0d41..b32215efaa53295d1d144ff032299da203a19841 100755 (executable)
@@ -31,7 +31,7 @@ void SketchPlugin_ConstraintMirror::initAttributes()
   data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
   data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefList::typeId());
   data()->addAttribute(SketchPlugin_Constraint::ENTITY_C(), ModelAPI_AttributeRefList::typeId());
-  data()->addAttribute(SketchPlugin_ConstraintMirror::MIRROR_LIST_ID(), 
+  data()->addAttribute(SketchPlugin_ConstraintMirror::MIRROR_LIST_ID(),
                        ModelAPI_AttributeRefList::typeId());
   ModelAPI_Session::get()->validators()->
     registerNotObligatory(getKind(), SketchPlugin_Constraint::ENTITY_B());
@@ -136,7 +136,7 @@ void SketchPlugin_ConstraintMirror::execute()
       if (aMirrorIter != aMirroredList.end())
         break; // the lists are inconsistent
       // There is no mirrored object yet, create it
-      FeaturePtr aNewFeature = 
+      FeaturePtr aNewFeature =
         SketchPlugin_Sketch::addUniqueNamedCopiedFeature(aFeatureIn, sketch(), true);
       aNewFeature->execute();
       ModelAPI_EventCreator::get()->sendUpdated(aNewFeature, aRedisplayEvent);
@@ -211,14 +211,14 @@ void SketchPlugin_ConstraintMirror::erase()
     static Events_ID aRedispEvent = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY);
 
     std::list<ObjectPtr> aTargetList = aRefListOfMirrored->list();
-    for(std::list<ObjectPtr>::const_iterator aTargetIt = 
+    for(std::list<ObjectPtr>::const_iterator aTargetIt =
         aTargetList.cbegin(); aTargetIt != aTargetList.cend(); aTargetIt++) {
       if((*aTargetIt).get()) {
         ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(*aTargetIt);
         if(aRes.get()) {
           FeaturePtr aFeature = aRes->document()->feature(aRes);
           if(aFeature.get()) {
-            AttributeBooleanPtr aBooleanAttr = 
+            AttributeBooleanPtr aBooleanAttr =
               aFeature->boolean(SketchPlugin_SketchEntity::COPY_ID());
             if(aBooleanAttr.get()) {
               if (ModelAPI_Session::get()->isOperation()) // if this is not undo or redo
index 30817fdc9a9141aac4f4a9b2b2dd75f3e90a345d..c03277b093b951420d25da99fa6ebc759428f2d5 100644 (file)
@@ -41,7 +41,7 @@ AISObjectPtr SketchPlugin_ConstraintPerpendicular::getAISObject(AISObjectPtr the
   if (!sketch())
     return thePrevious;
 
-  AISObjectPtr anAIS = SketcherPrs_Factory::perpendicularConstraint(this, 
+  AISObjectPtr anAIS = SketcherPrs_Factory::perpendicularConstraint(this,
     sketch()->coordinatePlane(), thePrevious);
   return anAIS;
 }
index 339fe9af3f754738031057ce02ff8cf641e73f34..d43eeddd99e59d3925477efb035f2782aa9c15cf 100644 (file)
@@ -101,17 +101,17 @@ bool SketchPlugin_ConstraintRadius::compute(const std::string& theAttributeId)
       GeomDataAPI_Point2D>(data()->attribute(theAttributeId));
   // Prepare a circle
   if (aCyrcFeature->getKind() == SketchPlugin_Circle::ID()) { // circle
-    std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr = 
+    std::shared_ptr<GeomDataAPI_Point2D> aCenterAttr =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aCyrcFeature->data()->attribute(SketchPlugin_Circle::CENTER_ID()));
     double aShift = aRadius * 1.1;
     std::shared_ptr<GeomAPI_Pnt2d> aPnt = aCenterAttr->pnt();
-    std::shared_ptr<GeomAPI_Pnt2d> aFPnt = 
+    std::shared_ptr<GeomAPI_Pnt2d> aFPnt =
       std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aPnt->x() + aShift, aPnt->y() + aShift));
     aFlyoutAttr->setValue(aFPnt);
   } else { // arc
     std::shared_ptr<GeomDataAPI_Point2D> aStartAttr = std::dynamic_pointer_cast<
-      GeomDataAPI_Point2D>(aCyrcFeature->data()->attribute(SketchPlugin_Arc::START_ID()));      
+      GeomDataAPI_Point2D>(aCyrcFeature->data()->attribute(SketchPlugin_Arc::START_ID()));
     aFlyoutAttr->setValue(aStartAttr->pnt());
   }
   return true;
@@ -176,7 +176,7 @@ void SketchPlugin_ConstraintRadius::attributeChanged(const std::string& theID) {
   if (theID == SketchPlugin_Constraint::ENTITY_A()) {
     std::shared_ptr<ModelAPI_AttributeDouble> aValueAttr = std::dynamic_pointer_cast<
         ModelAPI_AttributeDouble>(data()->attribute(SketchPlugin_Constraint::VALUE()));
-    if (!aValueAttr->isInitialized()) { 
+    if (!aValueAttr->isInitialized()) {
       // only if it is not initialized, try to compute the current value
       std::shared_ptr<ModelAPI_Feature> aCyrcFeature;
       double aRadius = circleRadius(aCyrcFeature);
index 418c0dd53a523e12590e40f59cc392df7b5b4b1f..ec34ff9e1789082f38e9f24dee5b6d6c8d5fba33 100644 (file)
@@ -42,9 +42,9 @@ AISObjectPtr SketchPlugin_ConstraintRigid::getAISObject(AISObjectPtr thePrevious
   ObjectPtr aObj = anAttr->object();
   if (aObj.get() != NULL) {
     FeaturePtr aFeature = ModelAPI_Feature::feature(aObj);
-    std::shared_ptr<SketchPlugin_Feature> aSkFea = 
+    std::shared_ptr<SketchPlugin_Feature> aSkFea =
       std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
-    if (!aSkFea->isExternal()) 
+    if (!aSkFea->isExternal())
       isValidRigid = true;
   }
 
index 4ac4418410890de78bb75ddba68f0a2d32d3f17a..9ff84a54232f270380c0109a62c09e52b7ae6111 100755 (executable)
@@ -72,9 +72,9 @@ void SketchPlugin_ConstraintSplit::execute()
     setError("Error: Base object is not initialized.");
     return;
   }
-  AttributePoint2DPtr aFirstPointAttrOfSplit = 
+  AttributePoint2DPtr aFirstPointAttrOfSplit =
     getPointOfRefAttr(aData->attribute(SketchPlugin_Constraint::ENTITY_A()));
-  AttributePoint2DPtr aSecondPointAttrOfSplit = 
+  AttributePoint2DPtr aSecondPointAttrOfSplit =
     getPointOfRefAttr(aData->attribute(SketchPlugin_Constraint::ENTITY_B()));
   if (!aFirstPointAttrOfSplit.get() || !aFirstPointAttrOfSplit->isInitialized() ||
       !aSecondPointAttrOfSplit.get() || !aSecondPointAttrOfSplit->isInitialized()) {
@@ -120,7 +120,7 @@ void SketchPlugin_ConstraintSplit::execute()
   std::cout << std::endl;
 
   if (!aCoincidenceToFeature.empty()) {
-    std::cout << "Coincidences to base feature[" << 
+    std::cout << "Coincidences to base feature[" <<
       aCoincidenceToFeature.size() << "]: " << std::endl;
     std::map<FeaturePtr, IdToPointPair>::const_iterator anIt = aCoincidenceToFeature.begin(),
                                                         aLast = aCoincidenceToFeature.end();
@@ -131,7 +131,7 @@ void SketchPlugin_ConstraintSplit::execute()
 
       std::cout << i << "-" << getFeatureInfo(aFeature) << std::endl;
       std::cout <<     " -Attribute to correct:" << anAttributeId << std::endl;
-      std::cout <<     " -Point attribute:" << 
+      std::cout <<     " -Point attribute:" <<
         ModelGeomAlgo_Point2D::getPointAttributeInfo(aPointAttr) << std::endl;
     }
   }
@@ -148,14 +148,14 @@ void SketchPlugin_ConstraintSplit::execute()
 
       std::cout << i << "-" << getFeatureInfo(aFeature) << std::endl;
       std::cout <<     " -Attribute to correct:" << anAttributeId << std::endl;
-      std::cout <<     " -Point attribute:" << 
+      std::cout <<     " -Point attribute:" <<
         ModelGeomAlgo_Point2D::getPointAttributeInfo(aPointAttr) << std::endl;
     }
   }
 
-  std::map<AttributePtr, std::list<AttributePtr> >::const_iterator 
+  std::map<AttributePtr, std::list<AttributePtr> >::const_iterator
     aRefIt = aBaseRefAttributes.begin(), aRefLast = aBaseRefAttributes.end();
-  std::cout << std::endl << "References to attributes of base feature [" << 
+  std::cout << std::endl << "References to attributes of base feature [" <<
     aBaseRefAttributes.size() << "]" << std::endl;
   for (; aRefIt != aRefLast; aRefIt++) {
     AttributePtr aBaseAttr = aRefIt->first;
@@ -171,13 +171,13 @@ void SketchPlugin_ConstraintSplit::execute()
       FeaturePtr aRFeature = ModelAPI_Feature::feature(aRAttr->owner());
       aRefsInfo.append("(" + aRFeature->name() + ") ");
     }
-    std::shared_ptr<GeomDataAPI_Point2D> aPointAttr = 
+    std::shared_ptr<GeomDataAPI_Point2D> aPointAttr =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aBaseAttr);
-    std::cout << aPointAttr->id().c_str() << 
+    std::cout << aPointAttr->id().c_str() <<
       ": " << "[" << aRefAttributes.size() << "] " << aRefsInfo << std::endl;
   }
   std::cout << std::endl;
-  std::cout << std::endl << "References to base feature [" << 
+  std::cout << std::endl << "References to base feature [" <<
     aRefsToFeature.size() << "]" << std::endl;
   std::list<AttributePtr>::const_iterator aRefAttrIt = aRefsToFeature.begin(),
                                           aRefAttrLast = aRefsToFeature.end();
@@ -211,7 +211,7 @@ void SketchPlugin_ConstraintSplit::execute()
              aModifiedAttributes);
   if (aFeatureKind == SketchPlugin_Circle::ID()) {
     FeaturePtr aCircleFeature = aBaseFeature;
-    splitCircle(aSplitFeature, aBaseFeature, anAfterFeature, aFurtherCoincidences, 
+    splitCircle(aSplitFeature, aBaseFeature, anAfterFeature, aFurtherCoincidences,
       aCreatedFeatures, aModifiedAttributes);
 
     updateRefFeatureConstraints(getFeatureResult(aBaseFeature), aRefsToFeature);
@@ -247,7 +247,7 @@ void SketchPlugin_ConstraintSplit::execute()
   }
 
   std::cout << "Modifed attributes (constraints to attributes are moved here):" << std::endl;
-  std::set<std::pair<AttributePtr, AttributePtr> >::const_iterator 
+  std::set<std::pair<AttributePtr, AttributePtr> >::const_iterator
     aPIt = aModifiedAttributes.begin(), aPLast = aModifiedAttributes.end();
   std::string aResInfo;
   for (; aPIt != aPLast; aPIt++) {
@@ -349,14 +349,14 @@ AISObjectPtr SketchPlugin_ConstraintSplit::getAISObject(AISObjectPtr thePrevious
     aPoints.push_back(aStartPoint);
 
     std::shared_ptr<GeomAPI_Pnt2d> aSecondPnt2d = aSecondPointAttrOfSplit->pnt();
-    std::shared_ptr<GeomAPI_Pnt> aSecondPoint = 
+    std::shared_ptr<GeomAPI_Pnt> aSecondPoint =
       sketch()->to3D(aSecondPnt2d->x(), aSecondPnt2d->y());
     aPoints.push_back(aSecondPoint);
 
     std::set<std::shared_ptr<GeomAPI_Shape> > aSplitShapes;
 
     GeomAlgoAPI_ShapeTools::splitShape(aBaseShape, aPoints, aSplitShapes);
-    std::shared_ptr<GeomAPI_Shape> aShape = 
+    std::shared_ptr<GeomAPI_Shape> aShape =
       GeomAlgoAPI_ShapeTools::findShape(aPoints, aSplitShapes);
 
     AISObjectPtr anAIS = thePrevious;
@@ -381,7 +381,7 @@ std::shared_ptr<GeomDataAPI_Point2D> SketchPlugin_ConstraintSplit::getPointOfRef
   AttributePoint2DPtr aPointAttribute;
 
   if (theAttribute->attributeType() == ModelAPI_AttributeRefAttr::typeId()) {
-    AttributeRefAttrPtr aRefAttr = 
+    AttributeRefAttrPtr aRefAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
     if (aRefAttr.get() && aRefAttr->isInitialized()) {
       AttributePtr anAttribute = aRefAttr->attr();
@@ -450,14 +450,14 @@ void SketchPlugin_ConstraintSplit::getConstraints(std::set<FeaturePtr>& theFeatu
     else if (aRefFeatureKind == SketchPlugin_ConstraintTangent::ID()) {
       if (aBaseFeature->getKind() == SketchPlugin_Circle::ID()) /// TEMPORARY limitaion
         /// until tangency between arc and line is implemented
-        theFeaturesToDelete.insert(aRefFeature); 
+        theFeaturesToDelete.insert(aRefFeature);
       else {
         std::string anAttributeToBeModified;
         AttributePoint2DPtr aTangentPoint;
         ObjectPtr aResult1 = aRefFeature->refattr(SketchPlugin_Constraint::ENTITY_A())->object();
         ObjectPtr aResult2 = aRefFeature->refattr(SketchPlugin_Constraint::ENTITY_B())->object();
         if (aResult1.get() && aResult2.get()) {
-          FeaturePtr aCoincidenceFeature = 
+          FeaturePtr aCoincidenceFeature =
             SketchPlugin_ConstraintCoincidence::findCoincidenceFeature
                                                        (ModelAPI_Feature::feature(aResult1),
                                                         ModelAPI_Feature::feature(aResult2));
@@ -483,7 +483,7 @@ void SketchPlugin_ConstraintSplit::getConstraints(std::set<FeaturePtr>& theFeatu
           theTangentFeatures[aRefFeature] = std::make_pair(anAttributeToBeModified, aTangentPoint);
         }
         else /// there is not coincident point between tangent constraint
-          theFeaturesToDelete.insert(aRefFeature); 
+          theFeaturesToDelete.insert(aRefFeature);
       }
     }
     else if (aRefFeatureKind == SketchPlugin_ConstraintCoincidence::ID()) {
@@ -545,11 +545,11 @@ void SketchPlugin_ConstraintSplit::getRefAttributes(const FeaturePtr& theFeature
 {
   theRefs.clear();
 
-  std::list<AttributePtr> aPointAttributes = 
+  std::list<AttributePtr> aPointAttributes =
     theFeature->data()->attributes(GeomDataAPI_Point2D::typeId());
   std::set<AttributePtr> aPointAttributesSet;
 
-  std::list<AttributePtr>::const_iterator aPIt = 
+  std::list<AttributePtr>::const_iterator aPIt =
     aPointAttributes.begin(), aPLast = aPointAttributes.end();
   for (; aPIt != aPLast; aPIt++)
     aPointAttributesSet.insert(*aPIt);
@@ -567,7 +567,7 @@ void SketchPlugin_ConstraintSplit::getRefAttributes(const FeaturePtr& theFeature
       AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(anAttr);
       if (!aRefAttr->isObject()) { /// find attributes referenced to feature point attributes
         AttributePtr anAttrInRef = aRefAttr->attr();
-        if (anAttrInRef.get() && 
+        if (anAttrInRef.get() &&
             aPointAttributesSet.find(anAttrInRef) != aPointAttributesSet.end()) {
           if (theRefs.find(anAttrInRef) != theRefs.end())
             theRefs[anAttrInRef].push_back(aRefAttr);
@@ -667,7 +667,7 @@ void SketchPlugin_ConstraintSplit::updateTangentConstraintsToFeature(
         aFeaturePointAttribute = aFCAttribute;
     }
     if (aFeaturePointAttribute.get()) {
-      FeaturePtr aFeature = 
+      FeaturePtr aFeature =
         std::dynamic_pointer_cast<ModelAPI_Feature>(aFeaturePointAttribute->owner());
       aTangentFeature->refattr(anAttributeId)->setObject(getFeatureResult(aFeature));
     }
@@ -698,13 +698,13 @@ void SketchPlugin_ConstraintSplit::updateRefAttConstraints(
   std::cout << "SketchPlugin_ConstraintSplit::updateRefAttConstraints" << std::endl;
 #endif
 
-  std::set<std::pair<AttributePtr, AttributePtr> >::const_iterator 
+  std::set<std::pair<AttributePtr, AttributePtr> >::const_iterator
     anIt = theModifiedAttributes.begin(),  aLast = theModifiedAttributes.end();
   for (; anIt != aLast; anIt++) {
     AttributePtr anAttribute = anIt->first;
 
     /// not found in references
-    if (theBaseRefAttributes.find(anAttribute) == theBaseRefAttributes.end()) 
+    if (theBaseRefAttributes.find(anAttribute) == theBaseRefAttributes.end())
       continue;
     std::list<AttributePtr> aRefAttributes = theBaseRefAttributes.at(anAttribute);
     std::list<AttributePtr>::const_iterator aRefIt = aRefAttributes.begin(),
@@ -746,9 +746,9 @@ void SketchPlugin_ConstraintSplit::splitLine(FeaturePtr& theSplitFeature,
   if (aFeatureKind != SketchPlugin_Line::ID())
     return;
 
-  AttributePoint2DPtr aFirstPointAttrOfSplit = 
+  AttributePoint2DPtr aFirstPointAttrOfSplit =
     getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_A()));
-  AttributePoint2DPtr aSecondPointAttrOfSplit = 
+  AttributePoint2DPtr aSecondPointAttrOfSplit =
     getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_B()));
   AttributePoint2DPtr aStartPointAttrOfBase, anEndPointAttrOfBase;
   getFeaturePoints(aStartPointAttrOfBase, anEndPointAttrOfBase);
@@ -757,23 +757,23 @@ void SketchPlugin_ConstraintSplit::splitLine(FeaturePtr& theSplitFeature,
     return;
   }
 
-  arrangePointsOnLine(aStartPointAttrOfBase, anEndPointAttrOfBase, 
+  arrangePointsOnLine(aStartPointAttrOfBase, anEndPointAttrOfBase,
                       aFirstPointAttrOfSplit, aSecondPointAttrOfSplit);
 
 #ifdef DEBUG_SPLIT
   std::cout << "Arranged points (to build split between 1st and 2nd points:" << std::endl;
-  std::cout << "Start point: " << 
+  std::cout << "Start point: " <<
     ModelGeomAlgo_Point2D::getPointAttributeInfo(aStartPointAttrOfBase) << std::endl;
-  std::cout << "1st point:   " << 
+  std::cout << "1st point:   " <<
     ModelGeomAlgo_Point2D::getPointAttributeInfo(aFirstPointAttrOfSplit) << std::endl;
-  std::cout << "2nd point:   " << 
+  std::cout << "2nd point:   " <<
     ModelGeomAlgo_Point2D::getPointAttributeInfo(aSecondPointAttrOfSplit) << std::endl;
-  std::cout << "End point:   " << 
+  std::cout << "End point:   " <<
     ModelGeomAlgo_Point2D::getPointAttributeInfo(anEndPointAttrOfBase) << std::endl;
 #endif
 
   /// create a split feature
-  theSplitFeature = 
+  theSplitFeature =
     createLineFeature(aBaseFeature, aFirstPointAttrOfSplit, aSecondPointAttrOfSplit);
   theCreatedFeatures.insert(theSplitFeature);
 
@@ -827,7 +827,7 @@ void SketchPlugin_ConstraintSplit::splitLine(FeaturePtr& theSplitFeature,
   // before split feature
   if (!aStartPointAttrOfBase->pnt()->isEqual(aFirstPointAttrOfSplit->pnt())) {
     /// move end arc point to start of split
-    fillAttribute(theBaseFeatureModified->attribute(SketchPlugin_Line::END_ID()), 
+    fillAttribute(theBaseFeatureModified->attribute(SketchPlugin_Line::END_ID()),
                                                     aFirstPointAttrOfSplit);
     theBaseFeatureModified->execute(); // to update result
     aConstraintFeature = createConstraint(SketchPlugin_ConstraintCoincidence::ID(),
@@ -879,9 +879,9 @@ void SketchPlugin_ConstraintSplit::splitArc(FeaturePtr& theSplitFeature,
   if (aFeatureKind != SketchPlugin_Arc::ID())
     return;
 
-  AttributePoint2DPtr aFirstPointAttrOfSplit = 
+  AttributePoint2DPtr aFirstPointAttrOfSplit =
     getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_A()));
-  AttributePoint2DPtr aSecondPointAttrOfSplit = 
+  AttributePoint2DPtr aSecondPointAttrOfSplit =
     getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_B()));
   AttributePoint2DPtr aStartPointAttrOfBase, anEndPointAttrOfBase;
   getFeaturePoints(aStartPointAttrOfBase, anEndPointAttrOfBase);
@@ -898,13 +898,13 @@ void SketchPlugin_ConstraintSplit::splitArc(FeaturePtr& theSplitFeature,
                      aFirstPointAttrOfSplit, aSecondPointAttrOfSplit);
 #ifdef DEBUG_SPLIT
   std::cout << "Arranged points (to build split between 1st and 2nd points:" << std::endl;
-  std::cout << "Start point: " << 
+  std::cout << "Start point: " <<
     ModelGeomAlgo_Point2D::getPointAttributeInfo(aStartPointAttrOfBase) << std::endl;
-  std::cout << "1st point:   " << 
+  std::cout << "1st point:   " <<
     ModelGeomAlgo_Point2D::getPointAttributeInfo(aFirstPointAttrOfSplit) << std::endl;
-  std::cout << "2nd point:   " << 
+  std::cout << "2nd point:   " <<
     ModelGeomAlgo_Point2D::getPointAttributeInfo(aSecondPointAttrOfSplit) << std::endl;
-  std::cout << "End point:   " << 
+  std::cout << "End point:   " <<
     ModelGeomAlgo_Point2D::getPointAttributeInfo(anEndPointAttrOfBase) << std::endl;
 #endif
 
@@ -1022,19 +1022,19 @@ void SketchPlugin_ConstraintSplit::splitCircle(FeaturePtr& theSplitFeature,
   if (aFeatureKind != SketchPlugin_Circle::ID())
     return;
 
-  AttributePoint2DPtr aFirstPointAttrOfSplit = 
+  AttributePoint2DPtr aFirstPointAttrOfSplit =
     getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_A()));
-  AttributePoint2DPtr aSecondPointAttrOfSplit = 
+  AttributePoint2DPtr aSecondPointAttrOfSplit =
     getPointOfRefAttr(data()->attribute(SketchPlugin_Constraint::ENTITY_B()));
 
   /// split feature
-  theSplitFeature = 
+  theSplitFeature =
     createArcFeature(aBaseFeature, aFirstPointAttrOfSplit, aSecondPointAttrOfSplit);
   bool aSplitReversed = std::dynamic_pointer_cast<SketchPlugin_Arc>(theSplitFeature)->isReversed();
   theCreatedFeatures.insert(theSplitFeature);
 
   /// base feature is a left part of the circle
-  theBaseFeatureModified = createArcFeature(aBaseFeature, 
+  theBaseFeatureModified = createArcFeature(aBaseFeature,
     aFirstPointAttrOfSplit, aSecondPointAttrOfSplit);
   std::dynamic_pointer_cast<SketchPlugin_Arc>(
     theBaseFeatureModified)->setReversed(!aSplitReversed);
@@ -1168,7 +1168,7 @@ FeaturePtr SketchPlugin_ConstraintSplit::createArcFeature(const FeaturePtr& theB
     return aFeature;
 
   aFeature = aSketch->addFeature(SketchPlugin_Arc::ID());
-  // update fillet arc: make the arc correct for sure, so, it is not needed to process 
+  // update fillet arc: make the arc correct for sure, so, it is not needed to process
   // the "attribute updated"
   // by arc; moreover, it may cause cyclicity in hte mechanism of updater
   aFeature->data()->blockSendAttributeUpdated(true);
@@ -1300,7 +1300,7 @@ std::string SketchPlugin_ConstraintSplit::getFeatureInfo(
     std::string aPointsInfo = ModelGeomAlgo_Point2D::getPontAttributesInfo(theFeature,
                                                              getEdgeAttributes(theFeature));
     /// processing of feature with point 2d attributes, like line, arc, circle
-    if (!aPointsInfo.empty()) { 
+    if (!aPointsInfo.empty()) {
       anInfo += ": ";
       anInfo += "\n";
       anInfo += aPointsInfo;
index 1af0db8f7e3d5811be5c0eb78f5d00e2333aa14b..95cb9a9327353fe571958a0627da18e77e48b69a 100755 (executable)
@@ -115,7 +115,7 @@ private:
               std::map<std::shared_ptr<ModelAPI_Feature>, IdToPointPair>& theCoincidenceToPoint*/);
 
   /// Obtains references to feature point attributes and to feature,
-  /// e.g. for feature line: 1st container is 
+  /// e.g. for feature line: 1st container is
   ///             <1st line point, list<entity_a in distance, entity_b in parallel> >
   ///             <2nd line point, list<> >
   ///      for feature circle 2nd container is <entity_a in Radius, entity_b in equal, ...>
@@ -162,7 +162,7 @@ private:
   /// \param theAfterFeature a feature between last point of split feature and the end point
   /// \param thePoints a list of points where coincidences will be build
   /// \param theCreatedFeatures a container of created features
-  /// \param theModifiedAttributes a container of attribute on base 
+  /// \param theModifiedAttributes a container of attribute on base
   /// feature to attribute on new feature
   void splitLine(std::shared_ptr<ModelAPI_Feature>& theSplitFeature,
                  std::shared_ptr<ModelAPI_Feature>& theBeforeFeature,
index a9d232da6a45dba4a93195657ab6a207b62b54cc..e1fb5b510be0d1526ae75f13baea9c0b9836bd82 100644 (file)
@@ -40,7 +40,7 @@ bool SketchPlugin_ExternalValidator::isValid(const AttributePtr& theAttribute,
 bool SketchPlugin_ExternalValidator::isExternalAttribute(const AttributePtr& theAttribute) const
 {
   bool isExternal = false;
-  AttributeRefAttrPtr anAttribute = 
+  AttributeRefAttrPtr anAttribute =
     std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
 
   if (anAttribute.get() != NULL) {
index 4d4eaf07327c06c2c64a9af753218a074cfdeecb..f18f0746f52fe92faf20fb2b7637b755535f5658 100644 (file)
@@ -19,7 +19,7 @@
 class SketchPlugin_ExternalValidator : public ModelAPI_AttributeValidator
 {
 public:
-  /// returns true if the feature of attribute do not contain external features 
+  /// returns true if the feature of attribute do not contain external features
   /// in the given attribute and
   /// among attributes listed in the arguments
   /// \param theAttribute an attribute to check
index 436cc5e7b428110a780758741702818af822ec83..66d11700d08abf747e417b9c4e927c03e1b10352 100644 (file)
@@ -29,7 +29,7 @@ SketchPlugin_Sketch* SketchPlugin_Feature::sketch()
     const std::set<AttributePtr>& aBackRefs = data()->refsToMe();
     std::set<AttributePtr>::const_iterator aBackRef = aBackRefs.begin();
     for(; aBackRef != aBackRefs.end(); aBackRef++) {
-      std::shared_ptr<SketchPlugin_Sketch> aSketch = 
+      std::shared_ptr<SketchPlugin_Sketch> aSketch =
         std::dynamic_pointer_cast<SketchPlugin_Sketch>((*aBackRef)->owner());
       if (aSketch) {
         mySketch = aSketch.get();
index d32b9a4c6cf648632622e61b4a323361fd6b4aa6..a71c02499b3d20b8a3c95fcaab2fdbaed182e4a8 100644 (file)
@@ -58,7 +58,7 @@ void SketchPlugin_IntersectionPoint::computePoint()
   std::shared_ptr<GeomAPI_Edge> anEdge;
   if(aLineAttr && aLineAttr->value() && aLineAttr->value()->isEdge()) {
     anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(aLineAttr->value()));
-  } else if(aLineAttr->context() && aLineAttr->context()->shape() && 
+  } else if(aLineAttr->context() && aLineAttr->context()->shape() &&
             aLineAttr->context()->shape()->isEdge()) {
     anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(aLineAttr->context()->shape()));
   }
@@ -72,7 +72,7 @@ void SketchPlugin_IntersectionPoint::computePoint()
   if (!anIntersection)
     return;
 
-  std::shared_ptr<GeomDataAPI_Point2D> aCoordAttr = 
+  std::shared_ptr<GeomDataAPI_Point2D> aCoordAttr =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(COORD_ID()));
   aCoordAttr->setValue(sketch()->to2D(anIntersection));
 }
index 782f99a2472346eed9e2e785846da018e28853ca..553d1f2e0d29d50acfb5aee37888ce32348b8c33 100644 (file)
@@ -90,9 +90,9 @@ double SketchPlugin_Line::distanceToPoint(const std::shared_ptr<GeomAPI_Pnt2d>&
   double aDelta = 0;
 
   std::shared_ptr<ModelAPI_Data> aData = data();
-  std::shared_ptr<GeomDataAPI_Point2D> aPoint1 = 
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint1 =
     std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(START_ID()));
-  std::shared_ptr<GeomDataAPI_Point2D> aPoint2 = 
+  std::shared_ptr<GeomDataAPI_Point2D> aPoint2 =
     std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(END_ID()));
 
   GeomAPI_Lin2d aLin2d(aPoint1->x(), aPoint1->y(), aPoint2->x(), aPoint2->y());
@@ -132,10 +132,10 @@ void SketchPlugin_Line::attributeChanged(const std::string& theID) {
     // update arguments due to the selection value
     if (aSelection && !aSelection->isNull() && aSelection->isEdge()) {
       std::shared_ptr<GeomAPI_Edge> anEdge( new GeomAPI_Edge(aSelection));
-      std::shared_ptr<GeomDataAPI_Point2D> aStartAttr = 
+      std::shared_ptr<GeomDataAPI_Point2D> aStartAttr =
         std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(START_ID()));
       aStartAttr->setValue(sketch()->to2D(anEdge->firstPoint()));
-      std::shared_ptr<GeomDataAPI_Point2D> anEndAttr = 
+      std::shared_ptr<GeomDataAPI_Point2D> anEndAttr =
         std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(END_ID()));
       anEndAttr->setValue(sketch()->to2D(anEdge->lastPoint()));
       updateLenghtValue();
index f208204bb04af41bf8193d54890b2753fc12c98e..cb9b55d1bbf153d63ab25c573cba6165718f4fdb 100755 (executable)
@@ -114,7 +114,7 @@ void SketchPlugin_MultiRotation::execute()
     if (!(*aUsedIter)) {
       aRefListOfShapes->remove(*anInitIter);
       aRefListOfRotated->remove(*aTargetIter++);
-      for (int i = 0; i < aCurrentNbCopies && aTargetIter != aTargetList.end(); 
+      for (int i = 0; i < aCurrentNbCopies && aTargetIter != aTargetList.end();
            i++, aTargetIter++) {
         aRefListOfRotated->remove(*aTargetIter);
         // remove the corresponding feature from the sketch
@@ -240,7 +240,7 @@ void SketchPlugin_MultiRotation::erase()
         if(aRes.get()) {
           FeaturePtr aFeature = aRes->document()->feature(aRes);
           if(aFeature.get()) {
-            AttributeBooleanPtr aBooleanAttr = 
+            AttributeBooleanPtr aBooleanAttr =
               aFeature->boolean(SketchPlugin_SketchEntity::COPY_ID());
             if(aBooleanAttr.get()) {
               if (ModelAPI_Session::get()->isOperation()) // if this is not undo or redo
@@ -264,7 +264,7 @@ ObjectPtr SketchPlugin_MultiRotation::copyFeature(ObjectPtr theObject)
   if (!aFeature || !aResult)
     return ObjectPtr();
 
-  FeaturePtr aNewFeature = 
+  FeaturePtr aNewFeature =
     SketchPlugin_Sketch::addUniqueNamedCopiedFeature(aFeature, sketch(), true);
   aNewFeature->execute();
 
index b085454355650b662fdb8fa1cbbecd318c28d902..1c4086acd55bf0ed83b5386db663f93d9f16b1a0 100755 (executable)
@@ -71,7 +71,7 @@ void SketchPlugin_MultiTranslation::execute()
   if (!aStart || !aEnd)
     return;
 
-  std::shared_ptr<GeomAPI_XY> 
+  std::shared_ptr<GeomAPI_XY>
     aShiftVec(new GeomAPI_XY(aEnd->x() - aStart->x(), aEnd->y() - aStart->y()));
 
   // Wait all objects being created, then send update events
@@ -113,7 +113,7 @@ void SketchPlugin_MultiTranslation::execute()
     if (!(*aUsedIter)) {
       aRefListOfShapes->remove(*anInitIter);
       aRefListOfTranslated->remove(*aTargetIter++);
-      for (int i = 0; i < aCurrentNbCopies && aTargetIter != aTargetList.end(); 
+      for (int i = 0; i < aCurrentNbCopies && aTargetIter != aTargetList.end();
            i++, aTargetIter++) {
         aRefListOfTranslated->remove(*aTargetIter);
         // remove the corresponding feature from the sketch
@@ -226,7 +226,7 @@ void SketchPlugin_MultiTranslation::erase()
         if(aRes.get()) {
           FeaturePtr aFeature = aRes->document()->feature(aRes);
           if(aFeature.get()) {
-            AttributeBooleanPtr aBooleanAttr = 
+            AttributeBooleanPtr aBooleanAttr =
               aFeature->boolean(SketchPlugin_SketchEntity::COPY_ID());
             if(aBooleanAttr.get()) {
               if (ModelAPI_Session::get()->isOperation()) // if this is not undo or redo
@@ -250,7 +250,7 @@ ObjectPtr SketchPlugin_MultiTranslation::copyFeature(ObjectPtr theObject)
   if (!aFeature || !aResult)
     return ObjectPtr();
 
-  FeaturePtr aNewFeature = 
+  FeaturePtr aNewFeature =
     SketchPlugin_Sketch::addUniqueNamedCopiedFeature(aFeature, sketch(), true);
 
   aNewFeature->execute();
index f446375fa87deef4df5c4da2f272b8542c02f6e9..e69e107b39101fdc42adce4d24f72b63a2ab17d7 100644 (file)
@@ -58,7 +58,7 @@ SketchPlugin_Plugin::SketchPlugin_Plugin()
   SessionPtr aMgr = ModelAPI_Session::get();
   ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
   aFactory->registerValidator("SketchPlugin_DistanceAttr",
-                              new SketchPlugin_DistanceAttrValidator);  
+                              new SketchPlugin_DistanceAttrValidator);
   aFactory->registerValidator("SketchPlugin_ExternalValidator",
                               new SketchPlugin_ExternalValidator);
   aFactory->registerValidator("SketchPlugin_TangentAttr",
@@ -90,20 +90,20 @@ SketchPlugin_Plugin::SketchPlugin_Plugin()
 
   // register this plugin
   ModelAPI_Session::get()->registerPlugin(this);
-  
-  Config_PropManager::registerProp("Visualization", "sketch_entity_color", 
+
+  Config_PropManager::registerProp("Visualization", "sketch_entity_color",
                                    "Sketch entity color",
                                    Config_Prop::Color, SKETCH_ENTITY_COLOR);
 
-  Config_PropManager::registerProp("Visualization", "sketch_external_color", 
+  Config_PropManager::registerProp("Visualization", "sketch_external_color",
                                    "Sketch external entity color",
                                    Config_Prop::Color, SKETCH_EXTERNAL_COLOR);
 
-  Config_PropManager::registerProp("Visualization", "sketch_auxiliary_color", 
+  Config_PropManager::registerProp("Visualization", "sketch_auxiliary_color",
                                    "Sketch auxiliary entity color",
                                    Config_Prop::Color, SKETCH_AUXILIARY_COLOR);
 
-  Config_PropManager::registerProp("Visualization", "sketch_dimension_color", 
+  Config_PropManager::registerProp("Visualization", "sketch_dimension_color",
                                    "Sketch dimension color",
                                    Config_Prop::Color, SKETCH_DIMENSION_COLOR);
 
index 4ee1f89845f46d680a5af1af57728b6f6d549557..94027d674ba042a4e6379b4da8f826f5df96b86f 100644 (file)
@@ -78,7 +78,7 @@ void SketchPlugin_Point::attributeChanged(const std::string& theID) {
     // update arguments due to the selection value
     if (aSelection && !aSelection->isNull() && aSelection->isVertex()) {
       std::shared_ptr<GeomAPI_Vertex> aVertex(new GeomAPI_Vertex(aSelection));
-      std::shared_ptr<GeomDataAPI_Point2D> aCoordAttr = 
+      std::shared_ptr<GeomDataAPI_Point2D> aCoordAttr =
         std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(COORD_ID()));
       aCoordAttr->setValue(sketch()->to2D(aVertex->point()));
     }
index 795cfe4fb896f90ae14c111daf27b04de152648a..a39d90d7c4337a2e1ca4214b8f6c63c4e410172b 100644 (file)
@@ -94,7 +94,7 @@ void SketchPlugin_Projection::computeProjection(const std::string& theID)
   std::shared_ptr<GeomAPI_Edge> anEdge;
   if (aExtFeature && aExtFeature->value() && aExtFeature->value()->isEdge()) {
     anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(aExtFeature->value()));
-  } else if (aExtFeature->context() && aExtFeature->context()->shape() && 
+  } else if (aExtFeature->context() && aExtFeature->context()->shape() &&
              aExtFeature->context()->shape()->isEdge()) {
     anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(aExtFeature->context()->shape()));
   }
@@ -162,7 +162,7 @@ void SketchPlugin_Projection::computeProjection(const std::string& theID)
       aProjection = sketch()->addFeature(SketchPlugin_Circle::ID());
 
     // update attributes of projection
-    std::shared_ptr<GeomDataAPI_Point2D> aCenterPnt = 
+    std::shared_ptr<GeomDataAPI_Point2D> aCenterPnt =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aProjection->attribute(SketchPlugin_Circle::CENTER_ID()));
     aCenterPnt->setValue(aCenterInSketch);
@@ -182,13 +182,13 @@ void SketchPlugin_Projection::computeProjection(const std::string& theID)
       aProjection = sketch()->addFeature(SketchPlugin_Arc::ID());
 
     // update attributes of projection
-    std::shared_ptr<GeomDataAPI_Point2D> aCenterPnt = 
+    std::shared_ptr<GeomDataAPI_Point2D> aCenterPnt =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aProjection->attribute(SketchPlugin_Arc::CENTER_ID()));
-    std::shared_ptr<GeomDataAPI_Point2D> aStartPnt = 
+    std::shared_ptr<GeomDataAPI_Point2D> aStartPnt =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aProjection->attribute(SketchPlugin_Arc::START_ID()));
-    std::shared_ptr<GeomDataAPI_Point2D> aEndPnt = 
+    std::shared_ptr<GeomDataAPI_Point2D> aEndPnt =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aProjection->attribute(SketchPlugin_Arc::END_ID()));
     aStartPnt->setValue(aFirstInSketch);
index 83f974248a3e14bacde8d043a0461dd4bb428c97..ca60111969f1ee5646b8cf1599b42e5353ba0a61 100755 (executable)
@@ -52,7 +52,7 @@ void SketchPlugin_Sketch::initAttributes()
   data()->addAttribute(SketchPlugin_Sketch::NORM_ID(), GeomDataAPI_Dir::typeId());
   data()->addAttribute(SketchPlugin_Sketch::FEATURES_ID(), ModelAPI_AttributeRefList::typeId());
   // the selected face, base for the sketcher plane, not obligatory
-  data()->addAttribute(SketchPlugin_SketchEntity::EXTERNAL_ID(), 
+  data()->addAttribute(SketchPlugin_SketchEntity::EXTERNAL_ID(),
     ModelAPI_AttributeSelection::typeId());
   ModelAPI_Session::get()->validators()->registerNotObligatory(
     getKind(), SketchPlugin_SketchEntity::EXTERNAL_ID());
@@ -149,7 +149,7 @@ void SketchPlugin_Sketch::removeFeature(std::shared_ptr<ModelAPI_Feature> theFea
   if (!data()->isValid()) // sketch is already removed (case on undo of sketch), sync is not needed
     return;
   AttributeRefListPtr aList = reflist(SketchPlugin_Sketch::FEATURES_ID());
-  // if the object is last, remove it from the list 
+  // if the object is last, remove it from the list
   // (needed to skip empty transaction on edit of sketch feature)
   if (aList->object(aList->size(true) - 1, true) == theFeature) {
     aList->remove(theFeature);
@@ -187,7 +187,7 @@ int SketchPlugin_Sketch::subFeatureId(const int theIndex) const
   int aResultIndex = 1; // number of the counted (created) features, started from 1
   int aFeatureIndex = -1; // number of the not-empty features in the list
   for (; anIt != aFeatures.end(); anIt++) {
-    if (anIt->get()) 
+    if (anIt->get())
       aFeatureIndex++;
     if (aFeatureIndex == theIndex)
       break;
@@ -214,7 +214,7 @@ bool SketchPlugin_Sketch::isSub(ObjectPtr theObject) const
 
 void SketchPlugin_Sketch::attributeChanged(const std::string& theID) {
   if (theID == SketchPlugin_SketchEntity::EXTERNAL_ID()) {
-    std::shared_ptr<GeomAPI_Shape> aSelection = 
+    std::shared_ptr<GeomAPI_Shape> aSelection =
       data()->selection(SketchPlugin_SketchEntity::EXTERNAL_ID())->value();
     if (aSelection) { // update arguments due to the selection value
       // update the sketch plane
@@ -232,7 +232,7 @@ void SketchPlugin_Sketch::attributeChanged(const std::string& theID) {
         std::shared_ptr<GeomAPI_Pnt> anOrigPnt(new GeomAPI_Pnt(aCoords));
         // X axis is preferable to be dirX on the sketch
         // here can not be very small value to avoid very close to X normal axis (issue 595)
-        static const double tol = 0.1; 
+        static const double tol = 0.1;
         bool isX = fabs(anA) - 1.0 < tol && fabs(aB) < tol && fabs(aC) < tol;
         std::shared_ptr<GeomAPI_Dir> aTempDir(
           isX ? new GeomAPI_Dir(0, 1, 0) : new GeomAPI_Dir(1, 0, 0));
index 1c4e9b5d22a5191742d9cab150de45f14b4bb4af..2666bb80785685954ac21d29142f1de7197b51b8 100644 (file)
@@ -113,7 +113,7 @@ class SketchPlugin_Sketch : public ModelAPI_CompositeFeature, public GeomAPI_ICu
 
     return std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aSum));
   }
-  
+
   /// Returns the point projected into the sketch plane
   /// \param thePnt a source 3d point
   std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pnt>& thePnt) const
@@ -186,7 +186,7 @@ class SketchPlugin_Sketch : public ModelAPI_CompositeFeature, public GeomAPI_ICu
   SKETCHPLUGIN_EXPORT virtual int numberOfSubs(bool forTree = false) const;
 
   /// Returns the sub-feature by zero-base index
-  SKETCHPLUGIN_EXPORT virtual std::shared_ptr<ModelAPI_Feature> 
+  SKETCHPLUGIN_EXPORT virtual std::shared_ptr<ModelAPI_Feature>
     subFeature(const int theIndex, bool forTree = false);
 
   /// Returns the sub-feature unique identifier in this composite feature by index
@@ -213,7 +213,7 @@ class SketchPlugin_Sketch : public ModelAPI_CompositeFeature, public GeomAPI_ICu
   static void createPoint2DResult(ModelAPI_Feature* theFeature,
                                   SketchPlugin_Sketch* theSketch,
                                   const std::string& theAttributeID, const int theIndex);
-  
+
   /// Add new feature and fill the data of the feature by the data of the parameter feature.
   /// The name of the created feature stays unique.
   /// \param theFeature a source feature
@@ -236,9 +236,9 @@ class SketchPlugin_Sketch : public ModelAPI_CompositeFeature, public GeomAPI_ICu
     // apply the color of the result to the presentation
     if (theDefaultPrs.get())
       isCustomized = theDefaultPrs->customisePresentation(theResult, thePrs, theDefaultPrs);
-    // set the sketch presentation bold    
+    // set the sketch presentation bold
     isCustomized = thePrs->setWidth(2) || isCustomized;
-  
+
     return isCustomized;
   }
 
index 1a37de2cf30c3afc5a1ac79a81f9dbbf02940320..2ec1f2dadb29b9dba1b9345c43ff78a49c04bcaa 100644 (file)
@@ -16,9 +16,9 @@ void SketchPlugin_SketchEntity::initAttributes()
 
   initDerivedClassAttributes();
 
-  AttributePtr anAttr = data()->addAttribute(SketchPlugin_SketchEntity::COPY_ID(), 
+  AttributePtr anAttr = data()->addAttribute(SketchPlugin_SketchEntity::COPY_ID(),
                                              ModelAPI_AttributeBoolean::typeId());
   anAttr->setIsArgument(false);
-  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), 
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
     SketchPlugin_SketchEntity::COPY_ID());
 }
index 6888eef83c1b0ab23af23fd6abf46f3ff1afb80e..dd7c0d36e805552e1c98da47747de8096d396545 100644 (file)
@@ -122,7 +122,7 @@ class SketchPlugin_SketchEntity : public SketchPlugin_Feature, public GeomAPI_IC
     bool isCustomized = theDefaultPrs.get() != NULL &&
                         theDefaultPrs->customisePresentation(theResult, thePrs, theDefaultPrs);
     int aShapeType = thePrs->getShapeType();
-    // a compound is processed like the edge because the 
+    // a compound is processed like the edge because the
     // arc feature uses the compound for presentable AIS
     if (aShapeType != 6/*an edge*/ && aShapeType != 7/*a vertex*/ && aShapeType != 0/*compound*/)
       return false;
index 9b332fc96f9438105c34b847994fecc4628d4ecd..bbe2969817513dd4a31bf352e794950d47a9a247 100644 (file)
@@ -33,17 +33,17 @@ void clearExpressions(AttributePoint2DPtr theAttribute)
 void clearExpressions(AttributePtr theAttribute)
 {
   // Double
-  AttributeDoublePtr anAttributeDouble = 
+  AttributeDoublePtr anAttributeDouble =
       std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(theAttribute);
   if (anAttributeDouble.get())
     clearExpressions(anAttributeDouble);
   // Point
-  AttributePointPtr anAttributePoint = 
+  AttributePointPtr anAttributePoint =
       std::dynamic_pointer_cast<GeomDataAPI_Point>(theAttribute);
   if (anAttributePoint.get())
     clearExpressions(anAttributePoint);
   // Point2D
-  AttributePoint2DPtr anAttributePoint2D = 
+  AttributePoint2DPtr anAttributePoint2D =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(theAttribute);
   if (anAttributePoint2D.get())
     clearExpressions(anAttributePoint2D);
@@ -54,7 +54,7 @@ void clearExpressions(FeaturePtr theFeature)
   if (!theFeature.get())
     return;
 
-  std::list<AttributePtr> anAttributes = theFeature->data()->attributes(std::string());  
+  std::list<AttributePtr> anAttributes = theFeature->data()->attributes(std::string());
   std::list<AttributePtr>::iterator anAttributeIt = anAttributes.begin();
   for (; anAttributeIt != anAttributes.end(); ++anAttributeIt) {
     clearExpressions(*anAttributeIt);
@@ -63,7 +63,7 @@ void clearExpressions(FeaturePtr theFeature)
 
 std::shared_ptr<GeomAPI_Pnt2d> getCoincidencePoint(const FeaturePtr theStartCoin)
 {
-  std::shared_ptr<GeomAPI_Pnt2d> aPnt = SketcherPrs_Tools::getPoint(theStartCoin.get(), 
+  std::shared_ptr<GeomAPI_Pnt2d> aPnt = SketcherPrs_Tools::getPoint(theStartCoin.get(),
                                                           SketchPlugin_Constraint::ENTITY_A());
   if (aPnt.get() == NULL)
     aPnt = SketcherPrs_Tools::getPoint(theStartCoin.get(), SketchPlugin_Constraint::ENTITY_B());
index 32dfbb129670f402fe0cccaa981a84c8fc3d9527..61cf44acf4da5a23b68d655ecf1f81ef74fa91cc 100644 (file)
@@ -14,7 +14,7 @@
 
 namespace SketchPlugin_Tools {
 
-/// Clears text expressions for all attributes of the feature 
+/// Clears text expressions for all attributes of the feature
 void clearExpressions(FeaturePtr theFeature);
 
 /// \return coincidence point
index dc46d01c4c69ce83eab95cc4b5acd885373ea311..98c9ee9fc117dc072497ddc7f11d33dbbd40dcf8 100755 (executable)
@@ -48,7 +48,7 @@
 
 const double tolerance = 1.e-7;
 
-bool SketchPlugin_DistanceAttrValidator::isValid(const AttributePtr& theAttribute, 
+bool SketchPlugin_DistanceAttrValidator::isValid(const AttributePtr& theAttribute,
                                                  const std::list<std::string>& theArguments,
                                                  Events_InfoMessage& theError) const
 {
@@ -72,7 +72,7 @@ bool SketchPlugin_DistanceAttrValidator::isValid(const AttributePtr& theAttribut
     // 1. check whether the references object is a linear
     ObjectPtr anObject = aRefAttr->object();
 
-    const ModelAPI_AttributeValidator* aShapeValidator = 
+    const ModelAPI_AttributeValidator* aShapeValidator =
       dynamic_cast<const ModelAPI_AttributeValidator*>(
       aFactory->validator("GeomValidators_ShapeType"));
     std::list<std::string> anArguments;
@@ -84,7 +84,7 @@ bool SketchPlugin_DistanceAttrValidator::isValid(const AttributePtr& theAttribut
       theError = "Circle can not be used in distance constraint";
       return false;
     }
-      
+
     anArguments.clear();
     anArguments.push_back("line");
     Events_InfoMessage aLineError;
@@ -123,7 +123,7 @@ static bool isCoincident(FeaturePtr theFeature1, FeaturePtr theFeature2)
   for(std::set<AttributePtr>::const_iterator aRefIt = aRefsList.begin();
       aRefIt != aRefsList.end();
       ++aRefIt) {
-    // Find constraint 
+    // Find constraint
     FeaturePtr aRefFeature = std::dynamic_pointer_cast<ModelAPI_Feature>((*aRefIt)->owner());
     if(aRefFeature->getKind() != SketchPlugin_ConstraintCoincidence::ID())
       continue;
@@ -159,7 +159,7 @@ static bool hasCoincidentPoint(FeaturePtr theFeature1, FeaturePtr theFeature2)
   return (isCoincident(theFeature1, theFeature2) && isCoincident(theFeature2, theFeature1));
 }
 
-bool SketchPlugin_TangentAttrValidator::isValid(const AttributePtr& theAttribute, 
+bool SketchPlugin_TangentAttrValidator::isValid(const AttributePtr& theAttribute,
                                                 const std::list<std::string>& theArguments,
                                                 Events_InfoMessage& theError) const
 {
@@ -174,9 +174,9 @@ bool SketchPlugin_TangentAttrValidator::isValid(const AttributePtr& theAttribute
   SessionPtr aMgr = ModelAPI_Session::get();
   ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
 
-  FeaturePtr anAttributeFeature = 
+  FeaturePtr anAttributeFeature =
     std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
-  AttributeRefAttrPtr aRefAttr = 
+  AttributeRefAttrPtr aRefAttr =
     std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
 
   bool isObject = aRefAttr->isObject();
@@ -282,7 +282,7 @@ bool SketchPlugin_NotFixedValidator::isValid(const AttributePtr& theAttribute,
   return true;
 }
 
-bool SketchPlugin_EqualAttrValidator::isValid(const AttributePtr& theAttribute, 
+bool SketchPlugin_EqualAttrValidator::isValid(const AttributePtr& theAttribute,
                                               const std::list<std::string>& theArguments,
                                               Events_InfoMessage& theError) const
 {
@@ -339,7 +339,7 @@ bool SketchPlugin_EqualAttrValidator::isValid(const AttributePtr& theAttribute,
   return true;
 }
 
-bool SketchPlugin_MirrorAttrValidator::isValid(const AttributePtr& theAttribute, 
+bool SketchPlugin_MirrorAttrValidator::isValid(const AttributePtr& theAttribute,
                                                const std::list<std::string>& theArguments,
                                                Events_InfoMessage& theError) const
 {
@@ -370,7 +370,7 @@ bool SketchPlugin_MirrorAttrValidator::isValid(const AttributePtr& theAttribute,
   return true;
 }
 
-bool SketchPlugin_CoincidenceAttrValidator::isValid(const AttributePtr& theAttribute, 
+bool SketchPlugin_CoincidenceAttrValidator::isValid(const AttributePtr& theAttribute,
                                                     const std::list<std::string>& theArguments,
                                                     Events_InfoMessage& theError) const
 {
@@ -393,7 +393,7 @@ bool SketchPlugin_CoincidenceAttrValidator::isValid(const AttributePtr& theAttri
     return false;
   }
 
-  AttributeRefAttrPtr aRefAttrB = 
+  AttributeRefAttrPtr aRefAttrB =
     std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
 
   // first attribute is a point, it may coincide with any object
@@ -435,7 +435,7 @@ bool SketchPlugin_CoincidenceAttrValidator::isValid(const AttributePtr& theAttri
 }
 
 
-bool SketchPlugin_CopyValidator::isValid(const AttributePtr& theAttribute, 
+bool SketchPlugin_CopyValidator::isValid(const AttributePtr& theAttribute,
                                          const std::list<std::string>& theArguments,
                                          Events_InfoMessage& theError) const
 {
@@ -446,7 +446,7 @@ bool SketchPlugin_CopyValidator::isValid(const AttributePtr& theAttribute,
   }
 
   FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
-  AttributeRefListPtr aSelAttr = 
+  AttributeRefListPtr aSelAttr =
     std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(theAttribute);
 
   AttributeRefListPtr aRefListOfInitial = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(
@@ -492,16 +492,16 @@ bool SketchPlugin_SolverErrorValidator::isValid(
   return true;
 }
 
-bool SketchPlugin_SolverErrorValidator::isNotObligatory(std::string theFeature, 
+bool SketchPlugin_SolverErrorValidator::isNotObligatory(std::string theFeature,
                                                         std::string theAttribute)
 {
   return true;
 }
 
-static bool hasSameTangentFeature(const std::set<AttributePtr>& theRefsList, 
+static bool hasSameTangentFeature(const std::set<AttributePtr>& theRefsList,
                                   const FeaturePtr theFeature)
 {
-  for(std::set<AttributePtr>::const_iterator 
+  for(std::set<AttributePtr>::const_iterator
       anIt = theRefsList.cbegin(); anIt != theRefsList.cend(); ++anIt) {
     std::shared_ptr<ModelAPI_Attribute> aAttr = (*anIt);
     FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aAttr->owner());
@@ -543,19 +543,19 @@ bool SketchPlugin_FilletVertexValidator::isValid(const AttributePtr& theAttribut
                                                  const std::list<std::string>& theArguments,
                                                  Events_InfoMessage& theError) const
 {
-  std::shared_ptr<SketchPlugin_ConstraintFillet> aFilletFeature = 
+  std::shared_ptr<SketchPlugin_ConstraintFillet> aFilletFeature =
     std::dynamic_pointer_cast<SketchPlugin_ConstraintFillet>(theAttribute->owner());
-  AttributeRefAttrListPtr aPointsRefList = 
+  AttributeRefAttrListPtr aPointsRefList =
     std::dynamic_pointer_cast<ModelAPI_AttributeRefAttrList>(theAttribute);
   if(aPointsRefList->size() == 0) {
     theError = "Error: List of points is empty.";
     return false;
   }
 
-  std::map<AttributePtr, SketchPlugin_ConstraintFillet::FilletFeatures> aPointsFeaturesMap = 
+  std::map<AttributePtr, SketchPlugin_ConstraintFillet::FilletFeatures> aPointsFeaturesMap =
     aFilletFeature->pointsFeaturesMap();
   std::set<AttributePtr> aSetOfPointsOnResultEdges;
-  for(std::map<AttributePtr, SketchPlugin_ConstraintFillet::FilletFeatures>::iterator 
+  for(std::map<AttributePtr, SketchPlugin_ConstraintFillet::FilletFeatures>::iterator
       aPointsIter = aPointsFeaturesMap.begin();
       aPointsIter != aPointsFeaturesMap.end();
       ++aPointsIter) {
@@ -576,13 +576,13 @@ bool SketchPlugin_FilletVertexValidator::isValid(const AttributePtr& theAttribut
   }
 
   std::list<std::pair<ObjectPtr, AttributePtr>> aPointsList = aPointsRefList->list();
-  for(std::list<std::pair<ObjectPtr, AttributePtr>>::const_iterator 
+  for(std::list<std::pair<ObjectPtr, AttributePtr>>::const_iterator
       aPointsIt = aPointsList.cbegin(); aPointsIt != aPointsList.cend(); aPointsIt++) {
     ObjectPtr anObject = (*aPointsIt).first;
     AttributePtr aPointAttribute = (*aPointsIt).second;
     if (!aPointAttribute.get())
         return false;
-    std::shared_ptr<GeomAPI_Pnt2d> aSelectedPnt = 
+    std::shared_ptr<GeomAPI_Pnt2d> aSelectedPnt =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aPointAttribute)->pnt();
 
     // If we alredy have some result then:
@@ -602,7 +602,7 @@ bool SketchPlugin_FilletVertexValidator::isValid(const AttributePtr& theAttribut
     // Obtain constraint coincidence for the fillet point.
     const std::set<AttributePtr>& aRefsList = aPointAttribute->owner()->data()->refsToMe();
     FeaturePtr aConstraintCoincidence;
-    for(std::set<AttributePtr>::const_iterator anIt = aRefsList.cbegin(); 
+    for(std::set<AttributePtr>::const_iterator anIt = aRefsList.cbegin();
         anIt != aRefsList.cend(); ++anIt) {
       std::shared_ptr<ModelAPI_Attribute> aAttr = (*anIt);
       FeaturePtr aConstrFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aAttr->owner());
@@ -644,7 +644,7 @@ bool SketchPlugin_FilletVertexValidator::isValid(const AttributePtr& theAttribut
 
     // Remove points from set of coincides.
     std::set<FeaturePtr> aNewSetOfCoincides;
-    for(std::set<FeaturePtr>::iterator anIt = aCoinsides.begin(); 
+    for(std::set<FeaturePtr>::iterator anIt = aCoinsides.begin();
         anIt != aCoinsides.end(); ++anIt) {
       if((*anIt)->getKind() != SketchPlugin_Line::ID() &&
          (*anIt)->getKind() != SketchPlugin_Arc::ID()) {
@@ -652,7 +652,7 @@ bool SketchPlugin_FilletVertexValidator::isValid(const AttributePtr& theAttribut
       }
       if((*anIt)->getKind() == SketchPlugin_Arc::ID()) {
         AttributePtr anArcCenter = (*anIt)->attribute(SketchPlugin_Arc::CENTER_ID());
-        std::shared_ptr<GeomAPI_Pnt2d> anArcCenterPnt = 
+        std::shared_ptr<GeomAPI_Pnt2d> anArcCenterPnt =
           std::dynamic_pointer_cast<GeomDataAPI_Point2D>(anArcCenter)->pnt();
         double aDistSelectedArcCenter = aSelectedPnt->distance(anArcCenterPnt);
         if(aDistSelectedArcCenter < tolerance) {
@@ -666,7 +666,7 @@ bool SketchPlugin_FilletVertexValidator::isValid(const AttributePtr& theAttribut
     // If we still have more than two coincides remove auxilary entities from set of coincides.
     if(aCoinsides.size() > 2) {
       aNewSetOfCoincides.clear();
-      for(std::set<FeaturePtr>::iterator anIt = aCoinsides.begin(); 
+      for(std::set<FeaturePtr>::iterator anIt = aCoinsides.begin();
           anIt != aCoinsides.end(); ++anIt) {
         if(!(*anIt)->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID())->value()) {
           aNewSetOfCoincides.insert(*anIt);
@@ -691,7 +691,7 @@ bool SketchPlugin_FilletVertexValidator::isValid(const AttributePtr& theAttribut
     }
 
     std::list<ResultPtr> aFirstResults = aFirstFeature->results();
-    for(std::list<ResultPtr>::iterator aResIt = aFirstResults.begin(); 
+    for(std::list<ResultPtr>::iterator aResIt = aFirstResults.begin();
         aResIt != aFirstResults.end(); ++aResIt) {
       ResultPtr aRes = *aResIt;
       const std::set<AttributePtr>& aResRefsList = aRes->data()->refsToMe();
@@ -702,28 +702,28 @@ bool SketchPlugin_FilletVertexValidator::isValid(const AttributePtr& theAttribut
     }
 
     // Check that lines not collinear
-    if(aFirstFeature->getKind() == SketchPlugin_Line::ID() && 
+    if(aFirstFeature->getKind() == SketchPlugin_Line::ID() &&
         aSecondFeature->getKind() == SketchPlugin_Line::ID()) {
       std::string aStartAttr = SketchPlugin_Line::START_ID();
       std::string anEndAttr = SketchPlugin_Line::END_ID();
       std::shared_ptr<GeomAPI_Pnt2d> aFirstStartPnt, aFirstEndPnt, aSecondStartPnt, aSecondEndPnt;
-      aFirstStartPnt = 
+      aFirstStartPnt =
         std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aFirstFeature->attribute(aStartAttr))->pnt();
-      aFirstEndPnt = 
+      aFirstEndPnt =
         std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aFirstFeature->attribute(anEndAttr))->pnt();
       aSecondStartPnt =
         std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aSecondFeature->attribute(aStartAttr))->pnt();
-      aSecondEndPnt = 
+      aSecondEndPnt =
         std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aSecondFeature->attribute(anEndAttr))->pnt();
-      double aCheck1 = 
-        fabs((aFirstEndPnt->x() - aFirstStartPnt->x()) * 
+      double aCheck1 =
+        fabs((aFirstEndPnt->x() - aFirstStartPnt->x()) *
         (aSecondStartPnt->y() - aFirstStartPnt->y()) -
         (aSecondStartPnt->x() - aFirstStartPnt->x()) * (aFirstEndPnt->y() - aFirstStartPnt->y()));
-      double aCheck2 = 
-        fabs((aFirstEndPnt->x() - aFirstStartPnt->x()) * 
+      double aCheck2 =
+        fabs((aFirstEndPnt->x() - aFirstStartPnt->x()) *
         (aSecondEndPnt->y() - aFirstStartPnt->y()) -
         (aSecondEndPnt->x() - aFirstStartPnt->x()) * (aFirstEndPnt->y() - aFirstStartPnt->y()));
       if(aCheck1 < 1.e-7 && aCheck2 < 1.e-7) {
@@ -735,7 +735,7 @@ bool SketchPlugin_FilletVertexValidator::isValid(const AttributePtr& theAttribut
   return true;
 }
 
-bool SketchPlugin_MiddlePointAttrValidator::isValid(const AttributePtr& theAttribute, 
+bool SketchPlugin_MiddlePointAttrValidator::isValid(const AttributePtr& theAttribute,
                                                     const std::list<std::string>& theArguments,
                                                     Events_InfoMessage& theError) const
 {
@@ -750,7 +750,7 @@ bool SketchPlugin_MiddlePointAttrValidator::isValid(const AttributePtr& theAttri
   SessionPtr aMgr = ModelAPI_Session::get();
   ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
 
-  FeaturePtr anAttributeFeature = 
+  FeaturePtr anAttributeFeature =
     std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
   AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
   AttributeRefAttrPtr anOtherAttr = anAttributeFeature->data()->refattr(aParamA);
@@ -856,7 +856,7 @@ bool SketchPlugin_IntersectionValidator::isValid(const AttributePtr& theAttribut
   std::shared_ptr<GeomAPI_Edge> anEdge;
   if(aLineAttr && aLineAttr->value() && aLineAttr->value()->isEdge()) {
     anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(aLineAttr->value()));
-  } else if(aLineAttr->context() && 
+  } else if(aLineAttr->context() &&
             aLineAttr->context()->shape() && aLineAttr->context()->shape()->isEdge()) {
     anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(aLineAttr->context()->shape()));
   }
@@ -922,7 +922,7 @@ bool SketchPlugin_SplitValidator::isValid(const AttributePtr& theAttribute,
 
     // coincidences to the feature
     std::set<std::shared_ptr<GeomDataAPI_Point2D> > aRefAttributes;
-    ModelGeomAlgo_Point2D::getPointsOfReference(anAttrFeature, 
+    ModelGeomAlgo_Point2D::getPointsOfReference(anAttrFeature,
                         SketchPlugin_ConstraintCoincidence::ID(),
                         aRefAttributes, SketchPlugin_Point::ID(), SketchPlugin_Point::COORD_ID());
 
@@ -930,7 +930,7 @@ bool SketchPlugin_SplitValidator::isValid(const AttributePtr& theAttribute,
     std::shared_ptr<SketchPlugin_Feature> aSFeature =
                                  std::dynamic_pointer_cast<SketchPlugin_Feature>(anAttrFeature);
     SketchPlugin_Sketch* aSketch = aSFeature->sketch();
-    
+
     std::shared_ptr<ModelAPI_Data> aData = aSketch->data();
     std::shared_ptr<GeomDataAPI_Point> aC = std::dynamic_pointer_cast<GeomDataAPI_Point>(
         aData->attribute(SketchPlugin_Sketch::ORIGIN_ID()));
@@ -939,9 +939,9 @@ bool SketchPlugin_SplitValidator::isValid(const AttributePtr& theAttribute,
     std::shared_ptr<GeomDataAPI_Dir> aNorm = std::dynamic_pointer_cast<GeomDataAPI_Dir>(
         aData->attribute(SketchPlugin_Sketch::NORM_ID()));
     std::shared_ptr<GeomAPI_Dir> aDirY(new GeomAPI_Dir(aNorm->dir()->cross(aX->dir())));
-    
+
     std::list<std::shared_ptr<GeomAPI_Pnt> > aPoints;
-    std::map<std::shared_ptr<GeomDataAPI_Point2D>, std::shared_ptr<GeomAPI_Pnt> > 
+    std::map<std::shared_ptr<GeomDataAPI_Point2D>, std::shared_ptr<GeomAPI_Pnt> >
       aPointToAttributes;
     ModelGeomAlgo_Point2D::getPointsInsideShape(anAttrShape, aRefAttributes, aC->pnt(),
                                                 aX->dir(), aDirY, aPoints, aPointToAttributes);
index dd044ca69f870391657ce0692d24f68c14f1eab1..c708e70285107c491d981e6a9a5335c205805bfb 100644 (file)
@@ -68,12 +68,12 @@ static EntityWrapperPtr createArc(FeaturePtr theFeature,
 
 
 static ConstraintWrapperPtr
-  createConstraintCoincidence(ConstraintPtr theConstraint, 
+  createConstraintCoincidence(ConstraintPtr theConstraint,
                               const GroupID& theGroupID,
                               std::shared_ptr<PlaneGCSSolver_PointWrapper> thePoint1,
                               std::shared_ptr<PlaneGCSSolver_PointWrapper> thePoint2);
 static ConstraintWrapperPtr
-  createConstraintPointOnEntity(ConstraintPtr theConstraint, 
+  createConstraintPointOnEntity(ConstraintPtr theConstraint,
                                 const GroupID& theGroupID,
                                 const SketchSolver_ConstraintType& theType,
                                 std::shared_ptr<PlaneGCSSolver_PointWrapper> thePoint,
@@ -334,7 +334,7 @@ std::list<ConstraintWrapperPtr> PlaneGCSSolver_Builder::createMirror(
     if (!aPoint2 && theEntity2->type() == ENTITY_POINT)
       aPoint2 = GCS_POINT_WRAPPER( GCS_ENTITY_WRAPPER(theEntity2)->subEntities().front() );
 
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> aMirrorLine = 
+    std::shared_ptr<PlaneGCSSolver_EntityWrapper> aMirrorLine =
         std::dynamic_pointer_cast<PlaneGCSSolver_EntityWrapper>(theMirrorLine);
     std::shared_ptr<GCS::Line> aLine =
         std::dynamic_pointer_cast<GCS::Line>(aMirrorLine->entity());
@@ -387,7 +387,7 @@ std::list<ConstraintWrapperPtr> PlaneGCSSolver_Builder::createMirror(
     aResult.insert(aResult.end(), aMrrList.begin(), aMrrList.end());
   }
   else if (theEntity1->type() == ENTITY_ARC) {
-    // Do not allow mirrored arc recalculate its position until 
+    // Do not allow mirrored arc recalculate its position until
     // coordinated of all points recalculated
     FeaturePtr aMirrArc = theEntity2->baseFeature();
     aMirrArc->data()->blockSendAttributeUpdated(true);
@@ -404,7 +404,7 @@ std::list<ConstraintWrapperPtr> PlaneGCSSolver_Builder::createMirror(
     aMrrList = createMirror(theConstraint, theGroupID, theSketchID, *anIt1, *anIt2, theMirrorLine);
     aResult.insert(aResult.end(), aMrrList.begin(), aMrrList.end());
 
-    // make symmetric last point of original arc and first point of 
+    // make symmetric last point of original arc and first point of
     // mirrored arc without additional constraint
     ++anIt1;
     --anIt2;
@@ -415,9 +415,9 @@ std::list<ConstraintWrapperPtr> PlaneGCSSolver_Builder::createMirror(
         0.0, EntityWrapperPtr(), EntityWrapperPtr(), theEntity1, theEntity2);
     aResult.insert(aResult.end(), aMrrList.begin(), aMrrList.end());
     // ... and make parametric length of arcs the same
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> anArcEnt1 = 
+    std::shared_ptr<PlaneGCSSolver_EntityWrapper> anArcEnt1 =
         std::dynamic_pointer_cast<PlaneGCSSolver_EntityWrapper>(theEntity1);
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> anArcEnt2 = 
+    std::shared_ptr<PlaneGCSSolver_EntityWrapper> anArcEnt2 =
         std::dynamic_pointer_cast<PlaneGCSSolver_EntityWrapper>(theEntity2);
     std::shared_ptr<GCS::Arc> anArc1 = std::dynamic_pointer_cast<GCS::Arc>(anArcEnt1->entity());
     std::shared_ptr<GCS::Arc> anArc2 = std::dynamic_pointer_cast<GCS::Arc>(anArcEnt2->entity());
@@ -622,7 +622,7 @@ std::shared_ptr<PlaneGCSSolver_ScalarWrapper> createScalar(
     const GroupID& theGroupID,
     AttributeDoublePtr theDoubleAttr)
 {
-  ParameterWrapperPtr aParam = 
+  ParameterWrapperPtr aParam =
     createParameter(theGroupID, theDoubleAttr ? theDoubleAttr->value() : 0.0);
   return std::shared_ptr<PlaneGCSSolver_ScalarWrapper>(
       new PlaneGCSSolver_ScalarWrapper(theDoubleAttr, aParam));
@@ -643,7 +643,7 @@ EntityWrapperPtr createLine(FeaturePtr theFeature,
   std::shared_ptr<PlaneGCSSolver_PointWrapper> aStartEnt, aEndEnt;
   std::list<EntityWrapperPtr>::const_iterator anIt = theAttributes.begin();
   for (; anIt != theAttributes.end(); ++anIt) {
-    std::shared_ptr<PlaneGCSSolver_PointWrapper> aWrapper = 
+    std::shared_ptr<PlaneGCSSolver_PointWrapper> aWrapper =
         std::dynamic_pointer_cast<PlaneGCSSolver_PointWrapper>(*anIt);
     if (!aWrapper)
       continue;
@@ -664,7 +664,7 @@ EntityWrapperPtr createLine(FeaturePtr theFeature,
 
   aNewEntity = EntityWrapperPtr(new PlaneGCSSolver_EntityWrapper(theFeature, aLine));
   // sub-entities should not change their groups, therefore they are added later
-  aNewEntity->setGroup(theGroupID); 
+  aNewEntity->setGroup(theGroupID);
   aNewEntity->setSubEntities(aSubs);
   return aNewEntity;
 }
@@ -702,7 +702,7 @@ EntityWrapperPtr createCircle(FeaturePtr theFeature,
 
   aNewEntity = EntityWrapperPtr(new PlaneGCSSolver_EntityWrapper(theFeature, aCircle));
   // sub-entities should not change their groups, therefore they are added later
-  aNewEntity->setGroup(theGroupID); 
+  aNewEntity->setGroup(theGroupID);
   aNewEntity->setSubEntities(aSubs);
   return aNewEntity;
 }
@@ -723,7 +723,7 @@ EntityWrapperPtr createArc(FeaturePtr theFeature,
   std::shared_ptr<PlaneGCSSolver_PointWrapper> aCenterEnt, aStartEnt, aEndEnt;
   std::list<EntityWrapperPtr>::const_iterator anIt = theAttributes.begin();
   for (; anIt != theAttributes.end(); ++anIt) {
-    std::shared_ptr<PlaneGCSSolver_PointWrapper> aWrapper = 
+    std::shared_ptr<PlaneGCSSolver_PointWrapper> aWrapper =
         std::dynamic_pointer_cast<PlaneGCSSolver_PointWrapper>(*anIt);
     if (!aWrapper)
       continue;
@@ -759,7 +759,7 @@ EntityWrapperPtr createArc(FeaturePtr theFeature,
 
   aNewEntity = EntityWrapperPtr(new PlaneGCSSolver_EntityWrapper(theFeature, anArc));
   // sub-entities should not change their groups, therefore they are added later
-  aNewEntity->setGroup(theGroupID); 
+  aNewEntity->setGroup(theGroupID);
   aNewEntity->setSubEntities(aSubs);
   return aNewEntity;
 }
@@ -797,7 +797,7 @@ ConstraintWrapperPtr createConstraintCoincidence(
 }
 
 ConstraintWrapperPtr createConstraintPointOnEntity(
-    ConstraintPtr theConstraint, 
+    ConstraintPtr theConstraint,
     const GroupID& theGroupID,
     const SketchSolver_ConstraintType& theType,
     std::shared_ptr<PlaneGCSSolver_PointWrapper> thePoint,
@@ -813,7 +813,7 @@ ConstraintWrapperPtr createConstraintPointOnEntity(
     }
   case ENTITY_ARC:
   case ENTITY_CIRCLE: {
-    std::shared_ptr<GCS::Circle> aCirc = 
+    std::shared_ptr<GCS::Circle> aCirc =
       std::dynamic_pointer_cast<GCS::Circle>(theEntity->entity());
     aNewConstr = GCSConstraintPtr(
         new GCS::ConstraintP2PDistance(*(thePoint->point()), aCirc->center, aCirc->rad));
@@ -939,7 +939,7 @@ ConstraintWrapperPtr createConstraintRadius(
     std::shared_ptr<PlaneGCSSolver_ParameterWrapper> theValue,
     std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity)
 {
-  std::shared_ptr<GCS::Circle> aCircle = 
+  std::shared_ptr<GCS::Circle> aCircle =
     std::dynamic_pointer_cast<GCS::Circle>(theEntity->entity());
   GCSConstraintPtr aNewConstr(new GCS::ConstraintEqual(aCircle->rad, theValue->parameter()));
 
@@ -1120,17 +1120,17 @@ ConstraintWrapperPtr createConstraintTangent(
 {
   GCSConstraintPtr aNewConstr;
   if (theType == CONSTRAINT_TANGENT_ARC_LINE || theType == CONSTRAINT_TANGENT_CIRCLE_LINE) {
-    std::shared_ptr<GCS::Circle> aCirc = 
+    std::shared_ptr<GCS::Circle> aCirc =
       std::dynamic_pointer_cast<GCS::Circle>(theEntity1->entity());
-    std::shared_ptr<GCS::Line> aLine = 
+    std::shared_ptr<GCS::Line> aLine =
       std::dynamic_pointer_cast<GCS::Line>(theEntity2->entity());
 
-    aNewConstr = 
+    aNewConstr =
       GCSConstraintPtr(new GCS::ConstraintP2LDistance(aCirc->center, *aLine, aCirc->rad));
   } else {
-    std::shared_ptr<GCS::Circle> aCirc1 = 
+    std::shared_ptr<GCS::Circle> aCirc1 =
       std::dynamic_pointer_cast<GCS::Circle>(theEntity1->entity());
-    std::shared_ptr<GCS::Circle> aCirc2 = 
+    std::shared_ptr<GCS::Circle> aCirc2 =
       std::dynamic_pointer_cast<GCS::Circle>(theEntity2->entity());
 
     double aDX = *(aCirc1->center.x) - *(aCirc2->center.x);
@@ -1174,10 +1174,10 @@ void makeMirrorPoints(EntityWrapperPtr theOriginal,
     (*aMIt)->setValue(aCoord[i]);
 
   // update corresponding attribute
-  AttributePtr anAttr = 
+  AttributePtr anAttr =
     std::dynamic_pointer_cast<PlaneGCSSolver_PointWrapper>(theMirrored)->baseAttribute();
   if (anAttr) {
-    std::shared_ptr<GeomDataAPI_Point2D> aMirroredPnt = 
+    std::shared_ptr<GeomDataAPI_Point2D> aMirroredPnt =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(anAttr);
     aMirroredPnt->setValue(aCoord[0], aCoord[1]);
   }
@@ -1222,7 +1222,7 @@ void adjustMirror(ConstraintWrapperPtr theConstraint)
     makeMirrorPoints(aPoints[0], aPoints[1], aMirrorLine);
 
   // update scales of constraints
-  std::shared_ptr<PlaneGCSSolver_ConstraintWrapper> aGCSConstraint = 
+  std::shared_ptr<PlaneGCSSolver_ConstraintWrapper> aGCSConstraint =
       std::dynamic_pointer_cast<PlaneGCSSolver_ConstraintWrapper>(theConstraint);
   std::list<GCSConstraintPtr>::const_iterator aCIt = aGCSConstraint->constraints().begin();
   for (; aCIt != aGCSConstraint->constraints().end(); ++aCIt)
index 5f59b6a25f8cc4e2288ae303a5d5b1daa5e50e93..ea9042a6fcf3aa7b9d82ea358bd99fefba6832a1 100644 (file)
@@ -40,7 +40,7 @@ public:
   /// \param theGroupID    [in]  group the constraint belongs to
   /// \param theSketchID   [in]  sketch the constraint belongs to
   /// \param theType       [in]  type of constraint
-  /// \param theValue      [in]  numeric characteristic of constraint 
+  /// \param theValue      [in]  numeric characteristic of constraint
   ///                            (e.g. distance or radius) if applicable
   /// \param theEntity1    [in]  first attribute of constraint
   /// \param theEntity2    [in]  second attribute of constraint
@@ -65,9 +65,9 @@ public:
   /// \param theGroupID    [in]  group the constraint belongs to
   /// \param theSketchID   [in]  sketch the constraint belongs to
   /// \param theType       [in]  type of constraint
-  /// \param theValue      [in]  numeric characteristic of constraint (angle for multi-rotation) 
+  /// \param theValue      [in]  numeric characteristic of constraint (angle for multi-rotation)
   ///                            if applicable
-  /// \param theFullValue  [in]  indicates theValue shows full translation delta/rotation 
+  /// \param theFullValue  [in]  indicates theValue shows full translation delta/rotation
   ///                            angle or delta/angle between neighbor entities
   /// \param thePoint1     [in]  center for multi-rotation or start point for multi-translation
   /// \param thePoint2     [in]  end point for multi-translation (empty for multi-rotation)
index 976299a60f3be97160e0d6c30b879675fd83e925..5fb99ddb40d29096543dc133c3c8dfd98ba08037 100644 (file)
@@ -16,7 +16,7 @@
 class PlaneGCSSolver_EntityWrapper : public SketchSolver_IEntityWrapper
 {
 public:
-  PlaneGCSSolver_EntityWrapper(const FeaturePtr theFeature, 
+  PlaneGCSSolver_EntityWrapper(const FeaturePtr theFeature,
                                const GCSCurvePtr theEntity = GCSCurvePtr());
 
   /// \brief Return PlaneGCS geometric entity
index 7522367f6719bd9252e370695ee77e0683eefaf0..9a67936ffbaf2da5e9c7f9ddd6029b0ef631d783 100644 (file)
@@ -91,7 +91,7 @@ SketchSolver_SolveStatus PlaneGCSSolver_Solver::solve()
 
   GCS::VEC_I aRedundantID;
 
-  // Workaround: the system with tangent constraint 
+  // Workaround: the system with tangent constraint
   // may fail if the tangent entities are connected smoothly.
   // Investigate this situation and move constraints to redundant list
   if (aResult == GCS::Failed && !myTangent.empty()) {
@@ -128,7 +128,7 @@ SketchSolver_SolveStatus PlaneGCSSolver_Solver::solve()
           }
       }
     }
-    // The system with tangent constraints may show redundant constraints 
+    // The system with tangent constraints may show redundant constraints
     // if the entities are coupled smoothly.
     // Sometimes tangent constraints are fall to both conflicting and redundant constraints.
     // Need to check if there are redundant constraints without these tangencies.
index b9016cecada3975f59dded241397a8490a94ee20..525af68ad7d8cb704964cedf19dcc34d286ada6f 100644 (file)
@@ -81,13 +81,13 @@ private:
   GCS::VEC_pD                  myParameters;     ///< list of unknowns
 
   /// list of constraints already processed by the system
-  ConstraintMap                myConstraints;    
+  ConstraintMap                myConstraints;
   std::shared_ptr<GCS::System> myEquationSystem; ///< set of equations for solving in FreeGCS
 
   GCS::SET_I                   myConflictingIDs; ///< list of IDs of conflicting constraints
 
   /// specifies the conflicting constraints are already collected
-  bool                         myConfCollected;  
+  bool                         myConfCollected;
 
   /// list of tangent IDs to check incorrect redundant constraints
   GCS::SET_I                   myTangent;
index 586f693cc6ed596c094a243a7aadb8e973d00cc4..90e25c458bec8f27f4699edff712f590852a7aa4 100644 (file)
@@ -391,7 +391,7 @@ void PlaneGCSSolver_Storage::processArc(const EntityWrapperPtr& theArc)
   std::list<EntityWrapperPtr>::const_iterator aSubIt = aSubs.begin();
   while ((*aSubIt)->type() == ENTITY_POINT) // search scalar entities
     ++aSubIt;
-  double* aStartAngle = 
+  double* aStartAngle =
     std::dynamic_pointer_cast<PlaneGCSSolver_ScalarWrapper>(*aSubIt++)->scalar();
   double* aEndAngle =
     std::dynamic_pointer_cast<PlaneGCSSolver_ScalarWrapper>(*aSubIt++)->scalar();
@@ -576,7 +576,7 @@ bool PlaneGCSSolver_Storage::isRedundant(
 
     std::list<std::set<double*> >::iterator aCoincIt, aFound1, aFound2;
     aFound1 = aFound2 = theCoincidentPoints.end();
-    for (aCoincIt = theCoincidentPoints.begin(); 
+    for (aCoincIt = theCoincidentPoints.begin();
          aCoincIt != theCoincidentPoints.end(); ++aCoincIt) {
       if (aFound1 == theCoincidentPoints.end() && aCoincIt->find(aParams[0]) != aCoincIt->end())
         aFound1 = aCoincIt;
@@ -663,7 +663,7 @@ bool isExternalAttribute(const AttributePtr& theAttribute)
 {
   if (!theAttribute)
     return false;
-  std::shared_ptr<SketchPlugin_Feature> aSketchFeature = 
+  std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
       std::dynamic_pointer_cast<SketchPlugin_Feature>(theAttribute->owner());
   return aSketchFeature.get() && aSketchFeature->isExternal();
 }
@@ -676,7 +676,7 @@ void PlaneGCSSolver_Storage::refresh(bool theFixedOnly) const
   std::list<ParameterWrapperPtr> aParams;
   std::list<ParameterWrapperPtr>::const_iterator aParIt;
   for (; anIt != myAttributeMap.end(); ++anIt) {
-    // the external feature always should keep the up to date values, so, 
+    // the external feature always should keep the up to date values, so,
     // refresh from the solver is never needed
     bool isExternal = isExternalAttribute(anIt->first);
 
@@ -784,9 +784,9 @@ EntityWrapperPtr PlaneGCSSolver_Storage::calculateMiddlePoint(
       theX = anArcPoint[0][0] + anArcPoint[2][0];
       theY = anArcPoint[0][1] + anArcPoint[2][1];
     } else {
-      std::shared_ptr<GeomAPI_Dir2d> 
+      std::shared_ptr<GeomAPI_Dir2d>
         aStartDir(new GeomAPI_Dir2d(anArcPoint[1][0], anArcPoint[1][1]));
-      std::shared_ptr<GeomAPI_Dir2d> 
+      std::shared_ptr<GeomAPI_Dir2d>
         aEndDir(new GeomAPI_Dir2d(anArcPoint[2][0], anArcPoint[2][1]));
       double anAngle = aStartDir->angle(aEndDir);
       if (anAngle < 0)
@@ -808,9 +808,9 @@ EntityWrapperPtr PlaneGCSSolver_Storage::calculateMiddlePoint(
   aParameters.push_back(aBuilder->createParameter(myGroupID, aMidPoint->y()));
   // Create entity (parameters are not filled)
   GCSPointPtr aPnt(new GCS::Point);
-  aPnt->x = 
+  aPnt->x =
     std::dynamic_pointer_cast<PlaneGCSSolver_ParameterWrapper>(aParameters.front())->parameter();
-  aPnt->y = 
+  aPnt->y =
     std::dynamic_pointer_cast<PlaneGCSSolver_ParameterWrapper>(aParameters.back())->parameter();
 
   EntityWrapperPtr aResult(new PlaneGCSSolver_PointWrapper(AttributePtr(), aPnt));
index 882cffa12ea619fb3a21fcb7a0e7e77e35eb9980..ccf318aef52130d938a635c43c272a0cbdd61a58 100644 (file)
@@ -119,10 +119,10 @@ private:
 
   /// additional constraints for correct processing of the arcs
   std::map<EntityWrapperPtr, std::vector<GCSConstraintPtr> >
-                                   myArcConstraintMap;   
+                                   myArcConstraintMap;
 
   /// list of removed constraints to notify solver
-  std::list<GCSConstraintPtr>      myRemovedConstraints; 
+  std::list<GCSConstraintPtr>      myRemovedConstraints;
 };
 
 #endif
index 7cb7425fe109ee542547fd97a471a154aa91a572..718ea18cacc6bdb7ccc6d2ef6f50f170faea00ef 100644 (file)
@@ -61,7 +61,7 @@ SolverConstraintPtr SketchSolver_Builder::createConstraint(ConstraintPtr theCons
         ResultConstructionPtr aRC =
             std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aRefAttr->object());
         if (!aRC)
-          Events_InfoMessage("SketchSolver_Builder", 
+          Events_InfoMessage("SketchSolver_Builder",
                              SketchSolver_Error::NEED_OBJECT_NOT_FEATURE(), this).send();
       }
       continue;
@@ -74,7 +74,7 @@ SolverConstraintPtr SketchSolver_Builder::createConstraint(ConstraintPtr theCons
         ResultConstructionPtr aRC =
             std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aListIter);
         if (*aListIter && !aRC)
-          Events_InfoMessage("SketchSolver_Builder", 
+          Events_InfoMessage("SketchSolver_Builder",
             SketchSolver_Error::NEED_OBJECT_NOT_FEATURE(), this).send();
       }
     }
index f7775ea91922ec5fe19f5267968acc335f476239..a2d67beb84f2e47bdde2b39f9596575eba5daa42 100644 (file)
@@ -43,7 +43,7 @@ public:
   /// \param theGroupID    [in]  group the constraint belongs to
   /// \param theSketchID   [in]  sketch the constraint belongs to
   /// \param theType       [in]  type of constraint
-  /// \param theValue      [in]  numeric characteristic of constraint 
+  /// \param theValue      [in]  numeric characteristic of constraint
   /// (e.g. distance or radius) if applicable
   /// \param theEntity1    [in]  first attribute of constraint
   /// \param theEntity2    [in]  second attribute of constraint
@@ -68,9 +68,9 @@ public:
   /// \param theGroupID    [in]  group the constraint belongs to
   /// \param theSketchID   [in]  sketch the constraint belongs to
   /// \param theType       [in]  type of constraint
-  /// \param theValue      [in]  numeric characteristic of constraint (angle for multi-rotation) 
+  /// \param theValue      [in]  numeric characteristic of constraint (angle for multi-rotation)
   ///                            if applicable
-  /// \param theFullValue  [in]  indicates theValue shows full translation delta/rotation angle or 
+  /// \param theFullValue  [in]  indicates theValue shows full translation delta/rotation angle or
   ///  delta/angle between neighbor entities
   /// \param thePoint1     [in]  center for multi-rotation or start point for multi-translation
   /// \param thePoint2     [in]  end point for multi-translation (empty for multi-rotation)
@@ -119,7 +119,7 @@ public:
 
   /// \brief Check if two connected arcs have centers
   ///        in same direction relatively to connection point
-  SKETCHSOLVER_EXPORT virtual bool isArcArcTangencyInternal(EntityWrapperPtr theArc1, 
+  SKETCHSOLVER_EXPORT virtual bool isArcArcTangencyInternal(EntityWrapperPtr theArc1,
     EntityWrapperPtr theArc2) const { return false; }
 };
 
index 13396b8cf43602a9e834f4b986d5808e3d8e5133..bbf00518aa95c1e1f57ec7f12aaa4f7c65e23612 100644 (file)
@@ -258,7 +258,7 @@ bool SketchSolver_Constraint::isUsed(FeaturePtr theFeature) const
     if ((*aCIt)->isUsed(theFeature))
       return true;
 
-  std::list<AttributePtr> anAttrList = 
+  std::list<AttributePtr> anAttrList =
     theFeature->data()->attributes(GeomDataAPI_Point2D::typeId());
   std::list<AttributePtr>::const_iterator anAttrIt = anAttrList.begin();
   for (; anAttrIt != anAttrList.end(); ++ anAttrIt)
index 2b4a30b0d8d01454030d264df40ed9eda6aa3658..69513749c3fb3d5ad24b3e357e45da18438407e8 100644 (file)
@@ -47,7 +47,7 @@ public:
   SKETCHSOLVER_EXPORT virtual void update();
 
   /// \brief Tries to remove constraint
-  /// \return \c false, if current constraint contains another SketchPlugin constraints 
+  /// \return \c false, if current constraint contains another SketchPlugin constraints
   /// (like for multiple coincidence)
   SKETCHSOLVER_EXPORT virtual bool remove();
 
@@ -68,7 +68,7 @@ public:
   virtual bool isUsed(AttributePtr theAttribute) const;
 
   /// \brief Notify constraint, that coincidence appears or removed
-  virtual void notifyCoincidenceChanged(EntityWrapperPtr theCoincAttr1, 
+  virtual void notifyCoincidenceChanged(EntityWrapperPtr theCoincAttr1,
     EntityWrapperPtr theCoincAttr2) { /* implement in derived class */ }
 
   /// \brief Shows error message
@@ -99,7 +99,7 @@ protected:
   ConstraintPtr myBaseConstraint; ///< base SketchPlugin constraint
 
   /// storage, which contains all information about entities and constraints
-  StoragePtr    myStorage; 
+  StoragePtr    myStorage;
   SketchSolver_ConstraintType myType; ///< type of constraint
   std::list<EntityWrapperPtr> myAttributes; ///< attributes of constraint
 
index 6e06053ae0916016f937f7540705dc658ddddad7..5d6187eb41b363b13328a1651f03a3b4c0aaca64 100644 (file)
@@ -22,7 +22,7 @@ public:
   virtual ~SketchSolver_ConstraintCollinear() {}
 
   /// \brief Notify constraint, that coincidence appears or removed
-  virtual void notifyCoincidenceChanged(EntityWrapperPtr theCoincAttr1, 
+  virtual void notifyCoincidenceChanged(EntityWrapperPtr theCoincAttr1,
                                         EntityWrapperPtr theCoincAttr2);
 };
 
index 9448b3c5dbb3b29ca4e6a6687c036a3499c636a3..80a6fb5e359fa266affa436fe6f676d8092a5971 100644 (file)
@@ -40,7 +40,7 @@ private:
   double myPrevValue; ///< previous value of distance (for correct calculation of a distance sign)
 
   /// \c true, if the point if placed rightside of line direction (SLVS_C_PT_LINE_DISTANCE only)
-  bool myIsNegative;  
+  bool myIsNegative;
 };
 
 #endif
index 57f2d50d88c814aecff0c3efd10100b28dfb7a28..fd56f87d910966f4e39cca63f59bfd89584bc189 100644 (file)
@@ -29,7 +29,7 @@ public:
   SketchSolver_ConstraintFixed(FeaturePtr theFeature);
 
   /// \brief Tries to remove constraint
-  /// \return \c false, if current constraint contains another 
+  /// \return \c false, if current constraint contains another
   /// SketchPlugin constraints (like for multiple coincidence)
   virtual bool remove();
 
@@ -40,7 +40,7 @@ protected:
   /// \brief Generate list of attributes of constraint in order useful for constraints
   /// \param[out] theValue      numerical characteristic of constraint (e.g. distance)
   /// \param[out] theAttributes list of attributes to be filled
-  virtual void getAttributes(ParameterWrapperPtr& theValue, 
+  virtual void getAttributes(ParameterWrapperPtr& theValue,
                              std::vector<EntityWrapperPtr>& theAttributes);
 
   /// \brief Fixed feature basing on its type
index 70f6e8295d598525c75625f049388da5f8443388..6bb3e67bfe077c35d53bd53fb7a6980eff6d59e4 100644 (file)
@@ -21,7 +21,7 @@ public:
   SketchSolver_ConstraintFixedArcRadius(FeaturePtr theFeature);
 
   /// \brief Tries to remove constraint
-  /// \return \c false, if current constraint contains another SketchPlugin constraints 
+  /// \return \c false, if current constraint contains another SketchPlugin constraints
   /// (like for multiple coincidence)
   virtual bool remove();
 
index 714fe0cce0623eb8c117486c14cbed9269a09d76..be89bb53d3f2c31f7e36f8853827c91465fbff3f 100644 (file)
@@ -9,7 +9,7 @@ void SketchSolver_ConstraintLength::getAttributes(
     std::vector<EntityWrapperPtr>& theAttributes)
 {
   SketchSolver_Constraint::getAttributes(theValue, theAttributes);
-  if (!myErrorMsg.empty() || !theAttributes[2] || 
+  if (!myErrorMsg.empty() || !theAttributes[2] ||
       theAttributes[2]->type() != ENTITY_LINE) {
     theAttributes.clear();
     return;
index 6ab5400fb09b15808bf7cd94a4b13740083fc578..bc0053b207d9b476aedab7b36f7bbe368f0eb984 100644 (file)
@@ -22,7 +22,7 @@ public:
   virtual ~SketchSolver_ConstraintMiddle() {}
 
   /// \brief Notify constraint, that coincidence appears or removed
-  virtual void notifyCoincidenceChanged(EntityWrapperPtr theCoincAttr1, 
+  virtual void notifyCoincidenceChanged(EntityWrapperPtr theCoincAttr1,
                                         EntityWrapperPtr theCoincAttr2);
 };
 
index 110741c5610c31908cbb3ef58e02be77d460b3d2..916b8d5515d988d4eeca5cd5fc8d713ae96b74af 100644 (file)
@@ -52,7 +52,7 @@ static std::list<EntityWrapperPtr> movedEntities(
     std::list<EntityWrapperPtr> aMovedSubs = movedEntities(
         *anOldIt, theOldStorage, *aNewIt, theNewStorage);
     // check only the points to be moved (because arcs in PlaneGCS have scalar subs too)
-    if ((*anOldIt)->type() == ENTITY_POINT && 
+    if ((*anOldIt)->type() == ENTITY_POINT &&
        (aMovedSubs.size() != 1 || aMovedSubs.front() != *anOldIt))
       isFullyMoved = false;
     aMoved.insert(aMoved.end(), aMovedSubs.begin(), aMovedSubs.end());
index 484b7bb56a0da1a351a7c31992d6f38786cca52c..63211fa4fb6262ec8c0f5462bedb468127c84603 100644 (file)
@@ -29,7 +29,7 @@ public:
   {}
 
   /// \brief Tries to remove constraint
-  /// \return \c false, if current constraint contains another SketchPlugin 
+  /// \return \c false, if current constraint contains another SketchPlugin
   /// constraints (like for multiple coincidence)
   virtual bool remove();
 
@@ -39,9 +39,9 @@ protected:
 
   /// \brief Generate list of attributes of constraint in order useful for SolveSpace constraints
   /// \param[out] theValue        numerical characteristic of constraint (e.g. distance)
-  /// \param[out] theAttributes   list of attributes to be filled 
+  /// \param[out] theAttributes   list of attributes to be filled
   /// (list of moved entities or attributes)
-  virtual void getAttributes(ParameterWrapperPtr& theValue, 
+  virtual void getAttributes(ParameterWrapperPtr& theValue,
                              std::vector<EntityWrapperPtr>& theAttributes);
 
 private:
index bd0a82ad3206962483ae6a6bffa4b5d5fe5b5fa8..dbc5b6c89a9e5307933927e2a1a5325e1dea9780 100644 (file)
@@ -38,7 +38,7 @@ void SketchSolver_ConstraintMulti::getEntities(std::list<EntityWrapperPtr>& theE
   std::list<ObjectPtr> anObjectList = aRefList->list();
   std::list<ObjectPtr>::iterator anObjIt = anObjectList.begin();
   // execute for the feature is not called yet
-  if ((myNumberOfCopies + 1) * myNumberOfObjects != aRefList->size()) 
+  if ((myNumberOfCopies + 1) * myNumberOfObjects != aRefList->size())
     myNumberOfCopies = aRefList->size() / myNumberOfObjects - 1;
 
   while (anObjIt != anObjectList.end()) {
@@ -47,7 +47,7 @@ void SketchSolver_ConstraintMulti::getEntities(std::list<EntityWrapperPtr>& theE
       continue;
 
     // the entity is not created, so it is a copy in "multi" constraint, force its creation
-    if (!myStorage->update(aFeature)) 
+    if (!myStorage->update(aFeature))
       myStorage->update(aFeature, myGroupID, true);
     theEntities.push_back(myStorage->entity(aFeature));
     myFeatures.insert(aFeature);
@@ -79,7 +79,7 @@ void SketchSolver_ConstraintMulti::update(bool isForce)
   AttributeIntegerPtr aNbObjects = myBaseConstraint->integer(nameNbObjects());
   if (!anInitialRefList || !aNbObjects)
     return; // the "Multi" constraint is in queue to remove
-  bool isUpdated = 
+  bool isUpdated =
     anInitialRefList->size() != myNumberOfObjects || aNbObjects->value()-1 != myNumberOfCopies;
   if (!isUpdated) {
     // additional check that the features and their copies are changed
index 820d478218edd8f59389f51dc5f428e354d10b6f..7a9edc96e6a241ac413f109e4e8f401f7b5abb35 100644 (file)
@@ -34,7 +34,7 @@ public:
   void update(bool isForce);
 
   /// \brief Tries to remove constraint
-  /// \return \c false, if current constraint contains another SketchPlugin 
+  /// \return \c false, if current constraint contains another SketchPlugin
   /// constraints (like for multiple coincidence)
   virtual bool remove();
 
@@ -65,7 +65,7 @@ protected:
 
   /// \brief Returns name of NUMBER_OF_COPIES parameter for corresponding feature
   virtual const std::string& nameNbObjects() = 0;
-  
+
 protected:
   /// \brief Convert absolute coordinates to relative coordinates
   virtual void getRelative(double theAbsX, double theAbsY, double& theRelX, double& theRelY) = 0;
@@ -82,7 +82,7 @@ protected:
   bool myAdjusted; ///< the constraint is already adjusted (to not do it several times)
 
   /// list of features and their copies to find whether some of them are disappeared
-  std::set<FeaturePtr> myFeatures; 
+  std::set<FeaturePtr> myFeatures;
 };
 
 #endif
index 524b29a146c0a8637188986f0f1bc710e8e6fced..910bdaf4f4db6894182828111ca9954b712deec1 100644 (file)
@@ -57,7 +57,7 @@ void SketchSolver_ConstraintMultiRotation::process()
   for (; anEntIt != aBaseEntities.end(); ++anEntIt) {
     std::list<ConstraintWrapperPtr> aNewConstraints =
         aBuilder->createConstraint(myBaseConstraint, myGroupID, mySketchID, myType,
-        myAngle, isFullValue, aRotationCenter, EntityWrapperPtr(), 
+        myAngle, isFullValue, aRotationCenter, EntityWrapperPtr(),
         std::list<EntityWrapperPtr>(1, *anEntIt));
     aRotConstraints.insert(aRotConstraints.end(), aNewConstraints.begin(), aNewConstraints.end());
   }
index 32f55074a2d9b528ad8fa9ab9fb8c982cca3d2b5..4f1741e7662916798ecae0c844f21434d02118ed 100644 (file)
@@ -62,7 +62,7 @@ void SketchSolver_ConstraintMultiTranslation::process()
     std::list<ConstraintWrapperPtr> aNewConstraints =
         aBuilder->createConstraint(myBaseConstraint, myGroupID, mySketchID, myType,
         0.0, aFullValue, aStartPoint, aEndPoint, std::list<EntityWrapperPtr>(1, *anEntIt));
-    aTransConstraints.insert(aTransConstraints.end(), 
+    aTransConstraints.insert(aTransConstraints.end(),
                              aNewConstraints.begin(), aNewConstraints.end());
   }
 
@@ -114,7 +114,7 @@ void SketchSolver_ConstraintMultiTranslation::updateLocal()
                                                   aSLast = aConstraintEntities.end();
       EntityWrapperPtr aStartEntity = *aSIt++;
       if (aStartPointChanged) {
-        AttributePtr aStartPointAttr = 
+        AttributePtr aStartPointAttr =
           aData->attribute(SketchPlugin_MultiTranslation::START_POINT_ID());
         myStorage->update(aStartPointAttr);
         aStartEntity = myStorage->entity(aStartPointAttr);
@@ -123,7 +123,7 @@ void SketchSolver_ConstraintMultiTranslation::updateLocal()
 
       EntityWrapperPtr anEndEntity = *aSIt++;
       if (anEndPointChanged) {
-        AttributePtr anEndPointAttr = 
+        AttributePtr anEndPointAttr =
           aData->attribute(SketchPlugin_MultiTranslation::END_POINT_ID());
         myStorage->update(anEndPointAttr);
         anEndEntity = myStorage->entity(anEndPointAttr);
index 1a257a5307ee4a375d0363ba59ba629c272a1f79..690587ae238e72030798244b7912f75e8331932d 100644 (file)
@@ -97,7 +97,7 @@ void SketchSolver_ConstraintTangent::getAttributes(
     return;
   }
 
-  if (myType == CONSTRAINT_TANGENT_ARC_LINE && 
+  if (myType == CONSTRAINT_TANGENT_ARC_LINE &&
       !hasSingleCoincidence(theAttributes[2], theAttributes[3]))
     myErrorMsg = SketchSolver_Error::TANGENCY_FAILED();
 
index 8423eb52e70dc6384304441724219a2045d2b067..64e08004506305ee43ce874c0e7a0bf77bcd832b 100644 (file)
@@ -27,7 +27,7 @@ class SketchSolver_Error
   /// Constraints should use objects instead of features as attributes
   inline static const std::string& NEED_OBJECT_NOT_FEATURE()
   {
-    static const std::string 
+    static const std::string
       MY_ERROR_VALUE("Constraint should be based on object instead of feature");
     return MY_ERROR_VALUE;
   }
@@ -67,11 +67,11 @@ class SketchSolver_Error
     static const std::string MY_ERROR_VALUE("Entity already fixed");
     return MY_ERROR_VALUE;
   }
-  /// Tangency constraint has been built with wrong attributes 
+  /// Tangency constraint has been built with wrong attributes
   /// (for example, line and arc have two coincident points)
   inline static const std::string& TANGENCY_FAILED()
   {
-    static const std::string 
+    static const std::string
       MY_ERROR_VALUE("Unable to create tangency constraint on given attributes");
     return MY_ERROR_VALUE;
   }
index 67e0d6cccf0e80d795d331a98bc07d529159a4db..70f5afbb32dbba2b7c2fa3c19784b98c5dc6f0d1 100644 (file)
@@ -389,12 +389,12 @@ bool SketchSolver_Group::resolveConstraints()
       return false;
     }
     // solution succeeded, store results into correspondent attributes
-    if (aResult == STATUS_OK || aResult == STATUS_EMPTYSET) {  
+    if (aResult == STATUS_OK || aResult == STATUS_EMPTYSET) {
       myStorage->setNeedToResolve(false);
       myStorage->refresh();
       updateMultiConstraints(myConstraints);
       // multi-constraints updated some parameters, need to store them
-      if (myStorage->isNeedToResolve()) 
+      if (myStorage->isNeedToResolve())
         resolveConstraints();
 
       if (myPrevResult != STATUS_OK || myPrevResult == STATUS_UNKNOWN) {
@@ -411,8 +411,8 @@ bool SketchSolver_Group::resolveConstraints()
         // the error message should be changed before sending the message
         getWorkplane()->string(SketchPlugin_Sketch::SOLVER_ERROR())
           ->setValue(SketchSolver_Error::CONSTRAINTS());
-        if (myPrevResult != aResult || 
-            myPrevResult == STATUS_UNKNOWN || 
+        if (myPrevResult != aResult ||
+            myPrevResult == STATUS_UNKNOWN ||
             myPrevResult == STATUS_FAILED) {
           // Obtain list of conflicting constraints
           std::set<ObjectPtr> aConflicting = myStorage->getConflictingConstraints(mySketchSolver);
@@ -489,7 +489,7 @@ void SketchSolver_Group::splitGroup(std::list<SketchSolver_Group*>& theCuts)
   // New storage will be used in trimmed way to store the list of constraint interacted together.
   StoragePtr aNewStorage = SketchSolver_Manager::instance()->builder()->createStorage(getId());
   // empty vector to avoid creation of solver's constraints
-  std::list<ConstraintWrapperPtr> aDummyVec; 
+  std::list<ConstraintWrapperPtr> aDummyVec;
 
   // Obtain constraints, which should be separated
   std::list<ConstraintPtr> anUnusedConstraints;
@@ -501,7 +501,7 @@ void SketchSolver_Group::splitGroup(std::list<SketchSolver_Group*>& theCuts)
       anUnusedConstraints.push_back(aCIter->first);
   }
 
-  // Check the unused constraints once again, 
+  // Check the unused constraints once again,
   // because they may become interacted with new storage since adding constraints
   std::list<ConstraintPtr>::iterator aUnuseIt = anUnusedConstraints.begin();
   while (aUnuseIt != anUnusedConstraints.end()) {
@@ -684,7 +684,7 @@ static double featureToVal(FeaturePtr theFeature)
         aConstraint->attribute(SketchPlugin_Constraint::ENTITY_B()));
     if (anAttrA && anAttrB && (anAttrA->isObject() || anAttrB->isObject()))
       // point-on-line and point-on-circle should go before points coincidence constraint
-      return 2.0; 
+      return 2.0;
     return 2.5;
   }
   if (anID == SketchPlugin_ConstraintDistance::ID() ||
@@ -727,12 +727,12 @@ std::list<FeaturePtr> SketchSolver_Group::
   std::set<ObjectPtr>::const_iterator anObjIter = theObjects.begin();
   for (; anObjIter != theObjects.end(); ++anObjIter) {
     // Operate sketch itself and SketchPlugin features only.
-    // Also, the Fillet and Split need to be skipped, 
+    // Also, the Fillet and Split need to be skipped,
     // because there are several separated constraints composing it.
     FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(*anObjIter);
     if (!aFeature)
       continue;
-    std::shared_ptr<SketchPlugin_Feature> aSketchFeature = 
+    std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
         std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
     if ((aFeature->getKind() != SketchPlugin_Sketch::ID() && !aSketchFeature) ||
         aFeature->getKind() == SketchPlugin_ConstraintFillet::ID() ||
index 9312c6a5a0a43eb5bedfd788fd0c70d4f2f37347..193e1d54182391bfa0aa62f17d57b7b0f4392d73 100644 (file)
@@ -170,14 +170,14 @@ private:
   std::set<SolverConstraintPtr> myTempConstraints; ///< List of temporary constraints
 
   /// List of parametric constraints
-  std::map<AttributePtr, SolverConstraintPtr> myParametricConstraints; 
+  std::map<AttributePtr, SolverConstraintPtr> myParametricConstraints;
 
   StoragePtr myStorage; ///< Container for the set of SolveSpace constraints and their entities
 
   SolverPtr mySketchSolver;  ///< Solver for set of equations obtained by constraints
 
   /// Result of previous solution of the set of constraints
-  SketchSolver_SolveStatus myPrevResult; 
+  SketchSolver_SolveStatus myPrevResult;
   std::set<ObjectPtr>      myConflictingConstraints; ///< List of conflicting constraints
 };
 
index 52499a876506cfe26c6f6aaf612105eb615edfb8..80f1f98ef7349e26fcc46d12c48a5fec78a01b5e 100644 (file)
@@ -116,7 +116,7 @@ void SketchSolver_Manager::processEvent(
   const std::shared_ptr<Events_Message>& theMessage)
 {
   static const Events_ID aSketchPreparedEvent = Events_Loop::eventByName(EVENT_SKETCH_PREPARED);
-  // sketch is prepared for resolve: all the needed events 
+  // sketch is prepared for resolve: all the needed events
   // are collected and must be processed by the solver
   if (theMessage->eventID() == aSketchPreparedEvent) {
     flushGrouped(anUpdateEvent);
@@ -146,7 +146,7 @@ void SketchSolver_Manager::processEvent(
     if (isMovedEvt) {
       std::set<ObjectPtr>::iterator aFeatIter;
       for (aFeatIter = aFeatures.begin(); aFeatIter != aFeatures.end(); aFeatIter++) {
-        std::shared_ptr<SketchPlugin_Feature> aSFeature = 
+        std::shared_ptr<SketchPlugin_Feature> aSFeature =
             std::dynamic_pointer_cast<SketchPlugin_Feature>(*aFeatIter);
         if (aSFeature && moveEntity(aSFeature)) {
           // Want to avoid recalculation of DoF too frequently.
@@ -154,23 +154,23 @@ void SketchSolver_Manager::processEvent(
           hasProperFeature = true;
         }
       }
-      if (!hasProperFeature) 
+      if (!hasProperFeature)
         // in this iteration it will compute nothing, so, no problem with recursion
         // it is important that solver flushes signal updated after processing move signal as there
         // is optimization that relies on this update, might be found by key "optimization"
         myIsComputed = false;
     } else {
-      std::list<FeaturePtr> aSketchFeatures = 
+      std::list<FeaturePtr> aSketchFeatures =
         SketchSolver_Group::selectApplicableFeatures(aFeatures);
       std::list<FeaturePtr>::iterator aFeatIter = aSketchFeatures.begin();
       for (; aFeatIter != aSketchFeatures.end(); ++aFeatIter) {
         if ((*aFeatIter)->getKind() == SketchPlugin_Sketch::ID()) {
-          std::shared_ptr<ModelAPI_CompositeFeature> aSketch = 
+          std::shared_ptr<ModelAPI_CompositeFeature> aSketch =
               std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(*aFeatIter);
           hasProperFeature = changeWorkplane(aSketch) || hasProperFeature;
           continue;
         }
-        std::shared_ptr<SketchPlugin_Feature> aFeature = 
+        std::shared_ptr<SketchPlugin_Feature> aFeature =
             std::dynamic_pointer_cast<SketchPlugin_Feature>(*aFeatIter);
         if (!aFeature)
           continue;
@@ -198,7 +198,7 @@ void SketchSolver_Manager::processEvent(
       std::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(theMessage);
     const std::set<std::string>& aFeatureGroups = aDeleteMsg->groups();
 
-    // Find SketchPlugin_Sketch::ID() in groups. 
+    // Find SketchPlugin_Sketch::ID() in groups.
     // The constraint groups should be updated when an object removed from Sketch
     std::set<std::string>::const_iterator aFGrIter;
     for (aFGrIter = aFeatureGroups.begin(); aFGrIter != aFeatureGroups.end(); aFGrIter++)
@@ -218,7 +218,7 @@ void SketchSolver_Manager::processEvent(
           myGroups.erase(aRemoveIt);
           continue;
         }
-        if (!(*aGroupIter)->isConsistent()) {  
+        if (!(*aGroupIter)->isConsistent()) {
           // some constraints were removed, try to split the group
           (*aGroupIter)->splitGroup(aSeparatedGroups);
           if (!(*aGroupIter)->getWorkplane()->string(
@@ -318,7 +318,7 @@ bool SketchSolver_Manager::changeFeature(std::shared_ptr<SketchPlugin_Feature> t
   std::set<GroupID> aGroups;
   findGroups(theFeature, aGroups);
 
-  std::shared_ptr<SketchPlugin_Constraint> aConstraint = 
+  std::shared_ptr<SketchPlugin_Constraint> aConstraint =
       std::dynamic_pointer_cast<SketchPlugin_Constraint>(theFeature);
 
   // Process the groups list
@@ -346,7 +346,7 @@ bool SketchSolver_Manager::changeFeature(std::shared_ptr<SketchPlugin_Feature> t
           return (*aGroupIter)->updateFeature(theFeature);
         return (*aGroupIter)->changeConstraint(aConstraint);
       }
-  } else if (aGroups.size() > 1) {  
+  } else if (aGroups.size() > 1) {
     // Several groups applicable for this feature => need to merge them
     std::set<GroupID>::const_iterator aGroupsIter = aGroups.begin();
 
@@ -497,7 +497,7 @@ std::shared_ptr<ModelAPI_CompositeFeature> SketchSolver_Manager
 bool SketchSolver_Manager::resolveConstraints(const std::list<SketchSolver_Group*>& theGroups)
 {
   bool needToUpdate = false;
-  const std::list<SketchSolver_Group*>& aGroupsToResolve = theGroups.empty() ? 
+  const std::list<SketchSolver_Group*>& aGroupsToResolve = theGroups.empty() ?
                                                            myGroups : theGroups;
   std::list<SketchSolver_Group*>::const_iterator aGroupIter = aGroupsToResolve.begin();
   for (; aGroupIter != aGroupsToResolve.end(); aGroupIter++)
@@ -508,7 +508,7 @@ bool SketchSolver_Manager::resolveConstraints(const std::list<SketchSolver_Group
 
 
 // Obtain points and their copies for Mirror, Multi-Rotation and Multi-Translation constraints
-static void collectPointsAndCopies(FeaturePtr theConstraint, 
+static void collectPointsAndCopies(FeaturePtr theConstraint,
                                    std::list<std::set<AttributePtr> >& thePoints)
 {
   typedef std::list<std::string> strlist;
@@ -721,7 +721,7 @@ void SketchSolver_Manager::degreesOfFreedom()
         } else {
           aDoF -= 1;
           if (aCoincPoint[0] && aCoincLine) {
-            // if the point is already coincident to a line 
+            // if the point is already coincident to a line
             // (by middle point constraint), do not decrease DoF
             std::map<AttributePtr, std::set<FeaturePtr> >::iterator
                 aPtFound = aPointOnLine.find(aCoincPoint[0]);
@@ -776,7 +776,7 @@ void SketchSolver_Manager::degreesOfFreedom()
             if (isExternal(anAttr))
               continue; // feature is already fixed since it is external
             aDoF -= aDoFDelta[anAttr->getKind()];
-            std::list<AttributePtr> aPtAttrs = 
+            std::list<AttributePtr> aPtAttrs =
               anAttr->data()->attributes(GeomDataAPI_Point2D::typeId());
             aPoints.insert(aPtAttrs.begin(), aPtAttrs.end());
           }
@@ -823,10 +823,10 @@ void SketchSolver_Manager::degreesOfFreedom()
           anAttrName = SketchPlugin_Constraint::ENTITY_B();
         else {
           if (aFeature->getKind() == SketchPlugin_MultiRotation::ID())
-            aNbCopies = 
+            aNbCopies =
             aFeature->integer(SketchPlugin_MultiRotation::NUMBER_OF_OBJECTS_ID())->value() - 1;
           else if (aFeature->getKind() == SketchPlugin_MultiTranslation::ID())
-            aNbCopies = 
+            aNbCopies =
             aFeature->integer(SketchPlugin_MultiTranslation::NUMBER_OF_OBJECTS_ID())->value() - 1;
           anAttrName = SketchPlugin_Constraint::ENTITY_A();
         }
index 5eab8bc9e5d7c02c5d59ca796d684ac465cc6fd8..c1e853603273d070854a9f1d1a98b0460ae796a6 100644 (file)
@@ -94,7 +94,7 @@ protected:
    *  \return \c true, if groups are resolved, and features should be updated 
    *  (send the Update event)
    */
-  bool resolveConstraints(const std::list<SketchSolver_Group*>& theGroups = 
+  bool resolveConstraints(const std::list<SketchSolver_Group*>& theGroups =
     std::list<SketchSolver_Group*>());
 
 private:
index 5af9d5043d6acf6971ab469805409145a3b9a22e..91b36b77cce7671c53841deb1e18d51664de39cb 100644 (file)
@@ -138,7 +138,7 @@ void SketchSolver_Storage::addEntity(FeaturePtr       theFeature,
 void SketchSolver_Storage::addEntity(AttributePtr     theAttribute,
                                      EntityWrapperPtr theSolverEntity)
 {
-  std::map<AttributePtr, EntityWrapperPtr>::const_iterator aFound = 
+  std::map<AttributePtr, EntityWrapperPtr>::const_iterator aFound =
     myAttributeMap.find(theAttribute);
   if (aFound == myAttributeMap.end() || !aFound->second ||
      (theSolverEntity && !aFound->second->isEqual(theSolverEntity)))
@@ -184,7 +184,7 @@ bool SketchSolver_Storage::update(FeaturePtr theFeature, const GroupID& theGroup
   bool isUpdated = false;
   EntityWrapperPtr aRelated = entity(theFeature);
   if (!aRelated) { // Feature is not exist, create it
-    std::shared_ptr<SketchPlugin_Feature> aSketchFeature = 
+    std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
         std::dynamic_pointer_cast<SketchPlugin_Feature>(theFeature);
     bool isCopy = isCopyInMulti(aSketchFeature, myConstraintMap);
     // the feature is a copy in "Multi" constraint and does not used in other constraints
@@ -258,8 +258,8 @@ bool SketchSolver_Storage::update(AttributePtr theAttribute, const GroupID& theG
       if (aFeature->getKind() == SketchPlugin_Arc::ID() &&
           myFeatureMap.find(aFeature) == myFeatureMap.end()) {
         // Additional checking that all attributes are initialized
-        if (aFeature->attribute(SketchPlugin_Arc::CENTER_ID())->isInitialized() && 
-            aFeature->attribute(SketchPlugin_Arc::START_ID())->isInitialized() && 
+        if (aFeature->attribute(SketchPlugin_Arc::CENTER_ID())->isInitialized() &&
+            aFeature->attribute(SketchPlugin_Arc::START_ID())->isInitialized() &&
             aFeature->attribute(SketchPlugin_Arc::END_ID())->isInitialized()) {
           return SketchSolver_Storage::update(aFeature, theGroup, theForce);
         } else {
@@ -271,9 +271,9 @@ bool SketchSolver_Storage::update(AttributePtr theAttribute, const GroupID& theG
     BuilderPtr aBuilder = SketchSolver_Manager::instance()->builder();
     GroupID aGroup = theGroup != GID_UNKNOWN ? theGroup : myGroupID;
     // Check attribute of external features
-    std::shared_ptr<SketchPlugin_Feature> aSketchFeature = 
+    std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
         std::dynamic_pointer_cast<SketchPlugin_Feature>(anAttribute->owner());
-    if (aSketchFeature && (aSketchFeature->isExternal() || 
+    if (aSketchFeature && (aSketchFeature->isExternal() ||
         isCopyInMulti(aSketchFeature, myConstraintMap)))
       aGroup = GID_OUTOFGROUP;
     aRelated = aBuilder->createAttribute(anAttribute, aGroup);
@@ -658,7 +658,7 @@ bool SketchSolver_Storage::removeCoincidence(ConstraintWrapperPtr theConstraint)
   return true;
 }
 
-void SketchSolver_Storage::replaceEntities(const std::map<EntityWrapperPtr, 
+void SketchSolver_Storage::replaceEntities(const std::map<EntityWrapperPtr,
                                            EntityWrapperPtr>& theChange)
 {
   std::set<EntityWrapperPtr> anUpdFeatures;
@@ -700,7 +700,7 @@ bool SketchSolver_Storage::remove(ConstraintWrapperPtr theConstraint)
     if (aBaseFeature)
       isFullyRemoved = SketchSolver_Storage::removeEntity(aBaseFeature) && isFullyRemoved;
     else
-      isFullyRemoved = 
+      isFullyRemoved =
         SketchSolver_Storage::removeEntity((*anIt)->baseAttribute()) && isFullyRemoved;
   }
   return isFullyRemoved;
@@ -758,7 +758,7 @@ bool SketchSolver_Storage::isInteract(const AttributePtr& theAttribute) const
   if (!theAttribute)
     return false;
 
-  AttributeRefListPtr aRefList = 
+  AttributeRefListPtr aRefList =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(theAttribute);
   if (aRefList) {
     std::list<ObjectPtr> anObjects = aRefList->list();
@@ -817,7 +817,7 @@ bool SketchSolver_Storage::isFixed(EntityWrapperPtr theEntity) const
           return true;
     }
 
-  std::map<ConstraintPtr, std::list<ConstraintWrapperPtr> >::const_iterator aCIt = 
+  std::map<ConstraintPtr, std::list<ConstraintWrapperPtr> >::const_iterator aCIt =
     myConstraintMap.begin();
   std::list<ConstraintWrapperPtr>::const_iterator aCWIt;
   for (; aCIt != myConstraintMap.end(); ++aCIt) {
@@ -900,8 +900,8 @@ void SketchSolver_Storage::processArcs()
   for (; aFIt != myFeatureMap.end(); ++aFIt)
     if (!aFIt->second && aFIt->first->getKind() == SketchPlugin_Arc::ID()) {
       // Additional checking the attributes are initialized
-      if (aFIt->first->attribute(SketchPlugin_Arc::CENTER_ID())->isInitialized() && 
-          aFIt->first->attribute(SketchPlugin_Arc::START_ID())->isInitialized() && 
+      if (aFIt->first->attribute(SketchPlugin_Arc::CENTER_ID())->isInitialized() &&
+          aFIt->first->attribute(SketchPlugin_Arc::START_ID())->isInitialized() &&
           aFIt->first->attribute(SketchPlugin_Arc::END_ID())->isInitialized())
         update(aFIt->first);
       else
@@ -988,7 +988,7 @@ void resultToFeatureOrAttribute(const ObjectPtr& theResult,
   // if the feature has several results, we choose which one is referred
   const std::list<ResultPtr>& aResults = aFeature->results();
   if (aResults.size() > 1 && theResult != aFeature->lastResult()) {
-    // actually, the attribute refers to center of arc or circle, 
+    // actually, the attribute refers to center of arc or circle,
     // but not the edge, get correct attributes
     std::string anAttrName;
     if (aFeature->getKind() == SketchPlugin_Arc::ID())
index 6a1b1b2e817354138c24e4c018869c10a66ff6bf..c4dd63ddb7200c0d9a73b108d256dc0d094aed82 100644 (file)
@@ -62,7 +62,7 @@ public:
   /// \param theGroup   [in]  id of the group where the feature should be placed
   /// \param theForce   [in]  forced feature creation
   /// \return \c true if the feature has been created or updated
-  SKETCHSOLVER_EXPORT bool update(FeaturePtr theFeature, 
+  SKETCHSOLVER_EXPORT bool update(FeaturePtr theFeature,
                                   const GroupID& theGroup = GID_UNKNOWN, bool theForce = false);
 
   /// \brief Convert attribute to the form applicable for specific solver and map it
@@ -70,7 +70,7 @@ public:
   /// \param theGroup     [in]  id of the group where the feature should be placed
   /// \param theForce     [in]  forced feature creation
   /// \return \c true if the attribute has been created or updated
-  SKETCHSOLVER_EXPORT bool update(AttributePtr theAttribute, 
+  SKETCHSOLVER_EXPORT bool update(AttributePtr theAttribute,
                                   const GroupID& theGroup = GID_UNKNOWN, bool theForce = false);
 
   /// \brief Returns constraint related to corresponding constraint
@@ -169,7 +169,7 @@ protected:
     void addEntity(FeaturePtr       theFeature,
                    EntityWrapperPtr theSolverEntity);
 
-  /// \brief Change mapping attribute of a feature and the entity 
+  /// \brief Change mapping attribute of a feature and the entity
   /// applicable for corresponding solver.
   /// \param theAttribute    [in]  original attribute
   /// \param theSolverEntity [in]  solver's entity, created outside
@@ -235,7 +235,7 @@ protected:
   std::map<AttributePtr, EntityWrapperPtr>                  myAttributeMap;
 
   /// lists of coincident points (first is a master point, second is a set of slaves)
-  CoincidentPointsMap myCoincidentPoints; 
+  CoincidentPointsMap myCoincidentPoints;
 
   // to be able to update entities from constraints
   friend class SketchSolver_ConstraintDistance;
index 3d0e3884294887e34191af9e143da855621768de..814987bccd9799067e56ad2ecfb405f76b890d18 100644 (file)
@@ -143,7 +143,7 @@ std::list<ConstraintWrapperPtr> SolveSpaceSolver_Builder::createConstraint(
     aSlvsEntities[i] = (Slvs_hEntity)anOriginal[i]->id();
     // entity is not added into a storage, constraint can not be created
     if (aSlvsEntities[i] == SLVS_E_UNKNOWN)
-      return std::list<ConstraintWrapperPtr>(); 
+      return std::list<ConstraintWrapperPtr>();
     aConstrAttrList.push_back(anOriginal[i]);
   }
 
@@ -257,7 +257,7 @@ std::list<ConstraintWrapperPtr> SolveSpaceSolver_Builder::createMirror(
     aResult.insert(aResult.end(), aMrrList.begin(), aMrrList.end());
   }
   else if (theEntity1->type() == ENTITY_ARC) {
-    // Do not allow mirrored arc recalculate its position until 
+    // Do not allow mirrored arc recalculate its position until
     // coordinated of all points recalculated
     FeaturePtr aMirrArc = theEntity2->baseFeature();
     aMirrArc->data()->blockSendAttributeUpdated(true);
@@ -278,7 +278,7 @@ std::list<ConstraintWrapperPtr> SolveSpaceSolver_Builder::createMirror(
     anIt1 = aBaseArcPoints.begin();
     anIt2 = aMirrorArcPoints.begin();
     for (; anIt1 != aBaseArcPoints.end(); ++anIt1, ++anIt2) {
-      aMrrList = 
+      aMrrList =
         createMirror(theConstraint, theGroupID, theSketchID, *anIt1, *anIt2, theMirrorLine);
       aResult.insert(aResult.end(), aMrrList.begin(), aMrrList.end());
     }
@@ -335,12 +335,12 @@ EntityWrapperPtr SolveSpaceSolver_Builder::createFeature(
   else if (aFeatureKind == SketchPlugin_Arc::ID())
     return createArc(theFeature, theAttributes, theGroupID, theSketchID);
   // Point (it has low probability to be an attribute of constraint, so it is checked at the end)
-  else if (aFeatureKind == SketchPlugin_Point::ID() || 
+  else if (aFeatureKind == SketchPlugin_Point::ID() ||
            aFeatureKind == SketchPlugin_IntersectionPoint::ID()) {
     AttributePtr aPoint = theFeature->attribute(SketchPlugin_Point::COORD_ID());
     if (!aPoint->isInitialized())
       return aDummy;
-    EntityWrapperPtr aSub = theAttributes.empty() ? 
+    EntityWrapperPtr aSub = theAttributes.empty() ?
                             createAttribute(aPoint, theGroupID, theSketchID) :
                             theAttributes.front();
     if (!aSub)
@@ -392,9 +392,9 @@ EntityWrapperPtr SolveSpaceSolver_Builder::createAttribute(
     std::shared_ptr<GeomDataAPI_Point2D> aPoint2D =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(theAttribute);
     if (aPoint2D) {
-      aParameters.push_back(createParameter(theGroupID, aPoint2D->x(), 
+      aParameters.push_back(createParameter(theGroupID, aPoint2D->x(),
                             !aPoint2D->textX().empty()));
-      aParameters.push_back(createParameter(theGroupID, aPoint2D->y(), 
+      aParameters.push_back(createParameter(theGroupID, aPoint2D->y(),
                             !aPoint2D->textY().empty()));
       // Create entity (parameters are not filled)
       anEntity = Slvs_MakePoint2d(SLVS_E_UNKNOWN, (Slvs_hGroup)theGroupID,
@@ -404,7 +404,7 @@ EntityWrapperPtr SolveSpaceSolver_Builder::createAttribute(
       AttributeDoublePtr aScalar =
           std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(theAttribute);
       if (aScalar) {
-        aParameters.push_back(createParameter(theGroupID, aScalar->value(), 
+        aParameters.push_back(createParameter(theGroupID, aScalar->value(),
                               !aScalar->text().empty()));
         // Create entity (parameter is not filled)
         anEntity = Slvs_MakeDistance(SLVS_E_UNKNOWN, (Slvs_hGroup)theGroupID,
@@ -473,7 +473,7 @@ EntityWrapperPtr SolveSpaceSolver_Builder::createNormal(
   std::shared_ptr<GeomDataAPI_Dir> aNorm = std::dynamic_pointer_cast<GeomDataAPI_Dir>(theNormal);
   std::shared_ptr<GeomDataAPI_Dir> aDirX = std::dynamic_pointer_cast<GeomDataAPI_Dir>(theDirX);
   if (!aDirX || !aNorm ||
-      (fabs(aDirX->x()) + fabs(aDirX->y()) + fabs(aDirX->z()) < tolerance) || 
+      (fabs(aDirX->x()) + fabs(aDirX->y()) + fabs(aDirX->z()) < tolerance) ||
       !aNorm->isInitialized())
     return EntityWrapperPtr();
   // calculate Y direction
@@ -528,7 +528,7 @@ EntityWrapperPtr createLine(FeaturePtr theFeature,
   EntityWrapperPtr aStartEnt, aEndEnt;
   std::list<EntityWrapperPtr>::const_iterator anIt = theAttributes.begin();
   for (; anIt != theAttributes.end(); ++anIt) {
-    std::shared_ptr<SolveSpaceSolver_EntityWrapper> aSlvsEntity = 
+    std::shared_ptr<SolveSpaceSolver_EntityWrapper> aSlvsEntity =
         std::dynamic_pointer_cast<SolveSpaceSolver_EntityWrapper>(*anIt);
     if (aSlvsEntity->isBase(aStart))
       aStartEnt = aSlvsEntity;
@@ -564,7 +564,7 @@ EntityWrapperPtr createCircle(FeaturePtr theFeature,
   EntityWrapperPtr aCenterEnt, aRadiusEnt, aNormalEnt;
   std::list<EntityWrapperPtr>::const_iterator anIt = theAttributes.begin();
   for (; anIt != theAttributes.end(); ++anIt) {
-    std::shared_ptr<SolveSpaceSolver_EntityWrapper> aSlvsEntity = 
+    std::shared_ptr<SolveSpaceSolver_EntityWrapper> aSlvsEntity =
         std::dynamic_pointer_cast<SolveSpaceSolver_EntityWrapper>(*anIt);
     if (aSlvsEntity->isBase(aCenter))
       aCenterEnt = aSlvsEntity;
@@ -604,7 +604,7 @@ EntityWrapperPtr createArc(FeaturePtr theFeature,
   EntityWrapperPtr aCenterEnt, aStartEnt, aEndEnt, aNormalEnt;
   std::list<EntityWrapperPtr>::const_iterator anIt = theAttributes.begin();
   for (; anIt != theAttributes.end(); ++anIt) {
-    std::shared_ptr<SolveSpaceSolver_EntityWrapper> aSlvsEntity = 
+    std::shared_ptr<SolveSpaceSolver_EntityWrapper> aSlvsEntity =
         std::dynamic_pointer_cast<SolveSpaceSolver_EntityWrapper>(*anIt);
     if (aSlvsEntity->isBase(aCenter))
       aCenterEnt = aSlvsEntity;
@@ -700,7 +700,7 @@ void adjustAngle(ConstraintWrapperPtr theConstraint)
     aConstraint->baseConstraint()->boolean(
         SketchPlugin_ConstraintAngle::ANGLE_REVERSED_SECOND_LINE_ID())->value()
   };
-  std::shared_ptr<GeomAPI_Angle2d> 
+  std::shared_ptr<GeomAPI_Angle2d>
     anAngle(new GeomAPI_Angle2d(aLine[0], isReversed[0], aLine[1], isReversed[1]));
   std::shared_ptr<GeomAPI_Pnt2d> aCenter = anAngle->center();
 
@@ -746,10 +746,10 @@ void makeMirrorPoints(EntityWrapperPtr theOriginal,
     (*aMIt)->setValue(aCoord[i]);
 
   // update corresponding attribute
-  AttributePtr anAttr = 
+  AttributePtr anAttr =
     std::dynamic_pointer_cast<SolveSpaceSolver_EntityWrapper>(theMirrored)->baseAttribute();
   if (anAttr) {
-    std::shared_ptr<GeomDataAPI_Point2D> aMirroredPnt = 
+    std::shared_ptr<GeomDataAPI_Point2D> aMirroredPnt =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(anAttr);
     aMirroredPnt->setValue(aCoord[0], aCoord[1]);
   }
index def1ae81a21fdd33aa508d107c95e43e4fb580a9..b39b7ac91d42ce5fff4049e82969690f2fdafe32 100644 (file)
@@ -38,7 +38,7 @@ public:
   /// \param theGroupID    [in]  group the constraint belongs to
   /// \param theSketchID   [in]  sketch the constraint belongs to
   /// \param theType       [in]  type of constraint
-  /// \param theValue      [in]  numeric characteristic of constraint 
+  /// \param theValue      [in]  numeric characteristic of constraint
   ///                            (e.g. distance or radius) if applicable
   /// \param theEntity1    [in]  first attribute of constraint
   /// \param theEntity2    [in]  second attribute of constraint
@@ -63,9 +63,9 @@ public:
   /// \param theGroupID    [in]  group the constraint belongs to
   /// \param theSketchID   [in]  sketch the constraint belongs to
   /// \param theType       [in]  type of constraint
-  /// \param theValue      [in]  numeric characteristic of constraint 
+  /// \param theValue      [in]  numeric characteristic of constraint
   ///                            (angle for multi-rotation) if applicable
-  /// \param theFullValue  [in]  indicates theValue shows full translation 
+  /// \param theFullValue  [in]  indicates theValue shows full translation
   ///                            delta/rotation angle or delta/angle between neighbor entities
   /// \param thePoint1     [in]  center for multi-rotation or start point for multi-translation
   /// \param thePoint2     [in]  end point for multi-translation (empty for multi-rotation)
index 3ee9d559a75d5fdde2493ecddc5e84908be36fb6..ecc8248d9bd60f650218a996005559ae19924aee 100644 (file)
@@ -55,7 +55,7 @@ bool SolveSpaceSolver_ConstraintWrapper::isUsed(AttributePtr theAttribute) const
 
 bool SolveSpaceSolver_ConstraintWrapper::isEqual(const ConstraintWrapperPtr& theOther)
 {
-  const Slvs_Constraint anOtherConstraint = 
+  const Slvs_Constraint anOtherConstraint =
     std::dynamic_pointer_cast<SolveSpaceSolver_ConstraintWrapper>(theOther)->constraint();
   if (mySlvsConstraint.type != anOtherConstraint.type)
     return false;
index 1f2c7d4513fd3e49e82f2c599a1c9e80b83d4976..be61bcbd72695ede3cab63f83f798721c5c917d1 100644 (file)
@@ -30,7 +30,7 @@ double SolveSpaceSolver_ParameterWrapper::value() const
 
 bool SolveSpaceSolver_ParameterWrapper::isEqual(const ParameterWrapperPtr& theOther)
 {
-  std::shared_ptr<SolveSpaceSolver_ParameterWrapper> anOtherParam = 
+  std::shared_ptr<SolveSpaceSolver_ParameterWrapper> anOtherParam =
       std::dynamic_pointer_cast<SolveSpaceSolver_ParameterWrapper>(theOther);
   return anOtherParam && fabs(value() - anOtherParam->value()) < tolerance;
 }
index b1734a71e605288b299f9452f27d1f974e17e62c..e5537ac112fa7e91c4dc434688e1486fe15ea0ea 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <SketchSolver_ISolver.h>
 
-// Need to be defined before including SolveSpace to avoid additional 
+// Need to be defined before including SolveSpace to avoid additional
 // dependences on Windows platform
 #if defined(WIN32) && !defined(HAVE_C99_INTEGER_TYPES)
 typedef unsigned int UINT32;
index 6cae2a9b7afeefb74ed91ea8c5b64dedc56d5cdf..7f3b04385f7a93da26d45ea9070ce66b84b60b4d 100644 (file)
@@ -36,7 +36,7 @@ static bool IsNotEqual(const Slvs_Param& theParam1, const Slvs_Param& theParam2)
 /// \brief Compare two entities to be different
 static bool IsNotEqual(const Slvs_Entity& theEntity1, const Slvs_Entity& theEntity2);
 /// \brief Compare two constraints to be different
-static bool IsNotEqual(const Slvs_Constraint& theConstraint1, 
+static bool IsNotEqual(const Slvs_Constraint& theConstraint1,
                        const Slvs_Constraint& theConstraint2);
 
 
@@ -123,7 +123,7 @@ bool SolveSpaceSolver_Storage::update(ConstraintWrapperPtr theConstraint)
 bool SolveSpaceSolver_Storage::update(EntityWrapperPtr theEntity)
 {
   bool isUpdated = false;
-  std::shared_ptr<SolveSpaceSolver_EntityWrapper> anEntity = 
+  std::shared_ptr<SolveSpaceSolver_EntityWrapper> anEntity =
       std::dynamic_pointer_cast<SolveSpaceSolver_EntityWrapper>(theEntity);
   Slvs_Entity aSlvsEnt = getEntity((Slvs_hEntity)anEntity->id());
   if (aSlvsEnt.h == SLVS_E_UNKNOWN)
@@ -204,14 +204,14 @@ bool SolveSpaceSolver_Storage::update(EntityWrapperPtr theEntity)
 
 bool SolveSpaceSolver_Storage::update(ParameterWrapperPtr theParameter)
 {
-  std::shared_ptr<SolveSpaceSolver_ParameterWrapper> aParameter = 
+  std::shared_ptr<SolveSpaceSolver_ParameterWrapper> aParameter =
       std::dynamic_pointer_cast<SolveSpaceSolver_ParameterWrapper>(theParameter);
   const Slvs_Param& aParam = getParameter((Slvs_hParam)aParameter->id());
   if (aParam.h != SLVS_E_UNKNOWN && fabs(aParam.val - aParameter->value()) < tolerance)
     return false;
   Slvs_Param aParamToUpd = aParameter->parameter();
   if (aParamToUpd.group == SLVS_G_UNKNOWN)
-    aParamToUpd.group = aParameter->isParametric() ? (Slvs_hGroup)GID_OUTOFGROUP : 
+    aParamToUpd.group = aParameter->isParametric() ? (Slvs_hGroup)GID_OUTOFGROUP :
                                                      (Slvs_hGroup)myGroupID;
   Slvs_hParam anID = updateParameter(aParamToUpd);
   if (aParam.h == SLVS_E_UNKNOWN) // new parameter
@@ -331,9 +331,9 @@ void SolveSpaceSolver_Storage::addCoincidentPoints(
     if (theMaster->id() != theSlave->id())
       removeEntity((Slvs_hEntity)theSlave->id());
 
-    std::shared_ptr<SolveSpaceSolver_EntityWrapper> aPointMaster = 
+    std::shared_ptr<SolveSpaceSolver_EntityWrapper> aPointMaster =
         std::dynamic_pointer_cast<SolveSpaceSolver_EntityWrapper>(theMaster);
-    std::shared_ptr<SolveSpaceSolver_EntityWrapper> aPointSlave = 
+    std::shared_ptr<SolveSpaceSolver_EntityWrapper> aPointSlave =
         std::dynamic_pointer_cast<SolveSpaceSolver_EntityWrapper>(theSlave);
     aPointSlave->changeEntity() = aPointMaster->entity();
     aPointSlave->setParameters(aPointMaster->parameters());
@@ -449,7 +449,7 @@ void SolveSpaceSolver_Storage::replaceInConstraints(
               addSameConstraints(*aCIt2, aWrapper);
               break;
             }
-      } else 
+      } else
         aConstr.h = updateConstraint(aConstr);
       aWrapper->changeConstraint() = aConstr;
 
@@ -559,9 +559,9 @@ EntityWrapperPtr SolveSpaceSolver_Storage::calculateMiddlePoint(
       theX = anArcPoint[0][0] + anArcPoint[2][0];
       theY = anArcPoint[0][1] + anArcPoint[2][1];
     } else {
-      std::shared_ptr<GeomAPI_Dir2d> 
+      std::shared_ptr<GeomAPI_Dir2d>
         aStartDir(new GeomAPI_Dir2d(anArcPoint[1][0], anArcPoint[1][1]));
-      std::shared_ptr<GeomAPI_Dir2d> 
+      std::shared_ptr<GeomAPI_Dir2d>
         aEndDir(new GeomAPI_Dir2d(anArcPoint[2][0], anArcPoint[2][1]));
       double anAngle = aStartDir->angle(aEndDir);
       if (anAngle < 0)
@@ -825,7 +825,7 @@ Slvs_hConstraint SolveSpaceSolver_Storage::updateConstraint(const Slvs_Constrain
       Slvs_Entity aNewLine2 = Slvs_MakeLineSegment(SLVS_E_UNKNOWN, (Slvs_hGroup)myGroupID,
           myWorkplaneID, aLine.point[1], aConstraint.ptA);
       aNewLine2.h = addEntity(aNewLine2);
-      aConstraint = Slvs_MakeConstraint(SLVS_E_UNKNOWN, (Slvs_hGroup)myGroupID, 
+      aConstraint = Slvs_MakeConstraint(SLVS_E_UNKNOWN, (Slvs_hGroup)myGroupID,
           SLVS_C_EQUAL_LENGTH_LINES,
           myWorkplaneID, 0.0, SLVS_E_UNKNOWN, SLVS_E_UNKNOWN, aNewLine1.h, aNewLine2.h);
     }
@@ -959,7 +959,7 @@ bool SolveSpaceSolver_Storage::remove(EntityWrapperPtr theEntity)
     }
   }
 
-  std::shared_ptr<SolveSpaceSolver_EntityWrapper> anEntity = 
+  std::shared_ptr<SolveSpaceSolver_EntityWrapper> anEntity =
         std::dynamic_pointer_cast<SolveSpaceSolver_EntityWrapper>(theEntity);
   bool isFullyRemoved = isCoincide ? true : removeEntity((Slvs_hEntity)anEntity->id());
   return (SketchSolver_Storage::remove(theEntity) || isCoincide) && isFullyRemoved;
@@ -981,10 +981,10 @@ void SolveSpaceSolver_Storage::refresh(bool theFixedOnly) const
   for (; anIt != myAttributeMap.end(); ++anIt) {
     if (!anIt->second)
       continue;
-    // the external feature always should keep the up to date values, so, 
+    // the external feature always should keep the up to date values, so,
     // refresh from the solver is never needed
     if (anIt->first.get()) {
-      std::shared_ptr<SketchPlugin_Feature> aSketchFeature = 
+      std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
         std::dynamic_pointer_cast<SketchPlugin_Feature>(anIt->first->owner());
       if (aSketchFeature.get() && aSketchFeature->isExternal())
         continue;
@@ -1001,7 +1001,7 @@ void SolveSpaceSolver_Storage::refresh(bool theFixedOnly) const
     bool isUpd[3] = {false};
     int i = 0;
     for (aParIt = aParams.begin(); i < 3 && aParIt != aParams.end(); ++aParIt, ++i) {
-      std::shared_ptr<SolveSpaceSolver_ParameterWrapper> aWrapper = 
+      std::shared_ptr<SolveSpaceSolver_ParameterWrapper> aWrapper =
           std::dynamic_pointer_cast<SolveSpaceSolver_ParameterWrapper>(*aParIt);
       if (!theFixedOnly || aWrapper->group() == GID_OUTOFGROUP || aWrapper->isParametric()) {
         aWrapper->changeParameter().val = getParameter((Slvs_hParam)aWrapper->id()).val;
@@ -1022,7 +1022,7 @@ void SolveSpaceSolver_Storage::refresh(bool theFixedOnly) const
         aPoint2D->setValue(aCoords[0], aCoords[1]);
         // Find points coincident with this one (probably not in GID_OUTOFGROUP)
         std::map<AttributePtr, EntityWrapperPtr>::const_iterator aLocIt;
-        if (theFixedOnly) 
+        if (theFixedOnly)
           aLocIt = myAttributeMap.begin();
         else {
           aLocIt = anIt;
@@ -1031,7 +1031,7 @@ void SolveSpaceSolver_Storage::refresh(bool theFixedOnly) const
         for (; aLocIt != myAttributeMap.end(); ++aLocIt) {
           if (!aLocIt->second)
             continue;
-          std::shared_ptr<SketchPlugin_Feature> aSketchFeature = 
+          std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
             std::dynamic_pointer_cast<SketchPlugin_Feature>(aLocIt->first->owner());
           if (aSketchFeature && aSketchFeature->isExternal())
             continue;
@@ -1106,7 +1106,7 @@ void SolveSpaceSolver_Storage::adjustArc(const Slvs_Entity& theArc)
     if (i > 0) {
       anArcPoints[i][0] -= anArcPoints[0][0];
       anArcPoints[i][1] -= anArcPoints[0][1];
-      aDist[i] = sqrt(anArcPoints[i][0] * anArcPoints[i][0] + 
+      aDist[i] = sqrt(anArcPoints[i][0] * anArcPoints[i][0] +
                       anArcPoints[i][1] * anArcPoints[i][1]);
     }
   }
index de15a1cd56c5331e5cbafb7e857754a5151f9d53..38c061446acc88cf69a88400d2c399078042639f 100644 (file)
@@ -159,7 +159,7 @@ private:
   ///
   ///        These constraints may be different and become the same after the substitution
   ///        of point coincidence.
-  void addSameConstraints(ConstraintWrapperPtr theConstraint1, 
+  void addSameConstraints(ConstraintWrapperPtr theConstraint1,
                           ConstraintWrapperPtr theConstraint2);
 
   /// \brief Search constraint equal to the given in terms of SolveSpace notation
@@ -169,20 +169,20 @@ private:
   Slvs_hEntity myWorkplaneID; ///< identifier of workplane
 
   /// current parameter index (may differs with the number of parameters)
-  Slvs_hParam myParamMaxID; 
+  Slvs_hParam myParamMaxID;
 
   /// list of parameters used in the current group of constraints (sorted by the identifier)
-  std::vector<Slvs_Param> myParameters; 
+  std::vector<Slvs_Param> myParameters;
   Slvs_hEntity myEntityMaxID; ///< current entity index (may differs with the number of entities)
 
   /// list of entities used in the current group of constraints (sorted by the identifier)
-  std::vector<Slvs_Entity> myEntities; 
+  std::vector<Slvs_Entity> myEntities;
 
   /// current constraint index (may differs with the number of constraints)
-  Slvs_hConstraint myConstrMaxID; 
+  Slvs_hConstraint myConstrMaxID;
 
   /// list of constraints used in the current group (sorted by the identifier)
-  std::vector<Slvs_Constraint> myConstraints; 
+  std::vector<Slvs_Constraint> myConstraints;
 
   bool myDuplicatedConstraint; ///< shows the storage has same constraint twice
 
index 0427ff1f46651d05764e97a8b3a0e7f9824ab54e..4376f773ff39720b91e527883dd3d49ebf360fcb 100644 (file)
@@ -34,7 +34,7 @@
 IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Angle, AIS_AngleDimension);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Angle, AIS_AngleDimension);
 
-SketcherPrs_Angle::SketcherPrs_Angle(ModelAPI_Feature* theConstraint, 
+SketcherPrs_Angle::SketcherPrs_Angle(ModelAPI_Feature* theConstraint,
                                      const std::shared_ptr<GeomAPI_Ax3>& thePlane)
 : AIS_AngleDimension(gp_Pnt(0,0,0), gp_Pnt(1,0,0), gp_Pnt(0,1,0)), myConstraint(theConstraint),
   mySketcherPlane(thePlane),
@@ -48,7 +48,7 @@ SketcherPrs_Angle::SketcherPrs_Angle(ModelAPI_Feature* theConstraint,
   myAspect->MakeUnitsDisplayed(false);
   myAspect->TextAspect()->SetHeight(SketcherPrs_Tools::getDefaultTextHeight());
   myAspect->ArrowAspect()->SetLength(SketcherPrs_Tools::getArrowSize());
-  
+
   SetDimensionAspect(myAspect);
 
   myStyleListener = new SketcherPrs_DimensionStyleListener();
@@ -76,7 +76,7 @@ bool SketcherPrs_Angle::readyToDisplay(ModelAPI_Feature* theConstraint,
   DataPtr aData = theConstraint->data();
 
   // Flyout point
-  std::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr = 
+  std::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr =
     std::dynamic_pointer_cast<GeomDataAPI_Point2D>
     (aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
   if (!aFlyoutAttr->isInitialized())
@@ -90,9 +90,9 @@ bool SketcherPrs_Angle::readyToDisplay(ModelAPI_Feature* theConstraint,
   if (!anAttr2->isInitialized())
     return aReadyToDisplay;
 
-  FeaturePtr aLineA = 
+  FeaturePtr aLineA =
     SketcherPrs_Tools::getFeatureLine(aData, SketchPlugin_Constraint::ENTITY_A());
-  FeaturePtr aLineB = 
+  FeaturePtr aLineB =
     SketcherPrs_Tools::getFeatureLine(aData, SketchPlugin_Constraint::ENTITY_B());
 
   if (!aLineA.get() || !aLineB.get())
@@ -117,10 +117,10 @@ bool SketcherPrs_Angle::readyToDisplay(ModelAPI_Feature* theConstraint,
         aStartA->pnt(), aEndA->pnt(), aStartB->pnt(), aEndB->pnt()));
   else {
     std::shared_ptr<GeomAPI_Lin2d> aLine1(new GeomAPI_Lin2d(aStartA->pnt(), aEndA->pnt()));
-    bool isReversed1 = 
+    bool isReversed1 =
       aData->boolean(SketchPlugin_ConstraintAngle::ANGLE_REVERSED_FIRST_LINE_ID())->value();
     std::shared_ptr<GeomAPI_Lin2d> aLine2(new GeomAPI_Lin2d(aStartB->pnt(), aEndB->pnt()));
-    bool isReversed2 = 
+    bool isReversed2 =
       aData->boolean(SketchPlugin_ConstraintAngle::ANGLE_REVERSED_SECOND_LINE_ID())->value();
     anAng = std::shared_ptr<GeomAPI_Angle2d>(
       new GeomAPI_Angle2d(aLine1, isReversed1, aLine2, isReversed2));
@@ -143,11 +143,11 @@ bool SketcherPrs_Angle::readyToDisplay(ModelAPI_Feature* theConstraint,
 
 
 void SketcherPrs_Angle::Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-                                const Handle(Prs3d_Presentation)& thePresentation, 
+                                const Handle(Prs3d_Presentation)& thePresentation,
                                 const Standard_Integer theMode)
 {
   gp_Pnt aFirstPoint, aSecondPoint, aCenterPoint;
-  bool aReadyToDisplay = readyToDisplay(myConstraint, mySketcherPlane, 
+  bool aReadyToDisplay = readyToDisplay(myConstraint, mySketcherPlane,
                                         aFirstPoint, aSecondPoint, aCenterPoint);
   if (aReadyToDisplay) {
     myFirstPoint = aFirstPoint;
@@ -155,14 +155,14 @@ void SketcherPrs_Angle::Compute(const Handle(PrsMgr_PresentationManager3d)& theP
     myCenterPoint = aCenterPoint;
 
     DataPtr aData = myConstraint->data();
-    AttributeDoublePtr anAttributeValue = 
+    AttributeDoublePtr anAttributeValue =
       aData->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID());
     myValue.init(anAttributeValue);
 
-    std::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr = 
+    std::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr =
                                 std::dynamic_pointer_cast<GeomDataAPI_Point2D>
                                 (aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
-    std::shared_ptr<GeomAPI_Pnt> aFlyoutPnt = 
+    std::shared_ptr<GeomAPI_Pnt> aFlyoutPnt =
       mySketcherPlane->to3D(aFlyoutAttr->x(), aFlyoutAttr->y());
     myFlyOutPoint = aFlyoutPnt->impl<gp_Pnt>();
   }
@@ -247,7 +247,7 @@ void SketcherPrs_Angle::ComputeSelection(const Handle(SelectMgr_Selection)& aSel
   default: {
     // there are own selection modes, so the others should be ignored
     // otherwise, the text selection appears in the viewer
-    return; 
+    return;
   }
   }
   SetSelToleranceForText2d(SketcherPrs_Tools::getTextHeight());
index de294a98c1676183a7ee2b145774f8701028a1d0..f3769984824d304d0812e68dde10e339478cd380 100644 (file)
@@ -28,7 +28,7 @@ public:
   /// Constructor
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
-  Standard_EXPORT SketcherPrs_Angle(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_Angle(ModelAPI_Feature* theConstraint,
                         const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 
   /// Destructor
@@ -36,7 +36,7 @@ public:
 
   DEFINE_STANDARD_RTTI(SketcherPrs_Angle)
 
-  /// Returns true if the constraint feature arguments are correcly filled 
+  /// Returns true if the constraint feature arguments are correcly filled
   /// to build AIS presentation
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
index cfb233defe1ee5de533bbb17ca61a4cb832a53f0..1409192b70527a58150eb844adc69f463581b076 100644 (file)
@@ -32,8 +32,8 @@
 IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Coincident, AIS_InteractiveObject);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Coincident, AIS_InteractiveObject);
 
-SketcherPrs_Coincident::SketcherPrs_Coincident(ModelAPI_Feature* theConstraint, 
-                                               const std::shared_ptr<GeomAPI_Ax3>& thePlane) 
+SketcherPrs_Coincident::SketcherPrs_Coincident(ModelAPI_Feature* theConstraint,
+                                               const std::shared_ptr<GeomAPI_Ax3>& thePlane)
 : AIS_InteractiveObject(), myConstraint(theConstraint), mySketcherPlane(thePlane),
   myPoint(gp_Pnt(0.0, 0.0, 0.0)), myIsConflicting(false)
 {
@@ -68,7 +68,7 @@ bool SketcherPrs_Coincident::readyToDisplay(ModelAPI_Feature* theConstraint,
 
 void SketcherPrs_Coincident::Compute(
   const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-  const Handle(Prs3d_Presentation)& thePresentation, 
+  const Handle(Prs3d_Presentation)& thePresentation,
   const Standard_Integer theMode)
 {
   gp_Pnt aPoint;
index f6e7d4a36f6c8b62c8fb69040fd89724b99a9ea0..fd09748434c5e89253a2b9f4463dcbc8356e6ee2 100644 (file)
@@ -27,24 +27,24 @@ public:
   /// Constructor
   /// \param theConstraint a constraint object
   /// \param thePlane plane of a sketch
-  Standard_EXPORT SketcherPrs_Coincident(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_Coincident(ModelAPI_Feature* theConstraint,
                                          const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 
   /// Defines color for the presentation
   /// \param aColor a color object
   Standard_EXPORT virtual void SetColor(const Quantity_Color& aColor);
-  
+
   /// Defines color for the presentation
   /// \param aColor a color name
   Standard_EXPORT virtual void SetColor(const Quantity_NameOfColor aColor);
 
   /// Set state of the presentation, in case of conflicting state, the icon of the presentation is
-  /// visualized in error color. 
+  /// visualized in error color.
   /// The state is stored in an internal field, so should be changed when
   /// constraint become not conflicting
   /// \param theConflicting a state
   /// \param theColor a color for conflicting object
-  Standard_EXPORT void SetConflictingConstraint(const bool& theConflicting, 
+  Standard_EXPORT void SetConflictingConstraint(const bool& theConflicting,
                                                 const std::vector<int>& theColor);
 
   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
index bd88e9289fff6e34f5609b8c04b14552e5cd48e5..cf075c52c801dd7a511d863aaab9c04715115a0d 100755 (executable)
@@ -19,14 +19,14 @@ IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Collinear, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
 
-SketcherPrs_Collinear::SketcherPrs_Collinear(ModelAPI_Feature* theConstraint, 
-                                     const std::shared_ptr<GeomAPI_Ax3>& thePlane) 
+SketcherPrs_Collinear::SketcherPrs_Collinear(ModelAPI_Feature* theConstraint,
+                                     const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
   myPntArray = new Graphic3d_ArrayOfPoints(2);
   myPntArray->AddVertex(0., 0., 0.);
   myPntArray->AddVertex(0., 0., 0.);
-}  
+}
 
 bool SketcherPrs_Collinear::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
                                          const std::shared_ptr<GeomAPI_Ax3>&/* thePlane*/)
@@ -35,7 +35,7 @@ bool SketcherPrs_Collinear::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
 
   ObjectPtr aObj1 =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = 
+  ObjectPtr aObj2 =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   aReadyToDisplay = SketcherPrs_Tools::getShape(aObj1).get() != NULL &&
@@ -49,9 +49,9 @@ bool SketcherPrs_Collinear::updateIfReadyToDisplay(double theStep) const
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
 
-  ObjectPtr aObj1 = 
+  ObjectPtr aObj1 =
     SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = 
+  ObjectPtr aObj2 =
     SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   // Set points of the presentation
@@ -63,12 +63,12 @@ bool SketcherPrs_Collinear::updateIfReadyToDisplay(double theStep) const
   return true;
 }
 
-void SketcherPrs_Collinear::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+void SketcherPrs_Collinear::drawLines(const Handle(Prs3d_Presentation)& thePrs,
                                       Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
-  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+  Handle(Graphic3d_AspectLine3d) aLineAspect =
     new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
index 61f55c0b0f22e4375d36d1a63b0ff2c61b235c40..cd75c58d0d185ce178b965b32f3dfd6264b78925 100755 (executable)
@@ -23,7 +23,7 @@ public:
   /// Constructor
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
-  Standard_EXPORT SketcherPrs_Collinear(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_Collinear(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
   DEFINE_STANDARD_RTTI(SketcherPrs_Collinear)
 
index 30a1931063b391cb9eb4418b5deeed84115bfe1f..704e2af0c3fd1c62102869112441dd9146c4f20a 100755 (executable)
@@ -91,7 +91,7 @@ void SketcherPrs_DimensionStyleListener::updateDimensions(AIS_Dimension* theDime
       aCustomValue = theTextValue.c_str();
     else {
       // format value string using "sprintf"
-      TCollection_AsciiString aFormatStr = 
+      TCollection_AsciiString aFormatStr =
         theDimension->Attributes()->DimensionAspect()->ValueStringFormat();
       char aFmtBuffer[256];
       sprintf (aFmtBuffer, aFormatStr.ToCString(), theDoubleValue);
index 518774fa31b8a0e33615437f2ce724e17c5ec78d..5e504590ae957dd4eba456417d42824391ab048a 100644 (file)
@@ -19,23 +19,23 @@ IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Equal, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
 
-SketcherPrs_Equal::SketcherPrs_Equal(ModelAPI_Feature* theConstraint, 
-                                     const std::shared_ptr<GeomAPI_Ax3>& thePlane) 
+SketcherPrs_Equal::SketcherPrs_Equal(ModelAPI_Feature* theConstraint,
+                                     const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
   myPntArray = new Graphic3d_ArrayOfPoints(2);
   myPntArray->AddVertex(0., 0., 0.);
   myPntArray->AddVertex(0., 0., 0.);
-}  
+}
 
 bool SketcherPrs_Equal::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
                                          const std::shared_ptr<GeomAPI_Ax3>&/* thePlane*/)
 {
   bool aReadyToDisplay = false;
 
-  ObjectPtr aObj1 = 
+  ObjectPtr aObj1 =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = 
+  ObjectPtr aObj2 =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   aReadyToDisplay = SketcherPrs_Tools::getShape(aObj1).get() != NULL &&
@@ -49,9 +49,9 @@ bool SketcherPrs_Equal::updateIfReadyToDisplay(double theStep) const
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
 
-  ObjectPtr aObj1 = 
+  ObjectPtr aObj1 =
     SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = 
+  ObjectPtr aObj2 =
     SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   // Set points of the presentation
@@ -63,12 +63,12 @@ bool SketcherPrs_Equal::updateIfReadyToDisplay(double theStep) const
   return true;
 }
 
-void SketcherPrs_Equal::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+void SketcherPrs_Equal::drawLines(const Handle(Prs3d_Presentation)& thePrs,
                                   Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
-  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+  Handle(Graphic3d_AspectLine3d) aLineAspect =
     new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
index 0e0dd3130a2189e1daee02b3cda0be374ea08f68..6103dc8bea65e225b666e44af5879d9deed1aab1 100644 (file)
@@ -23,7 +23,7 @@ public:
   /// Constructor
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
-  Standard_EXPORT SketcherPrs_Equal(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_Equal(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
   DEFINE_STANDARD_RTTI(SketcherPrs_Equal)
 
index 8c8af38abfd9bc0ac7812f70640a9abeb213d7de..d9e205140b93a644a7d1dad4c0419b9c792eed6b 100644 (file)
@@ -64,7 +64,7 @@ AISObjectPtr SketcherPrs_Factory::horisontalConstraint(ModelAPI_Feature* theCons
       anAISObj = thePrevious;
     else {
       anAISObj = AISObjectPtr(new GeomAPI_AISObject());
-      Handle(SketcherPrs_HVDirection) aPrs = 
+      Handle(SketcherPrs_HVDirection) aPrs =
         new SketcherPrs_HVDirection(theConstraint, thePlane, true);
       anAISObj->setImpl(new Handle(AIS_InteractiveObject)(aPrs));
     }
@@ -75,14 +75,14 @@ AISObjectPtr SketcherPrs_Factory::horisontalConstraint(ModelAPI_Feature* theCons
 AISObjectPtr SketcherPrs_Factory::verticalConstraint(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane,
                                        AISObjectPtr thePrevious)
-{ 
+{
   std::shared_ptr<GeomAPI_AISObject> anAISObj;
   if (SketcherPrs_HVDirection::IsReadyToDisplay(theConstraint, thePlane)) {
     if (thePrevious.get())
       anAISObj = thePrevious;
     else {
       anAISObj = AISObjectPtr(new GeomAPI_AISObject());
-      Handle(SketcherPrs_HVDirection) aPrs = 
+      Handle(SketcherPrs_HVDirection) aPrs =
         new SketcherPrs_HVDirection(theConstraint, thePlane, false);
       anAISObj->setImpl(new Handle(AIS_InteractiveObject)(aPrs));
     }
@@ -93,15 +93,15 @@ AISObjectPtr SketcherPrs_Factory::verticalConstraint(ModelAPI_Feature* theConstr
 AISObjectPtr SketcherPrs_Factory::translateConstraint(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane,
                                        AISObjectPtr thePrevious)
-{ 
+{
   std::shared_ptr<GeomAPI_AISObject> anAISObj;
   if (SketcherPrs_Transformation::IsReadyToDisplay(theConstraint, thePlane)) {
     if (thePrevious.get())
       anAISObj = thePrevious;
     else {
       anAISObj = AISObjectPtr(new GeomAPI_AISObject());
-      Handle(SketcherPrs_Transformation) aPrs = 
-        new SketcherPrs_Transformation(theConstraint, thePlane, true); 
+      Handle(SketcherPrs_Transformation) aPrs =
+        new SketcherPrs_Transformation(theConstraint, thePlane, true);
       anAISObj->setImpl(new Handle(AIS_InteractiveObject)(aPrs));
     }
   }
@@ -111,15 +111,15 @@ AISObjectPtr SketcherPrs_Factory::translateConstraint(ModelAPI_Feature* theConst
 AISObjectPtr SketcherPrs_Factory::rotateConstraint(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane,
                                        AISObjectPtr thePrevious)
-{ 
+{
   std::shared_ptr<GeomAPI_AISObject> anAISObj;
   if (SketcherPrs_Transformation::IsReadyToDisplay(theConstraint, thePlane)) {
     if (thePrevious.get())
       anAISObj = thePrevious;
     else {
       anAISObj = AISObjectPtr(new GeomAPI_AISObject());
-      Handle(SketcherPrs_Transformation) aPrs = 
-        new SketcherPrs_Transformation(theConstraint, thePlane, false); 
+      Handle(SketcherPrs_Transformation) aPrs =
+        new SketcherPrs_Transformation(theConstraint, thePlane, false);
       anAISObj->setImpl(new Handle(AIS_InteractiveObject)(aPrs));
     }
   }
index 33500e1c54c758179b68f558fba6a82136db08b1..44d62c5aec94ad71a63d7905ec7f52238e1331cb 100644 (file)
@@ -19,9 +19,9 @@ IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_HVDirection, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
 
-SketcherPrs_HVDirection::SketcherPrs_HVDirection(ModelAPI_Feature* theConstraint, 
+SketcherPrs_HVDirection::SketcherPrs_HVDirection(ModelAPI_Feature* theConstraint,
                                            const std::shared_ptr<GeomAPI_Ax3>& thePlane,
-                                           bool isHorisontal) 
+                                           bool isHorisontal)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane), myIsHorisontal(isHorisontal)
 {
 }
@@ -30,14 +30,14 @@ bool SketcherPrs_HVDirection::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
                                                const std::shared_ptr<GeomAPI_Ax3>&/* thePlane*/)
 {
   bool aReadyToDisplay = false;
-  ObjectPtr aObj = 
+  ObjectPtr aObj =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
 
   aReadyToDisplay = SketcherPrs_Tools::getShape(aObj).get() != NULL;
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_HVDirection::updateIfReadyToDisplay(double theStep) const 
+bool SketcherPrs_HVDirection::updateIfReadyToDisplay(double theStep) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
@@ -50,13 +50,13 @@ bool SketcherPrs_HVDirection::updateIfReadyToDisplay(double theStep) const
   return true;
 }
 
-void SketcherPrs_HVDirection::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+void SketcherPrs_HVDirection::drawLines(const Handle(Prs3d_Presentation)& thePrs,
                                         Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
   // Draw constrained object
-  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+  Handle(Graphic3d_AspectLine3d) aLineAspect =
     new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
index 39bd961a95082f4997ae5a1dcb8c8ab59a450555..8da2cd498c86bb4e926069ea96576a6dd4bbb4c6 100644 (file)
@@ -25,7 +25,7 @@ public:
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
   /// \param isHorisontal a flag horizontal or vertical presentation
-  Standard_EXPORT SketcherPrs_HVDirection(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_HVDirection(ModelAPI_Feature* theConstraint,
                                          const std::shared_ptr<GeomAPI_Ax3>& thePlane,
                                          bool isHorisontal);
 
index 267cc476ec17cf6a2ce394ff5e8101aa2916fdea..f47575fe7cefac2d81caffdb3086e1fd83872718 100644 (file)
@@ -63,7 +63,7 @@ bool SketcherPrs_LengthDimension::IsReadyToDisplay(ModelAPI_Feature* theConstrai
 
 void SketcherPrs_LengthDimension::Compute(
   const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-  const Handle(Prs3d_Presentation)& thePresentation, 
+  const Handle(Prs3d_Presentation)& thePresentation,
   const Standard_Integer theMode)
 {
   gp_Pnt aPnt1, aPnt2;
@@ -106,7 +106,7 @@ bool SketcherPrs_LengthDimension::readyToDisplay(ModelAPI_Feature* theConstraint
   DataPtr aData = theConstraint->data();
   if (theConstraint->getKind() == SketchPlugin_ConstraintLength::ID()) {
     // The constraint is length
-    std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = 
+    std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>
       (aData->attribute(SketchPlugin_Constraint::ENTITY_A()));
     if (!anAttr)
@@ -118,10 +118,10 @@ bool SketcherPrs_LengthDimension::readyToDisplay(ModelAPI_Feature* theConstraint
 
     // Get geometry of the object
     DataPtr aLineData = aFeature->data();
-    std::shared_ptr<GeomDataAPI_Point2D> aStartPoint = 
+    std::shared_ptr<GeomDataAPI_Point2D> aStartPoint =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>
       (aLineData->attribute(SketchPlugin_Line::START_ID()));
-    std::shared_ptr<GeomDataAPI_Point2D> aEndPoint = 
+    std::shared_ptr<GeomDataAPI_Point2D> aEndPoint =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>
       (aLineData->attribute(SketchPlugin_Line::END_ID()));
     thePnt1 = thePlane->to3D(aStartPoint->x(), aStartPoint->y())->impl<gp_Pnt>();
index ef3087c76d31e0fcf3b5e2c37127b48c5b2392e4..a15ba7ca942f78864b0c5c90cdb3ff86081ba2db 100644 (file)
@@ -32,7 +32,7 @@ public:
   /// Constructor
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
-  Standard_EXPORT SketcherPrs_LengthDimension(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_LengthDimension(ModelAPI_Feature* theConstraint,
                         const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 
   /// Destructor
@@ -40,7 +40,7 @@ public:
 
   DEFINE_STANDARD_RTTI(SketcherPrs_LengthDimension)
 
-  /// Returns true if the constraint feature arguments are correcly filled 
+  /// Returns true if the constraint feature arguments are correcly filled
   /// to build AIS presentation
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
@@ -51,7 +51,7 @@ protected:
   /// Redefinition of virtual function
   Standard_EXPORT virtual void Compute(
     const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-    const Handle(Prs3d_Presentation)& thePresentation, 
+    const Handle(Prs3d_Presentation)& thePresentation,
     const Standard_Integer theMode = 0);
 
   /// Redefinition of virtual function
@@ -74,7 +74,7 @@ private:
   /// Listener to update dimension visualization style
   SketcherPrs_DimensionStyleListener* myStyleListener;
 
-  /// container of values obtained from the constraint, which are necessary 
+  /// container of values obtained from the constraint, which are necessary
   /// to fill the presentation
   gp_Pnt myFirstPoint; ///< the dimension first point for measured geometry
   gp_Pnt mySecondPoint; ///< the dimension first point for measured geometry
@@ -82,7 +82,7 @@ private:
   double myDistance; ///< the flyout distance
 
   /// the structure filled by constraint
-  SketcherPrs_DimensionStyleListener::DimensionValue myValue; 
+  SketcherPrs_DimensionStyleListener::DimensionValue myValue;
 };
 
 #endif
\ No newline at end of file
index 8e2ed6816ba94c20ec4dd0f8aa4b47e81df488e9..9c4bbd3542a32a8b1d7d52c62b0351d51d35eef1 100755 (executable)
@@ -19,8 +19,8 @@ IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Middle, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
 
-SketcherPrs_Middle::SketcherPrs_Middle(ModelAPI_Feature* theConstraint, 
-                                     const std::shared_ptr<GeomAPI_Ax3>& thePlane) 
+SketcherPrs_Middle::SketcherPrs_Middle(ModelAPI_Feature* theConstraint,
+                                     const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
 }
@@ -30,9 +30,9 @@ bool SketcherPrs_Middle::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
 {
   bool aReadyToDisplay = false;
 
-  ObjectPtr aObj1 = 
+  ObjectPtr aObj1 =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = 
+  ObjectPtr aObj2 =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   // one object is a feature Line, other object is a point result. We check shape of point result
@@ -50,17 +50,17 @@ bool SketcherPrs_Middle::updateIfReadyToDisplay(double theStep) const
   ObjectPtr aPointObject;
 
   // find a line result to set middle symbol near it
-  AttributePtr anAttribute = 
+  AttributePtr anAttribute =
     SketcherPrs_Tools::getAttribute(myConstraint, SketchPlugin_Constraint::ENTITY_A());
   if (!anAttribute.get()) {
-    ObjectPtr aObj = 
+    ObjectPtr aObj =
       SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
     std::shared_ptr<GeomAPI_Shape> aShape = SketcherPrs_Tools::getShape(aObj);
     if (aShape.get() && aShape->isEdge())
       aPointObject = aObj;
   }
   if (!aPointObject.get()) {
-    ObjectPtr aObj = 
+    ObjectPtr aObj =
       SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
     std::shared_ptr<GeomAPI_Shape> aShape = SketcherPrs_Tools::getShape(aObj);
     if (aShape.get() && aShape->isEdge())
@@ -77,17 +77,17 @@ bool SketcherPrs_Middle::updateIfReadyToDisplay(double theStep) const
   return true;
 }
 
-void SketcherPrs_Middle::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+void SketcherPrs_Middle::drawLines(const Handle(Prs3d_Presentation)& thePrs,
                                    Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
-  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+  Handle(Graphic3d_AspectLine3d) aLineAspect =
     new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
   // Draw objects
-  ObjectPtr aObject = 
+  ObjectPtr aObject =
     SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
   drawLine(thePrs, theColor, aObject);
 
index 0ba22c9f9d39753ebd16068c390f017f4be57110..00b6ad0eef37217afd6a015abaff2c78884263cb 100755 (executable)
@@ -23,7 +23,7 @@ public:
   /// Constructor
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
-  Standard_EXPORT SketcherPrs_Middle(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_Middle(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
   DEFINE_STANDARD_RTTI(SketcherPrs_Middle)
 
index a086d0f7b803bbaac9d3c6ab5c595b645790725f..b94f40efaef5c3b9fd6feb2c7c57cfae4b5a4454 100644 (file)
@@ -21,11 +21,11 @@ IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Mirror, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
 
-SketcherPrs_Mirror::SketcherPrs_Mirror(ModelAPI_Feature* theConstraint, 
-                                           const std::shared_ptr<GeomAPI_Ax3>& thePlane) 
+SketcherPrs_Mirror::SketcherPrs_Mirror(ModelAPI_Feature* theConstraint,
+                                           const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
-}  
+}
 
 bool SketcherPrs_Mirror::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
                                           const std::shared_ptr<GeomAPI_Ax3>&/* thePlane*/)
@@ -33,19 +33,19 @@ bool SketcherPrs_Mirror::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   bool aReadyToDisplay = false;
 
   // Get axis of mirror
-  ObjectPtr aAxisObj = 
+  ObjectPtr aAxisObj =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
   if (SketcherPrs_Tools::getShape(aAxisObj).get() == NULL)
     return aReadyToDisplay;
 
   std::shared_ptr<ModelAPI_Data> aData = theConstraint->data();
   // Get source objects
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = 
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB =
     aData->reflist(SketchPlugin_Constraint::ENTITY_B());
   if (anAttrB.get() == NULL)
     return aReadyToDisplay;
   // Get mirrored objects
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrC = 
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrC =
     aData->reflist(SketchPlugin_Constraint::ENTITY_C());
   if (anAttrC.get() == NULL)
     return aReadyToDisplay;
@@ -66,15 +66,15 @@ bool SketcherPrs_Mirror::updateIfReadyToDisplay(double theStep) const
     return false;
 
   // Get axis of mirror
-  ObjectPtr aAxisObj = 
+  ObjectPtr aAxisObj =
     SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
 
   std::shared_ptr<ModelAPI_Data> aData = myConstraint->data();
   // Get source objects
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = 
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB =
     aData->reflist(SketchPlugin_Constraint::ENTITY_B());
   // Get mirrored objects
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrC = 
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrC =
     aData->reflist(SketchPlugin_Constraint::ENTITY_C());
 
   SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
@@ -91,7 +91,7 @@ bool SketcherPrs_Mirror::updateIfReadyToDisplay(double theStep) const
       continue;
     aP1 = aMgr->getPosition(aObj, this, theStep);
     myPntArray->SetVertice(i + 1, aP1);
-  }  
+  }
   // Get position of each mirrored object
   for (i = 0; i < aNb; i++) {
     aObj = anAttrC->object(i);
@@ -99,20 +99,20 @@ bool SketcherPrs_Mirror::updateIfReadyToDisplay(double theStep) const
       continue;
     aP1 = aMgr->getPosition(aObj, this, theStep);
     myPntArray->SetVertice(aNb + i + 1, aP1);
-  }  
+  }
   return true;
 }
 
 
-void SketcherPrs_Mirror::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+void SketcherPrs_Mirror::drawLines(const Handle(Prs3d_Presentation)& thePrs,
   Quantity_Color theColor) const
 {
   std::shared_ptr<ModelAPI_Data> aData = myConstraint->data();
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = 
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB =
     aData->reflist(SketchPlugin_Constraint::ENTITY_B());
   if (anAttrB.get() == NULL)
     return;
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrC = 
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrC =
     aData->reflist(SketchPlugin_Constraint::ENTITY_C());
   if (anAttrC.get() == NULL)
     return;
index 3d3d311e89aee290f61fc45afaf0fc8d98045d39..098d1c27975e060a09e2dbc1763a48448d053366 100644 (file)
@@ -23,7 +23,7 @@ public:
   /// Constructor
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
-  Standard_EXPORT SketcherPrs_Mirror(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_Mirror(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
   DEFINE_STANDARD_RTTI(SketcherPrs_Mirror)
 
index 9b73b33854ce3f62a693215499268ecefd3792e0..6a6d4bbee9542005215062c957a9fe3e9d83ccc2 100644 (file)
@@ -20,24 +20,24 @@ IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Parallel, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
 
-SketcherPrs_Parallel::SketcherPrs_Parallel(ModelAPI_Feature* theConstraint, 
-                                           const std::shared_ptr<GeomAPI_Ax3>& thePlane) 
+SketcherPrs_Parallel::SketcherPrs_Parallel(ModelAPI_Feature* theConstraint,
+                                           const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
   // Create default array
   myPntArray = new Graphic3d_ArrayOfPoints(2);
   myPntArray->AddVertex(0., 0., 0.);
   myPntArray->AddVertex(0., 0., 0.);
-}  
+}
 
 bool SketcherPrs_Parallel::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
                                             const std::shared_ptr<GeomAPI_Ax3>&/* thePlane*/)
 {
   bool aReadyToDisplay = false;
 
-  ObjectPtr aObj1 = 
+  ObjectPtr aObj1 =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = 
+  ObjectPtr aObj2 =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   aReadyToDisplay = SketcherPrs_Tools::getShape(aObj1).get() != NULL &&
@@ -50,9 +50,9 @@ bool SketcherPrs_Parallel::updateIfReadyToDisplay(double theStep) const
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
 
-  ObjectPtr aObj1 = 
+  ObjectPtr aObj1 =
     SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = 
+  ObjectPtr aObj2 =
     SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   // Compute position of symbols
@@ -65,12 +65,12 @@ bool SketcherPrs_Parallel::updateIfReadyToDisplay(double theStep) const
 }
 
 
-void SketcherPrs_Parallel::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+void SketcherPrs_Parallel::drawLines(const Handle(Prs3d_Presentation)& thePrs,
   Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
-  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+  Handle(Graphic3d_AspectLine3d) aLineAspect =
     new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
index cdadd05600617add43674eedde43cf23d4b785fe..d5ae2530097b8e5a17d8bada8403d5dd76439b24 100644 (file)
@@ -23,7 +23,7 @@ public:
   /// Constructor
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
-  Standard_EXPORT SketcherPrs_Parallel(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_Parallel(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
   DEFINE_STANDARD_RTTI(SketcherPrs_Parallel)
 
index d9d280f99e5235b4b48ca8b4233e3522286ace01..96a63b3a3a4af4ea093b8d7448e375745798a9cb 100644 (file)
@@ -20,7 +20,7 @@ IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Perpendicular, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
 
-SketcherPrs_Perpendicular::SketcherPrs_Perpendicular(ModelAPI_Feature* theConstraint, 
+SketcherPrs_Perpendicular::SketcherPrs_Perpendicular(ModelAPI_Feature* theConstraint,
                                                      const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
@@ -28,16 +28,16 @@ SketcherPrs_Perpendicular::SketcherPrs_Perpendicular(ModelAPI_Feature* theConstr
   myPntArray = new Graphic3d_ArrayOfPoints(2);
   myPntArray->AddVertex(0., 0., 0.);
   myPntArray->AddVertex(0., 0., 0.);
-}  
+}
 
 bool SketcherPrs_Perpendicular::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
                                                  const std::shared_ptr<GeomAPI_Ax3>&/* thePlane*/)
 {
   bool aReadyToDisplay = false;
 
-  ObjectPtr aObj1 = 
+  ObjectPtr aObj1 =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = 
+  ObjectPtr aObj2 =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   aReadyToDisplay = SketcherPrs_Tools::getShape(aObj1).get() != NULL &&
@@ -50,9 +50,9 @@ bool SketcherPrs_Perpendicular::updateIfReadyToDisplay(double theStep) const
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
 
-  ObjectPtr aObj1 = 
+  ObjectPtr aObj1 =
     SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = 
+  ObjectPtr aObj2 =
     SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   // Compute position of symbols
@@ -65,12 +65,12 @@ bool SketcherPrs_Perpendicular::updateIfReadyToDisplay(double theStep) const
 }
 
 
-void SketcherPrs_Perpendicular::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+void SketcherPrs_Perpendicular::drawLines(const Handle(Prs3d_Presentation)& thePrs,
                                           Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
-  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+  Handle(Graphic3d_AspectLine3d) aLineAspect =
     new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
index 33a6f7495d659675f4bd7ed1fe56095f4d7b50e6..c1f1622d3115a5fd97aaf1459e58f269d31b4e78 100644 (file)
@@ -25,7 +25,7 @@ public:
   /// Constructor
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
-  Standard_EXPORT SketcherPrs_Perpendicular(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_Perpendicular(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 
   DEFINE_STANDARD_RTTI(SketcherPrs_Perpendicular)
index 0261528f5895f8fde8b594fa566b87cb2befdd2c..567a97dc12870080e019f3a364c4eb2e0b348822 100644 (file)
@@ -17,7 +17,7 @@ static SketcherPrs_PositionMgr* MyPosMgr = NULL;
 // The class is implemented as a singlton
 SketcherPrs_PositionMgr* SketcherPrs_PositionMgr::get()
 {
-  if (MyPosMgr == NULL) 
+  if (MyPosMgr == NULL)
     MyPosMgr = new SketcherPrs_PositionMgr();
   return MyPosMgr;
 }
@@ -27,7 +27,7 @@ SketcherPrs_PositionMgr::SketcherPrs_PositionMgr()
 }
 
 
-int SketcherPrs_PositionMgr::getPositionIndex(ObjectPtr theLine, 
+int SketcherPrs_PositionMgr::getPositionIndex(ObjectPtr theLine,
                                               const SketcherPrs_SymbolPrs* thePrs)
 {
   if (myShapes.count(theLine) == 1) {
@@ -51,7 +51,7 @@ int SketcherPrs_PositionMgr::getPositionIndex(ObjectPtr theLine,
   }
 }
 
-gp_Pnt SketcherPrs_PositionMgr::getPosition(ObjectPtr theShape, 
+gp_Pnt SketcherPrs_PositionMgr::getPosition(ObjectPtr theShape,
                                             const SketcherPrs_SymbolPrs* thePrs,
                                             double theStep)
 {
@@ -59,12 +59,12 @@ gp_Pnt SketcherPrs_PositionMgr::getPosition(ObjectPtr theShape,
   gp_Pnt aP; // Central point
   gp_Vec aVec1; // main vector
   if (aShape->isEdge()) {
-    std::shared_ptr<GeomAPI_Curve> aCurve = 
+    std::shared_ptr<GeomAPI_Curve> aCurve =
       std::shared_ptr<GeomAPI_Curve>(new GeomAPI_Curve(aShape));
     std::shared_ptr<GeomAPI_Pnt> aPnt1; // Start point of main vector
     std::shared_ptr<GeomAPI_Pnt> aPnt2; // End point of main vector
     if (aCurve->isLine()) {
-      std::shared_ptr<GeomAPI_Edge> aEdge = 
+      std::shared_ptr<GeomAPI_Edge> aEdge =
         std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(aShape));
 
       aPnt1 = aEdge->firstPoint();
@@ -87,7 +87,7 @@ gp_Pnt SketcherPrs_PositionMgr::getPosition(ObjectPtr theShape,
     aVec1 = gp_Vec(aPnt1->impl<gp_Pnt>(), aPnt2->impl<gp_Pnt>());
   } else {
     // This is a point
-    std::shared_ptr<GeomAPI_Vertex> aVertex = 
+    std::shared_ptr<GeomAPI_Vertex> aVertex =
       std::shared_ptr<GeomAPI_Vertex>(new GeomAPI_Vertex(aShape));
     std::shared_ptr<GeomAPI_Pnt> aPnt = aVertex->point();
     aP = aPnt->impl<gp_Pnt>();
@@ -107,7 +107,7 @@ gp_Pnt SketcherPrs_PositionMgr::getPosition(ObjectPtr theShape,
     // Even position
     aP.Translate(aShift);
     if (aPos > 0) {
-      if (aPos % 4 == 0) 
+      if (aPos % 4 == 0)
         aM = aPos / 4;
       else
         aM = -(aPos + 2) / 4;
@@ -116,7 +116,7 @@ gp_Pnt SketcherPrs_PositionMgr::getPosition(ObjectPtr theShape,
     // Odd position
     aP.Translate(-aShift);
     if (aPos > 1) {
-      if ((aPos - 1) % 4 == 0) 
+      if ((aPos - 1) % 4 == 0)
         aM = (aPos - 1) / 4;
       else
         aM = -(aPos + 1) / 4;
index d8a956ff9f4398a033ca4b591c50344bc85f1566..d91e9af32dc235cab9397c65b1f8fdc0c487fbb7 100644 (file)
@@ -27,7 +27,7 @@ public:
   static SketcherPrs_PositionMgr* get();
 
   /// Returns position of symbol for the given presentation
-  /// \param theLine constrained object 
+  /// \param theLine constrained object
   /// \param thePrs a presentation of constraint
   /// \param theStep step between symbols
   gp_Pnt getPosition(ObjectPtr theLine, const SketcherPrs_SymbolPrs* thePrs, double theStep = 20);
@@ -41,7 +41,7 @@ private:
   SketcherPrs_PositionMgr();
 
   /// Returns position index of the given constraint
-  /// \param theLine constrained object 
+  /// \param theLine constrained object
   /// \param thePrs a presentation of constraint
   int getPositionIndex(ObjectPtr theLine, const SketcherPrs_SymbolPrs* thePrs);
 
@@ -51,7 +51,7 @@ private:
   /// The map which contains position of presentation
   PositionsMap myIndexes;
 
-  /// The map contains position index 
+  /// The map contains position index
   std::map<ObjectPtr, PositionsMap> myShapes;
 };
 
index 826ae8379e3372947540a594724a6ac0cb38a670..fe73e5059b686ecf467b130a2fc8f9450fcedc40 100644 (file)
@@ -26,7 +26,7 @@ static const gp_Circ MyDefCirc(gp_Ax2(gp_Pnt(0,0,0), gp_Dir(0,0,1)), 1);
 IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Radius, AIS_RadiusDimension);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Radius, AIS_RadiusDimension);
 
-SketcherPrs_Radius::SketcherPrs_Radius(ModelAPI_Feature* theConstraint, 
+SketcherPrs_Radius::SketcherPrs_Radius(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane)
 : AIS_RadiusDimension(MyDefCirc), myConstraint(theConstraint), mySketcherPlane(thePlane),
   myCircle(MyDefCirc),
@@ -59,7 +59,7 @@ bool SketcherPrs_Radius::readyToDisplay(ModelAPI_Feature* theConstraint,
   DataPtr aData = theConstraint->data();
 
   // Flyout point
-  std::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr = 
+  std::shared_ptr<GeomDataAPI_Point2D> aFlyoutAttr =
     std::dynamic_pointer_cast<GeomDataAPI_Point2D>
     (aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT()));
   if (!aFlyoutAttr->isInitialized()) {
@@ -67,7 +67,7 @@ bool SketcherPrs_Radius::readyToDisplay(ModelAPI_Feature* theConstraint,
   }
 
   // Get circle
-  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = 
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr =
     std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>
     (aData->attribute(SketchPlugin_Constraint::ENTITY_A()));
   if (!anAttr)
@@ -84,18 +84,18 @@ bool SketcherPrs_Radius::readyToDisplay(ModelAPI_Feature* theConstraint,
   if (aCyrcFeature->getKind() == SketchPlugin_Circle::ID()) { // circle
     aCenterAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aCyrcFeature->data()->attribute(SketchPlugin_Circle::CENTER_ID()));
-    AttributeDoublePtr aCircRadius = 
+    AttributeDoublePtr aCircRadius =
       std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
       aCyrcFeature->data()->attribute(SketchPlugin_Circle::RADIUS_ID()));
     aRadius = aCircRadius->value();
   } else { // arc
     aCenterAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aCyrcFeature->data()->attribute(SketchPlugin_Arc::CENTER_ID()));
-    //std::shared_ptr<GeomDataAPI_Point2D> aStartAttr = 
+    //std::shared_ptr<GeomDataAPI_Point2D> aStartAttr =
     //  std::dynamic_pointer_cast<GeomDataAPI_Point2D>
     //  (aCyrcFeature->data()->attribute(SketchPlugin_Arc::START_ID()));
     //theRadius = aCenterAttr->pnt()->distance(aStartAttr->pnt());
-    AttributeDoublePtr aCircRadius = 
+    AttributeDoublePtr aCircRadius =
       std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
       aCyrcFeature->data()->attribute(SketchPlugin_Arc::RADIUS_ID()));
     aRadius = aCircRadius->value();
@@ -104,7 +104,7 @@ bool SketcherPrs_Radius::readyToDisplay(ModelAPI_Feature* theConstraint,
   std::shared_ptr<GeomAPI_Dir> aNormal = thePlane->normal();
 
   GeomAPI_Circ aCircle(aCenter, aNormal, aRadius);
-  std::shared_ptr<GeomAPI_Pnt> anAnchor = 
+  std::shared_ptr<GeomAPI_Pnt> anAnchor =
     SketcherPrs_Tools::getAnchorPoint(theConstraint, thePlane);
 
   theCircle = aCircle.impl<gp_Circ>();
@@ -117,7 +117,7 @@ bool SketcherPrs_Radius::readyToDisplay(ModelAPI_Feature* theConstraint,
 
 void SketcherPrs_Radius::Compute(
   const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-  const Handle(Prs3d_Presentation)& thePresentation, 
+  const Handle(Prs3d_Presentation)& thePresentation,
   const Standard_Integer theMode)
 {
   gp_Circ aCircle;
@@ -140,7 +140,7 @@ void SketcherPrs_Radius::Compute(
   GetValueString(aTextSize);
   SketcherPrs_Tools::updateArrows(DimensionAspect(), GetValue(), aTextSize);
 
-  
+
   AIS_RadiusDimension::Compute(thePresentationManager, thePresentation, theMode);
 
   if (!aReadyToDisplay)
@@ -169,7 +169,7 @@ void SketcherPrs_Radius::ComputeSelection(const Handle(SelectMgr_Selection)& aSe
   default: {
     // there are own selection modes, so the others should be ignored
     // otherwise, the text selection appears in the viewer
-    return; 
+    return;
   }
   }
   SetSelToleranceForText2d(SketcherPrs_Tools::getTextHeight());
index 6710652ce2fc21ad8eb0b5415ee88897e6cee7b9..28a455aa64a2f88cafe3a158f80a699e04236f56 100644 (file)
@@ -28,7 +28,7 @@ public:
   /// Constructor
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
-  Standard_EXPORT SketcherPrs_Radius(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_Radius(ModelAPI_Feature* theConstraint,
                         const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 
   /// Destructor
@@ -36,7 +36,7 @@ public:
 
   DEFINE_STANDARD_RTTI(SketcherPrs_Radius)
 
-  /// Returns true if the constraint feature arguments are correcly filled 
+  /// Returns true if the constraint feature arguments are correcly filled
   /// to build AIS presentation
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
index d2e993331f1bf79ac364849c2e29dfdb1a6aa629..ce56fdf9c540b8cbffb2fe0ef0ec572077bc1648 100644 (file)
 IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Rigid, SketcherPrs_SymbolPrs);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Rigid, SketcherPrs_SymbolPrs);
 
-static Handle(Image_AlienPixMap) MyPixMap; 
+static Handle(Image_AlienPixMap) MyPixMap;
 
 
 
-SketcherPrs_Rigid::SketcherPrs_Rigid(ModelAPI_Feature* theConstraint, 
-                                           const std::shared_ptr<GeomAPI_Ax3>& thePlane) 
+SketcherPrs_Rigid::SketcherPrs_Rigid(ModelAPI_Feature* theConstraint,
+                                           const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
 }
@@ -49,7 +49,7 @@ bool SketcherPrs_Rigid::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   bool aReadyToDisplay = false;
 
   std::shared_ptr<ModelAPI_Data> aData = theConstraint->data();
-  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = 
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr =
     aData->refattr(SketchPlugin_Constraint::ENTITY_A());
   AttributePtr aRefAttr = anAttr->attr();
   if (anAttr->isObject()) {
@@ -66,13 +66,13 @@ bool SketcherPrs_Rigid::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_Rigid::updateIfReadyToDisplay(double theStep) const 
+bool SketcherPrs_Rigid::updateIfReadyToDisplay(double theStep) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
 
   std::shared_ptr<ModelAPI_Data> aData = myConstraint->data();
-  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = 
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr =
     aData->refattr(SketchPlugin_Constraint::ENTITY_A());
   AttributePtr aRefAttr = anAttr->attr();
   if (anAttr->isObject()) {
@@ -93,7 +93,7 @@ bool SketcherPrs_Rigid::updateIfReadyToDisplay(double theStep) const
 }
 
 
-void SketcherPrs_Rigid::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+void SketcherPrs_Rigid::drawLines(const Handle(Prs3d_Presentation)& thePrs,
                                   Quantity_Color theColor) const
 {
   ObjectPtr aObj = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
@@ -117,7 +117,7 @@ void SketcherPrs_Rigid::drawLines(const Handle(Prs3d_Presentation)& thePrs,
     return;
 
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
-  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+  Handle(Graphic3d_AspectLine3d) aLineAspect =
     new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
index 1bb7b4a613b26a7845c4819de2c6b63da9e577f9..0f17fd12c4f0082dc79cd78cc1228cecbdafccd2 100644 (file)
@@ -25,7 +25,7 @@ public:
   /// Constructor
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
-  Standard_EXPORT SketcherPrs_Rigid(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_Rigid(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 
 
index ac9c93ba778c2e61ca36c9cb6d737af22e6404a3..22adc0442c61958223048a1254fd8ec645e87d51 100644 (file)
@@ -20,13 +20,13 @@ DEFINE_STANDARD_HANDLE(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity)
 */
 class SketcherPrs_SensitivePoint : public Select3D_SensitiveEntity
 {
-public: 
+public:
   //! Constructs a sensitive point object defined by the
   //! \param OwnerId an Id of the Owner.
   //! \param theId and Id of its point
   Standard_EXPORT SketcherPrs_SensitivePoint(const Handle(SelectBasics_EntityOwner)& OwnerId,
                                              int theId);
-  
+
   /// Returns number of sub-elements
   Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
 
@@ -55,7 +55,7 @@ public:
 
   DEFINE_STANDARD_RTTI(SketcherPrs_SensitivePoint)
 
-private: 
+private:
   int myId;
 };
 
index 2e2779c7b6963a8520656e3d55712b2a67e6cdeb..d88e2bb71e56ce44425c698355595e275301c5ff 100644 (file)
@@ -166,7 +166,7 @@ public:
       if (aDataType == GL_NONE)
         continue;
 
-      OpenGl_VertexBuffer::bindAttribute(theGlCtx, anAttrib.Id, aNbComp, 
+      OpenGl_VertexBuffer::bindAttribute(theGlCtx, anAttrib.Id, aNbComp,
                                          aDataType, Stride, anOffset);
       anOffset += Graphic3d_Attribute::Stride (anAttrib.DataType);
     }
@@ -205,7 +205,7 @@ class SketcherPrs_Element: public OpenGl_Element
 public:
   /// Constructor
   /// \param theObj a presentation
-  SketcherPrs_Element(const Handle(SketcherPrs_SymbolPrs)& theObj) : 
+  SketcherPrs_Element(const Handle(SketcherPrs_SymbolPrs)& theObj) :
   OpenGl_Element(), myObj(theObj) {}
 
   /// Render the current presentation
@@ -218,7 +218,7 @@ public:
 
   /// Releases OpenGL resources
   /// \param theContext OpenGL context
-  virtual void Release (OpenGl_Context* theContext) 
+  virtual void Release (OpenGl_Context* theContext)
   {
     if (!myObj.IsNull())
       myObj->Release(theContext);
@@ -235,7 +235,7 @@ OpenGl_Element* SymbolPrsCallBack(const CALL_DEF_USERDRAW * theUserDraw)
 {
   Handle(SketcherPrs_SymbolPrs) anIObj = (SketcherPrs_SymbolPrs*)theUserDraw->Data;
   if (anIObj.IsNull()) {
-    std::cout << 
+    std::cout <<
       "VUserDrawCallback error: null object passed, the custom scene element will not be rendered"
       << std::endl;
   }
@@ -251,7 +251,7 @@ IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_SymbolPrs, AIS_InteractiveObject);
 std::map<const char*, Handle(Image_AlienPixMap)> SketcherPrs_SymbolPrs::myIconsMap;
 
 
-SketcherPrs_SymbolPrs::SketcherPrs_SymbolPrs(ModelAPI_Feature* theConstraint, 
+SketcherPrs_SymbolPrs::SketcherPrs_SymbolPrs(ModelAPI_Feature* theConstraint,
                                              const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : AIS_InteractiveObject(), myConstraint(theConstraint), myPlane(thePlane), myIsConflicting(false)
 {
@@ -308,14 +308,14 @@ void SketcherPrs_SymbolPrs::prepareAspect()
   // Create an aspect with the icon
   if (myAspect.IsNull()) {
     Handle(Image_AlienPixMap) aIcon = icon();
-    if (aIcon.IsNull()) 
+    if (aIcon.IsNull())
       myAspect = new Graphic3d_AspectMarker3d();
     else
       myAspect = new Graphic3d_AspectMarker3d(aIcon);
   }
 }
 
-void SketcherPrs_SymbolPrs::addLine(const Handle(Graphic3d_Group)& theGroup, 
+void SketcherPrs_SymbolPrs::addLine(const Handle(Graphic3d_Group)& theGroup,
                                     std::string theAttrName) const
 {
   ObjectPtr aObj = SketcherPrs_Tools::getResult(myConstraint, theAttrName);
@@ -348,8 +348,8 @@ void SketcherPrs_SymbolPrs::HilightSelected(const Handle(PrsMgr_PresentationMana
 }
 
 void SketcherPrs_SymbolPrs::HilightOwnerWithColor(
-  const Handle(PrsMgr_PresentationManager3d)& thePM, 
-  const Quantity_NameOfColor theColor, 
+  const Handle(PrsMgr_PresentationManager3d)& thePM,
+  const Quantity_NameOfColor theColor,
   const Handle(SelectMgr_EntityOwner)& theOwner)
 {
   thePM->Color(this, theColor);
@@ -364,14 +364,14 @@ void SketcherPrs_SymbolPrs::HilightOwnerWithColor(
 
 void SketcherPrs_SymbolPrs::Compute(
   const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-  const Handle(Prs3d_Presentation)& thePresentation, 
+  const Handle(Prs3d_Presentation)& thePresentation,
   const Standard_Integer theMode)
 {
   // Create an icon
   prepareAspect();
 
   Handle(AIS_InteractiveContext) aCtx = GetContext();
-  Handle(OpenGl_GraphicDriver) aDriver = 
+  Handle(OpenGl_GraphicDriver) aDriver =
     Handle(OpenGl_GraphicDriver)::DownCast(aCtx->CurrentViewer()->Driver());
   if (!aDriver.IsNull()) {
     // register the custom element factory function
@@ -381,7 +381,7 @@ void SketcherPrs_SymbolPrs::Compute(
   // Update points with default shift value
   // it updates array of points if the presentation is ready to display, or the array of points
   // contains the previous values
-  
+
   bool aReadyToDisplay = updateIfReadyToDisplay(20);
 
   int aNbVertex = myPntArray->VertexNumber();
@@ -438,7 +438,7 @@ void SketcherPrs_SymbolPrs::SetConflictingConstraint(const bool& theConflicting,
   if (theConflicting)
   {
     if (!myAspect.IsNull())
-      myAspect->SetColor (Quantity_Color (theColor[0] / 255., theColor[1] / 255., 
+      myAspect->SetColor (Quantity_Color (theColor[0] / 255., theColor[1] / 255.,
                           theColor[2] / 255., Quantity_TOC_RGB));
     myIsConflicting = true;
   }
@@ -455,7 +455,7 @@ void SketcherPrs_SymbolPrs::Render(const Handle(OpenGl_Workspace)& theWorkspace)
   // this method is a combination of OCCT OpenGL functions. The main purpose is to have
   // equal distance from the source object to symbol indpendently of zoom.
   // It is base on OCCT 6.9.1 and might need changes when using later OCCT versions.
-  // The specific SHAPER modifications are marked by ShaperModification:start/end, 
+  // The specific SHAPER modifications are marked by ShaperModification:start/end,
   // other is OCCT code
 
   // do not update presentation for invalid or already removed objects: the presentation
@@ -466,7 +466,7 @@ void SketcherPrs_SymbolPrs::Render(const Handle(OpenGl_Workspace)& theWorkspace)
   const OpenGl_AspectMarker* anAspectMarker = theWorkspace->AspectMarker(Standard_True);
   const Handle(OpenGl_Context)& aCtx = theWorkspace->GetGlContext();
   Handle(OpenGl_View) aView = theWorkspace->ActiveView();
-  
+
   // ShaperModification:start
   double aScale = aView->Camera()->Scale();
   // Update points coordinate taking the viewer scale into account
@@ -481,29 +481,29 @@ void SketcherPrs_SymbolPrs::Render(const Handle(OpenGl_Workspace)& theWorkspace)
   }
 
   // Update drawing attributes
-  if (!myVboAttribs->init(aCtx, 0, aAttribs->NbElements, 
+  if (!myVboAttribs->init(aCtx, 0, aAttribs->NbElements,
                           aAttribs->Data(), GL_NONE, aAttribs->Stride)) {
     myVboAttribs->Release (aCtx.operator->());
     myVboAttribs.Nullify();
     return;
   }
-    
+
   Handle(OpenGl_Texture) aTextureBack = theWorkspace->DisableTexture();
 
   const Handle(OpenGl_PointSprite)& aSpriteNorm = anAspectMarker->SpriteRes(aCtx);
-      
+
   if (!aSpriteNorm.IsNull() && !aSpriteNorm->IsDisplayList()) {
     // ShaperModification:start : filling the presentation with color if there is a conflict
-    const bool toHilight = 
+    const bool toHilight =
       (theWorkspace->NamedStatus & OPENGL_NS_HIGHLIGHT) != 0 || myIsConflicting;
     // ShaperModification:end
 
-    const Handle(OpenGl_PointSprite)& aSprite = 
-      (toHilight && anAspectMarker->SpriteHighlightRes(aCtx)->IsValid())? 
+    const Handle(OpenGl_PointSprite)& aSprite =
+      (toHilight && anAspectMarker->SpriteHighlightRes(aCtx)->IsValid())?
                                               anAspectMarker->SpriteHighlightRes(aCtx)
                                               : aSpriteNorm;
     theWorkspace->EnableTexture (aSprite);
-    aCtx->ShaderManager()->BindProgram(anAspectMarker, aSprite, Standard_False, 
+    aCtx->ShaderManager()->BindProgram(anAspectMarker, aSprite, Standard_False,
                                        Standard_False, anAspectMarker->ShaderProgramRes(aCtx));
     const TEL_COLOUR* aLineColor  =  &anAspectMarker->Color();
     if (theWorkspace->NamedStatus & OPENGL_NS_HIGHLIGHT)
@@ -557,27 +557,27 @@ void SketcherPrs_SymbolPrs::Release (OpenGl_Context* theContext)
   }
 }
 
-void SketcherPrs_SymbolPrs::drawShape(const std::shared_ptr<GeomAPI_Shape>& theShape, 
+void SketcherPrs_SymbolPrs::drawShape(const std::shared_ptr<GeomAPI_Shape>& theShape,
                                       const Handle(Prs3d_Presentation)& thePrs) const
 {
   if (theShape->isEdge()) {
     // The shape is edge
-    std::shared_ptr<GeomAPI_Curve> aCurve = 
+    std::shared_ptr<GeomAPI_Curve> aCurve =
       std::shared_ptr<GeomAPI_Curve>(new GeomAPI_Curve(theShape));
     if (aCurve->isLine()) {
       // The shape is line
-      GeomAdaptor_Curve 
+      GeomAdaptor_Curve
         aCurv(aCurve->impl<Handle(Geom_Curve)>(), aCurve->startParam(), aCurve->endParam());
       StdPrs_Curve::Add(thePrs, aCurv, myDrawer);
     } else {
       // The shape is circle or arc
-      GeomAdaptor_Curve 
+      GeomAdaptor_Curve
         aAdaptor(aCurve->impl<Handle(Geom_Curve)>(), aCurve->startParam(), aCurve->endParam());
       StdPrs_DeflectionCurve::Add(thePrs,aAdaptor,myDrawer);
     }
   } else if (theShape->isVertex()) {
     // draw vertex
-    std::shared_ptr<GeomAPI_Vertex> aVertex = 
+    std::shared_ptr<GeomAPI_Vertex> aVertex =
       std::shared_ptr<GeomAPI_Vertex>(new GeomAPI_Vertex(theShape));
     std::shared_ptr<GeomAPI_Pnt> aPnt = aVertex->point();
     Handle(Geom_CartesianPoint) aPoint = new Geom_CartesianPoint(aPnt->impl<gp_Pnt>());
@@ -586,7 +586,7 @@ void SketcherPrs_SymbolPrs::drawShape(const std::shared_ptr<GeomAPI_Shape>& theS
 }
 
 void SketcherPrs_SymbolPrs::drawListOfShapes(
-  const std::shared_ptr<ModelAPI_AttributeRefList>& theListAttr, 
+  const std::shared_ptr<ModelAPI_AttributeRefList>& theListAttr,
   const Handle(Prs3d_Presentation)& thePrs) const
 {
   int aNb = theListAttr->size();
index 54b2bd290527bb567a3392572556b38569661f20..622230433a0ba46daf70a8abb6d957cc2a758fec 100644 (file)
@@ -39,20 +39,20 @@ public:
   /// Constructor
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
-  Standard_EXPORT SketcherPrs_SymbolPrs(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_SymbolPrs(ModelAPI_Feature* theConstraint,
                         const std::shared_ptr<GeomAPI_Ax3>& thePlane);
-  
+
   virtual ~SketcherPrs_SymbolPrs();
 
   //! Method which draws selected owners ( for fast presentation draw )
   Standard_EXPORT virtual void HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM,
                                                const SelectMgr_SequenceOfOwner& theOwners);
-  
+
   //! Method which hilight an owner belonging to
   //! this selectable object  ( for fast presentation draw )
   Standard_EXPORT virtual void HilightOwnerWithColor(
     const Handle(PrsMgr_PresentationManager3d)& thePM,
-    const Quantity_NameOfColor theColor, 
+    const Quantity_NameOfColor theColor,
     const Handle(SelectMgr_EntityOwner)& theOwner);
 
   /// Returns sketcher plane
@@ -69,7 +69,7 @@ public:
   /// when constraint become not conflicting
   /// \param theConflicting a state
   /// \param theColor a color for conflicting object
-  Standard_EXPORT void SetConflictingConstraint(const bool& theConflicting, 
+  Standard_EXPORT void SetConflictingConstraint(const bool& theConflicting,
                                                 const std::vector<int>& theColor);
 
   /// Render of the presentation
@@ -125,13 +125,13 @@ protected:
   /// Draw a shape into the given presentation scene
   /// \param theShape the shape to draw
   /// \param thePrs the presentation scene
-  void drawShape(const std::shared_ptr<GeomAPI_Shape>& theShape, 
+  void drawShape(const std::shared_ptr<GeomAPI_Shape>& theShape,
     const Handle(Prs3d_Presentation)& thePrs) const;
 
   /// Draw a list of shapes stored in a RefListAttribute
   /// \param theListAttr the attribute of reference3s list
   /// \param thePrs the presentation scene
-  void drawListOfShapes(const std::shared_ptr<ModelAPI_AttributeRefList>& theListAttr, 
+  void drawListOfShapes(const std::shared_ptr<ModelAPI_AttributeRefList>& theListAttr,
                         const Handle(Prs3d_Presentation)& thePrs) const;
 
 protected:
@@ -150,7 +150,7 @@ protected:
   /// An owner object of the presentation
   Handle(SelectMgr_EntityOwner) myOwner;
 
-private: 
+private:
   /// Static map to collect constraints icons {IconName : IconPixMap}
   static std::map<const char*, Handle(Image_AlienPixMap)> myIconsMap;
 
index a857c3955351f0859c07fda47af5c8c0e8cb315b..640b3b9ab0d8e11cbc756eee3cd9919ec7ab0467 100644 (file)
@@ -23,24 +23,24 @@ IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Tangent, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
 
-SketcherPrs_Tangent::SketcherPrs_Tangent(ModelAPI_Feature* theConstraint, 
-                                           const std::shared_ptr<GeomAPI_Ax3>& thePlane) 
+SketcherPrs_Tangent::SketcherPrs_Tangent(ModelAPI_Feature* theConstraint,
+                                           const std::shared_ptr<GeomAPI_Ax3>& thePlane)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane)
 {
   // Init default points
   myPntArray = new Graphic3d_ArrayOfPoints(2);
   myPntArray->AddVertex(0., 0., 0.);
   myPntArray->AddVertex(0., 0., 0.);
-}  
+}
 
 bool SketcherPrs_Tangent::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
                                            const std::shared_ptr<GeomAPI_Ax3>&/* thePlane*/)
 {
   bool aReadyToDisplay = false;
 
-  ObjectPtr aObj1 = 
+  ObjectPtr aObj1 =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = 
+  ObjectPtr aObj2 =
     SketcherPrs_Tools::getResult(theConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   aReadyToDisplay = SketcherPrs_Tools::getShape(aObj1).get() != NULL &&
@@ -54,9 +54,9 @@ bool SketcherPrs_Tangent::updateIfReadyToDisplay(double theStep) const
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
 
-  ObjectPtr aObj1 = 
+  ObjectPtr aObj1 =
     SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
-  ObjectPtr aObj2 = 
+  ObjectPtr aObj2 =
     SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
 
   // Compute points coordinates
@@ -68,12 +68,12 @@ bool SketcherPrs_Tangent::updateIfReadyToDisplay(double theStep) const
   return true;
 }
 
-void SketcherPrs_Tangent::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+void SketcherPrs_Tangent::drawLines(const Handle(Prs3d_Presentation)& thePrs,
                                     Quantity_Color theColor) const
 {
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(thePrs);
 
-  Handle(Graphic3d_AspectLine3d) aLineAspect = 
+  Handle(Graphic3d_AspectLine3d) aLineAspect =
     new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
index a3cf98bbdeaa08a66d33a965a440c2b40160e837..cc2b0cc0537ffd9fff0ab28d5e9bd5728dde6dbf 100644 (file)
@@ -24,7 +24,7 @@ public:
   /// Constructor
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
-  Standard_EXPORT SketcherPrs_Tangent(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_Tangent(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 
   DEFINE_STANDARD_RTTI(SketcherPrs_Tangent)
index 8335807013ac95fc9186879c4f0bf8e504c77536..04611afa7a199db46a51214f202f1a1c3104635b 100644 (file)
@@ -88,13 +88,13 @@ std::shared_ptr<GeomAPI_Pnt2d> getPoint(ModelAPI_Feature* theFeature,
 }
 
 //*************************************************************************************
-/// Find an attribute of the given object which corresponds to a vetrex 
+/// Find an attribute of the given object which corresponds to a vetrex
 /// defined by a shape
 /// \param theObject an object
 /// \param theShape a vertex
 /// \param thePlane a projection plane (sketcher plane)
-std::shared_ptr<GeomDataAPI_Point2D> findGeomPoint(ObjectPtr theObject, 
-                                    const TopoDS_Shape& theShape, 
+std::shared_ptr<GeomDataAPI_Point2D> findGeomPoint(ObjectPtr theObject,
+                                    const TopoDS_Shape& theShape,
                                     const std::shared_ptr<GeomAPI_Ax3>& thePlane)
 {
   std::shared_ptr<GeomDataAPI_Point2D> aGeomPoint;
@@ -109,12 +109,12 @@ std::shared_ptr<GeomDataAPI_Point2D> findGeomPoint(ObjectPtr theObject,
             new GeomAPI_Pnt(aShapePoint.X(), aShapePoint.Y(), aShapePoint.Z()));
 
         // find the given point in the feature attributes
-        std::list<AttributePtr> anObjectAttiributes = 
+        std::list<AttributePtr> anObjectAttiributes =
           anObjectFeature->data()->attributes(GeomDataAPI_Point2D::typeId());
-        std::list<AttributePtr>::const_iterator anIt = anObjectAttiributes.begin(), 
+        std::list<AttributePtr>::const_iterator anIt = anObjectAttiributes.begin(),
                                                 aLast = anObjectAttiributes.end();
         for (; anIt != aLast && !aGeomPoint; anIt++) {
-          std::shared_ptr<GeomDataAPI_Point2D> anAttributePoint = 
+          std::shared_ptr<GeomDataAPI_Point2D> anAttributePoint =
             std::dynamic_pointer_cast<GeomDataAPI_Point2D>(*anIt);
 
           std::shared_ptr<GeomAPI_Pnt> anAttributePnt = thePlane->to3D(anAttributePoint->x(),
@@ -181,7 +181,7 @@ FeaturePtr getFeatureLine(DataPtr theData,
   if (!theData.get() || !theData->isValid()) /// essential check as it is called in openGl thread)
     return aLine;
 
-  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = 
+  std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr =
     std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theData->attribute(theAttribute));
   if (anAttr) {
     FeaturePtr aFeature = ModelAPI_Feature::feature(anAttr->object());
@@ -271,7 +271,7 @@ std::shared_ptr<GeomAPI_Pnt> getAnchorPoint(const ModelAPI_Feature* theConstrain
   } else if (aFeature->getKind() == SketchPlugin_Circle::ID()) { // circle
     aCenter = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
         aFeature->attribute(SketchPlugin_Circle::CENTER_ID()))->pnt();
-  } else 
+  } else
     return std::shared_ptr<GeomAPI_Pnt>();
 
   std::shared_ptr<GeomAPI_Pnt2d> anOrigin(new GeomAPI_Pnt2d(0.0, 0.0));
@@ -310,7 +310,7 @@ Handle(Prs3d_DimensionAspect) createDimensionAspect()
   return anAspect;
 }
 
-void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect, 
+void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect,
                   double theDimValue, double theTextSize)
 {
   double anArrowLength = theDimAspect->ArrowAspect()->Length();
@@ -333,7 +333,7 @@ void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect,
 
 void sendEmptyPresentationError(ModelAPI_Feature* theFeature, const std::string theError)
 {
-  Events_InfoMessage("SketcherPrs_Tools", 
+  Events_InfoMessage("SketcherPrs_Tools",
     "An empty AIS presentation: SketcherPrs_LengthDimension").send();
   static const Events_ID anEvent = Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION);
   std::shared_ptr<ModelAPI_Object> aConstraintPtr(theFeature);
index ed6fd0bf06ff96c9b78a517b7bd68c6f3a97e3a2..ac76fdac95075eacdb1bbbb54db200ec1c16096c 100644 (file)
@@ -62,14 +62,14 @@ namespace SketcherPrs_Tools {
   /// Enumeration with modes for activation of selection custom presentations
   enum SelectionModes {
     /// Start of enumeration
-    Sel_Mode_First = 100, 
-  
+    Sel_Mode_First = 100,
+
     /// Selection mode for all constraints exclude dimensions
     Sel_Constraint,
-  
+
     /// Selection mode for whole dimension
     Sel_Dimension_All,
-  
+
     /// Selection mode for line of dimension
     Sel_Dimension_Line,
 
index 1058aeb8f8d2c57781ef25a22072b589f7764ca7..785267baa8c79117766439458be969075b5c712e 100644 (file)
@@ -28,12 +28,12 @@ IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Transformation, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
 
-SketcherPrs_Transformation::SketcherPrs_Transformation(ModelAPI_Feature* theConstraint, 
+SketcherPrs_Transformation::SketcherPrs_Transformation(ModelAPI_Feature* theConstraint,
                                            const std::shared_ptr<GeomAPI_Ax3>& thePlane,
-                                           bool isTranslation) 
+                                           bool isTranslation)
  : SketcherPrs_SymbolPrs(theConstraint, thePlane), myIsTranslation(isTranslation)
 {
-}  
+}
 
 bool SketcherPrs_Transformation::IsReadyToDisplay(ModelAPI_Feature* theConstraint,
                                                   const std::shared_ptr<GeomAPI_Ax3>&/* thePlane*/)
@@ -42,7 +42,7 @@ bool SketcherPrs_Transformation::IsReadyToDisplay(ModelAPI_Feature* theConstrain
 
   std::shared_ptr<ModelAPI_Data> aData = theConstraint->data();
   // Get transformated objects list
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = 
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB =
     aData->reflist(SketchPlugin_Constraint::ENTITY_B());
   if (anAttrB.get() == NULL)
     return aReadyToDisplay;
@@ -59,12 +59,12 @@ bool SketcherPrs_Transformation::IsReadyToDisplay(ModelAPI_Feature* theConstrain
     AttributePoint2DPtr aEnd = GeomDataAPI_Point2D::getPoint2D(aData,
                                             SketchPlugin_MultiTranslation::END_POINT_ID());
 
-    aReadyToDisplay = 
+    aReadyToDisplay =
       aStart.get() && aEnd.get() && aStart->isInitialized() && aEnd->isInitialized();
   }
   else if (theConstraint->getKind() == SketchPlugin_MultiRotation::ID()) {
     // if it is rotation
-    AttributePoint2DPtr aCenter = 
+    AttributePoint2DPtr aCenter =
       GeomDataAPI_Point2D::getPoint2D(aData, SketchPlugin_MultiRotation::CENTER_ID());
     aReadyToDisplay = aCenter.get() && aCenter->isInitialized();
   }
@@ -72,7 +72,7 @@ bool SketcherPrs_Transformation::IsReadyToDisplay(ModelAPI_Feature* theConstrain
   return aReadyToDisplay;
 }
 
-bool SketcherPrs_Transformation::updateIfReadyToDisplay(double theStep) const 
+bool SketcherPrs_Transformation::updateIfReadyToDisplay(double theStep) const
 {
   if (!IsReadyToDisplay(myConstraint, myPlane))
     return false;
@@ -104,16 +104,16 @@ bool SketcherPrs_Transformation::updateIfReadyToDisplay(double theStep) const
       continue;
     aP1 = aMgr->getPosition(aObj, this, theStep);
     myPntArray->SetVertice(i + 1, aP1);
-  }  
+  }
 
   return true;
 }
 
-void SketcherPrs_Transformation::drawLines(const Handle(Prs3d_Presentation)& thePrs, 
+void SketcherPrs_Transformation::drawLines(const Handle(Prs3d_Presentation)& thePrs,
                                            Quantity_Color theColor) const
 {
   std::shared_ptr<ModelAPI_Data> aData = myConstraint->data();
-  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB = 
+  std::shared_ptr<ModelAPI_AttributeRefList> anAttrB =
     aData->reflist(SketchPlugin_Constraint::ENTITY_B());
   if (anAttrB.get() == NULL)
     return;
index 068ac7c09b72606e41bb24c48e9303de31b51421..41986751735091144f24432a382797c172a8e171 100644 (file)
@@ -25,7 +25,7 @@ public:
   /// \param theConstraint a constraint feature
   /// \param thePlane a coordinate plane of current sketch
   /// \param isTranslation a flag is it translation or rotation
-  Standard_EXPORT SketcherPrs_Transformation(ModelAPI_Feature* theConstraint, 
+  Standard_EXPORT SketcherPrs_Transformation(ModelAPI_Feature* theConstraint,
                                          const std::shared_ptr<GeomAPI_Ax3>& thePlane,
                                          bool isTranslation);
 
index 510c56c33d90bc991813dfaada5b92b7c0ceb787..26e33d3e2cc51f542871b3880c4f26c80aafcf1a 100644 (file)
@@ -108,13 +108,13 @@ void XGUI_ActionsMgr::updateCommandsStatus()
   ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
                                                          (myOperationMgr->currentOperation());
   if (aFOperation) {
-    anActiveFeature = aFOperation->feature();  
+    anActiveFeature = aFOperation->feature();
     QStringList aNested = allNestedCommands(aFOperation);
     foreach(QString aAction, myActions.keys()) {
       if (!aNested.contains(aAction))
         setActionEnabled(aAction, false);
     }
-  } else 
+  } else
     setNestedCommandsEnabled(false);
 
   updateByPlugins(anActiveFeature);
@@ -252,7 +252,7 @@ QAction* XGUI_ActionsMgr::operationStateAction(OperationStateActionId theId)
       }
       break;
       case Preview: {
-        aResult = ModuleBase_Tools::createAction(QIcon(), tr("See preview"), 
+        aResult = ModuleBase_Tools::createAction(QIcon(), tr("See preview"),
                                                  aParent, 0, 0, "Compute preview");
         aResult->setStatusTip(aResult->toolTip());
       }
@@ -315,7 +315,7 @@ void XGUI_ActionsMgr::setNestedCommandsEnabled(bool theEnabled, const QString& t
 
 void XGUI_ActionsMgr::setNestedStackEnabled(ModuleBase_Operation* theOperation)
 {
-  ModuleBase_OperationFeature* anOperation = 
+  ModuleBase_OperationFeature* anOperation =
     dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
   if(!anOperation || !anOperation->feature())
     return;
@@ -330,7 +330,7 @@ void XGUI_ActionsMgr::setNestedStackEnabled(ModuleBase_Operation* theOperation)
 QStringList XGUI_ActionsMgr::allNestedCommands(ModuleBase_Operation* theOperation)
 {
   QStringList aFeatures;
-  ModuleBase_OperationFeature* anOperation = 
+  ModuleBase_OperationFeature* anOperation =
     dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
   if(!anOperation || !anOperation->feature())
     return aFeatures;
index 191965da639123b55fa25952f0a22916bfe43dab..27f43885a54127178f6cb000471f76418cd3f2af 100644 (file)
@@ -84,7 +84,7 @@ class XGUI_EXPORT XGUI_ActionsMgr : public QObject, public Events_Listener
   /// Return an action by the given id, if it was registered in the manager
   QAction* action(const QString& theId);
 
-  /// Return info (icon, text, etc) about the action by the given id, 
+  /// Return info (icon, text, etc) about the action by the given id,
   /// if it was registered in the manager
   ActionInfo actionInfoById(const QString& theId);
 
@@ -100,23 +100,23 @@ class XGUI_EXPORT XGUI_ActionsMgr : public QObject, public Events_Listener
 
   //! Updates actions according to current selection in the viewer
   void updateOnViewSelection();
-  
+
   //! Sets all actions to enabled state.
   void setAllEnabled();
-  
+
   //! Sets all nested actions to isEnabled state for the command with given ID.
   //! If ID is empty - all nested actions will be affected.
   void setNestedCommandsEnabled(bool isEnabled, const QString& theParent = QString());
-  
+
   //! Sets to enabled state all siblings of the given operation and it's parents recursively
   void setNestedStackEnabled(ModuleBase_Operation* theOperation);
-  
+
   //! Sets the action with theId to theChecked state.
   void setActionChecked(const QString& theId, const bool theChecked);
-  
+
   //! Sets the action with theId to theEnabled state.
   void setActionEnabled(const QString& theId, const bool theEnabled);
-  
+
   //! Updates actions according to their "document" tag
   void updateByDocumentKind();
 
index 0df84128dff23c79fcadc038edb620e2983849e9..8c6948b9f6d00bf260e56e23de28497e18ddb5bb 100644 (file)
@@ -85,7 +85,7 @@ void appendValues(std::vector<int>& theRGB, const int theRed, const int theGreen
 
 bool containsValues(std::map<int, std::vector<int> >& theColorMap, std::vector<int>& theValues)
 {
-  std::map<int, std::vector<int> >::const_iterator anIt = theColorMap.begin(), 
+  std::map<int, std::vector<int> >::const_iterator anIt = theColorMap.begin(),
                                                    aLast = theColorMap.end();
   bool isFound = false;
   for (; anIt != aLast && !isFound; anIt++) {
index 6dbee367efcd52c34d6bd7c510e412e7054cf612..661b2780802d652797f0f29c1e0984b6e11206db 100644 (file)
@@ -38,14 +38,14 @@ public:
   /// \param theValue an RGB components value
   void setColor(const std::vector<int>& theValue);
 
-  /// Returns a container with the current color value. 
+  /// Returns a container with the current color value.
   /// These are tree int values for RGB definition.
-  /// These value is depend on the random choice and eighter 
+  /// These value is depend on the random choice and eighter
   /// a next random color or a certain color.
   /// \return a vector of values
   std::vector<int> getColor() const;
 
-  /// Returns a container with the current color value. 
+  /// Returns a container with the current color value.
   /// These are tree int values for RGB definition.
   /// It returns the next random color.
   /// \return a vector of values
index 1bef5f51f1e98a28bd895544811a241319328745..b99cfdd6b3aae3a3fd58c1336b82a6dc3ee8ff82 100644 (file)
@@ -218,7 +218,7 @@ void XGUI_ContextMenuMgr::onContextMenuRequest(QContextMenuEvent* theEvent)
   }
 }
 
-void XGUI_ContextMenuMgr::updateObjectBrowserMenu() 
+void XGUI_ContextMenuMgr::updateObjectBrowserMenu()
 {
   foreach(QAction* aAction, myActions)
     aAction->setEnabled(false);
@@ -340,7 +340,7 @@ void XGUI_ContextMenuMgr::updateViewerMenu()
 
   XGUI_SelectionMgr* aSelMgr = myWorkshop->selector();
   XGUI_Displayer* aDisplayer = myWorkshop->displayer();
-  QList<ModuleBase_ViewerPrsPtr> aPrsList = 
+  QList<ModuleBase_ViewerPrsPtr> aPrsList =
     aSelMgr->selection()->getSelected(ModuleBase_ISelection::Viewer);
   if (aPrsList.size() > 0) {
     bool isVisible = false;
@@ -353,7 +353,7 @@ void XGUI_ContextMenuMgr::updateViewerMenu()
       if (aRes && aRes->isDisplayed()) {
         isVisible = true;
         canBeShaded = myWorkshop->displayer()->canBeShaded(aObject);
-        isShading = 
+        isShading =
           (myWorkshop->displayer()->displayMode(aObject) == XGUI_Displayer::Shading);
         break;
       }
@@ -394,10 +394,10 @@ void XGUI_ContextMenuMgr::updateViewerMenu()
   } else {
     foreach(int aMode, aModes) {
       switch (aMode) {
-      case TopAbs_VERTEX: 
+      case TopAbs_VERTEX:
         action("SELECT_VERTEX_CMD")->setChecked(true);
         break;
-      case TopAbs_EDGE: 
+      case TopAbs_EDGE:
         action("SELECT_EDGE_CMD")->setChecked(true);
         break;
       case TopAbs_FACE:
@@ -407,7 +407,7 @@ void XGUI_ContextMenuMgr::updateViewerMenu()
         action("SELECT_RESULT_CMD")->setChecked(true);
       }
     }
-  } 
+  }
 
   ModuleBase_IModule* aModule = myWorkshop->module();
   if (aModule)
@@ -566,7 +566,7 @@ void XGUI_ContextMenuMgr::addObjBrowserMenu(QMenu* theMenu) const
 void XGUI_ContextMenuMgr::addViewerMenu(QMenu* theMenu) const
 {
   XGUI_SelectionMgr* aSelMgr = myWorkshop->selector();
-  QList<ModuleBase_ViewerPrsPtr> aPrsList = 
+  QList<ModuleBase_ViewerPrsPtr> aPrsList =
     aSelMgr->selection()->getSelected(ModuleBase_ISelection::Viewer);
   int aSelected = aPrsList.size();
   QActionsList aActions;
@@ -658,7 +658,7 @@ void XGUI_ContextMenuMgr::onRename()
 {
   QObjectPtrList anObjects = myWorkshop->selector()->selection()->selectedObjects();
   if (!myWorkshop->abortAllOperations())
-    return; 
+    return;
   // restore selection in case if dialog box was shown
   myWorkshop->objectBrowser()->setObjectsSelected(anObjects);
   myWorkshop->objectBrowser()->onEditItem();
@@ -686,18 +686,18 @@ void XGUI_ContextMenuMgr::addFeatures(QMenu* theMenu) const
         return;
       if ((!aIsRoot) && (aIdx.internalPointer() != aActiveDoc.get()))
         return;
-      
+
       // Get name of the selected index
       aName = aIdx.data().toString();
       aLen = aName.indexOf('(');
       if (aLen != -1) {
         aName = aName.left(--aLen);
       }
-      std::string aFeaturesStr = aIsRoot? 
+      std::string aFeaturesStr = aIsRoot?
         aDataModelXML->rootFolderFeatures(aName.toStdString()) :
         aDataModelXML->subFolderFeatures(aName.toStdString());
         if (aFeaturesStr.length() > 0) {
-          QStringList aFeturesList = 
+          QStringList aFeturesList =
             QString(aFeaturesStr.c_str()).split(",", QString::SkipEmptyParts);
           foreach(QString aFea, aFeturesList) {
             QAction* aAction = aActionMgr->action(aFea);
index 8b2b3eee85b409f441d7024acc9c0c0e999c2349..f4690749783f850042892a955f0ab75a80f5aab2 100644 (file)
@@ -45,7 +45,7 @@ void getColor(const ResultPtr& theResult, std::vector<int>& theColor)
 {
   theColor.clear();
   // get color from the attribute of the result
-  if (theResult.get() != NULL && 
+  if (theResult.get() != NULL &&
       theResult->data()->attribute(ModelAPI_Result::COLOR_ID()).get() != NULL) {
     AttributeIntArrayPtr aColorAttr = theResult->data()->intArray(ModelAPI_Result::COLOR_ID());
     if (aColorAttr.get() && aColorAttr->size()) {
@@ -72,7 +72,7 @@ void XGUI_CustomPrs::getDefaultColor(ObjectPtr theObject, const bool isEmptyColo
     // all AIS objects, where the color is not set, are in black.
     // The color should be defined in XML or set in the attribute
     theColor = Config_PropManager::color("Visualization", "object_default_color", "#000000");
-    Events_InfoMessage("XGUI_CustomPrs", 
+    Events_InfoMessage("XGUI_CustomPrs",
       "A default color is not defined in the preferences for this kind of result").send();
   }
 }
@@ -137,7 +137,7 @@ bool XGUI_CustomPrs::customisePresentation(ResultPtr theResult, AISObjectPtr the
     SessionPtr aMgr = ModelAPI_Session::get();
     if (aMgr->activeDocument() != theResult->document()) {
       QColor aQColor(aColor[0], aColor[1], aColor[2]);
-      QColor aNewColor = 
+      QColor aNewColor =
         QColor::fromHsvF(aQColor.hueF(), aQColor.saturationF()/3., aQColor.valueF());
       aColor[0] = aNewColor.red();
       aColor[1] = aNewColor.green();
index 724553906cfc994de3f6dd259bc77b00613b3411..8d05f330f8e5fd08e0a725ff6169aa0ef005167f 100644 (file)
@@ -118,7 +118,7 @@ void XGUI_DataModel::processEvent(const std::shared_ptr<Events_Message>& theMess
             if (aFolderId != -1) {
               insertRow(aRow, createIndex(aFolderId, 0, -1));
             }
-          } 
+          }
         }
       } else {
         // Object created in sub-document
@@ -270,7 +270,7 @@ void XGUI_DataModel::processEvent(const std::shared_ptr<Events_Message>& theMess
         // Update a group under root
         if (aGroup == myXMLReader->rootType()) // Update objects under root
           aStartId = foldersCount();
-        else // Update objects in folder under root 
+        else // Update objects in folder under root
           aParent = createIndex(folderId(aGroup), 0, -1);
       } else {
         // Update a sub-document
@@ -278,7 +278,7 @@ void XGUI_DataModel::processEvent(const std::shared_ptr<Events_Message>& theMess
           // Update sub-document root
           aParent = findDocumentRootIndex(aDoc.get());
           aStartId = foldersCount(aDoc.get());
-        } else 
+        } else
           // update folder in sub-document
           aParent = createIndex(folderId(aGroup, aDoc.get()), 0, aDoc.get());
       }
@@ -293,11 +293,11 @@ void XGUI_DataModel::processEvent(const std::shared_ptr<Events_Message>& theMess
       QModelIndex aDocRoot = findDocumentRootIndex(aDoc.get());
       if (aDocRoot.isValid())
         emit dataChanged(aDocRoot, aDocRoot);
-      else 
+      else
         // We have got a new document
         rebuildDataTree();
     }
-  } 
+  }
 }
 
 //******************************************************
@@ -361,15 +361,15 @@ QModelIndex XGUI_DataModel::objectIndex(const ObjectPtr theObject) const
     }
     if (aRow == -1)
       return QModelIndex();
-    else 
+    else
       return createIndex(aRow, 0, theObject.get());
   }
   SessionPtr aSession = ModelAPI_Session::get();
   DocumentPtr aRootDoc = aSession->moduleDocument();
-  if (aDoc == aRootDoc && myXMLReader->rootType() == aType) { 
+  if (aDoc == aRootDoc && myXMLReader->rootType() == aType) {
     // The object from root document
     aRow += foldersCount();
-  } else if (myXMLReader->subType() == aType) { 
+  } else if (myXMLReader->subType() == aType) {
     // The object from sub document
     aRow += foldersCount(aDoc.get());
   }
@@ -394,7 +394,7 @@ QVariant XGUI_DataModel::data(const QModelIndex& theIndex, int theRole) const
   if (aParentId == -1) { // root folders
     switch (theRole) {
       case Qt::DisplayRole:
-        return QString(myXMLReader->rootFolderName(theIndexRow).c_str()) + 
+        return QString(myXMLReader->rootFolderName(theIndexRow).c_str()) +
           QString(" (%1)").arg(rowCount(theIndex));
       case Qt::DecorationRole:
         return QIcon(myXMLReader->rootFolderIcon(theIndexRow).c_str());
@@ -422,12 +422,12 @@ QVariant XGUI_DataModel::data(const QModelIndex& theIndex, int theRole) const
     if (aSubDoc) { // this is a folder of sub document
       QIntList aMissedIdx = missedFolderIndexes(aSubDoc);
       int aRow = theIndexRow;
-      while (aMissedIdx.contains(aRow)) 
+      while (aMissedIdx.contains(aRow))
         aRow++;
 
       switch (theRole) {
         case Qt::DisplayRole:
-          return QString(myXMLReader->subFolderName(aRow).c_str()) + 
+          return QString(myXMLReader->subFolderName(aRow).c_str()) +
             QString(" (%1)").arg(rowCount(theIndex));
         case Qt::DecorationRole:
           return QIcon(myXMLReader->subFolderIcon(aRow).c_str());
@@ -439,7 +439,7 @@ QVariant XGUI_DataModel::data(const QModelIndex& theIndex, int theRole) const
         {
           if (aObj->groupName() == ModelAPI_ResultParameter::group()) {
             ModelAPI_ResultParameter* aParam = dynamic_cast<ModelAPI_ResultParameter*>(aObj);
-            AttributeDoublePtr aValueAttribute = 
+            AttributeDoublePtr aValueAttribute =
               aParam->data()->real(ModelAPI_ResultParameter::VALUE());
             QString aVal = QString::number(aValueAttribute->value());
             QString aTitle = QString(aObj->data()->name().c_str());
@@ -488,7 +488,7 @@ int XGUI_DataModel::rowCount(const QModelIndex& theParent) const
   }
 
   int aId = theParent.internalId();
-  if (aId == -1) { 
+  if (aId == -1) {
     // this is a folder under root
     int aParentPos = theParent.row();
     std::string aType = myXMLReader->rootFolderType(aParentPos);
@@ -496,11 +496,11 @@ int XGUI_DataModel::rowCount(const QModelIndex& theParent) const
   } else {
     // It is an object which could have children
     ModelAPI_Document* aDoc = getSubDocument(theParent.internalPointer());
-    if (aDoc) { 
+    if (aDoc) {
       // a folder of sub-document
       QIntList aMissedIdx = missedFolderIndexes(aDoc);
       int aRow = theParent.row();
-      while (aMissedIdx.contains(aRow)) 
+      while (aMissedIdx.contains(aRow))
         aRow++;
       std::string aType = myXMLReader->subFolderType(aRow);
       return aDoc->size(aType);
@@ -522,10 +522,10 @@ int XGUI_DataModel::rowCount(const QModelIndex& theParent) const
       } else {
         // Check for composite object
         ModelAPI_CompositeFeature* aCompFeature = dynamic_cast<ModelAPI_CompositeFeature*>(aObj);
-        if (aCompFeature) 
+        if (aCompFeature)
           return aCompFeature->numberOfSubs(true);
         ModelAPI_ResultCompSolid* aCompRes = dynamic_cast<ModelAPI_ResultCompSolid*>(aObj);
-        if (aCompRes) 
+        if (aCompRes)
           return aCompRes->numberOfSubs(true);
       }
     }
@@ -571,7 +571,7 @@ QModelIndex XGUI_DataModel::index(int theRow, int theColumn, const QModelIndex &
     } else {
       // It is an object which could have children
       ModelAPI_Document* aDoc = getSubDocument(theParent.internalPointer());
-      if (aDoc) { 
+      if (aDoc) {
         // It is a folder of sub-document
         int aParentRow = aParentPos;
         QIntList aMissedIdx = missedFolderIndexes(aDoc);
@@ -600,14 +600,14 @@ QModelIndex XGUI_DataModel::index(int theRow, int theColumn, const QModelIndex &
           }
         } else {
           // Check for composite object
-          ModelAPI_CompositeFeature* aCompFeature = 
+          ModelAPI_CompositeFeature* aCompFeature =
             dynamic_cast<ModelAPI_CompositeFeature*>(aParentObj);
           if (aCompFeature) {
             aIndex = objectIndex(aCompFeature->subFeature(theRow));
           } else {
-            ModelAPI_ResultCompSolid* aCompRes = 
+            ModelAPI_ResultCompSolid* aCompRes =
               dynamic_cast<ModelAPI_ResultCompSolid*>(aParentObj);
-            if (aCompRes) 
+            if (aCompRes)
               aIndex = objectIndex(aCompRes->subResult(theRow));
           }
         }
@@ -632,7 +632,7 @@ QModelIndex XGUI_DataModel::parent(const QModelIndex& theIndex) const
   int aId = theIndex.internalId();
   if (aId != -1) { // The object is not a root folder
     ModelAPI_Document* aDoc = getSubDocument(theIndex.internalPointer());
-    if (aDoc) { 
+    if (aDoc) {
       // It is a folder of sub-document
       return findDocumentRootIndex(aDoc);
     }
@@ -682,7 +682,7 @@ QModelIndex XGUI_DataModel::parent(const QModelIndex& theIndex) const
         return createIndex(aFolderId, 0, aSubDoc.get());
       }
     }
-  } 
+  }
   return QModelIndex();
 }
 
@@ -736,13 +736,13 @@ Qt::ItemFlags XGUI_DataModel::flags(const QModelIndex& theIndex) const
 
   if (aObj) {
     // An object
-    if (aObj->isDisabled()) 
+    if (aObj->isDisabled())
       return theIndex.column() == 1? Qt::ItemIsSelectable : aNullFlag;
 
     if (aSession->moduleDocument() != aObj->document())
       if (aActiveDoc != aObj->document())
         return theIndex.column() == 1? Qt::ItemIsSelectable : aNullFlag;
-    
+
     bool isCompositeSub = false;
     // An object which is sub-object of a composite object can not be accessible in column 1
     if (theIndex.column() == 1) {
@@ -750,13 +750,13 @@ Qt::ItemFlags XGUI_DataModel::flags(const QModelIndex& theIndex) const
       FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aObjPtr);
       if (aFeature.get()) {
         CompositeFeaturePtr aCompFea = ModelAPI_Tools::compositeOwner(aFeature);
-        if (aCompFea.get()) 
+        if (aCompFea.get())
           isCompositeSub = true;
       } else {
         ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(aObjPtr);
         if (aResult.get()) {
           ResultCompSolidPtr aCompRes = ModelAPI_Tools::compSolidOwner(aResult);
-          if (aCompRes.get()) 
+          if (aCompRes.get())
             isCompositeSub = true;
         }
       }
@@ -826,7 +826,7 @@ QModelIndex XGUI_DataModel::documentRootIndex(DocumentPtr theDoc) const
   DocumentPtr aRootDoc = aSession->moduleDocument();
   if (theDoc == aRootDoc)
     return QModelIndex();
-  else 
+  else
     return findDocumentRootIndex(theDoc.get());
 }
 
@@ -914,7 +914,7 @@ QModelIndex XGUI_DataModel::lastHistoryIndex() const
   } else {
     if (aCurDoc == aSession->moduleDocument())
       return createIndex(foldersCount() - 1, 1, -1);
-    else 
+    else
       return createIndex(foldersCount(aCurDoc.get()) - 1, 1, aCurDoc.get());
   }
 }
index a6918f628ac210620c1937f4ecd523546221e724..ed5652d041f24350b8d1df3c1e106f1264aaf351 100644 (file)
@@ -71,7 +71,7 @@ public:
   virtual QVariant headerData(int theSection, Qt::Orientation theOrient, int theRole =
                                   Qt::DisplayRole) const;
 
-  /// Returns the number of rows under the given parent. When the parent is valid it means that 
+  /// Returns the number of rows under the given parent. When the parent is valid it means that
   /// rowCount is returning the number of children of parent.
   /// \param theParent a parent model index
   virtual int rowCount(const QModelIndex& theParent = QModelIndex()) const;
@@ -81,7 +81,7 @@ public:
   /// \param theParent a parent model index
   virtual int columnCount(const QModelIndex& theParent = QModelIndex()) const;
 
-  /// Returns the index of the item in the model specified by the given row, 
+  /// Returns the index of the item in the model specified by the given row,
   /// column and parent index.
   /// \param theRow a row
   /// \param theColumn a column
@@ -89,7 +89,7 @@ public:
   virtual QModelIndex index(int theRow, int theColumn, const QModelIndex &theParent =
                                 QModelIndex()) const;
 
-  /// Returns the parent of the model item with the given index. 
+  /// Returns the parent of the model item with the given index.
   /// If the item has no parent, an invalid QModelIndex is returned.
   /// \param theIndex a model index
   virtual QModelIndex parent(const QModelIndex& theIndex) const;
@@ -98,7 +98,7 @@ public:
   /// \param theParent a parent model index
   virtual bool hasChildren(const QModelIndex& theParent = QModelIndex()) const;
 
-  /// Inserts count rows into the model before the given row. 
+  /// Inserts count rows into the model before the given row.
   /// Items in the new row will be children of the item represented by the parent model index.
   /// \param theRow a start row
   /// \param theCount a nember of rows to insert
@@ -134,16 +134,16 @@ private:
   /// \param theDoc the document object
   QModelIndex findDocumentRootIndex(const ModelAPI_Document* theDoc) const;
 
-  /// Returns number of folders in document. 
+  /// Returns number of folders in document.
   /// Considered folders which has to be shown only if they are not empty.
   /// \param theDoc document which has to be checked. If 0 then Root document will be considered
   int foldersCount(ModelAPI_Document* theDoc = 0) const;
 
   /// Retrurns indexes of folders which can not be shown because they are empty
-  /// \param theDoc document which has to be checked. If 0 then Root document will be considered 
+  /// \param theDoc document which has to be checked. If 0 then Root document will be considered
   QIntList missedFolderIndexes(ModelAPI_Document* theDoc = 0) const;
 
-  /// Returns Id (row) of a folder taking into consideration 
+  /// Returns Id (row) of a folder taking into consideration
   /// folders which can not be shown non empty
   /// \param theType Type of the folder
   /// \param theDoc a document which contains this folder
index d10b58ebd1bc64a69428abf011aaad21ded9fce7..414490ede543c5a61b341fbfd3c6d2bbbadad33f 100644 (file)
@@ -64,7 +64,7 @@
 #include <set>
 
 /// defines the local context mouse selection sensitivity
-const int MOUSE_SENSITIVITY_IN_PIXEL = 10;  
+const int MOUSE_SENSITIVITY_IN_PIXEL = 10;
 
 //#define DEBUG_ACTIVATE_OBJECTS
 //#define DEBUG_DEACTIVATE
@@ -134,7 +134,7 @@ bool XGUI_Displayer::display(ObjectPtr theObject, bool theUpdateViewer)
   bool aDisplayed = false;
   if (isVisible(theObject)) {
 #ifdef DEBUG_COMPOSILID_DISPLAY
-    ResultCompSolidPtr aCompsolidResult = 
+    ResultCompSolidPtr aCompsolidResult =
       std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(theObject);
     if (aCompsolidResult.get()) {
       for(int i = 0; i < aCompsolidResult->numberOfSubs(); i++) {
@@ -155,7 +155,7 @@ bool XGUI_Displayer::display(ObjectPtr theObject, bool theUpdateViewer)
     if (aPrs.get() != NULL) {
       anAIS = aPrs->getAISObject(anAIS);
       if (anAIS.get()) {
-        // correct deviation coefficient for 
+        // correct deviation coefficient for
         /*Handle(AIS_InteractiveObject) anAISPrs = anAIS->impl<Handle(AIS_InteractiveObject)>();
         if (!anAISPrs.IsNull()) {
           Handle(AIS_Shape) aShapePrs = Handle(AIS_Shape)::DownCast(anAISPrs);
@@ -170,7 +170,7 @@ bool XGUI_Displayer::display(ObjectPtr theObject, bool theUpdateViewer)
       ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
       if (aResult.get() != NULL) {
 #ifdef DEBUG_COMPOSILID_DISPLAY
-        ResultCompSolidPtr aCompsolidResult = 
+        ResultCompSolidPtr aCompsolidResult =
           std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(theObject);
         if (aCompsolidResult.get()) {
           for(int i = 0; i < aCompsolidResult->numberOfSubs(); i++) {
@@ -186,7 +186,7 @@ bool XGUI_Displayer::display(ObjectPtr theObject, bool theUpdateViewer)
         std::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(aResult);
         if (aShapePtr.get() != NULL) {
           anAIS = AISObjectPtr(new GeomAPI_AISObject());
-          Handle(AIS_InteractiveObject) anAISPrs = 
+          Handle(AIS_InteractiveObject) anAISPrs =
             myWorkshop->module()->createPresentation(aResult);
           if (anAISPrs.IsNull())
             anAISPrs = new ModuleBase_ResultPrs(aResult);
@@ -228,7 +228,7 @@ bool canBeShaded(Handle(AIS_InteractiveObject) theAIS, ModuleBase_IModule* theMo
   return false;
 }
 
-bool XGUI_Displayer::display(ObjectPtr theObject, AISObjectPtr theAIS, 
+bool XGUI_Displayer::display(ObjectPtr theObject, AISObjectPtr theAIS,
                              bool isShading, bool theUpdateViewer)
 {
   bool aDisplayed = false;
@@ -247,12 +247,12 @@ bool XGUI_Displayer::display(ObjectPtr theObject, AISObjectPtr theAIS,
     if (isShading)
       anAISIO->Attributes()->SetFaceBoundaryDraw( Standard_True );
     anAISIO->SetDisplayMode(aDispMode);
-    aContext->Display(anAISIO, aDispMode, 0, false, true, AIS_DS_Displayed); 
+    aContext->Display(anAISIO, aDispMode, 0, false, true, AIS_DS_Displayed);
     aDisplayed = true;
 
     emit objectDisplayed(theObject, theAIS);
     activate(anAISIO, myActiveSelectionModes, theUpdateViewer);
-  } 
+  }
   if (theUpdateViewer)
     updateViewer();
 
@@ -319,7 +319,7 @@ bool XGUI_Displayer::redisplay(ObjectPtr theObject, bool theUpdateViewer)
   Handle(AIS_InteractiveContext) aContext = AISContext();
   if (!aContext.IsNull() && !aAISIO.IsNull()) {
     // Check that the visualized shape is the same and the redisplay is not necessary
-    // Redisplay of AIS object leads to this object selection compute and the selection 
+    // Redisplay of AIS object leads to this object selection compute and the selection
     // in the browser is lost
     // this check is not necessary anymore because the selection store/restore is realized
     // before and after the values modification.
@@ -409,7 +409,7 @@ void XGUI_Displayer::deactivate(ObjectPtr theObject, const bool theUpdateViewer)
     deactivateAIS(anAIS);
     // the selection from the previous activation modes should be cleared manually (#26172)
     aContext->LocalContext()->ClearOutdatedSelection(anAIS, true);
-    ModuleBase_Tools::selectionInfo(aContext, 
+    ModuleBase_Tools::selectionInfo(aContext,
       "XGUI_Displayer::deactivate -- ClearOutdatedSelection");
     if (theUpdateViewer)
       updateViewer();
@@ -453,7 +453,7 @@ void XGUI_Displayer::getModesOfActivation(ObjectPtr theObject, QIntList& theMode
 
 int XGUI_Displayer::getSelectionMode(int theShapeType)
 {
-  return (theShapeType > TopAbs_SHAPE) ? theShapeType : 
+  return (theShapeType > TopAbs_SHAPE) ? theShapeType :
                                          AIS_Shape::SelectionMode((TopAbs_ShapeEnum)theShapeType);
 }
 
@@ -464,11 +464,11 @@ bool XGUI_Displayer::isVisible(XGUI_Displayer* theDisplayer, const ObjectPtr& th
   ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
   if (aPrs.get() || aResult.get()) {
     aVisible = theDisplayer->isVisible(theObject);
-    // compsolid is not visualized in the viewer, 
+    // compsolid is not visualized in the viewer,
     // but should have presentation when all sub solids are
     // visible. It is useful for highlight presentation where compsolid shape is selectable
     if (!aVisible && aResult.get() && aResult->groupName() == ModelAPI_ResultCompSolid::group()) {
-      ResultCompSolidPtr aCompsolidResult = 
+      ResultCompSolidPtr aCompsolidResult =
         std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aResult);
       if (aCompsolidResult.get() != NULL) { // change colors for all sub-solids
         bool anAllSubsVisible = aCompsolidResult->numberOfSubs() > 0;
@@ -561,7 +561,7 @@ void XGUI_Displayer::activateObjects(const QIntList& theModes, const QObjectPtrL
   myActiveSelectionModes = aNewModes;
   Handle(AIS_InteractiveContext) aContext = AISContext();
   // Open local context if there is no one
-  if (aContext.IsNull() || !aContext->HasOpenedContext()) 
+  if (aContext.IsNull() || !aContext->HasOpenedContext())
     return;
 
   //aContext->UseDisplayedObjects();
@@ -602,7 +602,7 @@ bool XGUI_Displayer::isActive(ObjectPtr theObject) const
   Handle(AIS_InteractiveContext) aContext = AISContext();
   if (aContext.IsNull() || !isVisible(theObject))
     return false;
-    
+
   AISObjectPtr anObj = myResult2AISObjectMap[theObject];
   Handle(AIS_InteractiveObject) anAIS = anObj->impl<Handle(AIS_InteractiveObject)>();
 
@@ -612,7 +612,7 @@ bool XGUI_Displayer::isActive(ObjectPtr theObject) const
 }
 
 
-void XGUI_Displayer::setSelected(const  QList<ModuleBase_ViewerPrsPtr>& theValues, 
+void XGUI_Displayer::setSelected(const  QList<ModuleBase_ViewerPrsPtr>& theValues,
                                  bool theUpdateViewer)
 {
   Handle(AIS_InteractiveContext) aContext = AISContext();
@@ -621,7 +621,7 @@ void XGUI_Displayer::setSelected(const  QList<ModuleBase_ViewerPrsPtr>& theValue
   if (aContext->HasOpenedContext()) {
     aContext->UnhilightSelected(false);
     aContext->ClearSelected(false);
-    NCollection_DataMap<TopoDS_Shape, NCollection_Map<Handle(AIS_InteractiveObject)>> 
+    NCollection_DataMap<TopoDS_Shape, NCollection_Map<Handle(AIS_InteractiveObject)>>
       aShapesToBeSelected;
 
     foreach (ModuleBase_ViewerPrsPtr aPrs, theValues) {
@@ -675,7 +675,7 @@ void XGUI_Displayer::setSelected(const  QList<ModuleBase_ViewerPrsPtr>& theValue
       }
     }
   }
-  ModuleBase_Tools::selectionInfo(aContext, 
+  ModuleBase_Tools::selectionInfo(aContext,
     "XGUI_Displayer::setSelected -- AddOrRemoveSelected/UnhilightCurrents(no local context)");
   if (theUpdateViewer)
     updateViewer();
@@ -933,14 +933,14 @@ void XGUI_Displayer::activateAIS(const Handle(AIS_InteractiveObject)& theIO,
     // the fix from VPA for more suitable selection of sketcher lines
     if (theIO->Width() > 1) {
       double aPrecision = theIO->Width() + 2;
-      if (theMode == getSelectionMode(TopAbs_VERTEX)) 
-        aPrecision = ModuleBase_Preferences::resourceMgr()->doubleValue("Viewer", 
+      if (theMode == getSelectionMode(TopAbs_VERTEX))
+        aPrecision = ModuleBase_Preferences::resourceMgr()->doubleValue("Viewer",
                                                                     "point-selection-sensitivity",
                                                                         20);
-      else if ((theMode == getSelectionMode(TopAbs_EDGE)) || 
+      else if ((theMode == getSelectionMode(TopAbs_EDGE)) ||
                (theMode == getSelectionMode(TopAbs_WIRE)))
-        aPrecision = theIO->Width() + 
-           ModuleBase_Preferences::resourceMgr()->doubleValue("Viewer", 
+        aPrecision = theIO->Width() +
+           ModuleBase_Preferences::resourceMgr()->doubleValue("Viewer",
                                                               "edge-selection-sensitivity", 2);
       aContext->SetSelectionSensitivity(theIO, theMode, aPrecision);
     }
@@ -957,17 +957,17 @@ void XGUI_Displayer::activateAIS(const Handle(AIS_InteractiveObject)& theIO,
   }
 }
 
-void XGUI_Displayer::deactivateAIS(const Handle(AIS_InteractiveObject)& theIO, 
+void XGUI_Displayer::deactivateAIS(const Handle(AIS_InteractiveObject)& theIO,
                                    const int theMode) const
 {
   Handle(AIS_InteractiveContext) aContext = AISContext();
   if (!aContext.IsNull()) {
     if (theMode == -1)
       aContext->Deactivate(theIO);
-    else 
+    else
       aContext->Deactivate(theIO, theMode);
     ModuleBase_Tools::selectionInfo(aContext, "XGUI_Displayer::deactivateAIS -- Deactivate");
-   
+
 #ifdef DEBUG_DEACTIVATE_AIS
     ObjectPtr anObject = getObject(theIO);
     anInfo.append(ModuleBase_Tools::objectInfo((*anIt)));
@@ -1182,7 +1182,7 @@ void XGUI_Displayer::showOnly(const QObjectPtrList& theList)
 }
 
 bool XGUI_Displayer::canBeShaded(ObjectPtr theObject) const
-{ 
+{
   if (!isVisible(theObject))
     return false;
 
@@ -1201,7 +1201,7 @@ bool XGUI_Displayer::activate(const Handle(AIS_InteractiveObject)& theIO,
   Handle(AIS_InteractiveContext) aContext = AISContext();
   if (aContext.IsNull() || theIO.IsNull())
     return false;
-  
+
   bool isActivationChanged = false;
   // deactivate object in all modes, which are not in the list of activation
   // It seems that after the IO deactivation the selected state of the IO's owners
@@ -1211,7 +1211,7 @@ bool XGUI_Displayer::activate(const Handle(AIS_InteractiveObject)& theIO,
   // If the selection problem happens again, it is possible to write a test scenario and create
   // a bug. The bug steps are the following:
   // Create two IO, activate them in 5 modes, select the first IO, deactivate 3 modes for both,
-  // with clicked SHIFT select the second object. 
+  // with clicked SHIFT select the second object.
   // The result is the selection of the first IO is lost.
   TColStd_ListOfInteger aTColModes;
   aContext->ActivatedModes(theIO, aTColModes);
@@ -1233,7 +1233,7 @@ bool XGUI_Displayer::activate(const Handle(AIS_InteractiveObject)& theIO,
     // the selection from the previous activation modes should be cleared manually (#26172)
     theIO->ClearSelected();
     aContext->LocalContext()->ClearOutdatedSelection(theIO, true);
-    ModuleBase_Tools::selectionInfo(aContext, 
+    ModuleBase_Tools::selectionInfo(aContext,
             "XGUI_Displayer::activate -- ClearSelected/ClearOutdatedSelection");
     // For performance issues
     //if (theUpdateViewer)
@@ -1293,8 +1293,8 @@ bool XGUI_Displayer::customizeObject(ObjectPtr theObject)
 }
 
 
-QColor XGUI_Displayer::setObjectColor(ObjectPtr theObject, 
-                                      const QColor& theColor, 
+QColor XGUI_Displayer::setObjectColor(ObjectPtr theObject,
+                                      const QColor& theColor,
                                       bool theUpdateViewer)
 {
   if (!isVisible(theObject))
@@ -1330,7 +1330,7 @@ std::string XGUI_Displayer::getResult2AISObjectMapInfo() const
     aPtrStr << "aObj = " << aObj.get() << ":";
     aPtrStr << "anAIS = " << aAISObj.get() << ":";
     aPtrStr << "[" << ModuleBase_Tools::objectInfo(aObj).toStdString().c_str() << "]";
-    
+
     aContent.append(aPtrStr.str().c_str());
   }
   return QString("myResult2AISObjectMap: size = %1\n%2\n").arg(myResult2AISObjectMap.size()).
@@ -1373,9 +1373,9 @@ void XGUI_Displayer::getPresentations(const ObjectPtr& theObject,
   }
 }
 
-void XGUI_Displayer::activateTrihedron(bool theIsActive) 
-{  
-  myIsTrihedronActive = theIsActive; 
+void XGUI_Displayer::activateTrihedron(bool theIsActive)
+{
+  myIsTrihedronActive = theIsActive;
   if (!myIsTrihedronActive) {
     deactivateTrihedron(true);
   }
@@ -1413,14 +1413,14 @@ void XGUI_Displayer::displayTrihedron(bool theToDisplay) const
   updateViewer();
 }
 
-QIntList XGUI_Displayer::activeSelectionModes() const 
-{ 
+QIntList XGUI_Displayer::activeSelectionModes() const
+{
   QIntList aModes;
   foreach (int aMode, myActiveSelectionModes) {
     // aMode < 9 is a Shape Enum values
     aModes << ((aMode < 9)? AIS_Shape::SelectionType(aMode) : aMode);
   }
-  return aModes; 
+  return aModes;
 }
 
 void XGUI_Displayer::AddOrRemoveSelectedShapes(Handle(AIS_InteractiveContext) theContext,
index aa1723060863028c2235d0cb0809921ad2733c4d..ea3af4c2ca7fd7f938c7eda1b86188c55d07f7ff 100644 (file)
@@ -42,13 +42,13 @@ class XGUI_EXPORT XGUI_Displayer: public QObject
   Q_OBJECT
  public:
    /// \enum DisplayMode display mode
-   enum DisplayMode { 
+   enum DisplayMode {
      /// Mode is not defined
-     NoMode = -1, 
+     NoMode = -1,
      /// Wireframe display mode
-     Wireframe, 
+     Wireframe,
      /// Shading display mode
-     Shading      
+     Shading
    };
 
   /// Constructor
@@ -68,7 +68,7 @@ class XGUI_EXPORT XGUI_Displayer: public QObject
   /// \return true if the object visibility state is changed
   bool display(ObjectPtr theObject, bool theUpdateViewer = true);
 
-  /// Display the given AIS object. 
+  /// Display the given AIS object.
   /// This object is not added to the displayer internal map of objects
   /// So, it can not be obtained from displayer. This is just a wrap method of OCC display in
   /// order to perform the display with correct flags.
@@ -94,7 +94,7 @@ class XGUI_EXPORT XGUI_Displayer: public QObject
   /// empty, select it, otherwise select the result.
   /// \param theValues a list of presentation to be selected
   /// \param theUpdateViewer the parameter whether the viewer should be update immediatelly
-  void setSelected(const  QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues, 
+  void setSelected(const  QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues,
                    bool theUpdateViewer = true);
 
   /// Unselect all objects
@@ -141,7 +141,7 @@ class XGUI_EXPORT XGUI_Displayer: public QObject
   /// Remove all selection filters
   void removeFilters();
 
-  /// Sets a flag to the displayer whether the internal viewer can be updated by 
+  /// Sets a flag to the displayer whether the internal viewer can be updated by
   /// the updateViewer method call. If it is not enabled, this method do nothing.
   /// This state maintain recurse, if the update is blocked twice or three times, the
   /// viewer will not be updated until it is unblocked necessary times
@@ -162,7 +162,7 @@ class XGUI_EXPORT XGUI_Displayer: public QObject
   void activateAIS(const Handle(AIS_InteractiveObject)& theIO, const int theMode,
                    const bool theUpdateViewer) const;
 
-  /// Activate interactive context. It is necessary to call ClearOutdatedSelection 
+  /// Activate interactive context. It is necessary to call ClearOutdatedSelection
   /// after deactivation
   /// \param theIO an interactive object
   /// \param theMode a mode to deactivate. When theMode=-1 then all modes will be deactivated
@@ -231,7 +231,7 @@ class XGUI_EXPORT XGUI_Displayer: public QObject
   bool canBeShaded(ObjectPtr theObject) const;
 
   /// Set color on presentation of an object if it is displayed
-  /// \param theObject an object 
+  /// \param theObject an object
   /// \param theColor a color which has to be set
   /// \param theUpdateViewer update viewer flag
   /// \return previously defined color on the object
@@ -239,7 +239,7 @@ class XGUI_EXPORT XGUI_Displayer: public QObject
 
   /// Returns Trihedron object if it is displayed
   Handle(AIS_InteractiveObject) getTrihedron() const;
-  
+
   /// Set trihedron active (used in selection) or non active
   void activateTrihedron(bool theIsActive);
 
@@ -341,7 +341,7 @@ private:
   /// of owners in the context only once.
   /// \param theContext a viewer context. It has opened local context
   /// \param theShapesToBeSelected a map of shapes. Owner's shape is searched in the map and the
-  /// owner is selected if it is found there. 
+  /// owner is selected if it is found there.
   /// Only first owner is processed(according to OCCT logic)
   static void AddOrRemoveSelectedShapes(Handle(AIS_InteractiveContext) theContext,
           const NCollection_DataMap<TopoDS_Shape,
index 249dfe00491ec65e98045a6e586a2cae960b8358..b93c58c09110af825f5282aee538be6906db74c1 100644 (file)
@@ -96,7 +96,7 @@ void XGUI_ErrorMgr::updateAcceptAllAction(const FeaturePtr& theFeature)
 
   QString anError = "";
   /// to allow the module have the button always enabled
-  bool isActionStateEnabled = 
+  bool isActionStateEnabled =
     myWorkshop->module()->isActionEnableStateFixed(XGUI_ActionsMgr::AcceptAll);
   if (!isActionStateEnabled) {
     anError = myWorkshop->module()->getFeatureError(theFeature);
index 7a56457d2f4f81fb572ed5ca2626a7d8aa8920d5..4ac9ac6a2ce104446e85142e418a576e30690894 100755 (executable)
@@ -43,7 +43,7 @@ XGUI_MenuMgr::XGUI_MenuMgr(XGUI_Workshop* theWorkshop)
 void XGUI_MenuMgr::processEvent(const std::shared_ptr<Events_Message>& theMessage)
 {
   //A message to start feature creation received.
-  if (theMessage->eventID() == 
+  if (theMessage->eventID() ==
       Events_Loop::loop()->eventByName(Config_FeatureMessage::GUI_EVENT())) {
     std::shared_ptr<Config_FeatureMessage> aFeatureMsg =
        std::dynamic_pointer_cast<Config_FeatureMessage>(theMessage);
@@ -130,7 +130,7 @@ std::shared_ptr<XGUI_MenuWorkbench> XGUI_MenuMgr::findWorkbench(const std::strin
       aResultWorkbench = aWorkbench;
   }
   if (!aResultWorkbench) {
-    aResultWorkbench = 
+    aResultWorkbench =
       std::shared_ptr<XGUI_MenuWorkbench>(new XGUI_MenuWorkbench(theWorkbenchName));
     myWorkbenches.push_back(aResultWorkbench);
   }
@@ -152,9 +152,9 @@ void XGUI_MenuMgr::createFeatureActions()
     for (; aGIt != aGLast; aGIt++) {
       const std::shared_ptr<XGUI_MenuGroup> aGroup = *aGIt;
       std::string aGName = aGroup->getName();
-      const std::list<std::shared_ptr<Config_FeatureMessage> >& aFeaturesInfo = 
+      const std::list<std::shared_ptr<Config_FeatureMessage> >& aFeaturesInfo =
         aGroup->featuresInfo();
-      std::list<std::shared_ptr<Config_FeatureMessage> >::const_iterator aFIt = 
+      std::list<std::shared_ptr<Config_FeatureMessage> >::const_iterator aFIt =
         aFeaturesInfo.begin(), aFLast = aFeaturesInfo.end();
       int aFSize = aFeaturesInfo.size();
       for(int i = 0; aFIt != aFLast; aFIt++, i++) {
index f0259d8733428c6790768b3bff0746b9f4639c40..b841c03a1ba9d4cec1235ba2846d506320cff08a 100755 (executable)
@@ -63,7 +63,7 @@ private:
   XGUI_Workshop* myWorkshop; ///< the current workshop
 
   /// container of existing workbenchs
-  std::list< std::shared_ptr<XGUI_MenuWorkbench> > myWorkbenches; 
+  std::list< std::shared_ptr<XGUI_MenuWorkbench> > myWorkbenches;
 };
 
 #endif /* XGUI_MENUMGR_H_ */
index 805144797293e3734f9701360ee36fba44914675..7231a1b28c33b8e790775019ebcbffb6ae3befcb 100644 (file)
@@ -117,7 +117,7 @@ void XGUI_ModuleConnector::setSelected(const QList<ModuleBase_ViewerPrsPtr>& the
     myWorkshop->selector()->clearSelection();
   } else {
     aDisp->setSelected(theValues);
-  }    
+  }
 }
 
 void XGUI_ModuleConnector::setStatusBarMessage(const QString& theMessage)
@@ -135,7 +135,7 @@ void XGUI_ModuleConnector::processLaunchOperation(ModuleBase_Operation* theOpera
   XGUI_OperationMgr* anOperationMgr = workshop()->operationMgr();
 
   if (anOperationMgr->startOperation(theOperation)) {
-    ModuleBase_OperationFeature* aFOperation = 
+    ModuleBase_OperationFeature* aFOperation =
       dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
     if (aFOperation) {
       workshop()->propertyPanel()->updateContentWidget(aFOperation->feature());
@@ -168,9 +168,9 @@ void XGUI_ModuleConnector::updateCommandStatus()
   myWorkshop->updateCommandStatus();
 }
 
-QMainWindow* XGUI_ModuleConnector::desktop() const 
-{ 
-  return myWorkshop->desktop(); 
+QMainWindow* XGUI_ModuleConnector::desktop() const
+{
+  return myWorkshop->desktop();
 }
 
 
@@ -178,8 +178,8 @@ std::shared_ptr<Config_FeatureMessage> XGUI_ModuleConnector::featureInfo(const Q
 {
 #ifdef HAVE_SALOME
   return myWorkshop->salomeConnector()->featureInfo(theId);
-#else 
-  AppElements_Command* aAction = 
+#else
+  AppElements_Command* aAction =
     dynamic_cast<AppElements_Command*>(myWorkshop->actionsMgr()->action(theId));
   if (aAction)
     return aAction->featureMessage();
index 0a00cf57b370204d1a947fcd70ed94547e0e2d8c..062ffe450570a3a912d3b7db58657c28f5471a59 100644 (file)
@@ -81,7 +81,7 @@ Q_OBJECT
   //! Returns data object by AIS
   virtual ObjectPtr findPresentedObject(const AISObjectPtr& theAIS) const;
 
-  //! Select features clearing previous selection. 
+  //! Select features clearing previous selection.
   //! If the list is empty then selection will be cleared
   virtual void setSelected(const QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
 
index 841318435d22e880ac3c2ed7fc519ee47347f246..4512cf1feea0b1ade3e5fa919b5b8561ebb20cd1 100644 (file)
@@ -84,7 +84,7 @@ XGUI_DataTree::XGUI_DataTree(QWidget* theParent)
 
   setItemDelegateForColumn(0, new XGUI_TreeViewItemDelegate(this));
 
-  connect(this, SIGNAL(doubleClicked(const QModelIndex&)), 
+  connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
     SLOT(onDoubleClick(const QModelIndex&)));
 }
 
@@ -127,7 +127,7 @@ void XGUI_DataTree::commitData(QWidget* theEditor)
   aEntrance = 0;
 }
 
-void XGUI_DataTree::clear() 
+void XGUI_DataTree::clear()
 {
   dataModel()->clear();
   reset();
@@ -157,7 +157,7 @@ void XGUI_DataTree::onDoubleClick(const QModelIndex& theIndex)
   ObjectPtr aObj = aModel->object(theIndex);
 
   DocumentPtr aDoc = aMgr->activeDocument();
-  
+
   std::string aOpName = tr("History change").toStdString();
   if (aObj.get()) {
     if (aObj->document() != aDoc)
@@ -200,12 +200,12 @@ void XGUI_DataTree::drawRow(QPainter* thePainter,
 //********************************************************************
 //********************************************************************
 //********************************************************************
-void XGUI_TreeViewStyle::drawPrimitive(PrimitiveElement theElement, 
+void XGUI_TreeViewStyle::drawPrimitive(PrimitiveElement theElement,
                                        const QStyleOption* theOption,
                                        QPainter* thePainter, const QWidget* theWidget) const
 {
   if ((theElement == QStyle::PE_PanelItemViewRow) || (theElement == QStyle::PE_PanelItemViewItem)) {
-    const QStyleOptionViewItemV4* aOptions = 
+    const QStyleOptionViewItemV4* aOptions =
       qstyleoption_cast<const QStyleOptionViewItemV4 *>(theOption);
     if (myIndex.isValid() && ((myIndex.flags() & Qt::ItemIsSelectable) == 0)) {
       QStyle::State aState = aOptions->state;
@@ -225,9 +225,9 @@ void XGUI_TreeViewStyle::drawPrimitive(PrimitiveElement theElement,
 //********************************************************************
 //********************************************************************
 XGUI_ActiveDocLbl::XGUI_ActiveDocLbl(const QString& theText, QWidget* theParent )
-  : QLabel(theText, theParent), 
-  myPreSelectionStyle(""), 
-  myNeutralStyle(""), 
+  : QLabel(theText, theParent),
+  myPreSelectionStyle(""),
+  myNeutralStyle(""),
   mySelectionStyle(""),
   myIsSelected(false)
 {
@@ -243,7 +243,7 @@ void XGUI_ActiveDocLbl::setTreeView(QTreeView* theView)
   QColor aHighlightText = aPalet.highlightedText().color();
 
   myPreSelectionStyle = "QLabel {background-color: ";
-  myPreSelectionStyle += "qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 white, stop:1 " + 
+  myPreSelectionStyle += "qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 white, stop:1 " +
     aHighlight.lighter(170).name() + ");";
   myPreSelectionStyle += "border: 1px solid lightblue; border-radius: 2px }";
 
@@ -254,7 +254,7 @@ void XGUI_ActiveDocLbl::setTreeView(QTreeView* theView)
 #if (!defined HAVE_SALOME) && (defined WIN32)
   mySelectionStyle = "QLabel {background-color: ";
   mySelectionStyle += "qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb(236, 245, 255)";
-  mySelectionStyle += ", stop:1 rgb(208, 229, 255));"; 
+  mySelectionStyle += ", stop:1 rgb(208, 229, 255));";
   mySelectionStyle += "border: 1px solid rgb(132, 172, 221); border-radius: 2px }";
 #else
   mySelectionStyle = "QLabel {background-color: " + aHighlight.name();
@@ -297,7 +297,7 @@ void XGUI_ActiveDocLbl::mouseReleaseEvent( QMouseEvent* e)
   MYClearing = true;
   myIsSelected = true;
   setStyleSheet(mySelectionStyle);
-  // We can not block signals because on 
+  // We can not block signals because on
   // clear selection the View state will not be updated
   myTreeView->clearSelection();
   QLabel::mouseReleaseEvent(e);
@@ -335,7 +335,7 @@ XGUI_ObjectsBrowser::XGUI_ObjectsBrowser(QWidget* theParent)
   aLbl->setPixmap(QPixmap(":pictures/assembly.png"));
   aLbl->setMargin(2);
   // Do not paint background of the label (in order to show icon)
-  aLbl->setAutoFillBackground(false); 
+  aLbl->setAutoFillBackground(false);
 
   aLabelLay->addWidget(aLbl);
 
@@ -376,8 +376,8 @@ XGUI_ObjectsBrowser::~XGUI_ObjectsBrowser()
 }
 
 void XGUI_ObjectsBrowser::setXMLReader(Config_DataModelReader* theReader)
-{ 
-  myDocModel->setXMLReader(theReader); 
+{
+  myDocModel->setXMLReader(theReader);
   myTreeView->setModel(myDocModel);
 
   // It has to be done after setting of model
@@ -495,9 +495,9 @@ void XGUI_ObjectsBrowser::setObjectsSelected(const QObjectPtrList& theObjects)
 }
 
 //***************************************************
-void XGUI_ObjectsBrowser::clearContent()  
-{ 
-  myTreeView->clear(); 
+void XGUI_ObjectsBrowser::clearContent()
+{
+  myTreeView->clear();
 }
 
 void XGUI_ObjectsBrowser::onSelectionChanged(const QItemSelection& theSelected,
index 7810ef773766b8f41755ba16d301e6095bb8757e..6c234bee827ee14ad0639ccc8172e473cb5ca567 100644 (file)
@@ -150,7 +150,7 @@ QStringList XGUI_OperationMgr::operationList() const
 {
   QStringList result;
   foreach(ModuleBase_Operation* eachOperation, myOperations) {
-    ModuleBase_OperationFeature* aFOperation = 
+    ModuleBase_OperationFeature* aFOperation =
       dynamic_cast<ModuleBase_OperationFeature*>(eachOperation);
     if (aFOperation) {
       FeaturePtr aFeature = aFOperation->feature();
@@ -250,7 +250,7 @@ bool XGUI_OperationMgr::commitAllOperations()
                                                                             (anOperation);
     if (aFOperation) {
       FeaturePtr aFeature = aFOperation->feature();
-      CompositeFeaturePtr aComposite = 
+      CompositeFeaturePtr aComposite =
           std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aFeature);
       isCompositeCommitted = aComposite.get();
       if (isCompositeCommitted)
@@ -280,7 +280,7 @@ void XGUI_OperationMgr::updateApplyOfOperations(ModuleBase_Operation* theOperati
 {
   XGUI_ErrorMgr* anErrorMgr = XGUI_Tools::workshop(myWorkshop)->errorMgr();
   if (theOperation) {
-    ModuleBase_OperationFeature* aFOperation = 
+    ModuleBase_OperationFeature* aFOperation =
       dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
     if (aFOperation)
       anErrorMgr->updateAcceptAllAction(aFOperation->feature());
@@ -374,7 +374,7 @@ bool XGUI_OperationMgr::canStartOperation(const QString& theId)
       }
       else if (canStopOperation(aCurrentOp)) {
         // the started operation is granted in the parrent operation,
-        // e.g. current - Line in Sketch, started Circle 
+        // e.g. current - Line in Sketch, started Circle
         stopOperation(aCurrentOp);
       } else {
         aCanStart = false;
@@ -434,7 +434,7 @@ void XGUI_OperationMgr::onBeforeOperationStarted()
     return;
 
   /// Set current feature and remeber old current feature
-  ModuleBase_OperationFeature* aFOperation = 
+  ModuleBase_OperationFeature* aFOperation =
     dynamic_cast<ModuleBase_OperationFeature*>(aCurrentOperation);
   if (aFOperation) {
     SessionPtr aMgr = ModelAPI_Session::get();
@@ -446,7 +446,7 @@ void XGUI_OperationMgr::onBeforeOperationStarted()
     // When sketch entity operation started, the sketch should be cashed here as the current.
     // Otherwise(the flag is true), the ExtrusionCut is cashed, when commit happens, the sketch
     // is disabled, sketch entity is disabled as extrusion cut is created earliest then sketch.
-    // As a result the sketch disappears from the viewer. 
+    // As a result the sketch disappears from the viewer.
     // However after commit it is displayed back.
     aFOperation->setPreviousCurrentFeature(aDoc->currentFeature(false));
 
@@ -466,8 +466,8 @@ void XGUI_OperationMgr::onBeforeOperationStarted()
     if (aFOperation->isEditOperation()) {// it should be performed by the feature edit only
       // in create operation, the current feature is changed by addFeature()
       aDoc->setCurrentFeature(aFOperation->feature(), false);
-      // this is the only place where flushes must be called after setCurrentFeature for the 
-      // current moment: after this the opertion is not finished, so, the ObjectBrowser 
+      // this is the only place where flushes must be called after setCurrentFeature for the
+      // current moment: after this the opertion is not finished, so, the ObjectBrowser
       // state may be corrupted (issue #1457)
       static Events_Loop* aLoop = Events_Loop::loop();
       static Events_ID aCreateEvent = aLoop->eventByName(EVENT_OBJECT_CREATED);
@@ -512,7 +512,7 @@ void XGUI_OperationMgr::onBeforeOperationCommitted()
     return;
 
   /// Restore the previous current feature
-  ModuleBase_OperationFeature* aFOperation = 
+  ModuleBase_OperationFeature* aFOperation =
     dynamic_cast<ModuleBase_OperationFeature*>(aCurrentOperation);
   if (aFOperation) {
 #ifdef DEBUG_CURRENT_FEATURE
@@ -532,9 +532,9 @@ void XGUI_OperationMgr::onBeforeOperationCommitted()
       setCurrentFeature(aFOperation->previousCurrentFeature());
     }
     else { // create operation
-      // the Top created feature should stays the current. In nested operations, 
+      // the Top created feature should stays the current. In nested operations,
       // like Line in the Sketch or
-      // Sketch in ExtrusionCut, a previous feature should be restored on commit. 
+      // Sketch in ExtrusionCut, a previous feature should be restored on commit.
       // It is performed here
       // in order to perform it in the current transaction without opening a new one.
       if (myOperations.front() != aFOperation)
@@ -654,7 +654,7 @@ bool XGUI_OperationMgr::onProcessEnter(QObject* theObject)
   bool isAborted = false;
   if (!anActiveWgt) {
     QWidget* aFocusWidget = aPanel->focusWidget();
-    QToolButton* aCancelBtn = 
+    QToolButton* aCancelBtn =
       dynamic_cast<XGUI_PropertyPanel*>(aPanel)->findButton(PROP_PANEL_CANCEL);
     if (aFocusWidget && aCancelBtn && aFocusWidget == aCancelBtn) {
       abortOperation(aOperation);
@@ -665,15 +665,15 @@ bool XGUI_OperationMgr::onProcessEnter(QObject* theObject)
   if (!isAborted) {
     isAccepted = anActiveWgt && anActiveWgt->processEnter();
     if (!isAccepted) {
-      isAccepted = 
+      isAccepted =
         myWorkshop->module()->processEnter(anActiveWgt ? anActiveWgt->attributeID() : "");
       if (!isAccepted) {
         /// functionality is similar to Apply click
-        ModuleBase_OperationFeature* aFOperation = 
+        ModuleBase_OperationFeature* aFOperation =
           dynamic_cast<ModuleBase_OperationFeature*>(currentOperation());
-        if (!aFOperation || 
+        if (!aFOperation ||
             myWorkshop->module()->getFeatureError(aFOperation->feature()).isEmpty()) {
-          // key released is emitted to apply the current value to the model 
+          // key released is emitted to apply the current value to the model
           // if it was modified in PP
           emit keyEnterReleased();
           commitOperation();
index fa2ba0da84c4ae4de183f2171543c786ccfdb0cc..a26f7eab07d03d4934d8ee5a8f1c6e6c4263912e 100755 (executable)
@@ -43,7 +43,7 @@
 //#define DEBUG_TAB_WIDGETS
 
 XGUI_PropertyPanel::XGUI_PropertyPanel(QWidget* theParent, XGUI_OperationMgr* theMgr)
-    : ModuleBase_IPropertyPanel(theParent), 
+    : ModuleBase_IPropertyPanel(theParent),
     myActiveWidget(NULL),
     myPreselectionWidget(NULL),
     myPanelPage(NULL),
@@ -217,7 +217,7 @@ void XGUI_PropertyPanel::onActivateNextWidget(ModuleBase_ModelWidget* theWidget)
   // sketch multi rotation -> single/full point)
   // it is important to check the widget visibility to do not check of the next widget visible
   // state if the current is not shown. (example: sketch circle re-entrant operation after mouse
-  // release in the viewer, next, radius, 
+  // release in the viewer, next, radius,
   // widget should be activated but the first is not visualized)
   bool isVisible = theWidget->isVisible();
   activateNextWidget(theWidget, isVisible);
@@ -511,7 +511,7 @@ void XGUI_PropertyPanel::closeEvent(QCloseEvent* theEvent)
         theEvent->ignore();
       else
         theEvent->accept();
-    } else 
+    } else
       theEvent->ignore();
   } else
     ModuleBase_IPropertyPanel::closeEvent(theEvent);
index c7af483a090c5380e33330507096b92b697e2e55..0e3e939a8cbb32fe2981d15449f9f500bdec6a66 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "XGUI_QtEvents.h"
 
-QEvent::Type PostponeMessageQtEvent::PostponeMessageQtEventType = 
+QEvent::Type PostponeMessageQtEvent::PostponeMessageQtEventType =
   QEvent::Type(QEvent::registerEventType());
 
 
index 01625afc51f9e8461c33defbfa64ea97ebb10698..c8d81dbda40b925a7d6626ad8abfada60b9c6213 100644 (file)
@@ -38,9 +38,9 @@ class XGUI_EXPORT XGUI_SalomeConnector
   //! \param isAddSeparator boolean flag about adding separator after the action
   //! returns created action
   virtual QAction* addFeature(const QString& theWBName, const QString& theId,
-                              const QString& theTitle, const QString& theTip, 
+                              const QString& theTitle, const QString& theTip,
                               const QIcon& theIcon,
-                              const QKeySequence& theKeys, bool isCheckable, 
+                              const QKeySequence& theKeys, bool isCheckable,
                               const bool isAddSeparator,
                               const QString& theStatusTip) = 0;
 
index 584c9fd3690658e720c12884f0e74f0973794ee1..d5510051e69aa010aef214aaf02c516bbaf066bc 100644 (file)
@@ -124,7 +124,7 @@ void XGUI_Selection::fillPresentation(ModuleBase_ViewerPrsPtr& thePrs,
 {
   thePrs->setOwner(theOwner);
 
-  Handle(AIS_InteractiveObject) anIO = 
+  Handle(AIS_InteractiveObject) anIO =
                            Handle(AIS_InteractiveObject)::DownCast(theOwner->Selectable());
   thePrs->setInteractive(anIO);
 
@@ -140,7 +140,7 @@ void XGUI_Selection::fillPresentation(ModuleBase_ViewerPrsPtr& thePrs,
       aShape = findAxisShape(anIO);
 #endif
     if (!aShape.IsNull()) {
-      std::shared_ptr<GeomAPI_Shape> aGeomShape = 
+      std::shared_ptr<GeomAPI_Shape> aGeomShape =
         std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
       aGeomShape->setImpl(new TopoDS_Shape(aShape));
       thePrs->setShape(aGeomShape);
@@ -157,7 +157,7 @@ void XGUI_Selection::fillPresentation(ModuleBase_ViewerPrsPtr& thePrs,
       gp_Lin aLine = aAxis->Component()->Lin();
       gp_Dir aDir = aLine.Direction();
       std::string aAxName;
-      if (aDir.X() == 1.) 
+      if (aDir.X() == 1.)
         aAxName = "OX";
       else if (aDir.Y() == 1.)
         aAxName = "OY";
@@ -199,7 +199,7 @@ void XGUI_Selection::fillPresentation(ModuleBase_ViewerPrsPtr& thePrs,
     }
 #endif
   }
-     
+
   XGUI_Displayer* aDisplayer = myWorkshop->displayer();
   ObjectPtr aFeature = aDisplayer->getObject(anIO);
 
@@ -254,7 +254,7 @@ QList<ModuleBase_ViewerPrsPtr> XGUI_Selection::getHighlighted() const
       if (aContext->HasOpenedContext()) {
         TopoDS_Shape aShape = aContext->DetectedShape();
         if (!aShape.IsNull()) {
-          std::shared_ptr<GeomAPI_Shape> aGeomShape = 
+          std::shared_ptr<GeomAPI_Shape> aGeomShape =
             std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
           aGeomShape->setImpl(new TopoDS_Shape(aShape));
           aPrs->setShape(aGeomShape);
@@ -317,7 +317,7 @@ ObjectPtr XGUI_Selection::getSelectableObject(const Handle(SelectMgr_EntityOwner
 
   Handle(SelectMgr_EntityOwner) aEO = theOwner;
   if (!aEO.IsNull()) {
-    Handle(AIS_InteractiveObject) anObj = 
+    Handle(AIS_InteractiveObject) anObj =
       Handle(AIS_InteractiveObject)::DownCast(aEO->Selectable());
     anObject = myWorkshop->displayer()->getObject(anObj);
   }
@@ -377,7 +377,7 @@ TopoDS_Shape XGUI_Selection::findAxisShape(Handle(AIS_InteractiveObject) theIO)
     Handle(Prs3d_DatumAspect) DA = aAxis->Attributes()->DatumAspect();
     Handle(Geom_TrimmedCurve) aTLine = new Geom_TrimmedCurve(aLine, 0, DA->FirstAxisLength());
 
-    BRep_Builder aBuilder;      
+    BRep_Builder aBuilder;
     TopoDS_Edge aEdge;
     aBuilder.MakeEdge(aEdge, aTLine, Precision::Confusion());
     if (!aEdge.IsNull())
index 785aa18a47763d24be287dafc4686d4cb4d9b01d..4cb69571dc7ac30363bd0141ecbb985f487cfe53 100644 (file)
@@ -36,7 +36,7 @@ class XGUI_EXPORT XGUI_Selection : public ModuleBase_ISelection
 
   /// Returns a list of viewer selected presentations
   /// \return list of presentations
-  virtual QList<std::shared_ptr<ModuleBase_ViewerPrs>> 
+  virtual QList<std::shared_ptr<ModuleBase_ViewerPrs>>
     getSelected(const SelectionPlace& thePlace = Browser) const;
 
   /// Fills the viewer presentation parameters by the parameters from the owner
index f32ed5012b18c7180f8eab47693b092b19e3cd19..b4a2bbc5ffb7ba4a89c91ebe730698154dd02757 100755 (executable)
@@ -65,7 +65,7 @@ void XGUI_SelectionMgr::setSelectedOwners(const SelectMgr_IndexedMapOfOwner& the
       aContext->AddOrRemoveSelected(anOwner, isUpdateViewer);
     }
   }
-  ModuleBase_Tools::selectionInfo(aContext, 
+  ModuleBase_Tools::selectionInfo(aContext,
                                   "XGUI_SelectionMgr::setSelectedOwners -- AddOrRemoveSelected");
 }
 
@@ -145,7 +145,7 @@ void XGUI_SelectionMgr::onViewerSelection()
   FeaturePtr aFeature;
   Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext();
   if (!aContext.IsNull()) {
-    QList<ModuleBase_ViewerPrsPtr> aPresentations = 
+    QList<ModuleBase_ViewerPrsPtr> aPresentations =
       selection()->getSelected(ModuleBase_ISelection::Viewer);
     foreach(ModuleBase_ViewerPrsPtr aPrs, aPresentations) {
       if (aPrs->object().get()) {
@@ -187,7 +187,7 @@ void XGUI_SelectionMgr::clearSelection()
   bool aBlocked = myWorkshop->objectBrowser()->blockSignals(true);
   myWorkshop->objectBrowser()->setObjectsSelected(aFeatures);
   myWorkshop->objectBrowser()->blockSignals(aBlocked);
-  
+
   QList<ModuleBase_ViewerPrsPtr> aSelectedPrs =
              myWorkshop->selector()->selection()->getSelected(ModuleBase_ISelection::Browser);
 
index 02beb1150148a9f2bda3783b9910e64421d84dcf..cd310eef0b4351b893282063740d80f47618ed6e 100644 (file)
@@ -44,7 +44,7 @@ QString dir(const QString& path, bool isAbs)
 QString file(const QString& path, bool withExt)
 {
   QString fPath = path;
-  while (!fPath.isEmpty() && (fPath[fPath.length() - 1] == '\\' || 
+  while (!fPath.isEmpty() && (fPath[fPath.length() - 1] == '\\' ||
           fPath[fPath.length() - 1] == '/'))
     fPath.remove(fPath.length() - 1, 1);
 
@@ -131,12 +131,12 @@ bool canRename(const ObjectPtr& theObject, const QString& theName)
   if (std::dynamic_pointer_cast<ModelAPI_ResultParameter>(theObject).get()) {
     double aValue;
     ResultParameterPtr aParam;
-    if (ModelAPI_Tools::findVariable(theObject->document(), 
+    if (ModelAPI_Tools::findVariable(theObject->document(),
           FeaturePtr(), qPrintable(theName), aValue, aParam)) {
       const char* aKeyStr = "Selected parameter can not be renamed to: %1. "
                             "There is a parameter with the same name. Its value is: %2.";
       QString aErrMsg(QObject::tr(aKeyStr).arg(qPrintable(theName)).arg(aValue));
-      // We can not use here a dialog box for message - 
+      // We can not use here a dialog box for message -
       // it will crash editing process in ObjectBrowser
       Events_InfoMessage("XGUI_Tools", aErrMsg.toStdString()).send();
       return false;
index 6233d28ff80940973c70c6920d1df3752944f42e..aad07467f392ca64b492c1f251358eac385fb22c 100644 (file)
@@ -11,7 +11,7 @@
   #include <AppElements_ViewWindow.h>
   #include <AppElements_Viewer.h>
 #endif
-  
+
 #include <ModuleBase_IViewWindow.h>
 
 #include <QEvent>
@@ -66,7 +66,7 @@ Handle(V3d_View) XGUI_ViewerProxy::activeView() const
   return myWorkshop->salomeConnector()->viewer()->activeView();
 #else
   AppElements_Viewer* aViewer = myWorkshop->mainWindow()->viewer();
-  return (aViewer->activeViewWindow()) ? 
+  return (aViewer->activeViewWindow()) ?
     aViewer->activeViewWindow()->viewPortApp()->getView() :
     Handle(V3d_View)();
 #endif
@@ -78,7 +78,7 @@ QWidget* XGUI_ViewerProxy::activeViewPort() const
   return myWorkshop->salomeConnector()->viewer()->activeViewPort();
 #else
   AppElements_Viewer* aViewer = myWorkshop->mainWindow()->viewer();
-  return (aViewer->activeViewWindow()) ? 
+  return (aViewer->activeViewWindow()) ?
          aViewer->activeViewWindow()->viewPortApp(): 0;
 #endif
 }
@@ -113,38 +113,38 @@ void XGUI_ViewerProxy::connectToViewer()
   ModuleBase_IViewer* aViewer = myWorkshop->salomeConnector()->viewer();
 
   connect(aViewer, SIGNAL(lastViewClosed()), this, SIGNAL(lastViewClosed()));
-  connect(aViewer, SIGNAL(tryCloseView(ModuleBase_IViewWindow*)), 
+  connect(aViewer, SIGNAL(tryCloseView(ModuleBase_IViewWindow*)),
     this, SIGNAL(tryCloseView(ModuleBase_IViewWindow*)));
 
-  connect(aViewer, SIGNAL(deleteView(ModuleBase_IViewWindow*)), 
+  connect(aViewer, SIGNAL(deleteView(ModuleBase_IViewWindow*)),
     this, SIGNAL(deleteView(ModuleBase_IViewWindow*)));
 
-  connect(aViewer, SIGNAL(viewCreated(ModuleBase_IViewWindow*)), 
+  connect(aViewer, SIGNAL(viewCreated(ModuleBase_IViewWindow*)),
     this, SLOT(onViewCreated(ModuleBase_IViewWindow*)));
 
-  connect(aViewer, SIGNAL(activated(ModuleBase_IViewWindow*)), 
+  connect(aViewer, SIGNAL(activated(ModuleBase_IViewWindow*)),
     this, SIGNAL(activated(ModuleBase_IViewWindow*)));
 
-  connect(aViewer, SIGNAL(mousePress(ModuleBase_IViewWindow*, QMouseEvent*)), 
+  connect(aViewer, SIGNAL(mousePress(ModuleBase_IViewWindow*, QMouseEvent*)),
     this, SIGNAL(mousePress(ModuleBase_IViewWindow*, QMouseEvent*)));
 
-  connect(aViewer, SIGNAL(mouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)), 
+  connect(aViewer, SIGNAL(mouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)),
     this, SIGNAL(mouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)));
 
   connect(aViewer, SIGNAL(mouseDoubleClick(ModuleBase_IViewWindow*, QMouseEvent*)), this,
           SIGNAL(mouseDoubleClick(ModuleBase_IViewWindow*, QMouseEvent*)));
 
-  connect(aViewer, SIGNAL(mouseMove(ModuleBase_IViewWindow*, QMouseEvent*)), 
+  connect(aViewer, SIGNAL(mouseMove(ModuleBase_IViewWindow*, QMouseEvent*)),
     this, SIGNAL(mouseMove(ModuleBase_IViewWindow*, QMouseEvent*)));
 
-  connect(aViewer, SIGNAL(keyPress(ModuleBase_IViewWindow*, QKeyEvent*)), 
+  connect(aViewer, SIGNAL(keyPress(ModuleBase_IViewWindow*, QKeyEvent*)),
     this, SIGNAL(keyPress(ModuleBase_IViewWindow*, QKeyEvent*)));
 
-  connect(aViewer, SIGNAL(keyRelease(ModuleBase_IViewWindow*, QKeyEvent*)), 
+  connect(aViewer, SIGNAL(keyRelease(ModuleBase_IViewWindow*, QKeyEvent*)),
     this, SIGNAL(keyRelease(ModuleBase_IViewWindow*, QKeyEvent*)));
 
   connect(aViewer, SIGNAL(selectionChanged()), this, SIGNAL(selectionChanged()));
-    
+
   connect(aViewer, SIGNAL(viewTransformed(int)), this, SIGNAL(viewTransformed(int)));
 
   connect(aViewer, SIGNAL(contextMenuRequested(QContextMenuEvent*)), this,
@@ -154,16 +154,16 @@ void XGUI_ViewerProxy::connectToViewer()
 
   connect(aViewer, SIGNAL(lastViewClosed()), this, SIGNAL(lastViewClosed()));
 
-  connect(aViewer, SIGNAL(tryCloseView(AppElements_ViewWindow*)), 
+  connect(aViewer, SIGNAL(tryCloseView(AppElements_ViewWindow*)),
           this, SLOT(onTryCloseView(AppElements_ViewWindow*)));
 
-  connect(aViewer, SIGNAL(deleteView(AppElements_ViewWindow*)), 
+  connect(aViewer, SIGNAL(deleteView(AppElements_ViewWindow*)),
           this, SLOT(onDeleteView(AppElements_ViewWindow*)));
 
-  connect(aViewer, SIGNAL(viewCreated(AppElements_ViewWindow*)), 
+  connect(aViewer, SIGNAL(viewCreated(AppElements_ViewWindow*)),
           this, SLOT(onViewCreated(AppElements_ViewWindow*)));
 
-  connect(aViewer, SIGNAL(activated(AppElements_ViewWindow*)), 
+  connect(aViewer, SIGNAL(activated(AppElements_ViewWindow*)),
           this, SLOT(onActivated(AppElements_ViewWindow*)));
 
   connect(aViewer, SIGNAL(mousePress(AppElements_ViewWindow*, QMouseEvent*)), this,
index bf578c424bd8f46e172b137be242d178168401f1..9969ae9e40abb7db82068c3d6d6c3caa3ff214f9 100644 (file)
@@ -90,7 +90,7 @@ Q_OBJECT
   /// Update current viewer
   virtual void update();
 
-  /// Method returns True if the viewer can process editing objects 
+  /// Method returns True if the viewer can process editing objects
   /// by mouse drugging. If this is impossible thet it has to return False.
   virtual bool canDragByMouse() const;
 
index 45db946d5e68c223e837f337d0710f195d961eed..64954b4ece3f59c3a945676e3bc608d09974108a 100755 (executable)
@@ -143,7 +143,7 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
   bool aCloc = aResMgr->booleanValue("language", "locale", true);
   if (aCloc)
     QLocale::setDefault( QLocale::c() );
-  else 
+  else
     QLocale::setDefault( QLocale::system() );
 #endif
   QString aPath = Config_XMLReader::pluginConfigFile().c_str();
@@ -183,9 +183,9 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
           SLOT(onOperationResumed(ModuleBase_Operation*)));
   connect(myOperationMgr, SIGNAL(operationStopped(ModuleBase_Operation*)),
           SLOT(onOperationStopped(ModuleBase_Operation*)));
-  connect(myOperationMgr, SIGNAL(operationCommitted(ModuleBase_Operation*)), 
+  connect(myOperationMgr, SIGNAL(operationCommitted(ModuleBase_Operation*)),
           SLOT(onOperationCommitted(ModuleBase_Operation*)));
-  connect(myOperationMgr, SIGNAL(operationAborted(ModuleBase_Operation*)), 
+  connect(myOperationMgr, SIGNAL(operationAborted(ModuleBase_Operation*)),
           SLOT(onOperationAborted(ModuleBase_Operation*)));
 
 #ifndef HAVE_SALOME
@@ -203,21 +203,21 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
                                    Config_Prop::Color, ModelAPI_ResultBody::DEFAULT_COLOR());
   Config_PropManager::registerProp("Visualization", "result_group_color", "Group color",
                                    Config_Prop::Color, ModelAPI_ResultGroup::DEFAULT_COLOR());
-  Config_PropManager::registerProp("Visualization", "result_construction_color", 
+  Config_PropManager::registerProp("Visualization", "result_construction_color",
                                    "Construction color",
-                                   Config_Prop::Color, 
+                                   Config_Prop::Color,
                                    ModelAPI_ResultConstruction::DEFAULT_COLOR());
   Config_PropManager::registerProp("Visualization", "result_part_color", "Part color",
                                    Config_Prop::Color, ModelAPI_ResultPart::DEFAULT_COLOR());
 
-  Config_PropManager::registerProp("Visualization", "body_deflection", 
+  Config_PropManager::registerProp("Visualization", "body_deflection",
                                    "Body deflection coefficient",
-                                   Config_Prop::Double, 
+                                   Config_Prop::Double,
                                    ModelAPI_ResultBody::DEFAULT_DEFLECTION());//"0.001");
 
-  Config_PropManager::registerProp("Visualization", "construction_deflection", 
+  Config_PropManager::registerProp("Visualization", "construction_deflection",
                                    "Construction deflection coefficient",
-                                   Config_Prop::Double, 
+                                   Config_Prop::Double,
                                    ModelAPI_ResultConstruction::DEFAULT_DEFLECTION());//"0.0001");
 
   if (ModuleBase_Preferences::resourceMgr()->booleanValue("Viewer", "face-selection", true))
@@ -269,7 +269,7 @@ void XGUI_Workshop::startApplication()
   myMainWindow->show();
   updateCommandStatus();
 #endif
-  
+
   onNew();
 
   myViewerProxy->connectViewProxy();
@@ -326,7 +326,7 @@ void XGUI_Workshop::initMenu()
   QAction* aAction = salomeConnector()->addDesktopCommand("UNDO_CMD", tr("Undo"),
                                                         tr("Undo last command"),
                                                         QIcon(":pictures/undo.png"),
-                                                        QKeySequence::Undo, false, 
+                                                        QKeySequence::Undo, false,
                                                         "MEN_DESK_EDIT");
   QString aToolBarTitle = tr( "INF_DESK_TOOLBAR_STANDARD" );
   salomeConnector()->addActionInToolbar( aAction,aToolBarTitle  );
@@ -343,7 +343,7 @@ void XGUI_Workshop::initMenu()
   addHistoryMenu(aAction, SIGNAL(updateRedoHistory(const QList<ActionInfo>&)), SLOT(onRedo(int)));
 
   salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT");
-  //aAction = salomeConnector()->addDesktopCommand("REBUILD_CMD", tr("Rebuild"), 
+  //aAction = salomeConnector()->addDesktopCommand("REBUILD_CMD", tr("Rebuild"),
   //                                            tr("Rebuild data objects"),
   //                                            QIcon(":pictures/rebuild.png"), QKeySequence(),
   //                                            false, "MEN_DESK_EDIT");
@@ -352,13 +352,13 @@ void XGUI_Workshop::initMenu()
   //connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onRebuild()));
   //salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT");
 
-  aAction = salomeConnector()->addDesktopCommand("SAVEAS_CMD", tr("Export native..."), 
+  aAction = salomeConnector()->addDesktopCommand("SAVEAS_CMD", tr("Export native..."),
                                              tr("Export the current document into a native file"),
                                               QIcon(), QKeySequence(),
                                               false, "MEN_DESK_FILE");
   connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onSaveAs()));
 
-  aAction = salomeConnector()->addDesktopCommand("OPEN_CMD", tr("Import native..."), 
+  aAction = salomeConnector()->addDesktopCommand("OPEN_CMD", tr("Import native..."),
                                               tr("Import native file"),
                                               QIcon(), QKeySequence(),
                                               false, "MEN_DESK_FILE");
@@ -495,7 +495,7 @@ bool XGUI_Workshop::isFeatureOfNested(const FeaturePtr& theFeature)
     XGUI_SalomeConnector* aSalomeConnector = salomeConnector();
     if (aSalomeConnector->isFeatureOfNested(actionsMgr()->action(aFeatureKind.c_str())))
       aHasNested = true;
-#else 
+#else
     AppElements_MainMenu* aMenuBar = mainWindow()->menuObject();
     AppElements_Command* aCommand = aMenuBar->feature(aFeatureKind.c_str());
     if (aCommand && aCommand->button()->additionalButtonWidget())
@@ -506,7 +506,7 @@ bool XGUI_Workshop::isFeatureOfNested(const FeaturePtr& theFeature)
 
 void XGUI_Workshop::fillPropertyPanel(ModuleBase_Operation* theOperation)
 {
-  ModuleBase_OperationFeature* aFOperation = 
+  ModuleBase_OperationFeature* aFOperation =
     dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
   if (!aFOperation)
     return;
@@ -550,7 +550,7 @@ void XGUI_Workshop::fillPropertyPanel(ModuleBase_Operation* theOperation)
 
   // update visible state of Preview button
 #ifdef HAVE_SALOME
-  bool anIsAutoPreview = 
+  bool anIsAutoPreview =
     mySalomeConnector->featureInfo(aFeatureKind.c_str())->isAutoPreview();
 #else
   AppElements_MainMenu* aMenuBar = mainWindow()->menuObject();
@@ -880,7 +880,7 @@ bool XGUI_Workshop::onSaveAs()
   if (aDir.exists() && !aDir.entryInfoList(QDir::NoDotAndDotDot | QDir::AllEntries).isEmpty()) {
     int answer = QMessageBox::question(
         desktop(),
-        // Title of the dialog which asks user if he wants to save study 
+        // Title of the dialog which asks user if he wants to save study
         // in existing non-empty folder
         tr("Save"),
         tr("The directory already contains some files, save anyway?"),
@@ -1146,8 +1146,8 @@ void XGUI_Workshop::updateHistory()
 QDockWidget* XGUI_Workshop::createObjectBrowser(QWidget* theParent)
 {
   QDockWidget* aObjDock = new QDockWidget(theParent);
-  aObjDock->setAllowedAreas(Qt::LeftDockWidgetArea | 
-                            Qt::RightDockWidgetArea | 
+  aObjDock->setAllowedAreas(Qt::LeftDockWidgetArea |
+                            Qt::RightDockWidgetArea |
                             Qt::BottomDockWidgetArea);
   aObjDock->setWindowTitle(tr("Object browser"));
   aObjDock->setStyleSheet(
@@ -1173,8 +1173,8 @@ void XGUI_Workshop::createDockWidgets()
   aDesktop->addDockWidget(Qt::LeftDockWidgetArea, aObjDock);
   myPropertyPanel = new XGUI_PropertyPanel(aDesktop, myOperationMgr);
   myPropertyPanel->setupActions(myActionsMgr);
-  myPropertyPanel->setAllowedAreas(Qt::LeftDockWidgetArea | 
-                                   Qt::RightDockWidgetArea | 
+  myPropertyPanel->setAllowedAreas(Qt::LeftDockWidgetArea |
+                                   Qt::RightDockWidgetArea |
                                    Qt::BottomDockWidgetArea);
   aDesktop->addDockWidget(Qt::LeftDockWidgetArea, myPropertyPanel);
   hidePropertyPanel();  ///<! Invisible by default
@@ -1449,7 +1449,7 @@ void XGUI_Workshop::cleanHistory()
   for (; aMainIt != aMainLast; aMainIt++) {
     FeaturePtr aMainListFeature = aMainIt->first;
     std::set<FeaturePtr> aMainRefList = aMainIt->second;
-    std::set<FeaturePtr>::const_iterator aRefIt = aMainRefList.begin(), 
+    std::set<FeaturePtr>::const_iterator aRefIt = aMainRefList.begin(),
                                                   aRefLast = aMainRefList.end();
     bool aFeatureOutOfTheList = false;
     for (; aRefIt != aRefLast && !aFeatureOutOfTheList; aRefIt++) {
@@ -1496,7 +1496,7 @@ void XGUI_Workshop::cleanHistory()
       return;
 
     // 1. start operation
-    aDescription += "by deleting of " + 
+    aDescription += "by deleting of " +
       aDescription.arg(XGUI_Tools::unionOfObjectNames(anObjects, ", "));
     ModuleBase_OperationAction* anOpAction = new ModuleBase_OperationAction(aDescription, module());
     operationMgr()->startOperation(anOpAction);
@@ -1635,17 +1635,17 @@ std::list<FeaturePtr> toCurrentFeatures(const ObjectPtr& theObject)
   DocumentPtr aDocument = theObject->document();
   std::list<FeaturePtr> anAllFeatures = allFeatures(aDocument);
   // find the object iterator
-  std::list<FeaturePtr>::iterator aObjectIt = 
+  std::list<FeaturePtr>::iterator aObjectIt =
     std::find(anAllFeatures.begin(), anAllFeatures.end(), theObject);
   if (aObjectIt == anAllFeatures.end())
     return aResult;
   // find the current feature iterator
-  std::list<FeaturePtr>::iterator aCurrentIt = 
+  std::list<FeaturePtr>::iterator aCurrentIt =
     std::find(anAllFeatures.begin(), anAllFeatures.end(), aDocument->currentFeature(true));
   if (aCurrentIt == anAllFeatures.end())
     return aResult;
   // check the right order
-  if (std::distance(aObjectIt, anAllFeatures.end()) <= 
+  if (std::distance(aObjectIt, anAllFeatures.end()) <=
       std::distance(aCurrentIt, anAllFeatures.end()))
     return aResult;
   // exclude the object
@@ -1677,14 +1677,14 @@ bool XGUI_Workshop::canMoveFeature()
   QObjectPtrList::const_iterator anIt = aObjects.begin(), aLast = aObjects.end();
   for (; anIt != aLast && aCanMove; anIt++) {
     ObjectPtr aObject = *anIt;
-    // 1. Get features placed between selected and current in the document 
+    // 1. Get features placed between selected and current in the document
     std::list<FeaturePtr> aFeaturesBetween = toCurrentFeatures(aObject);
     // if aFeaturesBetween is empty it means wrong order or aObject is the current feature
     if (aFeaturesBetween.empty())
       aCanMove = false;
     else {
       std::set<FeaturePtr> aPlacedFeatures(aFeaturesBetween.begin(), aFeaturesBetween.end());
-      // 2. Get all reference features to the selected object in the document 
+      // 2. Get all reference features to the selected object in the document
       std::set<FeaturePtr> aRefFeatures;
       ModuleBase_Tools::refsToFeatureInFeatureDocument(aObject, aRefFeatures);
 
@@ -1756,7 +1756,7 @@ void XGUI_Workshop::changeColor(const QObjectPtrList& theObjects)
 
   AttributeIntArrayPtr aColorAttr;
   // 1. find the current color of the object. This is a color of AIS presentation
-  // The objects are iterated until a first valid color is found 
+  // The objects are iterated until a first valid color is found
   std::vector<int> aColor;
   foreach(ObjectPtr anObject, theObjects) {
     ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(anObject);
@@ -1781,7 +1781,7 @@ void XGUI_Workshop::changeColor(const QObjectPtrList& theObjects)
     return;
 
   if (!abortAllOperations())
-  return; 
+  return;
   // 2. show the dialog to change the value
   XGUI_ColorDialog* aDlg = new XGUI_ColorDialog(desktop());
   aDlg->setColor(aColor);
@@ -1802,11 +1802,11 @@ void XGUI_Workshop::changeColor(const QObjectPtrList& theObjects)
   foreach(ObjectPtr anObj, theObjects) {
     ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(anObj);
     if (aResult.get() != NULL) {
-      ResultCompSolidPtr aCompsolidResult = 
+      ResultCompSolidPtr aCompsolidResult =
         std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aResult);
       if (aCompsolidResult.get() != NULL) { // change colors for all sub-solids
         for(int i = 0; i < aCompsolidResult->numberOfSubs(); i++) {
-          setColor(aCompsolidResult->subResult(i), !isRandomColor ? aColorResult : 
+          setColor(aCompsolidResult->subResult(i), !isRandomColor ? aColorResult :
                                                                     aDlg->getRandomColor());
         }
       }
@@ -1847,7 +1847,7 @@ void XGUI_Workshop::changeDeflection(const QObjectPtrList& theObjects)
 {
   AttributeDoublePtr aDoubleAttr;
   // 1. find the current color of the object. This is a color of AIS presentation
-  // The objects are iterated until a first valid color is found 
+  // The objects are iterated until a first valid color is found
   double aDeflection = -1;
   foreach(ObjectPtr anObject, theObjects) {
     ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(anObject);
@@ -1871,7 +1871,7 @@ void XGUI_Workshop::changeDeflection(const QObjectPtrList& theObjects)
     return;
 
   if (!abortAllOperations())
-  return; 
+  return;
   // 2. show the dialog to change the value
   XGUI_DeflectionDialog* aDlg = new XGUI_DeflectionDialog(desktop());
   aDlg->setDeflection(aDeflection);
@@ -1890,7 +1890,7 @@ void XGUI_Workshop::changeDeflection(const QObjectPtrList& theObjects)
   foreach(ObjectPtr anObj, theObjects) {
     ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(anObj);
     if (aResult.get() != NULL) {
-      ResultCompSolidPtr aCompsolidResult = 
+      ResultCompSolidPtr aCompsolidResult =
         std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(aResult);
       if (aCompsolidResult.get() != NULL) { // change colors for all sub-solids
         for(int i = 0; i < aCompsolidResult->numberOfSubs(); i++) {
@@ -1975,7 +1975,7 @@ void XGUI_Workshop::displayDocumentResults(DocumentPtr theDoc)
 //**************************************************************
 void XGUI_Workshop::displayGroupResults(DocumentPtr theDoc, std::string theGroup)
 {
-  for (int i = 0; i < theDoc->size(theGroup); i++) 
+  for (int i = 0; i < theDoc->size(theGroup); i++)
     theDoc->object(theGroup, i)->setDisplayed(true);
     //displayObject(theDoc->object(theGroup, i));
   Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
@@ -2078,8 +2078,8 @@ void XGUI_Workshop::synchronizeViewer()
   synchronizeGroupInViewer(aDoc, ModelAPI_ResultGroup::group(), false);
 }
 
-void XGUI_Workshop::synchronizeGroupInViewer(const DocumentPtr& theDoc, 
-                                             const std::string& theGroup, 
+void XGUI_Workshop::synchronizeGroupInViewer(const DocumentPtr& theDoc,
+                                             const std::string& theGroup,
                                              bool theUpdateViewer)
 {
   ObjectPtr aObj;
@@ -2122,8 +2122,8 @@ void XGUI_Workshop::highlightResults(const QObjectPtrList& theObjects)
     objectBrowser()->setObjectsSelected(aSelList);
     objectBrowser()->blockSignals(aBlocked);
   }
-  if (aHasHidden) 
-    QMessageBox::information(desktop(), tr("Find results"), 
+  if (aHasHidden)
+    QMessageBox::information(desktop(), tr("Find results"),
                              tr("Results not found"), QMessageBox::Ok);
 }
 
index c8e6b6435fef369b94bec47d612694f01c6bd61f..9d67d191ec84944b7384f3addbbcaaecda90d759 100755 (executable)
@@ -58,7 +58,7 @@ class XGUI_EXPORT XGUI_Workshop : public QObject
 Q_OBJECT
  public:
   /// Constructor
-  /// \param theConnector a Salome connector object. 
+  /// \param theConnector a Salome connector object.
   /// Used only if the workshop is launched in Salome environment
   XGUI_Workshop(XGUI_SalomeConnector* theConnector = 0);
   virtual ~XGUI_Workshop();
@@ -176,7 +176,7 @@ Q_OBJECT
   void deleteObjects();
 
   //! Searches for selected features unused in other (not selected) features. If one or several
-  //! selected features are found, a warning message proposes to delete them. It contains 
+  //! selected features are found, a warning message proposes to delete them. It contains
   //! the list of features to be deleted.
   void cleanHistory();
 
@@ -288,8 +288,8 @@ Q_OBJECT
   /// \param theDoc the document for objects synchronisation
   /// \param theGroup the group name
   /// \param theUpdateViewer update viewer flag
-  void synchronizeGroupInViewer(const DocumentPtr& theDoc, 
-                                const std::string& theGroup, 
+  void synchronizeGroupInViewer(const DocumentPtr& theDoc,
+                                const std::string& theGroup,
                                 bool theUpdateViewer);
 
   /// Update the property panel content by the XML description of the operation and set the panel
@@ -312,7 +312,7 @@ Q_OBJECT
   /// features found in the given list
   void highlightFeature(const QObjectPtrList& theObjects);
 
-  /// Returns Data Model XML reader which contains information about 
+  /// Returns Data Model XML reader which contains information about
   /// Data structure configuration
   const Config_DataModelReader* dataModelXMLReader() const { return myDataModelXMLReader; }
 
index 849466192813c7078634f398aa82845264f3d8b0..55bfec3d85754df63afe4cab8a32a06b266336b8 100755 (executable)
@@ -159,7 +159,7 @@ void XGUI_WorkshopListener::processEvent(const std::shared_ptr<Events_Message>&
     }
   }
   else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_SELFILTER_LOADED)) {
-    std::shared_ptr<Config_SelectionFilterMessage> aMsg = 
+    std::shared_ptr<Config_SelectionFilterMessage> aMsg =
       std::dynamic_pointer_cast<Config_SelectionFilterMessage>(theMessage);
     if (aMsg) {
       ModuleBase_FilterFactory* aFactory = myWorkshop->selectionFilters();
@@ -177,7 +177,7 @@ void XGUI_WorkshopListener::processEvent(const std::shared_ptr<Events_Message>&
     aDisplayer->enableUpdateViewer(true);
   } else {
     //Show error dialog if error message received.
-    std::shared_ptr<Events_InfoMessage> anIngfoMsg = 
+    std::shared_ptr<Events_InfoMessage> anIngfoMsg =
       std::dynamic_pointer_cast<Events_InfoMessage>(theMessage);
     if (anIngfoMsg) {
       emit errorOccurred(anIngfoMsg);
@@ -258,7 +258,7 @@ void XGUI_WorkshopListener::
     ObjectPtr aObj = (*aIt);
 
     // Hide the object if it is invalid or concealed one
-    bool aHide = !aObj->data() || !aObj->data()->isValid() || 
+    bool aHide = !aObj->data() || !aObj->data()->isValid() ||
       aObj->isDisabled() || (!aObj->isDisplayed());
     if (!aHide) { // check that this is not hidden result
       ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
@@ -295,8 +295,8 @@ void XGUI_WorkshopListener::
     #endif
     if (aHide) {
       //we should provide objects which are hidden in the viewer, e.g. sketch always should
-      // visualizes all sub-features, if some features are to be hidden, sould be proposed may 
-      // be to removed #1223 
+      // visualizes all sub-features, if some features are to be hidden, sould be proposed may
+      // be to removed #1223
       // aHiddenObjects.push_back(aObj);
       aRedisplayed = aDisplayer->erase(aObj, false) || aRedisplayed;
       #ifdef DEBUG_FEATURE_REDISPLAY
@@ -349,7 +349,7 @@ void XGUI_WorkshopListener::
     //VSV FitAll updated viewer by itself
     if (aDoFitAll)
       myWorkshop->viewer()->fitAll();
-    else 
+    else
       aDisplayer->updateViewer();
   }
 }
@@ -393,7 +393,7 @@ void XGUI_WorkshopListener::
     // the validity of the data should be checked here in order to avoid display of the objects,
     // which were created, then deleted, but flush for the creation event happens after that
     // we should not display disabled objects
-    bool aHide = !anObject->data()->isValid() || 
+    bool aHide = !anObject->data()->isValid() ||
                  anObject->isDisabled() ||
                  !anObject->isDisplayed();
     if (!aHide) { // check that this is not hidden result
@@ -406,14 +406,14 @@ void XGUI_WorkshopListener::
         aHide = !aRes->shape().get() || aRes->shape()->isNull();
     }
     if (!aHide) {
-      // setDisplayed has to be called in order to synchronize internal state of the object 
+      // setDisplayed has to be called in order to synchronize internal state of the object
       // with list of displayed objects
       if (myWorkshop->module()->canDisplayObject(anObject)) {
         anObject->setDisplayed(true);
         aDisplayed = displayObject(anObject);
         if (aDisplayed)
           aDoFitAll = aDoFitAll || neededFitAll(anObject, aNbOfShownObjects);
-      } else 
+      } else
         anObject->setDisplayed(false);
     }
   }
index abc801ec1cdd67f1734cb3bacb74b7735acda377..9813b6c3d39e164c275ae87d4a8534753999ce07 100755 (executable)
@@ -31,7 +31,7 @@ class XGUI_EXPORT XGUI_WorkshopListener : public QObject, public Events_Listener
   Q_OBJECT
 public:
   /// Constructor. Used only if the workshop is launched in Salome environment
-  /// \param theWorkshop a reference to workshop. 
+  /// \param theWorkshop a reference to workshop.
    XGUI_WorkshopListener(ModuleBase_IWorkshop* theWorkshop);
   virtual ~XGUI_WorkshopListener();
 
@@ -83,7 +83,7 @@ protected:
   /// Calls the module method of cusomize object for the feature of the current operation
   /// Perform cusomize if the force redisplay flag is true or the list of objects contains the
   /// current operation feature
-  /// \param theObjects a list of objects to find current operation feature 
+  /// \param theObjects a list of objects to find current operation feature
   ///                   if forced redisplay is false
   /// \param theForceRedisplay a flag to customize object even always
   /// \return true if the object is modified